Made an algorithm to generate data (treeData.py)
This commit is contained in:
parent
d2d7a98a84
commit
7c7a485d6b
9216
Data/dataTree.csv
9216
Data/dataTree.csv
File diff suppressed because it is too large
Load Diff
87
treeData.py
Normal file
87
treeData.py
Normal file
@ -0,0 +1,87 @@
|
||||
tab = []
|
||||
def iter(odp, i):
|
||||
if i == 0:
|
||||
j = ""
|
||||
for k in range(0, 101, 28):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 1:
|
||||
j = ""
|
||||
for k in range(0, 101, 28):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 2:
|
||||
j = ""
|
||||
for k in range(2):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 3:
|
||||
j = ""
|
||||
for k in range(0, 101, 34):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 4:
|
||||
j = ""
|
||||
for k in range(0, 101, 40):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 5:
|
||||
j = ""
|
||||
for k in range(0, 4, 2):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 6:
|
||||
j = ""
|
||||
for k in range(0, 4, 2):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 7:
|
||||
j = ""
|
||||
for k in range(0, 4, 2):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 8:
|
||||
j=""
|
||||
for k in range(4):
|
||||
odp += f"{k},"
|
||||
odp = iter(odp, i + 1)
|
||||
j = str(k)
|
||||
odp = odp[:-(len(j) + 1)]
|
||||
return odp
|
||||
if i == 9:
|
||||
global licznik
|
||||
x = odp.split(",")
|
||||
if (int(x[0]) > 60 or int(x[1]) > 90 or int(x[2]) == 1 or int(x[3]) > 70 or int(x[4]) <= 10 or int(x[5]) == 0 or int(x[5]) == 4 or int(x[6]) == 2 or int(x[6]) == 3 or int(x[7]) == 0 or int(x[8]) == 1):
|
||||
odp += "0"
|
||||
else:
|
||||
odp += "1"
|
||||
print(odp)
|
||||
tab.append(odp)
|
||||
licznik += 1
|
||||
return odp[:-1]
|
||||
|
||||
iter("", 0)
|
Loading…
Reference in New Issue
Block a user