Ejemplo n.º 1
0
def test():
    csv_list1 = csvhelper.csv_parser("./data/AppUsage.csv")
    # dupllicate_tuple_app_usage(csv_list1)
    # print format_time_app_usage(csv_list1[5][1])
    # print_table(std_table_app_usage(csv_list1))

    print '-----------------------------------------'
    csv_list2 = csvhelper.csv_parser("./data/event_logger.csv")
    # dupllicate_tuple_logger(csv_list2)
    # print format_time_event_logger(csv_list2[5][1])
    # print_table(std_table_event_logger(csv_list2))

    csv_list3 = csvhelper.csv_parser("./data/sss2.xml.csv")
    # dupllicate_tuple_pro(csv_list3)
    # print format_time_hn(csv_list3[5][4])
    # print replace_table()
    cc = stdtable.std_table_pro(csv_list3)
    # print_table(cc)

    std = stdtable.get_standard_table(
        stdtable.std_table_app_usage(csv_list1),
        stdtable.std_table_event_logger(csv_list2),
        stdtable.std_table_pro(csv_list3))
    # print_std_table(std)
    sort_std = stdtable.sort_std_table(std)
    table_manager.print_table(sort_std)
    # csvhelper.export(sort_std, "hello2.csv", 'app name, app name[type], screen_status, time_date, time_seconds, duration_sec, type')

    # print csv_list
    print "--------------"
Ejemplo n.º 2
0
def test():
    csv_list1 = csvhelper.csv_parser("./data/AppUsage.csv")
    # dupllicate_tuple_app_usage(csv_list1)
    # print format_time_app_usage(csv_list1[5][1])
    # print_table(std_table_app_usage(csv_list1))

    print '-----------------------------------------'
    csv_list2 = csvhelper.csv_parser("./data/event_logger.csv")
    # dupllicate_tuple_logger(csv_list2)
    # print format_time_event_logger(csv_list2[5][1])
    # print_table(std_table_event_logger(csv_list2))


    csv_list3 = csvhelper.csv_parser("./data/sss2.xml.csv")
    # dupllicate_tuple_pro(csv_list3)
    # print format_time_hn(csv_list3[5][4])
    # print replace_table()
    cc= stdtable.std_table_pro(csv_list3)
    # print_table(cc)

    std = stdtable.get_standard_table(stdtable.std_table_app_usage(csv_list1), stdtable.std_table_event_logger(csv_list2),stdtable.std_table_pro(csv_list3))
    # print_std_table(std)
    sort_std = stdtable.sort_std_table(std)
    table_manager.print_table(sort_std)
    # csvhelper.export(sort_std, "hello2.csv", 'app name, app name[type], screen_status, time_date, time_seconds, duration_sec, type')

    # print csv_list
    print "--------------"
Ejemplo n.º 3
0
def time_test():
    path = "./data/6.1/"
    date = "2016-06-01"
    csv_list1 = csvhelper.csv_parser(path + "test.csv")
    csv_list2 = csvhelper.csv_parser(path + "AppUsage_test.csv")
    std1 = stdtable.std_table_saver(csv_list1)
    std = stdtable.std_table_app_usage(csv_list2)
    # std = stdtable.get_standard_table(std2, [], std1)

    sort_std = stdtable.sort_std_table(std)
    sort_std = stdtable.slice_by_time(sort_std, date)
    sort_std = stdtable.sort_by_appname(sort_std)

    table_manager.print_table(sort_std)
Ejemplo n.º 4
0
def time_test():
    path = "./data/6.1/"
    date = "2016-06-01"
    csv_list1 = csvhelper.csv_parser(path+"test.csv")
    csv_list2 = csvhelper.csv_parser(path+"AppUsage_test.csv")
    std1 = stdtable.std_table_saver(csv_list1)
    std = stdtable.std_table_app_usage(csv_list2)
    # std = stdtable.get_standard_table(std2, [], std1)

    sort_std = stdtable.sort_std_table(std)
    sort_std = stdtable.slice_by_time(sort_std, date)
    sort_std = stdtable.sort_by_appname(sort_std)

    table_manager.print_table(sort_std)
Ejemplo n.º 5
0
def test2():
    csv_list = csvhelper.csv_parser("./data/6.1/saver.csv")
    table_manager.dupllicate_tuple_saver(csv_list, True)
Ejemplo n.º 6
0
def test1():
    csv_list1 = csvhelper.csv_parser("./data/AppUsage.csv")
    std = stdtable.std_table_app_usage(csv_list1)
    table_manager.print_table(std)
    table_manager.print_table(stdtable.count_application(std))
Ejemplo n.º 7
0
def getRawDataSet(data_path):
    csv_list1 = csvhelper.csv_parser(data_path + "AppUsage.csv")
    csv_list2 = csvhelper.csv_parser(data_path + "event_logger.csv")
    csv_list3 = csvhelper.csv_parser(data_path + "saver.csv")
    return csv_list1, csv_list2, csv_list3
Ejemplo n.º 8
0
def test2():
    csv_list = csvhelper.csv_parser("./data/6.1/saver.csv")
    table_manager.dupllicate_tuple_saver(csv_list, True)
Ejemplo n.º 9
0
def test1():
    csv_list1 = csvhelper.csv_parser("./data/AppUsage.csv")
    std = stdtable.std_table_app_usage(csv_list1)
    table_manager.print_table(std)
    table_manager.print_table(stdtable.count_application(std))
Ejemplo n.º 10
0
def getRawDataSet(data_path):
    csv_list1 = csvhelper.csv_parser(data_path+"AppUsage.csv")
    csv_list2 = csvhelper.csv_parser(data_path+"event_logger.csv")
    csv_list3 = csvhelper.csv_parser(data_path+"saver.csv")
    return csv_list1, csv_list2, csv_list3