Skip to content

Solutions to AoC 2021, 2022, 2024 problems with Python 3 πŸŽ…πŸŽ„

License

Notifications You must be signed in to change notification settings

GuglielmoCerri/Advent-of-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Advent-of-Code

Github last commit python

Introduction

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

This repository contains the complete solutions to AoC 2021 and 2022 in python

In total I currently have 100 ⭐.

In this repo you will find the solutions to:

  • AoC 2021 in jupyter notebook
  • AoC 2022 in python3.10

Installation

Create the environment from the environment.yml file inside the specific year folder:

> cd <year> # cd 2024
> conda env create -f environment.yml

Usage

To run a single solution:

> conda activate AoC # Activate conda environment
> python3 src/<DAY>.py

At the end of the script is created a log file inside the <year> folder.

From 2024, you can use the Python package aocd to automatically download the inputs for the various quizzes. You just need to create a .env file inside src/lib that contains the variable AOC_SESSION with the session token of the account you are logged in with on Advent of Code, as the inputs are different for each user.

The session ID is a cookie which is set when you login to AoC. You can find it with your browser inspector. If you need help with that part then you can look here.

It is also possible to run all days, at once, within a year using:

> python3 run_all.py

Solutions

Here is a list of the Advent of Code years for which I have provided solutions:

Feel free to explore each year to see how I approached various problems!

Contributions

I'm proud to announce that my solutions have been integrated into the awesome-advent-of-code repository. This curated repository compiles the best Advent of Code resources, including language-specific sections.

To directly navigate to the Python section where my solutions reside, you can click here.

Thank you for exploring my Advent of Code journey. I hope you find these solutions insightful and enjoyable!


License

Distributed under the MIT License. See LICENSE for more information.

Contact

Guglielmo Cerri - [email protected]

Project Link: https://github.com/GuglielmoCerri/Advent-of-Code

About

Solutions to AoC 2021, 2022, 2024 problems with Python 3 πŸŽ…πŸŽ„

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published