Tag: python
-
Working with the local filesystem and with S3 in the same code
As data people, we need to work with files: we use files to save and load data, models, configurations, images, and other things. When possible, I prefer working with local...
-
Sharing the results of your Python code
If you work, but nobody knows about your results or cares about them, have you done any work at all? A proverbial tree in the proverbial forest. Photo by veeterzy...
-
How to become a Python professional in 42 hours?
Here’s an appealing ad that I saw How to become a Python professional in 42 hours? I’ll tell you how. There is no way. I don’t know any field of...
-
TicToc — a flexible and straightforward stopwatch library for Python.
Many years ago, I needed a way to measure execution times. I didn’t like the existing solutions so I wrote my own class. As time passed by, I added small...
-
The difference between python decorators and inheritance that cost me three hours of hair-pulling
I don’t have much hair on my head, but recently, I encountered a funny peculiarity in Python due to which I have been pulling my hair for a couple of...
-
Conference Recap: EuroSciPy 2018 — Data for Breakfast
See my recap of the recent EuroSciPy, published on https://data.blog In which Boris Gorelik shares his favorite talks and workshops from EuroSciPy 2018. via Conference Recap: EuroSciPy 2018 — Data...
-
One of the reasons I don't like R
I never liked R. I didn’t like it for the first time I tried to learn it, I didn’t like it when I had to switch to R as my...
-
What is the best way to handle command line arguments in Python?
The best way to handle command line arguments with Python is [defopt](http://evanunderscore/defopt: Effortless argument parser). It works like magic. You write a function, add a proper docstring using any standard...
-
Measuring the wall time in python programs
Measuring the wall time of various pieces of code is a very useful technique for debugging, profiling, and computation babysitting. The first time I saw a code that performs time...
-
Gender salary gap in the Israeli high-tech — now the code
Several people have asked me about the technology I used to create the graphs in my recent post about the gender salary gap in the Israeli high-tech. Like 99% of...
-
The Y-axis doesn't have to be on the left
Line charts are great to convey the evolution of a variable over the time. This is a typical chart. It has three key components, the X-axis that represents the time,...
-
The fastest way to get first N items in each group of a Pandas DataFrame
In my work, the speed of code writing and reading is usually more important than the speed of its execution. Right now, I’m facing a challenge of optimizing the running...