Skip to content

Instantly share code, notes, and snippets.

Dougal J. Sutherland dougalsutherland

Block or report user

Report or block dougalsutherland

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dougalsutherland
dougalsutherland / latex-clean.sh
Last active Oct 17, 2019
A bash script to clean latex temp files
View latex-clean.sh
#!/bin/bash
# Note: you might prefer latexmk -c since latexmk is great. It doesn't clean all of these, but see
# https://tex.stackexchange.com/questions/83341/clean-bbl-files-with-latexmk-c/83386#83386
exts=".aux .lof .log .lot .fls .out .toc .dvi .bbl .bcf .blg -blx.aux -blx.bib -blx.bib .run.xml .fdb_latexmk .synctex.gz .syntex.gz(busy) .pdfsync .algorithms .alg .loa .thm .nav .snm .vrb .acn .acr .glg .glo .gls .brf .lol .idx .ilg .ind .ist .maf .mtc .mtc0 .pyg .nlo .tdo .xdy .keys"
for x in "${@:-.}"; do
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//')
View fastfood.py
'''
Implementation of Fastfood (Le, Sarlos, and Smola, ICML 2013).
Primarily by @esc (Valentin Haenel) and felixmaximilian
from https://github.com/scikit-learn/scikit-learn/pull/3665.
Modified by @dougalsutherland.
FHT implementation was "inspired by" https://github.com/nbarbey/fht.
'''
@dougalsutherland
dougalsutherland / example.hmm
Created Nov 1, 2011
Code for a Hidden Markov Model, along with some sample data / parameters for testing.
View example.hmm
4 # number of states
START
COLD
HOT
END
3 # size of vocab
1
2
3
View fix conda-forge subscriptions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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 comment_counts.tsv
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 7.
post_date post_title comment_count group_concat(terms.name)
2007-03-02 14:24:27 Economics hires two tenure-track professors 0 dtraber
2007-05-03 08:41:50 Pericles Project grants 0 lstokes
2007-05-03 08:43:43 ITS Director Judy Downing to Retire 0 mskorpe1
2007-05-02 08:44:58 Student Council report and election results 0 lstokes
2007-05-02 08:45:55 Worth Director Linda Echols reflects on her time at Swarthmore and prepares for retirement 0 mskorpe1
2007-05-02 08:47:10 "Blackness" only one of many competing identities in the Black diaspora, says historian Neptune 0 lstokes
2007-05-07 10:20:08 Two juniors win Rockefeller Teaching Fellowships 0 lstokes
2007-05-07 10:21:58 Gazette Schedule 0 dailygazette
2007-05-08 08:35:18 What's the structure behind Papazian? 0 lstokes
@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 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.
You can’t perform that action at this time.