Skip to content

Instantly share code, notes, and snippets.


Andrew Yates andrewyates

View GitHub Profile
andrewyates /
Created Oct 13, 2020
Guide to installing Python with Conda

Installing Python 3 via Conda

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.

  1. Download: wget
  2. Make executable: chmod +x
  3. Run installer: ./ When prompted, say yes when asked if you want to initialize Miniconda.
  4. Close and re-open your shell in order for the installation to take effect. (e.g., close your terminal or SSH connection and then re-open)
andrewyates /
Last active Mar 29, 2018
Downloads arxiv papers and adds them to reMarkable's cloud storage. Requires and
#!/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):
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)
return unitvec(np.mean(vecs, axis=0))
qid_contexts = {}
andrewyates / gist:f988fa8c69ce8503d2b0
Created Mar 11, 2015
set the screen window title to the currently running (or last run) command
View gist:f988fa8c69ce8503d2b0
# 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\\"

Keybase proof

I hereby claim:

  • I am andrewyates on github.
  • I am 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:

andrewyates / ggplot-light.rc
Created Feb 1, 2014
ggplot-light style for mpltools
View ggplot-light.rc
# modified ggplot style with a white background
# from
# which was based on
patch.linewidth = 0.5
patch.facecolor = '#348ABD' # blue
patch.edgecolor = '#EEEEEE'
patch.antialiased = True
font.size = 14.0