-
Notifications
You must be signed in to change notification settings - Fork 0
/
junk.py
77 lines (68 loc) · 5.02 KB
/
junk.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import random
import string
def junk(code):
newcode = "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
newcode += code + "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
return newcode
with open("Creal.py", "a") as f:
f.write(junk(""))
def junk(code):
newcode = "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
newcode += code + "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
return newcode
with open("Creal.py", "a") as f:
f.write(junk(""))
def junk(code):
newcode = "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
newcode += code + "\n"
classes = ["".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(2, 5))]
for i in classes:
newcode += f"class {i}:\n def __init__(self):\n"
funcs = ["__"+"".join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(8, 20))) for i in range(random.randint(5, 15))]
for i in funcs:
newcode += f" self.{i}()\n"
for i in funcs:
newcode += f" def {i}(self, {', '.join([''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase) for i in range(random.randint(5, 20))) for i in range(random.randint(1, 7))])}):\n return self.{random.choice(funcs)}()\n"
return newcode
with open("Creal.py", "a") as f:
f.write(junk(""))