Oh... I'm using Linux

Someone from Smart Bro called and he wanted to troubleshoot the internet connection. He asked me if I was running Windows XP or Windows Vista. I then told him that I was running Mac OS X. He was kind of familiar with it, asking me to open Network Preferences and restarting Safari (although I actually used Firefox and just gave him the impression that I was using Safari). After troubleshooting, I couldn’t help but wonder what he would’ve done if I said, “Oh… I’m using Linux”.

3G iPhone

I want the black one… Wait, can it be used as a modem? I hope so…

Edit: I probably won’t be able to afford it still, but what the heck. I can dream, can’t I?

JTV: Spellcheck Problem - Solution?

Just a quick hack…

#!/usr/bin/env python2.5
#
# Copyright (C) 2008 Aldous D. Penaranda <aldous@penaranda.name>
# Written using the default Python interpreter on Mac OS X 10.5.3
#

import random
import re
import sys

def is_vowel(letter):
    if letter.lower() in "aeiou":
        return True

def spellcheck(dict, misspelled):
    count = 0
    prev = misspelled[0]
    regex = "^"

    misspelled = misspelled + "_"
    for i in misspelled:
        if prev == i:
            count = count + 1
        else:
            if is_vowel(prev):
                regex = regex + "[aeiou]"
            else:
                regex = regex + prev.lower()

            if count == 1:
                pass
            else:
                regex = regex + "{1," + str(count) + "}"
            count = 1
        prev = i
    regex = regex + "$"

    result = []
    r = re.compile(regex, re.I)
    for i in dict:
        m = r.match(i)
        if m:
            result.append(m.group(0))
            if misspelled == m.group(0):
                result = [m.group(0)]
                break

    if result == None:
        return None
    elif len(result) > 1:
        return result[random.randint(0, len(result)-1)]
    elif len(result) == 1:
        return result[0]
    else:
        return None

if __name__ == "__main__":
    f = open("/usr/share/dict/words")
    words = f.readlines()

    buckets = {}
    for i in "abcdefghijklmnopqrstuvwxyz":
        buckets[i] = []

    for word in words:
        word = word.strip()
        buckets[word[0].lower()].append(word)

    while True:
        input = raw_input("> ")
        suggestion = spellcheck(buckets[input[0].lower()], input)

        if not suggestion:
            print "NO SUGGESTION"
        else:
            print suggestion

GSIS Records Shown Insecurely

Visit the GSIS website. They have this system where you can view your personal records just by entering your GSIS ID number. I just found it odd that they don’t transmit your info securely…