This file contains 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 BeautifulSoup import BeautifulSoup | |
import urllib2 | |
f = urllib2.urlopen('http://www.yelp.com/developers/documentation/neighborhood_list') | |
raw = f.read() | |
soup = BeautifulSoup(raw) | |
places = soup.find('ul', {'class':'attr-list'}) |
This file contains 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
$("article").not(".category-tutorials").hide(); |
This file contains 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
for (i = 0; i < items.length ; i ++){console.log($(items[i]).html());} |
This file contains 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
String inString = ""; | |
boolean keepReading = false; | |
const int ledPin = 13; | |
const int irTarget = 2; | |
int ledState = LOW; | |
unsigned long previousMillis = 0; | |
long interval = 0; | |
unsigned long offTime = 0; | |
boolean isOff = false; |
This file contains 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
String inString = ""; // string to hold input | |
// constants won't change. Used here to | |
// set pin numbers: | |
const int ledPin = 13, irTarget = 2; // the number of the LED pin | |
// Variables will change: | |
int ledState = LOW; // ledState used to set the LED | |
long previousMillis = 0; // will store last time LED was updated |
This file contains 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
void toggleLed(); | |
String inString = ""; | |
boolean keepReading = false; | |
const int ledPin = 13; | |
const int irTarget = 2; | |
int ledState = LOW; | |
unsigned long previousMillis = 0; | |
long interval = 0; | |
const int player = 'A'; |
This file contains 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
B1 = 407C4414 | |
B2 = 407C4427 | |
B3 = 407C441C | |
B4 = 407C441A | |
B5 = 407C4421 | |
O1 = 407C440E | |
O2 = 407C441E | |
O3 = 407C4412 | |
O4 = 407C441B |
This file contains 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
pipeline create Camera v | |
pipeline create GrayScale g | |
pipeline create Threshold t | |
pipeline set t threshold 150 | |
pipeline create BlobFinder b | |
pipeline create GreedyBlobTracker tr | |
pipeline create Tuio tu | |
pipeline set tu ip 149.142.121.154 | |
#pipeline create ImageDisplay d1 | |
#pipeline create ImageDisplay d2 |
This file contains 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
def compare(): | |
results = [] | |
results['attack'] = distance(test, attack) | |
results['scan'] = distance(test, scan) | |
results['build'] = distance(test,build) | |
return min(results, key = lambda x: results.get(x)) | |
def distance(a,b): | |
total = 0 | |
for i in range(len(a)): |
This file contains 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
float cubeSize = 80; | |
color boxFill; | |
float rotYTarget = 0; | |
float rotXTarget = 0; | |
float rotationY = 0; | |
float rotationX = 0; | |
void setup() | |
{ | |
size(640,640, P3D); | |
//smooth(); |