All Projects → mjpieters → adventofcode

mjpieters / adventofcode

Licence: MIT license
Advent of Code solutions 2015-2021

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to adventofcode

adventofcode-solver
🎄 Advent of Code (2015-2021) in JavaScript
Stars: ✭ 16 (-83.16%)
Mutual labels:  advent-of-code, advent-of-code-2016, advent-of-code-2015, aoc, advent-of-code-2017, advent-of-code-2018, advent-of-code-2019, advent-of-code-2020, advent-of-code-2021
adventofcode
🎄 Advent of Code (2015-2021) in C#
Stars: ✭ 114 (+20%)
Mutual labels:  advent-of-code, advent-of-code-2016, advent-of-code-2015, advent-of-code-2017, advent-of-code-2018, advent-of-code-2019, advent-of-code-2020, advent-of-code-2021
advent-of-code
My Advent of Code Solutions - 350/350 Stars
Stars: ✭ 30 (-68.42%)
Mutual labels:  advent-of-code, advent-of-code-2016, advent-of-code-2015, advent-of-code-2017, advent-of-code-2018, advent-of-code-2019, advent-of-code-2020, advent-of-code-2021
advent-of-code
Solutions to the Advent of Code editions, mainly using Kotlin.
Stars: ✭ 14 (-85.26%)
Mutual labels:  aoc, aoc2017, aoc2018, aoc2015, aoc2016, aoc2019, aoc2020, aoc2021
advent-of-code
My solutions for Advent of Code
Stars: ✭ 32 (-66.32%)
Mutual labels:  advent-of-code, advent-of-code-2016, advent-of-code-2015, advent-of-code-2017, advent-of-code-2018, advent-of-code-2019, advent-of-code-2020
AdventOfCode-Java
adventOfCode(Language.JAVA);
Stars: ✭ 15 (-84.21%)
Mutual labels:  advent-of-code, advent-of-code-2018, advent-of-code-2019, advent-of-code-2020, advent-of-code-2021
advent-of-code-2019
Advent of Code 2019 Submissions
Stars: ✭ 27 (-71.58%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2019, aoc2019
advent-of-code-2021
🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2021
Stars: ✭ 173 (+82.11%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
AdventOfCode2021
Solutions to all 25 AoC 2021 problems in Rust 🦀 Less than 100 lines per day and under 1 second total execution time. With competitive global leaderboard placements! 🎄
Stars: ✭ 34 (-64.21%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
AoCHelper
Helper .NET library for solving Advent of Code puzzles
Stars: ✭ 22 (-76.84%)
Mutual labels:  advent-of-code, aoc, advent-of-code-2021, aoc2021
advent-2020-kotlin
🎄 Advent of Code 2020: Solutions in Kotlin
Stars: ✭ 37 (-61.05%)
Mutual labels:  advent-of-code, advent-of-code-2020, aoc2020
rust-advent
Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)
Stars: ✭ 20 (-78.95%)
Mutual labels:  advent-of-code, advent-of-code-2020
adventofcode-2018
Advent of Code 2018
Stars: ✭ 28 (-70.53%)
Mutual labels:  advent-of-code, advent-of-code-2018
advent-2017
Advent of Code 2017
Stars: ✭ 16 (-83.16%)
Mutual labels:  advent-of-code, advent-of-code-2017
advent-of-code-2018
Learning rust from scratch
Stars: ✭ 19 (-80%)
Mutual labels:  advent-of-code, advent-of-code-2018
advent-of-code-2020
🎅🌟❄️☃️🎄🎁
Stars: ✭ 98 (+3.16%)
Mutual labels:  advent-of-code, advent-of-code-2020
AdventOfCode2021
My solutions to Advent of Code 2021
Stars: ✭ 15 (-84.21%)
Mutual labels:  advent-of-code, advent-of-code-2021
aoc2017
Advent of Code 2017
Stars: ✭ 15 (-84.21%)
Mutual labels:  advent-of-code, advent-of-code-2017
advent2017
Advent of Code 2017 solutions
Stars: ✭ 28 (-70.53%)
Mutual labels:  advent-of-code, advent-of-code-2017
Advent-of-Code-2019
My solutions for Advent of Code 2019
Stars: ✭ 14 (-85.26%)
Mutual labels:  advent-of-code, advent-of-code-2019

Advent of code solutions

Author: Martijn Pieters
Twitter: @zopatista
GitHub: mjpieters

These are my Advent of Code (AoC) puzzle solutions.

Most recent solutions use Python 3.10, and are presented in Jupyter notebooks for easy viewing on GitHub or the online Jupyter notebook viewer.

I don't aim to be first on any leaderboard. I aim to have fun solving the coding puzzles and playing with the concepts, and I try to include explanations of my thinking in the notebooks. Sometimes that means I'll include an animation or graph to show off some aspect of the puzzle.

Running locally

Everything here is run through Jupyter notebooks. If you check out this repository locally everything is included to recreate my environment.

I use Pipenv to manage dependencies, make sure you have it installed before continuing. Once installed, run

$ pipenv install
$ ./start

and the jupyter notebook interface is automatically opened in your default browser. You can stop the server with the Quit button in the web interface, or with the ./stop script.

Everything is organised in per-year folders. I tend to update all the libraries and Python release each year, but I don't test if these updates caused issues with solutions for preceding years. If something broke, so be it.

Additional dependencies

  • Animations are produced using matplotlib's animation API, which requires ffmpeg to be installed. On Mac OS X just use brew install ffmpeg.

  • Graphs are plotted using graphviz command-line tools such as dot, neato, and tred. On Mac OS X, just use brew install graphviz.

Puzzle input data

I use Wim Glenn's advent-of-code-data package to load data directly from the AoC website. This library requires your AoC session cookie. You'll have create your own Advent of Code account, then use your browser development tools to retrieve the session cookie value. Store the value according to the advent-of-code-data instructions (either in ~/.config/aocd/token or in the AOC_SESSION environment variable).

Since this project uses Pipenv, I store it in a .env file in the root directory of this project:

AOC_SESSION=deadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeaf

Do make sure to restart the jupyter notebook server after updating this file.

2015 and 2016 solutions

The 2015 and 2016 solutions are not IPython notebooks; they pre-date this repository, but were added later, and have not been updated or tested to work still. These don't use the advent-of-code-data library either so you need to download inputs manually for these.

They are included purely for completion's sake.

Rust solutions

I'm trying out implementing solutions in Rust as well. I can't promise I'm going to keep this up or that I'll implement Rust versions of all solutions.

I'm using the cargo-aoc project as the runner; you'll need to run cargo install cargo-aoc to install it. Then, set your AoC credentials (cargo aoc credentials -p ...), move your working directory to a specific year (cd rust/<year>, fetch inputs cargo aoc input -y <year> -d <day> and you can run the solution for that day with cargo aoc -d <day>.

Like with my Python solutions, I did not include my own puzzle inputs in the repository.

License

See the LICENSE file in the same directory.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].