'How to save Jupyter notebooks from GitHub

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?



Solution 1:[1]

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

Solution 2:[2]

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

Solution 3:[3]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sabito 錆兎 stands with Ukraine
Solution 2 Gal_M
Solution 3