Programming Methods & Algorithms scripts - Top 4 Download

Programming Methods & Algorithms script downloads

Class with default method handler

This script is a class whose objects can handle undefined method calls, passing them on to a default handler. ...
Python

Separating Pattern Implementation from Your Code

This script separates pattern implementation from your code so that you can reuse the implementation elsewhere. It is an example that shows a reusable implementation of the Observer pattern. ...
Python

Parse Command Line String from CommandLine

This script represents a way to parse command line from user provided string or try to get the original Argv from Windows OS Platform. ...
Python

Dictionary tool for lazy typers

This script provides an alternative way of generating and updating dictionaries. It saves couple of keystrokes, making routine dict operations easier. ...
Python

Integrating Twisted reactor with IPython

This script allows you to run the Twisted reactor event loop in a thread alongside an IPython shell, for introspecting a running Twisted process. ...
Python

Shed Skin

Shed Skin is an experimental Python-to-C compiler. It can convert pure, but implicitly statically typed Python programs into optimized C code. Currently, these programs cannot freely use the Python standard library. ...
Python

min max peaks with Numeric

Given a large one-dimensional array, this script breaks it into blocks of contstant length and compute min and max for each block, the so-called "peaks data". ...
Python

Criteria based cascading priority queue

This module provides a simple criteria-based priority queue with "priority cascading".The criteria argument should be a sequence of callables that return boolean values. There is no need to add an "all pass" criterion at the end; the queue will add all non-matching items with the least priority.ill add >a ...
Python

Extract a inner function from a class

This function can extract a inner function from a class or a function. It may be useful when writing a unit test code. ...
Python

Lazy Traversal of Directed Graphs

The os.path.walk routine that ships with the python standard library is limited to traversing the file system tree. This script allows you to realize a generic traversal for arbitrary (directed) graphs with support for recursion limits. ...
Python

Factory pattern

In the factory pattern script you have an object that creates other objects.Factory is useful to separate implementation from interface. It adds a new indirection layer. When you want to instanciate an object you call its factory and the factory creates the instance. ...
Python

Infix Postfix

This script is useful to convert an infix expression to postfix and vice-versa. You can also evaluate infix and postfix expressions. ...
Python

Function composition

This script contains two classes that show two styles of function composition. The difference is only when the second function (g) returns a tuple. compose function passes the results of g as a tuple, mcompose treats it as a tuple of args to pass along. Note that extra args provided to (m)compose are treated ...
Python

pkgconfig parser

This script creates a class to allow access to variables stored in pkg-config files ( or '.pc' files ). This is usefull in conjunction with distutils to get correct information for compiling external C/C modules. Variable substitution is performed with string.Template. ...
Python

Quantum Superposition

This script lets you treat  python sets.The constructor takes any number of scalars and/or Superposition instances. These items are the possible states. When doing scalar operations on such objects, the operation is delegated to its possible statbjects, tr >/ ...
Python

Octal Encryption

This script helps you to get the octal representation of text. ...
Python

Parsing the command line

The module optparse was a great addition to Python 2.3, since it is much more powerful and easier to use than getopt. Using optparse, writing command-line tools is a breeze. However, the power of optparse comes together with a certain verbosity. This script allows to use optparse with a minimum of boilerplate, ...
Python

Memory usage

Memory usage script provides a number of functions to get the memory usage of a Python application on Linux. ...
Python

Type checked argument lists with decorators

This script shows you to use the new decorator feature of python 2.4 to systematically check the argument types for type-sensitive functions. ...
Python

Call a function method X times per second

This simple generator function is used to call a function X times per second. ...
Python