Generate all permutations of a list





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

« Previous 1 2 3 Next »
9
Date Submitted Sun. Aug. 13th, 2006 10:38 PM
Revision 1
Scripter ASmith
Tags python | util
Comments 0 comments
Returns a safe copy if the value argument is mutable, otherwise returns the original argument. If the feedback keyword argument is True, then a tuple is returned containing the resulting argument, and whether or not is was mutable.
9
Date Submitted Sun. Aug. 13th, 2006 10:50 PM
Revision 1
Scripter ASmith
Tags google | python | Text | translation
Comments 1 comments
Translates text from using translate.google.com
9
Date Submitted Fri. Aug. 18th, 2006 10:59 AM
Revision 1
Scripter ASmith
Tags python
Comments 0 comments
Reads well formed RSS entries using standard python libraries
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
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.
9
Date Submitted Wed. Mar. 1st, 2006 4:43 PM
Revision 1
Helper gbarendt
Tags python
Comments 0 comments
Python example set-up script from python.org docs.
8
Date Submitted Sat. Aug. 5th, 2006 6:44 PM
Revision 1
Scripter ASmith
Tags "Yahoo Finance" | Finance | news | python | RSS
Comments 0 comments
This class allows you to retrieve a companies current stock quote from Yahoo Finance, as well as current news feed entries for that company.
8
Date Submitted Tue. Mar. 21st, 2006 11:58 AM
Revision 1
Helper gbarendt
Tags File | programming | python | system
Comments 1 comments
Copies files from nested folders into one source, flat directory.
7
Date Submitted Tue. Aug. 15th, 2006 3:24 AM
Revision 1
Scripter ASmith
Tags python
Comments 3 comments
Introduction
This function is a function that returns a function. You pass it a function, and it returns a function that takes a collection as a parameter and applies your function to it. The difference between this and map is that this returns a function that you can use again which takes a collection as a parameter.

For Example

If I had a collection c, and a function p that prints its argument, I can create a visitor function using the following:
printVisitor=createVisitor(p)

Then any time I want to print a collection I just type:
printVisitor(c)

A Better Example
If you were writing an IRC server you would probably have many functions that operated on a list of users, such as ban,makeop, etc. You could create those functions in a manor similar to the following:

banUsers=createVisitor(ban)
makeOperators=createVisitor(makeop)

Then in a seperate file you could use these functions as if they were regular functions.

you would type banUsers(users) to ban, or makeOperators(users) to promote those users.
7
Date Submitted Fri. Aug. 18th, 2006 9:40 AM
Revision 1
Scripter ASmith
Tags python
Comments 2 comments
Very fast method for extracting all of the unique items from a list while preserving their original ordering.
« Previous 1 2 3 Next »