36
colinmcnicholl
13 42 52 Leader of the month
8040/ 8195
Colin McNicholl
Last seen 6 months ago
Member for 6 years, 9 months, 10 days
Difficulty Normal
Best reviews / Newest reviews
recursion & memoization-kurosawa4434 3 2
Really tidy and clean layout makes you code the kind I am happy to spend time looking at more closely. Not only that but overall I believe it is possibly the most efficient from a sample of solutions posted by other community members. Some results from timeit module assessment I made below: More
class factory-Sim0000 3 1
Not sure how random these random reviews are. This code is no doubt created by someone with much more coding experience than I have. Nevertheless, I will give it my review. It is readable, being sparse helps in this respect. It is explicit in that it is obvious, given the clear variable names what More
... and that's how you use islice.-veky 2
Really nice solution. Many others have shown skill in creating comprehensions which whilst fairly compact are, I think not as readable, as an indented loop or your even shorter yet easier to understand solution. I had not used islice before so thanks for the lesson. More
meh-ssk8 2 1
Nice solution, avoiding import of re module. The else on line 19 looked out of place but after studying your code for a while I understood. More
First-Pouf 2
Very good. I would not have deduced from reading the python docs for unicode module that category(c) 'Mn' ("Non-spacing mark") contains every accent. Your comments are useful. Triple quotes are more appropriate for comments below the function definition. More
First (list comprehension)-ssk8 1
You have expertly made the code very sparse. A very minor observation would be that in cases were weights is a very long sequence with mirror image either side of central fulcrum It seems a little wasteful to have a for loop over the full length of weights in cases such as [1,1,1,9,1,1,1]. My code: More
First-fokusd 1
You did well to have the patience to read and understand the long description for this mission. Line 2: Block comments. The first word should be capitalized, unless it is an identifier that begins with a lowercase letter. Also comments should be complete sentences. See PEP8. Your use of '_' as More
re.match()-kurosawa4434 1
Fantastic piece of code. Certainly convinces me that this mission merits using re module. I have not noticed 'escape' in module re before. More
No patterns-vit.aborigen 1 1
is_exist function does not cover all conditions: CHANNELS = ["BBC", "Discovery", "TV1000"] controller = VoiceCommand(CHANNELS) assert controller.is_exist(4) == "No" assert controller.is_exist(3) == "Yes" # AssertionError: code returns 'No' More
First-Merzix 1 1
Clean and clear. Excellent. Cannot think of anything to add. More
First-kurosawa4434 1 1
Good code. I like the methods for name, work, money and home. Possible improvements would be: line 6: the __init__ ends at column 120. Break this into 2 lines, e.g.: class Person: def __init__(self, first_name, last_name, birth_date, job, working_years, salary, country, city, More
First-marcinokonek99 1
Well done. It would seem you are code literate. More
One-line (itertools.chain.from_iterable)-fokusd 1
Nice code. You could have avoided the nasty looking indices with the following: return chain.from_iterable(range(start, stop + 1) for (start, stop) in items) Virus-free. www.avast.com < More
First-tokyoamado 1 1
Good code. Your code works and is fairly short. I could be missing something but it is not clear to me why your function is called 'extractOne' ? It reduces the length of the list 'numbers' but not necessarily by one. This maybe as I rarely use reduce. I find the line: candidates = reduce More
5-liner: map point-przemyslaw.daniel 1 1
Very good compact and also clear. IMO code would look better if you leave a single space either side of any operator, e.g. the '*' in line 2. You did this with the '%' operator on line 4. Line 3 could have been: data = [ord(x) - 48 for x in reversed(data) if x.isalnum()] More
sorted(sorted)-flpo 1
Very neat code. No map, no lambda. Good use of key. More
First-MrPod 1
A nice demonstration of how it can be done in one line. Satisfies sparse is better than dense and flat is better than nested. Not exactly beautiful. Variable names are too short to be informative. A bit on the long side at 86 characters in length. A return after say "sorted(" would make the code a l More
First-Sillte 1 1
Good effort and well done on successfully solving the mission. It would be worth you going back over this mission. Instead of lines 4 and 5: kinds = ["golden coin", "silver coin", "ruby"] weights = [info[kind]["weight"] for kind in kinds] you could have: weights = [v['weight'] for v in info.valu More
Buttons generator (with DFS) and a reverse_sorting decorator-Phil15 1 1
A lot of features packed into this code. First line and we have lambda function, * unpacking operator and keyword arguments on show. Line 3 and the decorator is being used to customise the buttons function. Good choice of variable names, e.g. nb_rows, nb_cols. These mean that the compact lambda More
First-Askanio234 1
line 20: The thought process seems strange to me for a function named fight. While unit_1.health or unit_2.health would be true for all cases except if both were False. So it is a bit like if one of the units has health, i.e. is_alive and the other has 0 health, i.e. is dead, do stuff, i.e. have More
1
2 3 4 5 6 7 8