-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
44 lines (30 loc) · 900 Bytes
/
setup.py
File metadata and controls
44 lines (30 loc) · 900 Bytes
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
def create_files_day(number):
with open(f"2024/{number:02d}_input.txt", "w") as f:
f.write("")
with open(f"2024/{number:02d}_test.txt", "w") as f:
f.write("")
with open(f"2024/{number:02d}_solution.py", "w") as f:
f.write(
f"""import numpy as np
from time import time
from utils import *
def step_1(filename):
exec_time = time()
f = open(filename)
count = 0
f.close()
print("Part 1 exec time :", time() - exec_time)
return count
def step_2(filename):
exec_time = time()
f = open(filename)
count = 0
f.close()
print("Part 2 exec time :", time() - exec_time)
return count
print(step_1('2024/{number:02d}_test.txt'))
print(step_1('2024/{number:02d}_input.txt'))
print(step_2('2024/{number:02d}_test.txt'))
print(step_2('2024/{number:02d}_input.txt'))"""
)
create_files_day(25)