Towards Data Science
Why You Should Wrap Decorators in Python
5 min · · Take advantage of functools.wraps · Shared by 41, including rohit, Evan (he/him)
coady.github.io
Closing files
6 min · · Contrarian view on closing files.¶It has become conventional wisdom to always explicitly close file-like objects, via context managers. The google style guide is representative: Explicitly close files · Shared by 10, including rohit, Real Python
hackeregg.github.io
Speeding up function calls with just one line in Python
4 min · · One line summary: Use lru_cache decorator · Shared by 10, including rohit, Real Python
Towards Data Science
Different ways to iterate over rows in a Pandas Dataframe — performance comparison
4 min · · Why I am interested in the performance of iteration · Shared by 4, including rohit
martinheinz.dev
Making Python Programs Blazingly Fast
8 min · · Let’s look at performance of our Python programs and see how to make them up to 30% faster! · Shared by 79, including programarfacil.com, Real Python, Jesús Torres 👩💻, Nico Müller 🇺🇦, rohit, Evan (he/him), Ryan R. Rosario
Stack Overflow
Execute Python script via crontab
1 min · · I'm trying to execute a python script using the Linux crontab. I want to run this script every 10 minutes. I found a lot of solutions and none of them work. For example: edit the anacron at /etc/c... · Shared by 3, including rohit
reddit.com
Fourier drawing practice
1 min · · Posted in r/3Blue1Brown by u/Contra • 109 points and 0 comments · Shared by 6, including rohit
Stack Overflow
numpy 1D array: mask elements that repeat more than n times
2 min · · given an array of integers like [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5] I need to mask elements that repeat more than N times. To clarify: the primary goal is to retrieve the bo... · Shared by 5, including rohit