{ "metadata": { "name": "", "signature": "sha256:a5f4de530c9a33054db987473208eda57fa3ad6b5164c01ab7d041b9202c8ae0" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "OK, a short post to give you some material to play with over the weekend ;-).\n", "\n", "Today, I woke up early and whereas I was drinking a *mate* (a native drink here in Argentina) for breakfast, I remember a tweet from [Nikhil Sonnad](https://twitter.com/nsonnad) where I was mentioned:\n", "\n", "\n", "\n", "

Sent PR to base16 for IPython notebook colorschemes. Check them out at https://t.co/SBbwBfLGli cc @oceankidbilly @damian_avila

— Nikhil Sonnad (@nsonnad) April 12, 2014
\n", "\n", "\n", "Essentially, he made available 48 **IPython notebook** themes based in the **base16** color scheme generator. Thanks Nikhil for your work!!!\n", "\n", "Well, I want to try them all and quickly, so I wrote some little code to do it:\n", "\n", "First, some imports..." ] }, { "cell_type": "code", "collapsed": false, "input": [ "import os\n", "import subprocess\n", "import urllib" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Second, make a list with all the theme names..." ] }, { "cell_type": "code", "collapsed": false, "input": [ "theme_names = ['3024-dark',\n", " '3024-light',\n", " 'atelierdune-dark',\n", " 'atelierdune-light',\n", " 'atelierforest-dark',\n", " 'atelierforest-light',\n", " 'atelierheath-dark',\n", " 'atelierheath-light',\n", " 'atelierlakeside-dark',\n", " 'atelierlakeside-light',\n", " 'atelierseaside-dark',\n", " 'atelierseaside-light',\n", " 'bespin-dark',\n", " 'bespin-light',\n", " 'chalk-dark',\n", " 'chalk-light',\n", " 'default-dark',\n", " 'default-light',\n", " 'eighties-dark',\n", " 'eighties-light',\n", " 'grayscale-dark',\n", " 'grayscale-light',\n", " 'greenscreen-dark',\n", " 'greenscreen-light',\n", " 'isotope-dark',\n", " 'isotope-light',\n", " 'londontube-dark',\n", " 'londontube-light',\n", " 'marrakesh-dark',\n", " 'marrakesh-light',\n", " 'mocha-dark',\n", " 'mocha-light',\n", " 'monokai-dark',\n", " 'monokai-light',\n", " 'ocean-dark',\n", " 'ocean-light',\n", " 'paraiso-dark',\n", " 'paraiso-light',\n", " 'railscasts-dark',\n", " 'railscasts-light',\n", " 'shapeshifter-dark',\n", " 'shapeshifter-light',\n", " 'solarized-dark',\n", " 'solarized-light',\n", " 'tomorrow-dark',\n", " 'tomorrow-light',\n", " 'twilight-dark',\n", " 'twilight-light']" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The themes are `css` files, so we can create a new profile for each theme and add the css content to the `custom.css` file inside each profile.\n", "To do it, I use some little magic *tricks* from **IPython**..." ] }, { "cell_type": "code", "collapsed": false, "input": [ "for i in theme_names:\n", " !ipython profile create $i\n", " profile_dir = !ipython locate profile $i\n", " url = \"https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-\" + i + \".css\"\n", " tgt = os.path.join(profile_dir[0], 'static', 'custom', \"custom.css\")\n", " urllib.urlretrieve (url, tgt)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_3024-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-dark/ipython_notebook_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierdune-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierforest-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-light/ipython_notebook_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierheath-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-light/ipython_notebook_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierlakeside-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_atelierseaside-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_bespin-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_chalk-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_default-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_eighties-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_grayscale-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_greenscreen-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_isotope-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_londontube-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_marrakesh-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_mocha-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_monokai-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-dark/ipython_notebook_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_ocean-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-dark/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-light/ipython_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_paraiso-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_railscasts-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_shapeshifter-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_solarized-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_tomorrow-light/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-dark/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-dark/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-dark/ipython_nbconvert_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-light/ipython_config.py'\r\n", "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-light/ipython_notebook_config.py'\r\n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[ProfileCreate] Generating default config file: u'/home/damian/.ipython/profile_twilight-light/ipython_nbconvert_config.py'\r\n" ] } ], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, I want to try it... quickly... so I launch a new **IPython** server for each *profile* in specific *ports*. I also pass the `--no-browser` option to avoid opening 48 tabs in a row (depending of your computing power this can be problematic)." ] }, { "cell_type": "code", "collapsed": false, "input": [ "for i, name in enumerate(theme_names):\n", " port = str(9000 + i) \n", " subprocess.Popen([\"ipython\", \"notebook\", \"--profile=\" + name, \"--port=\" + port, \"--no-browser\"])" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, because I am lazy ;-), I build the urls to see this same notebook with each different theme (don't forget to use the *incognito mode* of your browser to avoid `css` caching and at least **IPython 2.0**)." ] }, { "cell_type": "code", "collapsed": false, "input": [ "base_url = \"http://127.0.0.1:\"\n", "notebook = \"/notebooks/48-themes-for-your-ipython-notebook.ipynb\"\n", "\n", "for i, name in enumerate(theme_names):\n", " port = str(9000 + i) \n", " url = base_url + port + notebook\n", " print url, name" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "http://127.0.0.1:9000/notebooks/48-themes-for-your-ipython-notebook.ipynb 3024-dark\n", "http://127.0.0.1:9001/notebooks/48-themes-for-your-ipython-notebook.ipynb 3024-light\n", "http://127.0.0.1:9002/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierdune-dark\n", "http://127.0.0.1:9003/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierdune-light\n", "http://127.0.0.1:9004/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierforest-dark\n", "http://127.0.0.1:9005/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierforest-light\n", "http://127.0.0.1:9006/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierheath-dark\n", "http://127.0.0.1:9007/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierheath-light\n", "http://127.0.0.1:9008/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierlakeside-dark\n", "http://127.0.0.1:9009/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierlakeside-light\n", "http://127.0.0.1:9010/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierseaside-dark\n", "http://127.0.0.1:9011/notebooks/48-themes-for-your-ipython-notebook.ipynb atelierseaside-light\n", "http://127.0.0.1:9012/notebooks/48-themes-for-your-ipython-notebook.ipynb bespin-dark\n", "http://127.0.0.1:9013/notebooks/48-themes-for-your-ipython-notebook.ipynb bespin-light\n", "http://127.0.0.1:9014/notebooks/48-themes-for-your-ipython-notebook.ipynb chalk-dark\n", "http://127.0.0.1:9015/notebooks/48-themes-for-your-ipython-notebook.ipynb chalk-light\n", "http://127.0.0.1:9016/notebooks/48-themes-for-your-ipython-notebook.ipynb default-dark\n", "http://127.0.0.1:9017/notebooks/48-themes-for-your-ipython-notebook.ipynb default-light\n", "http://127.0.0.1:9018/notebooks/48-themes-for-your-ipython-notebook.ipynb eighties-dark\n", "http://127.0.0.1:9019/notebooks/48-themes-for-your-ipython-notebook.ipynb eighties-light\n", "http://127.0.0.1:9020/notebooks/48-themes-for-your-ipython-notebook.ipynb grayscale-dark\n", "http://127.0.0.1:9021/notebooks/48-themes-for-your-ipython-notebook.ipynb grayscale-light\n", "http://127.0.0.1:9022/notebooks/48-themes-for-your-ipython-notebook.ipynb greenscreen-dark\n", "http://127.0.0.1:9023/notebooks/48-themes-for-your-ipython-notebook.ipynb greenscreen-light\n", "http://127.0.0.1:9024/notebooks/48-themes-for-your-ipython-notebook.ipynb isotope-dark\n", "http://127.0.0.1:9025/notebooks/48-themes-for-your-ipython-notebook.ipynb isotope-light\n", "http://127.0.0.1:9026/notebooks/48-themes-for-your-ipython-notebook.ipynb londontube-dark\n", "http://127.0.0.1:9027/notebooks/48-themes-for-your-ipython-notebook.ipynb londontube-light\n", "http://127.0.0.1:9028/notebooks/48-themes-for-your-ipython-notebook.ipynb marrakesh-dark\n", "http://127.0.0.1:9029/notebooks/48-themes-for-your-ipython-notebook.ipynb marrakesh-light\n", "http://127.0.0.1:9030/notebooks/48-themes-for-your-ipython-notebook.ipynb mocha-dark\n", "http://127.0.0.1:9031/notebooks/48-themes-for-your-ipython-notebook.ipynb mocha-light\n", "http://127.0.0.1:9032/notebooks/48-themes-for-your-ipython-notebook.ipynb monokai-dark\n", "http://127.0.0.1:9033/notebooks/48-themes-for-your-ipython-notebook.ipynb monokai-light\n", "http://127.0.0.1:9034/notebooks/48-themes-for-your-ipython-notebook.ipynb ocean-dark\n", "http://127.0.0.1:9035/notebooks/48-themes-for-your-ipython-notebook.ipynb ocean-light\n", "http://127.0.0.1:9036/notebooks/48-themes-for-your-ipython-notebook.ipynb paraiso-dark\n", "http://127.0.0.1:9037/notebooks/48-themes-for-your-ipython-notebook.ipynb paraiso-light\n", "http://127.0.0.1:9038/notebooks/48-themes-for-your-ipython-notebook.ipynb railscasts-dark\n", "http://127.0.0.1:9039/notebooks/48-themes-for-your-ipython-notebook.ipynb railscasts-light\n", "http://127.0.0.1:9040/notebooks/48-themes-for-your-ipython-notebook.ipynb shapeshifter-dark\n", "http://127.0.0.1:9041/notebooks/48-themes-for-your-ipython-notebook.ipynb shapeshifter-light\n", "http://127.0.0.1:9042/notebooks/48-themes-for-your-ipython-notebook.ipynb solarized-dark\n", "http://127.0.0.1:9043/notebooks/48-themes-for-your-ipython-notebook.ipynb solarized-light\n", "http://127.0.0.1:9044/notebooks/48-themes-for-your-ipython-notebook.ipynb tomorrow-dark\n", "http://127.0.0.1:9045/notebooks/48-themes-for-your-ipython-notebook.ipynb tomorrow-light\n", "http://127.0.0.1:9046/notebooks/48-themes-for-your-ipython-notebook.ipynb twilight-dark\n", "http://127.0.0.1:9047/notebooks/48-themes-for-your-ipython-notebook.ipynb twilight-light\n" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Easy and quick, don't you think?\n", "\n", "OK, a lot of **IPython** servers opened, let's kill them all!!! I feel like [George R. R. Martin](http://en.wikipedia.org/wiki/George_R._R._Martin) ;-)." ] }, { "cell_type": "code", "collapsed": false, "input": [ "!killall -9 ipython" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Obviously, this command also killed the *current* notebook (remember, this post is in fact an **IPython notebook**, and you can get it from the **source** link at the top of the post)... but I am right with that... this is the end of this post.\n", "\n", "Final note: I did not like any *complete* theme, but I really like some *part* from several themes, so it worths to see them to take each nice part and make my own theme in the future.\n", "\n", "Good weekend!\n", "\n", "Dami\u00e1n" ] } ], "metadata": {} } ] }