Mon, 13 Feb 2012

pyblosxom upgrade

Decided to finally upgrade pyblosxom so that I can create blog entries using reStructuredText instead of raw HTML as I have been up until now.

I've been using ReStructuredText for documentation recently and it's much nicer to write than html, and it's similar to moinmoin's wiki syntax which I've very used to at this point.

posted at: 19:12 | path: /general | permanent link to this entry

Thu, 15 Dec 2011

airmiles worth

Airmiles is a canadian rewards point club, where you buy things at participating stores, present your airmiles card, and in turn for you letting them have access to your personal buying habits, they give you points, that you can use to redeem for gift cards or items, trips etc.

One thing that is useful to know is what an airmile is worth, and right now a $20 gift card for groceries or petrol costs 175 points, so 20/175=0.1143, so each point is worth $0.11 cents. So if there is some item offered with 8 bonus points, you can equate that to 8*0.11 or $0.88 cents.

posted at: 14:07 | path: /general | permanent link to this entry

Wed, 30 Sep 2009

Mortgage Calculators

I've been following house prices for a few years, watching what I think is a huge housing bubble develope in Canada. Anyways, I often run little mortgage scenario's on houses just for fun to see how out of whack things are (the average family not being able to afford even a cheap home, etc, etc), and I did a google search for mortgage calculators and found something that I think is interesting.

This site: that is hosted by who knows, doesn't allow you to put in an interest rate above 9.0 percent. It seems to just not compute and won't show you any numbers? Anyways, that is just out to lunch since interest rates over the past 30 years have been up to 21%, and average around 8% or so. Yeah, they are stupid low now, but it doesn't mean they can't ever go past 9%? Just crazy.

And then I find this other site hosted by the BBC in the UK and they let you enter in your interest rate etc, and in the results they have a "But be careful, at 12% it will be:" amount. Which is exactly what people need to know! So anyways, a nice example of stupid vs sensible.

posted at: 13:29 | path: /general | permanent link to this entry

Wed, 15 Jul 2009

now with rss

Because there is one person who reads this blog I finally got around to hooking up the rss function. Link at the bottom of this page or right here. Enjoy :)

posted at: 20:13 | path: /general | permanent link to this entry

Mon, 05 May 2008

new blog

Well wordpress failed me again after I got lazy and didn't upgrade it for a while. It ended up getting hacked through a vulnerability in the image upload script. There didn't seem to be any real damage but it messed up my wordpress database somehow. Anyways, I'm rather sick of upgrading wordpress constantly and so I've switched to pyblosxom. It's nice and simple, no comments, so no spam, and I was able to drop all my old wordpress posts into text files with a simple python script.

posted at: 22:46 | path: /general | permanent link to this entry

python-mysql on maemo

Compiling python-mysql for use on a nokia n800.

I got the libmysqlclient15 libraries that were released from the gmyth package.

I then downloaded MySQL-python-1.2.2.tar.gz

export LD_LIBRARY_PATH=/usr/lib/mysql
I changed site.cfg file and set threadsafe to false, then ran python2.5 build
I then changed site.cfg to set threadsafe to true, then ran python2.5 build again
after that all went well, I ran python2.5 install and this created an egg /usr/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-armv5tel.egg

I copied this to the nokia n800 in the same directory and installed libmysqlclient15_5.0.27_armel.deb and then I was able to import MySQLdb and use mysql.

added /usr/lib/mysql to /etc/ and ran ldconfig

posted at: 22:22 | path: /general | permanent link to this entry

Fri, 02 Nov 2007 OMI (Open Mind Index)

I came across this OMI (Open Mind Index) generator while browsing around that is rather cool if your a junkie. As it's described on the website:

The calculation is based on your top-artist of the last 12 months. The weighting of a tag depends on the quantity of your played songs of one artist, as well as the most frequently used tag for this artist. On the basis of quantity, distribution and weighting of the tags, the OMI will be calculated.

So it basically takes your stats and creates even more stats about your listening. And everyone loves statistics (well, users do). They also have a bunch of OMI stats based on age, country and so on.

posted at: 03:26 | path: /general | permanent link to this entry

Sun, 12 Aug 2007

delayed sleep phase syndrome

