Skip to content

Instantly share code, notes, and snippets.

import re
from optparse import OptionParser
import sys
import os
import subprocess
from tempfile import mkstemp
import chardet
BUILTIN_FONTS = [
@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
; <<>> 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:
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(" ")]
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(" ")]
FFVideoSource("raw.avi")
raw = last
WriteFileStart("detection_status.txt", "")
ScriptClip("""
raw = last
RemoveGrain(mode=19)
@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
import sys
import os
import shutil
import zipfile
def run():
encoding_name = sys.argv[1]
path = len(sys.argv) > 3 and sys.argv[3] or ""
z = zipfile.ZipFile(sys.argv[2])
for info in z.infolist():
*We will issue you a credit for one month's value of the following plans that you own that had at least one active or published site as of September 10, 2012: Web Hosting, WordPress Blog Hosting, Website Builder, Quick Shopping Cart, Dream Design Team Website Design or Web Store Design, Dedicated or Virtual Dedicated Servers, CashParking, or any paid email account (Web-based or Hosted Exchange).
import os
import re
from glob import glob
import random
import string
from fabric.api import *
from fabric.contrib.console import confirm
from fabric.contrib.project import rsync_project