57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 11 hours ago
Member for 11 years, 6 months, 24 days
Difficulty Advanced
We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time.

Best reviews / Newest reviews
for-drejcek 1
for it: if not cond: continue doit is a strange antipattern. Wouldn't for it: if cond: doit be clearer? More
.weekday()-drejcek 1
Nicely explicit. :-) [Nitpick: I don't know why you're importing date. I mean, I know why, but you're wrong.:] More
2p = bcsin(alpha)-drejcek
Aumph. Too many weird things here. First, use round builtin. Don't fool around with math.floor, + 0.5 and other hairy stuff. Second, when you round alpha and beta, and subtract them from 180, you won't necessarily get rounded gamma. I'm sure you know it. Third, that "test" function really h More
Check with for loops and ifs-DiracRules
Different operators can be chained too. if a == b == c != '.': return a More
First-DiracRules
Instead of .keys, try using .items: for i, f in lettersFound.items(): Then you can write f instead of lettersFound[i] every time. More
Plain, simple solution-DiracRules 1
It's ok, but man, that semicolon hurts my eyes. :-P More
Quick 'n' easy-DiracRules
A nice way to complicate a simple task. :-D More
First-DiracRules 1
?? What _did_ you think float(median) does? Changes the type of a live value? :-O That's impossible even in C. ;-P More
First-esatana
You were trying to avoid use of .count, but weren't successful? :-D More
Mycroft's-Mycroft0121
You really don't need that much code duplication. :-) More
Fraction-free GE-DiZ 1
I'm not quite sure what you _get_ by eliminating fractions (since you still do the same operations, just above the big common denominator), but for bragging rights, it's ok. :-) More
xus-ShuaiXu
Nice overflow avoidance. :-) Of course, it would be better to let Python decide. More
xus-ShuaiXu
Using list.append when you want a bound method is _really_ confusing. I advise you reconsider your name choices. ;-] Don't iterate through indices if you need elements. for x in data: if data.count(x) != 1: result.append(x) And what do you think line 15 does?? Hint More
First-blaxmi
If you know about collections, you should know about collections.Counter. ;-) BTW, line 6 would probably be more readable as if 'a' <= c <= 'z': And learn to use min with key parameter. Much tidier than Schwartzian transform. ;-) More
naive-blaxmi
(copy is not really needed, could be avoided with more careful coding.) routes[a, b] is easier written (and read) as routes[a, b]. Lines 17 and 19 could be combined with "or" (or even negated, avoiding "continue", but that's subjective). DIRECTIONS probably shouldn't be a dict, but a set of More
First-blaxmi
Nice generator for triangular numbers. I'll steal that sometime. ;-] More
First-blaxmi
Very uniform. :-) I don't really get why you extract MARK_O and MARK_X to the beginning, but a maybe interesting fact: if they were frozensets, you could have a set of them in line 10 (and "set in set of frozensets" construct works fine). More
First-Drisbee
collections.Counter is screaming "Use me, use me!!". :-P Again, line 4 is completely unnecessary. And line 2 too. You can just `for x in text.lower()` inline. key is much more versatile than this. It doesn't need to be something directly inside the items you want to order. See my solution for exa More
Cloud number... -veky
Are the clouds numbered starting from 0? Or 1? :-D More
First (breadth-first-search)-lisovsky
Ah, yes, the "sugrically removed recursion" solution. :-D But still, it's nice that you converted it to BFS (queue) instead of the obvious DFS (stack) one. (Not more than 3+ because you're too anxious about types. In a duck-typed language, it is mostly just nuisance.) More