namedtuple or NamedTuple?
NamedTuple is a type-annotated namedtuple
NamedTuple is a type-annotated namedtuple
Below is a demonstration of using a condition variable. The purpose of it is waiting on some condition to be met, related to a shared resource, and doing it in… Read more »
Consider the following code: It produces the following output:
“Hello, World!” C-extension (my fork – no change, for backup) PyBind (C++ easy binding): The library Example – couldn’t make it work on my machine yet cppimport – usually using… Read more »
https://docs.python.org/2/library/2to3.html https://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html https://engineering.yoyowallet.com/yoyo-moves-to-python-3-df1d1692e694 http://python-future.org/compatible_idioms.html
Performance http://numba.pydata.org/ A faster alternative to Pandas isin function Pandas performance Pandas iterrows alternatives (performance issues) Fast, Flexible, Easy and Intuitive: How to Speed Up Your Pandas Projects Misc Working… Read more »
Tools: Tracemalloc, memory_profiler, meliae (Python 2 only), Pympler Built-in modules: gc Links: Python Memory Issues: Tips and Tricks Muppy toturial Debugging with Tracemalloc Using profilers – the basics Py-spy – top-like live view… Read more »
Consider the following context manager: The following code with print ‘bla’ between ENTERED and EXITED but will also raise the exception: That’s what I would expect from a context manager… Read more »
Why Lazy Logging and my solution While debugging some issue I needed to get more details about an object. Generating this information meant combining some fields, getting length of some… Read more »
WARNING: The following decorators are NOT production grade, not thoroughly tested and should only be used for debugging. I am aware that as far as decorators, they are not perfect… Read more »