Created
September 12, 2015 11:24
-
-
Save alexsavio/993ccbcd912e8fa32df0 to your computer and use it in GitHub Desktop.
IPython notebook styles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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