Skip to content

Commit 4b10636

Browse files
committed
Modify files for merged repo
1 parent b1f5f79 commit 4b10636

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+679
-387
lines changed

.gitignore

Lines changed: 267 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# gitignore.io license
2+
#
13
# MIT License
24
#
3-
# Copyright (c) 2020 Andrew Krepps
5+
# Copyright (c) 2013-2019
46
#
57
# Permission is hereby granted, free of charge, to any person obtaining a copy
68
# of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +22,269 @@
2022
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2123
# SOFTWARE.
2224

23-
.idea/
25+
# Created by https://www.toptal.com/developers/gitignore/api/pycharm+all,python
26+
# Edit at https://www.toptal.com/developers/gitignore?templates=pycharm+all,python
27+
28+
### PyCharm+all ###
29+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
30+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
31+
32+
# User-specific stuff
33+
.idea/**/workspace.xml
34+
.idea/**/tasks.xml
35+
.idea/**/usage.statistics.xml
36+
.idea/**/dictionaries
37+
.idea/**/shelf
38+
39+
# AWS User-specific
40+
.idea/**/aws.xml
41+
42+
# Generated files
43+
.idea/**/contentModel.xml
44+
45+
# Sensitive or high-churn files
46+
.idea/**/dataSources/
47+
.idea/**/dataSources.ids
48+
.idea/**/dataSources.local.xml
49+
.idea/**/sqlDataSources.xml
50+
.idea/**/dynamic.xml
51+
.idea/**/uiDesigner.xml
52+
.idea/**/dbnavigator.xml
53+
54+
# Gradle
55+
.idea/**/gradle.xml
56+
.idea/**/libraries
57+
58+
# Gradle and Maven with auto-import
59+
# When using Gradle or Maven with auto-import, you should exclude module files,
60+
# since they will be recreated, and may cause churn. Uncomment if using
61+
# auto-import.
62+
# .idea/artifacts
63+
# .idea/compiler.xml
64+
# .idea/jarRepositories.xml
65+
# .idea/modules.xml
66+
# .idea/*.iml
67+
# .idea/modules
68+
# *.iml
69+
# *.ipr
70+
71+
# CMake
72+
cmake-build-*/
73+
74+
# Mongo Explorer plugin
75+
.idea/**/mongoSettings.xml
76+
77+
# File-based project format
78+
*.iws
79+
80+
# IntelliJ
81+
out/
82+
83+
# mpeltonen/sbt-idea plugin
84+
.idea_modules/
85+
86+
# JIRA plugin
87+
atlassian-ide-plugin.xml
88+
89+
# Cursive Clojure plugin
90+
.idea/replstate.xml
91+
92+
# SonarLint plugin
93+
.idea/sonarlint/
94+
95+
# Crashlytics plugin (for Android Studio and IntelliJ)
96+
com_crashlytics_export_strings.xml
97+
crashlytics.properties
98+
crashlytics-build.properties
99+
fabric.properties
100+
101+
# Editor-based Rest Client
102+
.idea/httpRequests
103+
104+
# Android studio 3.1+ serialized cache file
105+
.idea/caches/build_file_checksums.ser
106+
107+
### PyCharm+all Patch ###
108+
# Ignore everything but code style settings and run configurations
109+
# that are supposed to be shared within teams.
110+
111+
.idea/*
112+
113+
!.idea/codeStyles
114+
!.idea/runConfigurations
115+
116+
### Python ###
117+
# Byte-compiled / optimized / DLL files
118+
__pycache__/
119+
*.py[cod]
120+
*$py.class
121+
122+
# C extensions
123+
*.so
124+
125+
# Distribution / packaging
126+
.Python
127+
build/
128+
develop-eggs/
129+
dist/
130+
downloads/
131+
eggs/
132+
.eggs/
133+
lib/
134+
lib64/
135+
parts/
136+
sdist/
137+
var/
138+
wheels/
139+
share/python-wheels/
140+
*.egg-info/
141+
.installed.cfg
142+
*.egg
143+
MANIFEST
144+
145+
# PyInstaller
146+
# Usually these files are written by a python script from a template
147+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
148+
*.manifest
149+
*.spec
150+
151+
# Installer logs
152+
pip-log.txt
153+
pip-delete-this-directory.txt
154+
155+
# Unit test / coverage reports
156+
htmlcov/
157+
.tox/
158+
.nox/
159+
.coverage
160+
.coverage.*
161+
.cache
162+
nosetests.xml
163+
coverage.xml
164+
*.cover
165+
*.py,cover
166+
.hypothesis/
167+
.pytest_cache/
168+
cover/
169+
170+
# Translations
171+
*.mo
172+
*.pot
173+
174+
# Django stuff:
175+
*.log
176+
local_settings.py
177+
db.sqlite3
178+
db.sqlite3-journal
179+
180+
# Flask stuff:
181+
instance/
182+
.webassets-cache
183+
184+
# Scrapy stuff:
185+
.scrapy
186+
187+
# Sphinx documentation
188+
docs/_build/
189+
190+
# PyBuilder
191+
.pybuilder/
192+
target/
193+
194+
# Jupyter Notebook
195+
.ipynb_checkpoints
196+
197+
# IPython
198+
profile_default/
199+
ipython_config.py
200+
201+
# pyenv
202+
# For a library or package, you might want to ignore these files since the code is
203+
# intended to run in multiple environments; otherwise, check them in:
204+
# .python-version
205+
206+
# pipenv
207+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
208+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
209+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
210+
# install all needed dependencies.
211+
#Pipfile.lock
212+
213+
# poetry
214+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
215+
# This is especially recommended for binary packages to ensure reproducibility, and is more
216+
# commonly ignored for libraries.
217+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
218+
#poetry.lock
219+
220+
# pdm
221+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
222+
#pdm.lock
223+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
224+
# in version control.
225+
# https://pdm.fming.dev/#use-with-ide
226+
.pdm.toml
227+
228+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
229+
__pypackages__/
230+
231+
# Celery stuff
232+
celerybeat-schedule
233+
celerybeat.pid
234+
235+
# SageMath parsed files
236+
*.sage.py
237+
238+
# Environments
239+
.env
240+
.venv
241+
env/
24242
venv/
243+
ENV/
244+
env.bak/
245+
venv.bak/
246+
247+
# Spyder project settings
248+
.spyderproject
249+
.spyproject
250+
251+
# Rope project settings
252+
.ropeproject
253+
254+
# mkdocs documentation
255+
/site
256+
257+
# mypy
258+
.mypy_cache/
259+
.dmypy.json
260+
dmypy.json
261+
262+
# Pyre type checker
263+
.pyre/
264+
265+
# pytype static type analyzer
266+
.pytype/
267+
268+
# Cython debug symbols
269+
cython_debug/
270+
271+
# PyCharm
272+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
273+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
274+
# and can be added to the global gitignore or merged into this file. For a more nuclear
275+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
276+
#.idea/
277+
278+
### Python Patch ###
279+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
280+
poetry.toml
281+
282+
# ruff
283+
.ruff_cache/
284+
285+
# LSP config files
286+
pyrightconfig.json
287+
288+
# End of https://www.toptal.com/developers/gitignore/api/pycharm+all,python
25289

26-
input/day*.txt
290+
input/**/input-*-day*.txt

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Andrew Krepps
3+
Copyright (c) 2020-2023 Andrew Krepps
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Advent of Code - Python
22

