Search code examples
jupyter-notebookjuliaandroid-binderijulia-notebook

how can i share a Jupyter Notebook?


I am using Julia but didn't really like the IDE (more of a notebook guy). So I used for the first time Jupyter (lab and notebooks).

I started Jupyter from Anaconda and made my notebook. The thing is I want to share it. Like other people can access a link and get to run my code.

I don't really know how GitHub works, but I somehow managed to upload the notebook there. I saw this thing called "Binder" that could run my code on another computer. But I try to put my Github link there and just get an error.

Can someone that used Jupyter can explain it to me?

Ah, I almost forgot, when I google Jupyter Notebook and start one with Julia I can use this Binder Thing. But when I do it on my own I can't.

Here I put the screenshot I made on the Demo of Jupyter+binder so you can see it says to send a binder link

enter image description here


Solution

  • While there are many options, the best and the easiest way is through Jupyter's menu:

    File -> Download as -> HTML
    

    You end up with a HTML containing all code cells and all results (including pictures) which is perhaps the best for viewing by others. Github can be used to natively publish a *.ipynb and show it to users as a static HTML, however I find it not very stables (rendering keeps failing from time to time) and hence I opt for generating the HTML file yourself and use eg. Github pages for hosting it.

    Another interesting option is to share just the *.ipynb file and recommend people Open Source https://nteract.io/ as the viewer.

    Yet another option that is sometimes use is to host a JupyterHub on an AWS EC2 instance (a single t2.micro is free for one year within the AWS free tier) and give my collaborators logins and passwords (this though requires quite a bit of configuration work).