Several books on algorithms include working implementations of the algorithms in a real programming language. Although these implementations are intended primarily for exposition, they can also be useful for computation. Since they are typically small and clean, they can prove the right foundation for simple applications.
The most useful codes of this genre are described below. All are available from the algorithm repository, http://www.cs.sunysb.edu/ algorith.