<commit_before>import string, subprocess
from multiprocessing import Pool

pl_hosts = [line.split(' ')[0] for line in map(string.strip,open('../king/pl-host-list-geo').readlines())]

def get_db(host):
    file_name = 'gQuery_%s.db' % host

    cp = ["ssh", "-t", "-i", "~/.ssh/id_rsa", "-o StrictHostKeyChecking no",
          "-o UserKnownHostsFile=/dev/null", "ucb_268_measure@%s" % host,
          "sudo cp /root/%s ~/" % file_name]

    rsync = 'rsync -a -v -e ssh -z --progress ucb_268_measure@%s:%s .' % (host, file_name)

    print cp
    print rsync

    subprocess.call(cp)
    subprocess.call(rsync, shell=True)

p = Pool(10)
p.map(get_db, pl_hosts)<commit_msg>added command for partial transer<commit_after>import string, subprocess
from multiprocessing import Pool

pl_hosts = [line.split(' ')[0] for line in map(string.strip,open('../king/pl-host-list-geo').readlines())]

def get_db(host):
    file_name = 'gQuery_%s.db' % host

    cp = ["ssh", "-t", "-i", "~/.ssh/id_rsa", "-o StrictHostKeyChecking no",
          "-o UserKnownHostsFile=/dev/null", "ucb_268_measure@%s" % host,
          "sudo cp /root/%s ~/" % file_name]

    rsync = 'rsync -a -v -e ssh -z --progress --partial ucb_268_measure@%s:%s .' % (host, file_name)

    print cp
    print rsync

    subprocess.call(cp)
    subprocess.call(rsync, shell=True)

p = Pool(10)
p.map(get_db, pl_hosts)
{'fraction_non_alphanumeric': 0.17638483965014579, 'fraction_numerical': 0.013119533527696793, 'mean_word_length': 3.3176100628930816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3570813', 'n_tokens_mistral': 559, 'n_tokens_neox': 520, 'n_words': 118}