Archive for the ‘technical’ Category

Wiring a Shure PG30 Headset Microphone

March 15, 2011

I recently tried to rewire a Shure PG30 headset microphone so that it could be connected directly to a computer sound card via a stereo mini plug.  I had limited, but insufficient, success after some amateur tinkering.

(more…)

Personal Satellite Assistant

March 17, 2010

One of the coolest robot projects I’ve seen: the Personal Satellite Assistant (PSA).  It’s a red plastic sphere about the size of a bowling ball that is planned to fly around the space station on jets of air, acting as a speech-driven measurement and reference device.  They say it was inspired by Star Wars, and I couldn’t help but think of Luke’s training remote and the intelligent Exocomp robots from Star Trek.

The NASA website isn’t that great, but there is a 5 minute educational video and another 4 minute educational video that describe the PSA.

Mute annoying Pandora.com commercials

March 15, 2010

I love Pandora and I think they do a great job of monetizing their service.  The $1 surcharge on heavy use is pretty minimal and their audio ads are short and fairly infrequent.  However, I keep getting one audio ad that I absolutely hate but cannot ignore.  It pulls my attention away from what I’m doing and I am compelled to either take my headphones off or mute the sound to avoid accumulating aggravation.

The duct-tape solution for my Ubuntu box is a script that simply mutes the sound for 30 seconds.  I link to the script with an icon on Gnome’s toolbar and also map it to “CTRL-M” to allow for quick activation.  The script is below; the only thing you might need to do is change the soundcard index (the “0” in “-c 0 …”) on your system.


#!/bin/sh
amixer -c 0 sset Master,0 mute
sleep 30
amixer -c 0 sset Master,0 unmute

Solving equations with exponential and polynomial functions of x: the Product Log Function

October 18, 2009

I was trying to solve an equation of the form cx^p=q^x for x, but couldn’t figure out how to do the algebra needed to isolate x.  The actual problem was to find when an algorithm with O(n^2) runtime performance would have a shorter runtime than an algorithm that is O(2^n).

Text-based searches weren’t turning up anything, so I tried to see how Wolfram Alpha would solve it.  Turns out there is a neat tool called the Product Log function, aka the Lambert W function, that can be used to find a closed-form solution to this equation.  The Wikipedia article explains the solution method, but you basically need to reorganize the original equation into the form y = x e^x using algebraic and logarithmic operations and then x=W(y).  Note that the solution may not be unique; W(y) is a multivalued function.

Of course, for my original problem where I was actually trying to find the closest integer less than or equal to x, and given that q^x grows rather quickly, it is sufficient to use a spreadsheet to calculate the two sides of the original equation for all small values of x.

Yahoo! Pipes – Helping Me Travel on the Cheap

October 13, 2009

Yahoo Pipes is something I came across when trying to find a RSS aggregator/keyword spotter/emailer.  It is a really neat web-based graphical scripting tool for manipulating web-accessible data.  It’s got a  regex component to manipulate datasources!

It didn’t take me long to construct a pipe that pulls multiple airline ticket RSS feeds from the STA website containing “Chicago” or “Detroit” and then sorts the aggregated feeds by ascending price.  The result is output to an RSS feed, whose updates can be sent to an email address by Yahoo Alerts.

Yahoo has been aggressively climbing back into the ranks of “cool” for the past few years.  I’ve been impressed with the amount they contribute to the web and open source community and how they seem to be more proactive than Google about sharing their research.  Thanks again, Yahoo!

Minor Greasemonkey Tweak to MSU Course Scheduler

October 10, 2009

Every time I use the MSU Course Scheduler, I may or may not remember to click the “View all results on one page” checkbox.  It’s a small pet peeve, but Greasemonkey comes to the rescue.  This simple Greasemonkey script will set the checkbox whenever the page is loaded.

Database is slow to process large datasets?

July 5, 2009

To learn Python and have a bit of extracurricular fun, I entered an NLP-related competition that was based around a large textual dataset (~4Gb).  The natural solution involved pounding on the problem with Postgres.  The first step involved creating word counts for each document in the database.  I let a script run over the full dataset and, after a few hours, I was surprised to see that it had only just started to make a dent.

After some refactoring, I kicked off the script and left for a short vacation.  When I returned, I was surprised to see that my solution to this simple problem– counting words in text documents– had taken 6.5 days to finish!  I was doing something very wrong.  By making one simple change, I could tokenize the entire dataset in only 4 hours…

(more…)

Computer Science Career Day Talk to 5th Grade Students

May 7, 2009

I had a blast this morning talking to fifth grade students at a local Austin elementary school about electrical engineering and computer science.  I told them what my job was like, sketched out how speech recognition works, and talked to them a bit about robots and the Peace Corps.

(more…)

Creative Zen on Hardy Heron Ubuntu Linux

September 27, 2008

An upcoming trip to DC motivated me to search for ways to upload videos on my Creative Zen mp3 player.  While Gnomad2 is good for managing audio, it doesn’t yet handle video uploads.  All the applications referred to are available through the Synaptic package manager.

(more…)