Equivalent of C# delegates in Python
Coming from C# background, I was trying to understand whether Python allows to pass obj.method where ordinary function is expected, and if yes, how could it possibly work. Consider this […]
Coming from C# background, I was trying to understand whether Python allows to pass obj.method where ordinary function is expected, and if yes, how could it possibly work. Consider this […]
I stumbled upon an article (https://danluu.com/cli-complexity/), that explores the dramatic growth of the number of command line options in most popular Unix commands between 1979 and 2017 and explains why […]
When I was going to Worldometer’s coronavirus page, it would redirect me to some stupid scam web site saying “you made 5 billionth search”. It happened only one one of […]
Coming back to the blog after long break. Today, almost by accident I found how logical operators work with None in Python. The result is surprising, because it is not […]
I have a very nicely built 12 year old Dell tower, that I inherited from some startup, which I use as a home server running Ubuntu. I also have a […]
Python has two ways to convert an object to a string: str(x) and repr(x). str is supposed to be user-readable, and repr is more technical, e.g. for debugging purposes. To […]
TL;DR: Python type cast looks like an assertion: # Python x = expression_returning_Base assert isinstance(x, Derived) This corresponds to Java or C# // Java Derived x = (Derived)expression_returning_Base; In languages […]
In bash it is possible to test whether one file is older or newer than the other: if [ file1 -nt file2 ]; then # do something fi if [ […]
My “permanent” SSL certificates are expiring soon, so I decided to switch to letsecnrypt. The easiest way to obtain their certificate is allegedly to use Certbot. There is a nice […]
I needed an IRC client for Windows, and mIRC came up in searches as #1 recommended. It said something about “registration” during the installation, but I ignored assuming that registration […]