Skip to content

Instantly share code, notes, and snippets.

View kleinschmidt's full-sized avatar

Dave Kleinschmidt kleinschmidt

View GitHub Profile
@kleinschmidt
kleinschmidt / fignos.Rmd
Last active March 26, 2016 16:20
pandoc-fignos and RMarkdown
---
title: "You kids play nice now"
output:
html_document:
keep_md: true
md_extensions: +implicit_figures
pandoc_args:
- --filter
- pandoc-fignos
references:
@kleinschmidt
kleinschmidt / formula.jl.mem
Last active October 22, 2016 03:02
benchmarking DataFrames#1081
- # Formulas for representing and working with linear-model-type expressions
- # Original by Harlan D. Harris. Later modifications by John Myles White
- # and Douglas M. Bates.
-
- ## Formulas are written as expressions and parsed by the Julia parser.
- ## For example :(y ~ a + b + log(c))
- ## In Julia the & operator is used for an interaction. What would be written
- ## in R as y ~ a + b + a:b is written :(y ~ a + b + a&b) in Julia.
- ## The equivalent R expression, y ~ a*b, is the same in Julia
-
@kleinschmidt
kleinschmidt / clean-library-auto.plist
Last active October 30, 2016 20:42
Make Mendeley, BibTeX, and apacite play nicely together by removing URL and month entries. Apacite lumps journal articles and newspaper/magazine articles in the same class, and always prints a month if it's provided. This gist has a shell script that strips this info out and a launchd handler that watches the auto-exported .bib file and runs the…
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>auto-clean-mendeley-library</string>
<key>ProgramArguments</key>
<array>
<string>/Users/dkleinschmidt/Documents/papers/clean-library-auto.sh</string>
</array>
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.";
@kleinschmidt
kleinschmidt / gibbs.ipynb
Last active July 21, 2017 18:43
Julia gibbs sampling benchmark
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kleinschmidt
kleinschmidt / tasknet.ipynb
Last active October 2, 2017 16:36
a Flux.jl example with a toy neural network that learns and, or, and xor
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 November 27, 2017 22:22
bib and bcf for extracting cited refs
<?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 / nix2-mode.ipynb
Created February 13, 2018 16:21
derivation for mode of Normal Inverse-Chisq distribution
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kleinschmidt
kleinschmidt / Manifest.toml
Created January 31, 2019 00:09
psych301 (sensation and perception) fourier demos
# 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"]