Esempio n. 1
0
def clusterFromFile(path):
	ct = ClusterTool()
	ct.loadGraph(path)
	ct.g.buildClusters()
	ct.saveClusters(path)
Esempio n. 2
0
	ct = ClusterTool()
	ct.loadGraph(path)
	ct.g.buildClusters()
	ct.saveClusters(path)

###################################################################################################

start = time.time()

#thresholds = (20, 50, 100, 250)
thresholds = list()
#thresholds.append(100)
for threshold in thresholds:
	accounts = loadAccounts(filename)
	seeds = findSeeds(accounts, threshold)
	ct = ClusterTool(seeds)
	ct.addAccountList(accounts)
	
	ct.buildGraph(False, 20)
	path = out_path + str(threshold) + "IPS/"
	ct.saveGraph(path)
	
	del ct
	print ""
	print "Graph for threshold %d built and saved in %d seconds" %(threshold, time.time() - start)
	print ""
		
path = out_path + "100IPS/"
clusterFromFile(path)	
	
print "Script finished in %d seconds" %(time.time() - start)