Skip to content

Instantly share code, notes, and snippets.

View stuxcrystal's full-sized avatar

Roland Netzsch stuxcrystal

  • Net-UP Aktiengesellschaft
  • München
View GitHub Profile
@stuxcrystal
stuxcrystal / kagefunc.py
Last active April 3, 2017 23:10 — forked from kageru/kagefunc.py
My collection of Vapoursynth functions. Some of these are probably useless to most people.
import vapoursynth as vs
import mvsfunc as mvf
import functools
core = vs.core # R37 or newer
# TODO autocrop?
def inverse_scale(source, width=None, height=720, kernel='bilinear', taps=5, a1=0.15, a2=0.5, mask_detail=False,
@stuxcrystal
stuxcrystal / test.less
Created June 30, 2017 14:06
More complicated less file
@import url('https://fonts.googleapis.com/css?family=Open+Sans:800');
/////////////////////////////////////////////////////////////////////////////
// Settings
//
// Compile at http://less2css.org/
// For global stylesheet post-id is 0
// Otherwise enter the post id here.
@debug: 1;
from itertools import chain
from functools import reduce
def _force_listop(iterable):
if not isinstance(iterable, ListOp):
iterable = ListOp(__builtins__.map(Base.conv, iterable), None)
return iterable
def reduce_op(name):
def _func(iterable):
@stuxcrystal
stuxcrystal / Yuuno4VapourSynthR44.ipynb
Created May 10, 2018 16:03
Yuuno 4 VapourSynth R44
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const _patch_ll = function(list) {
list.split = function() {
return _patch_ll({node: list.node});
}
list.append = function(data) {
list.node = {
target: data
prev: list.node
}
};
@stuxcrystal
stuxcrystal / Plane infos.ipynb
Last active December 22, 2018 11:54
Here some info!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Collecting kagefunc
Downloading http://localhost:8000/simple/kagefunc/git:ba829b8/kagefunc-2019.02.09.zip
Requirement already satisfied: mvsfunc in c:\users\stuxc\pycharmprojects\ttt\venv\lib\site-packages (from kagefunc) (8)
Collecting fvsfunc (from kagefunc)
Downloading http://localhost:8000/simple/fvsfunc/git:edb4ed9/fvsfunc-2018.10.25.zip
Collecting tegaf.asi.xe (from kagefunc)
Downloading http://localhost:8000/simple/tegaf.asi.xe/r2/tegaf.asi.xe-2.zip
Requirement already satisfied: fmtconv in c:\users\stuxc\pycharmprojects\ttt\venv\lib\site-packages (from kagefunc) (20)
Collecting com.invalid.identifier.retinex (from kagefunc)
Downloading http://localhost:8000/simple/com.invalid.identifier.retinex/r4/com.invalid.identifier.retinex-4.zip
@stuxcrystal
stuxcrystal / async-await.rb
Created June 7, 2019 15:30
Async-Await with Ruby/EventMachines
class Async
Value = Struct.new(:error, :value)
module ClassMethods
def async(funcname)
async = ::Async.new(&method(funcname))
define_method :funcname do |*args, &block|
async.call(*args, &block)
end
end
@stuxcrystal
stuxcrystal / suspend.cpp
Created August 5, 2019 21:45
Using suspendFrame
//////////////////////////////////////////
// This file contains a simple filter
// skeleton you can use to get started.
// With no changes it simply passes
// frames through.
#include <thread>
#include <chrono>
#include "VapourSynth.h"
@stuxcrystal
stuxcrystal / protocol.py
Last active August 14, 2019 12:40
Is this a Sans I/O-Parser-Framework that is completely untested?
from sans_io import *
@protocol
async def bytes_protocol():
try:
while True:
sz: bytes = await read_exactly(4)
length = int.from_bytes(sz, 'big')
hdr = await read_exactly(length*4)