Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justintime50/adventofcode
An advent calendar of coding challenges.
https://github.com/justintime50/adventofcode
2020 2021 2022 advent advent-of-code calendar challenge challenges code
Last synced: 3 months ago
JSON representation
An advent calendar of coding challenges.
- Host: GitHub
- URL: https://github.com/justintime50/adventofcode
- Owner: Justintime50
- License: mit
- Created: 2020-12-02T22:38:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T23:14:46.000Z (8 months ago)
- Last Synced: 2024-10-04T21:53:03.026Z (4 months ago)
- Topics: 2020, 2021, 2022, advent, advent-of-code, calendar, challenge, challenges, code
- Language: Python
- Homepage: https://adventofcode.com
- Size: 283 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code
An advent calendar of coding challenges.
[![Build Status](https://github.com/Justintime50/adventofcode/workflows/build/badge.svg)](https://github.com/Justintime50/adventofcode/actions)
[![Coverage Status](https://coveralls.io/repos/github/Justintime50/adventofcode/badge.svg?branch=main)](https://coveralls.io/github/Justintime50/adventofcode?branch=main)
[![Licence](https://img.shields.io/github/license/justintime50/adventofcode)](LICENSE)> The real challenge is writing good code - quickly, without hating how it turns out.
**NOTE:** Everyone's data will be different, while the scripts should work for anyone, you'll need to adjust the `input.txt` file content of each day if you want to use it for yourself. Know that my input files always have an extra blank line at the end from my editor automatically adding it on save and so in my solutions I discard the last line of the input data.
## Install
```bash
# Install locally
just install
```## Usage
### Setting Up
Run the following script to setup a new day's folder and file structure, unit tests, and to retrieve your input data (make sure not to run the script until the prompt unlocks for the day). Before running the script, you will need to get the [session ID](https://github.com/tomswartz07/AdventOfCodeLeaderboard/blob/b182f55d91330fbe313a9ab126a6f52b0e070aca/README.md#getting-a-session-cookie) for Advent of Code, they usually last ~30 days. Store this in an `.env` file in this project under the `ADVENT_OF_CODE_SESSION_ID` env var.
```bash
# 1st param is the year, 2nd param is the day
./setup_day.sh 2022 4
```### Running Challenges
Each day you will get a prompt containing two parts. You get more points the more parts you answer correctly and the faster you do so.
Run a script for a particular day, the output should be the answer(s) you can plug into the Advent of Code daily challenge.
```bash
venv/bin/python adventofcode/_2022/day1/challenge.py
```## Development
```bash
# Get a comprehensive list of development tools
just --list
```## Friends to Keep an Eye On
Advent of Code has the nice side effect of being a competition. Here are a few friends and other noteworthy repos to keep an eye on. There are TONS of things one can learn by studying different approaches to the same problem.
### Friends
* [jasonbot](https://github.com/jasonbot/2020-advent-of-code)
* [wulymammoth](https://github.com/wulymammoth/advent_of_code_2020)
* [gagelarsen](https://github.com/gagelarsen/adventofcode)
* [kgraves](https://github.com/kgraves/advent_of_code)
* [jontsai](https://github.com/hacktoolkit/code_challenges/tree/master/adventofcode/2020)
* [jk0524](https://github.com/jk0524/adventofcode2021)
* [LoganSimonsen](https://github.com/LoganSimonsen/advent-of-code)### Noteworthy Repos
* [jonathanpaulson](https://github.com/jonathanpaulson/AdventOfCode)