advent-of-code/python/2023
2023-12-07 21:00:20 -05:00
..
src/andy_aoc_2023 Add day 6 solutions 2023-12-07 21:00:20 -05:00
pyproject.toml Create directory structure 2023-12-01 12:08:49 -05:00
README.org Add day 5 solutions 2023-12-07 21:00:12 -05:00

Advent of Code Python

Day 1

  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

Answers

54573 54591

Day 2

  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

Answers

2600 86036

Day 4

  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

Warning: Part 2 is a little slow

  ~/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

where avg-time is this bit of awk

Answers

19135 5704953

Day 5

Answers

324724204 104070862

  -> date -Iseconds; cat src/andy_aoc_2023/BIG_INPUTS | xargs -P 0 -I '%' python src/andy_aoc_2023/day5.py src/andy_aoc_2023/BIG_MAPS %; date -Iseconds
  2023-12-05T12:55:55-05:00
  856496588
  547766656
  990928320
  104899384
  516299014
  104070862  <-- This is the min aka the answer
  324724204
  344671053
  114257961
  146071405
  2023-12-05T14:46:41-05:00