[Star Animation]

Raymond's Python Programs and Downloads

Matrix routines, Puzzle solver, TwelveC, Quoter

E-mail me


Matrix, Vector and Elementwise routines

100% pure python math package. Does NOT require or conflict with numPy! UserList style implementation adds elementwise operations including broadcasting (multiply a matrix by either another matrix, a vector, or a scalar. Vector class provides outer, dot and cross products, a norm, and a Householder vector. Matrix class provides matrix multiplication, transpose, multiplication by vector, QR decomposition, LU decomposition, inverse, and matrix divide. The matrix divide solver handles inconsistent cases and gives a least squares solution. Utility routines are provided to generate elementary matrix, and sophisticated curve fitting (polynomial fit, rational approximation, and fitting to arbitrary functions over an interval).

Advanced implementation features including, caching decompositions, exploiting structure of triangular matrices (using backsub as a solver) and optional pre and post-condition assertions for quality assurance and documentation.

Source Code: Matfunc.Py Documentation: Matfunc.htm

Requires Python 2.2.


Generic Puzzle Solver

Framework for defining and solving puzzles using either depth first or breadth first searching. Highlight is the ease with which new puzzles can be defined and solved.

Includes pretty printed solutions to the Jug filling problem, the River crossing problem, the Eight queens problem, a Marble puzzle, a sliding block puzzle, and the Triangle Tee puzzle.

Source Code: Puzzle.Py

Requires Python 2.2.


TwelveC

Source Code: TwelveC.Pyw
Emulates the HP-12C financial calculator.

Requires Python 2.0 or later. Uses the TkInter GUI.


Quoter

Source code: quoter.pyw
Fetches stock quotes via the internet and returns the result into an MS Excel Spreadsheet.

The spreadsheet needs to be open and have named two column ranges, "tickers" and "currPrices". The first column contains the stock symbols to be looked up. Quoter retrieves the prices and puts the result in the second column. The internet connection needs to already be open (launch your browser or dial-up program).

This script is only 16 lines long and is trivially easy to modify.

Requires PythonWin and uses features in Python version 1.6 or later.


Click here to return to home page.