Added template

This commit is contained in:
Sven Heidemann 2022-11-30 11:51:08 +01:00
parent 69a9aba347
commit b0d483ea21
5 changed files with 32 additions and 3 deletions

2
.gitignore vendored
View File

@ -158,5 +158,5 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2022 Sven Heidemann
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,3 +1,9 @@
# adventofcode-2022
https://adventofcode.com/2022
https://adventofcode.com/2022
## Execute
First create a venv and install deps with ```pip install -t deps.txt```
Then run code easily with ```./run {Number-of-day}```

3
run Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
python src/day$1.py

20
src/template_dayX.py Normal file
View File

@ -0,0 +1,20 @@
from typing import Optional
from cpl_core.console import Console
from cpl_core.utils import String
from cpl_query.enumerable import Enumerable
from cpl_query.extension import List
from cpl_core.pipes import *
# global vars
day = 0
def main():
Console.write_line('hello world!')
if __name__ == '__main__':
Console.write_line(f'Advent of code day {day}')
main()
Console.write_line()