Use markdown cells to begin each section with a heading, and subsections with subheadings, using # and ## and ### in descending hierarchy.
The template is not intended to be an overly rigid document. Violations of the template are acceptable as long as they substantively improve the presentation and have a valid purpose. However, if the template is regularly being modified in a specific way then the template itself should be forked or modified.
In [1]:
######
#
# Library/Package Loads
#
# This section should contain all library/package loads required for the code.
#
######
%matplotlib inline
%config InlineBackend.figure_format='retina'
# %load_ext autoreload
# %autoreload 1
from __future__ import absolute_import, division, print_function
import matplotlib as mpl
from matplotlib import pyplot as plt
from matplotlib.pyplot import GridSpec
import seaborn as sns
import mplsvds
import mpld3
import numpy as np
import pandas as pd
import os, sys
from tqdm import tqdm
import warnings
sns.set_context("poster", font_scale=1.3)
In [2]:
######
#
# Configurations
#
# This section contains specific configurations required by the code
# going forward, including formatting options.
#
######
def define_paths():
paths = {}
paths['working'] = os.path.abspath(os.path.curdir)
main = os.path.split(os.path.split(paths['working'])[0])[0]
strike = os.path.split(os.path.split(main)[0])[0]
for directory in ['source','data','develop','report']:
paths[directory] = os.path.join(main, directory)
paths['sql'] = os.path.join(paths['source'], directory)
paths['src'] = os.path.join(strike, 'src')
return paths
paths = define_paths()
# Notebook variables and settings
user = os.path.expanduser('~').split('/')[-1]
os.system("kinit -k -t /home/{u}/.keytabs/{u}.keytab -p {u}".format(u=user))
sys.path.append(paths['src'])
######
#
# Source Files
#
# This section should contain other source files loaded before the code runs.
# Preferably some note of the features of the source files would be appropriate.
#
######
Some general rules:
In [3]:
# Currently doesn't work, but putting the versions of libraries used at the end is probably a good idea.
# %install_ext http://raw.github.com/jrjohansson/version_information/master/version_information.py
# %load_ext version_information
# %reload_ext version_information
# %version_information numpy, matplotlib, pandas