commit aa505e5bcaa7f962ddadf3a62082a4e256eb2d7f Author: Heiko Ludwig Date: Sat Nov 30 06:50:38 2024 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..32c3fa1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +# These are some examples of commonly ignored file patterns. +# You should customize this list as applicable to your project. + +# temporary editor files +*.swp +*~ + +# Python virtual environment +virtualenv +.env + +# Node artifact files +node_modules/ +dist/ + +# Compiled Java class files +*.class + +# Compiled Python bytecode +*.py[cod] +__pycache__ + +# Log files +*.log + +# Package files +*.jar + +# Maven +target/ +dist/ + +# JetBrains IDE +.idea/ + +# Unit test reports +TEST*.xml + +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db + +# Applications +*.app +*.exe +*.war + +# Large media files +*.mp4 +*.tiff +*.avi +*.flv +*.mov +*.wmv + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f7e6ca4 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Advent of Code 2024 + +I am participating in Advent of Code 2024. + +https://adventofcode.com/2024/ + +Last year I dropped out on day 6, but I'm trying to complete +it this year. My programming language of choice is Python, +again. I haven't been programming a lot during the last +four years, and my skills got very rusty. + +(No, I will not aim at the leaderboards. If I don't finish +a problem on the same day I will finish it later. +I will be taking my sweet time if necessary.) diff --git a/program.py b/program.py new file mode 100755 index 0000000..d300ea4 --- /dev/null +++ b/program.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +# https://adventofcode.com/2024/day/ + +def get_lines(filename: str) -> list: + with open(filename, "r") as file: + return [line.strip() for line in file.readlines()] + + +def main(): + lines = get_lines("input.txt") + + +if __name__ == '__main__': + main() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/test_program.py b/test_program.py new file mode 100755 index 0000000..e00b790 --- /dev/null +++ b/test_program.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import program +import unittest + + +class TestThing(unittest.TestCase): + def setUp(self): + pass + + +if __name__ == '__main__': + unittest.main()