NEW BLOG |
[03 Aug 2005|08:28pm] |
I'm hosting my own blog now, and probably will never update this one again.
We've had some GOOD TIMES LIVEJOURNAL!
Anyhow, I've made a LJ syndicated user for my blog so all of you Live Journal junkies. So if you friend dasbistro_sam you will see all of my antics, misadventures, and escapades.
|
|
|
[22 Jul 2005|01:48am] |
It would seem that the Clerk's Office of the House has the nice XML up for votes. The senate has horrid HTML, and Thomas's bill stuff is as well. Oh well. If I was feeling tough I could use Beautiful Soup on it.
|
|
Python for freedom information gathering |
[22 Jul 2005|01:43am] |
Wow. PATRIOT Act again. Go figure. I'm jamming to the new William Shatner album (it is AWESOME, BTW) and I was getting curious who were the 43 Democrats who voted against their party, and why did they do it?
I jumped over to http://thomas.loc.gov and clicked my heels three times. Instantly I was transported to the vote count. It was a bunch of funky tables with italics and whatnot. Curiously the url, http://clerk.house.gov/evs/2005/roll414.xml, reveals that it /says/ it's an XML document. Downloading revealed it _is_ an XML document, with like actually useful metadata, and it's not some stupid blogging standard thing.
I'm thinking that some enterprising soul can make some nice greasemonkey extensions for http://thomas.loc.gov. Off the top of my head I can think it'd be nice to be able to cross referencing links to US Code and other documents that bill modify. And maybe formatting these votes differently would be good.
In the meantime, I'm not quite ready for javurscript hackery, so, for your amusement at how much of a nerd I am, here is the little vote dissector I built in python. If you really wanted to you could do something really crazy with this I'm sure.
from xml.dom.minidom import parse
def ayevotep (v):
return 'Aye' == v.getElementsByTagName('vote')[0].lastChild.data
def democratp (v):
return u'D' == v.getElementsByTagName('legislator')[0].getAttribute('party')
def state_name (v):
l = v.getElementsByTagName('legislator')[0]
return (l.getAttribute('state'), l.lastChild.data)
doc = parse('roll414.xml')
votes = doc.getElementsByTagName('recorded-vote')
aye_democrats = [state_name(v) for v in votes \
if ayevotep(v) and democratp(v)]
aye_democrats.sort()
for s,n in aye_democrats:
print s,n
And here are our winners!
AL Cramer
AL Davis (AL)
AR Ross
CA Baca
CA Harman
FL Davis (FL)
GA Barrow
GA Bishop (GA)
GA Marshall
GA Scott (GA)
HI Case
IA Boswell
IL Bean
IL Emanuel
IL Lipinski
KY Chandler
LA Melancon
MD Cardin
MD Hoyer
MD Ruppersberger
MO Carnahan
MO Skelton
NC Butterfield
NC Etheridge
NC McIntyre
NC Miller (NC)
ND Pomeroy
NJ Andrews
NJ Menendez
NY Higgins
OK Boren
PA Holden
PA Schwartz (PA)
SC Clyburn
SC Spratt
SD Herseth
TN Cooper
TN Davis (TN)
TN Gordon
TX Edwards
TX Green, Gene
TX Ortiz
TX Reyes
I figure I'll just use what state they're from to make wild conclusions to why they voted for the PATRIOT Act (Texas: they're jerks, North Carolina: rednecks, Louisiana: hillbillies) until I can find the XML of their personality profile and campaign contribution lists.
|
|
More Roger Ebert |
[22 Jun 2005|01:29pm] |
I am surely following the tangents today. Roger Ebert's closing paragraph of his 'Herbie: Fully Loaded' review is the best part of a silly review of a silly movie:
It goes to show you how we in the press so often miss the big stories that are right under our noses. There is a famous journalistic legend about the time a young reporter covered the Johnstown flood of 1889. The kid wrote: "God sat on a hillside overlooking Johnstown today and looked at the destruction He had wrought." His editor cabled back: "Forget flood. Interview God." UPDATE: Here's the proper URL: http://rogerebert.suntimes.com/apps/pbcs.dll/article?AID=/20050621/REVIEWS/506210301/1001
|
|
Batman vs FF |
[20 Jun 2005|04:46pm] |
Yet another comic book showdown in the Texas A&M student paper. Notes:
- The Fantastic Four are what made modern Marvel Comics.
- Johnny Storm is way more out of control than Batman
- The Fantastic Four are a bad team? Has this guy seen the X-Men?
- That comic store owner is a complete DC apologist.
Ok, not that I'm the biggest Marvel/FF fan in the world (in fact I'm really more of a Batman fan), but against Batman they'd clean the room with him. Sorry.
http://www.thebatt.com/media/paper657/news/2005/06/20/Aggielife/Superhero.Smack.Down-958113.shtml
|
|
Damn Dirty Filker |
[20 Jun 2005|11:26am] |
She's Got a Bantha to Ride (filked from the Beatles, "Ticket to Ride")
I think I'm gonna be sad, I think it's today, yeah. The girl that's driving me mad Is going away.
(Chorus) She's got a bantha to ride, She's got a bantha to ride, She's got a bantha to ride, But she don't care.
She said that Tatooine Is bringing her down yeah. For she would never be free With the Empire around.
(Chorus)
I don't know why she's ridin' so high, She ought to think twice, She ought to do right by me. Before she gets to saying goodbye, She ought to think twice, She ought to do right by me.
I think I'm gonna be sad, I think it's today yeah. The girl that's driving me mad Is going away, yeah.
(Chorus)
Ah, she's got a bantha to ride, She's got a bantha to ride, She's got a bantha to ride, But she don't care.
My baby wookie, my baby wookie. My baby wookie, my baby wookie. My baby wookie, my baby wookie.
|
|