Iterator
This script shows an extremely simple implementation of a method used for randomizing the iterable. This script evaluates the entire iterable to a sequence in memory.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): Randomize an iterator Download |
This script does nested for loops on an arbitrary list of iterable things.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (51): n-dimensional loop iterator object Download |
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation [1]. This design pattern is also known as Cursor.Motivation: An example of an aggregate object is an instance of the List ADT. Consequently, an iterator can be used to traverse...
Platforms: Matlab
License: Freeware | Size: 30.72 KB | Download (45): Design Pattern: Iterator (Behavioural) Download |
File::Find::Parallel allows you to traverse a number of similar directories in parallel. SYNOPSIS use File::Find::Parallel; my $ffp = File::Find::Parallel->new( qw( /foo /bar ) ); print "Union:n"; my $union = $ffp->any_iterator print " $_n" while $_ = $union->(); print...
Platforms: *nix
License: Freeware | Size: 9.22 KB | Download (92): File::Find::Parallel Download |
File::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function. SYNOPSIS File::Next::OO is just a wrapper around File::Next::files function. But it is easy to remember and less typing. Call it always with object notation. Not mixed as in File::Next itself....
Platforms: *nix
License: Freeware | Size: 8.19 KB | Download (96): File::Next::OO Download |
Class::Interfaces is a Per module for defining interface classes inline. SYNOPSIS # define some simple interfaces use Class::Interfaces ( Serializable => [ pack, unpack ], Printable => [ toString ], Iterable => [ iterator ], Iterator => [ hasNext, next ] ); # or some more complex ones...
Platforms: *nix
License: Freeware | Size: 6.14 KB | Download (93): Class::Interfaces Download |
Merging two sorted iterators script provides a mergeiter() function that can merge two iterators into a single iterator. It uses generators, and guarantees constant memory use.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (53): Merging two sorted iterators 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 (53): Relational Join Algorithms Download |
This script merges multiple sorted inputs into a single sorted output.
Platforms: Windows, Mac, *nix, Python, BSD Solaris
License: Freeware | Download (50): Iterator Merge Download |
Flattens arbitrarily nested loops into a single loop that iterates over all combinations of loop parameters.Makes it very easy to change the iteration parameters without rewriting loops, reindenting code, updating indices, etc.Very convenient for simulation problems where the parameters being...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (48): Parameter Iterator (paramiterator) Download |
nebgb is a Genbank file parser library. Usage: >>> import nebgb >>> rec = nebgb.parse_file("./test/data/simple-1.gb").next() >>> rec.locus["name"] 'NP_034640' >>> rec.locus["length"] 182 >>> rec.keywords["source"]["name"] 'house mouse' >>> rec.features[1]["properties"]["product"]...
Platforms: *nix
License: Freeware | Size: 296.96 KB | Download (39): nebgb Download |
Elementflow is a Python library for generating XML as a stream without first building a tree in memory. Some existing XML producing libraries (like ElementTree, lxml) build a whole XML tree in memory and then serialize it. It might be inefficient for moderately large XML payloads (think of a...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (35): Elementflow Download |
libUTL++ is a cross-platform C++ class library that provides a set of commonly useful functionality and abstractions to expedite C++ application development. Here are some of the highlights in terms of functionality: utl::Object provides a common interface for basic object functionality such...
Platforms: *nix
License: Freeware | Size: 5.67 MB | Download (101): libUTL++ Download |
Tree::BPTree is a Perl implementation of B+ trees. SYNOPSIS use Tree::BPTree; # These arguments are actually the defaults my $tree = new Tree::BPTree( -n => 3, -unique => 0, -keycmp => sub { $_[0] cmp $_[1] }, -valuecmp => sub { $_[0] <=> $_[1] }, ); # index the entries in this...
Platforms: *nix
License: Freeware | Size: 17.41 KB | Download (92): Tree::BPTree Download |
Geo::Lookup::ByTime is a Perl module to lookup location by time. SYNOPSIS use Geo::Lookup::ByTime; $lookup = Geo::Lookup::ByTime->new( @points ); my $pt = $lookup->nearest( $tm ); Given a set of timestamped locations guess the location at a particular time. This is a useful operation...
Platforms: *nix
License: Freeware | Size: 15.36 KB | Download (94): Geo::Lookup::ByTime Download |
Closure::Loop is a Perl module with redo, last, next for closure based loops. SYNOPSIS package MyIterator; use Closure::Loop; # mixin sub new { my $class = shift; return bless { }, $class; } sub forAll { my $self = shift; my $cb = pop || die "No callback"; for my $i (@_) { eval {...
Platforms: *nix
License: Freeware | Size: 6.14 KB | Download (97): Closure::Loop Download |
Template::Manual::Views is a template toolkit views (experimental). This section describes dynamic views: a powerful but experimental new feature in version 2.01 of the Template Toolkit. A view is effectively a collection of templates and/or variable definitions which can be passed around as...
Platforms: *nix
License: Freeware | Size: 778.24 KB | Download (99): Template::Manual::Views Download |
Biomolecule Toolkit project is an Open Source library for the structural modeling of biological macromolecules. The toolkit provides a C++ interface for common tasks in computational structural biology, to facilitate the development of molecular modeling, design, and analysis tools. Whats New...
Platforms: *nix
License: Freeware | Size: 450.56 KB | Download (97): Biomolecule Toolkit Download |
Set::CrossProduct is a Perl module that allows you to work with the cross product of two or more sets. SYNOPSIS my $iterator = Set::CrossProduct->new( ARRAY_OF_ARRAYS ); # get the next tuple my $number_of_tuples = $iterator->cardinality; # get the next tuple my $tuple = $iterator->get;...
Platforms: *nix
License: Freeware | Size: 7.17 KB | Download (100): Set::CrossProduct Download |
XML::NodeFilter is a generic XML::NodeFilter Class. SYNOPSIS use XML::NodeFilter; my $filter = XML::NodeFilter->new(); $your_iterator->set_filter( $filter ); "Filters are objects that know how to "filter out" nodes. If a NodeIterator or a TreeWalker is given a NodeFilter, it applies the...
Platforms: *nix
License: Freeware | Size: 6.14 KB | Download (87): XML::NodeFilter Download |