Skip to content

Instantly share code, notes, and snippets.

View OrangeChannel's full-sized avatar
😎
shitposting somewhere

Dave OrangeChannel

😎
shitposting somewhere
View GitHub Profile
@OrangeChannel
OrangeChannel / aae-export.py
Last active September 22, 2019 21:51
Export Blender motion tracking markers to Adobe After Effects 6.0 compatible files. Works with Aegisub-Motion.
# Copyright (c) 2013, Martin Herkt
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
#!/usr/bin/python
"""
OGM chapter timings generator that opens into toolnix GUI
"""
import math, shlex, subprocess
from fractions import Fraction
path_to_mkvtoolnix_gui = 'mkvtoolnix-gui'
import shlex
header = r'<?xml version="1.0"?>' + '\n' + r'<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->'
header += '\n<Tags>'
editionuids = input('input the edition uids (2906622092 4906785091): ')
uids = list(map(int, editionuids.split()))
names = shlex.split(input('input the edition names (\'normal\' \'no credits\'): '))
outfile = str(input('desired file name (example.xml): '))
@OrangeChannel
OrangeChannel / radruns.py
Created January 15, 2020 05:12
Finalized
import itertools
import random
from fractions import Fraction
import functools
intact = [Fraction(76, 100), Fraction(22, 100), Fraction(2 , 100)]
exceptional = [Fraction(70, 100), Fraction(26, 100), Fraction(4 , 100)]
flawless = [Fraction(60, 100), Fraction(34, 100), Fraction(6 , 100)]
radiant = [Fraction(50, 100), Fraction(40, 100), Fraction(10, 100)]
@OrangeChannel
OrangeChannel / find-replace-bug.ass
Last active February 4, 2020 11:07
find-replace-bug
[Script Info]
; Script generated by Aegisub master r8903+1 g1042226, line0
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None
[V4+ Styles]
"""Functions to help setup poker tournaments."""
__author__ = 'Dave <orangechannel@pm.me>'
__date__ = '4 February 2020'
from itertools import product
# Constants:
CASE = 100
MAX_PLAYERS = 10
chapters = {
'01|Part A': (0, 3770),
'01|Title Card': (3771, 3860),
'01|Part B': (3861, 20883),
'01|Middle Card': (20884, 21003),
'01|Part C': (21004, 30041),
'01|OP': (30042, 32200),
'01|Part D': (32201, 33685),
'01|Preview': (33686, 34045),
@OrangeChannel
OrangeChannel / ordered_chapters.py
Created March 17, 2020 09:35
now to actually explain what the fuck is going on here...
"""Helper functions for creating ordered chapters releases from a BDMV."""
__author__ = 'Dave <orangechannel@pm.me>'
__date__ = '15 March 2020'
from os import urandom
from random import choice, sample, randint
from sys import byteorder
from typing import Dict, List, Tuple, Union
import xml.etree.ElementTree as ET
@OrangeChannel
OrangeChannel / .SRCINFO
Last active March 19, 2020 10:28
acsuite AUR package files
pkgbase = vapoursynth-tools-acsuite-git
pkgdesc = Tools for Vapoursynth: acsuite (GIT version)
pkgver = 3.0.0.r1.gc14204b
pkgrel = 1
url = https://github.com/OrangeChannel/acsuite
arch = any
license = GPL
makedepends = git
depends = vapoursynth
depends = mkvtoolnix-cli
import colorsys
import random
from enum import IntEnum
from typing import List, Literal
import vapoursynth as vs
core = vs.core