Skip to content

Instantly share code, notes, and snippets.

View schworer's full-sized avatar

Alex Schworer schworer

  • San Francisco, Calif.
View GitHub Profile
@schworer
schworer / request.json
Created August 2, 2013 23:27
transmux from h.264/aac/mp4 => h.264/aac/flv
{
"test": true,
"input": "http://s3.amazonaws.com/zencodertesting/test.mov",
"outputs": [
{
"label": "mp4_output"
},
{
"source": "mp4_output",
"copy_audio": true,
@schworer
schworer / gist:3739992
Created September 17, 2012 21:47
zip and enumerate
f = ('a', 'b', 'c')
g = ('d', 'e', 'f')
for i, (x, y) in enumerate(zip(f,g)):
print i, x, y
@schworer
schworer / undo_dec.py
Created February 22, 2012 17:57
quick and dirty Maya Python undo decorator
from functools import wraps
from maya import cmds
def undo(func):
""" Puts the wrapped `func` into a single Maya Undo action, then
undoes it when the function enters the finally: block """
@wraps(func)
def _undofunc(*args, **kwargs):
try:
# start an undo chunk
@schworer
schworer / gist:1562491
Created January 4, 2012 22:18
log to syslog
import logging
from logging.handlers import SysLogHandler
import sys
def custom_logger(name):
logger = logging.getLogger(name)
if sys.platform == 'darwin':
addr = '/var/run/syslog'
else:
@schworer
schworer / keytrans.edl
Created March 9, 2011 18:25
EDL with Key Transition
TITLE: FOR_TEST
FCM: DROP FRAME
001 AX AA C 00:00:00:13 00:00:44:22 01:00:00:10 01:00:44:19
* FROM CLIP NAME: 1 AUDIO TRACK.AIFF
* COMMENT:
* PROBLEM WITH EDIT: CLIP HAD NO TIMECODE TRACK.
002 AX V K B 00:01:06:06 00:01:08:03 01:00:04:10 01:00:06:07
002 AX V K 000 00:00:03:08 00:00:03:08 01:00:04:10 01:00:04:10
@schworer
schworer / houdini_setup
Created February 23, 2011 01:18
houdini setup script for osx
export HFS=/Library/Frameworks/Houdini.framework/Resources
#
# The following are some handy shortcuts:
#
export H=${HFS}
export HB=${H}/bin
export HDSO=${H}/dsolib
export HD=${H}/demo
export HH=${H}/houdini
export HHC=${HH}/config
# this is non-pep8 python
def badFunc(foo = True):
foo = False; return foo
# this is pep8 python
def bad_func(foo=True):
foo = False
return foo