Tuesday 21 August 2007

Viral Updates

Alrightey then here are some videos that have piqued my interest - some for their laugh-out-loud hilarity, others for being downright bad and shoddy. Sorry for my abysmal attempt at a rhyme, watch the first video in my list and you'll find out why.

The Good Un's:

Free NYC Rap:


Banned Condom Advert:


Fat People:

Fat People - Awesome video clips here

Talk, Talk:


And The Rotten Un's:


Fired Teacher Flips Out In Cafeteria - Watch more free videos



Joanna.

Monday 20 August 2007

Handling timeouts with urllib2 in python

On a more technical note than usual, I recently came across a bug that took a very long time to solve. The problem was related to using urllib2 in Python to fetch a url.

Essentially, urllib2 does not have an inbuilt timeout set, so by default your code will stall on a opener.open() call if the server timesout without telling you. This doesn't happen very often, so your code can run for several weeks before failing to respond.

What is more, there appears to be no direct access to set this timeout, however there is a way around it (ref). The trick is to set the default timeout for all sockets before creating a connection. In the same scope as urllib2, and before you begin using the module, enter the following lines:

import socket
socket.setdefaulttimeout(timeout)

(where timeout is the number of seconds you would like to wait for a timeout.)

This should set the timeout for the socket that will be opened by urllib2. Hope this is as useful to someone else as it was to me...

Tuesday 14 August 2007

More v-rank hotties

Here are a couple more videos that have been picked by our new algorithm:

Vertical Football:



And the video with the highest v-rank almost continually for the past fourtnight,
Johnny Cash - Hurt: link

Monday 6 August 2007

Summaries, summaries

You're a busy person, we all are. So what happens when you want to select from a range of items with really long descriptions? Sometimes it would be great if you could just read a quick summary of the text.

Here is a quick example of a brief summary. I also provide the full text that it was generated from:

Full Text:
A short clip from Surrealist film "The Inconspicuous Furry Banana." Mia
Crackpot and Iona Frisbee meet a wizard, who tells them a recipe to
freeze time. But things go horribly wrong- and instead of freezing time,
they accidentally replace time with a tangerine. Then suddenly, they
begin to experience vivid hallucinations. One of them believes they are
an inconspicuous furry banana, and the other believes that they are half
a metre long with wings that can fly. Together they believe that their
mission is to meet the wizard master- and to save him from the imaginary
sprites... Narration by Chewy Benson.


256 characters
Then suddenly, they begin to experience vivid hallucinations. One of
them believes they are an inconspicuous furry banana, and the other
believes that they are half a metre long with wings that can fly.
Narration by Chewy Benson.


150 characters
Then suddenly, they begin to experience vivid hallucinations. Narration
by Chewy Benson.


Now if you had a list of ten items, would you prefer 10 full descriptions, or 10 of the shorter versions?

If you are interested, here is the video that this text was describing:

Thursday 2 August 2007

Interesting vid sites

Surfing the interweb for the best video sites, I came across these two gems:

VodPod - apart from a cool sounding name, these guys basically allow you to create your own aggregated feed and create your own personalised channel with content you like (based on tags)

WeShow - these guys seem to surfing the net for the best in video around the net. They have a fun daily video round up and also have a community thing going on. I first read about this in the London Paper a couple of days back.

Q