Skip to content

Instantly share code, notes, and snippets.

@golanlevin
golanlevin / autocorrelation.pde
Last active October 19, 2020 13:11
Autocorrelation demo in Processing
float mysteryLag;
float signalA[];
float signalB[];
float autoCorr[];
int nData;
void setup() {
size(512, 700);
nData = 512;
@golanlevin
golanlevin / amos_cams_7800.csv
Created April 14, 2020 20:44
CSV List of 7800+ web cameras rescued from AMOS (Archive of Many Outdoor Scenes)
We can't make this file beautiful and searchable because it's too large.
cameraid,name,url,latitude,longitude,last_width,last_height,mhash
1,VT,http://www.hazecam.net/images/main/burlington_right.jpg,44.478739,-73.19164,500,250,
2,Anthem school,http://wwc.instacam.com/instacamimg/PHNAS/PHNAS_l.jpg,33.2765,-112.1872,1280,720,
3,Coolidge High School,http://wwc.instacam.com/instacamimg/CLDGE/CLDGE_l.jpg,39.075880734474,-76.868118734,1280,720,
4,College of the Canyons,http://wwc.instacam.com/instacamimg/CLLCN/CLLCN_l.jpg,34.4044820734014,-118.569055939865,1280,1024,
5,Borrego Springs HS,http://wwc.instacam.com/instacamimg/BORYO/BORYO_l.jpg,33.2648176,-116.3834183,1280,720,
6,Potrero Hill,http://wwc.instacam.com/instacamimg/SANFR/SANFR_l.jpg,37.7603145925262,-122.422996428,1280,720,
7,City of Cripple Creek,http://wwc.instacam.com/instacamimg/CRPCK/CRPCK_l.jpg,38.8261,-105.1499,1280,720,
8,KOAA News First Cams,http://wwc.instacam.com/instacamimg/KOAAT/KOAAT_l.jpg,38.2886723,-104.6237902,1280,720,
9,Aspen ES/MS,http://wwc.instacam.com/instacamimg/ASPEN/ASPEN_l.jpg,0,0,640,480,
@golanlevin
golanlevin / basicspring.pde
Created October 19, 2017 21:03
A Spring in Processing
// A basic spring in Processing, based on:
// Hooke's law: F = -kx
// Newton's law: F = ma
// For more examples, see this lecture:
// http://cmuems.com/2015c/deliverables/deliverables-10/springs/
float restLength;
float vx;
float px;
@golanlevin
golanlevin / histogramMatching.pde
Created February 27, 2016 05:25
Processing program for histogram matching (work in progress)
float ideal[] = {
0.092,
0.518,
0.846,
1.000,
0.960,
0.850,
0.740,
0.640,
0.550,
@golanlevin
golanlevin / template_README.md
Last active February 18, 2016 22:29
Template for openFrameworks Example README.md files.

#About exampleName

###Learning Objectives

This openFrameworks Example is designed to demonstrate ...

  • How to ...
  • The ability of openFrameworks to ...
@golanlevin
golanlevin / pointImager.pde
Created February 13, 2016 20:51
Processing 3.0 utility to load a folder of data files, containing colored 3D points; outputs a folder of images of the colored points.
// Processing 3.0 program to load a folder of data files, containing colored 3D points.
// The program outputs a folder of images (in "output/" folder) of the colored points.
// Golan Levin (@golan), February 2016, written for Claire Hentschker
//
// The lines of the data files are in the format:
// X Y Z R G B A B C
// The data values are space-separated; see example file below.
/* Sample data file: data/arcade_003251.txt:
-33.92082214 -19.60678101 33.81335068 106 142 217 -0.517697 -0.204671 -0.830723
@golanlevin
golanlevin / ofApp.cpp
Created December 17, 2015 08:57 — forked from aman-tiwari/ofApp.cpp
UArm control from Openframeworks
//--------------------------------------------------------------
void ofApp::setup() {
uarm.setup("/dev/tty.usbserial-A600CRMU", 9600);
}
//--------------------------------------------------------------
// x, y, z in cylindrical coordinates, handRot in degrees
void ofApp::setArmTo(int x, int y, int z, int handRot, bool gripper) {
// UArm expects 1 for an open gripper and 2 for a closed gripper
gripper = (int)gripper + 1;
@golanlevin
golanlevin / nominatim-values.txt
Created October 31, 2015 14:57
Unique Values from Open Street Map Nominatim taxonomy
aerodrome
animal_boarding
animal_shelter
arts_centre
atm
auditorium
bank
bar
pub
bench
@golanlevin
golanlevin / gist:2a0b4c8205199b16320a
Created June 16, 2015 17:45
Action Words for Resumes
Inspired and adapted from Quintessential Careers:
Job-Seeker Action Verbs By Skills Sets
http://www.quintcareers.com/
Administration and management
advised
approved
authorized
chaired
consolidated
@golanlevin
golanlevin / Repair to Sketchfab Viewer WP Plugin
Last active August 29, 2015 14:12
Repair to Sketchfab Viewer WP Plugin
/* The code for the Sketchfab Embed Wordpress plugin,
sketchfab-viewer/sketchfab-viewer.php
had fault-inducing line breaks. I replaced the following section:
*/
return '<iframe frameborder="0" height="'.$height.'"
width="'.$width.'"
webkitallowfullscreen="true" mozallowfullscreen="true"
src="https://sketchfab.com/embed/'.$id.'?autostart='.$start.'&autospin='.$spin.'&controls='.$controls.'&transparent='.$transparent.'"
></iframe>';