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 | |
import ldap | |
class Command(BaseCommand): | |
help = 'Syncs LDAP users with Django DB' | |
def handle(self, *args, **options): | |
l = ldap.initialize(settings.AUTH_LDAP_SERVER_URI) |
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, request, Response, abort, send_from_directory | |
from selenium import webdriver | |
import sqlite3 | |
import uuid | |
app = Flask(__name__) | |
conn = sqlite3.connect("screenshots.sqlite") | |
c = conn.cursor() |
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 collections import defaultdict | |
csv_prefix = "https://research.google.com/youtube8m/csv" | |
r = requests.get("{0}/verticals.json".format(csv_prefix)) | |
verticals = r.json() | |
block_urls = defaultdict(list) | |
count = 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
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
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
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
# 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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"github.com/elazarl/goproxy" | |
"gopkg.in/h2non/filetype.v1" | |
"log" | |
"net/http" | |
) |
NewerOlder