GDS Software's Free Software Tools


These tools are provided for use under the GNU General Public License (GPL). Click here to get a copy of the GPL. These software tools are provided without any warranty -- you agree to use them at your own risk. GDS Software and Don Peterson are not responsible for any losses you suffer because of this software.  You can send me mail using someonesdad1 at gmail.com.

Click here for some notes on some of the software tools that I like and use.

Math

archimedean.py Script to calculate the arc length of an archimedean spiral.  For example, use it to estimate the length of toilet paper on a roll.
BusinessCardMathTables.pdf A document containing small math tables that will print out to be about the size of a business card.  These are surprisingly compact and can help you do 1% type calculations when a calculator isn't handy.  The document also spends some time explaining the use of some of these old-style tables and how to use approximations, as a lot of this knowledge has disappeared in the last 40 years since electronic calculators and computers became popular.  Hide them, or you'll be labeled as a geek.  :^)
frac.py A python script that will calculate a rational approximation to a real number.  If you download the free mpmath python library, you can calculate to arbitrary precisions
ElementaryFunctions.pdf

Graphs of a variety of elementary math functions, useful for a quick picture of how they behave or to grab one or two significant figures of the value.

math_cheatsheet.odt
math_cheatsheet.pdf

How to do things in Open Office's equation writer.

OO_math.pdf

Introduces the equation-writing capabilities of Open Office 2.0.  I find that I have no need for LaTeX given the equation-handling abilities of Open Office.  While not as powerful as TeX or LaTeX, it's adequate for my needs and provides a variety of other tools.  For writing technical documents with equations and drawings (made with the Draw tool that's part of OO), Open Office suits my needs very well and it's free, to boot.  I haven't used MS Word in years, but unless the interface to the equation writer of Word has changed, it was quite painful to write a document containing equations and drawings.

pycephes.zip

A pure-python translation of Stephen Moshier's cephes special functions. Bessel functions are missing. If you are doing serious numerical work with python, use scipy instead, which contains the cephes functions written in C.

root.py

Implements a general-pupose root-finding method in python that was published in Embedded Systems Programming, May, 2002, pg 7-14.  The method is based on fitting a parabola and converges quickly.  It is similar to bisection in that it needs two abscissas where the ordinate differs in sign and thus brackets a root.  Convergence is highly likely, unlike a single estimate and Newton-Raphson iteration, where a near-zero derivative can send the algorithm into the next county.

ShortTables.zip A set of tables of elementary math functions intended to print on half of an ANSI A-sized piece of paper.  These tables are intended for use when a calculator isn't available.  The original is an Open Office spreadsheet -- email me if you'd like a copy of it.

Science and engineering

eng_grid.py

This script will generate most any linear isotropic graph paper by creating a PostScript file.

attenuator.py This script will calculate the resistors needed for tee and pi attenuators.  Requires the fpformat.py file below.
iapws95.zip

This zipfile contains C++ and python code that implements the IAPWS95 equations for the thermodynamic properties of water. You might also want to take a look at John Pye's freesteam project.

irr.py

Calculate irradiance over a wavelength band from a spectral irradiance data file. It is written to work with StellarNet spectroradiometer files, but it can easily be modified to work with other data files.

mixture.py

A script to aid in mixture calculations. Adapted from a C program here.

novas.py

Translation into python of some C code from the US Naval Observatory. It contains routines that are nearly identical to those used for calculations of the Astronomical Almanac. Here are some notes I made on it.

Python_TC_Functions.zip Contains a python script that will calculate thermoelectric voltages from temperatures in degrees C (and their inverses) for a variety of thermocouple types.  Uses NIST-published polynomials.
reactance.zip Some PDF files containing reactance charts.  Two are for monochrome printers and two are for color printers.  These are vector drawings, so will scale to any size.  They are made for US letter size paper; if you would like them for another paper size, please send me an email and I will put them into the zip file.  What I mean by "Free for non-commercial use" is that anyone can use them, but they are not to be sold by or to anyone.  If you wish to sell it or brand it with your logo, please contact me.
resistor.zip Contains two tools that help you deal with resistors.  The resistor.cpp file is a C++ program that can calculate resistors to use for a voltage divider for a desired ratio.  It also has the ability to get a desired resistance using two on-hand resistors in either series or parallel.  You can enter the values of your stock resistors or use standard series such as E6, E12, etc.  The resistor.ods file is an Open Office spreadsheet that calculates the resistance of wires of circular and rectangular cross sections (handy for designing shunts).  The PDF files contain the documentation.

Shop

angle_square.pdf Explains the angle square (sometimes called a speed square) and gives some graphics that you can print out to make your own angle square.  However, they're usually around $5-$20 street price, so there's little motivation to make your own when you can buy one.
cheat_sheets.zip

Contains various spreadsheets in Open Office format and PDFs of tables that I find handy to have in the shop.

gauge.cpp

A C++ program to print out combinations of inch gauge blocks that yield a desired composite length. Should work with most any set of gauge blocks.  Uses brute-force searching to find solutions -- it's not elegant, but it works.

square.pdf

