Saturday, January 31, 2009

More Twitter Confluence

This was part of my Twitter feed this morning. Funny example of Twitter reflecting events in real time from different perspectives..
K.G. Schneider
kgs Late start to the day. Turned on NPR and guy with squeaky voice was swishing wine in his mouth and spitting it out. Outlaw that sound.
Gary Vaynerchuk
garyvee u can listen hear!!!!! http://tinyurl.com/b26vsm
Gary Vaynerchuk
garyvee I am on NPR's @weekendedition in 2 minutes anyone have a link to a website where I can hear it? tune into NPR now!!!!!

By al - 11:20 AM | (0) comments | Post a Comment

Sunday, January 25, 2009

IslandScholar, UPEI's Institutional Repository

One of the things I appreciate about working in an environment where we use and create open source software is that I have the opportunity to talk about what I do outside of work. Unfortunately I just haven't had the blogging spirit much in general lately, so there are a lot of things I haven't gotten to write about yet.

Fortunately Mark Leggott, our university librarian, who directs all the projects I work on, just posted a great write-up about IslandScholar, which was launched in December. The post is here: Link. Mark outlines exactly what the repository is for and what we used to build it, in particular it is our most polished and customized use of the Islandora front-end to the Fedora repository system, written as a module for Drupal.

Mark's post describes it better than I would, but the gist is that IslandScholar will be a central location to show the research output of the entire UPEI faculty and related bodies, with as many as possible containing links to full-text versions of the published articles. We are using a form of crowd sourcing in that faculty can go to the site and view their own citations, and are able to upload the referenced documents directly to the site, with the rights from their journal publisher shown to them right on the page via SHERPA/RoMEO, and the system will automatically convert their documents to PDF format and ingest them into the repository.

Here's an example record with a full-text document included: Relationship between objective measures of physical activity and weather: a longitudinal study.

I really like the idea that we are helping to make information more readily available to the rest of the world. Getting to not only work on and create open source software, but to be furthering the philosophy of open access to information is quite a thrill as a software developer.

More big news to come, hopefully. But either way I'll try and be more informative about what I am working on on this blog.

Labels: , ,

By al - 9:26 AM | (3) comments | Post a Comment

Friday, January 16, 2009

http://webcrawler.cs.washington.edu/

Before webcrawler there really wasn't even a web. You had to basically know an address of a site and then type it in to get there, and to find that address you had to see it on TV, where the announcer would awkwardly enunciate "h t t p, colon, slash slash, double-you double-you double-you...." There was Archie for FTP and Veronica for Gopher (don't worry, kids, there won't be a test.) And of course 80%+ of your time online was spent on USENET anyway, so the web was more of a minor curiousity.

Then along came webcralwer and changed everything.

Which is why it's really incredibly sad that webcrawler is so crammed with ads that it can't even find itself on the frigging internets.



At least they don't force good old Spidey into appearing on this abomination of a zombie web search engine.



Rest in peace, little guy.

More history here.

Labels: , , ,

By al - 9:48 PM | (0) comments | Post a Comment

Monday, January 12, 2009

Bash has C-like for loops?!

My life just got a lot easier finding this out.

We have an OCR package and 65 directories of tiffs we want to extract the text of, and we want to run a few jobs in parallel to get the work done faster and take advantage of all this multi-core business, but obviously we don't want to run all 65 processes at once, just 5 or so.

The poor bastard who runs our scanners had a script where he had just copied and pasted the command line over and over with the different directory names.

Here's a script that does the same thing in a nested 'for' loop.


#!/bin/bash
LIMIT=65

