ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

6
Date Submitted Fri. Aug. 18th, 2006 11:04 AM
Revision 1
Scripter ASmith
Tags archive | python
Comments 0 comments
Decompress a .tar.bz2 archive in Pytho
9
Date Submitted Fri. Aug. 18th, 2006 11:06 AM
Revision 1
Scripter ASmith
Tags python
Comments 1 comments
Quick way to get the users home directory in Unix/Linux and Windows
6
Date Submitted Fri. Aug. 18th, 2006 11:10 AM
Revision 1
Scripter ASmith
Tags python
Comments 4 comments
Builds and prints a list of all links in a specified webpage
10
Date Submitted Wed. Oct. 11th, 2006 2:41 PM
Revision 1
Beginner nil_ptr
Tags permutations | permute | python
Comments 1 comments
This is snippet of code solves the interesting (and specialized) problem of generating all permutations of a list. I hope you like recursion. For exmaple:

permute( [0,1,2] )

would return

[[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]]
9
Date Submitted Fri. Oct. 13th, 2006 8:03 AM
Revision 1
Scripter bertheymans
Tags chmod | linux | python | system | unix
Comments 0 comments
This python class converts a permission mask in symbolic format (the kind a diretcory listing produces, ex.: drwxr-xr-x) to a string that's usable in a chmod command.

ex.: chmod u=rwx,g=rwx,o=rwtx ~/myscripts/convert_mask.py

This can be very useful when recovering permissions from a backup.
4
Date Submitted Thu. Nov. 30th, 2006 11:36 PM
Revision 1
Beginner ivy7878
Tags address | addresses | country | IP | python
Comments 0 comments
This module is a Python Library to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use the API to qeury all IP2Location™ binary databases for applications written in Python.
6
Date Submitted Sun. May. 27th, 2007 11:14 AM
Revision 1
Beginner kvj86210
Tags python
Comments 0 comments
Create a regular expression pattern matching any positive number that is less than or equal to the given max number

Example:

pattern = createRegExNumberPattern( 950 )

print pattern

([0-8]\d\d)|(9[0-4]\d)|(950)
1
Date Submitted Fri. Jun. 6th, 2008 6:28 PM
Revision 1
Beginner Can
Tags lambda | permutation | python
Comments 0 comments
First post here. Tried to get the most minimalistic way to calculate the amount of permutations. The typical formula is:

n! = 1 * 2 * 3 ... * r * r + 1 * ... n
r! = 1 * 2 * 3 ... * r

But since every number between 1 and r is simplified, it's just a multiplication of the (x)range between r+1 and n.

Also as an example of lambda functions on python, and the reduce function, which takes every pair inside a list-type object and runs the function over them.
2
Date Submitted Fri. Jun. 6th, 2008 6:32 PM
Revision 1
Helper jamesmcm
Tags hangman | python
Comments 0 comments
A simple CLI hangman implementation in Python.

Uses a simple list of countries in countries.txt to generate words.
2
Date Submitted Mon. Jun. 9th, 2008 4:03 AM
Revision 1
Helper jamesmcm
Tags anaram | python
Comments 0 comments
A simple anagram solver in python. Requires a dictionary named wordlist.txt