|Code Listing by Raymond Hettinger|
Tracks the additions and deletions to a set during update operations. Useful for large sets with few modifications.
Encapsulates lookups into a series of namespaces.
Sample generator using only r calls to random.random().
An O(1) LRU cache. Short, sweet, and fast. No bells and whistles.
Pairing heap refinement for fewer comparisons.
Implement Smalltalk's bag class (similar to MultiSets in C++ or bag's in Objective C or Haskell's Edison module).
Achieves exactness by manipulating values stored as a long integer mantissa with an integer exponent (base two).
Py3.0 transition aid. The sorted() builtin and the list.sort() method no longer accept a cmp function in Python 3.0. Most cases are easy to convert manually. This recipe handles the remaining cases.
Simple code to create and use public/private keypairs. Accompanied by a rudimentary encoder.
Implements a complementary-multiply-with-carry psuedo-random-number-generator. Period is 3636507990 * 2 ** 43487 (approximately 10 ** 13101).
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.