StreetKid

joined 2 years ago
[–] StreetKid@reddthat.com 3 points 2 years ago (1 children)

Kan du huske hvad det har kostet?

[–] StreetKid@reddthat.com 3 points 2 years ago

Tak for tip, det vil jeg kigge nærmere på.

[–] StreetKid@reddthat.com 2 points 2 years ago

Jeg er afsted en månedstid. Jeg mindes bare at disse prepaid sim kort er forholdsvis dyre ift 3likehome f.eks.

[–] StreetKid@reddthat.com 4 points 2 years ago

Jeg har aldrig hørt om duka før, så godt at vide de har (i hvert fald en) tilfredse kunder 😀

[–] StreetKid@reddthat.com 5 points 2 years ago (13 children)

Have you measured the power consumption with a kill-a-watt (or similar)?

[–] StreetKid@reddthat.com 1 points 2 years ago

Second best season after season 2.

I really liked the cast for the characters, espilecially Jon Hamm and Jennifer Jason Leigh.

I felt it was back to basics (Fargo wise) after season 4 which I found a bit out of order.

[–] StreetKid@reddthat.com 6 points 2 years ago

I am very happy with Blocky https://github.com/0xERR0R/blocky

No UI, just a simply config file if that is your thing.

[–] StreetKid@reddthat.com 2 points 2 years ago (1 children)

Skal man lave PR hvis der er andre DR podcasts man gerne vil have tilføjet siden?

[–] StreetKid@reddthat.com 3 points 2 years ago

My Python solution for part 1 and part 2. I really practice my regex skills.

spoiler

#!/usr/bin/python3

import re

value_re = '(\d+)'
symbol_re = '[^\d.]'
gear_re = '(\*)'

def main():
    input = list()
    with open("input.txt", 'r') as in_file:
        for line in in_file:
            input.append(line.strip('\n'))
    length = len(input)
    width = len(input[0])
    value_sum = 0
    for idx, line in enumerate(input):
        for match in re.finditer(value_re, line):
            for line_mask in input[max(idx - 1, 0):min(idx + 2, length)]:
                valid_chars = line_mask[max(match.span()[0] - 1, 0):min(match.span()[1] + 1, width)]
                if re.search(symbol_re, valid_chars):
                    value_sum += int(match[0])
                    break
    print(f"Value sum = {value_sum}")

    gear_ratio = 0
    for idx, line in enumerate(input):
        for match in re.finditer(gear_re, line):
            valid_lines = input[max(idx - 1, 0):min(idx + 2, length)]
            min_range = max(match.span()[0] - 1, 0)
            max_range = min(match.span()[1], width)
            num_of_adjacent = 0
            temp_gear_ratio = 1
            for valid_line in valid_lines:
                for match in re.finditer(value_re, valid_line):
                    if match.span()[0] in range(min_range,max_range + 1) or match.span()[1] - 1 in range(min_range,max_range + 1):
                        num_of_adjacent += 1
                        temp_gear_ratio *= int(match[0])
            if num_of_adjacent == 2:
                gear_ratio += temp_gear_ratio
    print(f"Gear ratio = {gear_ratio}")

if __name__ == '__main__':
    main()

[–] StreetKid@reddthat.com 29 points 2 years ago (2 children)

Because that is how Bluetooth is specified. Bluetooth is primarily used for audio, where high throughput is not the most important parameter. Expected Bluetooth throughput is less than 2 Mbps, see more here https://www.bluetooth.com/blog/exploring-bluetooth-5-how-fast-can-it-be/

WiFi on the other hand, has peak throughput above 1 Gbps. So your observations are as expected.

[–] StreetKid@reddthat.com 6 points 2 years ago (1 children)

Are recurring tasks an option? And it it possible to repeat them x days after last completion?

[–] StreetKid@reddthat.com 2 points 2 years ago

OK, that makes sense.

view more: ‹ prev next ›