advent-of-code/python/2023/README.org

47 lines
920 B
Org Mode
Raw Normal View History

2023-12-01 11:43:15 -05:00
* Advent of Code Python
2023-12-01 12:53:26 -05:00
** Day 1
#+begin_src shell
source ~/virtualenvs/aoc-2023/bin/activate
cd ~/git/advent-of-code/python/2023
python src/andy_aoc_2023/day1.py src/andy_aoc_2023/day1_big
#+end_src
*** Answers
54573
54591
2023-12-02 11:05:05 -05:00
** Day 2
#+begin_src shell
source ~/virtualenvs/aoc-2023/bin/activate
cd ~/git/advent-of-code/python/2023
python src/andy_aoc_2023/day2.py src/andy_aoc_2023/day2_big
#+end_src
*** Answers
2600
86036
2023-12-04 11:13:18 -05:00
** Day 4
#+begin_src shell
source ~/virtualenvs/aoc-2023/bin/activate
cd ~/git/advent-of-code/python/2023
python src/andy_aoc_2023/day4.py src/andy_aoc_2023/day4_big
#+end_src
Warning: Part 2 is a little slow
#+begin_src shell
~/bin/avg-time 5 python src/andy_aoc_2023/day4.py src/andy_aoc_2023/day4_big
real 8.994000
user 8.982000
sys 0.008000
#+end_src
2023-12-04 11:28:43 -05:00
where =avg-time= is [[https://stackoverflow.com/a/54920339][this bit of ~awk~]]
2023-12-04 11:13:18 -05:00
*** Answers
19135
5704953