Python and C/C++ interop links
“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
“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
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://numba.pydata.org/ A faster alternative to Pandas isin function Pandas performance Pandas iterrows alternatives (performance issues)
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 »
Goal I was trying to transform the following structure: The format is such that each value (rows_by_category[‘a’]) is a list of rows, where the first row is the header, and… Read more »
Python provides two different but related protocols called an iterator and iterable. The Python Practice Book provides a good explanation, including complete examples. I highly recommend reading it and then… Read more »