Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

πŸ–₯️ Lecture slides β€” Session 02 (Fri Oct 2)

Jupyter NotebooksΒΆ

Project Jupyter is a non-profit, open-source project that supports interactive computing for data science and scientific computing. The project supports over 100 programming languages.

A Jupyter notebook combines text (written in Markdown, see below), images, HTML, LaTeX, code, and code output in a single document. Under the hood it is a JSON file. The notebook consists of cells that are either code or text.

A Jupyter kernel is the language-specific process that executes the code contained in a notebook.

The cells can be run one by one, or from the menu: Run -> Run all cells, or Kernel -> Restart Kernel and Run All Cells. Restarting the kernel and running all cells top to bottom is the honest test of a notebook: it catches cells that only worked because of hidden state from earlier experiments.

JupyterLabΒΆ

JupyterLab is an expanded browser interface that includes notebooks, a terminal, file viewers (CSV, JSON, images), and other tools.

JupyterHubΒΆ

A JupyterHub is a JupyterLab served from shared hardware. Users may see where the computer is located in the browser address, but may not know what hardware runs underneath. One exception is the selection of instance types on public clouds.

Notebooks in VS CodeΒΆ

VS Code opens, edits, and runs .ipynb files natively: it connects to the same Jupyter kernels, and adds an integrated terminal, a debugger, and Git support alongside the notebook. Much of this book was written that way. You can use JupyterLab or VS Code interchangeably in this course; VS Code is the more common home for the AI assistants described next.

Notebooks as a shared workspace with an AI assistantΒΆ

In 2026, an agentic AI assistant in your editor or terminal can read your notebook, execute cells, inspect the output, and edit code β€” the notebook becomes a workspace you share with the assistant. This is useful: the assistant can see the actual error message or the actual plot, not your paraphrase of it.

Two consequences follow. First, notebook hygiene matters more, not less: an assistant reading a notebook with cells run out of order inherits the same confusion you would. Second, you remain responsible for every output. The assistant executing a cell is not the same as you verifying the result β€” check the numbers, the axes, and the units before you build on them. The course policy on AI use is in 1.8.

MarkdownΒΆ

What is Markdown?ΒΆ

A simple language for text formatting.

Used for:

Basic Markdown commandsΒΆ

Headings

# Heading level 1
## Heading level 2
### Heading level 3

Paragraphs: Leave a blank line

This is my first paragraph.

This is my second paragraph.


Bold text

**This is my bold text**


Italic Text

*This is my italic text*


Bold and italic text

***This is my bold, italic text***


Strikethrough text

~~Strikethrough Text~~


Markdown supports HTML text. For instance, one can underline a text with:

  <u>text</u>

Line break: use <br>

This is my first line.
This is my second line.


Ordered list

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Unordered list

- First item
- Second item
- Third item
- Fourth item


Link a URL, such as the course data repository:

  [data repository](https://github.com/UW-MLGEO/MLGeo-dataset)

Insert images such as , use

  <img src="glass.png" width="200"/>

LaTeX in text cells:

  \sqrt{x}

May give us this x\sqrt{x}.