chore: tooling

This commit is contained in:
setop 2024-12-26 00:39:32 +01:00
parent 5700e7d1e1
commit 6081f917c0
4 changed files with 29 additions and 1 deletions

2
.tool-versions Normal file
View File

@ -0,0 +1,2 @@
python pypy3.10-7.3.12
gleam 1.4.1

View File

@ -4,7 +4,7 @@ cd "$(dirname $(realpath $0))"
. .env . .env
d=$(date +%d) d=${1-$(date +%d)}
e=$(bc <<< "$d + 0") e=$(bc <<< "$d + 0")
mkdir -p d${d} mkdir -p d${d}
@ -19,4 +19,6 @@ cd d${d}
-o input \ -o input \
"https://adventofcode.com/2024/day/$e/input" "https://adventofcode.com/2024/day/$e/input"
cp ../starter.py part1.py
echo $(realpath .) echo $(realpath .)

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
numpy

23
starter.py Normal file
View File

@ -0,0 +1,23 @@
import sys
from grid import *
from collections import defaultdict as DD
from collections import Counter as CT
from collections import deque as DQ
from functools import cmp_to_key as ck
from functools import cache
from itertools import combinations as comb
from itertools import product as prod
from itertools import cycle
E = enumerate
I = sys.stdin.read().strip().split('\n')
#G = [list(l) for l in I.split('\n')]
#W, H = grid_geom(G)
ans = 0
for i,x in E(I):
print(i,x)
print(ans)