Hi guys, thanks for all of the nice comments.
I'm having this bug: "maximum recursion depth exceeded in cmp" if someone could help, please send me an email to
raincesart@gmail.com
I am not a programmer, but from what I can gather with a quick research, almost 90% of the cases with that problem revolve around an image name and a "file" name in your coding having same name, so it creates some kind of a "loop"... Hope that helps a bit...
Edit: another solution, which is the only different "fix" that I ran into beside this file name error one, revolves around changing from "recursion" algorithm(?) to "iterative" one, dont understand this since I'm not a programmer, but here's one example of that change (I'm assuming you'l understand it better then me):
For example, instead of:
def fib(x):
if x < 2: return x
return fib(x-1) + fib(x-2)
you can write it iteratively like:
import collections
def fib(x):
tasks = collections.deque([x])
res = 0
while tasks:
v = tasks.pop()
if v < 2:
res += v
continue
tasks.append(v-1)
tasks.append(v-2)
return res
As you can see, the iterative variant is quite messy, but it makes the state explicit. (Full code at
You must be registered to see the links
)
(hope I'm not breaking some rule by posting a link)