This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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
angular.directive('x:clearable', function(expression, element) { | |
var compiler = this; | |
compiler.directives(true); | |
compiler.descend(true); | |
element.css({'padding-right': '2em'}); | |
element.after('<button style="margin-left: -2em; border: none; background-color: transparent;">☒</button>'); | |
return function(element) { | |
var scope = this; | |
var button = element.next('button'); | |
button.bind('click', function() { |
This file contains hidden or 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>x:local example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> | |
<script src="http://code.angularjs.org/0.9.10/angular-0.9.10.min.js" ng:autobind="autobind"></script> | |
<script src="angular.local.js" type="text/javascript"></script> | |
</head> | |
<body ng:init="item = { name: 'Bozo', color: 'blue', feathers: false }"> |
This file contains hidden or 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
diff -r 61ba052831fa _test_mlk.py | |
--- a/_test_mlk.py Mon Mar 14 15:21:45 2011 -0400 | |
+++ b/_test_mlk.py Mon Mar 14 16:44:25 2011 -0400 | |
@@ -13,12 +13,12 @@ | |
from mext.test_suite import TestSuite | |
suite = TestSuite('tests', coverage=True, pkg='webob') | |
-doctests = ['test_dec', 'test_request', 'test_response'] | |
-doctests += map('../docs/'.__add__, ['do-it-yourself', 'file-example', 'index', 'reference']) | |
-map(suite.add_doctest, doctests) |
OlderNewer