Install Jupyter Notebook extensions on copy hosted on cloned Github Repository? - github

I have a cloned Jupyter Notebook hosted on Github. Locally, I have installed Jupyter Notebook extensions but these are not maintained within the Github environment.
Is there a way to install the extensions on the Github server so that cells can be toggled on/off with notebook extensions? Or will I have to go with a Javascript hack as per https://gist.github.com/Zsailer/5d1f4e357c78409dd9a5a4e5c61be552?

It appears this cant' be done as per below:
When you add Jupyter Notebook or IPython Notebook files with a .ipynb extension on GitHub, they will render as static HTML files in your repository.
The interactive features of the notebook, such as custom JavaScript plots, will not work in your repository on GitHub. For an example, see Linking and Interactions.ipynb.
To view your Jupyter notebook with JavaScript content rendered or to share your notebook files with others you can use nbviewer. For an example, see Linking and Interactions.ipynb rendered on nbviewer.
from: https://help.github.com/en/articles/working-with-jupyter-notebook-files-on-github

Related

How to edit colab notebooks in GitHub directly

It used to be the case that one could easily edit colab notebooks from within GitHub, and also move them (so long as one remembered to change the path in the notebook itself).
Just now I noticed that this functionality in the GitHub browser seems to have been removed. Is this a bug? Is there workaround that does not involve the command line and git?

how to use module from github to jupyter notebook

I am a new user of python and github.
I want to use, with anaconda-jupyter on windows 10, a new repository (module) published on github ( https://github.com/jamesbowman/raytrace ).
I downloaded the zip folder and extracted it in my download folder (F:\Téléchargement\raytrace-master). , but I don’t know how to use this module with jupyter .
How can I import this module into jupyter .
I tried some method but without success
Why it is not possible to copy and paste directly a folder from my download folder (F:/téléchargement/) to a jupyter notebook folder (…/source/repos/ for example ) ?
Thanks!
Try using the http copy url from the Github site and use that with
!git clone <https://github.com...> in a jupyter notebook cell
then you can do !ls to check that the repository downloaded. The exclamation points mean that you can do command line commands from your notebook!
Alternatively, you could try unzipping and moving the repo to the same directory where you are running jupyter and search for it with an !ls

Jupyter Github Code Review

When doing a code review on jupyter notebooks in github, it shows only the html code that generates the notebook. Are there any extensions that would enable github to show the rendered jupyter notebook, along with the ability to comment on cells for code review?
Under the hood Notebook files are JSON documents. All the markdown, code, outputs are present in this JSON document. Since git diff used by GitHub is meant for text files, it's hard to read Jupyter Notebook diffs on GitHub.
I built a GitHub app ReviewNB specifically to review Jupyter Notebooks on GitHub. It integrates directly with your repositories on GitHub and provides visual diff and commenting support (see screenshot below).
There's also nbdime if you just want to access rendered diff locally.

How to get github to show my jupyter notebook images?

Github is not showing the images in my jupyter notebook.
I have tried pushing different formats such as:
![alt text](img/file.png)
and
<img src="img/file.png", width=200, height=200>
which they do work on my local jupyter notebooks in regards of showing images, but once I pushed these notebooks to Github, everything works fine in my repository, but the images won't show.
here is an example
As mentioned in my comment, when something like this happens please ensure that you are uploading the relevant files and that the path you are uploading the files to is still valid relative to the notebook.

Latex macros in Jupyter (iPython) notebook not rendered by github

I have a markdown cell in a Jupyter notebook (.ipynb) with the following content.
$\newcommand{\paren}[1]{\left(#1\right)}$
$\paren{\beta^2}$
The file is in a Github repository. The LaTex macro application is not rendered by Github.
Here is how it looks:
The markdown cell, however, is rendered properly when I open is locally as a Jupyter notebook.
Is there a way to make this work? Note that the file is in a private Github repo, so I can not use nbviewer.