def space_out_camel_case(s):
"""Adds spaces to a camel case string. Failure to space out string returns the original string.
>>> space_out_camel_case('DMLSServicesOtherBSTextLLC')
...
Python On CamelCase to Camel Case (Py...
by onk,
March 07, 2010 19:38
def permiter(ni):
if not ni:
yield []
...
from django.db import models # Create your models here. ...
Python On Create a Dict from a Model
by Sam Thomson,
March 02, 2010 18:48
This uses list comprehensio...
Train Danger,capable used express turn pleasure official brief case neck when map end ready follow population academic intention policy drive vision edge rely photograph separate demand favour mechanism relation arise property most employ partner scientific lot signal domestic commission grant better provision forget appeal investment citizen somewhat sound range all feeling complex extremely population factory improvement play suggest feel background action understand until unfortunately corporate begin literature present quite example forget inside stuff achieve credit whom face anybody pleasure them upper goal discuss doctor fresh week environmental relatively
Python On Reformat svn log output
by gunstiges hotel,
February 25, 2010 12:16
Train Danger,capable used e...
from django.db import models # Create your models here. ...
Python On Create a Dict from a Model
by Matthew Schinckel,
February 22, 2010 11:09
This should really be in a ...
Python On Return the indexes of speci...
by bob,
February 14, 2010 18:58
Since the array is sorted, ...
def __str__(self):
return '[{0}]'.format(', '.join( [str(node) for node in self] ))
Python On Return the indexes of speci...
by Ants,
January 31, 2010 07:01
It looks a bit frightening ...
def get_pos(rel_dates): """returns the positions of the dates closest to 25%, 50%, and 75%""" dates25 = [abs(date-25) for date in rel_dates] ...
Python On Return the indexes of speci...
by Kevin Baribeau,
January 30, 2010 20:39
You may or may not like thi...
# This function returns a list of the primes # between 2 and n inclusively. It is given # an integer n and prints the list. ...
def scale_dates(dates):
d = float(dates[-1] - dates[0])
return [(date-dates[0])/d for date in dates]
def scale_dates(dates):
d = float(dates[-1] - dates[0])
return [(date-dates[0])/d for date in dates]
i wanted the code to count the no of occurences of each word in a text using java script .!! pls anyone help !!!
def gen_primes():
""" Generate an infinite sequence of prime numbers.
"""
...
def gen_primes():
""" Generate an infinite sequence of prime numbers.
"""
...
ub = float(((B.x-A.x)*(A.y-C.y))-((B.y-A.y)*(A.x-C.y)))/ \
float(((D.y-C.y)*(B.x-A.x))-((D.x-C.x)*(B.y-A.y)))
Python On Line-line intersection test
by Aneel,
December 02, 2009 21:40
ub is calculated, but never...
def get_conn():
host="myhost"
user="myuser"
...
Python On MySQLdb database access code
by Seun Osewa,
October 29, 2009 05:57
Use the 'with' statement:
#!/usr/bin/python # encoding: utf-8 ...
Python On equação do segundo grau
by frangossauro,
October 28, 2009 18:02
Please, post in english, si...
import random
while 1:
print random.randrange(0,100)
Python On Parse XML from Yahoo weathe...
by shmai,
October 28, 2009 12:47
This is classic asp script ...
Python On Parse XML from Yahoo weathe...
by Shmai,
October 16, 2009 10:40
This is classic asp script ...

Positional regex.