Skip to content

Instantly share code, notes, and snippets.

@philkuz
philkuz / classify.ino
Created April 19, 2016 06:38
Classify for the MSP430 project SIXT33N
/* classify.ino
** Processing Integration sketch for SIXT33N Music version
**
** EE16B Spring 2016
** Emily Naviasky & Nathaniel Mailoa
**
*/
#include "./fix_fft.c"
#define MIC_INPUT P6_0
if [ "$#" -ne 1 ]; then
echo "Usage: autograder <email>"
exit 1
fi
EMAIL=$1
echo $EMAIL | java editorTester.AGInitialCursorTest gradescope
echo $EMAIL | java editorTester.AGSimpleTextTest gradescope
echo $EMAIL | java editorTester.AGBackspaceTest gradescope
echo $EMAIL | java editorTester.AGArrowKeyTest gradescope
echo $EMAIL | java editorTester.AGNewlineTest gradescope
@philkuz
philkuz / histogram.py
Created October 14, 2015 19:41
The histogram overlay
#=============EXAMPLE===============
def compare(t, conditions, values):
"""Overlay histograms of values for two conditions."""
t['count'] = 1
e = t.pivot(conditions, values, 'count', sum)
for label in e.column_labels[1:]:
e[label] = e[label]/sum(e[label]) # Normalize each column of counts
e.hist(counts=values, normed=True, overlay=True)
compare(couples, 'mar_status', 'age')