Skip to content

Instantly share code, notes, and snippets.

View tjmahr's full-sized avatar
🍍
sampling

TJ Mahr tjmahr

🍍
sampling
View GitHub Profile
@tjmahr
tjmahr / gp-predict.stan
Created June 15, 2017 13:36 — forked from jkeirstead/gp-predict.stan
A demo of Gaussian processes using RStan
// Predict from Gaussian Process
// All data parameters must be passed as a list to the Stan call
// Based on original file from https://code.google.com/p/stan/source/browse/src/models/misc/gaussian-process/
data {
int<lower=1> N1;
vector[N1] x1;
vector[N1] y1;
int<lower=1> N2;
vector[N2] x2;
@tjmahr
tjmahr / mgcv-posterior-animate.R
Last active September 4, 2018 18:01 — forked from noamross/mgcv-posterior-animate.R
Animating smoothing uncertainty in a GAM
# devtools::install_github("thomasp85/transformr")
# devtools::install_github("thomasp85/gganimate")
library(tidyverse)
library(gganimate)
library(rstanarm)
theme_set(theme_grey())
# Get the mpg value to predict over
@tjmahr
tjmahr / simple-annotation.praat
Last active April 24, 2020 16:41 — forked from scjs/annotation.praat
Praat script for more efficient manual TextGrid annotation
# USAGE:
#
# This Praat script makes the process of annotating multiple sound files go
# faster by automating most of the mouse-clicks that are needed to create and
# save new TextGrid files. It takes a folder of sound files. For each sound
# file, the script creates a new TextGrid with the annotation tiers that you
# list in the settings window, then opens that TextGrid along with its
# accompanying sound file. The script pauses while you create annotations for
# the sound file. When you are done creating annotations, press "OK" in the
# pop-up window to save the TextGrid to a file with the same filename as the
import tweepy
from datetime import datetime, timedelta
# options
test_mode = False
verbose = True
delete_tweets = True
delete_favs = True
days_to_keep = 0 # for whe all of your tweets are really that bad