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
import shlex | |
from subprocess import Popen, PIPE | |
def is_stringy(x): | |
''' | |
Is x a multiple type (like list, dict, tuple), or a 'single' type, | |
such as string. | |
>>> is_stringy(xrange(3)) | |
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
def pgsql_copy(session,tablename,string_buffer,direction="from"): | |
""" | |
Args: | |
session: a SA session that with a started transaction. | |
tablename: the table to write into | |
string_buffer: handle to a filelike, with seek set to 0 | |
direction: from|to, which way it should go. | |
sele | |
Returns: | |
True on success, raises on errror |
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
def dirs_same_enough(dir1,dir2,report=False): | |
''' use os.walk and filecmp.cmpfiles to | |
determine if two dirs are 'same enough'. | |
Args: | |
dir1, dir2: two directory paths | |
report: if True, print the filecmp.dircmp(dir1,dir2).report_full_closure() | |
before returning | |
Returns: |
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
## python without classes? | |
def newlist(items): | |
def in_(item): | |
return item in items | |
def index(a): | |
return items.index(a) | |
def pretty(): |
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> | |
<head> | |
<title>Data Conlficts Example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script> | |
<script src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script> | |
<script> | |
$( | |
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
[gregg@gregg-vh master python-project]$ git log -n100 --graph --abbrev-commit --pretty=oneline --decorate | |
* 2c47f95 (HEAD, svn/tags/python-project-0.1.7, master) trying to get things back on main trunk | |
* 1c5b935 junk2 | |
* f97ea26 junk file for testing svn update | |
* a4b9e34 release tag for python-project-0.1.7 | |
* 5b81d53 (svn/tags/python-project-0.1.4) 0.1.7 | |
* aae9a08 basic test script added, but doctests fails. | |
* c10b623 import the full io package into utils | |
* 895c208 Makefile drivin build process | |
* 549f95d Adding default dict, tempio, bump to 0.1.6 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>disabled form demo</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('#when').attr('readonly','readonly'); |
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
class Instruction(object): | |
def __init__(**kwargs): | |
for k,v in kwargs.items(): | |
self.k = v | |
def __repr__(self): | |
return "%s %r" % (self.__class__, self.__dict__) | |
def __call__(self,memory): |
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
body { | |
width: 500px; | |
margin-right: auto; | |
color: #444; | |
font-family: Helvetica, Arial, Sans Serif; | |
font-size; 1em; | |
line-height: 1.4em; | |
} | |
h1, h2, h3, h4, h5, h6 { |
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
each group can have a committee | |
staging and master | |
employable foundations? "here's how you leave the nest" | |
for inside pystar minneapolis | |
curriculum: |