Skip to content

Commit

Permalink
Repo Organization and Touch Up.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrazavi committed Nov 28, 2023
1 parent 672aff4 commit b49d190
Show file tree
Hide file tree
Showing 17 changed files with 2,168 additions and 2,049 deletions.
36 changes: 36 additions & 0 deletions assignments/markdown/00-DSI-Pre-Workshop-Assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# DSI: Unix Shell, Git and GitHub

## Pre-Workshop Assignment

### Notes:

- We will learn more about the above commands during the workshop; you do not need to be familiar with these commands prior to the workshop.
- This is an ungraded assignment but **please complete it before October 5th**. If you are having difficulty accessing the terminal or with any of the above commands, please join the October 5th prep session either in-person or online.

### Requirements:

1. Open Terminal

- MacOS: `CMD + Space` and search for "Terminal"
- Windows: Please follow [this guide](https://www.ssl.com/how-to/enable-linux-subsystem-install-ubuntu-windows-10/)

2. Run the following commands in order and screenshot the output

```
$ echo (inset your name without parentheses)
$ cd
$ pwd
$ echo $HOME
```

Please answer the following questions:

1. Were you able to open terminal? Y / N
2. Do you know where your home directory is? Y / N
3. Do you know what folders it contains? Y / N

### Lesson Outcomes:

- Determine if you can access the terminal
- Try executing some basic commands
- Learn and share what your home directory is set to
37 changes: 37 additions & 0 deletions assignments/markdown/01-Unix-Assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# DSI: Unix Shell, Git and GitHub

## Assignment 1: Unix and Data

### Requirements:

1. Write a script that takes the parking_data.csv file as a positional parameter from the terminal as the input (this is so that the script can be run from any computer, so long as the csv file is available, assuming it is on the Desktop).

- You can find the Toronto parking ticket data at Toronto's Open Data Portal: [https://open.toronto.ca/dataset/parking-tickets/](https://open.toronto.ca/dataset/parking-tickets/)

2. Build a function or multiple functions into the script that:
a) Prints all types of parking infractions (_infraction_description_)
b) Prints the mean, min and max _set_fine_amount_ - these calculations can either be in the same function or multiple functions
c) Saves one type of parking infraction of your choosing to a separate csv file (this file should contain all observations of the chosen _infraction_description_, _set_fine_amount_, and _location2_ with the same headings as original csv)

3. Things to remember:
- The script should be able to navigate to the directory housing the csv file
- Functions should include loops (either if/else, while, until, for) to make the process iterative
- You **must use outside sources** (Google and StackOverflow) to build these calculations
- Remember to cite any code that was used

### Lesson Outcomes:

- Practice using commands, positional parameters, functions and loops from submodules on a dataset
- Work on navigating directories within scripts
- Build skills in searching using Google and StackOverflow for commands not directly learned within the lesson and cite your sources

### Rubric:

| Component | 1 | 2 | 3 | 4 | 5 |
| ----------------------------------------------------------------------------- | --- | --- | --- | --- | --- |
| 1. Script is functioning and does as described in the assignment requirements | | | | | |
| 2. Script uses at least one type of loop to fulfill requirements | | | | | |
| 3. Script is free from bugs and has been appropriately commented | | | | | |
| 4. All outside sources have been properly cited | | | | | |

**Total:** /20
132 changes: 132 additions & 0 deletions assignments/markdown/02-Git-Quiz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# DSI: Unix Shell, Git and GitHub

## Assignment 2 & Quiz: Git and GitHub

### Part 1

Part 1 of Assignment 2 is a quiz. Please complete to the best of your ability. Notes are permitted. Please email your responses to the TA with Instructor CC'd.

1. Check all that are TRUE about version control:

- [ ] Can revert files to a previous state
- [ ] Can compare changes over time
- [ ] Can see who modified something last
- [ ] Can recover lost files

2. What is the difference between centralized version control systems and distributed version control systems?

```
Your answer here...
```

3. What are the three states that files can reside in?

