wim

London, United Kingdom

google.com

Age: 32

Hi from London, England! I hope my answers have been helpful for you. Python developer with interest in mathematics, music, robotics and computer vision.

project euler progress badger badger badger

‚Äč

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
9h
answered calling a method/function from a class variable
11h
comment how to argparse have argument print a string and do nothing else
It might be easier just to look in sys.argv before calling parse_args
14h
answered finding identical rows and columns in a numpy array
15h
revised finding identical rows and columns in a numpy array
edited body
16h
comment finding identical rows and columns in a numpy array
Is performance important for you?
22h
revised Can an object inspect the name of the variable it's been assigned to?
added 19 characters in body
22h
answered Python: Get name of function which called this function
1d
answered How to know the exact output from a Python subprocess.check_output() call?
1d
comment refactor legacy python code: from u'...' to '...'
You should also know that this is purely a cosmetic change. With unicode literals, the strings with u prefix will be parsed all the same (the u is simply ignored, it doesn't cause any error to have them remain there). The important part is what happens to bytestrings!
1d
revised refactor legacy python code: from u'...' to '...'
added 59 characters in body
1d
answered refactor legacy python code: from u'...' to '...'
1d
answered Make objects support "in"
2d
comment What is the list comprehension for right triangles in python à la Haskell?
I can't really call this elegant; there is no need to nest the loop 3 times, when the sum equality can be trivially used to constrain one of the variables.
2d
comment Python : counting module imports?
pypi.python.org/pypi/snakefood
2d
accepted Aliasing the dict keys in a Django QuerySet.values call
2d
answered Aliasing the dict keys in a Django QuerySet.values call
2d
comment How do I set an Argparse argument's default value to a positional argument's value?
Actually, I prefer the solution of hpaulj too. I didn't know about this usage of nargs='?' before.
2d
awarded Popular Question
2d
comment BrainF***edBotsForBattling - A Brainf*** Tournament
This post is good because it made me laugh
2d
revised How do I set an Argparse argument's default value to a positional argument's value?
added 754 characters in body
1 2 3 4 5