Teaching remotely with Jupyter: tips, resources, and best-practices

Now that many of us have had to move our classes, learning groups, etc to a “remote-only” setup, many people may be wondering how can I effectively teach remotely with Jupyter?. This is a thread to share resources, guides, ideas, etc.

here’s one resource that covers teaching in general with Jupyter (not explicitly remote teaching):

and if anyone is interested in running their own lightweight JupyterHub on cloud resources, I’d recommend checking out:

However I know there are many more resources out there! Please share anything that you’ve found useful below.

8 Likes

On a related post, we kicked some of this conversation off in the geophysics community: the main topic over there is on delivery of notebooks. I will cross-post any new ideas over here!

2 Likes

Thanks Chris! A resource that includes some relevant ideas (in section 4) is this new paper by @labarba: Engineers Code: reusable open learning modules for engineering computations.

1 Like

Not necessarily Jupyter related, but a couple of resources about teaching online that I found on twitter

Blog post about teaching online at short notice: https://education.rstudio.com/blog/2020/03/teaching-online-on-short-notice/

Chapter on teaching online: http://teachtogether.tech/#s:online

1 Like

I use github to deliver assignments.
Student can clone the assignment repo to their space on their TLJH account; everyone uses Jupyterlab on the server as it has a great github extension.
Then, I make a dropbox “file request” folder with a due date/time for submission. Works great if you (as I do) have a dropbox pro account.

As of next week, I will conduct class via zoom and introduce coding ideas in real time. The challenge is that students cannot work together in teams in person and I cannot use my LA’s (learning assistants) to sit down with students.

1 Like

I am a new user to this forum (!?) and can only post 2 links. :grimacing: I’ve posted the reply I prepared (composed of multiple other replies to similar questions) here: https://gist.github.com/westurner/c721e5034aca7449208bbd7d1fb4f396

1 Like

There’s some really cool stuff here - thanks!

1 Like

I’m still doing things in a fairly old-fahsioned way with specific labs. During the labs students can query me using Piazza, which is a forum-based service designed for Higher Ed. requirements. I haven’t tried it yet but there is also a polling feature in it.

CoCalc has chat w/ @ mentions, LaTeX, edit history, emoji, etc built-in: https://doc.cocalc.com/chat.html

AFAIK, it doesn’t have polls. I’ll ask @wstein389 @Ha_Sch about polls.
They just posted a comparison table comparing CoCalc with other Jupyter implementations: https://cocalc.com/doc/compare.html

1 Like

Aha! I leveled up! Here’s those resources in full:

From “Options for giving math talks and lectures online”
Options for giving math talks and lectures online | Hacker News :

One option: screencast development of a Jupyter notebook.

Jupyter Notebook supports LaTeX (MathTeX) and inline charts. You can create graded notebooks with nbgrader and/or with CoCalc (which records all (optionally multi-user) input such that you can replay it with a time slider).

Jupyter notebooks can be saved to HTML slides with reveal.js, but if you want to execute code cells within a slide, you’ll need to install RISE: https://rise.readthedocs.io/en/stable/

Here are the docs for CoCalc Course Management; Handouts, Assignments, nbgrader: Course Management — CoCalc Manual documentation

Here are the docs for nbgrader: nbgrader — nbgrader 0.9.1 documentation

You can also grade Jupyter notebooks in Open edX:

Auto-grade a student assignment created as a Jupyter notebook, using the nbgrader Jupyter extension, and write the score in the Open edX gradebook

GitHub - ibleducation/jupyter-edx-grader-xblock: Grade Jupyter Notebooks in Open edX

Or just show the Jupyter notebook within an edX course: GitHub - ibleducation/jupyter-edx-viewer-xblock: View Jupyter Notebooks in Open edX

There are also ways to integrate Jupyter notebooks with various LMS / LRS systems (like Canvas, Blackboard, etc) “nbgrader and LMS / LRS; LTI, xAPI” on the “Teaching with Jupyter Notebooks” mailing list: Redirecting to Google Groups

“Teaching and Learning with Jupyter” (“An open book about Jupyter and its use in teaching and learning.”) Teaching and Learning with Jupyter

TLJH: “The Littlest JupyterHub” describes how to setup multi-user JupyterHub with e.g. Docker spawners that isolate workloads running with shared resources like GPUs and TPUs: The Littlest JupyterHub — The Littlest JupyterHub documentation

“Zero to BinderHub” describes how to setup BinderHub on a k8s cluster: Zero to BinderHub — BinderHub documentation

If you create a git repository with REES-compatible dependency specification file(s), students can generate a container with all of the same software at home with repo2docker or with BinderHub.

REES is one solution to reproducibility of the computational environment.

