<commit_before>from mrjob.job import MRJob
from mrjob.step import MRStep
from datetime import datetime

UBER_DATE_COL = 0
UBER_LAT_COL = 1
UBER_LNG_COL = 2
EVENTS = {
    'pitbull1':
        {
        'minlat': 40.679665,
        'maxlat': 40.686865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,9,9,20,0,0),
        'maxdate': datetime(2014,9,10,1,0,0)
        }
    'madonna':
        {
        'minlat': 40.669665,
        'maxlat': 40.676865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,8,9,12,0,0),
        'maxdate': datetime(2014,8,9,20,0,0)
        }
    'beyonce':
        {
        'minlat': 40.679665,
        'maxlat': 40.686865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,9,1,8,0,0),
        'maxdate': datetime(2014,9,1,12,0,0)
        }

}

def get_trip_info(line):
    f = line.split(',')
    time = f[UBER_DATE_COL]
    time = time.strip('"')
    if time == 'Date/Time':
        return None, None, None
    lat=float(f[UBER_LAT_COL])
    lng=float(f[UBER_LNG_COL])
    date_obj = datetime.strptime(time, '%m/%d/%Y %H:%M:%S')
    return date_obj, lat, lng

def check_event(date, lat, lng):
    for event, v in EVENTS.items():
        if lat > v['minlat'] and lat < v['maxlat']:<commit_msg>commas<commit_after>from mrjob.job import MRJob
from mrjob.step import MRStep
from datetime import datetime

UBER_DATE_COL = 0
UBER_LAT_COL = 1
UBER_LNG_COL = 2
EVENTS = {
    'pitbull1':
        {
        'minlat': 40.679665,
        'maxlat': 40.686865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,9,9,20,0,0),
        'maxdate': datetime(2014,9,10,1,0,0)
        },
    'madonna':
        {
        'minlat': 40.669665,
        'maxlat': 40.676865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,8,9,12,0,0),
        'maxdate': datetime(2014,8,9,20,0,0)
        },
    'beyonce':
        {
        'minlat': 40.679665,
        'maxlat': 40.686865,
        'minlng': -73.97979,
        'maxlng': -73.97259,
        'mindate': datetime(2014,9,1,8,0,0),
        'maxdate': datetime(2014,9,1,12,0,0)
        }

}

def get_trip_info(line):
    f = line.split(',')
    time = f[UBER_DATE_COL]
    time = time.strip('"')
    if time == 'Date/Time':
        return None, None, None
    lat=float(f[UBER_LAT_COL])
    lng=float(f[UBER_LNG_COL])
    date_obj = datetime.strptime(time, '%m/%d/%Y %H:%M:%S')
    return date_obj, lat, lng

def check_event(date, lat, lng):
    for event, v in EVENTS.items():
        if lat > v['minlat'] and lat < v['maxlat']:
{'fraction_non_alphanumeric': 0.1741719389653889, 'fraction_numerical': 0.11388165240044659, 'mean_word_length': 2.3308550185873607, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4958924', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1121, 'n_words': 195}