Instantly share code, notes, and snippets.

View latex-clean.sh
#!/bin/bash
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)$//')
if [[ -d "$arg" ]]; then
for ext in $exts; do
rm -f "$arg"/*$ext
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 example.hmm
4 # number of states
START
COLD
HOT
END
3 # size of vocab
1
2
3
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: Missing or stray quote 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
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 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.
'''
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.
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....