-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGenerator_Data.py
43 lines (36 loc) · 1.47 KB
/
Generator_Data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import random
random.seed(702140)
n=30000000
List_Nicknames=["Assi","Aggy","Ben","Bob","Bully" ,"Cobra","Cats Eyes" ,"Cloudy",
"Dolfo" ,"Dutch","Eagle", "Fish","Fighter","Gabby" ,"Hoppy" ,"Hamish" ,"Igo" ,
"Jake","Johnny","Kinch" ,"Lock","Mick","Mouse" ,"Pancho" ,"Pete","Red",
"Sandy" ,"Soaad","Tex" ,"Tim" ,"Vanyish","Wop","Uncle","Wolverine","Yola"]
List_Loc=["Uptown","MidTown","DownTown","Sheal","PettsBurg","South Hinkley"]
ListID=[]
for i in range(0,n):
ListID.append(i+1)
with open('generated_data_sorted.csv', 'w', newline='') as csvfile:
csvfile.write("ID" + ';')
csvfile.write("Nickname" + ';')
csvfile.write("Location" + ';')
csvfile.write("Level of Trust" + ';')
csvfile.write('\n')
for i in range(0,n):
csvfile.write(str(ListID[i]) + ';')
csvfile.write(random.choice(List_Nicknames) + ';')
csvfile.write(random.choice(List_Loc) + ';')
csvfile.write(str(random.randint(1, 10)) + ';')
csvfile.write('\n')
random.shuffle(ListID)
with open('generated_data.csv', 'w', newline='') as csvfile:
csvfile.write("ID" + ';')
csvfile.write("Nickname" + ';')
csvfile.write("Location" + ';')
csvfile.write("Level of Trust" + ';')
csvfile.write('\n')
for i in range(0,n):
csvfile.write(str(ListID[i]) + ';')
csvfile.write(random.choice(List_Nicknames) + ';')
csvfile.write(random.choice(List_Loc) + ';')
csvfile.write(str(random.randint(1, 10)) + ';')
csvfile.write('\n')