Skip to content

Instantly share code, notes, and snippets.

Avatar

Nikita Menkovich librarian

View GitHub Profile
@librarian
librarian / hidapi_co2mon.py
Last active Jan 22, 2022
Basic programm to use hidapi and report temp/co2 from Holtek Semiconductor, Inc. USB-zyTemp (hidapi is python3-hidapi in debian buster)
View hidapi_co2mon.py
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
View gist:1018ea0a34e581e32784
#!/usr/bin/python3
import requests
from requests.exceptions import RequestException, BaseHTTPError
import lxml.html
def get_page(url, utf8=False):
try: