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
<!-- a countdown timer ending at September 21st 2071 | |
written with vanilla javascript and no external libraries | |
--> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
// the date to count down to | |
var targetDate = new Date("September 21, 2071").getTime(); | |
// current date | |
var currentDate = new Date().getTime(); |
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
#sometimes the "best" format that youtube-dl selects changes. | |
#This causes a second file of the same vid to download if you're archiving entire channels. | |
#When that happens, this script will clear out the duplicates if the youtube id was included in the filename. | |
import os | |
import pandas as pd | |
from pathlib import Path | |
from datetime import datetime | |
from pprint import pprint as pp | |
def returnDupes(li): |
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
#20210319 - youtube-dl -i <url> to ignore errors is the 100% easier approach over using this script. | |
#In future, import youtube-dl module and use documentation below to pass parameters | |
#https://github.com/ytdl-org/youtube-dl/blob/3e4cedf9e8cd3157df2457df7274d0c842421945/youtube_dl/YoutubeDL.py#L137-L312 | |
import re | |
import os | |
import shlex, subprocess | |
from time import sleep | |
import sys | |
os.chdir('D:/kingcobrajfs') |
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 datetime import datetime | |
timestampDelimiter = '|' | |
url = 'https://www.youtube.com/watch?v=KUCkrZKslr4' | |
summary ='''0:00| Welcomes Nikki | |
0:03| Standup comedy during covid |
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
#word_list = ['hello','there','general','kenobi'] | |
#word = ['hello','there'] | |
import os, os.path as path | |
os.chdir("E:\\kingcobrajfs") | |
wordList =[] | |
with open('wordlist_remove.txt', 'r') as words: | |
for line in words: |
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 os, os.path as path | |
os.chdir("C:/Users/ryan.mcgrath/Desktop/jfs/VTT Files") | |
fileList = [name for name in os.listdir('.') if os.path.isfile(name) and ".vtt" in name ] | |
print (fileList) | |
print(os.getcwd()) | |
lastCap = "" | |
import webvtt | |
with open('transcript', 'w') as f: |
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 | |
from flask_admin import Admin | |
app = Flask(__name__) | |
# set optional bootswatch theme | |
app.config['FLASK_ADMIN_SWATCH'] = 'cerulean' | |
admin = Admin(app, name='microblog', template_mode='bootstrap3') | |
# Add administrative views here |
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
player1 = "warlock" | |
player2 = "oddWarrior" | |
turnDk1 = 10 | |
turnDk2 = 15 | |
classes = { #bp for base hero power, dk for death knight hero power | |
"druid":{ "class":"Druid", "bpDamage":1, "bpArmor":1,"bpHeal":0, "bpUse%":.4, "dkDamage":0,"dkArmor":3,"dkHeal":0,"dkuse%":.8}, | |
"oddWarrior":{ "class":"OddWarrior", "bpDamage":0, "bpArmor":4,"bpHeal":0, "bpUse%":.4, "dkDamage":0,"dkArmor":4,"dkHeal":0,"dkuse%":.8}, | |
"hunter":{ "class":"Hunter", "bpDamage":2, "bpArmor":0,"bpHeal":0, "bpUse%":.2, "dkDamage":0,"dkArmor":0,"dkHeal":0,"dkuse%":0}, | |
"mage":{ "class":"Mage", "bpDamage":1, "bpArmor":0,"bpHeal":0, "bpUse%":.1, "dkDamage":1,"dkArmor":0,"dkHeal":0,"dkuse%":.2}, |
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 picamera | |
import datetime | |
import json | |
import time | |
import numpy | |
import cv2 | |
import sys | |
from subprocess import call | |
import os | |
import signal |
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 python | |
import io | |
import time | |
import picamera | |
import picamera.array | |
import numpy as np | |
from PIL import Image, ImageDraw | |