Before you start the assignment you should set up your Python env. and get comfortable with using Jupyter notebooks. Though there are a lot of ways to do this, we reccommend you to do it using the Anaconda distribution.
- If you have followed the emails we sent previously, you should have an environment called workshop setup and ready. Type the command conda activate workshop in your terminal. Now navigate to the folder where you downloaded this github repository and follow the steps below.
-
To run the notebook, run the following command -
jupyter notebookat the Terminal(Mac/Linux). For Windows type the same command in the Anaconda Prompt( Anaconda command prompt is just like command prompt,but it makes sure that you are able to use anaconda and conda commands from the prompt, without having to change directories or your path). Type Anaconda Prompt in the search bar or just directly search for Jupyter Notebooks on your system.
-
You should see the notebook open in your browser. Creating a new Jupyter Notebook is easy, just use the "New" dropdown menu and click on "Python 3". Try to experiment and play around with things by yourselves.
-
Something key to be aware of: Jupyter Notebooks have two different keyboard input modes:
- Command mode - binds the keyboard to notebook level actions. Indicated by a grey cell border with a blue left margin.
- Edit mode - when you’re typing in a cell. Indicated by a green cell border.
shift+enterrun cell, select belowctrl+enterrun celloption+enterrun cell, insert belowAinsert cell aboveBinsert cell belowCcopy cellVpaste cellD+D(press the key twice) delete selected celloption+entermerge selected cells, or current cell with cell below if only one is selected.I + Iinterrupt kernelYchange cell to code modeMchange cell to markdown mode (for good documentation)
cmd+clickfor multi-curso editingtabcode completion or indentshift+tabshow documentationctrl+shift+-split cell
Press cmd + shift + P for quick access to all commands in Jupyter notebooks and press H (in command mode) to viewa all keyboard shortcuts.
- The edit mode is entered if you click into the code area of that cell. This mode is indicated by a green border on the left side of the cell.
- If you’d like to leave edit mode and return to command mode again you just need to hit
ESC. Enterwill take you from command mode back into edit mode for the given cell.
Open a blank jupyter notebook and using the workshop's notebooks as a reference, write (do not just copy and paste) and run the code in the blank. This will help you to get comfortable with all the data structures and ideas that you'll need for the assignment. Feel free to exploit the internet for your doubts.
In case you have doubts, please write an email to bitsnnfl@gmail.com!