Setup for 2025

This commit is contained in:
2025-12-13 20:27:47 -05:00
parent c9145e6106
commit c15002e581
4 changed files with 14 additions and 1 deletions

5
2025/d01.py Normal file
View File

@@ -0,0 +1,5 @@
from lib import get_data
data = get_data(__file__)
print(data)

1
2025/lib.py Symbolic link
View File

@@ -0,0 +1 @@
../lib.py

View File

@@ -317,3 +317,10 @@ and focus. Of course, learning more algorithms and techniques helps.
- Day 24: `15:57:01 17307 0 >24h 11326 0` - Day 24: `15:57:01 17307 0 >24h 11326 0`
- Day 25: `10:41:54 14140 0 >24h 13631 0` - Day 25: `10:41:54 14140 0 >24h 13631 0`
## AoC 2025
Only twelve problems and no leaderboard this year. That means life will be less
stressful and this will actually be more fun. Thanks :)
- Day 1:

2
lib.py
View File

@@ -276,7 +276,7 @@ def extract_year_and_date(scriptname) -> tuple[str, str]:
def get_data(filename): def get_data(filename):
path, file = os.path.split(filename) path, file = os.path.split(filename)
year = path[-4:] year = path[-4:]
day = file.replace("d", "").replace(".py", "") day = file.replace("d0", "").replace("d", "").replace(".py", "")
txt_file = f"d{day}.txt" txt_file = f"d{day}.txt"
if os.path.isfile(txt_file): if os.path.isfile(txt_file):