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
class CVExtras { | |
PImage pImage; | |
int[] hist = new int[256]; // Raw Pixel Counts | |
double[] histN = new double[256]; // Pixel Percentages (Normalized) | |
double entropy; | |
CVExtras(PImage img) { | |
for (int i = 0; i < 256; i++) { | |
this.hist[i] = 0; | |
this.histN[i] = 0.0; |
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
#!/usr/bin/env python | |
# This is a simple Twitter bot which listens to a track stream for a comma delimited | |
# list of terms/tags (PRIMARY_TRACK_LIST). From this stream, it will retweet any | |
# tweet that matches the secondary regex (SECONDARY_REGEX_FILTER). | |
# | |
# This example is a #Haiti & #Chile Twitter stream listener for TweakTheTweet syntax. | |
# | |
# Requires Python 2.6 | |
# Requires Tweepy http://github.com/joshthecoder/tweepy | |
# |
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
// Assuming 'response' is the source of a You Tube video page, this will get the flv url | |
var vid = id.substring(3); | |
var r = response; | |
var doc = r.substring(r.indexOf(".swf?video_id=")); | |
var tpoint = r.indexOf("&t="); | |
var doc = r.substring(tpoint, r.indexOf("\"", tpoint)); | |
var url = "http://youtube.com/get_video.php?video_id="; | |
url += vid + doc; |
NewerOlder