Skip to content

Instantly share code, notes, and snippets.


Kyle McDonald kylemcdonald

View GitHub Profile
kylemcdonald / main.cpp
Created Nov 17, 2014
Hairball in openFrameworks.
View main.cpp
#include "ofMain.h"
class ofApp : public ofBaseApp {
ofEasyCam cam;
vector<ofVec3f> vertices;
ofVboMesh mesh;
void setup() {
int n = 250;
kylemcdonald / differences.txt
Last active Aug 29, 2015
Results for Google autocomplete of the phrase "Is there a difference between..." followed by different letters, for English in the USA.
View differences.txt
a break and a fracture
a buffalo and a bison
a college and a university
a sweet potato and a yam
a violin and a fiddle
add and adhd
almond flour and almond meal
alzheimer's and dementia
an attorney and a lawyer
autumn and fall
kylemcdonald /
Created Dec 10, 2014
Word-subsword pairs sorted by combined frequency.
# run this as:
# python > pairs.txt
# and in another shell:
# sort -rn pairs.txt | head -500 | cut -f2-
# word list is from
pairs = [line.strip().split('\t') for line in open('count_1w.txt')]
count = {}
for w, c in pairs:
count[w] = int(c)
kylemcdonald / cycles.pde
Created Jan 27, 2015
Generating smooth wavetables for LEDs.
View cycles.pde
size(500, 256);
translate(0, 256);
scale(1, -1);
int n = 497;
float inScale = 100;
float outScale = 255;
//float[] data = {0,100,0}; // one cycle
//float[] data = {0,55,10,70,30,90,60,100,60,90,30,70,10,55,0}; // 7 cycles
kylemcdonald /
Created Feb 4, 2015
artsec wiki leftovers.

For a while there was a wiki at but it was never really used, so I removed it. The leftovers are below.

Project Ideas

Physical displays in NYC - subverting what is displayed. Requires hardware access, possibly proper watermarking. What content is appropriate?

Network subterfuge - playing with assumptions on mobile networks. Spoofing GPS or access point data to fool location aware devices. Unintentional Flash Mob?

Spoofing known Access Points, using Man in the Middle to do fun things, like take over coffee shop networks, make people speak to one another.

kylemcdonald / Theano
Created Feb 4, 2015
Some notes for myself about installing Theano.
View Theano

Virtual machine

Get Ubuntu


Make sure pip is using the right version of python (in this case I'm using homebrew):

$ echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
$ echo export PATH='/usr/local/sbin:$PATH' >> ~/.bash_profile
kylemcdonald / repetition.txt
Last active Aug 29, 2015
Japanese words with some repetition that stands out to my English ears.
View repetition.txt
xyzxyz pattern
xyxy pattern
kylemcdonald /
Last active Aug 29, 2015
Live audio input with pyprocessing.
# to get the latest pyprocessing:
# pip install --allow-unverified pyprocessing pyprocessing==
import matplotlib.pyplot as plt
import scipy.fftpack as sfft
from import wavfile
from scipy.signal import blackman
import numpy as np
kylemcdonald /
Last active Aug 29, 2015
Training models on the GPU and loading onto the CPU with Lasagne.
#!/usr/bin/env python
from __future__ import print_function
import argparse
import gzip
import itertools
import pickle
import os
import sys
kylemcdonald / mainp3.cpp
Created Apr 21, 2015
Some of the first C++ code I ever wrote, as a freshman in College.
View mainp3.cpp
#include <iostream>
using namespace std;
#define songsPerCd 12
#define totalCds 5
//this code creates an automatic 2d array
bool shoppingCart[totalCds][songsPerCd];