Posts

Showing posts from May, 2008

Neophyte/Unoptimized version of Euler Number 42 in Common Lisp

;; ********************************************** ;; Author: Berlin Brown <berlin dot brown @ gmail.com> ;; Overview: Euler Example Number 42 (neophyte version) ;; Target Environment: Common Lisp -> Clisp/Sbcl ;; Date: 5/19/2008 ;; -------------- ;; The nth term of the sequence of triangle numbers is given ;; by, tn = 0.5 * n * (n+1); so the first ten triangle numbers are: ;; ;; 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... ;; ;; By converting each letter in a word to a number corresponding to ;; its alphabetical position and adding these values we form a word value. ;; For example, the word ;; value for SKY is 19 + 11 + 25 = 55 = t10. If the word value ;; is a triangle number then we shall call the word a triangle word. ;; ;; Using words.txt (right click and 'Save Link/Target As...'), ;; a 16K text file containing nearly two-thousand common English words, ;; how many are triangle words? ;; ;; References: ;; [1] http://www.lispworks.com/documentation/HyperSpec/Front/X_Maste...

Charles Bukowski is an amazing guy

Image
http://en.wikipedia.org/wiki/Charles_Bukowski This is my ode to Charles Bukowski.

Running Google AppEngine Django Unit Test Cases

If you want to run standalone google appengine code, you will need to establish some setup routines and initializations. Here is some code that I used to prepare the google appengine datastore and run a collection of python unit test cases. # !/usr/bin/env python ''' Author: Berlin Brown Filename: run_all_tests.py Application: test case for botlist django front-end (ghostnet) Environment: Python 2.5.2 -------------------------- Description -- With the following code, you can run google-appengine stand-alone database driven test cases. * Run batch python unit test scripts * The script ensures that the google libraries are imported and added to the python sys path. ''' import os import sys import unittest # Add the parent directory, ghostnet to the sys path. # We are assuming that google_appengine is also in the # For example: # ----------------------------- # PROJECT_HOME/google_appengine # PROJECT_HOME/projects/ghostnet/tests DIR_PATH = os.path....

Intelligent Agents by Norvig

This is not much of a post; but Peter Norvig has some good references to his book on intelligent agents: http://aima.cs.berkeley.edu/

Ubuntu Hardy Heron: Horrible web experience with Firefox, horrible experience

Who do you blame? Adobe Flash, Firefox, the Ubuntu version of FF? I don't know; but I would just like to say, the bugs with firefox make for a horrible web experience, a horrible experience over all. From reading the forums, it looks like flash might be the issue and the main culprit. That is fine, but aren't the people that create Ubuntu big enough to give Adobe a call and try to work out the issue. Sorry for the rant, but I am frustrated. I don't think I have ever used a piece of software that has crashed 5 minutes after use and then opened up again to crash again. What was my crime. I don't know; clicking on links? I know I will get flamed for this, but I just gave my honest opinion. I have dealt with this issue for every FF upgrade since the early FF2 releases. Every time, epic fail. I even had FF3b5 from Mozilla's site and I deleted it, thinking the Heron version would have better integration. That was a big mistake. Anybody, who is new to Ubuntu; there are goi...