This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| #map { | |
| width: 1200px; height: 600px; | |
| } | |
| #states { | |
| fill: none; | |
| stroke: #555555; | |
| stroke-width: 0.5px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.metrics import roc_curve, auc | |
| import matplotlib.pyplot as plt | |
| import random | |
| import csv | |
| actual = [] | |
| predictions = [] | |
| with open('scores_and_outcomes.tsv','rb') as tsvin: | |
| tsvin = csv.reader(tsvin, delimiter='\t') | |
| for row in tsvin: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/planck | |
| (ns confusion_matrix_derivations.core | |
| (:require [planck.core :refer [*command-line-args*]] | |
| [cljs.reader :refer [read-string]] | |
| [cljs.pprint :refer [pprint]])) | |
| (defn sensitivity | |
| "Sensitivity, or True Positive Rate" | |
| [tp fln] | |
| (/ tp (+ tp fln))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script I use to copy random albums to my mp3 player | |
| # OS X, requires GNU coreutils | |
| ls "$1" | gsort -R | tail -n $3 | while read file; do | |
| cd "$1"; cp -R "$file" $2 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns sample-fiddlin.core | |
| (import javax.sound.sampled.AudioSystem | |
| javax.sound.sampled.DataLine$Info | |
| javax.sound.sampled.Clip) | |
| (:gen-class)) | |
| ;; (play "clap/clap-808.wav") | |
| (defn play [sound] | |
| (let [audio-file (java.io.File. (str "dev-resources/" sound)) | |
| audio-stream (AudioSystem/getAudioInputStream audio-file) |