C O D E
Research Code
-
Weighted Singular Value Decomposition:
MatLab implementation of Nathan Srebo and Tommi Jaakkola's EM algorithm from the paper Weighted Low-Rank
Approximations. This is a nifty little EM algorithm for weighted SVD. A total of about
10 lines of MatLab code without the comments. Check out
my slides for the theory.
Utilities
-
KDE X11rc: A Linux script that starts KDE instead of TWM
here at UoT CS. Copy to your home directory and then do mv .X11rc .X11rc_bk to
back up the old file if present. Then do mv X11rc.txt .X11rc. Now log out and
log back in. If you have any trouble just copy the old backup file back over the new
one.
- Simple Network Load Monitor:
This is a simple bash shell script that will report the current load average for
each of the machines you specify. It's much faster to use than SSHing around the
network looking for a free server to run your code on.
To set it up for your network simply open the script
in a text editor and follow the directions to add the machines you want to monitor.
To run the script type 'bash load_monitor'. Should work with most Linux machines, but you
need an SSH configuration that allows you to log into remote machines without entering your password.
Works great with all Linux CS servers and workstations at U of T.
-
Batch Matlab Front End:
Lets say you would normally write a function, open MatLab, load some data files, and run
your function on them. Usually this produces some output that you might look at or save.
To do all this in batch mode simply create a driver m-file (not a function)
that contains whatever commands you need to load input, call the function, and save the data.
Now you're ready to use batch_matlab by typing 'bash batch_matlab' at the prompt.
It is an interactive program that will query you for the name of the driver m-file you
wrote, and the name of the output file to use. It will then launch matlab in batch mode and
begin running your job. To check the status of your job you can open the output file
at any time. If you want to abort your job use top to find its PID and kill it (search
the net for unix job control for more info on ps, top and, kill).
So why go to all this trouble? Several reasons. First, running a job in batch mode
on a server is highly robust. The only way the job will abort is if it crashes from a bug, or the
server it is running on goes down. You can log off, shut down, or restart your local machine
and your remote job will not be affected. By contrast, if you keep the MatLab interface
open on your local machine to run the job, you can't log off the remote server and you can't
log off your workstation or shut it down because the job will die. In addition, if
you're running on a remote machine and your network
connection goes down, your job dies. If you frequently experience any of these problems,
give batch_matlab a try.