1 2 3 4
#!/usr/bin/python import socket,time ...
Python Connection Detection script
by matthew.scouten.myopenid.com,
October 02, 2008 01:06,
1 refactoring, tagged with short python sockets
This is a Quick and Dirty s...
1 2 3 4
class Planet(object): all = [] @classmethod ...
Python Pythonify my code
The get method just doesn't...
1 2 3 4
try: if options.input_file: infile = open(options.input_file, 'r') ...
Python Your average file filter...
by agnul,
August 27, 2008 17:22,
4 refactorings
From the useless speculatio...
1 2 3 4
#!/usr/bin/python # -*- coding: utf-8 -*- ...
Python Parse XML from Yahoo weathe...
Is there a more efficient w...
1 2 3 4
#!/usr/bin/python # -*- coding: utf-8 -*- ...
Python Base64 image encoding and i...
Is this a correct a way to ...
1 2 3 4
#!/usr/bin/python # -*- coding: utf-8 -*- ...
Python Query TinyUrl the fastest way
I'm looking for the fastest...
1 2 3 4
#!/usr/bin/env python # -*- coding: utf-8 -*- ...
Python Get function's attributes
I bet there is some other, ...
1 2 3 4
import threading import time ...
Python RepeatTimer
by roxority,
August 09, 2008 19:21,
No refactoring
An instance of this class a...
1 2 3 4
import wsgiref.handlers from google.appengine.ext import webapp ...
Python Get request path using Goog...
by Zote,
July 14, 2008 18:34,
1 refactoring, tagged with python, google application engine, gae, request path
if my url is http://zote.ap...
1 2 3 4
# -*- coding: utf-8 -*- ''' Description: Blowfish with custom base64 obfuscation. ...
Python Custom blowfish IRC impleme...
http://fish.sekure.us/ - bl...
1 2 3 4
cards = Card.objects.all() for card in cards: ...
Python Condense my search / replac...
by clickpass.com/public/bosko,
June 12, 2008 02:29,
3 refactorings
Code is self explanatory. C...
1 2 3 4
def segment_pages(page): page.paginator.left = [] page.paginator.right = [] ...
Python Django / Python / Paginatio...
Really quickly ported some ...
1 2 3 4
from random import random as _ eval(compile("\n".join( ["(lambda %s:" % (chr((121 - ((25 - (ord("z") - y)))))) ...
Python Random number generator
It works okay, but I think ...
1 2 3 4
#!/usr/bin/env python # ######################### # # $Id: sendfile.py,v 1.4 2008/03/19 11:59:52 dhylton Exp $ ...
Python sendfile.SftpSClient
by dhylton.myopenid.com,
March 19, 2008 14:53,
3 refactorings
the goal is to be able to e...
1 2 3 4
import re def addWord(token, frequencies): ...
Python Count word occurrences in a...
This code counts number of ...
1 2 3 4
class SearchLet(Form): district = Field(widget=SelectMultiple(choices=DISTRICTS, required=False) ...
Python Django models search
I'm using the following cod...
1 2 3 4
import inspect def curried(f): def curhelp(n, args): ...
Python Currying decorator
by openid.aol.com/Sxipestro,
November 01, 2007 21:35,
1 refactoring
This decorator works, but u...
1 2 3 4
def summe(zahlMaximum): z = [0,0,0,0,0,0] ...
Python Sum of all checksums to a v...
by jpzk.myopenid.com,
October 16, 2007 21:37,
5 refactorings
It's very long and i just w...
1 2 3 4
""" For a given number, prints Pascal's Triangle upside-down up to that line. Prints everything alligned at first, but starts screwing up at about 13. ...
Python Pascal's Triangle
by getopenid.com/ptn,
October 04, 2007 11:57,
5 refactorings
Algorithms and Data Structu...
1 2 3 4
#! /usr/bin/python """ A python primer. pydoc, doctest and classes. ...
Python Classtemplate
by griflet,
October 03, 2007 02:15,
2 refactorings
I'm new to python (and to O...
1 2 3 4
def montage(): topLeft = makePicture(getMediaPath("images-1.jpg")) # Top left picture, type in later topRight = makePicture(getMediaPath("images-2.jpg")) # Top Right picture, ...
Python posterize
by goatmonkey.myopenid.com/,
September 28, 2007 04:59,
5 refactorings
Creates a collage
Boys and girls, it's time t...