Skip to content

Instantly share code, notes, and snippets.

@justinwhite
justinwhite / cloudbuild.yaml
Created September 29, 2017 23:39
Build file to auto deploy to app engine from a github push
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy']
@justinwhite
justinwhite / submission_diff.py
Created April 24, 2017 03:46
Calculate matrix difference between files. Used to see which student submissions are line-for-line copies of their peer's work.
import difflib
import sys
import csv
output = 'diff_report.csv'
files = sys.argv[1:]
with open(output, 'wb') as csvfile:
foo = csv.writer(csvfile)
@justinwhite
justinwhite / timeseries.csv
Created December 9, 2016 03:44
Sample timeseries data
identifier date value
3b2f23dc 2006-12-08 44.7488686406354
3b2f23dc 2007-01-08 42.7904065348064
3b2f23dc 2007-02-08 45.2956910346601
3b2f23dc 2007-03-08 41.3367232406372
3b2f23dc 2007-04-08 41.0759780279139
3b2f23dc 2007-05-08 40.5993684021585
3b2f23dc 2007-06-08 43.3132425575854
3b2f23dc 2007-07-08 43.3292812739315
3b2f23dc 2007-08-08 41.1756842638704
@justinwhite
justinwhite / Example.hs
Created December 10, 2015 22:17 — forked from charles-cooper/Example.hs
RFC: dsl for writing C
import Language.C.DSL
import Language.Format
main = prettyPrint $ do
include "stdio.h"
includeLocal "foo.h"
intptr_t <- typedef (ptr int) "intptr_t"
x <- int "x"
y <- double "y"
z <- ptr intptr_t "z"
w <- carray int "w" 21