BinderHub ( https://mybinder.org/ ) creates docker containers from {git repos, Zenodo, FigShare,} and launches them in free cloud instances also running JupyterLab by building containers with repo2docker (with REES (Reproducible Execution Environment Specification)). This means that all I have to do is add an environment.yml to my git repo in order to get Binder support so that people can just click on the badge in the README to launch JupyterLab with all of the dependencies installed.

REES supports a number of dependency specifications: requirements.txt, Pipfile.lock, environment.yml, aptSources, postBuild. With an environment.yml, I can install the necessary CPython/PyPy version and everything else.

REES: The Reproducible Execution Environment Specification — repo2docker 2023.06.0+43.gc6f97e5 documentation

REES configuration files: Configuration Files — repo2docker 2023.06.0+43.gc6f97e5 documentation

Storing a container built with repo2docker in a container registry is one way to increase the likelihood that it’ll be possible to run the same analysis pipeline with the same data and get the same results years later.

… from Mailman 3 [Edu-sig] Re: Learning Code IRC for kids? - Edu-sig - python.org :

Pull Request reviews support line-by-line commenting and optional revision right granting:
Requesting a pull request review - GitHub Docs
Merge requests | GitLab

GitHub Classroom runs CI tests for student assignments:
https://classroom.github.com/

For learning git branching (for pull requests), https://learngitbranching.js.org/ is excellent and interactive

Notebooks on Colab can be shared as editable and support comments
https://colab.research.google.com/

Notebooks on CoCalc have a (collaborative) time slider replay, chat, course assignments, nbgrader, …
https://cocalc.com/doc/

[…]

Reddit - Dive into anything has moderators

Phrasing the question for search is maybe the most useful skill for learning and professionally doing programming:

  • find the docs and bookmark them
  • find the source and bookmark it
  • list every possible word for the thing you’re describing
  • try adding “double quotes” around certain terms and error messages
  • exclude with minus: -“this or that”

[…]

Asynchronous and logged scales.

Reddit - Dive into anything

Well-designed tutorials don’t require much searching for answers from people on the interwebs.

GitHub - quobit/awesome-python-in-education: A curated list about Python in Education 🎓

Has anyone tried integrating nbgrader with GitLab Classroom yet?

Pull Requests should work well with jupytext configured to auto-write the .py when the .ipynb is saved:
https://jupytext.readthedocs.io/en/latest/examples.html#collaborating-on-jupyter-notebooks

CoCalc may be the most complete solution for courses with lectures and assignments as notebooks:
https://doc.cocalc.com/teaching-course-management.html

1 Like

Hi everyone, this setup consists of JupyterHub + nbgrader + docker-compose with the shared grader account setup. More details are available in the readme. We plan on pushing more updates soon to support dynamic course configuration setups, etc. We hope everyone and their families are staying safe!

2 Likes

Thank you for this helpful post. I found it useful as a very good example of well prepared interactive notebooks

1 Like

I worked with Jupyter in education and wrote down the experience at https://insights.tuhh.de/de/?p=19331&preview=false in German - sorry for that but I hope in case you are interested you can find a translator such as deepl. In the article there is also a link to the university GitLab instance which has a simple docker setup for exams.

For exercises, our distribution and collection goes through a standard Learning Management System, so nothing fancy there. Unit Tests such as in nbgrader are reasonable if there is a simple right and wrong but less suitable if you want students to interpret results and explain underlying principles (both exams and exercises). Pen & paper have the great advantage that the students can visualize whatever is on their mind without focussing on some drawing software.

1 Like

I wonder if that “local garage” post is spam. Feels like it copied @1kastner’s reply and replaced some words with “synonyms”. It even has the slightly weird sentence construction “whatever is in their mind”. I reckon a native speaker would have changed it to “on their mind”. I’ve reported it as spam.

I think you’re right - it feels SEO spam to me, thanks for noticing that, it was quite difficult to spot!

Thanks for pointing that out, I have not seen such kind of spam before.

I’ve not seen this before either. A new level of sophistication! Seems like a smart idea to be honest. Though the bots don’t seem to know that links in this forum use nofollow so it isn’t all that useful for SEO.

It just struck me how similar the post was to one “I had read earlier, I am sure, somewhere”. Took me a moment to realise it was your post a few pixels above :slight_smile:

1 Like

Yeah, teaching remotely with Jupyter is good. Additionally, one can also conduct online classes and teach remotely using tools like Webex, R-HUB HD video conferencing servers, Gotomeeting etc. They work well.

1 Like

I quit using Jupyter since we start remote teaching, but that bothers me a lot. I came back to find solutions to the problems I’m facing.

First, I mainly teach electrical courses, not computational. I mainly use markdown, some basic maths and plots. Creating images are more important than codes.

  • The first problem was the slide show. I believe that classes must be interactive. Scrolling a notebook make students confuse (most of them at least). Recently, I found RISE and Reveal.js. I will probably give it a try. However, I’m not sure how to perform a good looking slideshow. Any tip are really welcome.
  • The second problem is class annotations. We normally say something, and we wanna write it down. To call their attentions we write on blackboard. Highlight something on presentation, draw some arrows, or even some new information to exemplify. Nowadays, I use gromit (not perfect, but for Linux, I’m not aware of a better solution…), and an iPad with Notability. The workflow is: I convert everything to pdf, present iPad screen, and do annotations during class presentation. Using iPad and Notability is a good approach since the annotations stick with each page, or each slide. However, I don’t have the ability to edit the presentation (change some info the re-plot something for instance).

My feeling is that I’m always loosing something. Using Jupyter, I can’t do hand writing, annotations, or even draw over images. Using a post-processing pdf, I can’t use markdown and jupyter advantages.

I’m starting a new course of electric propulsion, and I don’t have much time to waste creating LibreOffice presentations. I just wanna create a handbook using md, convert to presentation, and be able to annotate things during presentation.

This is what I’m doing now:

Just need tools to speed up things. Complete hand writing is extremely slow.
I really appreciate any suggestion.

1 Like

Jupyter is great, but JupyterLite is greater.

JupyterLite can make the margin operation cost nearly zero. Why don’t we use it in education?

I hope we can continue our discussion based on the newer technology.