for ((i=1; i <= LIMIT ; i = i + 5)) # Double parentheses, and "LIMIT" with no "$".
do
  for ((j=0; j < 5; j++))
  do
    imageList=" "
    for image in islmagfull/$[i + j]/*; do
      # Get all the files in the directory and build the image list to pass to the command line.
      imageList="$imageList -if $image"
    done

    ./CLI $imageList -f PDF -pem ImageOnText -pfpf Automatic -pfq 85 -pfpr 200 -of "/usr/local/fedora/abbyy/${image%.*}.pdf" & # Ampersand means run the process in the background.
  done
  wait # 'wait' is awesome, it just pauses until all child processes are done. I love Unix.
done # A construct borrowed from 'ksh93'.


I should start a wiki to store code snipits, just using the blog as a scratch pad for now.

Labels: , , ,

By al - 11:32 AM | (0) comments | Post a Comment

Sunday, January 11, 2009

1x09: The Battle




I still love how the old Ferengi ships looked like angry cartoon characters with gritted teeth and red eyes.



In the future they don't get headaches, according to Dr. Crusher.

And here we present the debut of Wesley's stupid outfit. Mostly I just feel sorry for Wil Wheaton , who is an awesome blogger and honestly came out of this as well as anyone could have.



This is still where they were trying to position the Ferengi as the series erstwhile villains, before audiences overwhelmingly found them hilarious.

Ahh, this is the episode where they mention the "Picard manoeuvre". The Adama Manoeuvre, where he took the Galactica and brought it into the atmosphere to bomb the crap out of a planet, is a total rip-off of that.



The best part about this shot is that they had computers with colour displays in 1989 when the show was made, but chose to go back to green-on-black for something to look "computer-y".

"Data, reading picard's log file from the USS Stargazer: "'we are forced to abandon our starship, may she find our way without us.' Apparently she did, sir. So Data can't figure out that "do" and "not" can be contracted to "don't" but he can make jokes anthropomorphizing starthips.



"As you humans say 'I'm all ears'." LOLOLOLOL.



Apparently the Ferengi have the power to project thoughts into Picard's mind. Somehow they forgot how to do this in their transition to comic relief. Quark could have used that power to fuck with Odo in supremely awesome ways.

The ending to this episode: Picarad shoots the mind control device with a phaser. Yep.

The good:
  • The Picard manoeuvre is frigging awesome.
  • Yarr didn't say very much
  • Worf didn't say very much
  • Troi didn't say very much
The bad:
  • The Ferengi still trying to be the villains
  • The ending was basically "SNAP OUT OF IT, CAPTAIN". *sigh*
The ugly:
  • Wesley's gay pride stripes
  • Yarr's haircut. This will be applicable for all episodes with her in it.
  • Riker without a beard still bothers me. WRONG WRONG WRONG.

Labels:

By al - 11:00 PM | (2) comments | Post a Comment

Tuesday, January 06, 2009

1x08: Justice

Justice. Usually I have a pretty good recollection of what an episode of Star Trek: The Next Generation is about from the season it's in and the episode name, but this one is eluding me right now. The nitro is that they have stumbled on yet another previously unknown Class M planet while out ferrying passengers about and getting milk from the store. Won't the inhabitants of this planet be thrilled to hear they've been under Federation jurisdiction all this time and didn't even know it.



The director told Gates McFadden to cross her arms to contrast with Troi's soft demeanor.

There are two things wrong with this frame:



1. They forgot to turn on the fake computer wall panels, so they just look like closets.
2. Wesley Crusher not being eaten by wolves.

Geordi: "They make love at the drop of a hat." Yarr: "Any hat." These people on this planet sound very pleasant and therefore annoying. Please please please let this episode be about the crystaline entity coming to suck their planet dry. *fingers crossed*

Oh shit they're sending Wesley down to the surface first. This is that one where he almost gets the death penalty but doesn't. Worst tease of an episode ever. I almost want to just stop watching now.



Ahh the planet full of attractive Aryans. This was a good week for perpetual Hollywood extras. At least Worf knows they must be evil. Yes we get that Riker is supposed to be a horn dog, the 'we need to establish character' moments the writers are throwing in are getting old.



They need to work this guy into the plot line where Yarr has a secret half-Romulan daughter a few seasons from now. He can be the godmother and hairstyle moral support.



Is there a website that just collects pictures of Wesley looking baffled? I smell a meme.

He only gets a hug from the alien whore, poor Wesley.

Prime directive question: We are supposed to believe these people developed warp drive? Really?

I'm pretty sure they kept this episode from being shown in syndication out of sheer embarrassment.

Why is Data shaking his head while not looking at anyone in particular? He can display subtle physical signs of confusion but can't get that "do not" can be shortened to "don't"?



This soap bubble is capable of rocking the entire ship. Once again: Inside federation space, and no one noticed before, or thougth of mentioning it afterwards. I love these old episodes for this reason.

I think it's great that even Worf is offended by the idea of capital punishment. Oh Star Trek, you secret socialist fifth column, keep it up.

Ugh, the bubble thing is "God" for the aryan rule freaks. There's some message about human exceptionalism in here but I'm not sure what it is exactly.

Aaaannnd the climax to this episode is Riker saying "When has justice ever been as simple as a rule book?". He says that, they get transported off the evil planet of love and peace, and all is well. Endings were always the worst part of this series.

Labels:

By al - 11:13 PM | (1) comments | Post a Comment

Monday, January 05, 2009

Neat pattern

Wasn't expecting to see any sort of pattern when testing range operations in Python, this is super cool:

>>> sum(num * num
for num in xrange(1, 10))
285
>>> sum(num * num
for num in xrange(1, 100))
328350
>>> sum(num * num
for num in xrange(1, 1000))
332833500
>>> sum(num * num
for num in xrange(1, 10000))
333283335000L
>>> sum(num * num
for num in xrange(1, 100000))
333328333350000L
>>> sum(num * num
for num in xrange(1, 1000000))
333332833333500000L
>>> sum(num * num
for num in xrange(1, 10000000))
333333283333335000000L

After that it started to take a long time to compute so I gave up.

Labels: , , ,

By al - 12:50 PM | (0) comments | Post a Comment

Saturday, January 03, 2009

The grilled cheese secret

This seems to blow people's minds when I tell them so maybe it's not as well-known as I would have guessed. Anyway, for the perfect grilled cheese sandwich, don't put the sandwich together first and then throw it on the frying pan.

Instead, let the pan get nice and hot, throw in a healthy portion of butter and when that melts, lay two pieces of bread on to the hot frying pan and let them get toasty for half a minute. Then turn slice one over, put the slices of cheese (sharp cheddar, for god's sake) onto the now hot and buttery bread. Then quickly left the other piece and put the hot side down on top of the cheese.

This lets your cheese fully melt without having to overcook the outside of the sandwich, and your bread is evenly toasted on both sides.

Labels:

By al - 11:22 AM | (3) comments | Post a Comment

    follow me on Twitter

    al's del.icio.us Links

    • www.flickr.com
      This is a Flickr badge showing public photos from dragonofsea. Make you own badge here.
    •  
    • (al)



    • Powered by Blogger