My girlfriend recently found this article on wikipedia about delayed sleep phase syndrome, and immediately showed it to me since it describes my sleeping habits exactly. It's interesting as it seems just be a more extreme case of the natural circadian rhythm which has some people being "owls" or those who tend to go to sleep naturally later in the night (midnight - 2am). And on the flip side there are "Larks" who naturally go to bed earlier, and in turn wake up earlier. Along with that there is advanced sleep phase syndrome which is the exact opposite to delayed sleep phase syndrome. And in between are people who sleep more regular hours, sometimes referred to as "hummingbirds". From what I read Owls and Larks each account for about 15% of the population while the remaining 70% are hummingbirds.

In the case of these sleeping problems the best solution seems to be to find a lifestyle that fits with your sleeping since the trouble isn't sleeping at all, it's just when you sleep. All through school, and while I was working 9-5 I always had massive trouble going to bed at night, and getting up in the morning. I tried all kinds of different methods to try and get myself to sleep earlier but nothing ever worked. Even after struggling to get up in the morning, working a long day and then trying to go to bed early I would just lay there forever not falling asleep until after 2am. And thus getting up in the morning would be a massive pain, and thus I've always been late for everything in life if it's in the morning hours. Now that I'm self employed I can pretty much work my own hours and so I just go to sleep when I'm tired at 4 or 5am and sleep until I'm not tired and get up around noon. Unfortunately the world doesn't really work on those hours so finding a lifestyle to fit the more extreme cases of owls and larks isn't always easy, and is almost always a problem during school. But knowing what the problem is certainly makes it easier to find a solution. All through school it was assumed that I just slept too much and the solution seems to be finding out why I slept such long hours, when in fact, I wasn't sleeping very much at all since I was mostly just laying in bed at night not sleeping, or at least not getting any good sleep, and then getting up way to early. In turn making me seem tired all of the time as school hours are nearly my natural sleep hours.

This article titled Everything You Always Wanted To Know About Sleep (But Were Too Afraid To Ask) is a great overview of sleep in general and worth reading if your interested.

posted at: 05:46 | path: /general | permanent link to this entry

Sat, 02 Jun 2007

pystone benchmarks

These aren't very sceintific tests, but it's interesting to see the difference from processor to processor. The test I'm performing is a builtin pystone benchmark from the test module in python that tests mostly cpu performance in executing python code. It is simply done by doing the following on a *unix box:

from test import pystone

It will then output the time it took and the pystones/second value. Run it a few times and take the lowest value. Here are the results from a bunch of machines I have access too:
Intel Core 2 Duo 6600 (2.4 ghz)7.0471022.7
Intel Xeon 5110 (1.6 ghz)10.4247984.6
Athlon s969 3200+ (2.0 ghz)12.0241597.3
Athlon s969 3000+ (1.8 ghz)13.3737397.2
AMD Hammer? (1.6 ghz)14.9533444.8
AMD Opteron 242 (1.6 ghz)15.2032894.7
Intel Pentium 4 (2.4 ghz)16.5330248.0
AMD Sempron (1.6 ghz)17.0129394.5
Epia M6000 (600 mhz)74.546707.8
Intel Celeron (300 mhz)100.894955.9


As can be seen from the graph the new Core 2 Duo chip I got outperforms my old AMD 64 3000+ by almost double in this test. And it really does make quite a noticeable difference in just day to day use. Well worth the upgrade I would say...

posted at: 00:00 | path: /general | permanent link to this entry

Tue, 27 Mar 2007

WD Raptor drives

I'm a big fan of these new WD Raptor 10k rpm SATA drives that have been out for a little while now. So far they've been really solid and they make quite the difference in IO speed. I just replaced a drive in a machine and had a chance to perform a little real world test on identical machines hardware wise except the drive.

Machine A has a Seagate 7200rpm SATA drive (ST380013AS)
Machine B has a Western Digitial 10k rpm 36gig Raptor (WD360ADFD-00)

Both machines are AMD64 3000+ w/1gig of ram (identical mainboards/ram/controllers and whatnot)

First I did a little test with apt-get. Both machines are running Debian Etch and had an identical upgrade to do on firefox (or iceweasel). First I downloaded the packages to make sure they were starting from the same place:
apt-get -d install mozilla-firefox

Next I ran the install and timed them both:
time apt-get -y install mozilla-firefox

For the older seagate drive the time was 22.6 seconds:
real 0m22.571s
user 0m2.956s
sys 0m1.032s

For the 10k WD Raptor it was done in 5.4 seconds:
real 0m5.363s
user 0m1.332s
sys 0m0.496s

If you have the money I'd certainly recommend the Raptor drives as they really do make quite a noticeable difference in anything IO related.

posted at: 15:59 | path: /general | permanent link to this entry


Powered by PyBlosxom | RSS 2.0