Skip to content

Instantly share code, notes, and snippets.

Dougal J. Sutherland dougalsutherland

View GitHub Profile
View H infinity smallest eigs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View censored normal moments.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dougalsutherland
dougalsutherland / patch_biblatex.sty
Created Oct 12, 2017
Patch to workaround biblatex oddities with the natbib option in versions < 3.5
View patch_biblatex.sty
% biblatex authoryear with natbib does a million stray commas in versions < 3.5
% see: https://tex.stackexchange.com/q/312539/
% this works around it for versions 3.3 and 3.4
\ifthenelse{\equal{\abx@version}{3.4}}{%
\DeclareDelimFormat[cbx@textcite]{nameyeardelim}{\addspace}
}{\ifthenelse{\equal{\abx@version}{3.3}}{%
% Workaround following http://golatex.de/neue-biber-version-ploetzlich-komma-bei-zitierung-t17005.html
% (in German...), which changes \nameyeardelim / \nonameyeardelim to \addspace
% in the citation style's textcite macro.
% sigh....
@dougalsutherland
dougalsutherland / alphanumeric-hybrid.bbx
Last active Mar 19, 2018
biblatex style to be able to use the numeric style in one section and the alphabetic in another
View alphanumeric-hybrid.bbx
% This is an unholy mashup of the numeric.bbx and alphabetic.bbx files from
% the standard biblatex distribution, made so we can switch between numeric
% style for the main body and alphabetic style for the appendix.
\ProvidesFile{alphanumeric-hybrid.bbx}
[\abx@bbxid]
\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{labelalpha,labelnumber,sorting=anyt}
% To use the alphabetic section in one refsection, \setbool{bbx:alpha}{true} at the start;
View two-sample tests via set classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View two-sample tests via set classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View mkl dgemm_batch.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View autoencoder_stuff.py
from __future__ import division
import json
import numpy as np
import keras
from keras.datasets import mnist
from keras import backend as K, layers as L
from keras.models import load_model, Model, model_from_config
@dougalsutherland
dougalsutherland / fix_paths.sh
Last active Feb 13, 2016
Patch up Caffe's paths to avoid need for DYLD_FALLBACK_LIBRARY_PATH on OSX El Capitan, which doesn't really support it anymore
View fix_paths.sh
#!/bin/bash
CUDA_LIB_DIR=/usr/local/cuda/lib
CUDA_VERSION=7.5
CUDA_LIBS="cublas cudart curand"
CUDNN_LIB_DIR=/usr/local/cuda/cudnn-3/lib
CUDNN_VERSION=7.0
CUDNN_LIBS="cudnn"
You can’t perform that action at this time.