# Path: hose_util.py
# def iterate(raw=False, filters=True):
# def lookup(myjson, k):
# def parse_date(twitter_lame_datetime_string):
# def get_date(myjson_object):
# def ws_norm(s):
# def unicodify(s, encoding='utf8', *args):
# def stringify(s, encoding='utf8', *args):
# def tabjoin(*args):
# def uniq_c(seq):
# def commaize(num):
# WS = re.compile(r'[ \t\r\n]+', re.U)


import sys,os,re
import twokenize
from hose_util import lookup, iterate, json
#!/usr/bin/env python
"""
Filter Streaming API tweets on geolocation and some other stuff 
(follower/ing counts, retweets)

Brendan O'Connor (brenocon.com)
"""
#sys.path.insert(0,'/h/brendano/proc')
#sys.path.insert(0,'/mal1/brendano/twi/twproc/proc')
#sys.path.insert(0, os.path.join(os.path.dirname(__file__),'../nlp'))

OneCoord = r'([-+]?\d{1,3}\.\d{3,})'
Separator= r', ?'
LatLong = re.compile(OneCoord + Separator + OneCoord, re.U)

for raw,tweet in iterate(raw=True):

# Path: hose_util.py
# def iterate(raw=False, filters=True):
# def lookup(myjson, k):
# def parse_date(twitter_lame_datetime_string):
# def get_date(myjson_object):
# def ws_norm(s):
# def unicodify(s, encoding='utf8', *args):
# def stringify(s, encoding='utf8', *args):
# def tabjoin(*args):
# def uniq_c(seq):
# def commaize(num):
# WS = re.compile(r'[ \t\r\n]+', re.U)


# Path: geo_filter.py
import sys,os,re
import twokenize
from hose_util import lookup, iterate, json

#!/usr/bin/env python
"""
Filter Streaming API tweets on geolocation and some other stuff 
(follower/ing counts, retweets)

Brendan O'Connor (brenocon.com)
"""
#sys.path.insert(0,'/h/brendano/proc')
#sys.path.insert(0,'/mal1/brendano/twi/twproc/proc')
#sys.path.insert(0, os.path.join(os.path.dirname(__file__),'../nlp'))

OneCoord = r'([-+]?\d{1,3}\.\d{3,})'
Separator= r', ?'
LatLong = re.compile(OneCoord + Separator + OneCoord, re.U)

for raw,tweet in iterate(raw=True):

  source = lookup(tweet, 'source')