Tagged with " data mining"

Programming Challenge (6): Motto of Hogwarts School

Aug 25, 2011 by     3 Comments    Posted under: Code, Monthly Contest

I am no big Harry Potter fan so I can’t answer questions like when Ron felt in love with Hermione. But that doesn’t stop me from playing this game:

Find the motto of Hogwarts School of Witchcraft and Wizardry, “draco dormiens nunquam titillandus“, in English by using a program written in whatever programming language you feel comfortable.

Something may pop up onto your mind immediately:

  1. Q(uick) approach: Google translate API
  2. Q(uick)&D(irty) approach: web text/knowledge mining
  3. Diehard approach: write something equivalent to Google translate
  4. et cetera

For the first approach, unfortunately it’s actually a failed case for Google translate (titillandus is the gerundive of titillo, titillare). For the second, I like Q&D but it may not be scalable, i.e., you can’t apply the same method to get, say, the book of Genesis in Vulgate into English. For the third one, well, I don’t think so :) .

Send the source code to me by 30/9 to win a $25 gift card from Fry’s– Well, it’s actually negotiable if you prefer Macy’s.
Hogwarts School of Witchcraft and Wizardry

BTW I used to think another topic:

Think a subset of sas programs that do not use macros. Write in any language you feel comfortable to get rid of comments.

Some contenders of our June challenge like Kalyani actually touched this topic. Then I chatted with Jiangtang–Both of us agreed it may be less interested in sas community. So I end up to leverage the Deathly Hallows. But if you want to try this code scanner topic, you are more than welcome!

A summary of our previous challenges and the winners:

March challenge: Web crawling (L0) (winner: Megha)
April challenge: Web crawling (L1) (winner: Megha)
May challenge: Eight Queens Puzzle (winner: Kalyani)
June challenge: Source line counting (winner: Megha)
July challenge: Infinitesimal in sas (winner: Jiangtang)

Programming Challenge: Web Crawling (L1)

Apr 5, 2011 by     1 Comment     Posted under: Monthly Contest, New Technologies

First of all, Megha Agarwal is the winner of our first programming challenge: Web Crawling (Level 0). She gets the laureate list for every year together with the hyperlinks. I will publish her code together with my comments on this challenge soon.

This time I would like to move one level deep into the web by chasing those links we got from our first challenge. Start from the same domain http://nobelprize.org/nobel_prizes/physics/laureates/. Take 1999 for example. If you click the year, you get to the next web page where you find a brief intro of the achievement of ‘t Hooft and Veltman: “for elucidating the quantum structure of electroweak interactions in physics”.

So here is the challenge: Again write in any programming language you feel most comfortable to loop through the hyperlinks from 1901 to 2010, extract the achievement for each year’s laureates from the next level.

Hint: Navigate to, say the page for 1999. Try the following javascript oneliner as a testing code in your browser address bar:

javascript:alert(document.getElementsByClassName('ingress motivation')[0].innerHTML)

Please send your code to me. The deadline is May 1, 2011 and the prize is still a $25 Fry’s gift card again!

Check out the BioNews, a very handy daily recap of the latest industry news!