├── Week4 ├── assignments │ └── README.md ├── notebooks │ ├── images │ │ ├── shell-view.png │ │ └── shell-script.png │ └── pydatastructures2.ipynb ├── lesson1.md ├── lesson2.md ├── lesson3.md └── README.md ├── Week11 ├── assignments │ └── README.md ├── README.md ├── lesson2.md ├── lesson3.md └── lesson1.md ├── Week12 ├── assignments │ └── README.md ├── images │ └── relational_databases.jpg ├── lesson1.md ├── lesson2.md ├── lesson3.md └── README.md ├── Week13 ├── assignments │ └── README.md ├── lesson1.md ├── README.md ├── lesson2.md └── lesson3.md ├── Week14 ├── assignments │ ├── README.md │ └── data │ │ └── ElectoralCollege2016.csv ├── images │ └── BBQ.gif ├── notebook │ └── images │ │ ├── dom-tree.png │ │ ├── html-dom.png │ │ ├── html-view.png │ │ ├── dom-element.png │ │ └── html-element.png ├── lesson1.md ├── lesson3.md ├── lesson2.md └── README.md ├── Week6 ├── assignments │ └── README.md ├── images │ ├── extrapolating.png │ └── regular_expressions.png ├── lesson2.md ├── lesson3.md ├── lesson1.md └── README.md ├── Week7 ├── assignments │ ├── README.md │ ├── sine_cos.png │ ├── p2_1_example.png │ ├── p2_2_example.png │ └── Problem_1.ipynb ├── images │ └── conditional_risk.png ├── lesson3.md ├── lesson1.md ├── lesson2.md └── README.md ├── Week8 ├── assignments │ └── README.md ├── images │ └── pandas_logo.png ├── lesson3.md ├── lesson2.md ├── lesson1.md └── README.md ├── Week9 ├── assignments │ └── README.md ├── images │ └── BBQ.gif ├── lesson2.md ├── lesson3.md ├── lesson1.md └── README.md ├── Week10 ├── assignments │ ├── README.md │ ├── CDFplot.png │ ├── PMF_200.png │ ├── PMF_50.png │ ├── p3_kde.png │ ├── p3_pair.png │ ├── p3_hexbin.png │ ├── p1_example.png │ └── p2_example.png ├── lesson1.md ├── lesson3.md ├── README.md └── lesson2.md ├── images ├── pull_request_0.png ├── pull_request_1.png ├── pull_request_2.png ├── pull_request_3.png ├── pull_request_4.png ├── python_2_or_3.png └── Draft_Version_picture.png ├── Week2 ├── images │ └── command-line.png ├── notebooks │ └── images │ │ ├── ipynb-unix.png │ │ ├── cell-toolbar.png │ │ └── ipython-help.png ├── assignments │ ├── images │ │ ├── control_panel.png │ │ ├── new_terminal.png │ │ ├── assignments_tab.png │ │ ├── submit_assignment.png │ │ ├── submitted_assignments.png │ │ ├── nbgrader_extension_activate.png │ │ └── assignments_tab_first_assignment.png │ ├── README.md │ ├── Problem_2.ipynb │ └── Problem_3.ipynb ├── lesson1.md ├── lesson3.md ├── README.md └── lesson2.md ├── Week3 ├── images │ └── python-logo.png ├── assignments │ ├── decision_tree.png │ ├── README.md │ ├── scripts │ │ └── w3p1.sh │ └── Problem_2.ipynb ├── lesson1.md ├── lesson3.md ├── lesson2.md └── README.md ├── help ├── Debugging_flow_chart.pdf ├── images │ ├── control_panel.png │ ├── error_example1.png │ ├── error_example2.png │ ├── error_example3.png │ ├── error_example4.png │ ├── error_example5.png │ ├── error_example6.png │ ├── error_example7.png │ ├── error_example8.png │ ├── new_terminal.png │ ├── assignments_tab.png │ ├── xkcd_sustainable.png │ ├── Start_peer_assess.png │ ├── final_peer_assess.png │ ├── first_peer_assess_q.png │ ├── submit_assignment.png │ ├── comments_peer_assess.png │ ├── second_peer_assess_q.png │ ├── submitted_assignments.png │ ├── nbgrader_extension_activate.png │ └── assignments_tab_first_assignment.png ├── Readme.md ├── peer_grading_instruct.md ├── act_assign_tab.md └── read_error_mes.md ├── Week5 ├── notebooks │ ├── images │ │ └── wget.png │ └── unixnetwork.ipynb ├── images │ ├── Start_peer_assess.png │ ├── final_peer_assess.png │ ├── xkcd_sustainable.png │ ├── comments_peer_assess.png │ ├── first_peer_assess_q.png │ └── second_peer_assess_q.png ├── lesson3.md ├── lesson2.md ├── lesson1.md ├── assignments │ └── README.md └── README.md ├── Week1 ├── images │ └── UNIX-Licence-Plate.JPG ├── notebooks │ └── images │ │ ├── docker-ls.png │ │ ├── docker-rm.png │ │ └── docker-root.png ├── README.md ├── lesson3.md ├── lesson2.md └── lesson1.md ├── Week15 ├── images │ └── bluewatersimage.jpg ├── lesson1.md └── README.md ├── orientation ├── notebooks │ └── images │ │ ├── git-add.png │ │ ├── git-clone.png │ │ ├── git-init.png │ │ ├── phdcomics.gif │ │ ├── git-commit.png │ │ ├── git-config.png │ │ ├── git-website.png │ │ ├── github-app.png │ │ ├── github-button.png │ │ ├── github-website.png │ │ └── github-appclient.png ├── Pre-Class_Activity.md └── README.md ├── .gitignore ├── extra_credit └── README.md ├── LICENSE.md ├── README.md └── CONTRIBUTING.md /Week4/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 4 Assignment 2 | -------------------------------------------------------------------------------- /Week11/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 11 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week12/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 12 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week13/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 13 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week14/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 14 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week6/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 6 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week7/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 7 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week8/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 8 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week9/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 9 Assignment 2 | 3 | -------------------------------------------------------------------------------- /Week10/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 10 Assignment 2 | 3 | 4 | -------------------------------------------------------------------------------- /Week9/images/BBQ.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week9/images/BBQ.gif -------------------------------------------------------------------------------- /Week14/images/BBQ.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/images/BBQ.gif -------------------------------------------------------------------------------- /images/pull_request_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/pull_request_0.png -------------------------------------------------------------------------------- /images/pull_request_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/pull_request_1.png -------------------------------------------------------------------------------- /images/pull_request_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/pull_request_2.png -------------------------------------------------------------------------------- /images/pull_request_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/pull_request_3.png -------------------------------------------------------------------------------- /images/pull_request_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/pull_request_4.png -------------------------------------------------------------------------------- /images/python_2_or_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/python_2_or_3.png -------------------------------------------------------------------------------- /Week10/assignments/CDFplot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/CDFplot.png -------------------------------------------------------------------------------- /Week10/assignments/PMF_200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/PMF_200.png -------------------------------------------------------------------------------- /Week10/assignments/PMF_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/PMF_50.png -------------------------------------------------------------------------------- /Week10/assignments/p3_kde.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/p3_kde.png -------------------------------------------------------------------------------- /Week10/assignments/p3_pair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/p3_pair.png -------------------------------------------------------------------------------- /Week2/images/command-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/images/command-line.png -------------------------------------------------------------------------------- /Week3/images/python-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week3/images/python-logo.png -------------------------------------------------------------------------------- /Week6/images/extrapolating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week6/images/extrapolating.png -------------------------------------------------------------------------------- /Week7/assignments/sine_cos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week7/assignments/sine_cos.png -------------------------------------------------------------------------------- /Week8/images/pandas_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week8/images/pandas_logo.png -------------------------------------------------------------------------------- /help/Debugging_flow_chart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/Debugging_flow_chart.pdf -------------------------------------------------------------------------------- /help/images/control_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/control_panel.png -------------------------------------------------------------------------------- /help/images/error_example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example1.png -------------------------------------------------------------------------------- /help/images/error_example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example2.png -------------------------------------------------------------------------------- /help/images/error_example3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example3.png -------------------------------------------------------------------------------- /help/images/error_example4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example4.png -------------------------------------------------------------------------------- /help/images/error_example5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example5.png -------------------------------------------------------------------------------- /help/images/error_example6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example6.png -------------------------------------------------------------------------------- /help/images/error_example7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example7.png -------------------------------------------------------------------------------- /help/images/error_example8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/error_example8.png -------------------------------------------------------------------------------- /help/images/new_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/new_terminal.png -------------------------------------------------------------------------------- /Week10/assignments/p3_hexbin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/p3_hexbin.png -------------------------------------------------------------------------------- /Week5/notebooks/images/wget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/notebooks/images/wget.png -------------------------------------------------------------------------------- /help/images/assignments_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/assignments_tab.png -------------------------------------------------------------------------------- /help/images/xkcd_sustainable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/xkcd_sustainable.png -------------------------------------------------------------------------------- /images/Draft_Version_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/images/Draft_Version_picture.png -------------------------------------------------------------------------------- /Week1/images/UNIX-Licence-Plate.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week1/images/UNIX-Licence-Plate.JPG -------------------------------------------------------------------------------- /Week10/assignments/p1_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/p1_example.png -------------------------------------------------------------------------------- /Week10/assignments/p2_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week10/assignments/p2_example.png -------------------------------------------------------------------------------- /Week14/notebook/images/dom-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/notebook/images/dom-tree.png -------------------------------------------------------------------------------- /Week14/notebook/images/html-dom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/notebook/images/html-dom.png -------------------------------------------------------------------------------- /Week15/images/bluewatersimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week15/images/bluewatersimage.jpg -------------------------------------------------------------------------------- /Week3/assignments/decision_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week3/assignments/decision_tree.png -------------------------------------------------------------------------------- /Week5/images/Start_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/Start_peer_assess.png -------------------------------------------------------------------------------- /Week5/images/final_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/final_peer_assess.png -------------------------------------------------------------------------------- /Week5/images/xkcd_sustainable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/xkcd_sustainable.png -------------------------------------------------------------------------------- /Week7/assignments/p2_1_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week7/assignments/p2_1_example.png -------------------------------------------------------------------------------- /Week7/assignments/p2_2_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week7/assignments/p2_2_example.png -------------------------------------------------------------------------------- /Week7/images/conditional_risk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week7/images/conditional_risk.png -------------------------------------------------------------------------------- /help/images/Start_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/Start_peer_assess.png -------------------------------------------------------------------------------- /help/images/final_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/final_peer_assess.png -------------------------------------------------------------------------------- /help/images/first_peer_assess_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/first_peer_assess_q.png -------------------------------------------------------------------------------- /help/images/submit_assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/submit_assignment.png -------------------------------------------------------------------------------- /Week1/notebooks/images/docker-ls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week1/notebooks/images/docker-ls.png -------------------------------------------------------------------------------- /Week1/notebooks/images/docker-rm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week1/notebooks/images/docker-rm.png -------------------------------------------------------------------------------- /Week14/notebook/images/html-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/notebook/images/html-view.png -------------------------------------------------------------------------------- /Week2/notebooks/images/ipynb-unix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/notebooks/images/ipynb-unix.png -------------------------------------------------------------------------------- /Week4/notebooks/images/shell-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week4/notebooks/images/shell-view.png -------------------------------------------------------------------------------- /Week5/images/comments_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/comments_peer_assess.png -------------------------------------------------------------------------------- /Week5/images/first_peer_assess_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/first_peer_assess_q.png -------------------------------------------------------------------------------- /Week5/images/second_peer_assess_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week5/images/second_peer_assess_q.png -------------------------------------------------------------------------------- /Week6/images/regular_expressions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week6/images/regular_expressions.png -------------------------------------------------------------------------------- /help/images/comments_peer_assess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/comments_peer_assess.png -------------------------------------------------------------------------------- /help/images/second_peer_assess_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/second_peer_assess_q.png -------------------------------------------------------------------------------- /help/images/submitted_assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/submitted_assignments.png -------------------------------------------------------------------------------- /Week1/notebooks/images/docker-root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week1/notebooks/images/docker-root.png -------------------------------------------------------------------------------- /Week12/images/relational_databases.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week12/images/relational_databases.jpg -------------------------------------------------------------------------------- /Week14/notebook/images/dom-element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/notebook/images/dom-element.png -------------------------------------------------------------------------------- /Week14/notebook/images/html-element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week14/notebook/images/html-element.png -------------------------------------------------------------------------------- /Week2/notebooks/images/cell-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/notebooks/images/cell-toolbar.png -------------------------------------------------------------------------------- /Week2/notebooks/images/ipython-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/notebooks/images/ipython-help.png -------------------------------------------------------------------------------- /Week4/notebooks/images/shell-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week4/notebooks/images/shell-script.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-add.png -------------------------------------------------------------------------------- /Week2/assignments/images/control_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/control_panel.png -------------------------------------------------------------------------------- /Week2/assignments/images/new_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/new_terminal.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-clone.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-init.png -------------------------------------------------------------------------------- /orientation/notebooks/images/phdcomics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/phdcomics.gif -------------------------------------------------------------------------------- /Week2/assignments/images/assignments_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/assignments_tab.png -------------------------------------------------------------------------------- /help/images/nbgrader_extension_activate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/nbgrader_extension_activate.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-commit.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-config.png -------------------------------------------------------------------------------- /orientation/notebooks/images/git-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/git-website.png -------------------------------------------------------------------------------- /orientation/notebooks/images/github-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/github-app.png -------------------------------------------------------------------------------- /Week2/assignments/images/submit_assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/submit_assignment.png -------------------------------------------------------------------------------- /orientation/notebooks/images/github-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/github-button.png -------------------------------------------------------------------------------- /orientation/notebooks/images/github-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/github-website.png -------------------------------------------------------------------------------- /Week2/assignments/images/submitted_assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/submitted_assignments.png -------------------------------------------------------------------------------- /help/images/assignments_tab_first_assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/help/images/assignments_tab_first_assignment.png -------------------------------------------------------------------------------- /orientation/notebooks/images/github-appclient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/orientation/notebooks/images/github-appclient.png -------------------------------------------------------------------------------- /Week2/assignments/images/nbgrader_extension_activate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/nbgrader_extension_activate.png -------------------------------------------------------------------------------- /Week2/assignments/images/assignments_tab_first_assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcdm-uiuc/info490-fa16/HEAD/Week2/assignments/images/assignments_tab_first_assignment.png -------------------------------------------------------------------------------- /Week3/assignments/README.md: -------------------------------------------------------------------------------- 1 | # Week 3 Assignment 2 | 3 | The instruction on interpreting Python error messages has been moved to [here](https://github.com/UI-DataScience/info490-fa16/blob/master/help/read_error_mes.md). -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Max OSX 2 | .DS_Store 3 | 4 | # BASH 5 | .bash_history 6 | 7 | # Byte-compiled / optimized / DLL files 8 | __pycache__/ 9 | *.py[cod] 10 | 11 | # IPython 12 | .ipynb_checkpoints 13 | notebooks/.ipynb_checkpoints 14 | .ipython 15 | */notebooks/.ipynb_checkpoints 16 | */.ipynb_checkpoints 17 | 18 | Week7/notebooks/test.pdf 19 | 20 | Week8/notebooks/test.csv 21 | -------------------------------------------------------------------------------- /Week3/assignments/scripts/w3p1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # go to our sandbox directory 4 | cd ~/w3p1_testdir/subdir 5 | 6 | # get a list of all the pokemon 7 | wget https://raw.githubusercontent.com/cervoise/pentest-scripts/master/password-cracking/wordlists/pokemon-list-en.txt 8 | 9 | # remove pokemon with a space in their name 10 | sed -i '/ /d' ./pokemon-list-en.txt 11 | 12 | # make directories for each one 13 | while read p; do 14 | mkdir $p 15 | done ` arrow. That number is the line number in the cell above the message where the iPython notebook stops due to an execption. That line is where you need to fix. Note: the line number is within the cell, note the entire notebook. 12 | ![](images/error_example3.png) 13 | 14 | 3. The middle parts can be skipped for now. Basically, those lines tell you deeper why the error raises, tracing back to Python builtin modules. For this class, you do not have to read and understand those parts. You need to care about the `---->` arrow only, not `-->` arrows. But if you are interested, feel free to dig them in details. 15 | ![](images/error_example4.png) 16 | 17 | 4. If your codes have more than 1 problem, the error message only gives you the first error the notebook has encountered because it stopps immediately the error eccurs. Don't be suprised if you rerun the cell and get a different error message after you have fixed a bug in the code cell. 18 | 19 | 5. A syntax error has the highest priority since the notebook stops before it tries to run. When you encounter a syntax error, check the spelling, case, quotation marks, parentheses, etc. Below is a syntax error example. It actually contains more than 1 error. See how Python reports the exception: 20 | ![](images/error_example5.png) 21 | 22 | 6. Errors in user-defined function: If there is an error in a user-defined function, unless it is a syntax error, python will not generate an error message in the cell of the function, because the function has not yet been executed. Python prints out the error message at the cell where the errorneous funtion is executed. In the error message, we are going to see two four-slash arrows (`---->`). As is shown in the example below, the first `---->` arrow tells you the line number in the cell where you try to run a funtion that has an error, and the second `---->` arrow tells you the line number in the cell where the function is created. For our assignments, the second `---->` arrow is more important in general. 23 | ![](images/error_example6.png) 24 | 25 | 7. Tip 7 talks about the case that a function has an error but the line to execute the function does NOT has an error. If the code to call the user-defined function has an error, for example, a missing argument, then you still get one `---->` arrow instead of two. It is pretty much the same case as when you call a built-in Python function (as is discussed in tip 1-5). 26 | ![](images/error_example7.png) 27 | 28 | 8. To write a complex function, you can start by assigning values to the input arguments, and write your codes outside the function. When you are done with the testing, just copy and paste your code inside the function and add a return statement. It is useful to print out the intermediate values if you are not confident about certain steps. Once you get more familiar with writing functions, you could work directly inside your function, but still, it is useful to either print out or return the intermediate variables so that you can debug. Other useful functions for debugging in addition to `print()` include: `type()`, `len()` for string and array-like objects. 29 | ![](images/error_example8.png) 30 | 31 | 9. As you should have noticed, the correct answers to the assignments are shown in the assertion test codes. For example, in Week 4 Problem 3, we have this line of code to test the `dict_from_lists()` function: `assert_equal(dict_from_lists([1, 2], ['1', '2']), {1: '1', 2: '2'})`. `assert_equal()` operates like an equation. In this example, `dict_from_lists([1, 2], ['1', '2'])` is the code to execute the funcion, and `{1: '1', 2: '2'}` is the answer. `assert_equal()` will complain if its two arguments do not match. 32 | 33 | 10. The tips may be updated in the future once I come up with more. 34 | 35 | # How to ask good coding questions 36 | 37 | If you have found what the error message is and where in the code it refers, but do not know how to solve it, consider searching google for the exact error message. Often times, this search will give you helpful information about where in your code to look for errors. Alternately, you can search through the class forum to see if your peers have had similar issues which have been since resolved. 38 | 39 | At times, googling an error and searching through the class forums does not return helpful information or any pertinent information at all. In cases like these, it is important to know how to intelligently ask for help with your coding problems in the forums or in emails. So, when you ask for help with a coding problem, please keep in mind the following guidelines, paraphrased from "Automate the Boring Stuff with Python": 40 | 41 | """ 42 | 43 | 1. Explain what you are trying to do, not just what you did. This lets your helper know if you are on the wrong track. 44 | 45 | 2. Specify the point at which the error happens. Does it occur at the very start of the program or only after you do a certain action? 46 | Copy and paste the entire error message and your code (leave out the code if you are posting to the forums!) 47 | 48 | 3. Explain what you’ve already tried to do to solve your problem. This tells people you’ve already put in some work to figure things out on your own. 49 | 50 | 4. If the error came up after you made a change to your code, explain exactly what you changed. 51 | 52 | 5. Say whether you’re able to reproduce the error every time you run the program or whether it happens only after you perform certain actions. Explain what those actions are, if so. 53 | 54 | 6. Always follow good online etiquette as well. For example, don’t post your questions in all caps or make unreasonable demands of the people trying to help you. 55 | 56 | """ 57 | 58 | Now, obviously, in the class forums you cannot share code. Thus, please use your best judgement when getting help in the class forum, and censor your posts accordingly. 59 | 60 | With these guidelines in place, it will make it much easier for your TAs and your classmates to help you on any problems you might encounter. 61 | -------------------------------------------------------------------------------- /Week5/notebooks/unixnetwork.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "
\n", 8 | "\n", 9 | "# Unix Networking \n", 10 | "## Professor Robert J. Brunner\n", 11 | " \n", 12 | "
\n", 13 | "-----\n", 14 | "-----" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Unix Networking Overview\n", 22 | "\n", 23 | "Unix-based operating systems form the backbone of the Internet. However,\n", 24 | "Unix is often used as a command line operating system. Thus there are a\n", 25 | "number of useful commands and tools that allow you to explore the\n", 26 | "networked world, to connect to remote computers, and to move data\n", 27 | "between systems. In this lesson, we will explore:\n", 28 | "\n", 29 | "- discovering and identifying network systems\n", 30 | "- remote connections to networked systems\n", 31 | "- data transport between networked systems\n", 32 | "\n", 33 | "-----" 34 | ] 35 | }, 36 | { 37 | "cell_type": "markdown", 38 | "metadata": {}, 39 | "source": [ 40 | "## Network Discovery\n", 41 | "\n", 42 | "When using a web browser, you are likely familiar with finding resources\n", 43 | "by entering a human readable name, like google.com or illinois.edu.\n", 44 | "Computers only work with numbers, however, so in reality networks\n", 45 | "operate by associated names to numbers. The formal specification for\n", 46 | "this is currently known as [IPv6](https://en.wikipedia.org/wiki/IPv6).\n", 47 | "The former specification, [IPv4](https://en.wikipedia.org/wiki/IPv4)\n", 48 | "provided a four byte address for a computer on a network. Many of the\n", 49 | "commands we use still display the more easily understood IPV4 format.\n", 50 | "The mapping between human readable name (like google.com) and an IP\n", 51 | "address used by computers is handled by the domain name service (DNS).\n", 52 | "\n", 53 | "The following list summarizes some of the more useful Unix network\n", 54 | "commands:\n", 55 | "\n", 56 | "### `hostname`\n", 57 | "\n", 58 | "Used to find out the name and IP address of the current host system\n", 59 | "\n", 60 | " $ hostname\n", 61 | " \n", 62 | "### `ping`\n", 63 | "\n", 64 | "Used to test a connection to a remote host. Can use the regular names or\n", 65 | "ip address.\n", 66 | "\n", 67 | " $ ping google.com\n", 68 | " \n", 69 | "### `traceroute`\n", 70 | "\n", 71 | "Used to find the route and time taken by communications sent from your\n", 72 | "host to reach the target host.\n", 73 | "\n", 74 | " $ traceroute google.com\n", 75 | "\n", 76 | "### `dig`\n", 77 | "\n", 78 | "Used to find the ip address of a networked resource with a given name.\n", 79 | "\n", 80 | " $ dig google.com\n", 81 | "\n", 82 | "### `ifconfig`\n", 83 | "\n", 84 | "Used to obtain detailed networking configuration information for the\n", 85 | "current host system.\n", 86 | "\n", 87 | " $ ifconfig\n", 88 | "\n", 89 | "Note: these commands can be demonstrated by using a regular Unix shell,\n", 90 | "for example the boot2docker shell, but may not work properly in our\n", 91 | "Docker course container.\n", 92 | "\n", 93 | "-----" 94 | ] 95 | }, 96 | { 97 | "cell_type": "markdown", 98 | "metadata": {}, 99 | "source": [ 100 | "## Secure Shell\n", 101 | "\n", 102 | "With the growth of the Internet, standard mechanisms for network\n", 103 | "communication needed to be made more secure. This led to the development\n", 104 | "of the cryptographic network protocol for secure communications between\n", 105 | "two systems. Secure Shell (SSH) allows a user to securely connect to a\n", 106 | "remote system or to securely transfer files. The later functionality\n", 107 | "is generally done by using the Secure Shell cp `scp` or Secure Shell ftp\n", 108 | "`sftp` commands.\n", 109 | "\n", 110 | "SSH relies on public-private key pairs to enable robust compression.\n", 111 | "These keys are generated by the\n", 112 | "[`ssh-keygen`](https://en.wikipedia.org/wiki/Ssh-keygen) command.\n", 113 | "\n", 114 | "### Secure connection\n", 115 | "\n", 116 | "To connect to a remote computer by using SSH, we simply need to have our\n", 117 | "remote username and the remote system name:\n", 118 | "\n", 119 | " $ ssh profbrunner@data.illinois.edu\n", 120 | "\n", 121 | "As part of the connection process, you will be required to enter your\n", 122 | "password on the remote system. When you connect for the first time (or\n", 123 | "if a machine name has changed its IP address) you may be presented with\n", 124 | "a warning message requesting that you double check the machine to which\n", 125 | "you are trying to connect. One example of where this can be important is\n", 126 | "to prevent a _man-in-the-middle_ attack where a hostile entity changes\n", 127 | "the IP-name mapping so that you are directed to connect to a system\n", 128 | "different than what you expect.\n", 129 | "\n", 130 | "### Secure file transport\n", 131 | "\n", 132 | "To transport files by using scp, a similar format is used, depending on\n", 133 | "whether files are being pulled or pushed.\n", 134 | "\n", 135 | "To pull a file from a remote host and save it locally:\n", 136 | "\n", 137 | " $ scp profbrunner@data.illinois.edu:/home/profbrunner/myfile .\n", 138 | "\n", 139 | "To push a file to a remote host: \n", 140 | "\n", 141 | " $ scp myfile profbrunner@data.illinois.edu:/home/profbrunner/\n", 142 | "\n", 143 | "There is a recursive option `-r` to enable directory structures to be\n", 144 | "transported.\n", 145 | "\n", 146 | "-----" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "## Anonymous file download\n", 154 | "\n", 155 | "In many instances, we simply want to grab a file (or files) from an\n", 156 | "Internet resource, like a website. The simplest command to grab a file\n", 157 | "from a website is the `wget` command. When given a URL to the desired\n", 158 | "resource, `wget` will retrieve the file and save it locally. \n", 159 | "\n", 160 | " $ wget http://w3c.org\n", 161 | "\n", 162 | "![WGET example](images/wget.png)\n", 163 | "\n", 164 | "`wget` is a powerful program with many options. For example, `wget` can\n", 165 | "recursively download an entire directory structure (which can be\n", 166 | "dangerous as you can easily fill up your available disk space!).\n", 167 | " \n", 168 | "-----" 169 | ] 170 | }, 171 | { 172 | "cell_type": "markdown", 173 | "metadata": {}, 174 | "source": [ 175 | "### Additional References\n", 176 | "\n", 177 | "1. A tutorial for [`ssh`](http://support.suso.com/supki/SSH_Tutorial_for_Linux)\n", 178 | "2. Wikipedia page for [`wget`](https://en.wikipedia.org/wiki/Wget)\n", 179 | "-----" 180 | ] 181 | } 182 | ], 183 | "metadata": { 184 | "kernelspec": { 185 | "display_name": "Python 3", 186 | "language": "python", 187 | "name": "python3" 188 | }, 189 | "language_info": { 190 | "codemirror_mode": { 191 | "name": "ipython", 192 | "version": 3 193 | }, 194 | "file_extension": ".py", 195 | "mimetype": "text/x-python", 196 | "name": "python", 197 | "nbconvert_exporter": "python", 198 | "pygments_lexer": "ipython3", 199 | "version": "3.5.2" 200 | } 201 | }, 202 | "nbformat": 4, 203 | "nbformat_minor": 0 204 | } 205 | -------------------------------------------------------------------------------- /Week4/notebooks/pydatastructures2.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "
\n", 8 | "\n", 9 | "# Python Data Structures II\n", 10 | "## Professor Robert J. Brunner\n", 11 | " \n", 12 | "
\n", 13 | "-----\n", 14 | "-----" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Introduction\n", 22 | "\n", 23 | "Previously, we covered the basic Python concepts required to begin\n", 24 | "writing legal Python code. In this lesson, we will introduce additional\n", 25 | "fundamental concepts that form the basis of many Python programs. These\n", 26 | "concepts include the built-in Python data structures: string, tuple,\n", 27 | "list, and dictionary. In this notebook we focus on the dict and tuple.\n", 28 | "\n", 29 | "-----" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "### [Dictionary](https://docs.python.org/3/tutorial/datastructures.html#dictionaries)\n", 37 | "\n", 38 | "An unordered sequence that can hold values that are referenced by\n", 39 | "corresponding keys. These key, value pairs are separated by commas,\n", 40 | "while the value is separated from its key by a colon ':' character. A\n", 41 | "dictionary can be created in several different ways:\n", 42 | "\n", 43 | "1. `{}`: An empty dictionary\n", 44 | "2. `{'1': 1}`: A single key-value dictionary\n", 45 | "3. `{'1': 1, '2': \"two\", '3': (1, 2, 3)}`: Comma-separated key-value pairs\n", 46 | "4. `dict()`: using the dict class constructor\n", 47 | "\n", 48 | "Since a `dictionary` is mutable, a dictionary can be changed by adding\n", 49 | "key-value pairs, by removing key-value pairs, or simply changing\n", 50 | "existing values in place. Dictionaries can be very useful data\n", 51 | "structures, and Python provides a number of useful functions to work\n", 52 | "with dictionaries as listed in the following table:\n", 53 | "\n", 54 | "| Operation | Description |\n", 55 | "| ----- | ----- |\n", 56 | "| `v in d`| `True` if `v` is in the dictionary `d`, otherwise `False`|\n", 57 | "| `v not in d`| `False` if `v` is in the sequence `d`, otherwise `True`|\n", 58 | "| `del d[k]` | Deletes the key value pair identified by the key `k` |\n", 59 | "| `d.keys()` | Returns the keys from the dictionary `d` |\n", 60 | "| `d.values()` | Returns the values from the dictionary `d` |\n", 61 | "| `d.items()` | Returns the key-value pairs from the dictionary `d` |\n", 62 | "| `d.clear()` | Removes all entries from the dictionary `d` |\n", 63 | "| `d.copy()` | Returns a shallow copy of the dictionary `d` |\n", 64 | "| `len(d)` | Returns the number of entries in the dictionary `d`|\n", 65 | "\n", 66 | "The following code block presents a simple dictionary, along with\n", 67 | "several operations that demonstrate these functions.\n", 68 | "\n", 69 | "\n", 70 | "-----" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 12, 76 | "metadata": { 77 | "collapsed": false 78 | }, 79 | "outputs": [ 80 | { 81 | "name": "stdout", 82 | "output_type": "stream", 83 | "text": [ 84 | "{'2': 'two', '1': 1, '3': (1, 2, 3)}\n", 85 | "3\n", 86 | "True\n", 87 | "True\n", 88 | "{'2': 'two', '1': 1, '3': (1, 2, 3)}\n" 89 | ] 90 | } 91 | ], 92 | "source": [ 93 | "d = {'1': 1, '2': \"two\", '3': (1, 2, 3)}\n", 94 | "\n", 95 | "print(d)\n", 96 | "print(len(d))\n", 97 | "\n", 98 | "print('1' in d)\n", 99 | "print('4' not in d)\n", 100 | "\n", 101 | "a = d.copy()\n", 102 | "\n", 103 | "del a['1']\n", 104 | "\n", 105 | "print(d)" 106 | ] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "metadata": {}, 111 | "source": [ 112 | "-----\n", 113 | "\n", 114 | "### [Tuple](https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences)\n", 115 | "\n", 116 | "An immutable sequence that can hold homogeneous data, `(1, 2, 3, 4, 5)`\n", 117 | "or heterogeneous data, `(1, '2', 'Three', (4, 5))`. A tuple can be created\n", 118 | "in several different ways:\n", 119 | "\n", 120 | "1. `()`: An empty tuple\n", 121 | "2. `1,` or `(1, )`: A single valued tuple\n", 122 | "3. `1, 2, 3` or `(1, 2, 3)`: Comma-separated items\n", 123 | "4. `tuple()`: using the tuple class constructor\n", 124 | "\n", 125 | "Note the requirement for the trailing comma to create a singel-valued\n", 126 | "tuple; otherwise the Python interpreter interprets the expression as an\n", 127 | "value enclosed in parentheses, for example `(1)` is an integer. Any\n", 128 | "change to a `tuple` requires the creation of a new `tuple`.\n", 129 | "\n", 130 | "Tuples are commonly used to pass information to and from functions, and\n", 131 | "allow for the assignment of multiple data values simultaneously via\n", 132 | "_unpacking_:\n", 133 | "\n", 134 | "-----" 135 | ] 136 | }, 137 | { 138 | "cell_type": "code", 139 | "execution_count": 9, 140 | "metadata": { 141 | "collapsed": false 142 | }, 143 | "outputs": [ 144 | { 145 | "name": "stdout", 146 | "output_type": "stream", 147 | "text": [ 148 | "12\n" 149 | ] 150 | } 151 | ], 152 | "source": [ 153 | "point = (12, 32, 9)\n", 154 | "\n", 155 | "x, y, z = point\n", 156 | "\n", 157 | "print(x)" 158 | ] 159 | }, 160 | { 161 | "cell_type": "markdown", 162 | "metadata": {}, 163 | "source": [ 164 | "-----\n", 165 | "\n", 166 | "### Other Data Structures\n", 167 | "\n", 168 | "Python now supports a number of other data structures, including the\n", 169 | "[`range`](https://docs.python.org/3/library/stdtypes.html#range),\n", 170 | "[`set`](https://docs.python.org/3/library/stdtypes.html#set),\n", 171 | "[`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset), and the\n", 172 | "[`collections`](https://docs.python.org/3/library/collections.html#)\n", 173 | "module container data types. Of these, the `range` type is frequently\n", 174 | "used in `for` loops, described later, to simplify iteration through a\n", 175 | "sequence data structure. The other data structures are beyond\n", 176 | "the scope of this lesson.\n", 177 | "\n", 178 | "-----" 179 | ] 180 | }, 181 | { 182 | "cell_type": "markdown", 183 | "metadata": {}, 184 | "source": [ 185 | "## Additional References\n", 186 | "\n", 187 | "1. [Think Python](http://faculty.stedwards.edu/mikek/python/thinkpython.pdf) for Python3.\n", 188 | "2. [Python3 Tutorial](https://docs.python.org/3.4/tutorial/index.html)\n", 189 | "3. [Dive into Python3](http://www.diveintopython3.net/index.html)\n", 190 | "\n", 191 | "For information on writing Python programs at the command line, Google for Education has developed [Pyhon Setup directions](https://developers.google.com/edu/python/set-up).\n", 192 | "\n", 193 | "Python 2 versus Python 3:\n", 194 | "1. A [discussion of the differences between Python 2 and Python 3](http://python3porting.com/intro.html).\n", 195 | "2. A [shorter List of Changes from Python 2 to Python 3](http://inventwithpython.com/appendixa.html).\n", 196 | "\n", 197 | "Several free books, mostly written for Python 2:\n", 198 | "1. [Open Tech School's Introduction to Programming with Python](http://opentechschool.github.io/python-beginners/en/index.html)\n", 199 | "2. [Invent with Python](http://inventwithpython.com)\n", 200 | "3. [Building Skills in Programming](http://www.itmaybeahack.com/homepage/books/)\n", 201 | "4. [Learn Python The Hard Way, 3rd Edition](http://learnpythonthehardway.org/book/)\n", 202 | "5. [A Byte of Python](http://www.ibiblio.org/g2swap/byteofpython/read/)\n", 203 | " \n", 204 | " \n", 205 | "-----" 206 | ] 207 | } 208 | ], 209 | "metadata": { 210 | "kernelspec": { 211 | "display_name": "Python 3", 212 | "language": "python", 213 | "name": "python3" 214 | }, 215 | "language_info": { 216 | "codemirror_mode": { 217 | "name": "ipython", 218 | "version": 3 219 | }, 220 | "file_extension": ".py", 221 | "mimetype": "text/x-python", 222 | "name": "python", 223 | "nbconvert_exporter": "python", 224 | "pygments_lexer": "ipython3", 225 | "version": "3.5.2" 226 | } 227 | }, 228 | "nbformat": 4, 229 | "nbformat_minor": 0 230 | } 231 | -------------------------------------------------------------------------------- /Week2/assignments/Problem_2.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "deletable": false, 7 | "nbgrader": { 8 | "checksum": "25c5975fa27254458512dcda72a4ac09", 9 | "grade": false, 10 | "grade_id": "intro", 11 | "locked": true, 12 | "solution": false 13 | } 14 | }, 15 | "source": [ 16 | "# Week 2 Problem 2\n", 17 | "\n", 18 | "If you are not using the `Assignments` tab on the course JupyterHub server to read this notebook, read [Activating the assignments tab](https://github.com/UI-DataScience/info490-fa16/blob/master/Week2/assignments/README.md).\n", 19 | "\n", 20 | "A few things you should keep in mind when working on assignments:\n", 21 | "\n", 22 | "1. Make sure you fill in any place that says `YOUR CODE HERE`. Do **not** write your answer in anywhere else other than where it says `YOUR CODE HERE`. Anything you write anywhere else will be removed or overwritten by the autograder.\n", 23 | "\n", 24 | "2. Before you submit your assignment, make sure everything runs as expected. Go to menubar, select _Kernel_, and restart the kernel and run all cells (_Restart & Run all_).\n", 25 | "\n", 26 | "3. Do not change the title (i.e. file name) of this notebook.\n", 27 | "\n", 28 | "4. Make sure that you save your work (in the menubar, select _File_ → _Save and CheckPoint_)\n", 29 | "\n", 30 | "5. You are allowed to submit an assignment multiple times, but only the most recent submission will be graded.\n", 31 | "\n" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": null, 37 | "metadata": { 38 | "collapsed": true, 39 | "deletable": false, 40 | "nbgrader": { 41 | "checksum": "563c9c8ad631f1445d60546ba6539df6", 42 | "grade": false, 43 | "grade_id": "import_nose", 44 | "locked": true, 45 | "solution": false 46 | } 47 | }, 48 | "outputs": [], 49 | "source": [ 50 | "from nose.tools import assert_equal\n", 51 | "from nose.tools import assert_almost_equal" 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": { 57 | "deletable": false, 58 | "nbgrader": { 59 | "checksum": "b350074bc76e37f809a7f0ca08f2b57a", 60 | "grade": false, 61 | "grade_id": "info1", 62 | "locked": true, 63 | "solution": false 64 | } 65 | }, 66 | "source": [ 67 | "## Problem 1\n", 68 | "\n", 69 | "The main purpose of this problem is to learn how to assign values to a variable.\n", 70 | "\n", 71 | "In the following code cell, assign a value of 365 to an integer variable named `the_integer`." 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": null, 77 | "metadata": { 78 | "collapsed": true, 79 | "deletable": false, 80 | "nbgrader": { 81 | "checksum": "05fcfe4e1b9e496a2211fcbbe19bf741", 82 | "grade": false, 83 | "grade_id": "int", 84 | "locked": false, 85 | "solution": true 86 | } 87 | }, 88 | "outputs": [], 89 | "source": [ 90 | "# YOUR CODE HERE" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": { 96 | "deletable": false, 97 | "nbgrader": { 98 | "checksum": "dcf97d76947718c06d14596ba2620449", 99 | "grade": false, 100 | "grade_id": "info2", 101 | "locked": true, 102 | "solution": false 103 | } 104 | }, 105 | "source": [ 106 | "In the following code cell, you will see two assert statements, and almost\n", 107 | "every assignment will have such tests. These are what are called unit tests.\n", 108 | "When you submit completed assignments, instructors will determine your assignment grades by using automated grading tools to perform unit testing on your code, so if you pass all the tests without an error, you get a perfect score.\n", 109 | "\n", 110 | "It should be obvious to you that these tests are valuable hints! Study them. Write each piece of code so that it doesn't produce any errors. Writing the tests first, and then writing the actual code is actually a perfectly valid approach (preferred by many) to programming. It's called test-driven development.\n", 111 | "\n", 112 | "So, remember to learn what assert means, and study nose if you want to get a good grade." 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "execution_count": null, 118 | "metadata": { 119 | "collapsed": false, 120 | "deletable": false, 121 | "nbgrader": { 122 | "checksum": "5ae466bc4c9cf5581989cefaeb5602f0", 123 | "grade": true, 124 | "grade_id": "int-test", 125 | "locked": true, 126 | "points": 5, 127 | "solution": false 128 | } 129 | }, 130 | "outputs": [], 131 | "source": [ 132 | "assert_equal(the_integer,365)\n", 133 | "assert_equal(type(the_integer), int)" 134 | ] 135 | }, 136 | { 137 | "cell_type": "markdown", 138 | "metadata": { 139 | "deletable": false, 140 | "nbgrader": { 141 | "checksum": "892cc0835ef77346ac8dab28f73db6aa", 142 | "grade": false, 143 | "grade_id": "info3", 144 | "locked": true, 145 | "solution": false 146 | } 147 | }, 148 | "source": [ 149 | "In the following code cell, assign the value 1.6180339 to a floating point variable named `floating_bubbles`." 150 | ] 151 | }, 152 | { 153 | "cell_type": "code", 154 | "execution_count": null, 155 | "metadata": { 156 | "collapsed": true, 157 | "deletable": false, 158 | "nbgrader": { 159 | "checksum": "46111bb983269f419190cc3b4056c7ad", 160 | "grade": false, 161 | "grade_id": "float", 162 | "locked": false, 163 | "solution": true 164 | } 165 | }, 166 | "outputs": [], 167 | "source": [ 168 | "# YOUR CODE HERE" 169 | ] 170 | }, 171 | { 172 | "cell_type": "code", 173 | "execution_count": null, 174 | "metadata": { 175 | "collapsed": false, 176 | "deletable": false, 177 | "nbgrader": { 178 | "checksum": "d2103804416bb7fd3d7c0077dbc62c70", 179 | "grade": true, 180 | "grade_id": "float-test", 181 | "locked": true, 182 | "points": 5, 183 | "solution": false 184 | } 185 | }, 186 | "outputs": [], 187 | "source": [ 188 | "assert_almost_equal(floating_bubbles, 1.6180339)\n", 189 | "assert_equal(type(floating_bubbles), float)" 190 | ] 191 | }, 192 | { 193 | "cell_type": "markdown", 194 | "metadata": { 195 | "deletable": false, 196 | "nbgrader": { 197 | "checksum": "1719b8b305e718072a26478418c8e378", 198 | "grade": false, 199 | "grade_id": "info4", 200 | "locked": true, 201 | "solution": false 202 | } 203 | }, 204 | "source": [ 205 | "Finally, you will need to assign the string 'Spamelot' to a string variable named `the_string`." 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": null, 211 | "metadata": { 212 | "collapsed": true, 213 | "deletable": false, 214 | "nbgrader": { 215 | "checksum": "8cf5a6ef976216e789f8e3d010875ae5", 216 | "grade": false, 217 | "grade_id": "string", 218 | "locked": false, 219 | "solution": true 220 | } 221 | }, 222 | "outputs": [], 223 | "source": [ 224 | "# YOUR CODE HERE" 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "execution_count": null, 230 | "metadata": { 231 | "collapsed": false, 232 | "deletable": false, 233 | "nbgrader": { 234 | "checksum": "0b6ecd1bba737bdd655ac5c997b45dcc", 235 | "grade": true, 236 | "grade_id": "string-test", 237 | "locked": true, 238 | "points": 10, 239 | "solution": false 240 | } 241 | }, 242 | "outputs": [], 243 | "source": [ 244 | "assert_equal(the_string, 'Spamelot')\n", 245 | "assert_equal(type(the_string), str)" 246 | ] 247 | }, 248 | { 249 | "cell_type": "markdown", 250 | "metadata": {}, 251 | "source": [ 252 | "Before you turn this in, please make sure that there are no error messages, otherwise you might lose some points on this assignment. Good luck!" 253 | ] 254 | } 255 | ], 256 | "metadata": { 257 | "kernelspec": { 258 | "display_name": "Python 3", 259 | "language": "python", 260 | "name": "python3" 261 | }, 262 | "language_info": { 263 | "codemirror_mode": { 264 | "name": "ipython", 265 | "version": 3 266 | }, 267 | "file_extension": ".py", 268 | "mimetype": "text/x-python", 269 | "name": "python", 270 | "nbconvert_exporter": "python", 271 | "pygments_lexer": "ipython3", 272 | "version": "3.5.2" 273 | } 274 | }, 275 | "nbformat": 4, 276 | "nbformat_minor": 1 277 | } 278 | -------------------------------------------------------------------------------- /Week3/assignments/Problem_2.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "deletable": false, 7 | "nbgrader": { 8 | "checksum": "b4745fb909f318ef26abb24f6a15cb6d", 9 | "grade": false, 10 | "grade_id": "header", 11 | "locked": true, 12 | "solution": false 13 | } 14 | }, 15 | "source": [ 16 | "# Week 3 Problem 2\n", 17 | "\n", 18 | "If you are not using the `Assignments` tab on the course JupyterHub server to read this notebook, read [Activating the assignments tab](https://github.com/UI-DataScience/accy570-fa16/blob/master/Week1/assignments/README.md).\n", 19 | "\n", 20 | "A few things you should keep in mind when working on assignments:\n", 21 | "\n", 22 | "1. Make sure you fill in any place that says `YOUR CODE HERE`. Do **not** write your answer in anywhere else other than where it says `YOUR CODE HERE`. Anything you write anywhere else will be removed or overwritten by the autograder.\n", 23 | "\n", 24 | "2. Before you submit your assignment, make sure everything runs as expected. Go to menubar, select _Kernel_, and restart the kernel and run all cells (_Restart & Run all_).\n", 25 | "\n", 26 | "3. Do not change the title (i.e. file name) of this notebook.\n", 27 | "\n", 28 | "4. Make sure that you save your work (in the menubar, select _File_ → _Save and CheckPoint_)\n", 29 | "\n", 30 | "5. You are allowed to submit an assignment multiple times, but only the most recent submission will be graded." 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "metadata": { 37 | "collapsed": true, 38 | "deletable": false, 39 | "nbgrader": { 40 | "checksum": "96bbfda75d81e392c896a15e22ad95f7", 41 | "grade": false, 42 | "grade_id": "import_nose", 43 | "locked": true, 44 | "solution": false 45 | } 46 | }, 47 | "outputs": [], 48 | "source": [ 49 | "from nose.tools import assert_equal\n", 50 | "from nose.tools import assert_almost_equal\n", 51 | "import math" 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": { 57 | "deletable": false, 58 | "nbgrader": { 59 | "checksum": "ab700b412c0bf81ae8a6e6aeb50d79e2", 60 | "grade": false, 61 | "grade_id": "p1_title", 62 | "locked": true, 63 | "solution": false 64 | } 65 | }, 66 | "source": [ 67 | "# Problem 1.\n", 68 | "\n", 69 | "The main purpose of this problem is to familiarize yourself with creating function definitions. For this first problem, I want you to create a function called `in_radians` that takes the argument `degrees`, which will be an angle expressed in degrees. In this function, you will need to convert the input `degrees` into radians. Once this conversion is done, you will need to return the angle in radians that you calculated.\n", 70 | "\n", 71 | "You should notice that the math module is already imported, so you should consider using that in your definition below." 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": null, 77 | "metadata": { 78 | "collapsed": false, 79 | "deletable": false, 80 | "nbgrader": { 81 | "checksum": "8e86d1aaeaa6171e0f22ea8142d8478f", 82 | "grade": false, 83 | "grade_id": "p1_answer", 84 | "locked": false, 85 | "solution": true 86 | } 87 | }, 88 | "outputs": [], 89 | "source": [ 90 | "def in_radians(degrees):\n", 91 | " # YOUR CODE HERE" 92 | ] 93 | }, 94 | { 95 | "cell_type": "code", 96 | "execution_count": null, 97 | "metadata": { 98 | "collapsed": false, 99 | "deletable": false, 100 | "nbgrader": { 101 | "checksum": "08345d381a71ad9e9788bbf94294a9cc", 102 | "grade": true, 103 | "grade_id": "degree_test", 104 | "locked": true, 105 | "points": 5, 106 | "solution": false 107 | } 108 | }, 109 | "outputs": [], 110 | "source": [ 111 | "assert_almost_equal(in_radians(180), 3.14159265358)\n", 112 | "assert_almost_equal(in_radians(36), 0.6283185307)\n", 113 | "assert_almost_equal(in_radians(215), 3.75245789178)\n", 114 | "assert_almost_equal(in_radians(0), 0.0)" 115 | ] 116 | }, 117 | { 118 | "cell_type": "markdown", 119 | "metadata": { 120 | "deletable": false, 121 | "nbgrader": { 122 | "checksum": "b7ac49158bb18e564e9902fcbc1933b1", 123 | "grade": false, 124 | "grade_id": "p2_title", 125 | "locked": true, 126 | "solution": false 127 | } 128 | }, 129 | "source": [ 130 | "# Problem 2.\n", 131 | "\n", 132 | "Now that we have created a function that converts an angle in units of degrees into an angle in units of radians, we will now put it to good use. In the following function definition, you will create a function called `sine_of` that takes the argument `degrees`. Inside of this argument you should call the function `in_radians`, and your function should return the sine of the angle.\n", 133 | "\n", 134 | "Once again, notice that the math module is imported; a function inside this module might prove very helpful in this problem!" 135 | ] 136 | }, 137 | { 138 | "cell_type": "code", 139 | "execution_count": null, 140 | "metadata": { 141 | "collapsed": true, 142 | "deletable": false, 143 | "nbgrader": { 144 | "checksum": "3397814338055895308dedde50562759", 145 | "grade": false, 146 | "grade_id": "p2_answer", 147 | "locked": false, 148 | "solution": true 149 | } 150 | }, 151 | "outputs": [], 152 | "source": [ 153 | "def sine_of(degrees):\n", 154 | " # YOUR CODE HERE" 155 | ] 156 | }, 157 | { 158 | "cell_type": "code", 159 | "execution_count": null, 160 | "metadata": { 161 | "collapsed": true, 162 | "deletable": false, 163 | "nbgrader": { 164 | "checksum": "47e216e5cedb1e0628f7bef4b081ab75", 165 | "grade": true, 166 | "grade_id": "sine_test", 167 | "locked": true, 168 | "points": 5, 169 | "solution": false 170 | } 171 | }, 172 | "outputs": [], 173 | "source": [ 174 | "assert_almost_equal(sine_of(45),0.7071067811865475)\n", 175 | "assert_almost_equal(sine_of(180),0.0)\n", 176 | "assert_almost_equal(sine_of(60),0.8660254037844386)" 177 | ] 178 | }, 179 | { 180 | "cell_type": "markdown", 181 | "metadata": { 182 | "deletable": false, 183 | "nbgrader": { 184 | "checksum": "1dacb6b37a0211b7ef01642af4463ef6", 185 | "grade": false, 186 | "grade_id": "p3_title", 187 | "locked": true, 188 | "solution": false 189 | } 190 | }, 191 | "source": [ 192 | "# Problem 3.\n", 193 | "\n", 194 | "Finally, imagine that you have a right triangle. You know the length of the hypotenuse as well as one angle (in degrees), but you want to know the length of the side opposite the angle that you know. In order to find this length of the opposite triangle leg, you must find the sine of the angle you know and then multiply it by the hypotenuse (as you should know from trigonometry). \n", 195 | "\n", 196 | "In the following function called `find_opp`, it will take the arguments `degrees` and `hypo` (short for hypotenuse length). Inside of the function, it will multiply the sine of the angle `degrees` by the hypotenuse and then return the resulting number.\n", 197 | "\n", 198 | "Note: this will be a very short and simple function definition if you call the definitions you made above!" 199 | ] 200 | }, 201 | { 202 | "cell_type": "code", 203 | "execution_count": null, 204 | "metadata": { 205 | "collapsed": true, 206 | "deletable": false, 207 | "nbgrader": { 208 | "checksum": "10521a0f6579496ed5ea33ffa7e6f4c8", 209 | "grade": false, 210 | "grade_id": "p3_answer", 211 | "locked": false, 212 | "solution": true 213 | } 214 | }, 215 | "outputs": [], 216 | "source": [ 217 | "def find_opp(degrees, hypo):\n", 218 | " # YOUR CODE HERE" 219 | ] 220 | }, 221 | { 222 | "cell_type": "code", 223 | "execution_count": null, 224 | "metadata": { 225 | "collapsed": true, 226 | "deletable": false, 227 | "nbgrader": { 228 | "checksum": "1d26d03127900d3710e521352240e2e2", 229 | "grade": true, 230 | "grade_id": "SOH_test", 231 | "locked": true, 232 | "points": 10, 233 | "solution": false 234 | } 235 | }, 236 | "outputs": [], 237 | "source": [ 238 | "assert_almost_equal(find_opp(45,2),1.414213562373095)\n", 239 | "assert_almost_equal(find_opp(30,4),1.9999999999999998)\n", 240 | "assert_almost_equal(find_opp(60,1),0.8660254037844386)" 241 | ] 242 | } 243 | ], 244 | "metadata": { 245 | "kernelspec": { 246 | "display_name": "Python 3", 247 | "language": "python", 248 | "name": "python3" 249 | }, 250 | "language_info": { 251 | "codemirror_mode": { 252 | "name": "ipython", 253 | "version": 3 254 | }, 255 | "file_extension": ".py", 256 | "mimetype": "text/x-python", 257 | "name": "python", 258 | "nbconvert_exporter": "python", 259 | "pygments_lexer": "ipython3", 260 | "version": "3.5.2" 261 | } 262 | }, 263 | "nbformat": 4, 264 | "nbformat_minor": 0 265 | } 266 | -------------------------------------------------------------------------------- /Week2/assignments/Problem_3.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "deletable": false, 7 | "nbgrader": { 8 | "checksum": "596e192488d25307a92844f9434cd6b4", 9 | "grade": false, 10 | "grade_id": "w2p3", 11 | "locked": true, 12 | "solution": false 13 | } 14 | }, 15 | "source": [ 16 | "# Week 2 Problem 3\n", 17 | "\n", 18 | "If you are not using the `Assignments` tab on the course JupyterHub server to read this notebook, read [Activating the assignments tab](https://github.com/UI-DataScience/info490-fa16/blob/master/Week2/assignments/README.md).\n", 19 | "\n", 20 | "A few things you should keep in mind when working on assignments:\n", 21 | "\n", 22 | "1. Make sure you fill in any place that says `YOUR CODE HERE`. Do **not** write your answer in anywhere else other than where it says `YOUR CODE HERE`. Anything you write anywhere else will be removed or overwritten by the autograder.\n", 23 | "\n", 24 | "2. Before you submit your assignment, make sure everything runs as expected. Go to menubar, select _Kernel_, and restart the kernel and run all cells (_Restart & Run all_).\n", 25 | "\n", 26 | "3. Do not change the title (i.e. file name) of this notebook.\n", 27 | "\n", 28 | "4. Make sure that you save your work (in the menubar, select _File_ → _Save and CheckPoint_)\n", 29 | "\n", 30 | "5. You are allowed to submit an assignment multiple times, but only the most recent submission will be graded.\n", 31 | "\n", 32 | "***\n", 33 | "\n", 34 | "The purpose of this problem is the following:\n", 35 | "- Do basic math operations in Python\n", 36 | "- Practice Python built-in functions\n", 37 | "- Continue to practice assigning values to variables\n", 38 | "- Learn to use the math library" 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": null, 44 | "metadata": { 45 | "collapsed": true, 46 | "deletable": false, 47 | "nbgrader": { 48 | "checksum": "2f03b64cf5664cfbe1d7afba661bad3e", 49 | "grade": false, 50 | "grade_id": "2", 51 | "locked": true, 52 | "solution": false 53 | } 54 | }, 55 | "outputs": [], 56 | "source": [ 57 | "import math\n", 58 | "from nose.tools import assert_equal\n", 59 | "from nose.tools import assert_almost_equal" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "metadata": { 65 | "deletable": false, 66 | "nbgrader": { 67 | "checksum": "2bb149e6858cbe42e704eadb068789d7", 68 | "grade": false, 69 | "grade_id": "3", 70 | "locked": true, 71 | "solution": false 72 | } 73 | }, 74 | "source": [ 75 | "In the following code cell, calculate the square root of the integer 490490. Assign your result to a floating point variable named `square_root`." 76 | ] 77 | }, 78 | { 79 | "cell_type": "code", 80 | "execution_count": null, 81 | "metadata": { 82 | "collapsed": true, 83 | "deletable": false, 84 | "nbgrader": { 85 | "checksum": "8ac0c923068ed46a6058a4e948601e83", 86 | "grade": false, 87 | "grade_id": "w2p3_1", 88 | "locked": false, 89 | "points": 5, 90 | "solution": true 91 | } 92 | }, 93 | "outputs": [], 94 | "source": [ 95 | "# YOUR CODE HERE" 96 | ] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "execution_count": null, 101 | "metadata": { 102 | "collapsed": true, 103 | "deletable": false, 104 | "nbgrader": { 105 | "checksum": "e1fe76e845fb8ca59b8858685467e92c", 106 | "grade": true, 107 | "grade_id": "w2p3_1_test", 108 | "locked": true, 109 | "points": 5, 110 | "solution": false 111 | } 112 | }, 113 | "outputs": [], 114 | "source": [ 115 | "assert_equal(type(square_root), float)\n", 116 | "assert_almost_equal(square_root, 700.3499125437227)" 117 | ] 118 | }, 119 | { 120 | "cell_type": "markdown", 121 | "metadata": { 122 | "deletable": false, 123 | "nbgrader": { 124 | "checksum": "dd5409a8e1f464cb6769cf1f33562984", 125 | "grade": false, 126 | "grade_id": "4", 127 | "locked": true, 128 | "solution": false 129 | } 130 | }, 131 | "source": [ 132 | "In the following code cell, assign the value 4.9 to a floating point variable named `sphere_radius`." 133 | ] 134 | }, 135 | { 136 | "cell_type": "code", 137 | "execution_count": null, 138 | "metadata": { 139 | "collapsed": true, 140 | "deletable": false, 141 | "nbgrader": { 142 | "checksum": "9e75d9fe9e382f3238ef6779e1fca5ec", 143 | "grade": false, 144 | "grade_id": "w2p3_2", 145 | "locked": false, 146 | "points": 5, 147 | "solution": true 148 | } 149 | }, 150 | "outputs": [], 151 | "source": [ 152 | "# YOUR CODE HERE" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": null, 158 | "metadata": { 159 | "collapsed": true, 160 | "deletable": false, 161 | "nbgrader": { 162 | "checksum": "5a3adb5e65fe7c0a1f431ee089b2e771", 163 | "grade": true, 164 | "grade_id": "w2p3_2_test", 165 | "locked": true, 166 | "points": 5, 167 | "solution": false 168 | } 169 | }, 170 | "outputs": [], 171 | "source": [ 172 | "assert_equal(type(sphere_radius), float)\n", 173 | "assert_almost_equal(sphere_radius, 4.9)" 174 | ] 175 | }, 176 | { 177 | "cell_type": "markdown", 178 | "metadata": { 179 | "deletable": false, 180 | "nbgrader": { 181 | "checksum": "120a0ebb7084f6205a311487a78d5166", 182 | "grade": false, 183 | "grade_id": "5", 184 | "locked": true, 185 | "solution": false 186 | } 187 | }, 188 | "source": [ 189 | "The sphere volume is given by the formula: V = $\\frac{4}{3}$ $\\pi$ $r^{3}$. In the following cell, calculate the volume of a sphere with a radius equal to `sphere_radius`. Assign your result to a floating point variable named `sphere_volume`." 190 | ] 191 | }, 192 | { 193 | "cell_type": "code", 194 | "execution_count": null, 195 | "metadata": { 196 | "collapsed": true, 197 | "deletable": false, 198 | "nbgrader": { 199 | "checksum": "93b4f5ec9b759e1eec9dcfe57d5da870", 200 | "grade": false, 201 | "grade_id": "w2p3_3", 202 | "locked": false, 203 | "points": 5, 204 | "solution": true 205 | } 206 | }, 207 | "outputs": [], 208 | "source": [ 209 | "# YOUR CODE HERE" 210 | ] 211 | }, 212 | { 213 | "cell_type": "code", 214 | "execution_count": null, 215 | "metadata": { 216 | "collapsed": true, 217 | "deletable": false, 218 | "nbgrader": { 219 | "checksum": "b32a9cd50e7b2af50bb82629639a3bf8", 220 | "grade": true, 221 | "grade_id": "w2p3_3_test", 222 | "locked": true, 223 | "points": 5, 224 | "solution": false 225 | } 226 | }, 227 | "outputs": [], 228 | "source": [ 229 | "assert_equal(type(sphere_volume), float)\n", 230 | "assert_almost_equal(sphere_volume, 492.80697880291416)" 231 | ] 232 | }, 233 | { 234 | "cell_type": "markdown", 235 | "metadata": { 236 | "deletable": false, 237 | "nbgrader": { 238 | "checksum": "4598e1eda6b11174be1eb19f763807ae", 239 | "grade": false, 240 | "grade_id": "6", 241 | "locked": true, 242 | "solution": false 243 | } 244 | }, 245 | "source": [ 246 | "Finally, in the following cell, change the float variable `sphere_volume` to an integer first, and then change that integer to a string. Assign the resulting string to a string variable named `the_volume_string`." 247 | ] 248 | }, 249 | { 250 | "cell_type": "code", 251 | "execution_count": null, 252 | "metadata": { 253 | "collapsed": true, 254 | "deletable": false, 255 | "nbgrader": { 256 | "checksum": "9abfce420ba2f7a9a08a53de347ffd01", 257 | "grade": false, 258 | "grade_id": "w2p3_4", 259 | "locked": false, 260 | "points": 5, 261 | "solution": true 262 | } 263 | }, 264 | "outputs": [], 265 | "source": [ 266 | "# YOUR CODE HERE" 267 | ] 268 | }, 269 | { 270 | "cell_type": "code", 271 | "execution_count": null, 272 | "metadata": { 273 | "collapsed": true, 274 | "deletable": false, 275 | "nbgrader": { 276 | "checksum": "bca18b67990d77bf8a2c043c18d9c2bf", 277 | "grade": true, 278 | "grade_id": "w2p3_4_test", 279 | "locked": true, 280 | "points": 5, 281 | "solution": false 282 | } 283 | }, 284 | "outputs": [], 285 | "source": [ 286 | "assert_equal(type(the_volume_string), str)\n", 287 | "assert_equal(the_volume_string, '492')" 288 | ] 289 | } 290 | ], 291 | "metadata": { 292 | "kernelspec": { 293 | "display_name": "Python 3", 294 | "language": "python", 295 | "name": "python3" 296 | }, 297 | "language_info": { 298 | "codemirror_mode": { 299 | "name": "ipython", 300 | "version": 3 301 | }, 302 | "file_extension": ".py", 303 | "mimetype": "text/x-python", 304 | "name": "python", 305 | "nbconvert_exporter": "python", 306 | "pygments_lexer": "ipython3", 307 | "version": "3.5.2" 308 | } 309 | }, 310 | "nbformat": 4, 311 | "nbformat_minor": 1 312 | } 313 | -------------------------------------------------------------------------------- /Week7/assignments/Problem_1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "deletable": false, 7 | "nbgrader": { 8 | "checksum": "a3c0934f4debadbd458ea9e805bb4a7c", 9 | "grade": false, 10 | "grade_id": "header", 11 | "locked": true, 12 | "solution": false 13 | } 14 | }, 15 | "source": [ 16 | "# Week 7 Problem 1\n", 17 | "\n", 18 | "If you are not using the `Assignments` tab on the course JupyterHub server to read this notebook, read [Activating the assignments tab](https://github.com/UI-DataScience/info490-fa16/blob/master/Week2/assignments/README.md).\n", 19 | "\n", 20 | "A few things you should keep in mind when working on assignments:\n", 21 | "\n", 22 | "1. Make sure you fill in any place that says `YOUR CODE HERE`. Do **not** write your answer in anywhere else other than where it says `YOUR CODE HERE`. Anything you write anywhere else will be removed or overwritten by the autograder.\n", 23 | "\n", 24 | "2. Before you submit your assignment, make sure everything runs as expected. Go to menubar, select _Kernel_, and restart the kernel and run all cells (_Restart & Run all_).\n", 25 | "\n", 26 | "3. Do not change the title (i.e. file name) of this notebook.\n", 27 | "\n", 28 | "4. Make sure that you save your work (in the menubar, select _File_ → _Save and CheckPoint_)\n", 29 | "\n", 30 | "5. You are allowed to submit an assignment multiple times, but only the most recent submission will be graded." 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "metadata": { 37 | "collapsed": true, 38 | "deletable": false, 39 | "nbgrader": { 40 | "checksum": "a7d2b6a8b9d6490cc61e7d33cc5bf786", 41 | "grade": false, 42 | "grade_id": "import_nose", 43 | "locked": true, 44 | "solution": false 45 | } 46 | }, 47 | "outputs": [], 48 | "source": [ 49 | "%matplotlib inline\n", 50 | "\n", 51 | "# plotting tools\n", 52 | "import matplotlib as mpl\n", 53 | "import matplotlib.pyplot as plt\n", 54 | "import numpy as np\n", 55 | "import seaborn as sns\n", 56 | "\n", 57 | "# testing tools\n", 58 | "from nose.tools import (\n", 59 | " assert_equal, assert_is_instance, assert_is_not,\n", 60 | " assert_greater_equal, assert_less_equal\n", 61 | ")\n", 62 | "from numpy.testing import assert_array_almost_equal" 63 | ] 64 | }, 65 | { 66 | "cell_type": "markdown", 67 | "metadata": { 68 | "deletable": false, 69 | "nbgrader": { 70 | "checksum": "7d9d1bb60c699542a445309d55f7b93e", 71 | "grade": false, 72 | "grade_id": "p1_title", 73 | "locked": true, 74 | "solution": false 75 | } 76 | }, 77 | "source": [ 78 | "# Problem 1.\n", 79 | "\n", 80 | "In this problem, you will be creating a function that plots the sine and cosine functions (sin(x) and cos(x)) on the same plot. Here is a sample plot:\n", 81 | "![sine cosine function plot](sine_cos.png \"Sine and Cosine Plot\")" 82 | ] 83 | }, 84 | { 85 | "cell_type": "markdown", 86 | "metadata": { 87 | "deletable": false, 88 | "nbgrader": { 89 | "checksum": "34fd78b32d4cd407749fbb065dcacab1", 90 | "grade": false, 91 | "grade_id": "markdown_5", 92 | "locked": true, 93 | "solution": false 94 | } 95 | }, 96 | "source": [ 97 | "The main purpose of this problem is for you to become familiarized with \n", 98 | "making simple plots in matplotlib. Before you start, you should take note \n", 99 | "of a few important things:" 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "metadata": { 105 | "collapsed": true, 106 | "deletable": false, 107 | "nbgrader": { 108 | "checksum": "ac888d92d80b118f4ac3b29a24422601", 109 | "grade": false, 110 | "grade_id": "markdown_2", 111 | "locked": true, 112 | "points": 10, 113 | "solution": false 114 | } 115 | }, 116 | "source": [ 117 | "- You don't have to make your plot look exactly like this example. If your plot looks visually OK, and if the test code cell doesn't produce any errors, your solution is correct.\n", 118 | "- Note that code for creating a Figure object and an Axes object is already provided: `fig, ax = plt.subplots()`\n", 119 | "- Also note that the plot_sin_cos function returns an instance (named ax) of the Axes object. You should use ax to create your plot (check out the lesson notebook for lesson 2 for examples on how to do this). The reason we write our function this way to return an Axes instance is because it can be used to extract data values for testing.\n", 120 | "- Your plot should have a title and axis lables.\n", 121 | "- In order for your function to be graded correctly, you need to first plot the sine function, and then the cosine function. If you do not do this, you will not pass the last few assertion tests.\n", 122 | "- The $x$-axis should be in radians (not degrees) and should go from $-\\pi$ to $+\\pi$.\n", 123 | "- Since seaborn has been imported, you are allowed to use it in this problem.\n" 124 | ] 125 | }, 126 | { 127 | "cell_type": "code", 128 | "execution_count": null, 129 | "metadata": { 130 | "collapsed": false, 131 | "deletable": false, 132 | "nbgrader": { 133 | "checksum": "c5d91d2e870c3ac1487f4b553197316c", 134 | "grade": false, 135 | "grade_id": "p1_answer", 136 | "locked": false, 137 | "solution": true 138 | } 139 | }, 140 | "outputs": [], 141 | "source": [ 142 | "def plot_sin_cos():\n", 143 | " \"\"\"\n", 144 | " Plots the sine and cosine functions on the same plot, using pyplot functions.\n", 145 | " \n", 146 | " Parameters\n", 147 | " ----------\n", 148 | " None\n", 149 | " \n", 150 | " Returns\n", 151 | " -------\n", 152 | " A matplotlib.Axes instance.\n", 153 | " \"\"\"\n", 154 | " \n", 155 | " fig, ax = plt.subplots()\n", 156 | "\n", 157 | " # YOUR CODE HERE\n", 158 | " \n", 159 | " return ax" 160 | ] 161 | }, 162 | { 163 | "cell_type": "code", 164 | "execution_count": null, 165 | "metadata": { 166 | "collapsed": false, 167 | "deletable": false, 168 | "nbgrader": { 169 | "checksum": "88f7069b984d10e40451fab0aeb79272", 170 | "grade": false, 171 | "grade_id": "markdown_3", 172 | "locked": true, 173 | "points": 10, 174 | "solution": false 175 | } 176 | }, 177 | "outputs": [], 178 | "source": [ 179 | "ax = plot_sin_cos()" 180 | ] 181 | }, 182 | { 183 | "cell_type": "code", 184 | "execution_count": null, 185 | "metadata": { 186 | "collapsed": false, 187 | "deletable": false, 188 | "nbgrader": { 189 | "checksum": "bbecd9313ae4e533d75c8078ffd73723", 190 | "grade": true, 191 | "grade_id": "cube_test", 192 | "locked": true, 193 | "points": 30, 194 | "solution": false 195 | } 196 | }, 197 | "outputs": [], 198 | "source": [ 199 | "assert_is_instance(\n", 200 | " ax, mpl.axes.Axes,\n", 201 | " msg=\"Your function should return a matplotlib.axes.Axes object.\"\n", 202 | ")\n", 203 | "\n", 204 | "assert_equal(len(ax.lines), 2)\n", 205 | "\n", 206 | "assert_is_not(\n", 207 | " len(ax.title.get_text()), 0,\n", 208 | " msg=\"Your plot doesn't have a title.\"\n", 209 | ")\n", 210 | "assert_is_not(\n", 211 | " ax.xaxis.get_label_text(), '',\n", 212 | " msg=\"Change the x-axis label to something more descriptive.\"\n", 213 | ")\n", 214 | "assert_is_not(\n", 215 | " ax.yaxis.get_label_text(), '',\n", 216 | " msg=\"Change the y-axis label to something more descriptive.\"\n", 217 | ")\n", 218 | " \n", 219 | "x, y1 = ax.lines[0].get_xydata().T\n", 220 | "assert_less_equal(x.min(), -3.14)\n", 221 | "assert_greater_equal(x.max(), 3.14)\n", 222 | "assert_array_almost_equal(y1, np.sin(x))\n", 223 | "\n", 224 | "x, y2 = ax.lines[1].get_xydata().T\n", 225 | "assert_less_equal(x.min(), -3.14)\n", 226 | "assert_greater_equal(x.max(), 3.14)\n", 227 | "assert_array_almost_equal(y2, np.cos(x))" 228 | ] 229 | }, 230 | { 231 | "cell_type": "markdown", 232 | "metadata": { 233 | "collapsed": true, 234 | "deletable": false, 235 | "nbgrader": { 236 | "checksum": "d3070313cc6fcb7098fe9e90f2ef0e44", 237 | "grade": false, 238 | "grade_id": "markdown_6", 239 | "locked": true, 240 | "solution": false 241 | } 242 | }, 243 | "source": [ 244 | "If you are not passing the last two sets of assertion tests, did you make sure that you are plotting the sine function first and then the cosine function? Also, did you make sure that your x values include both $-\\pi$ and $\\pi$? " 245 | ] 246 | } 247 | ], 248 | "metadata": { 249 | "kernelspec": { 250 | "display_name": "Python 3", 251 | "language": "python", 252 | "name": "python3" 253 | }, 254 | "language_info": { 255 | "codemirror_mode": { 256 | "name": "ipython", 257 | "version": 3 258 | }, 259 | "file_extension": ".py", 260 | "mimetype": "text/x-python", 261 | "name": "python", 262 | "nbconvert_exporter": "python", 263 | "pygments_lexer": "ipython3", 264 | "version": "3.5.2" 265 | } 266 | }, 267 | "nbformat": 4, 268 | "nbformat_minor": 0 269 | } 270 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Do a GitHub Pull Request 2 | 3 | If you would like to request or suggest a change in the course material on our GitHub repository, use [pull requests](https://help.github.com/articles/using-pull-requests/) (PRs). 4 | 5 | You are reading one of the lessons and assignments on our course GitHub repository, and you find a typo. Or, one of the code cells in a notebook does not work, and you know how to fix it. You could email one of the instructional staff or ask in the Q&A forum, but the recommended way is to use a more sophisticated approach and submit a pull request (PR). In the following, I will walk you through the steps for creating the PR that added [How to Do a GItHub Pull Request](CONTRIBUTING.md) to our course repository. 6 | 7 | The basic steps are: (some are optional, but I recommend that you do all the steps.) 8 | 9 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) the course repository. 10 | 2. [Clone](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository) your forked repository. 11 | 3. [Add](https://help.github.com/articles/configuring-a-remote-for-a-fork/) upstream. 12 | 4. Create a [branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging). 13 | 5. Make changes. 14 | 6. [Stage and commit](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) the changes. 15 | 7. [Push](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) the changes to your fork. 16 | 8. Submit a pull request. 17 | 18 | ## Detailed Example 19 | 20 | I will do this in the command line, but once you understand the flow, you can also use the [GitHub Desktop](https://desktop.github.com/). Note also that more detailed guide can be found elsewhere (e.g. on [GitHub](https://help.github.com/)). The following example uses our course repository. 21 | 22 | ### 1. Fork the course repoistory. 23 | 24 | First, you go to our [course repository](https://github.com/UI-DataScience/info490-fa15), and fork the course repository by clicking `Fork` in the upper right corner. 25 | 26 | ![](images/pull_request_0.png) 27 | 28 | Now, notice that your copy of the repository has your username, and it says `forked from UI-DataScience/info490-fa15`. 29 | 30 | ![](images/pull_request_1.png) 31 | 32 | ### 2. Clone the forked repository. 33 | 34 | At the Unix shell, use `git clone` to clone the **forked** repository (the one with your username in it; you should obviously change `EdwardJKim` to your username). Change into the new directory. 35 | 36 | ```shell 37 | $ git clone https://github.com/EdwardJKim/info490-fa15 38 | $ cd info490-fa15 39 | ``` 40 | 41 | The `git status` command shows any changes you make in this directory. Since we have not made any changes or commits in this directory, it says your working directory is clean. 42 | 43 | ```shell 44 | $ git status 45 | On branch master 46 | Your branch is up-to-date with 'origin/master'. 47 | 48 | nothing to commit, working directory clean 49 | ``` 50 | 51 | ### 3. Add upstream. 52 | 53 | This is perhaps optional, but imagine that while you are making your own changes, someone else makes a change in the original course repository. You would want to [sync your fork](https://help.github.com/articles/syncing-a-fork/) to keep your copy updated. So we will add the upstream to keep track of the changes in the original repository. You can use `git remote` to see which GitHub repositories are tracked in your local Git repository. 54 | 55 | ```shell 56 | $ git remote -v 57 | origin https://github.com/EdwardJKim/info490-fa15 (fetch) 58 | origin https://github.com/EdwardJKim/info490-fa15 (push) 59 | ``` 60 | 61 | It seems that only the fork is tracked here. Let's use `git remote` to also track the original UI-DataScience repository. 62 | 63 | ```shell 64 | $ git remote add upstream https://github.com/UI-DataScience/info490-fa15 65 | $ git remote -v 66 | origin https://github.com/EdwardJKim/info490-fa15 (fetch) 67 | origin https://github.com/EdwardJKim/info490-fa15 (push) 68 | upstream https://github.com/UI-DataScience/info490-fa15 (fetch) 69 | upstream https://github.com/UI-DataScience/info490-fa15 (push) 70 | ``` 71 | 72 | After adding the original repository, you can either choose between the original repository and the forked repository. To pull (or fetch and merge) the `master` branch of the original repository (`upstream`), run 73 | 74 | ```shell 75 | $ git pull upstream master 76 | ``` 77 | 78 | To pull the forked repository (`origin`), run 79 | 80 | ```shell 81 | $ git pull origin master 82 | ``` 83 | 84 | ### 4. Create a branch. 85 | 86 | This is also optional because you can always work on your `master` and send a PR to UI-DataScience's `master`, but I think it's good practice to create a seprate branch for each distinct feature change. Let's first create a branch named `pull_request_guide`. 87 | 88 | ```shell 89 | $ git branch pull_request_guide 90 | ``` 91 | 92 | Now we want to move into this branch with `git checkout` before making changes. 93 | 94 | ```shell 95 | $ git checkout pull_request_guide 96 | Switched to branch 'pull_request_guide' 97 | ``` 98 | 99 | Note that these two commands can be combined in one line. The `-b` option in `git checkout` creates a new branch if it doesn't exist before checking it out. 100 | 101 | ```shell 102 | $ git checkout -b pull_request_guide 103 | Switched to a new branch 'pull_request_guide' 104 | ``` 105 | 106 | If you check again with `git status`, you will notice that it says you are now on branch `pull_request_guide`. (In step 2, `git status` said you are in the `master` branch.) 107 | 108 | ``` 109 | $ git status 110 | On branch pull_request_guide 111 | nothing to commit, working directory clean 112 | ``` 113 | 114 | ### 5. Make changes. 115 | 116 | In this example, I created a new file named `CONTRIBUTING.md`. For IPython/Jupyter notebooks, you will probably have to make changes elsewhere (i.e. on your web browser using Jupyter server) and copy the modified file to this Git directory. 117 | 118 | Git tracks all changes I have made since the last commit. You can check what the changes are using `git status`. 119 | 120 | ```shell 121 | $ git status 122 | On branch pull_request_guide 123 | Untracked files: 124 | (use "git add ..." to include in what will be committed) 125 | 126 | CONTRIBUTING.md 127 | 128 | nothing added to commit but untracked files present (use "git add" to track) 129 | ``` 130 | 131 | ### 6. Stage and commit the changes. 132 | 133 | Stage the changed file with `git add`. 134 | 135 | ```shell 136 | $ git add CONTRIBUTING.md 137 | ``` 138 | 139 | I also need some images, so I created 4 images, and now `git status` shows: 140 | 141 | ```shell 142 | $ git status 143 | On branch pull_request_guide 144 | Changes to be committed: 145 | (use "git reset HEAD ..." to unstage) 146 | 147 | new file: CONTRIBUTING.md 148 | 149 | Untracked files: 150 | (use "git add ..." to include in what will be committed) 151 | 152 | images/pull_request_0.png 153 | images/pull_request_1.png 154 | images/pull_request_2.png 155 | images/pull_request_3.png 156 | ``` 157 | 158 | You can stage multiple files before you make a commit. Let's stage the 4 images as well 159 | 160 | ```shell 161 | $ git add images/pull_request_0.png 162 | $ git add images/pull_request_1.png 163 | $ git add images/pull_request_2.png 164 | $ git add images/pull_request_3.png 165 | ``` 166 | 167 | The `git status` now shows that 5 files have been staged: 168 | 169 | ```shell 170 | $ git status 171 | On branch pull_request_guide 172 | Changes to be committed: 173 | (use "git reset HEAD ..." to unstage) 174 | 175 | new file: CONTRIBUTING.md 176 | new file: images/pull_request_0.png 177 | new file: images/pull_request_1.png 178 | new file: images/pull_request_2.png 179 | new file: images/pull_request_3.png 180 | ``` 181 | 182 | After you have staged all the files you would like to be in a commit, use `git commit` to commit the changes. 183 | 184 | ```shell 185 | $ git commit -m "Add instructions on how to submit a pull request" 186 | [pull_request_guide cce961b] Add instructions on how to submit a pull request 187 | 5 files changed, 198 insertions(+) 188 | create mode 100644 CONTRIBUTING.md 189 | create mode 100644 images/pull_request_0.png 190 | create mode 100644 images/pull_request_1.png 191 | create mode 100644 images/pull_request_2.png 192 | create mode 100644 images/pull_request_3.png 193 | ``` 194 | 195 | ### 7. Push the changes to your fork. 196 | 197 | Use `git push` to upload the changes made in the local repository to your GitHub repository. 198 | 199 | ```shell 200 | $ git push origin pull_request_guide 201 | ``` 202 | 203 | ### 8. Submit a pull request. 204 | 205 | Now the final step: actually submitting a pull request. Open your web browser, and go back to your fork. I pushed the `pull_request_guide` in step 7, so GitHub repository now shows an option to **Compare & pull request**. Click it. 206 | 207 | ![](images/pull_request_2.png) 208 | 209 | Before you submit, you can review the changes and comment on the PR. If it is a simple PR like a typo fix, it will probably be accepted quickly after it is reviewed by the instuctional staff. If it is code change, the PR will likely start a discussion before it is finally accepted, so please try to describe clearly what the PR is about in the comments. 210 | 211 | ![](images/pull_request_3.png) 212 | 213 | ### 9. Delete the branch. 214 | 215 | This is optional, but after your PR is merged or closed, you can delete the branch. See [Deleting unused branches](https://help.github.com/articles/deleting-unused-branches/). 216 | 217 | ![](images/pull_request_4.png) 218 | 219 | Furthermore, if your PR gets accepted, the original course repository will change as a result of your PR. You will want your local repository to reflect this change. Now, you can do 220 | 221 | ```shell 222 | git pull upstream master 223 | ``` 224 | 225 | This document was actually submitted to the course repository as a PR. See [the PR on how to submit a pull request](https://github.com/UI-DataScience/info490-fa15/pull/1) that pushed this file to the course repository. 226 | --------------------------------------------------------------------------------