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 / vsxa.hpp
Last active December 2, 2019 08:02
I noticed writing plugins in c++ is way too boilerplaty...
/**
* C++ corutine based Vapoursynth-Filter-API
* Copyright (C) 2019 StuxCrystal
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@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)
@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 / 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
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 / 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.
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 / 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.
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 / 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;