Monday, February 27, 2006

[tech] Thumbshots

Mark R found a company that provides website thumbnails. And, offer a free version of its service.

http://open.thumbshots.org/image.pxf?url=http%3A%2F%2Fcnn.com

Fun.

[tech] Yahoo search term volume reader

Midnight with Python.


#! /usr/bin/env python

import urllib
import re
import fileinput

class YahooReader:

# Set the seed data
LogFileName = 'Yahoo.log'
SearchTermFile = 'SearchTerms.txt'

def Run(self):
for line in fileinput.input(self.SearchTermFile):
line = re.compile('\n').sub('', line).strip()
self.DoSearchTerm (line)

def DoSearchTerm (self, ToDo):

print ToDo

# -- Read the page
t = urllib.urlopen(
'http://inventory.overture.com'
+'/d/searchinventory/suggestion/?term='
+re.compile(' ').sub('+', ToDo).strip()).read()

# -- Look for the exact match, which are highlighted with
# -- a different color and bigger font
p = re.compile (
'<td>'
+'<font face=\"verdana,sans-serif\" size=2 color=E8E8E8>'
+'&nbsp;(?P<SearchVolume>[^<]*)'
+'<\/td>[\r\n\t]*<td>'
+'<font face=\"verdana,sans-serif\" size=2 color=E8E8E8>'
+'&nbsp;(?P<Term>[^<]*)<'
).findall(t)

if not p:
# -- If no exact match, get the first one
p = re.compile (
'<td>'
+'<font face=\"verdana,sans-serif\" size=1>'
+'&nbsp;(?P<SearchVolume>[^<]*)'
+'<\/td>[\r\n\t]*'
+'<td>&nbsp;'
+'<a href=.*>'
+'<font face=\"verdana,sans-serif\" size=1 color=#000000>'
+'(?P<Term>[^<]*)'
).findall(t)

# -- Write out the result
logfile = open(self.LogFileName, 'a')
if p:
logfile.write(ToDo + '|' + p[0][0] + '|' + p[0][1] + '\n')
else:
logfile.write(ToDo + '|-1|<No Result>\n')
logfile.close()

# RUN IT --------------------------------------------
YahooReader().Run();

[log] Bookworm high score

Played the last, last game of Bookworm.

High Score: 1,831,470
Longest Word: SLATES
Best Word: HOLA (6600 pts.)
Rank: Super Dictionarian
Last Level: 20

(though my favorite word is GARGLE, with thanks to Eileen)

Previous high scores:
496,280 / Wordhoarder
476,800 / Vocabulist

Saturday, February 25, 2006

[find] Zubbles

I can't wait until I can buy some Zubbles. And thanks to Todd who sent me their truly inspiring story

"It turns out that coloring a bubble is an exceptionally difficult bit of chemistry. A bubble wall is mostly water held in place by two layers of surfactant molecules, spaced just millionths of an inch apart. If you add, say, food coloring to the bubble solution, the heavy dye molecules float freely in the water, bonding to neither the water nor the surfactants, and cascade almost immediately down the sides. You'll have a clear bubble with a dot of color at the bottom. What you need is a dye that attaches to the surfactant molecules and disperses evenly in that water layer ...."

"... Sabnis' solution was to build a dye molecule from an unstable base structure called a lactone ring that functions much like a box. When the ring is open, the molecule absorbs all visible light save for one color—the color of the bubble. But add air, water or pressure, and the box closes, changing the molecule's structure so that it lets visible light pass straight through. Sabnis builds each hue by adding different chemical groups onto this base."

Brilliantly colored soap bubbles, and the start of whole new temporary coloring technology. Fabulous.

Sunday, February 12, 2006

[places] Vivid Aquariums (Canoga Park, CA)

I love finding business or people that are superstars in their field. They absolutely blow my mind away to what is really possible. Vivid Aquariums is absolutely the superstar of the LFS (local fish store). They have a single focus -- Reef Tank. And they are spectacular at it. Huge and interesting variety of livestock. Gorgeous displays of fully built reef tanks. Wow.

Vivid Aquariums
21126 Vanowen Street
Canoga Park, CA 91303
818.348.3288

Saturday, February 11, 2006

[eats] Hiko Sushi (Los Angeles, CA)

Traditional Japanese sushi that taste so, so good. And, it's just nice to see a small 3-member-family-run restaurant that serves great food, does well, and even manages to not overwork -- They close at 9pm on weekdays and are closed on weekends. Now that's really something.

Must have's:

- Yellowtail
- Albacore
- Unagi (or Unagi roll)
- Crab roll

Hiko Sushi
11275 National Blvd
(corner of Sawtelle and National)
Los Angeles, CA 90064
310.473.7688

Monday, February 06, 2006

[homage] Programming Exercises

While spending half day waiting at the Bangkok hospital, I manage to inflict my sister with an introduction to recursive functions. What's really cool, is that she totally got it and loved it. Here are the exercises we did:

1) Write the logic to calculate the Factorial of N.

2) Write the logic to calculate the Factorial of N, without using a loop.

3) Write the logic to calculate the Nth number in the Fibonacci Sequence.

(Next family vacation: data structures)

Sunday, February 05, 2006

[find] Paint by numbers

I got this Paint-By-Number kit from Target last night for about five bucks. Painting with acrylic is every bit as fun as I had imagined.

And I have already picked out my next piece ...

Friday, February 03, 2006

[homage] Flying kite in Bangkok

Bangkok is a hot and windless city. And yet in the city park, many people were standing around, looking up and tugging at the line of their kite. Guess how they do it?

[find] Starting a Taiwanese restaurant in Beijing

Great snippet of an interview with a successful Taiwanese restaurant owner, regarding how they prepared to start their first restaurant in Beijing. They rented a fully operational restaurant, and engaged in the following five-part plan:

1) Close the language gap -- Turns out the Taiwanese called tomatoes by a completely different name from the people in Beijing. They built a Taiwanese-Beijingese dictionary for every term their restaurant needs.

2) Find local suppliers -- Turns out soysauce in Beijing doesn't taste the same as soysauce in Taiwan. So they went and identified suitable local suppliers for every ingredient they need for the menu, that would produce the same flavor.

3) Train the local chefs -- Goes without saying. Practice. Practice. Practice.

4) Run taste tests with Taiwanese customers -- Afterall their mission is to produce the same authentic flavor, even with ingredients and chefs from a different part of the country.

5) Identify appropriate sauces for non-Taiwanese customers -- They realized that many non-Taiwanese customers may not be used to the new flavors. So they prepared sauces that can help transition/introduce them from Shan-Dong, Hunan, and other flavors.