Archive for September, 2007
I’m writing this rather technical post so that other people will understand this funny Python behavior. I was rather surprised by it, and hopefully this short explanation will help other people understand how to avoid this problem themselves.
Python breaks on circular dependencies. For example, consider the following two files:
If you try to run either of these files, python exits with a very uninformative error that reads like
ImportError: cannot import name a_foo
However, forward-declaring the functions works:
“Babes always whizgiggled at me and even gars did in the open WC! Well, now I whoop at them, because I took MEGADIK for 5 months and now my tool is dreadfully more than civil.”
If Lewis Carroll can invent chortling, then spam can invent whizgiggling.
Our Judo instructor is an Olympic medalist in the sport, which is pretty fancy. I’m not sure why he’s here at Berkeley, but I guess you’ve got to do something to pay the bills while training for the Olympics.
Today, we were learning a technique for pinning someone. The idea was that one person would hunch over on all fours and try not to be pinned, and the other person would pry their elbow to destabilize and pin them. My partner was pulling my elbow the wrong way, so the teacher demonstrated on me. But I successfully resisted, holding my elbow still and remaining unpinned. Even an Olympic medalist couldn’t pin me! Then, of course, he used another technique he hadn’t taught us and easily pinned me. But I’m still proud that I held my own for a moment.
I got a new camera, which I used to take pictures at my neighbor’s concert. He and some friends started a band called the Shirtless Sundays. They’re quite good, even though they only have 3 practiced songs so far. I especially enjoyed one where they used a didgeridoo to provide the bass:
Later in the concert, they lived up to their name and became shirtless:
I ordered a digital camera from Newegg.com. I have had bad experiences with UPS, so I paid $3 more to have it shipped via FedEx, which is at least kind enough to have its distribution center located within a 15-minute drive. But today, looking at my package tracking, I saw this:
|Sep 6, 2007||2:04 PM||At local FedEx facility||EMERYVILLE, CA||Package not due for delivery|
|6:49 AM||On FedEx vehicle for delivery||EMERYVILLE, CA|
|6:45 AM||At local FedEx facility||EMERYVILLE, CA|
Um, WTF? They were all ready to deliver it, but they decided to wait because they only promised 3-day delivery? That’s ass, dammit. I was looking forward to getting my camera today, and it was even on the damn truck. This was not worth the extra $3.
I’m in a class about the neurobiology reaching and pointing. That sounds a little specialized, but my research is about the theoretical structures (hopefully informed by the neural structures) that are used to produce and understand action. So it’s a very relevant class to me.
Yesterday, in class, we were talking about adaptation of motor actions, and they mentioned one of the classic experiments. In this experiment, they make a subject wear funny glasses that make everything look over to the side. Then, the subject is asked to perform some normal tasks.
The cool thing was that they asked for a volunteer to demo the distortion glasses on, and I shot up my hand as fast as I could, and was chosen. So, I scampered up to the front of the room, and put on the glasses, and then, as instructed, reached for a marker the professor was holding. I missed by quite a bit, but I soon got better at it.
Then, when I took them off, they had me try it again. I could see that my vision was finally undistorted, but as I reached straight for the marker, my finger went off to the side! I had adapted to the glasses, and it took me some practice to fix my reflexes. It sounds simple enough, but it was amazing having my body betray me like that–I felt like I was reaching straight for the marker, but I was way off. The whole class, including me, laughed in amazement.
I’m not sure I can describe the glee and amazement I feel. It was more fun than I had any right to expect, and that’s probably a measure of my geekiness. But I now know that I can fool my body, and that there’s a lot of unconscious stuff going on! The moral of the story is: take part in psych demos when you can. The results can be wildly fun.
I relate the following story so that future searchers may quickly and easily find their solution.
I plugged my Artec e+48u scanner into my new Ubuntu linux laptop. When I tried to use it, though, it popped up the following message:
Failed to open device `artec_eplus48u:libusb:002:002′: Invalid argument.
The problem was that the firmware for the device (a file called Artec48.usb, found on the driver CD for the scanner) was not found in the required place. The conf file for the scanner (/etc/sane.d/artec_eplus48u.conf) listed a firmware file /usr/share/sane/artec_eplus48u/Artec48.usb, which was not present. After copying the driver from the CD to that place, it worked perfectly.