Oct 16, 2020 01:12
Nice. Not as much improvement as I was hoping for, though, but I guess that's why we measure. I'm always surprised by the overhead of set over a simple array.
Oct 16, 2020 01:12
sorry, only just saw that each value is already a min of a whole run.
Oct 16, 2020 01:12
baseline is a bit pointless here and you could take the min or mean of your multiple timings. I would also consider ordering them by runtime.
Oct 16, 2020 01:12
Would be interesting to see how much better the set performs if you do seen_add = seen.add before the loop and use that to avoid the costly attribute lookups.
 

 The 2nd Monitor

General discussion about codereview.stackexchange.com - Welcom...
Jun 8, 2020 13:21
@DerKommissar Never crossed my mind...
Jun 8, 2020 13:19
@DerKommissar I know, that's why I didn't edit the message / ping them myself afterwards
Jun 8, 2020 13:18
@DerKommissar Thanks, I knew I had forgotten something :D
Jun 8, 2020 13:12
Not sure why y'all voted to close this question: codereview.stackexchange.com/q/243530/98493
May 20, 2020 13:05
@Peilonrayz Thanks for taking a look. I was starting to doubt myself ^^
May 20, 2020 12:48
@Peilonrayz You there? I have a problem understanding if I'm too dumb to understand the code or if the OP does not understand how Python works: codereview.stackexchange.com/questions/242617
May 8, 2020 10:13
codereview.meta.stackexchange.com/questions/10480/… Question on how to most effectively review Jupyter notebooks on Meta (asked by me). Anyone wants to have a look?
Apr 14, 2020 15:37
I would have expected a featured Meta post, though...
Apr 14, 2020 15:37
@Peilonrayz That's more specific than I expected :D
Apr 14, 2020 15:25
@Mast 6! Related, when did the UI for the Close Votes change?
Apr 9, 2020 14:20
@Mast Especially because that question for once does not have a bad description. Informative and to the point.
Apr 9, 2020 13:57
@Peilonrayz Well, since you recently asked a question, hopefully at least one? :P
Aug 28, 2019 13:28
@Mast Didn't even see that, yeah
Aug 28, 2019 09:11
@Duga Should be fine, it's just fixing a typo in the example data provided.
Aug 27, 2019 10:28
@Duga It's just some formatting of the testcases, no worries
Aug 27, 2019 09:47
@Duga It's just formatting, relax
Aug 26, 2019 15:34
@Peilonrayz Thanks :)
Aug 26, 2019 15:32
Unrelated, is anyone going to take pity and cast the fifth reopen vote on this question (which, full disclosure, I already answered): codereview.stackexchange.com/questions/226586/… The question has been edited since closure to contain more background information on what the code is supposed to do.
Aug 26, 2019 15:27
@Peilonrayz While I think that might qualify as maintainer of the code, I would argue the OP clearly does not know why the code is written the way it is since that seems to be the question they are asking.
Apr 17, 2019 13:12
@Mast Hehe, true. Still contemplating whether I should stop at 2000 like Stephen Rauch or just keep on going :D
Apr 17, 2019 12:05
@Mast Yeah, it feels like it has been piling up slightly, recently. I did 7 today and like 14 yesterday...
Apr 17, 2019 10:55
@Mast Welcome back(?)!
Apr 12, 2019 15:21
@Duga I think its fine (but then again, I would say that, I guess) I added the HTML/CSS from the posted codepen link and made it into a snippet.
Apr 12, 2019 15:09
@Duga The edit made it on-topic, answer should have been a comment anyway
Apr 11, 2019 15:53
@Duga That one looks like it is actually invalidating, though...
Apr 11, 2019 15:53
@Duga Agree with Sam, Duga got the username wrong. Looks like a rather pointless edit as well...
Apr 11, 2019 15:51
@Afonso Hey!
Apr 11, 2019 15:50
@Peilonrayz I'd say it is off-topic, even if just for a lack of more context of the real code...
Apr 11, 2019 14:35
@Duga Looks like they invalidated it twice even... rolled back
Apr 9, 2019 16:29
@SᴀᴍOnᴇᴌᴀ Yeah, and then there's the weird formatting with quote markup. Anyways, I put it in the close vote queue as "Unclear what you are asking"
Apr 9, 2019 16:22
@SᴀᴍOnᴇᴌᴀ Yeah, the code reads like it is meant as a joke? Also the rewriting in Python part is obviously off-topic...
Apr 5, 2019 13:20
@Duga It's fine, only overall indentation was fixed, before the code formatting was wrong...
Apr 4, 2019 12:28
As long as it leaves the answering to us, I won't object
Apr 4, 2019 12:26
#OurModeratorsAreAllBots
Apr 4, 2019 12:25
@Mast KK. Felt very spooky. At least I'm not alone :)
Apr 4, 2019 12:22
Stupid question: Are "No longer needed" comment flags auto-approved under some circumstances? Just took way less than a second to get a comment removed and the flag marked as helpful. (I had previously deleted my comment pointing out something, to which this comment was the response along the lines of "fixed". There were no other comments on the question)
Mar 18, 2019 10:00
@Ludisposed @Heslacher Thanks!
Mar 18, 2019 09:52
Anyone want to cancel out my erroneous approve vote on this suggested edit fixing the OP's formatting when they shouldn't: codereview.stackexchange.com/review/suggested-edits/112825
 
Mar 1, 2019 19:52
@DarrelHoffman: The spaceship is presumably filled with air (and/or denser material as stated by the OP) and at least 19m long (approximate distance between the batter and the pitcher in baseball), so you would have a similar effect. Maybe the front (at least the part not hit by the rock) survives a bit longer, until the gamma-rays from the back of the ship reach it.
 
Feb 22, 2019 16:23
In that code total is actually undefined. You need to replace it with games_to_sim at both occurences.
Feb 20, 2019 10:44
Very weird...
Feb 20, 2019 10:33
The wrong coloring of the closing } could just be a problem with your syntax highlighter, but getting the wrong output means you are doing something else wrong...
Feb 20, 2019 10:32
>>> print(f"The player won {wins} of {total} games ({wins/total:0.2%})")
The player won 10 of 23 games (43.48%)
Feb 20, 2019 10:31
If I do (Python 3.6.3) it:
Feb 20, 2019 10:26
@Kevin: Looks fine to me? It even correctly colors the expression part. Have you tried running that line?
Feb 20, 2019 10:26
@Kevin: Maybe you are missing the %? You either need that or a :0.2f.