<commit_before>#This script creates fake nodes and interactions to test virus spread on



nodes = 10

for currentnode in range(1,nodes+1):
    currentfilename = "node-" + str(currentnode) + ".txt"
    currentfile =  file("moteFiles/" + currentfilename,"a")
    currentfile.write("This is node" + str(currentnode) + "\n")
    currentfile.close()


print "Finito"<commit_msg>Finished random generation code<commit_after>#This script creates fake nodes and interactions to test virus spread on

import random

nodes = 10



#move through time
for tick in range(0,30):
    print "Tick is ", tick
    interactions = {}
    for node in range(1,(nodes+1)):
        interactions[node] = []
    print interactions
    #look at nodes in turn
    for nodeA in range(1,(nodes+1)):
        print "Node A is " + str(nodeA)
        for nodeB in range(1,(nodes+1)):
            #see if node interacts
            interaction = random.randint(0,4)
            #if node interacts
            if interaction == 1:

                if nodeB not in interactions[nodeA]:
                    #mark node as interacted with for this tick
                    interactions[nodeA].append(nodeB)
                    interactions[nodeB].append(nodeA)

                    #create/access files 
                    fileAname = "node-" + str(nodeA) + ".txt"
                    fileA =  file("moteFiles/" + fileAname,"a")
                    fileBname = "node-" + str(nodeB) + ".txt"
                    fileB =  file("moteFiles/" + fileBname,"a")
                    

                    #generate random sequence and strength
                    sequence = str(random.randint(1,nodes))
                    strength = "230"
                    time = str(tick)
                    #write interaction to files
                    fileA.write(str(nodeB) + " " + sequence + " " + strength + " " + sequence + " " + time + "\n")
                    fileB.write(str(nodeA) + " " + sequence + " " + strength + " " + sequence + " " + time + "\n")
                    
                
            
                    fileA.close()
                    fileB.close()

    
{'fraction_non_alphanumeric': 0.11012183692596064, 'fraction_numerical': 0.010309278350515464, 'mean_word_length': 1.6293103448275863, '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': '5499033', 'n_tokens_mistral': 599, 'n_tokens_neox': 560, 'n_words': 160}