Skip to content

Commit

Permalink
Ready for d24
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed-dash committed Dec 27, 2023
1 parent bc9ece9 commit 9229b07
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions src/AoC_2023/Dazbo's_Advent_of_Code_2023.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9134,6 +9134,126 @@
"logger.info(f\"Part 2 soln={soln}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"## Day 24: Never Tell Me The Odds"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"DAY = \"24\" # replace with actual number (without leading digit)\n",
"day_link = f\"#### See [Day {DAY}](https://adventofcode.com/{YEAR}/day/{DAY}).\"\n",
"display(Markdown(day_link))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"d_name = \"d\" + str(DAY).zfill(2) # e.g. d01\n",
"script_name = \"aoc\" + str(YEAR) + d_name # e.g. aoc2017d01\n",
"locations = get_locations(d_name)\n",
"\n",
"# SETUP LOGGING\n",
"logger.setLevel(logging.DEBUG)\n",
"# td.setup_file_logging(logger, locations.output_dir)\n",
"\n",
"# Retrieve input and store in local file\n",
"try:\n",
" write_puzzle_input_file(YEAR, DAY, locations)\n",
" with open(locations.input_file, mode=\"rt\") as f:\n",
" input_data = f.read().splitlines()\n",
"\n",
" logger.info(\"Input data:\\n%s\", top_and_tail(input_data))\n",
"except ValueError as e:\n",
" logger.error(e)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Day 24 Part 1\n",
"\n",
"Overview..."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def solve(data):\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%time\n",
"sample_inputs = [\"abcdef\"]\n",
"sample_answers = [\"uvwxyz\"]\n",
"\n",
"for curr_input, curr_ans in zip(sample_inputs, sample_answers):\n",
" validate(solve_part1(curr_input), curr_ans) # test with sample data\n",
"\n",
"logger.info(\"Tests passed!\")\n",
"\n",
"soln = solve_part1(input_data)\n",
"logger.info(f\"Part 1 soln={soln}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Day 24 Part 2\n",
"\n",
"Overview..."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def solve_part2(data):\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%time\n",
"sample_inputs = [\"abcdef\"]\n",
"sample_answers = [\"uvwxyz\"]\n",
"\n",
"for curr_input, curr_ans in zip(sample_inputs, sample_answers):\n",
" validate(solve_part2(curr_input), curr_ans) # test with sample data\n",
"\n",
"logger.info(\"Tests passed!\")\n",
"\n",
"soln = solve_part2(input_data)\n",
"logger.info(f\"Part 2 soln={soln}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 9229b07

Please sign in to comment.