Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A simple way to view ipython notebook

I am really new to IPython/Jupyter notebook. I just created one notebook (.ipynb) and I want to share it on my webpage. Specifically, I want to add a link, and when people click it, it will open a new "webpage" where they can "view" my code and results.

Note: I cannot use github, it is a huge pain for me.

I tried nbviewer (http://nbviewer.jupyter.org/). It has several options but only one of them (url) is not related to github/gist. So, in order to have an URL for my file, I uploaded it to google drive, and got a public link for the file. On the other hand, when I put that link to nbviewer (as url to my file), it says "there is no file in this url". On the other hand, I know the link works, because when I put it on browser, it directs me to download the .ipynb file.

I appreciate your help.

Thanks, J.

like image 584
JohnPython Avatar asked Jan 27 '18 22:01

JohnPython


People also ask

How do I view ipython notebooks?

In the Notebook Dashboard navigate to find the notebook: clicking on its name will open it in a new browser tab. Click on the menu Help -> User Interface Tour for an overview of the Jupyter Notebook App user interface. You can run the notebook document step-by-step (one cell a time) by pressing shift + enter.

How do I run ipython notebook locally?

Launch a Notebook To launch a Jupyter notebook, open your terminal and navigate to the directory where you would like to save your notebook. Then type the command jupyter notebook and the program will instantiate a local server at localhost:8888 (or another specified port).


1 Answers

There appears to be limited non-GitHub options for sharing notebooks. You can still share a link directly from Google's colaboratory. This will allow you to:

  • Upload your file
  • Share the link with various permissions

Any Google user can view (and optionally edit) your notebook.


See also other options:

  • Jupyter Notebooks IPYNB Viewer: chrome extension to view/convert nbs
  • binder: sharing notebooks from a GitHub repo; (see related blog post)
  • nbviewer: for viewing hosted notebooks from GitHub or a url (as mentioned)
  • JupyterHub: hosting notebooks on a private server, e.g. local, DigitalOcean
  • Azure Notebooks: host notebooks on an Azure server (see sample notebook)
  • repo2docker: spawn docker container from a git repo of notebooks
  • commuter: read notebooks from a local directory or S3 service
  • cocalc: collaborative and share private notebooks
  • nextjournal: publish notebooks and save work as containers
  • Deepnote: real-time collaborative notebooks with simple setup
  • fastpages: convert notebooks/markdown to GitHub pages via GitHub Actions (thanks Björn)
like image 181
pylang Avatar answered Sep 22 '22 23:09

pylang