Jupyter Notebook Quick Guide
Jupyter Notebook Quick Guide
Jupyter Notebook Quick Guide
2) In the terminal window that appears, type “startnode” to open a session on a back-end
compute node. If this succeeds, you will see the prompt is highlighted with a green
background. Upper/lower case matters under Linux, so always match the case shown:
3) Next, you will type “jupyter notebook” (all lower case) to start the notebook. A lot of
text will scroll by, including some serious sounding error messages that can be safely
ignored. It may look something like this:
Then a Firefox window will appear that is running the Jupyter Notebook. It will look
something like this:
All of your work with Jupyter Notebook will be done in this Firefox browser. We still
need the black Terminal window (don’t close it!) but we won’t be actively typing in it.
In the Jupyter notebook window, under the “Files” tab you’ll see a file structure. You will
navigate through this to get to the Jupyter notebooks that will guide you through your course
materials. All course materials are in the folder called “bigcare”, so you will eventually click on
this folder and various subfolders to access the coursework for this workshop.
Jupyter notebooks have the file extension “.ipynb”. Clicking on files ending with “.ipynb” opens
the notebook.
Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the
save icon and your notebook edits are saved.
It’s important to realize that you will only be saving edits you’ve made to the text sections and
to the coding windows. You will NOT be saving the results of running the code. In a section
below we’ll explain how you re-execute the code you’re run so that you can continue through
the notebook.
To restore the progress you’ve previously made by re-executing the code above it:
Step 1: Go to the coding window where you left off and click your cursor into it. You’ll see that
the section in the Table of Contents is highlighted in yellow – showing you where you are in the
full flow of the course.
Step 2: Go to the “Cell” drop-down menu and choose “Run All Above”. This will run all of the
coding blocks that preceded the coding block that you’re currently in. As those sections run, the
section title in the Table of Contents will be highlighted in red. After all of the sections have run,
only the section you started in will be highlighted in yellow.
Note: In longer notebooks it may take a while for the code to re-run when you are down
towards the bottom of the notebook.
5. Editing the Text in a Jupyter notebook
As you go through the notebooks, you can edit the text windows to add your own notes or
comments.
Double clicking any text box activates it so that you can type in the window. The editing of
these windows is done with “Markdown”. If you want special formatting, you need to refer to
the Markdown Cheatsheet (https://jupyter-
notebook.readthedocs.io/en/stable/examples/Notebook/Working%20With%20Markdown%20
Cells.html).