This file contains hidden or 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
| # brew install portaudio blackhole-2ch | |
| # uv add pyautogui opencv-python sounddevice numpy pynput | |
| import sounddevice as sd | |
| import numpy as np | |
| import pyautogui | |
| import cv2 | |
| import time | |
| import threading | |
| import random |
This file contains hidden or 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 abc | |
| import requests | |
| from urllib3.util.retry import Retry | |
| class BaseClient(abc.ABC): | |
| def __init__(self): | |
| self.session = requests.Session() | |
| retry = Retry( | |
| # if we get stuck in some kind of loop, |
This file contains hidden or 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 os | |
| import sys | |
| import subprocess | |
| if not os.getenv('PYTHON_PRECOMMIT'): | |
| sys.exit() | |
| def run_command(command): | |
| command_list = command.split() |
This file contains hidden or 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 core python libs | |
| # urls lib will help us take the download urls apart | |
| from urllib.parse import urlparse, parse_qs | |
| # the download needs time to build so we'll sleep | |
| from time import sleep | |
| # import 3rd party libs | |
| # requests is the standard for making http requests in python | |
| import requests |
This file contains hidden or 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 sendgrid | |
| class EmailClient: | |
| def __init__(self): | |
| self.sendgrid = sendgrid.SendGridAPIClient(apikey=SENDGRID_API_KEY) | |
| self.template_map = { | |
| 'act-on-asset': '2056279c-ba35-431f-bd8f-e72df9a46c32', | |
| 'welcome-email': '899efc03-4780-4537-a7e6-a4555c531c08', | |
| } |
This file contains hidden or 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
| # To get this working: | |
| # add the below line to your ansible.cfg defaults | |
| # | |
| # [defaults] | |
| # callback_plugins = path/to/ansible-callbacks/human-logging.py | |
| # put the below code into the human-logging.py file | |
| # | |
| # tested thoroughly with ansible 2.2.1.0 | |
| class CallbackModule(object): |
This file contains hidden or 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 rlcompleter, readline | |
| readline.parse_and_bind('tab:complete') |