Skip to content

Instantly share code, notes, and snippets.

Dave Kleinschmidt kleinschmidt

View GitHub Profile
@kleinschmidt
kleinschmidt / formula.jl
Created Jul 12, 2020
benchmarking formula creating compile time in StatsModels.jl
View formula.jl
using StatsModels
macro echotime(ex)
println(ex)
esc(:(@time $ex))
end
@formula(y ~ 1+x)
exs = [
@kleinschmidt
kleinschmidt / reftex-markdown.el
Last active May 9, 2020
Insert markdown (pandoc-citeproc) formatted citations using RefTeX
View reftex-markdown.el
;; reftex in markdown mode
;; if this isn't already set in your .emacs
(setq reftex-default-bibliography '("/path/to/library.bib"))
;; define markdown citation formats
(defvar markdown-cite-format)
(setq markdown-cite-format
'(
(?\C-m . "[@%l]")
@kleinschmidt
kleinschmidt / tech-support.py
Created Apr 24, 2020
create a "tech support" HIT based on an existing supersubmiterator config
View tech-support.py
#!/usr/bin/env python
import json, argparse, os, csv
import boto3
mturk = boto3.client('mturk')
def main():
parser = argparse.ArgumentParser(description="Technical Support for MTurk workers")
parser.add_argument(
"--qualification_id",
@kleinschmidt
kleinschmidt / Manifest.toml
Created Jan 31, 2019
psych301 (sensation and perception) fourier demos
View Manifest.toml
# This file is machine-generated - editing it directly is not advised
[[AbstractFFTs]]
deps = ["Compat", "LinearAlgebra"]
git-tree-sha1 = "8d59c3b1463b5e0ad05a3698167f85fac90e184d"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "0.3.2"
[[AssetRegistry]]
deps = ["Distributed", "JSON", "Pidfile", "SHA", "Test"]
View Mahalanobis outlier detection.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kleinschmidt
kleinschmidt / nix2-mode.ipynb
Created Feb 13, 2018
derivation for mode of Normal Inverse-Chisq distribution
View nix2-mode.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kleinschmidt
kleinschmidt / talker-variability.bcf
Created Nov 27, 2017
bib and bcf for extracting cited refs
View talker-variability.bcf
<?xml version="1.0" encoding="UTF-8"?>
<bcf:controlfile version="3.4" bltxversion="3.8" xmlns:bcf="https://sourceforge.net/projects/biblatex">
<!-- BIBER OPTIONS -->
<bcf:options component="biber" type="global">
<bcf:option type="singlevalued">
<bcf:key>output_encoding</bcf:key>
<bcf:value>utf8</bcf:value>
</bcf:option>
<bcf:option type="singlevalued">
<bcf:key>input_encoding</bcf:key>
@kleinschmidt
kleinschmidt / tasknet.ipynb
Last active Oct 2, 2017
a Flux.jl example with a toy neural network that learns and, or, and xor
View tasknet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kleinschmidt
kleinschmidt / gibbs.ipynb
Last active Jul 21, 2017
Julia gibbs sampling benchmark
View gibbs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View config-setup.sh
git clone --bare git@github.com:kleinschmidt/dotfiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout $*
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
You can’t perform that action at this time.