Wednesday, December 30, 2009

Counting word frequencies

My code segments in my comment on were eaten. Here it is

This is a favorite question of mine as well, but I expect the developer to be pragmatic and provide me a scripting solution that can be written and run in less than 5 minutes.

// cat individual files into all.txt
// and do the rest in awk one liner

awk '{for(i=1;i<=NF;i++) c[tolower($1)]++} END {for(w in c) print w, c[w]}'

// output can be sorted in both ways in the same statement as well

... | sort | tee alpha_sorted.txt | sort -k 2 -nr > freq_sorted.txt

Tuesday, December 29, 2009

Weird nature.

Toxoplasma gondii infections have the ability to change the behavior of rats and mice, making them drawn to rather than fearful of the scent of cats. This effect is advantageous to the parasite, which will be able to sexually reproduce if its host is eaten by a cat. The infection is highly precise, as it does not affect a rat's other fears such as the fear of open spaces or of unfamiliar smelling food.

Studies have also shown behavioral changes in humans, including slower reaction times and a sixfold increased risk of traffic accidents among infected males, as well as links to schizophrenia including hallucinations and reckless behavior. Infected men were more likely to be aggressive, jealous and suspicious, while women became more outgoing and showed signs of higher intelligence.

Thursday, December 24, 2009

Week in review

22 miles in this short week. Aside from a blister no injuries so far. Next week will be even shorter, the gym will be open only on Thursday. Good excuse to take a break and focus on other stuff. One big project is refinancing the mortgage. Almost done with the docs. The rate will go down from 5.25% to 3.875%.

Friday, December 18, 2009

Week in review

28 miles this week. Above the goal but will be resting mostly the last week of the year so the monthly total will be aligned with the average. No injuries so far and feeling stronger. Started doing the dips and pull ups without support.

Friday, December 11, 2009

Week in review

Little behind on miles but OK. What concerns me is I feel tired and guess coming down with cold. Also gym will be closed for most of the following week to complete enough miles for December. It's too cold to go out!

On Religion

Religion is good. It's like the homeless shelter. Comforts you when there is nowhere else to go. The problem is why there are so many people who needs it?

Thursday, December 10, 2009

Lost in translation

There was once a Sioux chief, he was so feared that even the sight of his horse would cause fear. His name in English: Man-Afraid-Of-His-Horse.

Friday, December 4, 2009

Week in review

Total 23 miles for this week. So far on target without any injuries.

Monday, November 30, 2009

Mileage: End of November snapshot

Goal it to get to 80 miles per month, starting next month, that should make around 1000 miles per year.

Wednesday, November 25, 2009

Norwegian proverb

"Experience is the best teacher, but the tuition is high."

Monday, November 9, 2009

Word of the day: Mamihlapinatapai

Mamihlapinatapai is a word from the Yaghan language of Tierra del Fuego,

"a look shared by two people with each wishing that the other will initiate something that both desire but which neither one wants to start."

Friday, October 30, 2009

Mileage: End of October snapshot.

you can check when I was sick from the bar graph. Last year's total mileage was greater than 1,000. This year will be little less...


Combine retirement houses and day care centers in a gated community with security (both to unauthorized access and exit) and health care facilities (elder care and pediatrics). It's a win-win-win situation. Kids can be taken care of the elders (of which some of them might be blood relatives) and entertain them in return. Minimal supervision can eliminate any abuse or neglect. A build in health care facility will eliminate most of the hassle of visiting the doctors office. Anyway younger and older people need most physician care.

Fiat Lux

Why doesn't Fiat make a car called Lux?

Tuesday, October 27, 2009

gluteus maximus

The human gluteus maximus is a distinctive muscle in terms of size, anatomy and function compared to apes and other non-human primates...

The results indicate that the gluteus maximus is mostly quiescent with low levels of activity during level and uphill walking, but increases substantially in activity and alters its timing with respect to speed during running...

Evidence for when the gluteus maximus became enlarged in human evolution is equivocal, but the muscle's minimal functional role during walking supports the hypothesis that enlargement of the gluteus maximus was likely important in the evolution of hominid running capabilities.

Thursday, October 22, 2009

Greek Alphabet

Α αalphaΝ νnu
Β βbetaΞ ξxi
Γ γgammaΟ οomicron
Δ δdeltaΠ πpi
Ε εepsilonΡ ρrho
Ζ ζzetaΣ σsigma
Η ηetaΤ τtau
Θ θthetaΥ υupsilon
Ι ιiotaΦ φphi
Κ κkappaΧ χchi
Λ λlambdaΨ ψpsi
Μ μmuΩ ωomega

Tuesday, October 13, 2009

New term defined: kaizenette

kaizenette: (continuous) small improvement
from kaizen (Japanese) + ette (French).

Wednesday, September 30, 2009

Some useful Windows shortcuts

(press both keys together)
[Windows]-R: run command
[Windows]-L: lock computer
[Windows]-D: show desktop
[Windows]-E: run explorer
[Windows]-[Pause/Break]: show system properties

ps. [Windows] is the key between [Ctrl] and [Alt] (at least on my keyboard).