From 803de69aaab76ede7eb78f3a9c36dcfd8244237f Mon Sep 17 00:00:00 2001 From: Jake Pullen Date: Fri, 1 Dec 2023 09:26:45 +0000 Subject: [PATCH] updated the organiser to be flexible in years added 2022 folders to start going back and doing previous years --- 2022/day_1/input.txt | 1 + 2022/day_1/part 1 solution.py | 6 ++++ 2022/day_1/part 2 solution.py | 6 ++++ 2022/day_1/puzzle_text.md | 1 + 2022/day_10/input.txt | 1 + 2022/day_10/part 1 solution.py | 6 ++++ 2022/day_10/part 2 solution.py | 6 ++++ 2022/day_10/puzzle_text.md | 1 + 2022/day_11/input.txt | 1 + 2022/day_11/part 1 solution.py | 6 ++++ 2022/day_11/part 2 solution.py | 6 ++++ 2022/day_11/puzzle_text.md | 1 + 2022/day_12/input.txt | 1 + 2022/day_12/part 1 solution.py | 6 ++++ 2022/day_12/part 2 solution.py | 6 ++++ 2022/day_12/puzzle_text.md | 1 + 2022/day_13/input.txt | 1 + 2022/day_13/part 1 solution.py | 6 ++++ 2022/day_13/part 2 solution.py | 6 ++++ 2022/day_13/puzzle_text.md | 1 + 2022/day_14/input.txt | 1 + 2022/day_14/part 1 solution.py | 6 ++++ 2022/day_14/part 2 solution.py | 6 ++++ 2022/day_14/puzzle_text.md | 1 + 2022/day_15/input.txt | 1 + 2022/day_15/part 1 solution.py | 6 ++++ 2022/day_15/part 2 solution.py | 6 ++++ 2022/day_15/puzzle_text.md | 1 + 2022/day_16/input.txt | 1 + 2022/day_16/part 1 solution.py | 6 ++++ 2022/day_16/part 2 solution.py | 6 ++++ 2022/day_16/puzzle_text.md | 1 + 2022/day_17/input.txt | 1 + 2022/day_17/part 1 solution.py | 6 ++++ 2022/day_17/part 2 solution.py | 6 ++++ 2022/day_17/puzzle_text.md | 1 + 2022/day_18/input.txt | 1 + 2022/day_18/part 1 solution.py | 6 ++++ 2022/day_18/part 2 solution.py | 6 ++++ 2022/day_18/puzzle_text.md | 1 + 2022/day_19/input.txt | 1 + 2022/day_19/part 1 solution.py | 6 ++++ 2022/day_19/part 2 solution.py | 6 ++++ 2022/day_19/puzzle_text.md | 1 + 2022/day_2/input.txt | 1 + 2022/day_2/part 1 solution.py | 6 ++++ 2022/day_2/part 2 solution.py | 6 ++++ 2022/day_2/puzzle_text.md | 1 + 2022/day_20/input.txt | 1 + 2022/day_20/part 1 solution.py | 6 ++++ 2022/day_20/part 2 solution.py | 6 ++++ 2022/day_20/puzzle_text.md | 1 + 2022/day_21/input.txt | 1 + 2022/day_21/part 1 solution.py | 6 ++++ 2022/day_21/part 2 solution.py | 6 ++++ 2022/day_21/puzzle_text.md | 1 + 2022/day_22/input.txt | 1 + 2022/day_22/part 1 solution.py | 6 ++++ 2022/day_22/part 2 solution.py | 6 ++++ 2022/day_22/puzzle_text.md | 1 + 2022/day_23/input.txt | 1 + 2022/day_23/part 1 solution.py | 6 ++++ 2022/day_23/part 2 solution.py | 6 ++++ 2022/day_23/puzzle_text.md | 1 + 2022/day_24/input.txt | 1 + 2022/day_24/part 1 solution.py | 6 ++++ 2022/day_24/part 2 solution.py | 6 ++++ 2022/day_24/puzzle_text.md | 1 + 2022/day_25/input.txt | 1 + 2022/day_25/part 1 solution.py | 6 ++++ 2022/day_25/part 2 solution.py | 6 ++++ 2022/day_25/puzzle_text.md | 1 + 2022/day_3/input.txt | 1 + 2022/day_3/part 1 solution.py | 6 ++++ 2022/day_3/part 2 solution.py | 6 ++++ 2022/day_3/puzzle_text.md | 1 + 2022/day_4/input.txt | 1 + 2022/day_4/part 1 solution.py | 6 ++++ 2022/day_4/part 2 solution.py | 6 ++++ 2022/day_4/puzzle_text.md | 1 + 2022/day_5/input.txt | 1 + 2022/day_5/part 1 solution.py | 6 ++++ 2022/day_5/part 2 solution.py | 6 ++++ 2022/day_5/puzzle_text.md | 1 + 2022/day_6/input.txt | 1 + 2022/day_6/part 1 solution.py | 6 ++++ 2022/day_6/part 2 solution.py | 6 ++++ 2022/day_6/puzzle_text.md | 1 + 2022/day_7/input.txt | 1 + 2022/day_7/part 1 solution.py | 6 ++++ 2022/day_7/part 2 solution.py | 6 ++++ 2022/day_7/puzzle_text.md | 1 + 2022/day_8/input.txt | 1 + 2022/day_8/part 1 solution.py | 6 ++++ 2022/day_8/part 2 solution.py | 6 ++++ 2022/day_8/puzzle_text.md | 1 + 2022/day_9/input.txt | 1 + 2022/day_9/part 1 solution.py | 6 ++++ 2022/day_9/part 2 solution.py | 6 ++++ 2022/day_9/puzzle_text.md | 1 + organise_my_repo.py | 66 ++++++++++++++++++---------------- 101 files changed, 385 insertions(+), 31 deletions(-) create mode 100644 2022/day_1/input.txt create mode 100644 2022/day_1/part 1 solution.py create mode 100644 2022/day_1/part 2 solution.py create mode 100644 2022/day_1/puzzle_text.md create mode 100644 2022/day_10/input.txt create mode 100644 2022/day_10/part 1 solution.py create mode 100644 2022/day_10/part 2 solution.py create mode 100644 2022/day_10/puzzle_text.md create mode 100644 2022/day_11/input.txt create mode 100644 2022/day_11/part 1 solution.py create mode 100644 2022/day_11/part 2 solution.py create mode 100644 2022/day_11/puzzle_text.md create mode 100644 2022/day_12/input.txt create mode 100644 2022/day_12/part 1 solution.py create mode 100644 2022/day_12/part 2 solution.py create mode 100644 2022/day_12/puzzle_text.md create mode 100644 2022/day_13/input.txt create mode 100644 2022/day_13/part 1 solution.py create mode 100644 2022/day_13/part 2 solution.py create mode 100644 2022/day_13/puzzle_text.md create mode 100644 2022/day_14/input.txt create mode 100644 2022/day_14/part 1 solution.py create mode 100644 2022/day_14/part 2 solution.py create mode 100644 2022/day_14/puzzle_text.md create mode 100644 2022/day_15/input.txt create mode 100644 2022/day_15/part 1 solution.py create mode 100644 2022/day_15/part 2 solution.py create mode 100644 2022/day_15/puzzle_text.md create mode 100644 2022/day_16/input.txt create mode 100644 2022/day_16/part 1 solution.py create mode 100644 2022/day_16/part 2 solution.py create mode 100644 2022/day_16/puzzle_text.md create mode 100644 2022/day_17/input.txt create mode 100644 2022/day_17/part 1 solution.py create mode 100644 2022/day_17/part 2 solution.py create mode 100644 2022/day_17/puzzle_text.md create mode 100644 2022/day_18/input.txt create mode 100644 2022/day_18/part 1 solution.py create mode 100644 2022/day_18/part 2 solution.py create mode 100644 2022/day_18/puzzle_text.md create mode 100644 2022/day_19/input.txt create mode 100644 2022/day_19/part 1 solution.py create mode 100644 2022/day_19/part 2 solution.py create mode 100644 2022/day_19/puzzle_text.md create mode 100644 2022/day_2/input.txt create mode 100644 2022/day_2/part 1 solution.py create mode 100644 2022/day_2/part 2 solution.py create mode 100644 2022/day_2/puzzle_text.md create mode 100644 2022/day_20/input.txt create mode 100644 2022/day_20/part 1 solution.py create mode 100644 2022/day_20/part 2 solution.py create mode 100644 2022/day_20/puzzle_text.md create mode 100644 2022/day_21/input.txt create mode 100644 2022/day_21/part 1 solution.py create mode 100644 2022/day_21/part 2 solution.py create mode 100644 2022/day_21/puzzle_text.md create mode 100644 2022/day_22/input.txt create mode 100644 2022/day_22/part 1 solution.py create mode 100644 2022/day_22/part 2 solution.py create mode 100644 2022/day_22/puzzle_text.md create mode 100644 2022/day_23/input.txt create mode 100644 2022/day_23/part 1 solution.py create mode 100644 2022/day_23/part 2 solution.py create mode 100644 2022/day_23/puzzle_text.md create mode 100644 2022/day_24/input.txt create mode 100644 2022/day_24/part 1 solution.py create mode 100644 2022/day_24/part 2 solution.py create mode 100644 2022/day_24/puzzle_text.md create mode 100644 2022/day_25/input.txt create mode 100644 2022/day_25/part 1 solution.py create mode 100644 2022/day_25/part 2 solution.py create mode 100644 2022/day_25/puzzle_text.md create mode 100644 2022/day_3/input.txt create mode 100644 2022/day_3/part 1 solution.py create mode 100644 2022/day_3/part 2 solution.py create mode 100644 2022/day_3/puzzle_text.md create mode 100644 2022/day_4/input.txt create mode 100644 2022/day_4/part 1 solution.py create mode 100644 2022/day_4/part 2 solution.py create mode 100644 2022/day_4/puzzle_text.md create mode 100644 2022/day_5/input.txt create mode 100644 2022/day_5/part 1 solution.py create mode 100644 2022/day_5/part 2 solution.py create mode 100644 2022/day_5/puzzle_text.md create mode 100644 2022/day_6/input.txt create mode 100644 2022/day_6/part 1 solution.py create mode 100644 2022/day_6/part 2 solution.py create mode 100644 2022/day_6/puzzle_text.md create mode 100644 2022/day_7/input.txt create mode 100644 2022/day_7/part 1 solution.py create mode 100644 2022/day_7/part 2 solution.py create mode 100644 2022/day_7/puzzle_text.md create mode 100644 2022/day_8/input.txt create mode 100644 2022/day_8/part 1 solution.py create mode 100644 2022/day_8/part 2 solution.py create mode 100644 2022/day_8/puzzle_text.md create mode 100644 2022/day_9/input.txt create mode 100644 2022/day_9/part 1 solution.py create mode 100644 2022/day_9/part 2 solution.py create mode 100644 2022/day_9/puzzle_text.md diff --git a/2022/day_1/input.txt b/2022/day_1/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_1/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_1/part 1 solution.py b/2022/day_1/part 1 solution.py new file mode 100644 index 0000000..ead44f9 --- /dev/null +++ b/2022/day_1/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_1\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_1/part 2 solution.py b/2022/day_1/part 2 solution.py new file mode 100644 index 0000000..ead44f9 --- /dev/null +++ b/2022/day_1/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_1\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_1/puzzle_text.md b/2022/day_1/puzzle_text.md new file mode 100644 index 0000000..cfc4de0 --- /dev/null +++ b/2022/day_1/puzzle_text.md @@ -0,0 +1 @@ +# Day 1 Puzzle Text. \ No newline at end of file diff --git a/2022/day_10/input.txt b/2022/day_10/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_10/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_10/part 1 solution.py b/2022/day_10/part 1 solution.py new file mode 100644 index 0000000..441b7cc --- /dev/null +++ b/2022/day_10/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_10\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_10/part 2 solution.py b/2022/day_10/part 2 solution.py new file mode 100644 index 0000000..441b7cc --- /dev/null +++ b/2022/day_10/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_10\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_10/puzzle_text.md b/2022/day_10/puzzle_text.md new file mode 100644 index 0000000..676e449 --- /dev/null +++ b/2022/day_10/puzzle_text.md @@ -0,0 +1 @@ +# Day 10 Puzzle Text. \ No newline at end of file diff --git a/2022/day_11/input.txt b/2022/day_11/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_11/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_11/part 1 solution.py b/2022/day_11/part 1 solution.py new file mode 100644 index 0000000..49bb909 --- /dev/null +++ b/2022/day_11/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_11\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_11/part 2 solution.py b/2022/day_11/part 2 solution.py new file mode 100644 index 0000000..49bb909 --- /dev/null +++ b/2022/day_11/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_11\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_11/puzzle_text.md b/2022/day_11/puzzle_text.md new file mode 100644 index 0000000..bba8c30 --- /dev/null +++ b/2022/day_11/puzzle_text.md @@ -0,0 +1 @@ +# Day 11 Puzzle Text. \ No newline at end of file diff --git a/2022/day_12/input.txt b/2022/day_12/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_12/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_12/part 1 solution.py b/2022/day_12/part 1 solution.py new file mode 100644 index 0000000..f326a62 --- /dev/null +++ b/2022/day_12/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_12\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_12/part 2 solution.py b/2022/day_12/part 2 solution.py new file mode 100644 index 0000000..f326a62 --- /dev/null +++ b/2022/day_12/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_12\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_12/puzzle_text.md b/2022/day_12/puzzle_text.md new file mode 100644 index 0000000..a24d32f --- /dev/null +++ b/2022/day_12/puzzle_text.md @@ -0,0 +1 @@ +# Day 12 Puzzle Text. \ No newline at end of file diff --git a/2022/day_13/input.txt b/2022/day_13/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_13/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_13/part 1 solution.py b/2022/day_13/part 1 solution.py new file mode 100644 index 0000000..c6e1059 --- /dev/null +++ b/2022/day_13/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_13\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_13/part 2 solution.py b/2022/day_13/part 2 solution.py new file mode 100644 index 0000000..c6e1059 --- /dev/null +++ b/2022/day_13/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_13\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_13/puzzle_text.md b/2022/day_13/puzzle_text.md new file mode 100644 index 0000000..d37da8d --- /dev/null +++ b/2022/day_13/puzzle_text.md @@ -0,0 +1 @@ +# Day 13 Puzzle Text. \ No newline at end of file diff --git a/2022/day_14/input.txt b/2022/day_14/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_14/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_14/part 1 solution.py b/2022/day_14/part 1 solution.py new file mode 100644 index 0000000..402b8c8 --- /dev/null +++ b/2022/day_14/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_14\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_14/part 2 solution.py b/2022/day_14/part 2 solution.py new file mode 100644 index 0000000..402b8c8 --- /dev/null +++ b/2022/day_14/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_14\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_14/puzzle_text.md b/2022/day_14/puzzle_text.md new file mode 100644 index 0000000..8a2664d --- /dev/null +++ b/2022/day_14/puzzle_text.md @@ -0,0 +1 @@ +# Day 14 Puzzle Text. \ No newline at end of file diff --git a/2022/day_15/input.txt b/2022/day_15/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_15/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_15/part 1 solution.py b/2022/day_15/part 1 solution.py new file mode 100644 index 0000000..8530d41 --- /dev/null +++ b/2022/day_15/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_15\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_15/part 2 solution.py b/2022/day_15/part 2 solution.py new file mode 100644 index 0000000..8530d41 --- /dev/null +++ b/2022/day_15/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_15\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_15/puzzle_text.md b/2022/day_15/puzzle_text.md new file mode 100644 index 0000000..db7db43 --- /dev/null +++ b/2022/day_15/puzzle_text.md @@ -0,0 +1 @@ +# Day 15 Puzzle Text. \ No newline at end of file diff --git a/2022/day_16/input.txt b/2022/day_16/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_16/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_16/part 1 solution.py b/2022/day_16/part 1 solution.py new file mode 100644 index 0000000..c3fdeea --- /dev/null +++ b/2022/day_16/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_16\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_16/part 2 solution.py b/2022/day_16/part 2 solution.py new file mode 100644 index 0000000..c3fdeea --- /dev/null +++ b/2022/day_16/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_16\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_16/puzzle_text.md b/2022/day_16/puzzle_text.md new file mode 100644 index 0000000..8d95565 --- /dev/null +++ b/2022/day_16/puzzle_text.md @@ -0,0 +1 @@ +# Day 16 Puzzle Text. \ No newline at end of file diff --git a/2022/day_17/input.txt b/2022/day_17/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_17/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_17/part 1 solution.py b/2022/day_17/part 1 solution.py new file mode 100644 index 0000000..6e27393 --- /dev/null +++ b/2022/day_17/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_17\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_17/part 2 solution.py b/2022/day_17/part 2 solution.py new file mode 100644 index 0000000..6e27393 --- /dev/null +++ b/2022/day_17/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_17\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_17/puzzle_text.md b/2022/day_17/puzzle_text.md new file mode 100644 index 0000000..44367ed --- /dev/null +++ b/2022/day_17/puzzle_text.md @@ -0,0 +1 @@ +# Day 17 Puzzle Text. \ No newline at end of file diff --git a/2022/day_18/input.txt b/2022/day_18/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_18/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_18/part 1 solution.py b/2022/day_18/part 1 solution.py new file mode 100644 index 0000000..0402d2b --- /dev/null +++ b/2022/day_18/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_18\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_18/part 2 solution.py b/2022/day_18/part 2 solution.py new file mode 100644 index 0000000..0402d2b --- /dev/null +++ b/2022/day_18/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_18\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_18/puzzle_text.md b/2022/day_18/puzzle_text.md new file mode 100644 index 0000000..16a538e --- /dev/null +++ b/2022/day_18/puzzle_text.md @@ -0,0 +1 @@ +# Day 18 Puzzle Text. \ No newline at end of file diff --git a/2022/day_19/input.txt b/2022/day_19/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_19/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_19/part 1 solution.py b/2022/day_19/part 1 solution.py new file mode 100644 index 0000000..d26ac49 --- /dev/null +++ b/2022/day_19/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_19\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_19/part 2 solution.py b/2022/day_19/part 2 solution.py new file mode 100644 index 0000000..d26ac49 --- /dev/null +++ b/2022/day_19/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_19\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_19/puzzle_text.md b/2022/day_19/puzzle_text.md new file mode 100644 index 0000000..f80231c --- /dev/null +++ b/2022/day_19/puzzle_text.md @@ -0,0 +1 @@ +# Day 19 Puzzle Text. \ No newline at end of file diff --git a/2022/day_2/input.txt b/2022/day_2/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_2/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_2/part 1 solution.py b/2022/day_2/part 1 solution.py new file mode 100644 index 0000000..1673ed1 --- /dev/null +++ b/2022/day_2/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_2\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_2/part 2 solution.py b/2022/day_2/part 2 solution.py new file mode 100644 index 0000000..1673ed1 --- /dev/null +++ b/2022/day_2/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_2\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_2/puzzle_text.md b/2022/day_2/puzzle_text.md new file mode 100644 index 0000000..7549c3f --- /dev/null +++ b/2022/day_2/puzzle_text.md @@ -0,0 +1 @@ +# Day 2 Puzzle Text. \ No newline at end of file diff --git a/2022/day_20/input.txt b/2022/day_20/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_20/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_20/part 1 solution.py b/2022/day_20/part 1 solution.py new file mode 100644 index 0000000..56547ba --- /dev/null +++ b/2022/day_20/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_20\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_20/part 2 solution.py b/2022/day_20/part 2 solution.py new file mode 100644 index 0000000..56547ba --- /dev/null +++ b/2022/day_20/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_20\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_20/puzzle_text.md b/2022/day_20/puzzle_text.md new file mode 100644 index 0000000..186d6d5 --- /dev/null +++ b/2022/day_20/puzzle_text.md @@ -0,0 +1 @@ +# Day 20 Puzzle Text. \ No newline at end of file diff --git a/2022/day_21/input.txt b/2022/day_21/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_21/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_21/part 1 solution.py b/2022/day_21/part 1 solution.py new file mode 100644 index 0000000..f0cf112 --- /dev/null +++ b/2022/day_21/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_21\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_21/part 2 solution.py b/2022/day_21/part 2 solution.py new file mode 100644 index 0000000..f0cf112 --- /dev/null +++ b/2022/day_21/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_21\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_21/puzzle_text.md b/2022/day_21/puzzle_text.md new file mode 100644 index 0000000..76d8239 --- /dev/null +++ b/2022/day_21/puzzle_text.md @@ -0,0 +1 @@ +# Day 21 Puzzle Text. \ No newline at end of file diff --git a/2022/day_22/input.txt b/2022/day_22/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_22/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_22/part 1 solution.py b/2022/day_22/part 1 solution.py new file mode 100644 index 0000000..982851f --- /dev/null +++ b/2022/day_22/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_22\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_22/part 2 solution.py b/2022/day_22/part 2 solution.py new file mode 100644 index 0000000..982851f --- /dev/null +++ b/2022/day_22/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_22\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_22/puzzle_text.md b/2022/day_22/puzzle_text.md new file mode 100644 index 0000000..085317c --- /dev/null +++ b/2022/day_22/puzzle_text.md @@ -0,0 +1 @@ +# Day 22 Puzzle Text. \ No newline at end of file diff --git a/2022/day_23/input.txt b/2022/day_23/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_23/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_23/part 1 solution.py b/2022/day_23/part 1 solution.py new file mode 100644 index 0000000..38c0b43 --- /dev/null +++ b/2022/day_23/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_23\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_23/part 2 solution.py b/2022/day_23/part 2 solution.py new file mode 100644 index 0000000..38c0b43 --- /dev/null +++ b/2022/day_23/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_23\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_23/puzzle_text.md b/2022/day_23/puzzle_text.md new file mode 100644 index 0000000..0a4e534 --- /dev/null +++ b/2022/day_23/puzzle_text.md @@ -0,0 +1 @@ +# Day 23 Puzzle Text. \ No newline at end of file diff --git a/2022/day_24/input.txt b/2022/day_24/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_24/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_24/part 1 solution.py b/2022/day_24/part 1 solution.py new file mode 100644 index 0000000..bcce36a --- /dev/null +++ b/2022/day_24/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_24\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_24/part 2 solution.py b/2022/day_24/part 2 solution.py new file mode 100644 index 0000000..bcce36a --- /dev/null +++ b/2022/day_24/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_24\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_24/puzzle_text.md b/2022/day_24/puzzle_text.md new file mode 100644 index 0000000..7c67780 --- /dev/null +++ b/2022/day_24/puzzle_text.md @@ -0,0 +1 @@ +# Day 24 Puzzle Text. \ No newline at end of file diff --git a/2022/day_25/input.txt b/2022/day_25/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_25/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_25/part 1 solution.py b/2022/day_25/part 1 solution.py new file mode 100644 index 0000000..a9acb50 --- /dev/null +++ b/2022/day_25/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_25\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_25/part 2 solution.py b/2022/day_25/part 2 solution.py new file mode 100644 index 0000000..a9acb50 --- /dev/null +++ b/2022/day_25/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_25\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_25/puzzle_text.md b/2022/day_25/puzzle_text.md new file mode 100644 index 0000000..5206a54 --- /dev/null +++ b/2022/day_25/puzzle_text.md @@ -0,0 +1 @@ +# Day 25 Puzzle Text. \ No newline at end of file diff --git a/2022/day_3/input.txt b/2022/day_3/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_3/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_3/part 1 solution.py b/2022/day_3/part 1 solution.py new file mode 100644 index 0000000..8175dea --- /dev/null +++ b/2022/day_3/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_3\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_3/part 2 solution.py b/2022/day_3/part 2 solution.py new file mode 100644 index 0000000..8175dea --- /dev/null +++ b/2022/day_3/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_3\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_3/puzzle_text.md b/2022/day_3/puzzle_text.md new file mode 100644 index 0000000..945b3ec --- /dev/null +++ b/2022/day_3/puzzle_text.md @@ -0,0 +1 @@ +# Day 3 Puzzle Text. \ No newline at end of file diff --git a/2022/day_4/input.txt b/2022/day_4/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_4/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_4/part 1 solution.py b/2022/day_4/part 1 solution.py new file mode 100644 index 0000000..a61f5ee --- /dev/null +++ b/2022/day_4/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_4\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_4/part 2 solution.py b/2022/day_4/part 2 solution.py new file mode 100644 index 0000000..a61f5ee --- /dev/null +++ b/2022/day_4/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_4\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_4/puzzle_text.md b/2022/day_4/puzzle_text.md new file mode 100644 index 0000000..736c61d --- /dev/null +++ b/2022/day_4/puzzle_text.md @@ -0,0 +1 @@ +# Day 4 Puzzle Text. \ No newline at end of file diff --git a/2022/day_5/input.txt b/2022/day_5/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_5/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_5/part 1 solution.py b/2022/day_5/part 1 solution.py new file mode 100644 index 0000000..067b2be --- /dev/null +++ b/2022/day_5/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_5\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_5/part 2 solution.py b/2022/day_5/part 2 solution.py new file mode 100644 index 0000000..067b2be --- /dev/null +++ b/2022/day_5/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_5\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_5/puzzle_text.md b/2022/day_5/puzzle_text.md new file mode 100644 index 0000000..6695d4a --- /dev/null +++ b/2022/day_5/puzzle_text.md @@ -0,0 +1 @@ +# Day 5 Puzzle Text. \ No newline at end of file diff --git a/2022/day_6/input.txt b/2022/day_6/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_6/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_6/part 1 solution.py b/2022/day_6/part 1 solution.py new file mode 100644 index 0000000..e8284a7 --- /dev/null +++ b/2022/day_6/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_6\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_6/part 2 solution.py b/2022/day_6/part 2 solution.py new file mode 100644 index 0000000..e8284a7 --- /dev/null +++ b/2022/day_6/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_6\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_6/puzzle_text.md b/2022/day_6/puzzle_text.md new file mode 100644 index 0000000..15d6ea8 --- /dev/null +++ b/2022/day_6/puzzle_text.md @@ -0,0 +1 @@ +# Day 6 Puzzle Text. \ No newline at end of file diff --git a/2022/day_7/input.txt b/2022/day_7/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_7/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_7/part 1 solution.py b/2022/day_7/part 1 solution.py new file mode 100644 index 0000000..d533295 --- /dev/null +++ b/2022/day_7/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_7\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_7/part 2 solution.py b/2022/day_7/part 2 solution.py new file mode 100644 index 0000000..d533295 --- /dev/null +++ b/2022/day_7/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_7\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_7/puzzle_text.md b/2022/day_7/puzzle_text.md new file mode 100644 index 0000000..6af9360 --- /dev/null +++ b/2022/day_7/puzzle_text.md @@ -0,0 +1 @@ +# Day 7 Puzzle Text. \ No newline at end of file diff --git a/2022/day_8/input.txt b/2022/day_8/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_8/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_8/part 1 solution.py b/2022/day_8/part 1 solution.py new file mode 100644 index 0000000..451609a --- /dev/null +++ b/2022/day_8/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_8\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_8/part 2 solution.py b/2022/day_8/part 2 solution.py new file mode 100644 index 0000000..451609a --- /dev/null +++ b/2022/day_8/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_8\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_8/puzzle_text.md b/2022/day_8/puzzle_text.md new file mode 100644 index 0000000..ecd36f8 --- /dev/null +++ b/2022/day_8/puzzle_text.md @@ -0,0 +1 @@ +# Day 8 Puzzle Text. \ No newline at end of file diff --git a/2022/day_9/input.txt b/2022/day_9/input.txt new file mode 100644 index 0000000..b221142 --- /dev/null +++ b/2022/day_9/input.txt @@ -0,0 +1 @@ +Paste any inputs into this file. \ No newline at end of file diff --git a/2022/day_9/part 1 solution.py b/2022/day_9/part 1 solution.py new file mode 100644 index 0000000..8fd38d4 --- /dev/null +++ b/2022/day_9/part 1 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_9\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_9/part 2 solution.py b/2022/day_9/part 2 solution.py new file mode 100644 index 0000000..8fd38d4 --- /dev/null +++ b/2022/day_9/part 2 solution.py @@ -0,0 +1,6 @@ +import os + +with open(r'advent_of_code\2022\day_9\input.txt', 'r') as file: + input = file.read() + +print(input) diff --git a/2022/day_9/puzzle_text.md b/2022/day_9/puzzle_text.md new file mode 100644 index 0000000..0fcf494 --- /dev/null +++ b/2022/day_9/puzzle_text.md @@ -0,0 +1 @@ +# Day 9 Puzzle Text. \ No newline at end of file diff --git a/organise_my_repo.py b/organise_my_repo.py index 8b77577..c6f2599 100644 --- a/organise_my_repo.py +++ b/organise_my_repo.py @@ -1,47 +1,51 @@ import os - +from datetime import datetime # Define the base directory where you want to create the folders base_dir = 'advent_of_code' +current_year = datetime.now().year -# Loop over the range 1 to 25 (inclusive) -for i in range(2, 26): - # Construct the folder name - folder_name = f"day_{i}" - - # Construct the full path to the folder - folder_path = os.path.join(base_dir, folder_name) - - # Create the folder - os.makedirs(folder_path, exist_ok=True) +def create_advent_year(year=current_year): + # Loop over the range 1 to 25 (inclusive) + for i in range(1, 26): + # Construct the folder name + folder_name = f"day_{i}" - # Construct the full path to the placeholder file - input_file_path = os.path.join(folder_path, "input.txt") - puzzle_file_path = os.path.join(folder_path, "puzzle_text.md") - solution_file_path_1 = os.path.join(folder_path, "part 1 solution.py") - solution_file_path_2 = os.path.join(folder_path, "part 2 solution.py") + # Construct the full path to the folder + folder_path = os.path.join(base_dir,str(year), folder_name) - # Create the placeholder file - with open(input_file_path, "w") as file: - file.write("Paste any inputs into this file.") - - # Create the puzzle file - with open(puzzle_file_path, "w") as file: - file.write( f"# Day {i} Puzzle Text.") - - # Create the solution file - with open(solution_file_path_1, "w") as file: - file.write(f"""import os + # Create the folder + os.makedirs(folder_path, exist_ok=True) -with open('{input_file_path}', 'r') as file: + # Construct the full path to the placeholder file + input_file_path = os.path.join(folder_path, "input.txt") + puzzle_file_path = os.path.join(folder_path, "puzzle_text.md") + solution_file_path_1 = os.path.join(folder_path, "part 1 solution.py") + solution_file_path_2 = os.path.join(folder_path, "part 2 solution.py") + + # Create the placeholder file + with open(input_file_path, "w") as file: + file.write("Paste any inputs into this file.") + + # Create the puzzle file + with open(puzzle_file_path, "w") as file: + file.write( f"# Day {i} Puzzle Text.") + + # Create the solution file + with open(solution_file_path_1, "w") as file: + file.write(f"""import os + +with open(r'{input_file_path}', 'r') as file: input = file.read() print(input) """) - with open(solution_file_path_2, "w") as file: - file.write(f"""import os + with open(solution_file_path_2, "w") as file: + file.write(f"""import os -with open('{input_file_path}', 'r') as file: +with open(r'{input_file_path}', 'r') as file: input = file.read() print(input) """) + +create_advent_year(2022) \ No newline at end of file