Skip to content

Instantly share code, notes, and snippets.

View MattBlack85's full-sized avatar
🦉
owly crap

Mattia Procopio MattBlack85

🦉
owly crap
  • Kraków
View GitHub Profile
Successfully built av-15.1.0-cp313-cp313-linux_aarch64.whl
==> Starting check()...
=================================================================== test session starts ====================================================================
platform linux -- Python 3.13.5, pytest-8.4.1, pluggy-1.6.0
rootdir: /home/alarm/.cache/paru/clone/python-av/src/PyAV-15.1.0
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 303 items
tests/test_audiofifo.py ..... [ 1%]
@MattBlack85
MattBlack85 / gist:d261c4bb78730964a2ff570176efec5c
Last active August 25, 2025 14:11
HA weather gathering script (Meteorologisk institutt (Met.no))
Create a new script and paste the following YAML (Update the device to be notified accordingly):
sequence:
- action: weather.get_forecasts
metadata: {}
data:
type: daily
target:
entity_id: weather.forecast_home
response_variable: weather_daily
use eframe::egui;
fn main() -> Result<(), eframe::Error> {
//env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let options = eframe::NativeOptions {
initial_window_size: Some(egui::vec2(320.0, 240.0)),
..Default::default()
};
eframe::run_native(
"My egui App",
2005..=2049 => {
lea ecx, [rax, -, 2005]
cmp cx, 45
jae .LBB39_13
let t = decimal_year - 2000_f64;
vaddsd xmm1, xmm0, qword, ptr, [rip, +, .LCPI39_10]
0.005_589f64.mul_add(t * t, 0.32217f64.mul_add(t, 62.92))
vmulsd xmm2, xmm1, xmm1
vmovsd xmm0, qword, ptr, [rip, +, .LCPI39_11]
vfmadd213sd xmm0, xmm1, qword, ptr, [rip, +, .LCPI39_12]
// Moonlite-compatible stepper controller
// Written by George Carlson June 2014.
// This version uses the Tiny 2.0 a uController based on the Atmel ATMEGA32U4.
// hardware for the remote hand control is not supported.
//
// Many thanks to [email protected], for the original command parser, others for bits on code picked up here and there on the net
//28BYJ
// Since the MoonLite focuser only works with positive integers, I center (zero) my system at 30000. The range is from
// 0 to 65535, so 30000 is a good round number for the center.
// If the Current Position, or New Position is set to 0, this code will set the values at 30000. The reason for this
<delProperty device="CCD Simulator"/>
<delProperty device="CCD Simulator"/>
<setTextVector device="CCD Simulator" name="DRIVER_INFO" state="Idle" timeout="60" timestamp="2021-10-05T13:13:02">
<oneText name="DRIVER_NAME">
CCD Simulator
</oneText>
<oneText name="DRIVER_EXEC">
indi_simulator_ccd
</oneText>
<oneText name="DRIVER_VERSION">
// Moonlite-compatible stepper controller
// Written by George Carlson June 2014.
// This version uses the Tiny 2.0 a uController based on the Atmel ATMEGA32U4.
// hardware for the remote hand control is not supported.
//
// Many thanks to [email protected], for the original command parser, others for bits on code picked up here and there on the net
// 28BYJ
// Since the MoonLite focuser only works with positive integers, I center (zero) my system at 30000. The range is from
// 0 to 65535, so 30000 is a good round number for the center.
// If the Current Position, or New Position is set to 0, this code will set the values at 30000. The reason for this
#include <OneWire.h>
// OneWire DS18S20, DS18B20, DS1822 Temperature Example
//
// http://www.pjrc.com/teensy/td_libs_OneWire.html
//
// The DallasTemperature library can do all this work for you!
// http://milesburton.com/Dallas_Temperature_Control_Library
Exception: invocation of aws:route53/getZone:getZone returned an error: 1 error occurred:
* error configuring Terraform AWS Provider: IAM Role (arn:aws:iam::XXXXXXXXXXXX:role/PulumiRoute53) cannot be assumed.
There are a number of possible causes of this - the most common are:
* The credentials used in order to assume the role are invalid
* The credentials do not have appropriate permission to assume the role
* The role ARN is not valid
Error: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
DOMAIN_NAME = DNS_STACK_REFERENCE.get_output('domain_name')
nginx_definition = DOMAIN_NAME.apply(
lambda domain_name: build_task_definition(
project_name=project_name,
container_name='prometheus-nginx-vts-exporter',
depends_on=[{'containerName': project_name, 'condition': 'START'}],
image='docker.io/sophos/nginx-vts-exporter',
links=['relay:relay'],
memory_reservation=64,