Programming Methods & Algorithms scripts - Top 4 Download

Programming Methods & Algorithms script downloads

Fifo as single linked lists

Fifo mean "First In First Out". This script  creates a container, which only allows element insertion and removal and where the first element inserted is the first element removed. ...
Python

Lazy streams using generators

This class allows you to use generators as more list-like streams. The chief advantage is that it is impossible to iterate through a generator more than once, while a stream can be re-used like a list. ...
Python

Anagram Fetcher

This script provides you code for fetching Anagrams out of any given file that contains words seperated by new lines. ...
Python

Reverse a string

Reverse a string script allows you to reverse a string. ...
Python

Matrix vector multiplication

Using 'reduce' and 'map', this code shows how a matrix vector multiplication can be reduced to a single loop. ...
Python

Case insensitive Dictionary

Case-insensitive Dictionary script is a dictionary that has case-insensitive keys. An internal dictionary maps lowercase keys to (key,value) pairs. All key lookups are done against the lowercase keys, but all methods that expose keys to the user retrieve e lowercanal keys. ...
Python

Finding the convex hull of a set of 2D points

This simple code calculates the convex hull of a set of 2D points and generates EPS files to visualise them. ...
Python

Finite State Machine FSM

This script shows a Finite State Machine (FSM) that can be used for small parsing tasks. The code is quite simple. The bulk of it is comments. In addition to state this FSM also maintains a user defined "something". This "something" is effectively memory, so this FSM could be considered a ...
Python

Generator for integer partitions

Generator for integer partitions script uses an iterative procedure to deal with integer partitions. ...
Python

Quick and easy FIFO queue class

Quick and easy FIFO queue class is an easy First-In-First-Out queue class based on Python's List data structure. ...
Python

Merging two sorted iterators

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. ...
Python

Basic Linear Algebra Matrix

This script defines the Matrix class, an implementation of a linear algebra matrix. Arithmetic operations, trace, determinant, and minors are defined for it. This is a lightweight alternative to a numerical Python package for people who need to do basic linear algebra. Vectors are implemented as 1xN and Nx1 matricies. There is ...
Python

Symmetric data obfuscation using xor

This script can be conveniently used to obfuscate a string of data using simple xor without using any key. ...
Python

Manipulating infinite lists

This script contains some useful functions which work on infinite lists, including generalized versions of map, filter, zip on gLists. ...
Python

Functional dictionary and list types

The purpose of this module is to provide a dictionary and list type that can aid in relational algebra, functional programming, list-oriented programming, and perhaps even code obfuscation. ...
Python

Octal Encryption

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

List iterator with advance and regress

The basic iterator for a list doesn't allow one to skip forward (except with "continue"), or backward (at all), nor does it behave well if the list is modified while it is being traversed. This script is NOT the be-all and end-all of improved iterators, but it gives a few ideas of how a ...
Python

Binary search in one line

This is an implementation of the binary search algorithm in (almost) one line. Given a number 'n' and a list 'L', the function returns the index of the number on the list, or -1. ...
Python

Rating class with mapping interface

Rating class with mapping interface script deals with items sorted by value and accessed by key or rating index. ...
Python

Improved Gray Scale Quantization

Improved Gray Scale (IGS) codes are used for the elimination of false contouring in images, and image compression. This Python program generates the IGS codes for a set of input gray level values. ...
Python