Script Take The Lead
This script groups the elements returned by an iterator into n-tuples. The final tuple may be padded with Nones.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Group iterator into n-tuples with None padding Download |
This script computes the strategy oddments for two-player zero-sum games of perfect information. It uses a robust, iterative approximation that can handle dominance, non-square payoff matrices, and games without a saddle-point.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Game theory payoff matrix solver Download |
This script implements the three standard relational join algorithms: nested loops join, hash join, and merge join, using the iterator algebra support in Python.This script also presents code that can be used for inner join, left outer join, full outer join, and semijoins. The nested loops join...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Relational Join Algorithms Download |
This script lists the summed size of a directory (or set of directories) without the GUI. This recipe makes it quick and easy to see where all your disk space has gone! It has been tested under Windows and Unix, however it will probably be most useful under Windows considering the fact that...
Platforms: Windows, Python,
License: Freeware | Download (52): Directory Size Lister for Windows Download |
This script computes the definite integral of a user defined function over the interval [a, b]. The user can specify the number of Gauss points (1
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (52): Gaussian quadrature with Log singularity Download |
This script returns the convex hull (separated into upper and lower chains of vertices) and the diameter (farthest pair of points), given input consisting of a list of 2d points represented as pairs (x,y). The convex hull algorithm is Graham's scan, using a coordinate-based sorted order rather...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Convex hull and diameter of 2d point sets Download |
This script displays the html files in the default web browser without creating a temp file. It instantiates a trivial http server and calls webbrowser.open with a URL to retrieve html from that server.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Load data in browser without using temp files Download |
Given a list, this script finds the indices used to get the elements from the list in sorted order.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Permutation order indices Download |
This script forward the TCP traffic from your machine to another host, and back in the the other way. It uses asynchronous socket thanks to ye olde asyncore module, which was used by Zope up until recently (they integrated the Twisted reactor). As a consequence, it should be able to handle a...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Asynchronous port forwarding Download |
This script enables the group_by functionality like the similar function existing in Ruby on Rails.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Group and partition Download |
The idea of DOMAssistant is to provide a simpler and more consistent way to script against the Document Object Model (DOM) in web browsers. The idea is that everything starts with the element(s) in question, selected through id or CSS selectors, and then perform various methods on it, such as...
Platforms: Windows, Mac, *nix, JavaScript, BSD Solaris
License: Freeware | Download (50): DOMAssistant Download |
This script is the same as InverseExtend, except it uses a yield for non-local flow of control.It iterates downward through a hierarchy calling a method at each step.Each parent class method *must* be a generator with exactly one yield statement (even if the yield statement never actually gets...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): InverseExtendGenerators Download |
This script implements the instance method for performing currying. Instance method provides a way to perform currying such that the curried function runs much faster than one produced by closure. Currying is an important technique to build callables on the fly and is well covered in other...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): High-performance currying with instance method Download |
This script presents the implemetation of eiffel like methods (methods with preconditions and postconditions). eiffelmethod is a new descriptor that implements eiffel like methods. It accepts a method and optional pre and post conditions. If the pre or post conditions are not given it searches...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Eiffelmethod Download |
Scope qualifier for globals script contains the globaliser class that provides a scope qualifier s the glols.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Scope qualifier for globals Download |
The script illustrates the composite design pattern by using hierarchical dictionaries. It can be used to process hierarchical, tree-based data structures using Python dictionaries.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Composite design-pattern using dictionaries Download |
An Applescript that uses a python script with the help of pywapi to parse the WOEID (where in the world) to display the current weather conditions.
Platforms: Windows, Mac, *nix, PHP, BSD Solaris
License: Freeware | Download (50): Get Weather Download |
This script fills the need to have a scheduled directory synch occur via FTP. You could use it to clean out a directory without much effort. There are probably more robust examples out there, but this one should be easily modifiable for FTP newbies. It uses Sets to speed up finding missing files...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (49): Simple FTP directory synch Download |
This script addresses the following two needs: - Object construction for some class is expensive. - Objects of this class need to be instantiated across multiple runs of the program. For example, object instantiaton may involve reading one or more big files, connecting to a database or a network...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (49): Instantiating pickled instances transparently Download |
This script implements the full suite of rich comparison operators if __cmp__ is defined.The __cmp__ method is sufficient to provide comparisons between user-defined classes. However, inheriting from a base class (such as a builtin) which already provides the rich-comparison methods will cause...
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (49): Rich Comparison Mixin Download |