Ask Your Question
0

From Jupyter to one cell server

asked 2020-06-02 16:49:21 +0200

JC gravatar image

Hi there,

A long time ago I learned how to use the one-cell server. At that moment I was creating simple .html files for my students, so they could execute some code and learn a bit of Sage.

Nowadays this seems inefficient, instead of writing .html file it seems reasonable to write everything in a jupyter notebook. As I want to embed the files into a Moodle page, and want the cells to be executable therein, or by downloading an html file, without having Sage installed in the local machine, I thought I could try to turn each code cell of the jupyter notebook into a cell pointing to the one-cell server. Is it possible to do this efficiently? Can I somehow achieve my goal with Cocalc?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-06-02 20:22:21 +0200

Juanjo gravatar image

This semester I wanted my students to learn and use SageMath. Thanks to the good job of my university computing service, each student had finally access to a virtual machine running a full copy of SageMath 9.0 under the Arch Linux operating system. There are open source virtualization tools (Proxmox in my case) that perhaps could be installed and set up if you ask for it in your institution.

In addition to CoCalc, you could also think about the following options:

  • Continue with HTML pages, but, instead of calling SageMath Cell to run the code, use Thebe and Binder.
  • Write Jupyter notebooks, put them in a Github repository and run them through mybinder.org.

This last approach seems quite easy. Inspired by this repository and this other one, I have been able to make executable some of my notebooks. Look, for example, to this URL, which launches in mybinder.org a notebook hosted in this Github repository. This notebook (in Spanish) deals with quadrics. You can evaluate all the cells and see the outputs.

Of course, this last solution has inconveniences. It is slow to start a Jupyter server and there is some delay to get the output for the more intensive computations, such as some 3D graphics. However, I think that this is an option that deserves to be explored and tested.

edit flag offensive delete link more

Comments

Thanks for taking the time. I am aware of Binder and the like, but it is not what I want : the goal would be to have everything running with one click, without leaving Moodle, without having to rely on the local machine, nor an external server (we actually may have a jupyter hub server working). The question is more like : is there a way to quickly turn a code cell into a cell to be interpreted by the one-cell server? Thanks!

JC gravatar imageJC ( 2020-06-02 21:16:00 +0200 )edit

If such a way exists, I don't know it. Sorry.

Juanjo gravatar imageJuanjo ( 2020-06-03 01:27:24 +0200 )edit
0

answered 2020-06-03 20:11:44 +0200

Emmanuel Charpentier gravatar image

Alternative : have a look at PreTeXT, recently presented at the latest Sage Days. I haven't explored this, but the presentation was impressive.

One caveat : it seems that you'll have to pound your document in XML somehow...

HTH,

edit flag offensive delete link more

Comments

Thanks Emmanuel, I played around a with PreTeXT a little bit, and from what I understand, it is more complex, although in principle feasible. But then again : in principle that should not be very hard to write a script that takes as input one .html produced by jupyter and turn avery cell code into a celle that is to be interpreted by a one-cell server.

JC gravatar imageJC ( 2020-06-03 22:21:06 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-06-02 16:49:21 +0200

Seen: 339 times

Last updated: Jun 03 '20