sam tygier
home physics linux photos links

Code

Lybniz

Lybniz is an easy to use mathematical function graph plotter using pyGTK. It was started by Thomas F├╝hringer. I used the code to plot double slit diffraction patterns for a physics project, in 2005. I submited some changes back to Thomas. In 2006 I started taking a more active role, moving the project to Source Forge. Lybniz is now at version 1.3.

~/bin

My ~/bin is full of little bits and pieces, that I have written, from one bash liners up to reasonable sized python scripts. Maybe some of them will be useful for other people.

Wifi monitor

#!/bin/bash watch --interval=0.2 "iwlist $1 sc 2>&1" to use $ wifimonitor eth1 replacing eth1 with your wireless card, or leaving blank to see info for all of them.

Latex loop

#!/bin/bash NAME=`echo $1 | sed "s/.tex//"` PDFVIEWER="evince" while true do pdflatex $NAME.tex || sleep 1 && texWordCount.pl $NAME.tex && $PDFVIEWER $NAME.pdf done This speeds up the preview workflow of writing latex documents. Run it on a latex file, and it will compile it, outputs the wordcount (needs texWordCount.pl), and opens the pdf. When close the pdf viewer it runs again. You can type ctrl+C in its terminal to stop it.

APOD background

NASA put great photos up on their Astronomy Picture of the Day site. This python script will read that page, and download the photo. Then draw it to the desktop. If you are running nautilus (most Gnome users), you will need to tell it not to draw the desktop, but you will loose your desktop icons. To do this open the gconf-editor, and untick /apps/nautilus/preferences/show_desktop. I recommend running this at log in, or in a loop every 24 hours.
apod_desktop.tar.gz

Site Admin

This is fairly new, and rough edged. It can be used for building a small website based around a template. It will also help version control the site using subversion. This site is built using it.
siteadmin.tar.gz

Photos

This replaces a previous bash script for converting RAW files into jpegs (and small jpegs for browsing). It inserts things like file names into a database so that everything can be kept track of, and can check the information is correct. I plan to add a function to export a list of photos to a directory at a given size.
photo-0.0.2.tar.gz

Photo CD

Run this in a folder full of jpegs, and it will make an HTML gallery. I use this when I give someone a CD with my digital photos on it.
photocd.tar.gz

Make table

Makes tables out of a text file (or sdtin), each line of the original becomes a cell. Can currently output html or CSV. You can choose the number of columns with the -c option. This is the starting point for moving photocd to python.
maketable.tar.gz

Single Photon Interference

One lab project involved showing that a single photon could cause a double slit interference pattern. One can calculate the function of intensity that you would expect given various parameters such as slit width, wavelength etc. This program is a modified version of Lybniz, a general graph plotter.
lybniz-youngsslits.tar.gz

Maemo playlist

The music player on the nokia 770 seems unable to read track numbers from mp3 id3 tags. Listening to albums in alphebitcal order is no good, so I wrote a playlist generator in python. It runs on the nokia 770, though will need a terminal installed. If you copy the maemo-playlist.py folder to the mmc card with your music on it. Then run cd /media/mmc1/ ./maemo-playlist.py . then it will generate an .m3u playlist for each album it finds, with the track in the correct order. (WARNING it does not check for the existance of .m3u files, so if you had some named after albums already they would be over writen)
maemo-playlist_0.1.tar.gz