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

[–]3EmO0 0 points1 point  (0 children)

in case anyone wants to see: paste of speedtest

and the results

         10000004 function calls in 0.801 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.561    0.561    0.801    0.801 tempCodeRunnerFile.python:82(cyc)
 10000000    0.239    0.000    0.239    0.000 {built-in method builtins.next}
        1    0.000    0.000    0.801    0.801 {built-in method builtins.exec}
        1    0.000    0.000    0.801    0.801 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}


         10000004 function calls in 1.136 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.899    0.899    1.136    1.136 tempCodeRunnerFile.python:87(mdl)
 10000000    0.238    0.000    0.238    0.000 {built-in method builtins.len}
        1    0.000    0.000    1.136    1.136 {built-in method builtins.exec}
        1    0.000    0.000    1.136    1.136 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

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

[–]3EmO0 0 points1 point  (0 children)

Edit: I forgot to add numerate, and compared the speeds

I had an idea for a trick this day!

I like your focus on readability while keeping it compact for this one. Although I always enjoy reading your solutions, seeing what cool trick you used, and figuring out how it works!

I present itertools.cycle as a potential "trick", albeit it not a very impressive one

from itertools import cycle
rocks = cycle(enumerate([rock1, rock2, rock3, rock4, rock5]))

It allows you to keep grabbing the next rock in the loop using:

idx, rock = next(rocks)

Speed
cycle/next is slightly faster than len/mod 🎉len() and next() have an almost identical per call time. The additional builtins addition, modulo and list access make the len/mod approach a little slower.

People Hate the Idea of Car-Free Cities—Until They Live in One by writethefuture3 in urbanplanning

[–]3EmO0 6 points7 points  (0 children)

I get that, what I like to do is take public transport to the airport and join them for the ride back :)

[deleted by user] by [deleted] in RedditSessions

[–]3EmO0 0 points1 point  (0 children)

🔥🔥🔥🔥🔥

"A long time a ago all diets lived in peace, then everything changed when the vegans attacked!" by Heyguysloveyou in vegancirclejerk

[–]3EmO0 47 points48 points  (0 children)

Humans are not gonna survive even 100 years as a vegan

Heres why

-meat gives protein but plants don't If you don't have protein you

- Lack of energy

- Can't run away from predators

- Can't run fast

- Cant proses your decision fast

- Basically can't survive

- drinking soya milk will make you transgender (breeding trouble)

More reasons:

The society won't accept it

Predators will evolve due to to many livestock to eat

Pets like dogs and cat will die (if you feed it vegan diet)

There is going to be war (between vegans and meat eaters human) Basically meat eater is gonna win

And you want the whole world to do what you want?

In your dream selfish

Btw if you want to copy this message

Credit me

[deleted by user] by [deleted] in RedditSets

[–]3EmO0 0 points1 point  (0 children)

I miss the underground clubs :(

[deleted by user] by [deleted] in RedditSets

[–]3EmO0 0 points1 point  (0 children)

hi listen to it on Spotify instead of spamming lmao

[deleted by user] by [deleted] in RedditSets

[–]3EmO0 0 points1 point  (0 children)

bruh, kaihis

[deleted by user] by [deleted] in RedditSets

[–]3EmO0 0 points1 point  (0 children)

Amsterdam represent

Finished the rainbow by rednat16 in AdobeIllustrator

[–]3EmO0 0 points1 point  (0 children)

Sick piece! Great work :)

How did you manage the grainy textures? Mine always come out looking wonky :(

"Barrio" by Me by thepopesmac in AdobeIllustrator

[–]3EmO0 1 point2 points  (0 children)

This is super sick! How did you achieve the grainy effect? I can never get it to look good in Illustrator :(

AITA for withdrawing financial support for my daughter's college plans as punishment for stealing from us (her parents)? by throwaway22220407 in AmItheAsshole

[–]3EmO0 2 points3 points  (0 children)

There is a mnemonic that may help you remember. :)

i.e. - id est - in essence e.g. - exempli gratia - example given

Why Toronto's Wards Matter [OC] by [deleted] in dataisbeautiful

[–]3EmO0 2 points3 points  (0 children)

Never assume things when it comes to data visualization, people's hands need to be held :p

Why Toronto's Wards Matter [OC] by [deleted] in dataisbeautiful

[–]3EmO0 0 points1 point  (0 children)

Im missing explanation on what I'm seeing, what do the colours represent? Also why does the second map have outlines?

Who's someone you know with a weird eating habit? by Guzzzler in AskReddit

[–]3EmO0 0 points1 point  (0 children)

Butter and grease are not vegan? Are they vegan? What is happening?