I hereby claim:
- I am andrewyates on github.
- I am andrewyates (https://keybase.io/andrewyates) on keybase.
- I have a public key whose fingerprint is 1765 4D54 3003 9503 FAA9 4095 6F4F FCDD 6B40 34AA
To claim this, I am signing this object:
# modified ggplot style with a white background | |
# from https://github.com/tonysyu/mpltools/blob/master/mpltools/style/ggplot.rc | |
# which was based on http://www.huyng.com/posts/sane-color-scheme-for-matplotlib/ | |
patch.linewidth = 0.5 | |
patch.facecolor = '#348ABD' # blue | |
patch.edgecolor = '#EEEEEE' | |
patch.antialiased = True | |
font.size = 14.0 |
I hereby claim:
To claim this, I am signing this object:
# set the screen window title to the currently running (or last run) command | |
preexec () { | |
local CMD=${1[(wr)^(*=*|sudo|-*)]} | |
print -Pn "\ek$CMD $a\e\\" | |
} |
def avg_vec(terms): | |
vecs = [word2vec_model[term] for term in terms if term in word2vec_model] | |
if len(vecs) == 0: | |
print("WARNING: sequence of UNKs") | |
return np.zeros(word2vec_model.vector_size) | |
else: | |
return unitvec(np.mean(vecs, axis=0)) | |
os.mkdir(context_outdir) | |
qid_contexts = {} |
#!/usr/bin/env python | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
import arxiv | |
def download_paper(url, outdir="/home/andrew/.arxiv/"): | |
if not os.path.exists(outdir): |
This tutorial describes how to install Python 3 into your home directory using the Conda package manager. We'll use the Miniconda variant, which is just Anaconda with fewer packages installed by default.
wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh
chmod +x Miniconda3-py37_4.8.3-Linux-x86_64.sh
./Miniconda3-py37_4.8.3-Linux-x86_64.sh
When prompted, say yes when asked if you want to initialize Miniconda.