Jak opravit napájecí adaptér notebooku, pokud se vám u něj rozbil kabel? Vzhledem k tomu, že celý napájecí adaptér obvykle vypadá jako souvislý blok, bez šroubů a bez možnosti jej otevřít, zdá se jako jedinou možností opravy koupě nového. Dlouho jsem přemýšlel, jak se do adaptéru dostat. Přece jen, nějak jej museli složit, tak musí jít i nějak otevřít. Nedávno jsem dostal k dispozici jeden tak rozbitý, že jsem jej už nemohl zkazit víc. Tak jsem se pokusil o násilné otevření. Výsledek? Úspěšná oprava a fungující adaptér. Demonstrace opravy byla provedena na napájecím adaptéru od firmy ASUS. Postup pro jiné adaptéry se může lehce lišit. Na otevření jsem potřeboval kladivo, plochý šroubovák a pevnou podložku.
(more…)Uncategorized
Waiting on multiple Event objects in Python 3
Passive waiting is a way of suspending programs execution without consuming any CPU (in contrast with active waiting where a program is busy doing nothing). In Python, you can use certain classes from the threading module (such as Condition and Event). Let’s take for example the Event class. It is good for waiting for an event. But what if you need to wait for many events? You might say „Why not to make a list of multiple Event objects and wait for all of them?” Well… that is not going to work:
(more…)Uncategorized
How to run interactive .exe on Windows with Ansible
Starting with version 1.7, the orchestration tool Ansible has a support for managing Windows machines. What the documentation does not provide is a guide on how to run interactive applications properly.
(more…)Uncategorized
jsonchema: Custom type, format and validator in Python
jsonschema
Uncategorized
Package namespacing for Python library collection
A practical guide on how to manage a collection of code snippets as a single, easy to maintain library collection. I will utilise Python package namespacing, managed in a Git mono-repository.
(more…)