Skip to content

Instantly share code, notes, and snippets.

@alexsavio
Created September 12, 2015 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexsavio/993ccbcd912e8fa32df0 to your computer and use it in GitHub Desktop.
Save alexsavio/993ccbcd912e8fa32df0 to your computer and use it in GitHub Desktop.
IPython notebook styles
# based on http://www.damian.oquanta.info/posts/48-themes-for-your-ipython-notebook.html
# run this in a notebook
import os
import os.path as op
import subprocess
import urllib.request
theme_names = ['3024-dark',
'3024-light',
'atelierdune-dark',
'atelierdune-light',
'atelierforest-dark',
'atelierforest-light',
'atelierheath-dark',
'atelierheath-light',
'atelierlakeside-dark',
'atelierlakeside-light',
'atelierseaside-dark',
'atelierseaside-light',
'bespin-dark',
'bespin-light',
'chalk-dark',
'chalk-light',
'default-dark',
'default-light',
'eighties-dark',
'eighties-light',
'grayscale-dark',
'grayscale-light',
'greenscreen-dark',
'greenscreen-light',
'isotope-dark',
'isotope-light',
'londontube-dark',
'londontube-light',
'marrakesh-dark',
'marrakesh-light',
'mocha-dark',
'mocha-light',
'monokai-dark',
'monokai-light',
'ocean-dark',
'ocean-light',
'paraiso-dark',
'paraiso-light',
'railscasts-dark',
'railscasts-light',
'shapeshifter-dark',
'shapeshifter-light',
'solarized-dark',
'solarized-light',
'tomorrow-dark',
'tomorrow-light',
'twilight-dark',
'twilight-light']
for i in theme_names:
!ipython profile create $i
profile_dir = !ipython locate profile $i
url = "https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/ipython-3/output/base16-" + i + ".css"
#url = "https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-" + i + ".css"
tgt = op.join(profile_dir[0], 'static', 'custom', "custom.css")
if not op.exists(op.dirname(tgt)):
os.makedirs(op.dirname(tgt))
urllib.request.urlretrieve (url, tgt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment