<commit_before>

'''
    
    An interface for adapting Oak Park data.
    
'''
import sys
sys.path.append('../')

import disaggregator.OakParkDatasetAdapter as opdsa
import disaggregator.utils as utils

print "Hello! Ready to get your hands on some Oak Park data? I'm sure you said yes, just hold tight..."

db = opdsa.get_db_connection()

homes = opdsa.get_homes(db)

dataids = homes.keys()

print "Here are the homes you can see:\n"

for di in dataids:
    print di

home=raw_input("Which one do you want a trace of?\n")

print "OK hold on"

trace = opdsa.generate_trace_by_dataid(homes,home)

print_permission = raw_input("Would you like to see it? Enter yes or no\n")

if print_permission=='yes':
    print trace

pickle_permission = raw_input("Would you like a pickle with that? Enter yes or no\n")

if pickle_permission=='yes':
    utils.pickle_object(trace,'{}'.format(home))
else:
    print "Okie Doke, thanks for coming, check back in for sets and stuff!"<commit_msg>commiting<commit_after>

'''
    
    An interface for adapting Oak Park data.
    
'''
import sys
sys.path.append('../')

import disaggregator.OakParkDatasetAdapter as opdsa
import disaggregator.utils as utils

print "Hello! Ready to get your hands on some Oak Park data? I'm sure you said yes, just hold tight..."

db = opdsa.get_db_connection()

homes = opdsa.get_homes(db)

dataids = homes.keys()

print "Here are the homes you can see:\n"

for di in dataids:
    print di

home=raw_input("Which one do you want a trace of?\n")

print "OK hold on"

trace = opdsa.generate_trace_by_dataid(homes,home)

print_permission = raw_input("Would you like to see it? Enter yes or no\n")

if print_permission=='yes':
    print trace

pickle_permission = raw_input("Would you like a pickle with that? Enter yes or no\n")

if pickle_permission=='yes':
    utils.pickle_object(trace,'{}'.format(home))
else:
    print "Ok<NAME>, thanks for coming, check back in for sets and stuff!\npysch"
    print "here is a resampled trace"

print trace.resample('MS').series

{'fraction_non_alphanumeric': 0.10591133004926108, 'fraction_numerical': 0.0, 'mean_word_length': 4.1158690176322414, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '631504', 'n_tokens_mistral': 691, 'n_tokens_neox': 676, 'n_words': 240}