This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newpgrp() { | |
# Non-interactive shells don't have job control. Spawn an interactive shell | |
# to create a new process group. The inner non-interactive shell is there | |
# to avoid interactive side-effects later on. | |
$BASH --norc -ic '$BASH -c \"\$@\" -- "$@"' -- "$@" | |
} | |
# Notes on things that don't work: | |
# set -i | |
# You can't turn job control on this way |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''This is my second attempt. It is much cleaner, except for the part that exposes the injector on bound classes and instances. | |
''' | |
from contextlib import suppress | |
from functools import wraps | |
from pprint import pprint | |
import jeni |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import ast | |
import re | |
import sys | |
from astunparse import unparse as astunparse | |
from astunparse import dump as astdump | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Hooks for lettuce to run a test pylons server''' | |
import threading | |
from os import getcwd | |
import pylons.test | |
from paste.deploy.loadwsgi import loadapp | |
from paste.httpserver import serve | |
from paste.script.appinstall import SetupCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
import db | |
def load_config(): | |
return { 'dburi': 'sqlite:foobar.sqlite' } | |
if __name__ == '__main__': | |
config = load_config() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:ng="http://angularjs.org"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Filtering Select Experiment</title> | |
<style type="text/css" media="screen"> | |
.rel { | |
position: relative; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%TAG !foo! tag:gronr.com,2010: | |
--- | |
- Group: | |
- name: blues | |
- name: reds | |
- name: squares |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column | |
from sqlalchemy.orm import RelationProperty, relation, backref, class_mapper | |
from sqlalchemy.ext.declarative import DeclarativeMeta, declarative_base | |
class AutoRelationingDeclarativeMeta(DeclarativeMeta): | |
r''' | |
>>> from sqlalchemy import Integer, ForeignKey, String | |
>>> Base = declarative_base(metaclass=AutoRelationingDeclarativeMeta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jinja2.environment import Environment as Jinja2Environment | |
from jinja2.loaders import FileSystemLoader as Jinja2FileSystemLoader | |
def main(): | |
env = Jinja2Environment( | |
loader=Jinja2FileSystemLoader('.'), | |
) | |
t = env.get_template('test.jinja') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gst-launch-0.10 -v v4l2src device=/dev/video1 ! ffmpegcolorspace ! videoscale method=1 ! video/x-raw-yuv,width=1024,height=768 ! tee tee0. ! queue ! queue leaky=1 ! ffmpegcolorspace ! xvimagesink tee0. ! queue ! queue ! videoscale ! video/x-raw-yuv,width=1024,height=768 ! ffmpegcolorspace ! schroenc ! queue ! oggmux ! filesink location=beswarm.ogg |
OlderNewer