Portable Potentiometer PC  
Saturday, May 6, 2006, 06:10 PM - CaseMod




The start of this project was finding this old "portable" potentiometer which the chemistry department in Aberdeen threw out (at least I hope they meant to - otherwise I stole it). The portable'ness of the thing meant you could lift it, and it had room for 4 single A batteries, however it weighed a ton. Among the other interesting features this box was "open-source", i.e. the wiring diagram and printing instructions was printed on the inside of the cover.





With a mix of brute-force, power-tools, manual sawing and a lot of un-screwing I got most of the original components out, with only a few months waiting while I ordered imperial alan-keys on ebay and had them shipped to a friend in the uk who then forgot to send them to me for a long time. Getting all the old junk out made room inside for my VIA EPIA ML6000 fanless Mini-itx motherboard, and the tiny AC-DC converter.





The goal of this whole operation was to create a silent PC that could always be on, and could keep all my mp3s and movies, it was therefore necessary to put two 250gb harddisks in as well. Luckily the harddisks just about fit in, although there isn't much room for the IDE cables, I think I shall try to cut off the second connector on an ide cable now to see if it still works. I also hope the harddisks wont get too hot, I was really hoping to keep the whole setup fanless, if it fails I can always have a half-speed fan at the back though, the old battery compartment leaves a hole for ventilation.





The other problems was that the power-supply had only 1 harddisk/cdrom power connector (i.e. the 12v 4-pin things), which I found odd since it said that the 80W ac-dc adaptor said it could power a HD and a full-size CDROM. Since I wanted this to work today there was no time to order a splitter, so I cut off a bit of an old normal size power-supply, and compensated for the lack of a female plug (well, the plastic bit is female, the pins male) with creative soldering and four nails. Finishing it it looked slightly like a torture instruments... alas 12V is gonna make anyone scream though.





