57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 22 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
Median-egorkreslin 1 1
You're the one who said you'd like to code as I do, right? Ok, first lesson: [`len`](https://docs.python.org/3/library/functions.html#len) builtin function. More
I love oneliners!-wasd 1 1
Comprehensions / generator expressions are usually better than higher order functions. map(int, map(methodcaller('replace', ':', ''), entry)) ~~~> int(time.replace(':', '')) for time in entry And your love for oneliners is no valid excuse for that horrible duplication of code. :-P ( More
Complex numbers for x,y position-JamesArruda 1
Yes, of course complex numbers are a natural representation of 2D. But you can go _much_ further. For example, instead of dirs[dir_idx], you can just use (-1j)**dir_idx. The set of complex numbers is not just 2D vector space, it's also a field. ;-) More
First-egorkreslin 1
Don't worry about English, worry about Python. ;-] Second lesson: [`ord`](https://docs.python.org/3/library/functions.html#ord) builtin function. ;-) More
Weird, I managed to make it work-livingdead 1 1
You also managed to overcomplicate it. :-D More
O(1)-DiZ 1
If it didn't have so much repetition, you'd get more thumbs. :-) More
First-gyahun_dash 1 1
Slicing is better than indexing by range. And you don't need those mins then. More
First-fishiwhj 1 1
Line 18 is wrong. rounded gamma is _not_ necessarily equal to 180 - rounded alpha - rounded beta. BTW why do you reinvent the wheel (in this case, builtin round function)? More
namedtuple-Sim0000 1 1
namedtuple('complex', 'real imag') is better, it supports more operations. ;-) More
ClockAngle-bunnychai 1 1
Line 2: you can use map. Line 3: you don't need () around h % 12. More
FIzzBuzz-DillonKo 1 1
Why parens? You can even say if not number%15: without parens. More
Two solutions-ANTL 1 1
That's not a generator, it's a comprehension. :-) More
~0my3[_p\x7f{-skunkfrukt 1
Yes, that's how a 7bit washing machine embedded microprocessor would solve the problem. :-D Python has a bit richer data structures on your disposal. :-] (Unfortunately, the code for 8 is not valid ASCII... but neither is its complement. Ah, the good old times of punched cards...:) More
First-nbaramichai 1
Interesting idea to use numpy to solve the system. However the system is modular, so you have to guess k (additional number of turns) so the whole thing becomes a bit clumsy. (But still, explicit loop would probably be better than recursion with a default parameter.) Numpy _can_ be exploited to More
Slow beginner-SFF_libert 1
First, array[len(array)-1] ~~~> array[-1] Second, don't ever write empty except! Say what you really guard against: except IndexError: More
Straightforward-cougarmilk 1
Those indices are not so necessary. :-) row1, row2, row3 = result More
First-pohmelie 1 2
Line 17 is really pointless. :-) You don't need zip inside map. map(sum, p, dp) is ok. Start of line 23 can be written: np in m.keys() - visited. Not very useful here, but good to know: keys is a set-like object. More
Dumb Vampire-obone 1 1
Deque might be better as an underlying type for the Army. More
_-blaxmi 1
You like those complicated control flows very much, do you? :-D You're one of rare people here that can stuff if/if/else, nested if, not, or, continue and return from for loop in about 6 PEP8-approved lines. :-D More
First-PositronicLlama 1
Very high level code. Exact, documented, with references. I like it. BTW line 28 made me laugh. Avoiding code duplication at every price. :-D More