I hereby claim:
- I am bitglue on github.
- I am frost_remind (https://keybase.io/frost_remind) on keybase.
- I have a public key ASBBz4XF1U2F1thPXSCwSkrYUefmYI53cDCOfBEDzEZMMAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
"""Improved example for reading DHT22 sensors | |
adafruit-circuitpython-dht | |
<https://github.com/adafruit/Adafruit_CircuitPython_DHT/blob/master/adafruit_dht.py> | |
is very buggy, throwing a RuntimeError about 20% of the time when its unable to | |
decode the result from the sensor. The most common problem seems to be it's | |
unable to capture all the pulses. This is likely due to the pulseio | |
implementation in blinka: | |
https://github.com/adafruit/Adafruit_Blinka/tree/master/src/adafruit_blinka/microcontroller/bcm283x/pulseio |
# writes protobuf to stdout. Gzip that, and then https://github.com/google/pprof can read it. | |
require 'stackprof' | |
require 'pp' | |
require './profile_pb' | |
filename = 'profile-web-2020-11-04' | |
data = Marshal.load(IO.binread(filename)) | |
class StringMap |
$ mypy null.py | |
null.py:16: error: Argument 1 to "foo" has incompatible type "None"; expected "Bar" | |
Found 1 error in 1 file (checked 1 source file) |
from __future__ import division | |
from math import pi, sqrt | |
r = 7.37 | |
cs = 18.8e-15 | |
cp = 4.15e-12 | |
l = 6.5722e-3 | |
l = 6.572233217077748e-3 | |
fs = 14.318078e6 | |
fp = 1/(2*pi*sqrt(l*(cs*cp)/(cs+cp))) |
# Install in /etc/udev/rules.d/ | |
# Reload with: udevadm control --reload-rules | |
# You might need additional model IDs here, depending on your particular Yubikey | |
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407|0115", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/usb/yubikey" | |
# See https://github.com/systemd/systemd/issues/7587 | |
# Interestingly, this also fixes smartcard.target, which seems otherwise broken. | |
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="1050/407/*|1050/115/*", TAG+="systemd" |
Haaska implements the deprecated v2 Smart Home API, which can no longer be selected for new skills without some hackery.
Home Assistant Cloud is an alternative, but it's only available in the US.
Fortunately, the Home Assistant developers are awesome and all the logic is in Home Assistant, not hidden in the cloud. It's pretty easy to expose it via an HTTP POST interface which is easily integrated with a Lambda function.
from __future__ import print_function | |
import time | |
import random | |
from functools import wraps | |
def microservice(f): | |
@wraps(f) | |
def wrapper(*args, **kwargs): | |
# Network connections require RAM, | |
x = list(range(1000)) |
I hereby claim:
To claim this, I am signing this object:
variable "cluster-size" { | |
description = "Number of CoreOS machines to deploy" | |
} | |
variable "region" { | |
description = "AWS region in which to deploy" | |
default = "us-east-1" | |
} | |
variable "coreos-ami" { |