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*
7h
comment Convert partial function to method in python
-1 Because this is a workaround, but it is not a real method - it is just a callable stored on the instance. Crucially, Foo.g doesn't exist.
7h
comment Differences between functools.partial and a similar lambda?
I agree it is not a duplicate, I have re-opened your question. For others reference, the related question is here.
1d
comment why "{}".format(1241.123124) is different from "{:g}".format(1241.123124)
It is also mentioned "The default precision is 6."
1d
comment Numpy array dimensions
@nobar actually it is a property (which is both an attribute and a function, really)
1d
comment str.format on non-template string silently ignores template arguments
Yes, I have noticed that and thought it was strange for the same reason (especially since partial templating 'hello {x} {y}'.format(x=123) raises exception rather than returning 'hello 123 {y}'
1d
asked str.format on non-template string silently ignores template arguments
1d
comment Python: Datetime - How to tell if regular epoch or epoch milliseconds?
practicality beats purity, the question I've referred you to has some practical solutions to this problem.
1d
comment Python: Datetime - How to tell if regular epoch or epoch milliseconds?
possible duplicate of How to test if a given time-stamp is in seconds or milliseconds?
2d
revised How do I concatenate a boolean to a string in Python?
added 62 characters in body
2d
comment Why does str(KeyError) add extra quotes?
LOL @ "Too bad."
2d
comment Is `-` used only with cd?
I use all the time git checkout - to switch to the previous branch
2d
revised Is there a single function for matching and replacing?
added 292 characters in body
2d
answered Check list of numbers is a subset
2d
accepted Hook into "command not found" handler in Ubuntu
Jul
27
answered Is there a single function for matching and replacing?
Jul
27
answered Python: looping over characters in a string when string is changing
Jul
27
answered Python multi threading with queue
Jul
27
comment How can I type a backslash with no backslash key?
I mentioned in the post that this gives me planking L ¬
Jul
27
comment Full range with white keys only?
check this out youtube.com/watch?v=s8De5eg1kic
Jul
27
revised Variable assigned to the last executed line?
added 26 characters in body
1 2 3 4 5