pip3 install --user pyqt5
sudo apt-get install python3-pyqt5
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
missing = object() | |
class Value: | |
''' | |
Simple class that enables `await value.wait_for(foo)` to wait until the | |
variable is set to the expected value, without blocking the event loop. | |
Loosely modeled after asyncio.Event and asyncio.Condition |
There are several common ways to do rsync backups of hosts over ssh:
- As a non-root user. Upsides: very secure. Downside: cannot back up sensitive files.
- As root, with a public key. Downsides: Whoever has the private key has full root access to the host being backed up.
- As root, with a public key and a "forced command". Upsides: Restricts access to the server. Downsides: Requires either careful matching of rsync options (which might change over time), or "validator" scripts. Neither idea sounds very appealing to me.
- Running rsync in daemon mode on the host being backed up. Upsides: Lots of useful options, like read-only mode, running as a different user if required, server-side excludes/includes, etc. Downsides: Opens up a TCP port that has full filesystem read access and is hard to secure (Ideally you could make the rsync daemon use a unix socket instead, that could be secured by filesystem permissions, but I haven't found a way to do that).
Here is another option t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SD card CRC32 calculator by Angus Gratton for Freetronics | |
* | |
* CRC32 implementation based on the implementation in the C SNIPPETS archive | |
* http://web.archive.org/web/20080303102524/http://c.snippets.org/snip_lister.php?fname=crc_32.c | |
* | |
* Original Copyright (C) 1986 Gary S. Brown. You may use this program, or | |
* code or tables extracted from it, as desired without restriction. | |
* | |
* This version is released with the same lack of restrictions, use however you please. |