Ejemplo n.º 1
0
def run(manager_params):
    """ Post-processing tasks to run after TaskManager finishes """
    print "Starting post-processing tasks..."

    db_path = manager_params['database_name']
    build_http_cookie_table(db_path)  # Parse HTTP Cookies
        #elif 'US' in name:
        #    loc = 'us/'
        #else:
        #    print "Only makes sense to run this analysis for JP or IE"
        #    return
        #if random_order:
        #    cPickle.dump((x, y, num_samples), open('../data/'+loc+'random/'+name+'_'+str(crawl_id)+'.pkl', 'wb'))
        #else:
        #    cPickle.dump((x, y, num_samples), open('../data/'+loc+'sequential/'+name+'_'+str(crawl_id)+'.pkl', 'wb'))

    # Temporary analysis
    conf_int(percents)
    conf_int(leaks)

def conf_int(samples):
    n, min_max, mean, var, skew, kurt = stats.describe(samples)
    conf_interval = stats.t.interval(0.95,len(samples)-1, loc=mean, scale=math.sqrt(var)/math.sqrt(len(samples))) 
    print "Average = " + str(mean)
    print "Error = " + str(conf_interval[1] - mean)

if __name__ == '__main__':
    import sys
    import data
    DB = sys.argv[1]
    print "Processing DB: " + DB
    
    # Make sure this db has http_cookie table
    build_http_cookie_table(DB)
    
    generate_samples(DB, data.id_cookies_path, random_order=True)
Ejemplo n.º 3
0
def run(db_path):
    """ Post-processing tasks to run after TaskManager finishes """
    print "Starting post-processing tasks..."

    build_http_cookie_table(db_path)  # Parse HTTP Cookies
Ejemplo n.º 4
0
def run(db_path):
    """ Post-processing tasks to run after TaskManager finishes """
    print "Starting post-processing tasks..."
    
    build_http_cookie_table(db_path) # Parse HTTP Cookies
Ejemplo n.º 5
0
def run(manager_params):
    """ Post-processing tasks to run after TaskManager finishes """
    print "Starting post-processing tasks..."

    db_path = manager_params['database_name']
    build_http_cookie_table(db_path) # Parse HTTP Cookies