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
.git/ | |
build | |
dist | |
*.egg-info | |
*.egg/ | |
*.pyc | |
*.swp | |
.tox |
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 pandas | |
from decouple import config | |
from time import sleep | |
DATABASE_URI = config("DATABASE_URI") | |
while True: | |
table = pandas.read_sql_table("chartdata", DATABASE_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
[[source]] | |
url = "https://pypi.python.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
logme = "*" | |
python-decouple = "*" | |
[dev-packages] |
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 nox | |
from pathlib import Path | |
PROJECT_ROOT_DIR = Path(__file__).parent | |
PROJECT_BIN_DIR = PROJECT_ROOT_DIR / "bin" | |
FFMPEG_DIR = PROJECT_BIN_DIR / "ffmpeg-stable" | |
DOWNLOAD_COMPRESSED_FILE = "ffmpeg-git-amd64-static.tar.xz" | |
DOWNLOAD_URL = "https://johnvansickle.com/ffmpeg/builds/" + DOWNLOAD_COMPRESSED_FILE | |
FFMPEG_BIN = FFMPEG_DIR / "ffmpeg" |
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 pathlib import Path | |
from os import walk | |
import bson | |
# ^------ pip install bson | |
# This is a concept for walking through a folder with nested folders each contaning files. | |
# This can easily be modified to take in a list of mutliple target folders |
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 abc import ABCMeta | |
from cv2 import VideoCapture, CAP_PROP_FRAME_COUNT | |
from cv2 import imshow | |
from pathlib import Path | |
VALID_VIDEO_FORMATS = [".avi", ".flv", ".mov", ".mp4", ".wmv", ".mkv"] | |
VALID_IMAGE_FORMATS = [".bmp", ".jpg", ".png"] | |
VALID_MEDIA_FORMATS = VALID_VIDEO_FORMATS + VALID_VIDEO_FORMATS |
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 subprocess import Popen, PIPE, STDOUT, run, check_output | |
from pathlib import Path | |
from shlex import split | |
from random import randint, choice | |
import sys | |
PITCH = { | |
"A": 27.500, | |
"Bb": 29.135, | |
"A#": 29.135, |
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 subprocess import Popen, PIPE, STDOUT, run | |
from pathlib import Path | |
from shlex import split | |
from random import randint | |
import sys | |
frequency = 400 | |
seconds = 5 | |
channels = 2 | |
sequence_length = 100 |
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 urllib.request import urlopen | |
from tkinter import * | |
from time import sleep | |
from random import choice | |
URL = "https://blockchain.info/q/getblockcount" | |
COLORS = ["yellow", "orange", "red"] | |
FONT = ("helvetica", 100, "bold") | |
def update_clock(previous=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
alsabat -F 440 -n 10000 -c 1 -f cd -c 2 -P plughw:2,0 |