- Install Python 3.6.x or above.
- Note that lower versions of Python will not be compatible to this course.
- Login to Github (create an account if you do not have one).
- Create a new repository called
qtm385
and make it PRIVATE. - From the
Settings
menu, add the TA as collaborators of this repository.- Han He:
hankcs
.
- Han He:
- Install PyCharm on your local machine.
- The following instructions assume that you have "PyCharm 2018.3.3 Professional Edition".
- You can get the professional version by applying for the academic license.
- Create a new project:
- Click
Check out from Version Control
and selectGit
. - Click
Log in to Github
and enter your Github ID and password. If you are using two-factor authentication, login with your personal access token. - Enter your repository URL (e.g.,
https://github.com/your_id/qtm385.git
) and clone it. Make sure the directory name isqtm385
.
- Click
- Setup the interpreter:
- Go to
[Preferences - Project: qtm385 - Project Interpreter]
. - Click the gear button on the righthand side and select
Add
. - In the prompted window, select
Virtualenv Environment
and choosePython 3.6.x
as the base interpreter.
- Go to
- Install a package:
- Go to
[Preferences - Project: qtm385 - Project Interpreter]
. - Click the
+
sign at the bottom. - Search and install for the
requests
package.
- Go to
- Create a new package:
- At any step, if it prompts you to add a new file/package to git, click
Add
. - Create a python package called
quiz0
. - Create a python file called
quiz0.py
under thequiz0
package and copy the content. - Run
quiz0
by clicking[Run -> Run]
. - If
quiz0.html
is created under thequiz0
package, your program runs successfully.
- At any step, if it prompts you to add a new file/package to git, click
- Install Jupyter Notebook.
- On a terminal, go to the
qtm385
directory. - Enter the following command to activate the virtualenv:
$ source venv/bin/activate
- Enter the following command to launch Jupyter Notebook:
(venv) $ jupyter notebook
- On the web-browser where it is launched, choose the
quiz0
directory. - Create a new notebook called
quiz0
and run the following code:import requests r = requests.get('http://www.cs.emory.edu/~choi') print(r)
- If you see
<Response [200]>
, your notebook runs successfully.
- From PyCharm, add the followings to git by right clicking on those files and choosing
[Git - Add]
:quiz0/quiz0.html
quiz0/quiz0.ipynb
quiz0/quiz0.py
- Once the files are added to git, they should turn into green. If not, restart PyCharm and add the files again.
- Create a file called
.gitignore
under theqtm385
directory and copy the followings:.idea/ venv/ */.ipynb_checkpoints/
- Commit and push your changes to Github:
- Right click on
qtm385
, choose[Git - Commit Directory]
, enter a message (e.g., "Submit quiz 0."), and click[Commit and Push]
. - Make sure ones in
.gitignore
are not getting pushed to Github.
- Right click on
- Check if the above files are properly pushed to Github.
- Submit the address of your
qtm385
repository (e.g., https://github.com/your_id/qtm385.git): https://canvas.emory.edu/courses/57068/assignments/201526