# python

What is a stub file? It is a file with the .pyi extension, which describes the Python type information, both input and return for functions and omits the logical part. Using a stub file has the following advantages (see PEP 484). Example sample.py def stringify(what): return str(what) Example sample.pyi from typing import Union def stringify(what: Union[int, list, dict]) -> str: ... Advantages Type information can be added by adding a separate stub file to a third-party library that does not have type annotations.
A new data type Before talking about the Either data type, we need to know what a data type is. A data type is an abstraction that encapsulates one reusable coding pattern. In our case, the Either data type encapsulates two other objects: Left and Right. These two objects represent Error and Success respectively. This is a common pattern for Functional Programming. Left and Right Left and Right, are classes wich represent the error and success data.
Task report In the life of every system manager, sooner or later it has happened to do reporting, or by collecting data from logs, databases as diverse as LDAP servers. The thing you will surely have done is to collect data manually, using tools like grep and awk for configuration files and logs. $cat example.log | grep 'ERROR'$ awk '{print \$2}' example.log Or a bash script that analyzes each row and then selects only those of interest.
Fun terminal tools There are very useful command line tools, which are used for daily administration, whatever the job you have to do, an example are find, grep, cat, less, etc. There are also more complex tools that require the study and consultation of manuals such as docker, vagrant, etc. and are for advanced users such as systems engineers and developers. Other tools are used … well, practically nothing, except to elicit a laugh.