Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating gist directly from Jupyper notebook?

Is there any way to create gist directly from Jupyter notebook?

This would be really handy as it would allow load gist and load it's url directly to nbwiever without leading opening terminal or IDE.

like image 823
Kimmo Hintikka Avatar asked Mar 08 '17 18:03

Kimmo Hintikka


People also ask

How do I make a PDF from a Jupyter Notebook?

The Jupyter Notebook has an option to export the notebook to many formats. It can be accessed by clicking File -> Download as -> PDF via LaTeX (or PDF via HTML - not visible in the screenshot).

Can you run a Flask app from Jupyter Notebook?

It's a library you can pip install on your computer or wherever your Notebook is running. It works for any Python process - this happens to be a Jupyter Notebook, but it could be an ordinary Python script, a Flask app, even the Python REPL!


2 Answers

Actually, you can just drag and drop the Jupyter notebook (or Jupyterlab) file (.ipynb) into the 'code space' on the Gist site. So,

  1. Go to https://gist.github.com/YOUR-GITHUB-USERNAME/

  2. Click 'New Gist' on the upper right corner

  3. Open the folder in a Finder/Explorer window on your local computer

  4. Drag the file into the text box (the 'code space'). This should fill the space with JSON looking text for the framework of the notebook content.

  5. Copy/Paste the full file name (e.g., mynotebook.ipynb) into the filename box, and give a description above.

  6. Create the Gist!

like image 161
ltjds Avatar answered Sep 29 '22 08:09

ltjds


Check out https://github.com/mozilla/jupyter-notebook-gist which does exactly what you want. The docs are good on how to install it but aren't specific on exactly how to use it.

However, once you install it you see that it adds this menu, which you just click:

enter image description here

like image 31
rjurney Avatar answered Sep 29 '22 08:09

rjurney