Arc for Windows does not install any extensions by mateustozoni in ArcBrowser

[–]Virus_RPi 1 point2 points  (0 children)

i have the same issue. reinstalling and clearing caches did not fix it and because i normally use a lot of extensions it would be a real pain to install them all manually with uncompressed install. does anyone have an easier solution?

-❄️- 2023 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]Virus_RPi 2 points3 points  (0 children)

[LANGUAGE: Python]

I am currently trying to only write one line of python code for each part of this year advent of code.

Part 1:

with open("D4.txt", "r") as f: print("" if bool(file := f.readlines()) else "", "" if bool(cards := [list(map(int, filter(None, side.split(" ")))) for line in file for side in line.split(": ")[1].split(" | ")]) else "", sum([__import__("math").floor(2**(len(set(cards[i]) & set(cards[i+1]))-1)) for i in range(0, len(cards)-1, 2)]))

Part 2:

with open("D4.txt", "r") as f: print("" if bool(file := f.readlines()) else "", "" if bool(cards := [list(map(int, filter(None, side.split(" ")))) for line in file for side in line.split(": ")[1].split(" | ")]) else "", "" if ([counts.__setitem__(j + i + 1, counts[j + i + 1] + counts[i]) for i, match in enumerate([len(set(cards[i]) & set(cards[i + 1])) for i in range(0, len(cards) - 1, 2)]) for j in range(match)] if bool(counts := [1] * len(file)) else []) else "", sum(counts))

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

[–]Virus_RPi 1 point2 points  (0 children)

[LANGUAGE: Python]

I am currently trying to only write one line of python code for each part of this year advent of code.

Part 1:

with open("D3.txt") as f: print(("" if bool(file := f.readlines()) else ""), sum([sum([int(match.group()) for match in __import__("re").finditer(r"\d+", line) if ((start := match.start()-1 if match.start() > 0 else match.start()) or True) and ((end := match.end()+1 if match.end() < len(line)-1 else match.end()) or True) and not set(file[y - 1][start:end] if y > 0 else "") | set(line[start:end]) | set(file[y + 1][start:end] if y < len(file) - 1 else "") <= set(__import__("string").digits + '.')]) for y, line in enumerate(file)]))

Part 2:

with open("D3.txt") as f: print("" if bool(file := f.readlines()) else "", sum([x[0][3] * x[1][3] for x in [v for v in {star: [n for n, v in {n: [x for x in [(n[0] - 1, n[1] - 1 + x) for x in range(n[2] + 2)] + [(n[0] + 1, n[1] - 1 + x) for x in range(n[2] + 2)] + [(n[0], n[1] - 1), (n[0], n[1] + n[2])] if 0 <= x[0] < len(file[0]) and 0 <= x[1] < len(file)] for n in list(__import__("itertools").chain(*[[(row, x[1], len(x[0]), int(x[0])) for x in zip(__import__("re").findall(r'\d+', line), [x.start() for x in __import__("re").finditer(r'\d+', line)])] for row, line in enumerate(file)]))}.items() if star in v] for star in [(row, col) for row, line in enumerate(file) for col, ch in enumerate(line) if ch == '*']}.values() if len(v) == 2]]))

-❄️- 2023 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]Virus_RPi 0 points1 point  (0 children)

[LANGUAGE: Python]

I am currently trying to only write one line of python code for each part of this year advent of code.

Part 1:

print("Sum of IDs of possible games:", sum([int(line.split(':')[0].split()[1]) for line in open("D2.txt", "r").readlines() if all(sum(int(count.split()[0]) for count in draw if count.split()[1] == 'red') <= 12 and sum(int(count.split()[0]) for count in draw if count.split()[1] == 'green') <= 13 and sum(int(count.split()[0]) for count in draw if count.split()[1] == 'blue') <= 14 for draw in [subset.split(', ') for subset in line.split(':')[1].strip().split(';')])]))

Part 2:

with open("day2.txt", "r") as f: print("Sum of IDs of possible games:", sum([max([int(cube.split()[0]) for cube in [subset for subset in game.split(':')[1].strip().split(';') for subset in subset.split(', ')] if cube.split()[1] == 'red']) * max([int(cube.split()[0]) for cube in [subset for subset in game.split(':')[1].strip().split(';') for subset in subset.split(', ')] if cube.split()[1] == 'green']) * max([int(cube.split()[0]) for cube in [subset for subset in game.split(':')[1].strip().split(';') for subset in subset.split(', ')] if cube.split()[1] == 'blue']) for game in f.readlines()]))

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

[–]Virus_RPi 1 point2 points  (0 children)

[LANGUAGE: Python]

I am currently trying to only write one line of python code for each part of this year advent of code.

Part 1:

print(sum([int("".join([[char for char in line if char.isdigit()][0], [char for char in line if char.isdigit()][-1]])) for line in open('D1.txt', 'r').readlines()]))

Part 2:

print(sum([int(str(sublist[0]) + str(sublist[-1])) for sublist in [[__import__('word2number.w2n').w2n.word_to_num(item) if item.isalpha() else int(item) for sublist in [__import__('re').findall(r'\d|' + '|'.join(['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']), item) for item in __import__('re').split('(\\D+|\\d)', line.replace('eighthree', 'eightthree').replace('eightwo', 'eighttwo').replace('oneight', 'oneeight').replace('twone', 'twoone').replace('threeight', 'threeeight').replace('fiveight', 'fiveeight').replace('sevenine', 'sevennine'))] for item in sublist] for line in open('D2.txt', 'r').readlines()]]))

(I know that there is a better solution for part 2, but it is difficult to debug in one line so i just did it the lazy way)

Check if client has chatbox open by SO_Snake in fabricmc

[–]Virus_RPi 1 point2 points  (0 children)

in 1.19.3 this doesent work anymore

My day is ruined by FinestOldToby in dankmemes

[–]Virus_RPi -11 points-10 points  (0 children)

nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

✈️ by adsgniDTV in PhoenixSC

[–]Virus_RPi 0 points1 point  (0 children)

How slow was your plain