<commit_before>from fabric.api import env, run, path

tables_options = {
    'lineitem' : 'L',
    'customers' : 'c',
    'nation' : 'n',
    'orders' : 'O',
    'parts' : 'P',
    'region' : 'r',
    'suppliers' : 's',
    'partsupp' : 'S'
}

def dbgen(sf=1, table="lopsc"):
    if not table:
       table = tables_options[table]
    chunks = len(env.hosts)
    if chunks > 0:
        chunk = env.hosts.index(env.host)
    else: chunk = 0
    print "Scale Factor = ", sf
    print "Chunks = ", chunks
    print "Chunk = ", chunk
    print "Table = ", table
    with path("~/tpch-kit/tpch/tpch_2_17_0/dbgen"):
        dbgen_exec = "./dbgen -f -s {sf} -C {chunks} " \
                     "-S {chunk} -T {tbl}".format(sf=sf, chunks=chunks, chunk=chunk, tbl=table)
        print dbgen_exec
        #run(dbgen_exec)


def install():
    with path(" cd ~/"):
        run("git clone https://github.com/alexpap/tpch-kit.git")

def update():
    with path(" cd ~/"):
        run("git pull")

def unistall():
    with path(" cd ~/"):
        run("rm -rf tpch-kit")<commit_msg>update fabfile<commit_after>from fabric.api import env, run, path

tables_options = {
    'lineitem' : 'L',
    'customers' : 'c',
    'nation' : 'n',
    'orders' : 'O',
    'parts' : 'P',
    'region' : 'r',
    'suppliers' : 's',
    'partsupp' : 'S'
}

def dbgen(sf=1, table="lopsc"):
    if not table:
       table = tables_options[table]
    chunks = len(env.hosts)
    if chunks > 0:
        chunk = env.hosts.index(env.host)
    else: chunk = 0
    print "Scale Factor = ", sf
    print "Chunks = ", chunks
    print "Chunk = ", chunk
    print "Table = ", table
    with path("~/tpch-kit/tpch/tpch_2_17_0/dbgen"):
        dbgen_exec = "./dbgen -f -s {sf} -C {chunks} " \
                     "-S {chunk} -T {tbl}".format(sf=sf, chunks=chunks, chunk=chunk, tbl=table)
        print dbgen_exec
        #run(dbgen_exec)


def install():
    with path(" cd ~/"):
        run("git clone https://github.com/alexpap/tpch-kit.git")

def update():
    with path(" cd ~/tpch-kit"):
        run("git pull")

def unistall():
    with path(" cd ~/"):
        run("rm -rf tpch-kit")
{'fraction_non_alphanumeric': 0.1822843822843823, 'fraction_numerical': 0.006526806526806527, 'mean_word_length': 2.2763358778625955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1290510', 'n_tokens_mistral': 815, 'n_tokens_neox': 803, 'n_words': 193}