def run_job_with_params(repo, job_params):
    drop_all_collections(repo)
    store_json(repo, 'nikolaj.params', job_params)

    storeT.run()
    storeBus.run()
    combine_t_bus.run()
    geoagg.run()
    pagerank.run()
def run_job_with_params(repo, job_params):
    drop_all_collections(repo)
    store_json(repo, 'nikolaj.params', job_params)

    storeT.run()
    storeBus.run()
    combine_t_bus.run()
    geoagg.run()
    pagerank.run()
Beispiel #3
0
def run_job_with_params(repo, job_params, doc):
    drop_derived_collections(repo)
    store_json(repo, 'nikolaj.params', job_params)
    startTime, _, endTime = geoagg.run()
    doc.update(geoagg.to_prov(startTime, endTime, job_params[0]))
    startTime, _, endTime = pagerank.run()
    doc.update(pagerank.to_prov(startTime, endTime, job_params[1]))
def run_job_with_params(repo, job_params, doc):
    drop_derived_collections(repo)
    store_json(repo, 'nikolaj.params', job_params)
    startTime, _, endTime = geoagg.run()
    doc.update(geoagg.to_prov(startTime, endTime, job_params[0]))
    startTime, _, endTime = pagerank.run()
    doc.update(pagerank.to_prov(startTime, endTime, job_params[1]))
Beispiel #5
0
if os.path.isfile("Exp-Result.txt"):
    os.remove("Exp-Result.txt")

mapMax = 0.0
for r in replacement:
    parameter = fileinput.input('parameter.txt', inplace=1)
    for i, line in enumerate(parameter):
        sys.stdout.write(line.replace(initial, r))
    print r
    parameter.close()
    initial = r
    parameter = open('parameter.txt', 'r')
    writeFile(parameter.read())
    parameter.close()

    pagerank.run()

    result = os.popen('''
        perl -e '
            use LWP::Simple;
            my $fileIn = "../data/result.txt";
            my $url = "http://nyc.lti.cs.cmu.edu/classes/11-741/s16/HW/HW3/upload.cgi";
            my $ua = LWP::UserAgent->new();
            my $result = $ua->post($url,
                   Content_Type => "form-data",
                   Content => [ logtype => "Summary", infile => [$fileIn] ]);
            my $result = $result->as_string;
            $result =~ s/<BR>/\n/g;
            print $result;'
        ''').read()
    result = result.splitlines()