Programming Methods & Algorithms scripts - Top 4 Download

Programming Methods & Algorithms script downloads

Quick and easy FIFO queue class

Quick and easy FIFO queue class is an easy First-In-First-Out queue class based on Python's List data structure. ...
Python

Extending Classes

This script contains two implementations for extending an exsisting class using metaclasses. ...
Python

Just in time instantiation

JIT is a class for Just In Time instantiation of objects. Init is called only when the first attribute is either get or set. Then automatic delegation is used to front for the object. ...
Python

Changing return value for mutating list methods

Mutating list methods such as 'append' or 'extend' return None instead of the (mutated) list itself. Sometimes, this is not the desired behaviour. To have a reference to the (mutated) list returned is usefull, if one wants to chain commands such as mylistinstance.append(7).sort(). ...
Python

Storage for store information about prefixes

Storage for store information about prefixes script allows you to store information about domains determined by key prefixes. ...
Python

Summary reports using itertools groupby

This script produces a summary of the data, grouped by the given key (default: the first item), and giving totals of the given value (default: the second item). The key and value arguments should be functions which, given a data record, return the relevant value. ...
Python

Tabify

This script introduces a function that converts the indentation with spaces to tabs. ...
Python

Windows registry

This script allows you to store some data for your progam in the windows registry without many complex operations. ...
Python

Tuples with Named Elements via Spawning

Instead of requiring the named attributes list for each instantiation of the tuple, this implementation 'Spawns' a derived tuple class that is taylored to the named attributes specified. And it is this Spawned class that is then used to instantiate tuples. This approach effectively separates the definition of the attribute names from the ...
Python

Print Hook

This class gets all output directed to stdout (e.g by print statements) and stderr and redirects it to a user defined function. ...
Python

Rebind class properties

Sometimes you define properties in base class and override the getter setter methods in derived classes. Then you find out the base class though has derived properties are still pointing to baseclasse's methods not the overriden ones. ...
Python

Simplified attribute accessors using overloading

This script presents an ideom for simplified accessors, that combines typical getter and setter functionality of an attribute into a single overloaded method, that instead of getATTRIBUTE and setATTRIBUTE can now just be called ATTRIBUTE. When called without arguments it acts as a getter and retrieves the attribute's value. When called ...
Python

Remote control with telnetlib

This script sends commands to one or more logins using Python's standard telnetlib module. ...
Python

Scope qualifier for globals

Scope qualifier for globals script contains the globaliser class that provides a scope qualifier s the glols. ...
Python

Dicts from lists

This script is a simple oneliner to built a dictionary from a list. ...
Python

Find the most frequent elements

This script returns a sorted list of the most common to least common elements and their counts. If n is specified, return only the n most common elements. ...
Python