Notgnoshi / research

Graduate research, experiments, notes, for generation of haiku with machine learning.

Home Page:https://agill.xyz/research

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSR-Research

Graduate research, notes, and experiments on the generation of haiku poetry with machine learning.

Installing Docker

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

Set up Docker for this Project

Use the provided Makefile.

make help
# Now's a good time for a cup of coffee.
make docker-build
make init-data
make jupyter

Miscellaneous Tips and Tricks

Common Jupyter Notebook Configuration

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()

About

Graduate research, experiments, notes, for generation of haiku with machine learning.

https://agill.xyz/research


Languages

Language:Python 52.6%Language:TeX 40.1%Language:Makefile 5.9%Language:Dockerfile 1.4%