Python: modifying imported value
TL;DR: Python statement from module import obj creates a copy of the object in the importing scope. In other words, from module import obj is roughly equivalent to obj = __import__(‘module’).obj. […]
TL;DR: Python statement from module import obj creates a copy of the object in the importing scope. In other words, from module import obj is roughly equivalent to obj = __import__(‘module’).obj. […]
Our RabbitMQ client written in Go failed with the following error message: rabbitmq | 2024-10-23 17:54:01.311544+00:00 [error] operation basic.ack caused a channel exception precondition_failed: unknown delivery tag {message_tag} Taken at […]
Creation of Python packages underwent a few significant changes in the last 3-4 years. Here’s my note to self to remember what was changed/deprecated when: “Eggs” => “Wheel“ “Eggs” was […]
TL;DR Before transferring a new domain to a registrar, contact support, and make sure there are still live humans behind the robots. If there aren’t, RUN!!! My two domains have […]
When serializing a dataclass, by default marshmallow-dataclass emits nulls for all fields that have the value of None. This is not necessariy most of the time and pollutes the resulting […]
Last night I was talking to something which could be a human or a robot, I could not tell. But that’s not necessarily a good thing: not only AI became […]
TL;DR Python generator expressions can be iterated over only once. I mentally mapped Python generator expressions to C# IEnumerables, which can be iterated over multiple times. In reality, Python generator […]
My analog doorbell has died, so I am on the market for a doorbell camera. I would like to avoid storing my videos in the cloud, so it rules out […]
What is dead code? Looks like it depends on who you ask. Some people think it’s unreachable code than never executes. Other people think that it’s redundant code that does […]
TL;DR use marshmallow-dataclass. Serializing JSON into dataclasses with validation proved to be unexpectedly difficult. By “validation” here I mean type checking (this must be a valid integer), range checking (this […]