I hereby claim:
- I am r on github.
- I am raffi (https://keybase.io/raffi) on keybase.
- I have a public key whose fingerprint is B262 7921 28F9 D515 ACED 1781 F4FC 2692 B6C6 98A5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from twisted.internet import reactor, task | |
from twisted.internet.protocol import Factory, Protocol | |
from twisted.internet.endpoints import TCP4ClientEndpoint | |
import re | |
class PlexKiwi(Protocol): | |
def connectionMade(self): | |
self.initializeConnection() | |
testMode = '' |
I hereby claim:
To claim this, I am signing this object:
set default_parallel 10; | |
register 'lib/jython.jar'; | |
register 's3://tumo/scripts/date.py' using jython as datefunctions; | |
tweets = load 's3://tumo/input/twitter*.tsv' using PigStorage as (tweet_id:long, created_at:chararray, user_id:long, text:chararray, in_reply_to_status_id:long, retweet_tweet_id:long, retweet_created_at:chararray, retweet_user_id:long, retweet_text:chararray, latitude:double, longitude:double); | |
limited_tweets = limit tweets 10; | |
millisecond_tweets = foreach limited_tweets generate tweet_id, datefunctions.dateToMillis(created_at); | |
describe millisecond_tweets; |
var http = require("http"); | |
var url = require("url"); | |
function writeResponse(response, code, text) { | |
response.writeHead(code, {"Content-Type": "text/plain"}); | |
response.write(text); | |
response.end(); | |
} | |
function index(response) { |
// npm install twitter <- requirement | |
CONSUMER_KEY = ''; | |
CONSUMER_SECRET = ''; | |
ACCESS_TOKEN_KEY = ''; | |
ACCESS_TOKEN_SECRET = ''; | |
NUMBER_TWEETS_DOWNLOAD = 5000; | |
OUTPUT_FILE = 'twitter.tsv'; |
# run the 'host' command, but timeout after 30 seconds. | |
# | |
# args: | |
# - parameter to pass to 'host' | |
# - file to send output of 'host' to | |
# | |
# returns: | |
# 1 => lookup timedout | |
# 0 => successful run | |
function timeout_host() { |
register /home/raffi/appprofiler/commons-lang-2.5.jar; | |
register /home/raffi/appprofiler/scala-library.jar; | |
register /home/raffi/appprofiler/appprofiler_2.7.7-1.0.jar; | |
test_data = load 'test.tsv' as (first, second); | |
distances = foreach test_data { | |
distance = com.twitter.appprofiler.pig.piggybank.LevenshteinDistance(first, second); | |
generate distance, first, second; | |
}; |
package com.twitter.appprofiler.pig.piggybank | |
import org.apache.commons.lang.StringUtils | |
import org.apache.pig.{EvalFunc, FuncSpec, PigWarning} | |
import org.apache.pig.backend.executionengine.ExecException | |
import org.apache.pig.data.{DataByteArray, Tuple} | |
import java.io.IOException | |
import java.util.{List => JList} |
package com.twitter.appprofiler.pig.piggybank; | |
import org.apache.commons.lang.StringUtils; | |
import org.apache.pig.EvalFunc; | |
import org.apache.pig.PigWarning; | |
import org.apache.pig.backend.executionengine.ExecException; | |
import org.apache.pig.data.DataByteArray; | |
import org.apache.pig.data.Tuple; | |
import java.io.IOException; |