Eabryt's recent activity
-
Comment on FBI informant charged with lying about Joe and Hunter Biden's ties to Ukrainian energy company in ~news
-
Comment on “Wherever you get your podcasts” is a radical statement in ~tech
Eabryt That's fair. A few years ago I invested in a Synology NAS to host my Plex content and slowly over time I've been spinning up more and more docker containers to run things. I haven't gone through...That's fair. A few years ago I invested in a Synology NAS to host my Plex content and slowly over time I've been spinning up more and more docker containers to run things. I haven't gone through the work to make it super accessible outside of my home network, which I think would require a bit more energy than I've got for this.
-
Comment on “Wherever you get your podcasts” is a radical statement in ~tech
Eabryt I started hosting my own RSS server with FreshRSS about a year ago and I've really enjoyed it. It's helping me get back into reading more long-form articles.I started hosting my own RSS server with FreshRSS about a year ago and I've really enjoyed it. It's helping me get back into reading more long-form articles.
-
Comment on American Red Cross declares an emergency blood shortage, as number of donors hits twenty-year low in ~health
Eabryt I always wanted to donate blood growing up but every time I found myself coming up with an excuse for not having the time. Sadly I've since been diagnosed with a chronic disease that makes me...I always wanted to donate blood growing up but every time I found myself coming up with an excuse for not having the time.
Sadly I've since been diagnosed with a chronic disease that makes me ineligible to donate. On the plus side, the doctors get plenty of my blood to keep for themselves.
Very thankful to everyone who is able to donate.
-
Comment on A trip down the UK in ~travel
Eabryt Can't you just use tap to pay on your phone to get the same benefits? That way you don't have to put money on a card that will just sit there if you don't plan it perfectly.Can't you just use tap to pay on your phone to get the same benefits? That way you don't have to put money on a card that will just sit there if you don't plan it perfectly.
-
Comment on Day 9: Mirage Maintenance in ~comp.advent_of_code
Eabryt I guess they wanted me to be able to enjoy my Saturday? Once again, definitely could have been done simpler but I generally don't plan out my code in advance and just write as I read the problem....I guess they wanted me to be able to enjoy my Saturday? Once again, definitely could have been done simpler but I generally don't plan out my code in advance and just write as I read the problem.
Code
def find_dif(list): new_list = [] for i in range(len(list)-1): new_list.append(list[i+1] - list[i]) return new_list def part1(lines): print(f"Part 1!") total = 0 for line in lines: history = list(map(int, line.split())) reading = [history] while len(history) != history.count(0): history = find_dif(history) reading.append(history) for l in reversed(range(len(reading) - 1)): reading[l].append(reading[l][-1] + reading[l+1][-1]) total += reading[0][-1] print(f"Result: {total}") def part2(lines): print(f"Part 2!") total = 0 for line in lines: history = list(map(int, line.split())) reading = [history] while len(history) != history.count(0): history = find_dif(history) reading.append(history) for l in reversed(range(len(reading) - 1)): reading[l].insert(0,reading[l][0] - reading[l + 1][0]) total += reading[0][0] print(f"Result: {total}") def openFile(): return open("input.txt", "r").readlines() def main(): f = openFile() part1(f) part2(f) if __name__ == '__main__': main()
-
Comment on Day 6: Wait For It in ~comp.advent_of_code
Eabryt After all my issues with yesterdays code, today's was incredibly easy. I made it more complicated than it needed to be as I was anticipating some more issues. Part 2 was definitely a bit slow from...After all my issues with yesterdays code, today's was incredibly easy.
I made it more complicated than it needed to be as I was anticipating some more issues. Part 2 was definitely a bit slow from a performance issue, but I'm talking 5-10s slow, not minutes.
All my code
import re class Race: def __init__(self, time, dist): self.time = time self.dist = dist def __repr__(self, options): return f'To win, hold the button for {[x for x in options]} second(s)' def best_options(self): options = [] for x in range(self.time): if x * (self.time - x) > self.dist: options.append(x) return options def part1(lines): print(f"Part 1!") lines = lines.strip().split('\n') times, dist = [re.findall(r'(\d+)', s) for s in lines] times = list(map(int, times)) dist = list(map(int, dist)) races = [] for x in range(len(times)): races.append(Race(times[x], dist[x])) winners = 1 for race in races: winners *= len(race.best_options()) print(f"Result: {winners}") def part2(lines): print(f"Part 2!") lines = lines.strip().split('\n') times, dist = [re.findall(r'(\d+)', s) for s in lines] times = int(''.join(times)) dist = int(''.join(dist)) race = Race(times, dist) winners = len(race.best_options()) print(f"Result: {winners}") def openFile(): return open("input.txt", "r").read() def main(): f = openFile() part1(f) part2(f) if __name__ == '__main__': main()
-
Comment on Day 5: If You Give A Seed A Fertilizer in ~comp.advent_of_code
Eabryt Not gonna lie, that Visualization doesn't help me at all. Not sure if that's because it's going too fast or just because I'm struggling with this one overall.Not gonna lie, that Visualization doesn't help me at all. Not sure if that's because it's going too fast or just because I'm struggling with this one overall.
-
Comment on Day 5: If You Give A Seed A Fertilizer in ~comp.advent_of_code
Eabryt Okay cool. Final (hopefully) question. Going to spoiler it just to be safe. Spoilers Am I correct that once we get past the first map, it's possible that the value it's referencing might have more...Okay cool. Final (hopefully) question. Going to spoiler it just to be safe.
Spoilers
Am I correct that once we get past the first map, it's possible that the value it's referencing might have more than one matching map?
AKA. Looking at
39 0 15
for thesoil-to-fertilizer
map. When we're doing our range we get to a soil value of14 -> 39
Currently we have soil 14 showing up twice in our list. Once for Seed 14 (it didn't have a soil set in the first map), and once for Seed 29 (which was set in the previous map), should both seed fertilizer values be set to 39?
-
Comment on Day 5: If You Give A Seed A Fertilizer in ~comp.advent_of_code
Eabryt (edited )Link ParentYeah I understand all that. The problem comes when we go to the next map. Sticking with seed 42. If I understand correctly, the first line of 0 15 37 would mean that for Seed 42 it would have Soil...Yeah I understand all that.
The problem comes when we go to the next map.
Sticking with seed 42.
If I understand correctly, the first line of
0 15 37
would mean that for Seed 42 it would have Soil 42, and now Fertilizer value of 27.However, now we've got seed 99. It has a soil of 51, which isn't in that range, so does that mean fertilizer should be set to 51, or 99?
edit: Also, For that
0 15 37
, that's sayingwhen soil is 15, it matches to fertilizer 0
right? -
Comment on Day 5: If You Give A Seed A Fertilizer in ~comp.advent_of_code
Eabryt This is killing me mostly just because I am having a hard time understanding the actual problem, I sometimes hate how little example they give. I'm hoping someone can help. In the example they of...This is killing me mostly just because I am having a hard time understanding the actual problem, I sometimes hate how little example they give. I'm hoping someone can help.
In the example they of course run through the
seed-to-soil
map. For seed 79, it says soil number is 81.What I'm a bit confused about is when we get to the
soil-to-fertilizer
map. We don't touch seed 79, so why is the fertilizer number 81 instead of 79? When I'm going through that first map should I basically be "initializing" all the later values (fertilizer, water, light, etc) to that initial soil number? The wording is a bit unclear sometimes and I really wish they would have an idiot like me help with with description/examples. -
Comment on Join the Tildes Advent of Code leaderboard! in ~comp.advent_of_code
Eabryt Oh nice! I usually start strong and then slowly life gets in the way. That will be especially true this year with travel around the holidays. Hoping I can make it past 12/14 this year as that's...Oh nice! I usually start strong and then slowly life gets in the way. That will be especially true this year with travel around the holidays. Hoping I can make it past 12/14 this year as that's when I stopped last year.
-
Comment on Day 4: Scratchcards in ~comp.advent_of_code
Eabryt (edited )Link ParentQuick question. I'm doing something pretty similar to you (grabbing the winning/mine and overlaps slightly different, but results in the same), but when I submit my answer for part 2 it's telling...Quick question.
I'm doing something pretty similar to you (grabbing the winning/mine and overlaps slightly different, but results in the same), but when I submit my answer for part 2 it's telling me my answer is too high. Would you maybe be able to point me in the correct direction?
Edit: Never mind, it was my damn REGEX, as always.
Part 2
def part2(lines): print(f"Part 2!") cards = defaultdict(lambda: 1) for line in lines: card = int(re.search(r'Card.*(\d+):', line).group(1)) # <- This needs to capture on \s+(\d+), otherwise it doesn't grab all digits, just the last place. cards[card] winning, mine = map(lambda x: list(map(int, x.split())), line.strip().split(":")[1].split("|")) overlap = len(set(winning) & set(mine)) for x in range(card + 1, card + overlap + 1): cards[x] += cards[card] print(f"Result: {sum(cards.values())}")
-
Comment on At least sixteen dead in Maine shooting as police hunt for ‘person of interest’ and residents shelter in ~news
Eabryt Grew up in Maine. Apparently the shooter went to the same high school as me (different time) but I haven't done any research to if that's true or not. Sounds like all my immediate friends and...Grew up in Maine. Apparently the shooter went to the same high school as me (different time) but I haven't done any research to if that's true or not.
Sounds like all my immediate friends and family are safe, but who knows what the long term/ripple effects will be.
Randomly enough, I just bought a house about 30 minutes from where this happened and will be moving back to Maine shortly.
I wish I could be confident that this would drive meaningful change around gun laws in the state.
-
Comment on Harry Potter actor Sir Michael Gambon dies aged 82 in ~movies
Eabryt Wasn't totally sure if this should be posted here or ~news A sad day. The constant passing of time somehow always shocks me.Wasn't totally sure if this should be posted here or ~news
His widow and son said their "beloved husband and father" died peacefully with his family by his side after suffering from pneumonia.
A sad day. The constant passing of time somehow always shocks me.
-
Harry Potter actor Sir Michael Gambon dies aged 82
31 votes -
Comment on Reading Calvin & Hobbes for the first time as an adult in ~comics
Eabryt Every day I'm sad I (my parents) didn't buy that box set at my local bookstore when I was a kid. I think I have most of the individual books, but my buddy got the box set and it was so satisfying...The Complete Calvin and Hobbes box set if you're really into it.
Every day I'm sad I (my parents) didn't buy that box set at my local bookstore when I was a kid. I think I have most of the individual books, but my buddy got the box set and it was so satisfying to read.
-
Comment on Joe Biden administration announces $1.4 billion to improve US rail safety and boost capacity in thirty-five states in ~transport
Eabryt Choo Choo! I'm really hoping we're chugging along towards a new golden age of rail in the US. Brightline seems like they might be looking to give Amtrak some competition which will hopefully help.Choo Choo!
I'm really hoping we're chugging along towards a new golden age of rail in the US. Brightline seems like they might be looking to give Amtrak some competition which will hopefully help.
-
Comment on Speaker Kevin McCarthy directs a House panel to open an impeachment inquiry into US President Joe Biden in ~news
Eabryt Disappointing that the article doesn't seem to mention that so far the Republicans have yet to find a reason for an impeachment. Although they did include this bit:Speaker Kevin McCarthy said Tuesday he is directing a House committee to open an impeachment inquiry into President Joe Biden over his family’s business dealings, launching historic proceedings ahead of the 2024 election.
Disappointing that the article doesn't seem to mention that so far the Republicans have yet to find a reason for an impeachment. Although they did include this bit:
McCarthy holds just a slim majority in the House, and several Republicans have said they see no evidence to warrant an impeachment inquiry into Biden, especially amid all the other challenges facing Congress.
-
Speaker Kevin McCarthy directs a House panel to open an impeachment inquiry into US President Joe Biden
37 votes
That seems not great!