I find seeing the results of Pig commands on sample data a good companion to the PigLatin language reference, so I setup some simple sample data and ran commands, capturing the results.Here's the sample data as well as the commands:
/data/one:
a A 1
b B 2
c …
I revived a bunch of mp3 onto my windows box. I want to get them onto my iPhone. Should be drop-dead simple.
I've spent 10 minutes with iTunes, pressed the "Sync" button a ridiculous number of times, and I'm no closer to getting the songs onto the iPhone.
I found …
MoreAs I waste yet another styrofoam cup and stare at a desk full of various thank you / congratulations / etc chachkis, it occurs to me that if I was handed a real cup / mug instead of the various junk I currently get I could stop wasting styrofoam. A cup is useful …
MoreWe watched Turtles Can Fly tonight. The story of Iraqi-Kurdish refugee children before, during, and just after the US invasion.
The movie is harsh. The life, the sheer numbers, and what they have to do to get by is just harsh.
The movie is well done; it's not preachy and …
MoreIf you're running into the problem where unicode items in your Django / MySQL project are displayed as question marks, here's the likely problem and solution, found in this django-users thread:
The likely problem is that your MySQL encoding is set to latin1, as opposed to utf8. You can check this …
MoreLaughed out loud at this one:
Static typing is like giving a drunk a bunch of breath mints and saying "Don't drive drunk. But if you must, use these breath mints in case you get pulled over."
Via Simon.
MoreSay you want to monitor changes to instances of a model and update something based on the changes. In my example I wanted to maintain a sum of the values that had certain characteristics. You can accomplish this with Django Signals.
Signals are events that fire at various pre-defined moments …
MoreStep 1: Give the baby some inappropriate sugary thing since mom is not home.
Step 2: Go to the backyard. Get fascinated by the fact that you get get better wifi reception in the backyard than you do inside the house.
Step 3: Come back to consciousness as you realize …
MoreThe following worked for me for unlocking the Cingular BlackBerry Pearl I recently got:
Don Dodge discussed the very small percentage of content creators versus viewers:
in a group of 100 people online, one will create content, 10 will "interact" with it (commenting or adding to it) and the other 89 will just view it.
True enough. However, it's important not to discount the …
MoreYou're busy making hamburgers and suddenly you get lots of customers. You want to scale your service to take care of more customers more quickly.
Threads: all of your workers share a single set of tools, utensils, and the same workspace. One puts mustard on the spreader, turns to grab …
MoreIn case you didn't believe my earlier ramblings, here's the short version:
A small group of schools account for a disproportionate amount of billionaire education. Just 20 universities and colleges account for 52% of the billionaire graduates while 182 schools count for the remainder.
Via Yahoo Finance.
MoreMy wife came back from the movie last night, not happy. "It was horrible". "Depressing". "Too serious".
So there you have it. Not good, apparently.
MoreThere are about a million different ways to execute an external program from Python. Here's the right way:
import subprocess
subprocess.call('''zcat %s | tr '\02\03' '\r\n' | ssh %s "hadoop dfs -put - %s"''' %
(local, DEST, remote), shell=True)
Where what you put inside the call statement is what …
MoreInteresting benchmarks in PEP 371 -- Addition of the Processing module to the standard library. In short, standard Python threads perform worse than non-threaded in almost every benchmark, while the multi-process Processing module generally does as you'd expect and reduces processing time proportional to the number of processors / cores.
You could …
MoreI gave a talk at UCSD a couple of days ago. After the talk several students came up to me asking about how to find internships and full time positions at Yahoo. As it so happened we had our HR folks right there and they got connected up.
I told …
MoreI'm really into Mixed Martial Arts these days. Watching that is - I'm as lazy and immobile as ever, and I'm pretty sure my 6 year old could beat my sorry ass.
But it's always a guilty pleasure. For one thing it feels like mindless gratuitous violence. For another, I'm near …
MoreI have an array, say:
var pieces = [2008, 5, 19, 13, 49];
I'd like to create a date based on this; the equivalent of:
new Date( 2008, 5, 19, 13, 49 );
Is there a way to do that in Javascript? Can I dereference the array in my date create call …
MoreAfter a lovely day at the Cystic Fibrosis walk, I fell asleep in the toy room.
I briefly skirted the real world to the feeling of my 10 month old grabbing my feet to stand.
Back into sleep, I was having a discussion, watching a movie, and generally experiencing a …
MoreUnfortunately I missed the Web2.0 Expo this year, but I've been catching up on slides and presentations. I had John Allspaw's Capacity Planning For Web Operations open in a tab for several days and finally got to it. Turned out to be much more interesting than I'd anticipated. Slide …
More