From d734dde4312862d95401afdf8e66274cda30b101 Mon Sep 17 00:00:00 2001 From: Dazbo Date: Tue, 19 Dec 2023 06:32:26 +0000 Subject: [PATCH] Minor refactoring --- .../Dazbo's_Advent_of_Code_2023.ipynb | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/AoC_2023/Dazbo's_Advent_of_Code_2023.ipynb b/src/AoC_2023/Dazbo's_Advent_of_Code_2023.ipynb index 45aeb24..c246c3a 100644 --- a/src/AoC_2023/Dazbo's_Advent_of_Code_2023.ipynb +++ b/src/AoC_2023/Dazbo's_Advent_of_Code_2023.ipynb @@ -210,15 +210,8 @@ " file_fmt = logging.Formatter(fmt=\"%(asctime)s.%(msecs)03d:%(name)s:%(levelname)8s: %(message)s\",\n", " datefmt='%H:%M:%S')\n", " file_handler.setFormatter(file_fmt)\n", - " a_logger.addHandler(file_handler)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ + " a_logger.addHandler(file_handler)\n", + " \n", "def top_and_tail(data, block_size=5, include_line_numbers=True, zero_indexed=False):\n", " \"\"\" Print a summary of a large amount of data \n", "\n", @@ -255,7 +248,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Install ffmpeg" + "## Install ffmpeg\n", + "\n", + "This is installed in order to render video output, i.e. for visualisations." ] }, { @@ -327,18 +322,8 @@ " logger.warning(\"No .env file found.\")\n", " return False\n", "\n", - "get_envs_from_file() # read env variables from a .env file, if we can find one" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "kSem0cT_LApT", - "tags": [] - }, - "outputs": [], - "source": [ + "get_envs_from_file() # read env variables from a .env file, if we can find one\n", + "\n", "if os.getenv('AOC_SESSION_COOKIE'):\n", " logger.info('Session cookie retrieved: %s...%s', os.environ['AOC_SESSION_COOKIE'][0:6], os.environ['AOC_SESSION_COOKIE'][-6:])\n", "else: # it's not in our environment variables, so we'll need to input the value\n", @@ -6191,7 +6176,7 @@ "metadata": {}, "source": [ "---\n", - "## Day 18: title" + "## Day 18: Lavaduct Lagoon" ] }, { @@ -6578,14 +6563,27 @@ "metadata": {}, "source": [ "---\n", - "## Day 19: title" + "## Day 19: Aplenty" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/markdown": [ + "#### See [Day 19](https://adventofcode.com/2023/day/19)." + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "DAY = \"19\" # replace with actual number (without leading digit)\n", "day_link = f\"#### See [Day {DAY}](https://adventofcode.com/{YEAR}/day/{DAY}).\"\n", @@ -6822,9 +6820,9 @@ "toc_visible": true }, "kernelspec": { - "display_name": "aca_aoc", + "display_name": "ana-aoc", "language": "python", - "name": "aca_aoc" + "name": "python3" }, "language_info": { "codemirror_mode": {