Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyter notebook not rendering in GitHub gist

I created and saved a notebook using Jupyter notebooks. I then proceeded to create a github gist of this notebook. However, the notebook is not being rendered in the gist. I can only see the raw code. I have included the link to my gist below:

https://gist.github.com/adikamath/26ae33d4fd613d716cdf01697130e675

I know that GitHub provides advanced support for ipnyb since some time now and I don't have to use a service like nbviewer to see it rendered. Any help is appreciated.

like image 427
slacker92 Avatar asked Dec 18 '17 12:12

slacker92


People also ask

Can GitHub render Jupyter notebook?

We are pleased to announce that, starting today, and as announced on the GitHub blog, Jupyter/IPython notebook ( . ipynb ) files will render directly on GitHub. This feature works for notebooks in any of the supported Jupyter programming languages on both public and private repos.


Video Answer


2 Answers

I was able to make it work! Instead of copying the code from the .ipnyb file into the gist window, I dragged & dropped the whole file into the gist window and the gist renders it OK!

like image 131
slacker92 Avatar answered Nov 08 '22 11:11

slacker92


The below steps worked for me:

  1. create a new gist
  2. drag and drop your .ipynb file into the window where your code should be placed.
  3. give a name to your gist ending with .ipynb
  4. create the gist
like image 30
Farhad Davaripour Avatar answered Nov 08 '22 12:11

Farhad Davaripour