Jupyter notebook as an (auto-run) interactive lesson - without visible code

I am a member of a multi-university team developing online course targeting the Control Theory domain. As the backbone of our project, we chose The Littlest Jupyterhub. We hosted it on our own server, tweaked it a little bit, with the main purpose to meet both the students’ and educators’ need in teaching/learning Control Theory. We found jupyter notebooks to be excellent way for conveying lessons, so we, as educators, are preparing widget-oriented notebooks in order to provide interactive „live examples“ to our students.

Given our specific goal (being the concept demonstration, not the coding per se), we were in the need of the following:

  • is it possible to provide user with the jupyter notebook with no visible python code, so he/she could only see markdown cells and use interactive widgets?
  • is it possible to run the notebook automatically upon loading in the browser tab?

I am completely aware that these questions raise some concerns about security and the target role of the jupyter itself. However, I’m still asking from the perspective of the somewhat ‘closed system’ - university online course allowing mentors/educators to prepare trustworthy notebooks, and students to see some interactive examples (and playing with provided interactive widgets).

We were able to involve some ‘hacks’ (javascript parts) which can hide the python cells, but only when notebook is initially run with “Run all cells” option. But that way the student still sees the lots of code upon initial loading (and that’s the source of the question regarding auto-run possibility).

Anyway, apart from the questions above - if you would be of interest to just take a quick peek into our project (just to tell us if we can do some things better or in a more clever way), do not hesitate to reply here. I can provide you an access (credentials) to our platform in no time. We do not expect anything precise, just a quick high-level overview.

Also, this is a project website:
https://icct.cafre.unipi.it/

You might look at voila

3 Likes

You can hide the code, option on the view menu, this is saved in the notebook so stays as is when opened. As suggested the next step as an alternative could be voila.