How to use a carpenter's square to lay out angles from 1° to 44°.  The fractional values given will result in angles accurate to 0.01°, assuming your square and your layouts are accurate enough.  I find a speed square a much handier tool for carpentry layout than the carpenter's square and it's accurate enough for the usual purposes.

thd.zip

Prints out various dimensions associated with threads. Calculates the values based on the ASME B1.1-1989 standard document. If you machine threads on a lathe, you may find this program handy.

weigh.pdf Demonstrates how I "weighed" our trailer with a lever.  With a 12 foot long 4x4, I was able to measure 2500 pounds.

Utilities

app.cpp

Handy application if you like to work at a cygwin command line. Given one or more files, it will cause them to be opened with their registered application.

asc.py Console script to print out ASCII character table in decimal, hex, or octal.
bd.c

Performs a comparison between binary files; differences are printed in hex dump format.  You can print an ASCII picture that represents where the different bytes in the files are in percentage through the file.

bgrep.py Script to search for regular expressions and strings in binary files.
bidict.py Creates a read-only dictionary in python that lets you treat it in "both directions" as a mapping.  If bd is a bidict, you perform normal dictionary access as bd[key], while getting the key that corresponds to a particular value is gotten via bd(value).  Simple and easy to use.  I wrote this because an application needed to get both the number of month names (e.g., "Feb" to 2 and be able to get the month name associated with a month number).  It's an example of a discrete  bijective function where both the abscissas and ordinates are unique values.
color.py Short python module to make it easy to print colored text to a Windows console (such as a DOS window or a bash window under cygwin); uses WConio. The interface is minimal:  you can set the foreground color, background color, or clear the screen.  Run the module as a script to see how it behaves and its interface functions.
ddiff.zip

Contains ddiff.py and ddiffcp.py. The ddiff.py script compares two directories and lists the differences between them. You can compare based on time, file size, or content. ddiffcp.py will perform the needed copying operations to help synchronize the content of two directories.

fit.py Provides a python function to fit a string of words into a given number of columns.  When run as a script, can act as a simple text formatter.  You can control the number of spaces after a sentence and it won't recognize common abbreviations with a trailing period as the end of a sentence.
fpformat.py Contains a python object to nicely format floating point numbers in a variety of formats.  The formats are scientific, significant figures, engineering, and engineering with SI prefixes.  See the attenuator.py program for an example of use.
goto.zip

Contains a sh-type shell function and a python script that let you navigate around to various directories.  I've had a number of UNIX users tell me they couldn't live without this tool once they started using it.

hc.exe

32-bit Windows console RPN hex calculator (supports floating point too). Use hc -h to get a man page.  This has been replaced by an open-source program here.

html_tokens.py

Will produce a list of readable words from an HTML file, all in lower case, one per line. You could then run the list of words through a spell checker.

naics.zip

Contains a python script that can perform NAICS and SIC lookups. These are codes produced by the US Federal government and are used to identify different types of businesses.

readability.zip

Will calculate various readability indexes for text files, such as the Gunning Fog Index, the Flesch-Kinkaid Grade Level, etc.

ruler.py For console windows; prints a variety of rulers to stdout.  It's easy to modify to get different ruler types.
space.py

See where the space is being consumed in a directory tree and where the biggest files are.

tags.py

Script to generate tag files; supports xBase program files and BASIC.

tlc.py

Script to rename all files in a directory to lower or upper case.  Us UNIX weenies like all lower case.  :^)

tree.py Simple python script to use at a console to generate an ASCII representation of a directory tree structure.
unx.py

Produces a list of files that are candidates for turning their execute bit permission off. Handy in cygwin, since most Windows programs don't know how to behave properly with respect to the execute bit.

xref.zip

A C++ console program that will cross reference the tokens in a set of files -- each token will be listed in alphabetical order with the file it occurs in along with the line numbers it's found on. It can perform spell checking. It has a -k option which makes it useful for programmers, as it will split composite tokens in their source code and spell check the individual tokens.  In the late 1990's, I wrote a similar tool in python, but it took a couple of hours to index our project's files (a medium-size project with about 100,000 files).  The C++ version runs much faster and is one of the few times I've found it necessary to replace a python script with a C/C++ program.

Miscellaneous

fish.zip

Einstein fish puzzle notes and script to find all solutions by brute-force search. What's of interest to programmers here is probably the comb_perm.py script that can be used for searches using combinations and permutations.  Oct 2009 update:  python's itertools module supplies the ability to generate combinations, permutations, and cartesian products in lexicographic order, so the need for the stuff in fish.zip has pretty much evaporated.

otp.py

Generates one time cryptographic pads, assuming you have a cryptographically-secure random number generator.

scramble.html Contains a python script to scramble letters in words, leaving the first and last characters alone.  I wrote this because an intriguing email that's been circulating the web for years seemed to indicate that only the first and last letters of a word are really important for reading comprehension.  You can make up your own mind about the truth of this statement by using the script on a variety of text.
targets.zip

Contains two PDF files of shooting targets.  One's for BB guns and the other is for pistols and rifles and includes a table to let you figure out the subtended angle of the target at various distances.

sqrtcoding.py Script to find integers in the decimal expansions of the square roots of integers.