- [ ] a) committed, changed, waiting
- [ ] b) saved, changed, staged
- [ ] c) committed, modified, staged
- [ ] d) saved, modified, staged

4. What command initializes a new repository?

- [ ] a) `git clone`
- [ ] b) `git branch`
- [ ] c) `git fork`
- [ ] d) `git init`

5. What does `git diff` do?

- [ ] a) compares the differences between the home directory and staging area
- [ ] b) compares the differences between the working directory and staging area
- [ ] c) compares the differences between the working directory and what’s been committed
- [ ] d) compares the differences between the staging area and what’s been committed

6. How do you add a message to your commit? (select all that apply)

- [ ] a) `git commit -m`
- [ ] b) `git commit --messages`
- [ ] c) `git commit`
- [ ] d) `git commit -message`

7. How do you add a remote repo? (select all that apply)

- [ ] a) `git remote add`
- [ ] b) `git add remote`
- [ ] c) `git clone`
- [ ] d) `git add clone`

8. How do you add a remote repo? (select all that apply)

- [ ] a) `git remote`
- [ ] b) `git add remote`
- [ ] c) `git clone`
- [ ] d) `git add clone`

9. What is the difference between `git pull` and `git fetch`?

```
Your answer here...
```

9. How do you switch branches?

- [ ] a) `git checkout`
- [ ] b) `git checkout -b`
- [ ] c) `git branch -c`
- [ ] d) `git branch`

10. Why are messages important? What would make a good commit message?

```
Your answer here...
```

11. Please correct the merge shown below (both codes are suitable, neither has errors):

```
<<<<<<< HEAD
df.loc[df['sex'] == 'f', 'age'].mean()
=======
df.loc[df['sex'] == 'm', 'age'].mean()
>>>>>>> branch_1
```

```
Your corrected merge here...
```

# Part 2

1. `fork` and `clone` [this class GitHub repo](https://github.com/rachaellam/DSI-workshop-repo).
2. `push` your Assignment 1 to the folder labelled "assignment-2." Your additions should include...
- All components necessary to run Assignment 1
- Proper folder structure (inputs, outputs, scripts)
- A README.md file. The README should include components discussed in the workshop. Feel free to research good READMEs and add anything that you believe will add value to your README
3. Create a `pull request` to add your additions to the class repo.

## Rubric:

| Component | 1 | 2 | 3 | 4 | 5 |
| --------------------------------------------------------------------------------------------------------------------------- | --- | --- | --- | --- | --- |
| Repo contains all necessary components to run Shell script and has the correct folder structure | | | | | |
| README is comprehensive and includes components discussed in class plus at least one component learned from outside sources | | | | | |
| Pull request has been successfully requested without any merge errors | | | | | |

**Total:** /15
**Quiz Total:** /11
**Final:** /26
22 changes: 22 additions & 0 deletions assignments/markdown/03-Ethics-Inequality-Assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DSI: Unix Shell, Git and GitHub

## Assignment 3: Inequity and Ethics

### Requirements:

1. Reflect on a past project that lacked an ethics and inequity component (minimum 1 page). What would you change about your project? What discussion should you add?
2. Include at least 3 primary and/or secondary resources

### Lesson Outcomes:

- Reflect on inequities and inequalities in relation to data science work
- Better understand the people and communities that are omitted and how that might continue to marginalize already marginalized people and communities

### Rubric:

| Component | 1 | 2 | 3 | 4 | 5 |
| ------------------------------------------------------------------- | --- | --- | --- | --- | --- |
| Thorough discussion of additional ethical component to past project | | | | | |
| Included at least 3 resources which have all been properly cited | | | | | |

**Total:** /10
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ The goal of this homework is to give students an opportunity to practice what wa

Because each class builds upon the last, it's important to review the content and become comfortable with it, as time is too limited for a full in-class review.

---
##### **Due Dates**
Homework will be released after each class and is due on the day of the next class. For example, after class on Monday, the homework prompt will be released and then homework is expected to be handed in at any time on Thursday.

---
<!--_color: white -->
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b49d190

Please sign in to comment.