Programming Methods & Algorithms Python scripts - Top 4 Download

Programming Methods & Algorithms Python script downloads

Using eval To Transform Symbolic Expressions

Using eval() To Transform Symbolic Expressions script allows you to convert simple arithmetic expressions from infix to to converorm. ...
Python

First Class Enums in Python

This script allows you to do true immutable symbolic enumeration with qualified value access. Most propoqualifiedor an enum in python attempt to solve the issue with a single class. However, fact is that enum has a dual nature: It declares a new anonimous type *and* all possible instances (values) of that ...
Python

Binary floating point summation

This script eliminates completely  rounding errors and loss of significance due to catastrophic cancellation during summation. It  achieves exactness by keeping full precision intermediate subtotals. Offers three alternative approaches, each using a different technique to store exact subtotals. ach >using/ ...
Python

Reloading all modules

When you create a Python module, you can use a test script wich import your module. But you probably have noticed that when you run the test script, it always use the first version of your module even if you made changes in the code.This is because the import statement check ...
Python

Creating a share on windows

This script is an example of how one would use python's win32net module to create a share on windows. ...
Python

base64 encoding prototype

This script takes a decimal number, converts it into binary, takes the first six numbers in that, converts that into a decimal number, and from there makes it a letter("m") according to the base64 code. ...
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

Python symbols

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

More accurate sum

Built-in "sum" function, as well as add.reduce functions in Numeric/numarray introduce a large error when summing large arrays of like elements. This script contains a function that makes sums with error less than 1e-15. It doesn't use any additional memory (although it destroys the data array), and also runs asymptotically faster for unlimited precision ...
Python

Observer Pattern

This is a Python implementation of the observer pattern. It defines a one-to many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. ...
Python

get date wrapper to datetime module

The datetime module only accepts inputs of time it understands. For example, the months given to it have to be in range of values 1-12. This wrapper works around that issue and enables you to move forward or backward more arbitrary units of time. It does that by changing the year, ...
Python

Memoize Decorator with Timeout

This simple decorator is different to other memoize decorators in that it will only cache results for a period of time. It also provides a simple method of cleaning the cache of old entries via the .collect method. This will help prevent excessive or needless memory consumption. ...
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

Disk Dumper

This script will display a hex dump of the disk specified on the command line. As the last two arguments, the program takes the first sector and last sector that should be displayed by this utility. The size of the sectors is stored in a variable created right after the imports ...
Python

Converting windows 64 bit time

In Win32 often you'll find time stored in 100-nanosecond intervals since January 1, 1600 UTC. It is stored in a 64-bit value which uses 2 32 bit parts to store the time. The following script is a function that returns the time in the typical format the python time libraries use (seconds ...
Python

pykill

This is a python script very loosely approximating pkill that is a Linux command: will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout. ...
Python

Obtaining the name of a function method

This scripts shows you how to obtain the name of a method or a function from within the running method/function. ...
Python

Evaluate upper letters variable name as constants

This code converts variables which is made with upper-leters only, into constants at compile time, if it is possible to be replaced. and generate .pyc file. This script is oriented to the compile time evaluation decreasing, the feature of Constants. ...
Python

Easy binary2decimal and decimal2binary

This script allows you to convert binary numbers to decimal and vice-versa in the most straightforward way. ...
Python

Group and partition

This script enables the group_by functionality like the similar function existing in Ruby on Rails. ...
Python