An open API service indexing awesome lists of open source software.

https://github.com/tcbegley/advent-of-code

My solutions to advent of code: https://adventofcode.com/
https://github.com/tcbegley/advent-of-code

advent-of-code python

Last synced: 3 months ago
JSON representation

My solutions to advent of code: https://adventofcode.com/

Awesome Lists containing this project

README

        

# advent-of-code

My solutions to various [advent of code][aoc] problems.
Written for Python 3.10+.

## Generate boilerplate

This repo contains a helper package to generate boilerplate code each day and
fetch data. To use it first follow the instructions for authenticating
[advent-of-code-data][aocd], and [uv][uv].

Boilerplate can be generated and data fetched with

```sh
uv run aoc
```

or for a specific year and day

```sh
uv run aoc 2021 1
```

Specify the location with the `--outdir` option

```sh
uv run aoc 2021 1 --outdir path/to/solutions
```

## Linting / formatting code

Code is formatted and linted with `ruff` and `pyright`. There are tasks for running the commands wth [`just`][just]:

```sh
just lint
```

to lint all code and

```sh
just format
```

to fix problems that can be fixed automatically.

[aoc]: http://adventofcode.com/
[aocd]: https://github.com/wimglenn/advent-of-code-data
[just]: https://github.com/casey/just
[uv]: https://docs.astral.sh/uv