Sat, 31 Jan 2009
Hope Watch begins
I attended Obama's inauguration ceremony in DC a bit over a week ago. It was inspirational and rendered me to tears.
I'm awestuck in the same way to read (a few days late) from Larry Lessig that "Rick Boucher is taking over the Energy and Commerce Committee's Subcommittee on Communications, Technology and the Internet (renamed Telecommunications Subcommittee)".
In 1998, Congress passsed a bill that made circumventing any copy protection scheme illegal; since then, even if you just want to play a DVD on a system where an officially-sanctioned DVD decoder has not been written, you are breaking the law. Rick Boucher introduced a bill to the House named the Digital Media Consumers' Rights Act (DMCRA) that reverses the most egregious of the pains that anti-circumvention law brought. He introduced it first in 2003 and again in 2005. I read these actions as, "I'm going to introduce this bill that is overwhelmingly reasonable. You all can watch as this corrupt institution drops it on the floor."
I know that Rick Boucher being the chair of this committee does not mean that a re-introduced DMCRA will immediately become law. But I believe in gestures, and this one feels like a personal message from this new Democratic Party under President Obama to me that the issues I believe are important have a chance of being addressed.
So here we start Hope Watch. Somehow, here in reality, actions by Congress touch me with hope that we might make this country and world a dramatically better place. If something else touches me, I'll try to make a note.
What an overwhelming feeling that is.
[/note/politics/hope-watch] permanent link and comments
Fri, 30 Jan 2009
Sense of humor
-- California First Amendment Coalition, Jan 30 2009.
[/scribble/donate] permanent link and comments
Common sense
"I've always been a big proponent of using common sense, but it seems like this no longer applies."
[/scribble/people] permanent link and comments
Tue, 27 Jan 2009
Wikipedia on one page
"I am working on a project to host wiktionary on one web page and wikipedia on another."
-- Stephen Dunn.
[/scribble] permanent link and comments
Nineteenth Century Smileys
Rebekah sent me a link to a New York Times blog post investigating a possible smiley from 1862.
The evidence that it is a smiley rests primarily on the fact that every single typesetted character, including the ";)" about which one wonders, had to be typset by hand. Would someone really make a mistake like this?
[/note] permanent link and comments
Mon, 12 Jan 2009
Baypiggies, January 8: Scrape the web
I gave a presentation at the Thursday, January 8, Baypiggies meeting that was something of a preview of my scraping Tutorial that's coming up at PyCon 2009. (Baypiggies is the Bay Area Python Interest Group.)
If you want to take a look at what I presented, here is what I have. Note that you can grab all of these in bulk by doing:
$ svn checkout http://svn.asheesh.org/svn/public/20082009/scraping-preso/
The presentation itself:
- preso.odp: The presentation (OpenDocument format)
The curry examples:
- examples/curry/regex: The regular expression I used for grabbing the menu part of the document.
- examples/curry/grab_page.py: A simple demo of urllib2.urlopen() to read in web pages as file objects.
- examples/curry/curry.py: A totally broken regex-based script that isn't even fully written that grabs the curry page, checks that it is today's menu, extracts the menu out of the page, removes the HTML tags, and prints it.
- examples/curry/return_to_curry.py: The same broken script that now shows how to strip HTML tags using BeautifulSoup.
The actually-working example, Cepstral's weather reading-aloud tool:
- examples/cepstral/weather.py: A tool that POSTs to the page and grabs the resulting WAV file.
- examples/cepstral/mech.py: A way shorter version that shows how nice "mechanize" is.
Code snippets that might be useful:
- examples/string_matching.py: A quick reminder that sometimes you can get away with testing for the existence of a string as your entire information retrieval strategy.
- examples/user_agent.py: Code (taken from Twill) for changing one's user agent
- redemo.py: A regular expression GUI, available in the Python source tarball or random places on the web
- examples/wget_demo.sh: A trivial demo of the fact that wget can download pages.
- examples/trivial_yahoo_search_with_mechanize.py: Post a query to Yahoo, including disabling robots.txt.
Patches welcome! These were quickly half-baked on a truck ride provided by Jim Stockford. (-: I'll be revisiting them later as I prepare more for my PyCon talk.
[/note/preso] permanent link and comments
Wed, 07 Jan 2009
Trisk
I now know why Albert Lee uses the nickname Trisk. I have learned his secret identity.
Steve Jobs died in a car wreck in 1988. The current "Steve Jobs" is San Jose session musician, Roland Trisk. Trisk, who often doubled for Steve Jobs before his death in sales meetings and conferences, had plastic surgery in order closely resemble Jobs. There are hints everywhere-in the enclosure of the Mac LCII, the first NeXT CUBE, even Pixar's first full-length film, Toy Story. Wake up people! The truth is out there!
Thank you, Gizzmonic on Slashdot.
[/note/people] permanent link and comments