Hashing and Equality in Python
Don’t override
__hash__
and__eq__
to force objects to hashable. Use immutable objects instead.
Source: Hashing and Equality in Python, an article by Roy Williams.
Don’t override
__hash__
and__eq__
to force objects to hashable. Use immutable objects instead.
Source: Hashing and Equality in Python, an article by Roy Williams.
Pandas pivot is an essential tool of every Data Scientist. Some use it daily and others avoid it because it seems complex. I was in the latter group for quite a while. After I took the time and did some research, I felt like I wasted a lot of time writing unnecessary code. To my surprise, I already knew the main building blocks of pandas. It is all simpler than it may seem.
Source: Pandas Pivot — The Ultimate Guide, an article by Roman Orac.
The new Facebook design started rolling out for users lately, and I got it almost two weeks ago. At first, every UI element was a bit bigger for me but it was a matter of days until I got used to it. In this article, I will talk about all the interesting things I saw.
Let’s dive in!
Source: CSS Findings From The New Facebook Design, an article by Ahmad Shadeed.
The use of mocks in unit testing is a controversial topic (maybe less so now than several years ago). I remember how, throughout my programming career, I went from mocking almost every dependency, to the "no-mocks" policy, and then to "only mock external dependencies".
None of this practices are good enough. In this article, I’ll show you which dependencies to mock, and which to use as is in your tests.
Source: When to Mock, an article by Vladimir Khorikov.