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
# Youtube filters for Ublock Origin | |
! Previews | |
i.ytimg.com/an_webp | |
youtube.com##ytd-thumbnail-overlay-loading-preview-renderer | |
youtube.com##.ytp-ce-element.ytp-ce-video.ytp-ce-element-show | |
youtube.com##.ytp-ce-element.ytp-ce-channel.ytp-ce-channel-this | |
youtube.com##.ytp-ce-element | |
youtube.com##.ytp-inline-preview-ui | |
youtube.com##.ytd-video-preview |
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 cv2 | |
import random | |
import pathlib | |
from PIL import Image | |
src_path = 'pie.mp4' # Replace with your video | |
outfolder = 'temp' # Create folder before running | |
time_per_frame = 5 # Milliseconds? Reduce for faster speed | |
looping = 0 # 0 is looping for PIL |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
import subprocess | |
from jinja2 import Template | |
import pathlib | |
from glob import glob | |
import random | |
# Utility | |
list_collapse = lambda l: [item for sublist in l for item in sublist] | |
def randname(len=8): |
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 | |
from PIL import Image | |
from matplotlib.colors import rgb_to_hsv | |
minions = Image.open('minons_test_autocrop_lossy.jpg') | |
def autocrop(image,thresh_v=255,thresh_s=.01,pad=0): | |
a = numpy.asarray(image) | |
hsv = rgb_to_hsv(a.take([0,1,2],axis=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 subprocess | |
from argparse import ArgumentParser | |
import os | |
# Bad code deal with it | |
# run with -fc to generate your indexes | |
# Modify these paths to match your root folder for music | |
os.chdir('/kt/media/music/downloads') | |
filelist_path = '/kt/media/music/downloads/.index_files' |
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
" Run standard compile/run commands | |
function! RunBuildCommand() | |
" Choose between python3, Rscript based on extension | |
w | |
cd %:p:h | |
let filename = expand('%t') | |
let extension = expand('%:e') | |
let basename = expand('%:r') | |
" rscript |