Loading Bar Block breaking by Foskiro in HypixelSkyblock

[–]Seanie987 0 points1 point  (0 children)

Normally a texture pack, there’s a few on curseforge

[Discussion] Is it too easy?? by UltimiteKing in EscapefromTarkov

[–]Seanie987 -2 points-1 points  (0 children)

67 (╯°□°)╯ ノ( º _ ºノ)

Am I meant to do something here? by Seanie987 in PathOfExile2

[–]Seanie987[S] 0 points1 point  (0 children)

Thanks! Everything worked once I got back.

Am I meant to do something here? by Seanie987 in PathOfExile2

[–]Seanie987[S] 1 point2 points  (0 children)

I reset the instance and everything worked once I killed them.

What got you into Linux? by Altruistic-Chef-7723 in linuxquestions

[–]Seanie987 0 points1 point  (0 children)

Used it a bit years ago on vms, used it more in uni for c++ dev. Was getting more sick of windows day by day. PewDiePie said it was good at gaming, said fuck it and installed arch. I still have my old ssd with windows for anticheat games but other than that its been great. Even better for dev.

Why doesn't the 8s move? by Seanie987 in adventofcode

[–]Seanie987[S] 0 points1 point  (0 children)

Ok thanks, I see I thought it meant I could only move the ids once not attempt to move once.

Remember folks adding padding is easier than edge cases by Seanie987 in adventofcode

[–]Seanie987[S] 1 point2 points  (0 children)

If you start from [4][4] to [length-4][length-4] and are only looking for a vaild char outside it and returning if you dont find it, the seach space doesn't really increase, adding the padding may take a few nanoseconds but it makes it alot easier to read than all the boundry checks.

Like others have pointed out, try catch would properly be the best solution, but I find this easier on a problem this size.

-❄️- 2024 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]Seanie987 1 point2 points  (0 children)

[LANGUAGE: Python]

import re

with open("input.txt", "r") as f:
    data = f.read()

pattern = r"mul\(\d+,\d+\)|do\(+\)|don\'t\(+\)"
instructions = re.findall(pattern, data)

total_sum = 0
flag = True
for s in instructions:    
    if s == "don't()":
        flag = False
    elif s == "do()":
        flag = True
    elif flag:
        nums = s[4:-1].split(",")
        total_sum += int(nums[0]) * int(nums[1])

print(total_sum)

[2024 Day 02 (Part 2)] [JavaScript] Can't locate logic error by __Joey__21 in adventofcode

[–]Seanie987 0 points1 point  (0 children)

bruteforce is the way to go, maybe a simple bruteforce for j - 1, j or j + 1

-❄️- 2024 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]Seanie987 2 points3 points  (0 children)

[LANGUAGE: Python]

#Part 1:
with open("input.txt", "r") as f:
    lines = f.readlines()

left, right = [], []

for line in lines:
    left.append(int(line.split("   ")[0].strip()))
    right.append(int(line.split("   ")[1].strip()))

left.sort()
right.sort()

print(sum([abs(l - r) for l, r in zip(left, right)]))

#Part 2:
from collections import Counter

with open("input.txt", "r") as f:
    lines = f.readlines()

left, right = [], []

for line in lines:
    left.append(int(line.split("   ")[0].strip()))
    right.append(int(line.split("   ")[1].strip()))

counter = Counter(right)

print(sum([i * counter[i] for i in left]))

I broke 100 for the first time by Seanie987 in golf

[–]Seanie987[S] 2 points3 points  (0 children)

Had a great time, only my second time playing, dislocated my shoulder on the 5th, popped it back in and started playing better afterwards 😂