A minimal table to compare the Espressif's MCU families.
ESP8266 | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C6 | |
---|---|---|---|---|---|---|
Announcement Date | 2014, August | 2016, September | 2019, September | 2020, December |
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
# Install IPython: python3 -m pip install ipython | |
import IPython | |
from traitlets.config import get_config | |
cfg = get_config() | |
cfg.InteractiveShellEmbed.colors = "Linux" # syntax highlighting | |
cfg.InteractiveShellEmbed.confirm_exit = False | |
alias interacti IPython.embed(config=cfg) |
#!/usr/bin/env python | |
# cycle-workspace | |
# Moves the currently active workspace to the next active display | |
# Depends on i3-py (`pip install i3-py`) | |
import i3 | |
# figure out what is on, and what is currently on your screen. | |
focused_workspace = list(filter(lambda s: s['focused'], i3.get_workspaces()))[0] |
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.
This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.
Audio source (i.e. smartphone)
|
v
((( Wireless Bluetooth Channel )))
|
#!/usr/bin/env python | |
import i3 | |
outputs = i3.get_outputs() | |
workspaces = i3.get_workspaces() | |
# figure out what is on, and what is currently on your screen. | |
workspace = list(filter(lambda s: s['focused']==True, workspaces)) | |
output = list(filter(lambda s: s['active']==True, outputs)) |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |