University of Luxembourg, FSTM SECAN-Lab

Fundamentals of Network Theory

Hands-on exercise notebooks · Winter 2026/27

Exercises

Work directly in your browser, nothing to install. Use Chrome or Firefox on a laptop, in a normal window (not private or incognito).

Exercise 00 Getting Started
Exercise 01 Networks As Matrices
Exercise 02 Network Robustness
Exercise 03 Graph Laplacian
Exercise 04 Quantum Networks

Save and submit your work

  1. Press Ctrl+S (Cmd+S on Mac). Without this step the exported file is empty.
  2. Open the menu (round button with three lines, top right) → Export… → Python → Export notebook source.
  3. The downloaded file is always called notebook.py. Rename it, e.g. to exercise00_<lastname>.py.
  4. Submit only this .py file on Moodle before the deadline announced there: Add submission, upload the file, tick the submission statement and click Save changes. Check that the status reads Submitted for grading.

Reloading or closing the tab loses all your edits, even after Ctrl+S/Cmd+S. Only the downloaded file keeps your work, so export often.

Need a break? Save a link to your work

  1. Press Ctrl+S (Cmd+S on Mac).
  2. Open the menu (round button with three lines, top right) → Share → Create WebAssembly link. The link is copied.
  3. Keep the link: bookmark it or paste it into a note. It contains your code, so do not share it. Do not use Create permalink on marimo.app: permalinks are public.
  4. Later, open the link: your notebook opens on marimo.app with all your changes. Export from there as usual.
Optional: keep working in molab, the marimo cloud

Not required. molab is a free cloud service by marimo. It needs a free account (e.g. with GitHub or Google), and then saves your notebook in your own workspace, so you can continue on any device.

  1. Press Ctrl+S (Cmd+S on Mac).
  2. Open the menu (round button with three lines, top right) → Share → Create molab notebook, and sign in.
  3. To submit, export the .py file from molab and upload it on Moodle as usual.

molab notebooks can be opened by anyone who has their link, so do not share it.

Optional: work on your own laptop instead of the browser

Not required. Locally, marimo saves your work automatically. You need two steps, the same on Windows, macOS and Linux, no admin rights.

1. Install uv (once)

macOS and Linux, in the Terminal:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows, in PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then close the terminal and open a new one.

2. Open your notebook

In the terminal, go to the folder with your exported file and run:

uvx --with numpy --with scipy --with pandas --with matplotlib --with wigglystuff marimo edit exercise01_lastname.py

The first start downloads Python and marimo (1 to 2 minutes). The notebook opens in your browser. Stop it with Ctrl+C in the terminal. More details: marimo installation guide.