Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import json | |
import subprocess | |
import time | |
from pathlib import Path | |
import atexit | |
import boto3 | |
import requests | |
import datetime | |
#path where you have extracted ngrok execution file. Follow readme file to install on Pi |
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
# needs to run as sudo (probably to lock the use of the RPi bluetooth). | |
# based on gist by tchen @ https://gist.github.com/tchen/65d6b29a20dd1ef01b210538143c0bf4 | |
# changed to look for H5074 and decode its data messages | |
from datetime import datetime | |
from time import sleep | |
from bleson import get_provider, Observer | |
# pip install bleson | |
govees = {} |
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 | |
# -*- coding: utf-8 -*- | |
# BASED ON ALCHEMYDC'S GREAT SCRIPT HERE: | |
# https://github.com/alchemydc/unifi_device_manager | |
# | |
# > ADDED FUNCTIONS FOR GETTING CLIENT LIST AND ACTIVE CLIENT LIST | |
# > HAD TO ADD "verify=False" TO ALL REQUESTS CALLS | |
# BECAUSE I HAVEN'T GOT A CERT SORTED IN UNIFI YET | |
# > TESTED ON CLOUD KEY GEN2 PLUS |
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
This is a simple communication scheme between python and Arduino over Serial. |
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
from tkinter import * | |
from tkinter import ttk | |
from datetime import datetime | |
# A SMALL PYTHON CLASS I WROTE TO SIMPLIFY GUI DEVELOPMENT. | |
def myPrinter(str): | |
print(datetime.now().strftime('%H:%M:%S ') + str) | |
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
# library: https://github.com/Zuzu-Typ/XInput-Python | |
# install using: pip install XInput-Python | |
# | |
# Tested with Xbox Series X controller on Windows 10, Python 3.8.6 | |
# Controller firmware up to date on 20/12/2020 (Xbox Accessory app on PC) | |
# New "Share" Button inoperative. | |
# Got status of battery pack (Xbox Rechargable Battery with USB-C Cable) | |
# Tested with cable not bluetooth. | |
from XInput import * |
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
Ignore - Gist Naming File |
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
def logPrint(*args, sep=" ", system=None, color=Style.RESET_ALL, **kwargs): | |
if system: | |
print(datetime.now().strftime('%H:%M:%S.%f')[:-3] + " : " + color + str(system).ljust(10)[0:10] + Style.RESET_ALL + " : " + sep.join(map(str,args)), **kwargs) | |
else: | |
print(datetime.now().strftime('%H:%M:%S.%f')[:-3] + " : " + sep.join(map(str,args)), **kwargs) |
NewerOlder