Category: Research

The fastest way to count files in a directory

Yesterday I needed a decision to count the number of mails in my mailbox. Mails are presented as text files, they contain a message and an additional information. Based on their number, I can find out whether I received new mails. The task is quite simple and I want to find the same simple and […]

MPV: Limit cache size and cacheable playback interval

By default, MPV has too high values for cache usage which can cause a large consumption of memory when playing a video, for example from YouTube. This note is about how to limit MPV cache usage and reduce memory consumption. Limit cacheable playback interval The first option is –cache-secs <seconds>. This sets how many seconds […]

Add image caption and title to sitemap.xml

Sitemap.xml allows a search engine robot (Google, Bing, Baidu, Duckduckgo and others) to simplify work, so it will be easier for search engine to find new information and index it. But don’t add excessive and non-existent information, because it will not be accepted anyway. Pages in sitemap.xml are listed like this: That is, links to […]

Install python package in a separate directory by ProxyBroker example

python 3.5, aiohttp, aiodns, maxminddb requirements for ProxyBroker

Installing a python package into a separate directory makes the package isolated from other packages. It is more transparent and in some cases very convenient. But this process requires some experience and is complicated. The method below describes how to install a python package in a separate directory without using third-party utilities like pip. Before […]