3-
Solutions for 2019-2020 Advent of Code implemented in Python 3
3+
Solutions for Advent of Code 2019-2020 implemented in Python 3
44

55
Advent of Code site: https://adventofcode.com

advent2019/day1.py renamed to advent2019/advent2019day01.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020 Andrew Krepps
3+
# Copyright (c) 2020-2023 Andrew Krepps
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -21,7 +21,7 @@
2121
# SOFTWARE.
2222

2323

24-
from . import util
24+
import adventutil
2525

2626

2727
def calc_fuel(module_mass):
@@ -47,7 +47,7 @@ def get_part2_answer(module_masses):
4747

4848

4949
def run():
50-
with open(util.get_input_file_path('day1.txt')) as f:
50+
with open(adventutil.get_input_file_path('input-2019-day01.txt')) as f:
5151
module_masses = [int(mass) for mass in f if len(mass.strip()) > 0]
5252
print(f"The answer for part 1 is {get_part1_answer(module_masses)}")
5353
print(f"The answer for part 2 is {get_part2_answer(module_masses)}")

advent2019/day2.py renamed to advent2019/advent2019day02.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020 Andrew Krepps
3+
# Copyright (c) 2020-2023 Andrew Krepps
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -21,10 +21,9 @@
2121
# SOFTWARE.
2222

2323

24+
import adventutil
2425
import operator
2526

26-
from . import util
27-
2827

2928
def run_program_with_noun_and_verb(program, noun, verb):
3029
"""Execute a copy of an Intcode computer program after writing the noun and verb to addresses 1 and 2"""
@@ -69,7 +68,7 @@ def get_part2_answer(program):
6968

7069

7170
def run():
72-
with open(util.get_input_file_path("day2.txt")) as f:
71+
with open(adventutil.get_input_file_path("input-2019-day02.txt")) as f:
7372
program = [int(x) for x in f.read().strip().split(',')]
7473
print(f"The answer to part 1 is {get_part1_answer(program)}")
7574
print(f"The answer to part 2 is {get_part2_answer(program)}")

advent2019/day3.py renamed to advent2019/advent2019day03.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020 Andrew Krepps
3+
# Copyright (c) 2020-2023 Andrew Krepps
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -21,7 +21,7 @@
2121
# SOFTWARE.
2222

2323

24-
from . import util
24+
import adventutil
2525

2626

2727
def parse_path(path_def):
@@ -74,7 +74,7 @@ def get_part2_answer(path_defs):
7474

7575

7676
def run():
77-
with open(util.get_input_file_path("day3.txt")) as f:
77+
with open(adventutil.get_input_file_path("input-2019-day03.txt")) as f:
7878
path_defs = [line for line in f if len(line) > 0]
7979
print(f"The answer to part 1 is {get_part1_answer(path_defs)}")
8080
print(f"The answer to part 2 is {get_part2_answer(path_defs)}")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy