This repository contains my solutions to the daily coding challenges from the Advent of Code 2023 event, written in Python using Jupyter notebooks.
The repository is organised as follows:
/inputs
- Directory for input files. NB: Inputs are copyrighted and thus not included in the repository. You will need to add your own input files to this directory./notebooks
- Directory containing the Jupyter notebooks with the solutions for each day's challenge.
To run the notebooks and test my solutions with your inputs, follow these steps:
-
Clone the repository:
git clone https://github.com/benjamin-pike/advent-of-code-2023.git cd advent-of-code-2023
-
Install Python
If you do not have Python installed on your system, you can download it from the official website.
-
Install Jupyter
Install Jupyter using
pip
:pip install jupyter
-
Install required packages
Other than Jupyter, the only package used that is not included in the Python standard library is
numpy
. If required, you can install it usingpip
:pip install numpy
-
Add your input files
Create an
/inputs
directory in the root of the repository and add your input files. Each input file should be named<day-number>.txt
(e.g.,1.txt
for Day 1,2.txt
for Day 2).mkdir inputs # Add your input files to the `inputs` directory
-
Run the Jupyter notebooks
Launch Jupyter Notebook:
jupyter notebook
Open the notebook for the corresponding day (e.g.,
1.ipynb
for Day 1) from the/notebooks
directory and run the cells to test the solutions.
Thank you to Eric Wastl, the creator of Advent of Code, for organising this event 🎄✨