How to save Jupyter notebooks from GitHub

Viewed 48629

When I download an ipynb file using the RAW button in GitHub it displays the text (json) in the browser.

Should I just copy this text into a file and name it xxx.ipynb? What's the best way to do it?

5 Answers

Here is the Lifesaver Extension developed by me for both

  • Chrome
  • Firefox

The project is open-sourced here.

The extension not only opens github hosted notebooks in Colab but also in nbviewer!

And you can open the github repo from Colab and nbviewer And go to nbviewer from Colab and github Works all 3 ways!!

A new feature of opening new notebooks in one-click is already developed in the master branch, just need to push it to the extension platforms :)

Firefox extension

Chrome extension

True to 2020:

  • Click Download enter image description here
  • Wait for JSON to finish loding in your browser
  • Ctrl S (save as .txt file)
  • remove .txt extension
  • Run locally

The following steps worked for me:

  1. Click on Raw in git repository.
  2. Save the file. The file was saved as *.ipynb.txt format for me.
  3. Then, in the jupyter directory tree (not in local directory), I selected, removed the .txt at the end and renamed the file as *.ipynb. enter image description here
  4. Finally I was able to run the file as jupyter notebook. enter image description here

Note that, when I tried to rename the *.txt file in local directory to *.ipynb, it did not work. This had to be renamed in directory in jupyter itself.

I saved the file following the instructions from this post. My destination however was a folder on google drive. I opened google drive on my browser and located the file. From there, I renamed the name of my file by just removing the txt extension, leaving the ipynb extension. That worked for me.

Related