Programming Methods & Algorithms scripts - Top 4 Download

Programming Methods & Algorithms script downloads

Simple lockfile to detect previous instances

Simple lockfile to detect previous instances script implements a simple lockfile to ensure that only one instance of an application is alive at any given time. ...
Python

A friendly mkdir

This scripts provides a function mkdir() more friendly than Python's standard os.mkdir(). Limitations: it doesn't take the optional 'mode' argument yet. ...
Python

Public and protected attribute access

This script presents a way to introduce proper attribute access protection levels using a generic proxy object. By default all attributes are "protected" in the C sense and can be declared as public using either a function decorator or a class attribute. ...
Python

Length limited O 1 LRU Cache implementation

Length-limited O(1) LRU Cache implementation script is an implementation of a length-limited O(1ion scripue. ...
Python

Docstring coverage

This script is a tool to examine lack of docstrings in a module. It prints a rundown of the classes, functions, and methods in the given module that have not been given a docstring. ...
Python

Easily call executables from Python

One common aspect of programming is calling executables and processing results. It is not as easy or elegant to do this in Python as it is in a shell scripting language, such as bash. This script implements a shell-like module in Python which allows you to easily call executables and work ...
Python

Buffered Stream with Multiple Forward Only Readers

This script provides a buffered stream that supports multiple forward-only readers. The buffer enables readers that are behind the front-runner to access values that have already been read from the stream. Values that are no longer accessible by any reader are cleared from the buffer. ...
Python

Extending the logging module

This script helps you in adding new format specifiers to the logging module. In this example, it's for the user name and the name of the function that logged the message. ...
Python

How to Set Environment Variables

This script writes the environment variables using a batch file wrapper. It overcomes an operating system limitation. ...
Python

Sieve of Eratosthenes

This script computes an infinite sequence of primes using simple generators. A Python dictionary is used to mark multiples of the generated primes, according to the Sieve of Eratosthenes. ...
Python

Extensible object to XML converter

This function generates XML for any Python object through recursive functions. It is easy to add specific handlers for your own object types for more complex output options. ...
Python

Fast select

This script allows you to quickly select the n-th rank ordered element of a given sequence. It modifies the ordering of the given sequence. ...
Python

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

split and join

This script will split a file into several smaller files while at the same time hiding the original formatting of the file. The program has a primitive GUI design, allowing a small amount of interaction with the program. ...
Python

Splitting iterators

This script shows an implementation of isplit, a function that splits iterators into two equal ones, which return similar values, but are exact copies of one another. ...
Python

Big file sorting

Big file sorting script allows you to sort big ASCII files. ...
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

A class keeps a reference to it s instance

This script implements a base class, which allows derived classes to track instances in self.__instances__. It uses a WeakValueDictionary to store instance references. ...
Python

Timeit module wrapper

This script contains a simple, easy to use wrapper function for doing quick tests of your functions using the timeit module.The timeit module provides an easy way of testing the performance of your Python code by running it in many iterations and averaging the timings. However it is not very obvious how ...
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