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
aes_0 | |
afsc_type5 | |
apfs-raw-device.2.0 | |
auditpipe | |
auditsessions | |
autofs | |
autofs_control | |
autofs_homedirmounter | |
autofs_notrigger | |
autofs_nowait |
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
v4l2 video modes and lsusb details for https://www.amazon.co.uk/Microphone-Hiievpu-Suitable-Streaming-Conferencing/dp/B08H1L41KF |
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
python-twitter==3.5 | |
spotipy==2.13.0 | |
tqdm==4.47.0 |
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
# basic whitelisting for socket.socket.connect. | |
import socket | |
CONNECTION_WHITELIST = [('localhost', 80)] | |
unguarded_connect = socket.socket.connect | |
def guarded_connect(self, *args, **kwargs): | |
con = args[0] |
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 importlib | |
import sys | |
import argparse | |
import subprocess | |
import logging | |
import inspect | |
try: | |
from pip._internal.cli.main import main as pipmain # sorry | |
except ImportError: |
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 imaplib | |
import re | |
import random | |
from email.parser import BytesHeaderParser | |
from typing import List | |
import tqdm | |
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 flask import Flask | |
import RPi.GPIO as GPIO | |
channel = 21 | |
# GPIO setup | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(channel, GPIO.OUT) | |
app = Flask(__name__) |
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 requests | |
from bs4 import BeautifulSoup | |
import json | |
import spotipy | |
import spotipy.util | |
""" | |
Various constants -- the secrets should be moved to a .env file. SPOTIFY_SCOPES too broad, should be reduced. | |
""" |
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 numpy as np | |
from matplotlib import pyplot as plt | |
from tqdm import tqdm | |
board = np.zeros((255, 255)) | |
board[127][127] = 1 | |
board[127][128] = 1 | |
board[128][127] = 1 | |
board[128][128] = 1 |
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 django.core.management.base import BaseCommand, CommandError | |
from django.contrib.auth.models import User | |
from django.conf import settings | |
import ldap | |
class Command(BaseCommand): | |
help = 'Add a specific user from LDAP' | |
def add_arguments(self, parser): | |
parser.add_argument('user_id', nargs='+', type=str) |
NewerOlder