Add CSS to Jupyter notebook

To add some style to the notebook, Jupyter has the option to add a custom css file. This file should be located in ~/.jupyter/custom/custom.css. If this file does not exist yet, create the directory if needed and add the stylesheet. Add the following code and refresh the notebook to see if it works.

body {
  background-color: purple;
}

To make it easier to modify this file, create a link from the stylesheet to the working directory for the notebooks in order to be able to modify the stylesheet in the browser.

jitsejan@jjsvps:~/code/notebooks$ ln -s ~/.jupyter/custom/custom.css .

Install Java version 8

I ran into an issue while re-configuring the Jira installation on my system. After an update Java 8 was needed but it is not present by default on Ubuntu 14.04. To install the JRE and JDK you need to add the repository of the webupd8team and use the Oracle Java 8 installer.

Upgrade PostgreSQL

By default Ubuntu 14.04 is running PostgreSQL version 9.3. In order to use the json datatype PostgreSQL version 9.4 or bigger is needed. The versions can be installed side by side, but for clarity you could remove the

Write dictionary to CSV in Python

import csv

def write_dictionary_to_csv(o_file, d):
    """ Write dictionary to output file """
    with open(o_file, 'wb') as csvfile:
        outputwriter = csv.writer(csvfile, delimiter=';', quoting=csv.QUOTE_MINIMAL)
        outputwriter.writerow(d.keys())
        outputwriter.writerows(zip(*d.values()))

dictionary = {"key1": [12,23,34],
              "key2": [45,56,67],
              "key3": [78,89,90]}
output_file = 'output.csv'
write_dictionary_to_csv(output_file, dictionary)