Skip to content

Instantly share code, notes, and snippets.

nyuszika7h

Block or report user

Report or block nyuszika7h

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nyuszika7h
nyuszika7h / mktor_functions.sh
Last active Sep 14, 2019
bash/zsh functions for easy torrent creation on private trackers
View mktor_functions.sh
TORRENT_WATCH_DIR="$HOME/rtorrent/watch/load"
ANNOUNCE_BTN='http://landof.tv/YOUR_PASSKEY/announce'
ANNOUNCE_PTP='http://please.passthepopcorn.me:2710/YOUR_PASSKEY/announce'
ANNOUNCE_HDB='http://tracker.hdbits.org/announce.php?passkey=YOUR_PASSKEY'
mkt() {
tracker="$1"
announce=$(eval printf -- "'%s'" "\$ANNOUNCE_$tracker")
if [[ -z "$announce" ]]; then
printf 'Error: $ANNOUNCE_%s is not set\n' "$tracker" >&2
@nyuszika7h
nyuszika7h / sign_theplatform.py
Last active May 29, 2019
Sign theplatform.com URLs using the key and secret
View sign_theplatform.py
#!/usr/bin/env python3
import hashlib
import hmac
import time
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
def build_qs(qs):
"""Build a query string from a dict"""
View get_moov_pssh.py
import base64
import uuid
from pymp4.parser import Box
def get_moov_pssh(fd):
while True:
x = Box.parse_stream(fd)
if x.type == b'moov':
View musortv.py
#!/usr/bin/env python3
import argparse
import json
from datetime import datetime
import bs4
import pytz
import requests
import tzlocal
@nyuszika7h
nyuszika7h / AutoResize.avsi
Last active Sep 14, 2019
AutoResize function for AviSynth - intelligent resize to 1080p, 720p, SD (720px wide) or any custom resolution
View AutoResize.avsi
function _ResizeRoundClosest(float n) {
r = int(n) % 2
n1 = int(n) - r
n2 = int(n) + r
if (abs(n - n2) < abs(n - n1)) {
return n2
} else {
return n1
}
@nyuszika7h
nyuszika7h / silencedetect.py
Last active Sep 14, 2019
FFmpeg silence detect wrapper - prints human-readable timecodes
View silencedetect.py
#!/usr/bin/env python3.7
import argparse
import re
import subprocess
import sys
def format_time(s):
(h, s) = divmod(s, 3600)
@nyuszika7h
nyuszika7h / chapteredit.py
Last active Sep 14, 2019
Chapter Editor
View chapteredit.py
#!/usr/bin/env python3.7
import argparse
import re
import sys
from collections import defaultdict
# https://stackoverflow.com/a/9028031/492203
class CustomAction(argparse.Action):
View bitrate-calc.py
#!/usr/bin/env python3.7
import argparse
import os
import subprocess
import sys
from fnmatch import fnmatch
cached_mediainfo = {}
@nyuszika7h
nyuszika7h / vs_ffinfo.py
Last active Sep 14, 2019
FFInfo for VapourSynth
View vs_ffinfo.py
import functools
import time
import vapoursynth as vs
core = vs.get_core()
def FrameInfo(n, f, clip, frame_num=True, frame_type=True, frame_time=True, text=None, color='0000FFFF'):
# NOTE: color is in format AABBGGRR
@nyuszika7h
nyuszika7h / vs_applyrange.py
Last active Nov 21, 2018
VapourSynth ApplyRange function
View vs_applyrange.py
def ApplyRange(clip, start, end, filt):
last_frame = len(clip) - 1
if end <= 0:
end = last_frame + end
filtered = filt(clip.std.Trim(start, end))
if start > 0:
ret = clip.std.Trim(0, start - 1) + filtered
else:
You can’t perform that action at this time.