57
veky
22 48 64 Leader of the month
44583/ 53887
Last seen 13 hours ago
Member for 11 years, 6 months, 6 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
scan circle perimeters with variable step-ayubutrym 1
Nice adaptive algorithm, but you're doing one thing wrong: when using tau, never say 2*pi in the comments. If you are True Believer in Tau, then you know it is more elementary than pi. If you feel you must "explain", use "turn" or "full turn". ;-) More
test corners & split undecided-juestr 1 1
Very nice approach! Is this exact (up to the float inexactness)? I think it is. More
First-MBM_1607 1 1
You don't need those backslashes (except the last one, unless you add another pair of parentheses), and you can indent the subconditions accordingly to their grouping/priority. More
First-RomanKorbutyak 1 1
Nice. Could be a bit simpler if you pulled int conversion into iteration itself: for digit in map(int, str(number)): if digit: result *= digit And use *= and similar assignments... they do make code easier to read. --- A minor philosophical point: "result" would probably More
First-tuxninja 1
I know you're proud of this solution (I read your blog;), but your operators are a bit convoluted, your if is unneeded, and your iteration is half-baked (literally;). How about this: def checkio(number): numerals = { ... } roman = '' for value, phrase in sorted(numerals. More
First-RomanKorbutyak 1 1
Use // for int division, much more readable than int(/). You can also use divmod since you need both size % 2 and size // 2. And eliminate duplication, there's no need to write med calculation twice. You can also use if...else expression, but it's not necessary. And a wizard would use `data[med] + More
namedtuple-Sim0000 1 1
namedtuple('complex', 'real imag') is better, it supports more operations. ;-) More
Queueing-veky 1
I didn't think I'd ever post an [NSFW link](https://xkcd.com/853/) to CiO, but there's a first time for everything. :-D More
clean(cryptotext).translate(cipher(delta))-flpo 1
Yes, you should use string.translate. But you should use [all of its capabilities](https://py.checkio.org/mission/caesar-cipher-decryptor/publications/veky/python-3/punctuation-as-junk/?ordering=most_voted&filtering=all), not fall back to regex for such a simple thing as deleting extraneous characte More
Verbatim DP-ale1ster 1 1
Cool idea, can be onelined without much problems. checkio=c=lambda s,w=1:len(s)and max([s[0]+c(s[2:],0),s[0]+c(s[1:])]+w*[c(s[1:],0)]) Especially jarring is "whisker == True" instead of just whisker. Comparing bools to True makes as much sense as adding ints to 0. :-P More
zero line solution-piter239 1 1
Here are 3+bool(number of lines you say are there) pluses. :-P 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
First-RomanKorbutyak 1 1
First, read about `collections.Counter`. It will make your life a lot easier. Second, `dict()` is `{}`. But you probably knew that. :-) Third, drop [] inside (). They are just slowing you and Python down. `sorted(k for ...)`. And fourth, `sorted(blah)[0]` is really more readable and more efficien More
64 chars-Sim0000 1 1
Mine is shorter, mine is shorter... :-P More
truth table-shota243 1 1
ROTFL. But it would be way more cool if you mapped OPERATION_NAMES to symbols from "∧∨→⊕≡" instead of relying on indexes. This is not maintainable. ;-P More
First-michael.kej 1
You could have said just cnt += c in text Or just use sum like it was meant to be used. ;-) More
First-RomanKorbutyak 1 1
You don't need () after keywords (if, elif...). Also, you can use `not a%b` to check if a is divisible by b (you don't need parentheses). Alternatively, you can chain comparisons in line 9: if number % 3 == number % 5 == 0: More
Who_ya_gonna_callʔ-V.Shkaberda 1 1
Clear? :-D You're mapping the classes through calls to names then through dict to namedtuples. Cutting out the middleman might be profitable. ;-) More
First-RomanKorbutyak 1 1
Nice and obvious. :-) You could have said for w2 in words_set - {w1}: in line 3, it would make your condition simpler. But check `itertools.permutations`... it is a nice tool made for tasks like this. ;-) A nitpick: why do you check `w2.endswith(w1)` instead of other way? Of course it's equi More
First-RomanKorbutyak 1 1
[] is probably nicer way to write list(). But this is ok if you really want to be explicit. :-) And if you wrote [], you'd probably be more inclined to write it as a list comprehension, though explicit loop is also fine. More