This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
import binascii | |
import sys | |
from bleak import BleakClient | |
from bleak.backends.characteristic import BleakGATTCharacteristic | |
NOTIFY_UUID = "aae28f01-71b5-42a1-8c3c-f9cf6ac969d0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
from pyvelop.mesh import Mesh | |
async def setEnabled(mesh, enabled): | |
await mesh._async_make_request(action="http://linksys.com/jnap/routerupnp/SetUPnPSettings", payload={"isUPnPEnabled": enabled,"canUsersConfigure": False, "canUsersDisableWANAccess": False}) | |
async def main(): | |
async with Mesh(node="192.168.1.1", password="INSERT_PASSWORD_HERE") as mesh: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# * Browse to https://app.expopass.com/events/4jrvzmj/schedule | |
# * Use devtools to grab the JSON responses from *both* requests like | |
# https://api.expopass.com/rest/sessions/?ids=... | |
from datetime import datetime | |
from dateutil import tz | |
from hashids import Hashids | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from pathlib import Path | |
from asyncinotify import Inotify, Mask | |
from collections import Counter | |
from homeassistant_api import Client | |
import asyncio | |
import glob | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import googlemaps | |
from datetime import datetime | |
# https://console.cloud.google.com/google/maps-apis/start | |
key = os.getenv('GOOGLE_MAPS_API_KEY') | |
gmaps = googlemaps.Client(key = key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
import logging | |
from aiohue import HueBridgeV2 | |
from aiohue.v2 import EventType | |
from aiohue.v2.models.button import Button, ButtonEvent | |
import ewelink | |
from ewelink import Client, DeviceOffline, Power |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: Support Vasco DP855 PIN pad with horrible hacks | |
Disable varlen and assume PIN lengths. | |
Author: Chris Boyle <[email protected]> | |
--- | |
The information above should follow the Patch Tagging Guidelines, please | |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here | |
are templates for supplementary fields that you might want to add: | |
Origin: <vendor|upstream|other>, <url of original patch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Custom LED / mic button behaviour and battery checking on Corsair Virtuoso | |
# Suggested udev rules to put in e.g. /etc/udev/rules.d/52-corsair.rules | |
# SUBSYSTEM=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0a41", MODE="0660", GROUP="plugdev" | |
# SUBSYSTEM=="usb", ATTR{idVendor}=="1b1c", ATTR{idProduct}=="0a42", MODE="0660", GROUP="plugdev" | |
import alsaaudio | |
import enum | |
import hid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
HUE_POLL_SECONDS = 5 | |
HUE_IP = '192.168.1.123' | |
HUE_USERNAME = 'xyz123' # see https://github.com/quentinsf/qhue#creating-a-user | |
HUE_NAME_LOWER_SUBSTRINGS = ['living room', 'front door'] | |
EWELINK_USERNAME = '[email protected]' | |
EWELINK_PASSWORD = 'password' | |
EWELINK_REGION = 'eu' | |
EWELINK_OUTLET = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import bgtunnel | |
import requests | |
import subprocess | |
import sys | |
if sys.version_info >= (3, 0): | |
from urllib.parse import urlsplit, urlunsplit | |
else: |
NewerOlder