How to open .ipynb pages as normal jupyter notebooks

Question:

I am learning python using a course. The course material can be found on the links like the following one:

http://faculty.washington.edu/sbrunton/me564/python/Python_Introduction.ipynb

I’d like to have the jupyter notebook when I go to the link but it shows the raw python file. How can I export the jupyter notebook from such links?
Thanks in advance for any help.

Asked By: Ali_d

||

Answers:

You can copy the raw content and paste to local new file. File extension should
be .ipynb .Then you can open in jupyter lab or notebook.

Answered By: NANDHA KUMAR

Go to nbviewer.org, paste in the URL, and press ‘Go!’. You’ll then be redirected to here which is a page that has the following URL:

https://nbviewer.org/url/faculty.washington.edu/sbrunton/me564/python/Python_Introduction.ipynb

At that URL is the notebook rendering you seek. (nbviewer will even display some ‘interactive’ items such as Plotly plots and animated matplotlib plots backed by frames, examples here and here, respectively.)

Right-clicking the download icon in the upper right side of the notebook rendering there and selecting Save link As... will allow you to save the .ipynb file to your local machine. (You can do similar from the original page link, but there you have to edit the name. No editing of the name necessary this way for your link!)

If you examine the URL generated by the form, you’ll note that there is a pattern based on what you provided. And so you could just change the original portion of the link you provided from http://... to https://nbviewer.org/url/... and go to the notebook rendering directly without the step of filling out the form.


If the page had been hosted at GitHub or another repository that MyBinder.org can use, you’d have in the upper right corner an additional icon looking like three rings on the nbviewer rendered page that could be clicked to open it as an active Jupyter notebook right in your browser without needing to login as it would be served vis MyBinder.org. The pages I link to for the Plotly plots and animation have this icon as an option.

Answered By: Wayne

You can just open an already created jupyter notebook (the file with .ipynb) in a notepad and replace its text from the text in your link.

Steps

  1. Create a totally new jupyter notebook project.
  2. Go to the file location and open it with notepad
    enter image description here
  3. Remove all the content from the notepad
  4. Replace it with the content in your link https://faculty.washington.edu/sbrunton/me564/python/Python_Introduction.ipynb
  5. Save the notepad and close it.
  6. Open the same file as a notebook using Jupyter notebook or Google Colab
Answered By: Upulie Han
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.