Skip to content

Instantly share code, notes, and snippets.

View librarian's full-sized avatar

Nikita Menkovich librarian

View GitHub Profile
@librarian
librarian / hidapi_co2mon.py
Last active May 20, 2024 20:15
Basic programm to use hidapi and report temp/co2 from Holtek Semiconductor, Inc. USB-zyTemp (hidapi is python3-hidapi in debian buster)
from hidapi import Device
vid = 0x04d9
pid = 0xa052
try:
print("Opening the device")
h = Device(vendor_id=vid, product_id=pid, blocking=False)
#h.open(vid, pid) # TREZOR VendorID/ProductID
#!/usr/bin/python3
import requests
from requests.exceptions import RequestException, BaseHTTPError
import lxml.html
def get_page(url, utf8=False):
try: