Graduate research, notes, and experiments on the generation of haiku poetry with machine learning.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# This doesn't work on Ubuntu 19.10. If on 19.10, replace '$(lsb_release -cs)' with 'disco'
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker $USER
reboot
Use the provided Makefile
.
make help
# Now's a good time for a cup of coffee.
make docker-build
make init-data
make jupyter
Since I use the notebooks for development, including the development of those libraries, it is helpful to automatically reload the libraries when they change. Do this by adding the Jupyter magics
%load_ext autoreload
%autoreload 2
%aimport haikulib
It's also nice to use better plot formats
%config InlineBackend.figure_format = 'svg'
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
# Print pandas.DataFrame's nicely.
pd.set_option("display.latex.repr", True)
pd.set_option("display.latex.longtable", True)
# Use the 16x9 aspect ratio, with a decent size.
plt.rcParams["figure.figsize"] = (16 * 0.6, 9 * 0.6)
# Use a better default matplotlib theme.
sns.set()