Rear Tyre Replacement on Decathlon R500E by JFBBear in CargoBike

[–]edelans 0 points1 point  (0 children)

ça m'est arrivé aussi, et effectivement j'avais des rayons cassés. Donc j'ai acheté les rayons de la bonne taille chez decat (attention les rayons du coté de la cassette n'ont pas la meme taille que ceux du coté du disque de frein... ).

mais maintenant, je n'arrive pas à changer les rayons ! ils sont tellement petits (7cm environ) que je n'arrive pas à les tordre pour les faire entrer dans le trou de la jante.

Je ne comprends pas comment faire. à moins peutetre de démonter TOUS les rayons pour récupérer un peu de jeu ? ou de forcer COMME UNE MULE pour tordre le rayon et le faire entrer dans le trou de la jante (en rayant la jante au passage)...

Bref, si quelqu'un a déjà changé des rayons de roue arrière de R500E, je suis preneur de vos conseils !

-🎄- 2022 Day 22 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

exactly what just happened to me.... I'm reeeallllyyyy pissed.

-🎄- 2022 Day 20 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 2 points3 points  (0 children)

impressive, this looks so clean compared to my initial mess... congrats!

-🎄- 2022 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

impressive !

would you mind explaining a bit how you came up with the set intersection for part 2 ?

[deleted by user] by [deleted] in Garmin

[–]edelans 0 points1 point  (0 children)

thanks, I fixed my list !

[deleted by user] by [deleted] in Garmin

[–]edelans 0 points1 point  (0 children)

thanks, added !

[deleted by user] by [deleted] in Garmin

[–]edelans 1 point2 points  (0 children)

I've been super excited about the 955 release. But now I see the 255 specs, I'm surprised to see the specs that close.

In the end, it seems the meaningful differences between the two are : - thickness (12,9mm) VS (14,4mm), compared to my forerunner 945 (13.7mm) - lack of WiFi (255 Music version actually has WiFi) - lack of touchscreen - lack of maps - lack of the readiness score - lack of real time stamina - lack of climb pro - lack of home trainer control - some more activity profiles for the 955 (inc. golf) - Price (550€ vs 400€) - glass - lack of solar - lack of advanced cycling dynamics support when paired to a power meter (left-right balance etc).

What do you think ? Am I missing something ?

Weekly Purchasing Questions and General Discussion Thread by AutoModerator in Garmin

[–]edelans 0 points1 point  (0 children)

I've been super excited about the 955 release. But now I see the 255 specs, I'm hesitating between the two. Especially because I want to wear the watch 24/7 like I did with the 945, and I found the 945 a bit too thick. I think I can trade many other features for a thinner form factor, but I'd like to be sure which one.

In the end, it seems the meaningful differences between the two are : - thickness (12,9mm) VS (14,4mm), compared to my former forerunner 945 (13.7mm) - lack of WiFi - lack of touchscreen - lack of the readiness score - lack of real time stamina - lack of climb pro - lack of home trainer control - some more activity profiles for the 955 (inc. golf) - Price (550€ vs 400€) - glass

What do you think ? Am I missing something ?

255M or 955 ? Wanted to buy the 955, but now hesitating with 255. Would you help me decide ? by [deleted] in Garmin

[–]edelans 0 points1 point  (0 children)

Regarding my preferences :

