Skip to content

Instantly share code, notes, and snippets.

@elowy01
Last active June 23, 2020 10:19
Show Gist options
  • Save elowy01/303e6d6a4326a595e25e802f9873ee68 to your computer and use it in GitHub Desktop.
Save elowy01/303e6d6a4326a595e25e802f9873ee68 to your computer and use it in GitHub Desktop.
# One can insert images in jupyter nb in different ways:
a) Insert this in a Code type cell
%%html
<img src="img/folder_str1.png",width=100,height=100>
Where you have a folder named img at the same level of your notebook
b) Insert this in a Markdown type cell:
![alt text](img/folder_str1.png)
#
# Enabling Table of Contents (TOC) extention in jupyter:
From https://github.com/minrk/ipython_extensions
$ jupyter nbextension install --user https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js
$ curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css > $(jupyter --data-dir)/nbextensions/toc.css
$ jupyter nbextension enable toc
# to check the notebook instances that are running in your computer do:
$ jupyter notebook list
# if you want to execute a shell command within a jupyter cell you can prefix
# the cell by an exclamation mark. For example:
!apt-get install openjdk-8-jdk-headless -qq > /dev/null
# Profiling (measuring time) of a certain cell in Jupyter:
%%time
print("hello\n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment