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.

Jupyter for teaching

Nicolas M. Thiéry

LRI/LISN: Laboratoire Interdisciplinaire des Sciences du Numériques

Université Paris-Saclay

Erlangen, March 21st of 2022

Browse live on Binder

What is Jupyter?

Jupyter notebooks

Documents mixing: Narration, Computation, Visualization, Interaction and Programming

This slideshow is actually a Jupyter notebook!

So far we did Narration: telling a story

Now, here is a little mathematical Computation:

a bit of data Visualization:

a bit of Interaction:

(taken from the bqplot documentation)

and we have seen a bit of Programming.

What’s new really?

Jupyter, beyond the notebook: https://jupyter.org

An ecosystem of «Free software, open standards, and web services for interactive computing across all programming languages»

Jupyter for teaching

A nice reference: teaching and learning with Jupyter, Barba et al.

Examples

Learn by experimenting and visualizing

Taken from a computational graph theory course:

Définition:

Soit GG un graphe.

Un algorithme:

Exploration interactive:

Learn by example

Taken from an Introduction to Data Science class

Définir une fonction en Python :

Exercice: Écrire une fonction aire_rectangle(l,h) qui renvoie l’aire d’un rectangle de longueur l et de hauteur h.

Serious games

Taken from an introductory C++/Python programming course:

Jupyter for teaching in Paris-Saclay

What it can bring

Autonomy

Thanks to the narrative structure:

Flexibility

Caveats and Tips

Go with the flow: the routine of working through notebooks

Jupyter notebooks can get messy

Jupyter notebooks are not different!

Advanced topics

How do I make interactive slides?

RISE

How do I make mini interactive applications?

Jupyter widgets

How do I publish my course?

jupyter-book: build a static web site from a collection of notebooks

How do I make it easy for my students to access Jupyter?

JupyterHub: Software to deploy online service providing Jupyter virtual environments

Example: JupyterHub@Paris-Saclay

Reproducible environments (software, data, ...)

Example: conda + pip

Reproducible teaching: How do I enforce the robustness of my assignments?

A challenge with computer assignments: the devil is in the details!

One piece of the puzzle:

Autogenerate the student version:

def max(x,y):
    # TODO: YOUR CODE HERE
	raise NotImplementedError();

from the instructor version:

def max(x,y):
    ### BEGIN SOLUTION
	if x > y:
	    return x
	else:
		return y
	### END SOLUTION

e.g. with nbgrader

Another piece: Automated testing through Continuous Integration

How do I manage assignments?

«Teaching computer science or computational courses is all about collaboration on code. It is thus unsurprising that, with a pinch of salt, forges like GitLab can provide helpful infrastructure to support and enhance that collaboration.»

Notebooks as text files (with jupytext)

How do I grade the assignments?

Automatic and computer aided grading:

How do I help student collaborate on assignments?

The Candyce project

Jupyter for high schools? really?

Building on Capytale: a jupyter deployment for high schools

150000 registered students in two years of existence

Beyond Jupyter

«Open Source Scientific Software at the fingertip of every kid, student and teacher (and researcher)»

Via on demand configurable virtual environment for (lightweight) computation

The Candyce service, in practice:

Secondary mission: the toolkit

Discussion / project topics for this week

Jupyter for teaching

Happy to discuss and help if I can!

Toward a semantic web of (Jupyter) teaching resources?

Use case 1: help teachers find resources to reuse Use case 2: help student navigate resources (adaptative learning / guided tours)

Write down an intention letter for the collaboration FAU / Candyce