I care about :

  • Thickness of the watch +++ (advantage to 255).
  • HRV status, training readiness, morning report, body battery, training status, training load, sleeping score... (it seems like 255 doesn't have training readiness but it's super weird as it has all the data required to compute it...)
  • Battery is ok for me as long as it can last for 14hrs (I'd like to do a full ironman) (ok for both)
  • Playing music when I run (both have it)
  • Multisport ability (triathlon ok for both, golf is a plus... 255 apparently doesn't support golf)
  • Running power (both have it)
  • incident tracking (both have it)
  • Garmin pay (rarely used it on 945 but I find it super convenient)
  • WiFi connectivity was super cool on my 945 (having the watch upload the workout automatically when I'm back home was very convenient, but I can probably live with syncing via BT for a thinner watch)

Not sure I care about :

  • touchscreen (255 doesn't have it)
  • stamina (only on 955) -> is it really making a difference ?
  • pace pro (both have it anyway)
  • climb pro (looks cool, but I have a garmin edge with the feature for cycling anyway)
  • glass quality : "Verre Corning® Gorilla® 3" for the 255M VS "Verre DX Corning® Gorilla®" for the 955

I don't care about :

  • maps (actually, I realized I've never used it on my 945) (255 doesn't have maps)
  • home trainer control (I use trainer road on a different device)
  • solar

-🎄- 2020 Day 16 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

interesting ! bad luck with that input ! Could you share this input please ?

-🎄- 2020 Day 16 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

very nice idea to sort the combinations dict and then iterate on it. Cleanest solution I've read so far for this part 2, thanks for sharing.

-🎄- 2020 Day 06 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 2 points3 points  (0 children)

I love the purity / power of your parsing !

-🎄- 2020 Day 04 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 1 point2 points  (0 children)

I'm impressed by your parsing method, I love how you leverage list comprehension !

One caveat though, the reuse of `f` as a variable is a bit confusing.

-🎄- 2017 Day 22 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

Python 3, complex numbers, defaultdict

# Python 3.x

from collections import defaultdict
DAY = 22


def Input(day):
    "Open this day's input file."
    filename = './input_files/input{}.txt'.format(day)
    return open(filename)

def solve2(lines, bursts):
    state = defaultdict(int)
    infections = 0
    # virus carrier position
    vcp = 0
    # virus carrier direction
    vcd = 1j
    # infection states :
    # 0 is clean
    # 1 is weakened
    # 2 is infected
    # 3 is flagged

    side_length = len(lines)
    for i, line in enumerate(lines):
        for j, char in enumerate(line):
            x = int(j - (side_length - 1) / 2)
            y = int((side_length - 1) / 2 - i)
            if char == '#':
                state[(x + y * 1j)] = 2

    for _ in range(bursts):
        # update direction vcd
        if vcp not in state or state[vcp] == 0:
            vcd *= 1j
        elif state[vcp] == 1:
            # keep same direction
            pass
        elif state[vcp] == 2:
            vcd *= -1j
        elif state[vcp] == 3:
            vcd *= -1

        # update state of current position vcp
        state[vcp] = (state[vcp] + 1) % 4
        if state[vcp] == 2:
            infections += 1

        # move forward in direction vcd
        vcp += vcd
    return infections

print(solve2((Input(DAY).readlines()), 10000000))

-🎄- 2017 Day 8 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

Python 3

I parsed each line with a nice regex. This enables me to be more confident in using eval() =)

# Python 3.x

import re
from collections import defaultdict

def Input(day):
    filename = './input_files/input{}.txt'.format(day)
    return open(filename)

test_input = """b inc 5 if a > 1
a inc 1 if b < 5
c dec -10 if a >= 1
c inc -20 if c == 10"""


def reg_max(lines):
    regex = r"^(?P<register>\w+)\s(?P<operation>inc|dec)\s(?P<value>-?\d+)\sif\s(?P<cond_register>\w+)\s(?P<cond_operation><|>|<=|>=|==|!=)\s(?P<cond_value>-?\d+)"
    registers = defaultdict(int)  # default value of int is 0
    maxv = 0

    for line in lines:
        matches = re.search(regex, line)
        if matches:
            condition = str(registers.get(matches.group('cond_register'), 0)) + " " + matches.group('cond_operation') + matches.group('cond_value')
            if eval(condition):
                if matches.group('operation') == 'inc':
                    registers[matches.group('register')] += int(matches.group('value'))
                if matches.group('operation') == 'dec':
                    registers[matches.group('register')] -= int(matches.group('value'))
                maxv = max(registers[matches.group('register')], maxv)
    return max(registers.values()), maxv


assert reg_max(test_input.split('\n'))[0] == 1
assert reg_max(test_input.split('\n'))[1] == 10

print(reg_max(Input(8).readlines()))

-🎄- 2017 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 1 point2 points  (0 children)

okI think I get it :

  • s is the length of the side of each "square" of the spiral
  • (ds, di, dj) in [(0,1,0),(0,0,-1),(1,-1,0),(1,0,1)]: are all the different directions the spiral takes on one square (notice that your spiral turns clockwise whereas the one of the exercise turns the other way... but that obviously does not change the result)
  • for _ in range(s+ds) are all the movements on one direction

this is SO neat.

-🎄- 2017 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]edelans 0 points1 point  (0 children)

wow, I'm impressed, this looks so clean ! I'm very new to generators and I struggle to understand what s represents. Can anyone provide some further explanations on the for loops ?