A glass user sends a question with an optional location (sent if their question starts with "where") and option picture. @glassask multiplexes many glass users and this is invisible to annotators (not necessarily true that the same glass user is posting the tweets). When a reply is made from twitter it is parsed (see Tweet parsing below) and sent to the originating user's glass (i.e., whoever asked the question).
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
Include paths | |
C:\Users\Administrator\Desktop\picarus-deps\pthreads\include;C:\Users\Administrator\Desktop\picarus-deps\fftw3;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\videostab;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\world\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\video\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\ts\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\superres\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\stitching\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\python\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\ocl\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\nonfree\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\legacy\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\java\include;C:\Users\Administrator\Desktop\picarus-deps\opencv\modules\photo\include;C:\Users\Administrat |
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
import sklearn.svm | |
import random | |
import numpy as np | |
if 0: | |
import kernels | |
kernel = kernels.histogram_intersection | |
else: | |
kernel = lambda x, y: np.dot(x, y.T) |
Undocumented changes in 1.0 of @backbone_js
1. fetch calls 'sync' event where before it would call 'reset'. https://github.com/documentcloud/backbone/blob/0.9.10/backbone.js#L414 https://github.com/documentcloud/backbone/blob/master/backbone.js#L429
2. success callback, takes one arg and not three. Trouble if you override sync. https://github.com/documentcloud/backbone/blob/0.9.10/backbone.js#L417 https://github.com/documentcloud/backbone/blob/master/backbone.js#L433
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
# Closures + Generators: Check yourself before you wreck yourself | |
def outer(): | |
for x in range(10): | |
a = x | |
def inner(): | |
print(a) | |
yield inner | |
# Sequential call, can't tell anything is wrong |
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
import os | |
import re | |
import urllib | |
def data_source_from_uri(data_source_path): | |
try: | |
data_source_path, query_string = data_source_path.split('?', 1) | |
except ValueError: | |
columns = {} |
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
import hadoopy | |
def mapper(key, value): | |
# Split line into words | |
for word in value.split(): | |
yield word, 1 | |
def reducer(key, values): | |
yield key, sum(values) |
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 gevent import monkey, spawn, joinall | |
monkey.patch_all() # Magic! | |
import re, requests, random | |
URLS = set(['http://umd.edu', 'http://nytimes.com']) | |
def crawl(urls): | |
try: | |
while True: | |
url = random.choice(list(urls)) | |
URLS.add(url) | |
print(url) |
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
python zmq_client_sub.py & | |
python zmq_client_sub.py & | |
python zmq_server_pub.py |
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
http://wiki.apache.org/hadoop/Hbase/PerformanceEvaluation |