Skip to content

Instantly share code, notes, and snippets.

@SAPikachu
SAPikachu / gist:3044311
Created July 4, 2012 00:16
Scenecut glitch detect
raw = last
RemoveGrain(mode=19)
denoised = last
super = MSuper()
vectors = MAnalyse(super, isb=false, delta=1, search=5, chroma=false)
mask = MMask(vectors,thscd1=100).Grayscale()
raw
FFVideoSource("raw.avi")
raw = last
WriteFileStart("detection_status.txt", "")
ScriptClip("""
raw = last
RemoveGrain(mode=19)
import sys
from pprint import pprint
def solve():
line1 = [int(x) for x in sys.stdin.readline().strip().split(" ")]
typed = line1[0]
total = line1[1]
probs = [float(x) for x in sys.stdin.readline().strip().split(" ")]
import sys
from pprint import pprint
def solve():
levels = int(sys.stdin.readline().strip())
ratings = {}
for i in range(levels):
rating = \
[int(x) for x in sys.stdin.readline().strip().split(" ")]
; <<>> DiG 9.7.3 <<>> ixuepin.us
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2022
;; flags: qr rd ra; QUERY: 1, ANSWER: 21, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ixuepin.us. IN A
;; ANSWER SECTION:
@SAPikachu
SAPikachu / GetFontPath.cs
Created April 12, 2012 13:41
For use with https://gist.github.com/2367357 . Get font's file path by font name, requires Windows 7 (2008R2 should be OK too). Uses undocumented feature, not sure whether it still works on Win8. Compiled version: http://nmm.me/fq
using System;
using System.Collections.Generic;
using System.Text;
using SharpDX.DirectWrite;
using System.Reflection;
using System.Runtime.InteropServices;
namespace GetFontPath
{
class Program
import re
from optparse import OptionParser
import sys
import os
import subprocess
from tempfile import mkstemp
import chardet
BUILTIN_FONTS = [
ImageReader("D:\Dropbox\Projects\flash3kyuu_deband\Release\wallorig.ebmp")
org=last
f3kdb(range=16, Y=72, Cb=0, Cr=0, grainY=0, grainC=0, sample_mode=2, seed=0, blur_first=true, dynamic_grain=false, dither_algo=2, keep_tv_range=true, output_mode=1, output_depth=9, random_algo_ref=2, random_algo_grain=2)
Histogram("luma")
return last
ImageReader("D:\Dropbox\Projects\flash3kyuu_deband\Release\wallorig.ebmp")
org=last
f3kdb(range=16, Y=36, Cb=0, Cr=0, grainY=0, grainC=0, sample_mode=2, seed=0, blur_first=true, dynamic_grain=false, dither_algo=3, keep_tv_range=true, output_mode=2, output_depth=10, random_algo_ref=2, random_algo_grain=2)
##### Debug #####
f3kdb_dither(mode=1, stacked=false, input_depth=10, keep_tv_range=true) #for previewing
StackHorizontal(org, last)
set nocompatible
let $VIM_ROOT=expand("<sfile>:p:h")
if has('win32') || has ('win64')
let path_sep='\\'
else
let path_sep='/'
endif