Listed below are several little Perl, Python, R and Tcl/Tk programs I have written.
Being done in Perl, Python, R and Tcl/Tk, they should run on nearly any system in
existence today. In particular, Unix, Windows, and Macintosh.
python stuff
A work in progress to build numpy tools to emulate some of the better bits of R, based on working through the online book "Using R for Data Analysis and Graphics" by J.H. Maindonald.
Includes a routine to prettify the axis ranges and tics in Matplotlib, and a library of useful tools.
Perl Scripts
Makemstr is built to be an adjunct to the excellent recipe database software
MasterCook®, available from Sierra. What Makemstr does is to read a
fairly arbitrary input recipe file, and clean it up so that it can be imported
into MasterCook®.
MailStats is a series of Perl modules adapted from Greg Bacon's News::Scan
code. MailStats gathers data and reports statistics on e-mail lists. I
run it on 4 different lists, both digest format and individual messages,
Majordomo and Listserve. It does assume that you are running on Unix and
using MH-style mail folders, but this is not a very strong assumption.
Minor code edits would adapt it to other mailbox formats and other operating
systems.
When I moved from Win95 to Linux, I had to move my mail from Pegasus to
Mail Handler (MH). I wrote a few perl tools to do most of the work. Feel
free to steal them. There is more info on my Linux
Adventures page.
This simple perl script talks to your modem and, assuming you have hooked your
modem up to your phone line, will capture call-id information and store it in a
file.
dump_addrs
This script does just what it says, it dumps the contents of the address
book to STDOUT. It makes a good basic script to modify for your own
devices.
print_labels
This script also makes use of the module PostScript::MailLabels to
generate a postscript file suitable for printing onto mailing label
stock. I use this to address my Christmas cards.
The key things I have done for this script and the next one are the
use of the custom fields. The Palm has 4 custom fields in the address book.
I define the first one to be family names, so I enter
husband and wife, children
so that for addressing Christmas cards, I can pull out the "husband and wife"
part of the field and use that in the address.
In custom2, I put my database keys for selecting subsets of the data. I simply
put in a comma-delimited list of keys. For example, everyone on my Christmas
card list gets an "Xmas" flag in custom2.
create_teampage
Another very simple example, here I select out a subset of addresses, and
output html for a 2-column table, in alphabetical order, of the selected
addresses.
These are a collection of perl scripts for reading data off the serial port
from a WMR918 weather station, archiving the data in files, filtering
the data for noise, and generating nice plots.
This is a tool for tracking down spammers in a GUI. It needs quite a bit of polishing,
so in the best open-source fashion I have placed it here in case someone else feels inspired
to use this as a starting point and clean it up.
Basically it searches your spam for URL's, e-mail addresses, phone numbers, and
IP addresses, and highlights them. When you click on a highlighted field, a new
window opens that allows you to operate on that address with whois, traceroute,
ping, nslookup, etc. The code is written to make it easy to add new functions.
It also allows me to email a complaint to the upstream ISP's.
I currently run it from Sylpheed with an action tied to a function key :
Spamfryer: spamassassin -d < %f | Spamfryer &;
Perl Modules
A set of 4 modules for plotting nice looking calendars.
Follow the above link to the web page.
Module for manipulating English words. It will do parsing, canonicalization
while honoring proper nouns, and convert plurals to singular and past tense
to present. I use it for many tasks: spam detection and analysis, generating
keyword indicies for documents, and analyzing psychological word recall
tasks.
A Perl module and a bunch of code snippets for extracting interesting stuff
from spam messages like relay points, phone numbers, addresses, url's,
etc. This is alpha code at best, so be warned. Not for the faint of heart.
If you find bugs or improvements, let me know. For examples of what it
can do, see my page at Geocities.
This perl module does everything you need to do to print
mailing labels on standard label stock. It will create a calibration page
to help you set up the printing, a test page so that you can make sure
your address text will actually land on the mailing labels, and, of course,
it will print the labels themselves. Included at no extra cost are postal
barcodes so that your letters may even get delivered faster.
Version 2.32, October 2012, is now available.
R functions (see the R-project for more information)
Functions for generating statistics and plots for spam and virus e-mail
To see examples, take a look at my spam statistics page.
Called by the next bit of code, this basically finds the intersections between two curves.
It is used to construct polygonal areas bounded by 2 or more curves on a plot.
Make nice plots of weather data.
To see examples, take a look at my weather page.
A few plots and statistics for Bus arrival times.
Tcl/Tk and Expect scripts
TkDialer and dialer scripts
These are both expect scripts for doing dialup and email fetching.
I wrote them because I needed to automate my dialup sessions, and I
wanted to learn Expect and Tcl/Tk. I tried some other GUI dialers, but
I was not happy with them. The nice thing here is that (if you know Tcl)
the scripts are truly customizable.
They assume :
-
You are running Linux with a dialup pop connection
-
You use sendmail
-
you use ppp and chat to establish your phone connection
-
You retrieve your mail from your ISP with FetchMail
-
You filter your incoming mail with MailAgent
It should not be too hard to change any of these assumptions if your environment
is different.
I assume you have set up your chat stuff so that it works. This stuff
simply automates it. The zipped tar file contains this README, and 2 scripts,
dialer and TkDialer. I have set up a cron that runs dialer at 2AM to grab
my email :
10 02 * * * /home/ajackson/bin/dialer
and I use TkDialer during my waking hours to dialup for email, web
cruising, and ftp sessions. Current version is 1.0.6, updated 6/19/98.
This is version 1.0.1. This is a GUI for tracking the weather - connecting
to the weather underground.
This Tcl/Tk GUI will convert raw scores into Standard scores and percentiles
on the Gordon Diagnostic System test instrument.
This Tk/Tcl script simply beeps at you at regular intervals - think of
it as an electronic metronome.
Return to my
home page here.
I may be reached at alan@ajackson.org