Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dolsysmith committed Dec 12, 2023
1 parent 57926cf commit 7cbc773
Show file tree
Hide file tree
Showing 61 changed files with 121,061 additions and 1,427 deletions.
46 changes: 42 additions & 4 deletions _sources/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ Boolean value
if x:
print(2/x)
call
To call a method or function is to instruct Python to execute the function or method's predefined behavior. And a function or method is really just a kind of shortcut: instead of our having to type out the same code whenever we want to perform a certain task (like splitting a string, for instance), we call the function or method in which that behavior has been defined. It's sort of like using the address book on your phone: you can tap `Mom` in order to call or text Mom, instead of having to enter her number every time.
character
A character is the basic unit of a Python {term}`string`. In Python, characters are defined according to the [Unicode standard](https://home.unicode.org/) by default. Unicode characters comprise the following (and more):
Expand Down Expand Up @@ -151,7 +155,15 @@ comment
We use comments to document our code for ourselves and for others.
conditional logic
A general term for the set of operations that allow computers to behave differently based on different inputs or conditions. At the most fundamental level, all other mathematical operations in a computer (addition, multiplication, etc.) are implemented using combinations of {term}`Boolean operator`s implemented in electronic circuits.
In higher-level languages like Python, when we speak of conditional logic, we're often referring to {term}`if statement`s.
CSV
An acronym for "comma-separated values," CSV is a data format compatible with spreadsheet applications like Excel. It is also a format widely used for storing tabular data: data structured in rows and columns. Unlike {term}`JSON`, CSV format does not generally work well with nested data.
curly braces
Expand All @@ -169,10 +181,17 @@ dictionary
print(my_info['job_title']) # Prints "Librarian"
documentation
Human-readable text that explains how a program or a part of a program is intended to work and/or the rationale for a particular choice made by the programmer. Some documentation resides in separate files from the program itself; an example of this kind of documentation is found on Python docs [website](https://docs.python.org/3/). Other documentation is mixed in with the program code. Such documentation is usually offset by particular characters that tell the computer running this code to ignore the documentation itself. In Python, to include documentation within our code we either prefix a line with a hashtag (`#`) or enclose multiple lines within triple quotes (`'''`).
dot notation
When an {term}`instance` of a Python {term}`type` (or {term}`class`) has {term}`attributes` or {term}`method`s, we use dot notation to access the attributes/methods. For instance, a {term}`list` has an `append()` method, so for a given list `my_list`, we can write `my_list.append(3)` (to add the integer `3` to the end of the list).
exception
An error message in Python arising from a problem in the logic of the code or its inputs. As opposed to a syntax error, which will always cause code to fail, an exception is Python's way of saying, "this code might run, EXCEPT not in this case."
double equals sign
Expand Down Expand Up @@ -347,6 +366,10 @@ list
It's more common to use a {term}`dictionary` to represent complex data of multiple types, since each element in a dictionary has a {term}`key` that can be more descriptive. For example, if our dictionary has an `age` key, we might guess that this key will correspond to a numeric type, not a string.
list of dictionaries
A common approach to representing data that consist of multiple elements (like books or university courses or people in a class) where each element has more or less the same set of attributes. (For books, those attributes might be `title`, `author`,` publisher`, etc. For people, `name`, `age`, `email address`, etc.) Each element in the list is a dictionary with the same set of keys; only the values are different.
loop variable
The {term}`variable` in a {term}`for loop` that assumes the value of each element in the {term}`collection` over which the loop runs.
Expand Down Expand Up @@ -418,6 +441,12 @@ return
See {term}`function` for more information.
set
A Python data type that is like a {term}`list` but that can contain only unique elements. Use the `set()` function to create a set from a list: `set([1,2,1,3,2,4,3,5])` returns `{1, 2, 3, 4, 5}`. (Note that the curly braces are used to delimit sets as well as dictionaries; unlike dictionaries, sets do not have key/value pairs, only single elements separated by commas.)
Only certain Python types can be used to create sets. You can't, for instance, convert a list of dictionaries into a set. Sets are mostly useful when dealing with numeric values and/or strings.
slice
A slice is a subset of a Python {term}`list` or {term}`string`. To create a slice, we use {term}`square brackets` around a pair of numbers separated by a {term}`colon`, where the first number is the position of the first element we want to include, and the last element is **one plus** the position of the last element to include.
Expand All @@ -442,6 +471,11 @@ square brackets
- In creating a {term}`slice` of a string or list: `my_list[0:2]`
- In accessing the value in a dictionary by its {term}`key`: `print(my_dict['name'])` prints the value associated with the key `name` in `my_dict`.
standard library
The set of functions, data types, methods, and other tools that are available with the basic installation of Python.
string
A basic Python {term}`type` comprising a {term}`collection` of {term}`character`s. We can create a sting by enclosing any text (really, anything you can type on your keyboard) between quotation marks.
Expand All @@ -450,6 +484,10 @@ string
Strings have {term}`method`s, such as `split()`. See the [Python documentation](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str) for a complete list.
test
A test in the context of programming is typically some code designed to check the functionality of other code. For instance, when developing an application, programmers will typically write multiple tests that can be used to confirm that various parts of the application work as intended. This approach is particularly helpful when the application goes through multiple development cycles, receiving bug fixes and enhancements. In such situations, having a suite of tests ensures that changes to one part of the application don't break other parts of the application.
type
A Python type is, in essence, a set of behaviors associated with a certain way of representing data. Let's unpack this a bit.
Expand All @@ -468,6 +506,10 @@ type
Just as cooks choose the right appliance for the task at hand, so programmers choose the kind of `type` to use depending on goals and context.
Unicode
A system for representing characters from the world's many languages along with other symbols (mathematical symbols, emojis, etc.). Python handles Unicode by default, which means that you can use Python to work with text in languages other than English. See {term}`character` for more information.
value
The word _value_ is ambiguous when talking about Python. On the one hand, we can talk about any occurence of data as a _value_, as when we say that in defining a {term}`variable`, the value goes on the right of the equals sign.
Expand All @@ -492,10 +534,6 @@ variable
In creating variables, we assign a name to a value with the single equals sign. The names goes on the left of the equals sign, the value on the right.
Unicode
A system for representing characters from the world's many languages along with other symbols (mathematical symbols, emojis, etc.). Python handles Unicode by default, which means that you can use Python to work with text in languages other than English. See {term}`character` for more information.
white space
The phrase _white space_ refers to characters created by the spacebar, the tab key, and/or the return/enter key on your keyboard.
Expand Down
21 changes: 11 additions & 10 deletions _sources/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,18 @@ But whatever method(s) you choose, **please ensure that everyone on the team has

### Team roles

#### Rotating notetaker
To support a productive and equitable experience, each team will assign someone to each of the following roles. It is recommended that teams rotate these roles, perhaps at the start of each day, so that everyone gets to try out all the roles, even those they may feel less comfortable with.

- **Notetaker**: Everyone on the team should write code during the hands-on exercises around which we have structured Python Camp. The notetaker, however, is responsible for **documenting** other aspects of the programming process. These include:
- Jotting down questions that arise while trying to solve a problem;
- Recording team decisions and documenting project plans;
- Taking notes on team discussions in response to discussion prompts.
- **Reporter**: The reporter is the team's designated spokesperson. Everyone on the team should feel free to ask questions or share ideas with the larger group at any time. However, when teams are asked to share the outcome of group discussions, it helps to have someone delegated to this task. And rotating the reporter role gives everyone on the team a chance to share out.
- **Advocate**: The advocate has a very important role: to make sure that everyone has a chance to contribute to the work of the team, and that no one is getting left behind. It's perfectly okay -- and probably inevitable -- that members of the team will contribute in different ways. For instance, some people might have a better eye for detail, while others are more focused on the big picture. But here are some ways in which the advocate can help ensure equity and inclusion:
- During group discussions, if situations arise where one or two team members are doing all the talking, the advocate might say something like, "I see that we haven't heard from __________ in a while. Let's make space for anything they'd like to share."
- During hands-on exercises/problem-solving, the advocate might check in with team members to see if they're lost, feeling confused, or frustrated. In these situations, the advocate might suggest that the team take a pause to bring everyone up to speed, or the advocate might suggest flagging a Python Camp instructor to provide more guidance.
- The advocate can advocate for themselves as well other team members. But some people feel more comfortable advocating on behalf of others, which is why it's especially useful to rotate this role.

For the prompts that ask you to write code, everyone should be doing so in parallel in their own notebooks, even when that involves some duplication of effort: the point of these team activities is not to demonstrate your efficiency but your shared understanding.

For the prompts that involve planning, design and discussion, it will be useful to designate a single person as notetaker for that activity. **Please do rotate the role between activities** so that everyone on the team shares the responsibility. Taking notes is a useful way to reinforce your learning. But it can also prevent the notetaker from engaging fully in the discussion, so it's important to distribute the task equitably.

Your Python Camp facilitators will remind you to rotate the notetaking task at the start of each major team activity.

#### Team facilitator

It's not necessary to delegate a leader for your team, given the highly structured activities of Python Camp. But if the team would be more comfortable choosing one member to moderate the discussion and keep things on track, you're welcome to do so. You might also consider rotating this role, so that everyone has a chance to contribute in every way.

## How Can I Make the Most of This Experience?

Expand Down
20 changes: 8 additions & 12 deletions _sources/homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,26 @@ The homeworks are designed to be completed individually, but you are also free t

## Homework Format

Each day's homework lesson consists of one or two parts. Please do the parts in order as linked from the daily schedule on the left panel of this screen.
1. With the exception of Day 4, the first part consists of a Python motebook with documentation, examples of code, and exercises that ask you to write code yourself. Hints and/or hidden solutions are provided for the latter, but you are strongly encouraged to try each exercise on your own before looking at the solution.
Each day's homework lesson consists of a Python motebook with documentation, examples of code, and exercises that ask you to write code yourself. Hints and/or hidden solutions are provided for the latter, but you are strongly encouraged to try each exercise on your own before looking at the solution.
- Just as we did for the in-class activities, you should open each homework notebook in JupyterHub (using the rocket icon at the top of the screen) and execute the code cells in order as you read through the notebook. Any changes you make to the notebook in JupyterHub will be saved to your JupyterHub account.
- **Please try your best to complete these notebooks on the day they are assigned**; we'll build on the concepts and practices they introduce in our team activities on the following day.
2. With the exception of Day 1, the second part of each homework consists of a notebook with one or more exercises that you should complete and upload to GitHub Classroom. These notebooks are called "Graded Homework: Day ____" (followed by the day, either 2, 3, or 4).
- You don't need to complete these exercises on the day they are assigned, though you may.
- In addition to attendance for the duration of Python Camp, successful completion and submission of these notebooks is a requirement for the Python Camp Certificate of Completion.
- Please see the instructions for uploading graded notebooks below.
2. You must submit the **final homework notebook** for grading in order to receive the Python Camp Certificate of Completion. The grading is done automatically on GitHub Classroom, and you will have an opportunity to ensure that your work is correct before submitting. Please see the instructions for submitting the graded notebook below.

## Submitting Graded Notebooks

We're using GitHub Classroom to track submission of these notebooks. Please read the following instructions carefully, and let us know if you have any questions.
We're using GitHub Classroom to track submission of this notebook. Please read the following instructions carefully, and let us know if you have any questions.

1. To complete each notebook, open it in JupyterHub (using the rocket icon in the upper left) and follow the instructions included with the notebook.
1. To complete the notebook, open it in JupyterHub (using the rocket icon in the upper left) and follow the instructions included with the notebook.
2. When you've successfully completed each exercise, the code cell in the `Tests` section should run without any errors or other output. If you see an `AssertionError`, it will indicate the part of your code that is not behaving as expected.
3. WHen you've finished your work, don't forget to save your notebook in JupyterHub!
4. Download your notebook from JupyterHub to your own computer, using the `File -> Download as -> Notebook` command from the menu at the top.
4. Download your notebook from JupyterHub to your own computer, using the `File -> Download` command from the menu at the top.

````{image} img/homework/download-notebook.png
:alt: Download as notebook option from File menu
:alt: Dropdown menu showing download option from File menu
:width: 500px
:align: center
````
5. Depending on your computer setup, the downloaded notebook may be located in your `Downloads` folder, on your desktop, or elsewhere. It should have the name `HW_n_GR.ipynb` (where `n` is the number of the homework day, e.g., 2, 3, or 4). If you have downloaded this file before, the latest version may have a different name. In this case, you should delete the old file and **rename the newly downloaded file** so that it has the same name as the original.
5. Depending on your computer setup, the downloaded notebook may be located in your `Downloads` folder, on your desktop, or elsewhere. It should have the name `HW_Final_GR.ipynb`. If you have downloaded this file before, the latest version may have a different name. In this case, you should delete the old file and **rename the newly downloaded file** so that it has the same name as the original.
5. In the Python Camp roster, copy the link in the column associated with this homework assignment and paste it into a new tab on your web browser.
6. If you don't have a GitHub account, you'll need to create one. (GitHub is a widely used platform for sharing and collaborating on code.) You don't need to use the same email address on your GitHub account as you are using for Python Camp, so if you already have a GitHub account under a different email address, feel free to use that one.
7. Once you've logged into GitHub, and if this is your first time submitting an assignment, you'll be asked to select your email address from the GitHub Classroom roster. **Please make sure you select the correct email address**. This will link your GitHub account to that email address in our GitHub Classroom instance.
Expand All @@ -48,7 +44,7 @@ We're using GitHub Classroom to track submission of these notebooks. Please read
:width: 500px
:align: center
````
11. You'll also see some files listed in your repo, including one with the name of the homework notebook you're submitting, e.g., `HW_GR_2.ipynb`. At this point, all you need to do is upload the new version of this notebook that you downloaded from JupyterHub in step 4. To upload the file, click the `Add file` button next to the green `Code` button at the top, and then select `Upload file`.
11. You'll also see some files listed in your repo, including one with the name of the homework notebook you're submitting, e.g., `HW_Final_GR.ipynb`. At this point, all you need to do is upload the new version of this notebook that you downloaded from JupyterHub in step 4. To upload the file, click the `Add file` button next to the green `Code` button at the top, and then select `Upload file`.
````{image} img/homework/assignment-repo-2.png
:alt: Screen showing the GitHub dropdown button to upload files.
Expand Down
2 changes: 1 addition & 1 deletion _sources/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ then Python Camp may be for you!

Over the course of **four days**, participants will spend approximately **four hours a day** together, working in small teams on activities facilitated by Python Camp instructors.

In addition, participants will complete approximately **one to two hours** of self-guided homework lessons each day. These lessons are intended to be done individually and serve to prepare participants for the team-based learning on the following day. The homework includes a handful of shorter exercises to test participants' knowledge, which will be graded.
In addition, participants will complete approximately **one to three hours** of self-guided homework lessons each day. These lessons are intended to be done individually and serve to prepare participants for the team-based learning on the following day. The homework includes a handful of shorter exercises to test participants' knowledge, which will be graded.

Successful completion of these exercises, as well as attendance and participation during all four days of Python Camp, will confer a certificate of achievement.

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _sources/notebooks/homework/HW_1_from_code_to_data.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 7cbc773

Please sign in to comment.