Skip to content

Instantly share code, notes, and snippets.

View NodeJSmith's full-sized avatar

Jessica Smith NodeJSmith

  • 02:40 (UTC -05:00)
View GitHub Profile

does not pair

requires 'acquire-write'

attribute - d44bc439-abfd-45a2-b575-925416129600

Flat - "0x6e 0x01 0x00 0x31 0xa0"

Head Tilt Up - "0x6e 0x01 0x00 0x3f 0xae"

@NodeJSmith
NodeJSmith / get_device_ids.py
Last active January 30, 2025 00:44
Get device IDs from Nest/SDM api
# Written for this comment/issue: https://github.com/AlexxIT/go2rtc/issues/1440#issuecomment-2568140358
# Using AlexxIT's nest api Go code: https://github.com/AlexxIT/go2rtc/blob/master/pkg/nest/api.go
import os
import requests
get_access_token_url = "https://www.googleapis.com/oauth2/v4/token"
client_id = os.environ.get("NEST_CLIENT_ID")
@NodeJSmith
NodeJSmith / ado-pre-commit-cache-all-example.yaml
Last active March 29, 2025 13:25
Cache pre-commit, both pre-commit and virtualenv
- job: precommit
pool:
vmImage: ubuntu-latest
variables:
PYTHON_VERSION: 3.11
VENV_ENV_NAME: .venv
PRE_COMMIT_HOME: $(Pipeline.Workspace)/pre-commit-cache
steps:
- task: UsePythonVersion@0
@NodeJSmith
NodeJSmith / UnicodeEncodeError.md
Last active March 21, 2025 21:30
UnicodeEncodeError in Windows agent CI pipelines

Background

Running Python scripts in CI pipelines on Windows agents can sometimes cause UnicodeEncodeErrors that don't seem to make any sense. For example, running a simple command with a tool built in click or running dbx build or prefect build may run fine on your local Windows machine, but fail when running in a CI pipeline.

For example, running the below code:

# example.py
import click