示例#1
0
def run(outputfile):
    cols = ['uid', 'data']
    f = open(outputfile, 'w')
    writer = DictWriter(f, cols)
    writer.writeheader()
    db = DB(dbconfig)

    for uid in fetch_users(db):
        logs = fetch_uid_app_data(uid, db)
        writer.writerow({'uid': uid, 'data': json.dumps(active_matrix(logs))})
def run(outputfile):
    cols = ['uid', 'data']
    f = open(outputfile, 'w')
    writer = DictWriter(f, cols)
    writer.writeheader()
    db = DB(dbconfig)

    for uid in fetch_users(db):
        logs = fetch_uid_app_data(uid, db)
        writer.writerow({
            'uid': uid,
            'data': json.dumps(active_matrix(logs))
        })
def app_by_uid_condition(uid):
    results = fetch_uid_app_data_with_condition(uid)
    return make_response(dumps(active_matrix(results)))
def app_by_uid(uid):
    results = fetch_uid_app_data(uid)
    return make_response(dumps(active_matrix(results)))
示例#5
0
def app_type_by_uid_condition(uid):
    results = fetch_uid_app_type_data_with_condition(uid)
    return make_response(dumps(active_matrix(results)))
示例#6
0
def app_type_by_uid(uid):
    results = fetch_uid_app_type_data(uid)
    return make_response(dumps(active_matrix(results)))