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

Keybase proof

I hereby claim:

  • I am stuxcrystal on github.
  • I am stux (https://keybase.io/stux) on keybase.
  • I have a public key whose fingerprint is 8C1C 8441 6B29 AEDC 0589 131C 62A2 88D6 5876 0C71

To claim this, I am signing this object:

@stuxcrystal
stuxcrystal / example.py
Last active January 17, 2017 22:47
Adds Vapoursynth to MetaPath
import vsimport
from ffms2 import Source
clip = Source("/path/to/your/clip.mkv")
clip.set_output()
from collections import namedtuple
def find_keyframes(clip, frame, epsilon=7):
for i, frame in enumerate(map(clip.get_frame, range(frame-epsilon, frame+epsilon))):
if frame.props.Scenechange:
yield i
TimeFrame = namedtuple("TimeFrame", "start end")
def get_nearest_scenechange(clip, start, end, epsilon=7):
core = vs.get_core(accept_lowercase=True)
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>importtest</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
*
* Twitter Bootstrap
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>importtest</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
*
* Twitter Bootstrap
# coding: utf-8
# In[1]:
import sys
sys.path.append("..")
# In[2]:
@stuxcrystal
stuxcrystal / idea.py
Last active January 31, 2017 21:12
Idea for Vapoursynth
from vapoursynth import core, YUV
def shuffle_uv(clip):
"""
This function should always work as the get_core-call is deferred until
getattr or setattr is actually called on the proxy.
"""
return core.std.ShufflePlanes([clip], [0,2,1], colorfamily=YUV)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stuxcrystal
stuxcrystal / refactored.py
Created March 22, 2017 13:19
Refactored Bot Code
class Member(dict):
def __init__(self, name, *args, **kwargs):
super(Member, self).__init__(**kwargs)
self.name = name
class MemberStore(object):
def __init__(self):
self.members = {}
self.aliases = {}
@stuxcrystal
stuxcrystal / kagefunc.py
Created April 3, 2017 23:09 — 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,