Programming Methods & Algorithms Python scripts - Top 4 Download

Programming Methods & Algorithms Python script downloads

Clean implementation for Ordered Dictionary

This script allows you to record the order in which items are added. This implementation uses much less code than the others by extending not well-known class DictMixin. ...
Python

Automated swigging for creating C shared modules

This script contains a simple python function to automate using the swig process for creating C modules for use inside Python. ...
Python

Readable switch construction

Python's lack of a 'switch' statement has garnered much discussion and even a PEP. The most popular substitute uses dictionaries to map cases to functions, which requires lots of defs or lambdas. While the approach shown in this script may be O(n) for cases, it aims to duplicate C's original 'switch' functionality ...
Python

PyCrash

PyCrash is a Run-Time Exception Dumper which handles uncaught exceptions during the execution of Python programs and collects information about the program context. PyCrash can be very useful in report bug information, because the programmer can easily analyse the program execution context of the crashed application. PyCrash provides you following informations: ...
Python

Named Tuples

This script allows you a fast, lightweight attribute-style access to tuples. It contains a function that returns a new subclass of tuple with named fields. The principal features are: - Easy to type/read/modify function signature: NamedTuple('Person', 'name age sex height nationality')  - C-speed attribute lookup using property and itemgetter. - No ...
Python

Python symbols

Python symbols is a toy module that shows a way to define symbols inside functions, using a decorator. ...
Python

Load data in browser without using temp files

This script displays the html files in the default web browser without creating a temp file. It instantiates a trivial http server and calls webbrowser.open with a URL to retrieve html from that server. ...
Python

Flexible enumerate

Flexible enumerate() script adds an additional start argument to the built-in enumerate function. ...
Python

Simpler item retrieval using tupled subscripting

This script shows a small addition to the tuple, list, and dictionary classes to allow for a simpler way to retrieve a number of independent items. By allowing for the subscripting to use tuples some very annoying cases becomes much simpler. This script is suitable for large data sets where you need alot of ...
Python

SQL like ORDER BY function for lists

This script contains a function that allows you to easily sort a list by multiple columns in ascending and descending order similar in function to the ORDER BY clause in SQL. ...
Python

Some python style switches

Some python style switches script shows several ways of making a 'switch' in pyshows sevbr >/ ...
Python

Merge sorted sequences

The usual approach to merging is to loop through both sequences taking the smallest from each until they are both exhausted. Python's "timsort" function detects order in underlying sequences and will run a C speed merge on the data. So, all that is involved is concatenating the sequences and running a ...
Python

Dictionary Tools

Dictionary Tools script shows you a collection of some dictionary tools. ...
Python

Large File Sizes on 32 bit Windows

You can't use the os library to determine the size of large files on 32 bit Windows. This script uses the FindFiles win32call which provides among other things file size information. ...
Python

Random Password Generation

Random Password Generation script is a code snippet to generate an 8 character alphanumeric password. ...
Python

A basic time profiler

A basic time profiler script provides a very simple time profiling module which helps you to measure actual execution time for blocks of Python code. ...
Python

A generator for any number of for loop

Python has a number of nice methods to handle 'for' loops. However, the situation often arises where you have a large number of nested loops. This script allows you to reduces the number of loops to one. ...
Python

Memory usage

Memory usage script provides a number of functions to get the memory usage of a Python application on Linux. ...
Python

Terminating a subprocess on Windows

The new subprocess module in Python 2.4 allows access to the handle of any newly created subprocess. You can use this handle to terminate subprocesses using either ctypes or the pywin32 extensions. ...
Python

Windows free drive space report

Windows free drive space report script reads a file containing a list of share names, and prints a report of the current free space on the volumes. ...
Python