Question

I maintain a Github repository with currently two ipython notebook files. My repository is here:

https://github.com/tschm/MosekRegression

When I try to open those files with the nbviewer, e.g. using

nbviewer.ipython.org

and inserting

http://nbviewer.ipython.org/urls/github.com/tschm/MosekRegression/blob/master/Data.ipynb

i get the 400 Bad Request Error. The file is good as it works when I make it available as a Gist. First research seems to indicate that this is a permission problem? I bet I do something stupid here...

Many thanks

Thomas

Was it helpful?

Solution 2

Valid link is http://nbviewer.ipython.org/urls/raw.github.com/tschm/MosekRegression/master/Minimum%20Variance.ipynb

Your link points to the github's html page with your file. You should give the raw file instead.

OTHER TIPS

Expanding on @chuwy's answer, here's a breakdown of steps. The trick is to head to your file's page on github and then click on the "Raw" button:

enter image description here

then copy the url (minus the protocol string "http://"), and prepend it with "http://nbviewer.ipython.org/urls/"

So for example, if I have my iPython notebook:

https://github.com/watsonix/prediction_for_fun_and_profit/blob/master/statsmodel_outliers.ipynb

and I want to see it in the nbviewer, I click on "Raw" to get the URL:

https://raw.githubusercontent.com/watsonix/prediction_for_fun_and_profit/master/statsmodel_outliers.ipynb

which I use to form the URL:

http://nbviewer.ipython.org/urls/raw.githubusercontent.com/watsonix/prediction_for_fun_and_profit/master/statsmodel_outliers.ipynb

voila!

It now appears that gist automatically renders iPython notebooks! I have been using nbviewer, but I just noticed that GitHub renders the ipynb file perfectly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top