I hereby claim:
- I am awoimbee on github.
- I am awoimbee (https://keybase.io/awoimbee) on keybase.
- I have a public key whose fingerprint is 16F3 CEBD A13A 3ABF ABF8 0273 3B73 7EBF 9495 F3B0
To claim this, I am signing this object:
# The coefficients were taken from OpenCV https://github.com/opencv/opencv | |
# I'm not sure if the values should be clipped, in my (limited) testing it looks alright | |
# but don't hesitate to add rgb.clip(0, 1, rgb) & yuv.clip(0, 1, yuv) | |
# | |
# Input for these functions is a numpy array with shape (height, width, 3) | |
# Change '+= 0.5' to '+= 127.5' & '-= 0.5' to '-= 127.5' for values in range [0, 255] | |
def rgb2yuv(rgb): | |
m = np.array([ | |
[0.29900, -0.147108, 0.614777], |
# from https://scicomp.stackexchange.com/questions/27330/how-to-generate-poisson-distributed-random-numbers-quickly-and-accurately | |
# cupy is much, much faster than this | |
import numpy as np | |
from numba import jit | |
from math import * | |
import random | |
@jit() | |
def poissrnd(mean: float) -> int: |
I hereby claim:
To claim this, I am signing this object:
if [ ! command -v wg ]; then | |
sudo pacman -S wireguard-tools --noconfirm --needed | |
fi | |
if [ ! -f ./private.key ]; then | |
wg genkey > private.key | |
wg pubkey < private.key > public.key # not needed | |
fi | |
if [ ! -f derp.yaml ]; then |
# syntax = docker/dockerfile:1.0-experimental | |
## NOTE : This image uses BuildKit, see | |
## https://docs.docker.com/develop/develop-images/build_enhancements/ | |
## for more information. | |
## TLDR: Use docker build with DOCKER_BUILDKIT=1 in the environment | |
FROM python:3.9-slim-buster AS base | |
LABEL authors="<[email protected]>" |
2021-12-08T12:00:18.528+0100 [DEBUG] Adding temp file log sink: /tmp/terraform-log3879843825 | |
2021-12-08T12:00:18.528+0100 [INFO] Terraform version: 1.0.11 | |
2021-12-08T12:00:18.528+0100 [INFO] Go runtime version: go1.17.3 | |
2021-12-08T12:00:18.528+0100 [INFO] CLI args: []string{"/usr/bin/terraform", "apply"} | |
2021-12-08T12:00:18.529+0100 [INFO] CLI command args: []string{"apply"} | |
----------------------------------------------------- | |
2021-12-08T12:00:19.843+0100 [DEBUG] created provider logger: level=debug | |
2021-12-08T12:00:19.843+0100 [INFO] provider: configuring client automatic mTLS | |
2021-12-08T12:00:19.863+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/azuread/2.0.1/linux_amd64/terraform-provider-azuread_v2.0.1_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/azuread/2.0.1/linux_amd64/terraform-provider-azuread_v2.0.1_x5] |
// CPU freq | |
#define F_CLK ((long)16000000) | |
// Standard fan PWM frequency is 25kHz | |
#define PWM_FREQ ((long)25000) | |
// e.g. PWM range is reversed on my TFC1212DE | |
#define REVERSE_PWM 0 | |
/* Takes a percentage and returns the corresponding OCR1 register value */ | |
word percent_to_ocr1(word percentage) { | |
if (REVERSE_PWM) { |
import * as pulumi from "@pulumi/pulumi"; | |
import assert from "node:assert/strict"; | |
// Short solution: | |
type DeferredOutput<T> = pulumi.Output<T> & { | |
resolve: (value: pulumi.Input<T>) => void, | |
reject: (reason?: any) => void; | |
} | |
export function deferredOutput<T>() { |
# Generate the u2f keys/config
pamu2fcfg -u $(whoami) -opam://$HOSTNAME -ipam://$HOSTNAME > ~/u2f_keys