if not outname: #outname = 'orkut-2k_sym.big_graph' print 'Error: second argument missing, output filename!' exit(-1) links = len(sys.argv) > 3 and sys.argv[3] or None if not links: #links = 2000 print 'Error: third argument missing, max number of links!' exit(-1) else: links = int(links) graph = BigGraph(outname) graph.debug = True graph.input_debug_links = 200000 graph.output_debug_nodes = 10000 graph.max_links_input = links graph.max_nodes_analysis = 10000 graph.load_edgelist(open(filename)) graph.create_indices() print 'output Graph (possibly disconnected):' print 'nodes = %d' % graph.number_of_nodes() print 'edges = %d' % graph.number_of_edges()
graphs = [] list_of_strategies = [] results = 0 for strat_name in strats: for l in lookaheads: new_filename = filename + '.%s.lookahead%d' % (strat_name, l) graph = BigGraph(new_filename, cache_size_pages) max_effort = graph.number_of_nodes() * max_effort_fraction # graph.debug = debug graph.input_debug_links = 200000 graph.output_debug_nodes = 10000 graph.max_links_input = 1 * 10**8 graph.max_nodes_analysis = 100000000 print 'PrivacyAttackStrategies with %s ...' % new_filename strategies = PrivacyAttackStrategies(graph, l, coverage_funcs, debug) strategies.node_rand_seed = node_rand_seed strat = eval('strategies.%s' % strat_name) p = Process(target=run, args=(q, strat, coverages, coverage_funcs, max_effort)) p.start() processes.append(p) graphs.append(graph) list_of_strategies.append(strategies)