38
juestr
17 44 52 Leader of the month
8788/ 9195
Awesome Team Jürgen Strobel
Last seen 3 hours ago
Member for 5 years, 1 month, 24 days
Difficulty Normal
Best reviews / Newest reviews
incremental inner product-juestr
This theoretically fast algorithm avoids a lot of repeated additions and multiplications by intertwining creating permutations and their inner products with `coeffs`. But in practice eschewing itertools.permutations or numpy does not pay off well, compare to [this](https://py.checkio.org/mission/cr More
packed with fun-veky 1 1
Nice stack/slist. Any special reason you chose (tail, head) in the opposite order than customary? More
Use Numpy matrixes-U.V 1
Using a bit more from numpy you could vectorize everything in this mission. E.g. `numpy.subtract.outer` on points basically replaces your 2 outermost loops, it creates a matrix using a full outer join with pairwise subtraction for all points. More
Optimal-veky 1
I am wondering if binary search is strictly optimal, or an approximate solution (polynomial) could be used to guide the search ;-) More
A139250-Phil15 1
Python's rather new built-in `int.bit_length` makes `msb` superfluous. Curiously everyone copied it or imported `math.log2` instead. More
eternal classic-dx2-66 1 1
Why the `deque`? You are appending and popping on the right side only, which is efficient for a simpler `list` already. More
First-freeman_lex 1 1
A fine algorithm, but a `list` would make a far better stack than a `str`. More
regex-juestr
In retrospect, the pattern could be simplified to `rf'({_l}{_u})|({_u}{_u}{_l})'`. More
Casting out nines II-amandel 2 1
You could replace the first inline-if too: return num and (num % 9 or 9) More
juestr's reordered-veky 1
The search is much better structured now, but I'd still prefer doing it in integer arithmetic. if number // base ** i ... or even if number >= base ** i or not i: Yes I may need to repeat the last calculation in Decimal and can't show off a walrus, but given int operations are **much** More
Decimal FTW-veky 1
`decimal` can be used to do quantization, rounding and formatting of the result too. Funnily I didn't use it to find the right power as it can be done with integer math easily. More
regex, 7 lines-kdim 2 1
That's a rather _creative_ solution. More
sympy.topological_sort-Phil15 1
Cool. There's `graphlib.TopologicalSorter` in the stdlib now too, but it needs some tweaking to get the [alphabetical order correct](https://py.checkio.org/mission/determine-the-order/publications/juestr/python-3/graphlibtopologicalsorter/). More
Cramer EGCD-ogoro 1
Cool math, I guess, although I can't follow how the determinants matter. More
5th-gyahun_dash
Yeah that's the right way to do it. I realized too late that *everything* is to be lowercased except the escapes, and that there is no reason to parse and handle the different parts of the URL separately. Of course, if the path would countain `:80` followed by a non word character this would break, More
Third-gyahun_dash
That's a nice showcase of itertools (although I prefer importing the functions directly). I especially like how `avoidable` works. It's not very efficient though, `filter(satisfied, ...)` checks whole boards created by `product(*places)`. A lot of the search space could be pruned if placing queens More
I found this tool in my Grandpa's attic.-veky 1
That's cool, but I guess it relies on unique node values. Which the examples and tests imply, and maybe graph theory also, but my developer self would have needed it spelled out. :/ More
First-dagger126
Strictly speaking the way you `split()` is incorrect. Words might be separated by punctuation only, although no tests do this. More
all-kurosawa4434 2 1
Strictly speaking since `items` is an `Iterable` we shouldn't use `[]` on it. (The tests are bad.) More
recursive BFS + for else-ogoro 1
Version with a recursive _generator_ :-) https://py.checkio.org/mission/88th-puzzle/publications/juestr/python-3/first/ More
1
2 3 4 5 6