Skip to content

Instantly share code, notes, and snippets.

@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>';
@golanlevin
golanlevin / ScrapingWorkshop1
Created March 8, 2015 23:19
Scraping Workshop by Golan
Ben Fry on the Infovis Pipeline:
http://golancourses.net/2014/wp-content/uploads/2014/01/Screen-Shot-2014-01-23-at-6.43.44-AM-620x608.png
Some Options for Scraping:
Temboo: https://temboo.com/library/
Kimono Labs: http://www.kimonolabs.com/
Beautiful Soup: http://www.crummy.com/software/BeautifulSoup/bs4/doc/
Processing (XML, JSON)
@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 / 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 / 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 / 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 / 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 / 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 / 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 / modulo_example.js
Created October 24, 2017 15:04
Modulo Example from Golan's Coding Train
var nElements = 7;
var myCounter = 0;
var ping = 0;
function setup() {
createCanvas(600, 500);
}
function draw() {
background((255*(1-(ping*=0.95))), 255,255);