Installing Splunk on Ubuntu 14.04
Explanation of the installation of Splunk.
Explanation of the installation of Splunk.
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 .
In this post I will try to make a world map to indicate where the 50 artists I listen to most on Spotify are from. This will be my first personal data science project, so bare with me. My expectation is that the majority will be in either the UK (indie bands), the US or from South-Korea (K-pop). Lets see if my hypothesis is true.
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.
A short description that describes how to retrieve pictures from Flickr and add them to a Django application using the flickrapi.
I ran into an issue where I couldn't save some JSON-data to the database because of a weird UTF8 character. Apparently my databases have the SQL ASCII encoding and not the necessary UTF8 encoding.
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
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)
To avoid running the Gunicorn in a separate screen, you can use Supervisor to automatically start the Gunicorn server on system start or on user demand.
Use netstat to check with ports are listening on the machine.
jitsejan@jjsvps:~$ netstat -lnt | awk '$6 == "LISTEN"'