When I write these in my local copies, I don't put the date ranges on them, just the date they were written. Its one of the most pain in the butt parts of this because it means opening some sort of calendar. I mean, its not hard, but I really do not look at calendars a lot. At least not beyond "Day of the week".
When I write these in my local copies, I don’t put the date ranges on them, just the date they were written. Its one of the most pain in the butt parts of this because it means opening some sort of calendar. I mean, its not hard, but I really do not look at calendars a lot. At least not beyond “Day of the week”.
While I am rambling about things I don’t follow, I also don’t really follow the weather. Somehow, despite decades of data, and AI and all the magic pf technology, weather predicting still seems like a complete and utter toss up 90% of the time. I prefer to just, decide when I walk put the door, or over dress with hat and gloves or whatever, that can easily just be discarded.
On to this last week. It was of course, Thanksgiving week. We went down to my mother in law’s for the day, though no real fancy dinner or anything, just sandwiches, and doing various tasks around her house that needed done.
Speaking of Thanksgiving, I lied last week, I caught, part of, the Macy’s parade. It starts earlier than I thought. The antenna hook up went way better than expected. Despite that we sort of sit “downhill” because we are nearish the lake here, and the antenna itself isn’t even above the roof line, I can receive almost all of the channels I should be here. CBS which os very far is a little iffy at time, and PBS, which is probably the farthest, shows up but never locks in. But Fox, ABC, CW, the religeous channel, all tune in with all their subchannels.
The Saturday after Thanksgiving was very busy at the shop, which was nice. The town had a holiday event and it was “Small Business Saturday” so we actually had a regular run of customers. Many first timers and many who really liked the shop. It was a good sign, hopefully.
Josh Miller aka “Ramen Junkie”. I write about my various hobbies here. Mostly coding, photography, and music. Sometimes I just write about life in general. I also post sometimes about toy collecting and video games at Lameazoid.com.
Weekly Wrap Up – 11.24.2024 – 12.01.2024
When I write these in my local copies, I don't put the date ranges on them, just the date they were written. Its one of the most pain in the butt parts of this because it means opening some sort of calendar. I mean, its not hard, but I really do not look at…
https://bloggingintensifies.com/weekly-wrap-up-11-24-2024-12-01-2024/
Apparently I only attempt do Advent of Code every other year. I had this vague thought about doing this thing in JavaScript this year, but considering I am way better at Python than JS, and I have yet to actually complete one of these 100%, i should stick with what am good-ish at. The early day are always stupid easy. It's usually around halfway they have some super goofy and hard problem that I get stuck on.
Apparently I only attempt do Advent of Code every other year. I had this vague thought about doing this thing in JavaScript this year, but considering I am way better at Python than JS, and I have yet to actually complete one of these 100%, i should stick with what am good-ish at.
The early day are always stupid easy. It’s usually around halfway they have some super goofy and hard problem that I get stuck on. The main change this year is doing it through the Bash terminal. Though I think I did it this way in 2020. I may swap later, who knows. The only real annoyance is opening and closing files to test run.
I also have not done a lot of coding in a while, so I had to search up on how to do a few things. It was a good starter scenario though, it used a lot of things I have forgotten.
I don’t do anything super fancy with my code on these, I have seen some annoyingly unreadable one liners a few times. I always prefer clean code. The thing runs in essentially zero time anyway, I don’t need to be “milliseconds more efficient”.
Anyway, here is my solution for part 1 and 2 of Day 1.
with open("Day01Input.txt") as file:
data = file.read()
sets = [each.split(" ") for each in data.split("\n")]
sets.pop()
list1 = []
list2 = []
for each in sets:
list1.append(int(each[0]))
list2.append(int(each[1]))
list1.sort()
list2.sort()
total = 0
total2 = 0
for i in range(len(list1)):
total += abs(list1[i]-list2[i])
total2 += list1[i]*list2.count(list1[i])
print(total)
print(total2)
Josh Miller aka “Ramen Junkie”. I write about my various hobbies here. Mostly coding, photography, and music. Sometimes I just write about life in general. I also post sometimes about toy collecting and video games at Lameazoid.com.