Like Python itself, GPIO Zero is an API with multiple programming paradigms. Users can begin with a simple approach, and have the opportunity to expand into using more advanced techniques to achieve more.
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
def process_iis_directory(d): | |
print('Processing IIS directory %s' % d) | |
for entry in os.listdir(d): | |
entry = os.path.join(d, entry) | |
if entry.endswith('.gz'): | |
print('Processing %s into CSV' % entry) | |
with gzip.open(entry, 'rb') as uncompressed, \ | |
io.BufferedReader(uncompressed) as buffered, \ | |
io.TextIOWrapper(buffered, encoding='latin1') as infile, \ | |
io.open(os.path.splitext(entry)[0] + '.csv', 'wb') as outfile, \ |
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
# On the host | |
============= | |
lxc config set openvpn raw.lxc 'lxc.cgroup.devices.allow = c 10:200 rwm' | |
lxc config device add openvpn tun unix-char path=/dev/net/tun | |
# In the container | |
================== | |
1. mknod /dev/net/tun c 10 200 |
From the original comment:
@Yoshqu there is a much simpler way to measure boot time to the usec, without having to use that custom bootloader
basically, ST_CLO begins counting at 1mhz, the instant the SoC comes out of reset and /proc/uptime begins counting seconds when linux starts up its internal clocks
the code in the gist, will then print both of them at once, and if you find the difference, youll see how long it took for linux to gain control of the core