To access the starter code, log on to the Swarthmore Github Enterprise site: github.swarthmore.edu, and find your Git repository for this lab, which should be called something like "CS33-F26/lab02-USERNAME", only with your own actual username in place of 'USERNAME'. Open the repo by clicking on the name, then click the green "Code" button, make sure "SSH" is selected, and copy the URL which should be "git@github.swarthmore.edu:" followed by your repo name.
Next, open a terminal, navigate to your CS33 directory, type git clone, then paste the URL for your repo and run the command. This should create a new directory with a copy of the lab files. Run ls in this new directory to make sure the files are there; in this case, make sure you have a file called python_warmup.ipynb.
$ source /usr/swat/bin/cs33env (cs33-f26) $ jupyter-labNote the (cs33-f26) in front of the prompt on the second line; this is a reminder that you're in the virtual environment. If you get a 'command not found' error when you try to run jupyter-lab, it's probably because you forgot to source the ML environment first. If you want to get out of the virtual environment, use the command deactivate.
Remember that you'll need to run these commands each time you open a new terminal you want to run Jupyter Lab from.
When you run Jupyter Lab, it should launch a web browser (or open a tab in an existing web browser); this is the main interface. If this doesn't happen automatically, open a browser and paste in the link that will show up in the terminal where you ran the jupyter-lab command.
Jupyter Lab has a built-in file browser on the lefthand side, which by default starts in the directory you were in when you ran the jupyter-lab command. If you ran the command in your home directory, you'll need to navigate to your lab 2 directory. If you ran the command when you were already in that directory, you shouldn't need to change directories.
NOTE: It is generally recommended that you run the jupyter-lab command in your cs33 directory; that way you can access all your course related files without having to close and re-open the program (e.g. if you're working on lab 3 and want to look back at your code from lab 2).
Open the python_warmup.ipynb file by clicking on it; this should cause the lab to appear in the large pane on the right. The file is an Interactive Python NoteBook file, and it's the a format we'll be using for several labs this semester. We'll talk during the lab period about some of the functions of this format and why we're using it.
When you are finished, use git to add, commit, and push your work. In this case, all your solutions should be contained within python_warmup.ipynb. Remember to also add/commit/push on a regular basis; you should get into the habit of pushing changes to Git at the end of each session working on a lab.
It's possible to run Jupyter remotely over SSH and connect to it from your local web browser, but you need to perform a few extra steps to make this work:
At this point, you should see jupyter lab and be able to interact with it as usual; all your code will be exectued on the remote CS machine, so you don't need to install or configure anything on your personal computer.