Finally, I installed debian, i thought i may have some problems with the strange hardware, but everything worked straight out of the box and the whole process took less than 30 minutes. Then I apt-got samba and was listening to my mp3s from my laptop in less than 1 hour! (if it wasn't for MacOSX than http://www.macworld.com/forums/ubbthrea ... )





Now all I need is a sensible backup solution. Burning DVDs is really not an option. Anyone?


[ 3 comments ] ( 41 views )   |  permalink  |   ( 3 / 3876 )
Applying market basket analysis to RDF  
Tuesday, April 4, 2006, 11:32 PM - PhD, Machine Learning
Since 3 is a magic number I'd really like to have 3 different learning algorithms used Smeagol. Currently I have ILP and HAC-clustering, both applied in several different ways. Sequence/Basket analysis seems like a good candidate for third algorithm, since it's the only area of ML not covered yet. (ILP covering classification and more...)
Sequence analysis would of course require a time dimension the the data, which i'd really rather not get into, AND it was probably covered pretty well by Heather Maclaren.
Basket analysis is left, and my first attempt was quickly hacked up using Orange. The things in my baskets are predicate-value pairs, and each person becomes a basket on their own. I tried this on several data-sets i had lying around, here are some quick and dirty results:

A small subset of my IMDB Data (3534 triples) gave me:

rdf#type IMDB#Movie -> IMDB#languages English

and
rdf#type IMDB#Movie -> IMDB#country_USA


My email from the last 5 years as crawler by aperture (127615 triples) gave me the fascinating rule:

aperture:mimeType message/rfc822 -> rdf#type imap/Message


A subset of some old FOAF crawl stolen from JibberJim years ago gave me:

jim#isKnownBy norman.walsh#norman-walsh -> rdf#type foaf/Person


yes - fascinating indeed. I also found the Norman Walsh rule using ILP years ago, at least running this one was pretty fast.

I'm not sure what to conclude from this - none of the rules are groundbreaking OR that interesting. Maybe I can tweak the way items are represented, using just values or just predicates for example. I'll see tomorrow.

I also had a brain-storming session with myself and some gin'n'tonic today, and if I don't finish this PhD it's because the table wasn't big enough:



[ 1 comment ] ( 37 views )   |  permalink  |   ( 3 / 2165 )
py2exe  
Friday, March 31, 2006, 08:16 PM - Python
Some friends using Windows only asked me about RDFRoom (Yes! Really!), and I was about to tell them than unless they spent a while installing python, pygame, rdflib, it wasn't gonna happen, but I thought I'll google first. Dada! Enter py2exe! After I spent a bit of time installing python, pygame, rdflib on my vmware image, wrote a 6 line setup.py and ran py2exe (Then fiddled with packaging the right rdflib packages, damn plugin-architecture), I had a RDFRoom.exe which would run without installing any other packages. Amazing.

Download RDFRoom.zip for windows NOW! :D

[ add comment ] ( 2 views )   |  permalink  |   ( 3 / 4226 )
RDFRoom! VIRTUAL REALITY IS NOW!  
Thursday, March 30, 2006, 11:53 PM - RDF, Python
Too late to be verbose now, but after being encouraged by Danny last week, I've spent long evening hacking together this crappy demo. The webpage has all the info you need (including downloads), and the screenshot here should tickle your senses enough to click that link. If you like RDF that is. And you like old-fashioned computer games. And if you're bored.

Some notes:
  • Look at some RDF DATA, schemas dont work well just now.
  • Yes i know the fire effect is badly aligned.
  • You need data with rdfs:seeAlso links to get doors.

That's it for now, I refuse to waste any more time on this useless nonsense!

(Oh, and I submitted this to the ESWC Semantic Web Scripting Challenge :-)


[ 1 comment ] ( 705 views )   |  permalink  |   ( 3 / 4994 )
Launching files from Java  
Tuesday, March 21, 2006, 08:34 PM - Java
(I try again, with considerably less love than last time)

Opening files in their "natural" application was something I knew had to be done sooner or later for aperture/gnowsis/nepomuk, but I put it off for as long as possible because I had a horrible feeling that to get it to work on all platforms it would be long and messy and maybe involve nasty C code.

Imagine my surprise when in a few hours today I got it working for files, directories and web links, and this on both windows, macosx and linux (kde/gnome). All without leaving the world of Java. The code is so short I will paste it here (beautifully formatted by code2html!)

private void windowsopen(URI uri) throws IOException {
   Runtime.getRuntime().exec( 
      new String [] { "rundll32", "url.dll,FileProtocolHandler",uri.toString() });
}
	
private void linuxopen(URI uri) throws IOException {
   // TODO: I don't know how reliable this is. 
   // It's set correctly for kde/gnome on my machine 
   if (System.getenv("DESKTOP_SESSION").toLowerCase().contains("kde")) {	
      //kde:		
      Runtime.getRuntime().exec(new String [] { "kfmclient","exec",uri.toString()} );
   } else {
      //Default to gnome as it complains less if it's not running.
      Runtime.getRuntime().exec(new String [] { "gnome-open",uri.toString()} );
   }
}

private void macopen(URI url) throws IOException {
   try {
      Class macopener = Class.forName("com.apple.eio.FileManager");
      Method m = macopener.getMethod("openURL",new Class[] {String.class});
      m.invoke(null,new Object[] {url.toString()});
   } catch (Exception e) {
      throw new IOException("Could not open URI: "+url+" - "+e);
   }
}

This is for opening http links, but the file code is almost identical, KDE and Windows doesn't like file:// URIs so I convert them to filenames first, and launching things in Windows is done by executing "cmd /c blah" instead (Thanks Michael Sintek!).

Still damn easy. It's not very well tested yet - but it works on my three instances of each OS! If anyone feels like testing it the code is in the aperture cvs repos, FileOpener.java and HttpOpener.java (although it's only just committed so it'll take a while for the sourceforge cvs mirrors to catch up)

[ 2 comments ] ( 44 views )   |  permalink  |   ( 3 / 2065 )

Back Next