© Copyright 2000-2020 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Raymond Hettinger|
Minimizes the number of comparisons to compute the minimum and maximum of a dataset. Uses 1.5 compares for every element, improving on the more obvious solution that does 2 comparisons per element.
Adds an additional start argument to the built-in enumerate function.
Pure python drop in replacement for collections.deque() from Py2.4. See documentation at: http://www.python.org/dev/doc/devel/lib/module-collections.html
Uses a dictionary as the underlying data structure for the deque...
Explore the mysteries of floating point arithmetic. This class readily reproduces textbook examples and provides immediate demonstrations of representation error, loss of precision (subtractive cancellation), and the failure of the distributive,...
Easy to use chain of dictionaries for crafting nested scopes or for a tree of scopes. Useful for analyzing AST nodes, XML nodes or other structures with multiple scopes. Can emulate various chaining styles including static/lexical scoping,...
An O(1) LRU cache. Short, sweet, and fast.
Framework for experimenting with guessing strategies in Master-mind style games.
Fast version of r576930 reimplemented using a list of lists instead of a node class.
This mixin makes it easy to provide a full dictionary interface to a class defining only a few mapping methods for getting, setting, deleting, and listing keys. Also, a function is provided to incorporate the mixin at runtime so that code for...
O(n) quicksort style algorithm for looking up data based on rank order. Useful for finding medians, percentiles, quartiles, and deciles. Equivalent to data[n] when the data is already sorted.
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.