Python On Get request path using Goog...

by ielectric.myopenid.com, July 22, 2008 18:07

Take a look at routes pytho...

Avatar Talk
1
2
3
4
cards = Card.objects.all()

for card in cards:
...

Python On Condense my search / replac...

by Tom Lynn, July 17, 2008 12:31

This is shorter, but arguab...

3ca6bd7b50c8f00349e6586c3627de24 Talk
1
2
3
4
alphabet = "zyxwvutsrqpomnlkjihgfedcba"

inputWords = ["england", "france", "spain", "italy", "greece", "portugal",
...

Python On Custom sort a list of words

by Tom Lynn, July 17, 2008 09:43
3ca6bd7b50c8f00349e6586c3627de24 Talk
1
2
3
4
import re
from collections import defaultdict

...

Python On Count word occurrences in a...

by Tim, June 29, 2008 00:32 Star_fullStar_fullStar_fullStar_fullStar_full
Avatar Talk

Python On Django / Python / Paginatio...

by Michael, June 26, 2008 20:08

I've written a digg-like pa...

Ae6e94b88e9fce8c14d63640aad14946 Talk
1
2
3
4
import random

numbers = input("Numbers to generate: ")
...

Python On Random number generator

by yoness, May 30, 2008 13:23 Star_fullStar_fullStar_fullStar_fullStar_full

You can modify radically th...

8c44876dda4cdf65331f082686103ad2 Talk
1
2
3
4
from collections import defaultdict as dd

def list_cmp(order):
...

Python On Custom sort a list of words

by Bjoern Brandenburg, May 24, 2008 01:59

This can be done much more ...

3b6399959bbfd36f5aba155ef0c6e133 Talk
1
2
from random import random
print reduce(lambda x,y: x + x * random(), [2] + [0] * 24)

Python On Random number generator

by JL, May 23, 2008 18:48

I also can't see the point....

Avatar Talk

Python On Random number generator

by Simon Law, April 18, 2008 13:31

I see what you're doing her...

6869f98aa6911b0f9f13468ccca24813 Talk
1
2
3
4
import time
import os
import sys
...

Python On sendfile.SftpSClient

by Simon Law, March 20, 2008 00:02

You use pycurl outside of i...

6869f98aa6911b0f9f13468ccca24813 Talk

Python On sendfile.SftpSClient

by dhylton.myopenid.com, March 19, 2008 17:13

why does this not apply to ...

03402885f5a969d18fa2ac4b56348196 Talk

Python On sendfile.SftpSClient

by Simon Law, March 19, 2008 17:06

That's because pycurl is on...

6869f98aa6911b0f9f13468ccca24813 Talk
1
2
3
4
def add(a, b):
    return a + b

...

Python On Currying decorator

by brent, March 05, 2008 18:31
673a112cceaf8a4714ac6c3b6ae91690 Talk
1
2
// s is the string to check occurances of.
alert(s.split("YourWord").length - 1);

Python On Count word occurrences in a...

by Netferret, February 25, 2008 15:40

This is the best solution I...

762e6a51b13c6357f178e65b19392e09 Talk
1
2
3
from itertools import izip
def alphabet_cmp(a, b):
...

Python On Custom sort a list of words

by orip, January 18, 2008 01:12

armandino - I liked how you...

9c52ad00ba2f2602661c49f896733229 Talk

Python On .ini file parser

by lbolognini, January 09, 2008 09:20

Thanks John!

D2ff155cd04fa175620d2f3495b11b08 Talk
1
2
3
4
import sys
import re

...

Python On .ini file parser

by John, January 09, 2008 06:04
Avatar Talk

Python On Custom sort a list of words

by jaredgrubb, December 14, 2007 21:57

(ugh, my ancient BASIC back...

848e7681373328946b4b7ccb3a537627 Talk
1
2
3
  if a_i!=b_i then:
    return cmp(a_i, b_i)
  return my_cmp(a[1:], b[1:])

Python On Custom sort a list of words

by jaredgrubb, December 14, 2007 21:56

As for the difference betwe...

848e7681373328946b4b7ccb3a537627 Talk

Python On Custom sort a list of words

by armandino.myopenid.com, December 12, 2007 03:00

Hi Jared,

There seems to b...

2155c92be66863c4634778bf522efe14 Talk
1
2
3
4
def my_cmp(a, b):
  global alphabet

...

Python On Custom sort a list of words

by jaredgrubb, December 11, 2007 04:24

You can use the sort() meth...

848e7681373328946b4b7ccb3a537627 Talk
1
2
3
4
mamaMia = "Mamma mia, here I go again\
 Mamma mia, here I go again\
 My my, how can I resist you?\
...

Python On Count word occurrences in a...

by lbolognini, December 08, 2007 14:02 Star_fullStar_fullStar_fullStar_full

adict.update() overwrites t...

D2ff155cd04fa175620d2f3495b11b08 Talk
1
2
3
4
import re

def getWordFrequencies(text):
...

Python On Count word occurrences in a...

by Elij, December 08, 2007 08:58 Star_fullStar_fullStar_full

The regex needs some work -...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk

Python On .ini file parser

by jaredgrubb, November 17, 2007 18:34

If what you're looking for ...

848e7681373328946b4b7ccb3a537627 Talk
1
2
3
4
#! /usr/bin/python
""" A python primer. pydoc, doctest and classes.

...

Python On Classtemplate

by gioby, November 15, 2007 23:19

This template is a very nic...

B4e2590d3e9900d359fdfcc96cbb040b Talk