Hardy Heron
In celebration of the newly announced "Hardy Heron" version of Ubuntu (8.04) I built a script to randomly generate a name for Ubuntu releases. I did not have a huge corpus of animal names, and I tried to find as many adjectives as I could find, but I used the adjectives and animals from the ubuntu wiki, and here is the script in all it's glory:
import re
from random import randrange
def get_adjectives():
f = open('adjectives','r')
adjectives = f.readlines()
f.close()
return adjectives
def get_animals():
f = open('animals','r')
animals = f.readlines()
f.close()
return animals
def choose_adjective(adjectives):
return adjectives[randrange(len(adjectives))].strip()
def choose_ubuntu(adjectives,animals):
adj = choose_adjective(adjectives)
letter = '^%s' % adj[0]
letter = re.compile(letter)
animal = [i for i in animals if letter.match(i)]
if animal == []:
return choose_ubuntu(adjectives,animals)
if len(animal)>1:
animal = animal[randrange(len(animal))].strip()
else:
animal = animal[0].strip()
return [adj,animal]
adjectives = get_adjectives()
animals = get_animals()
ubuntu = choose_ubuntu(adjectives,animals)
print('%s %s' % (ubuntu[0],ubuntu[1]))The script and the animal and adjective corpusesses (not sure of the plural of corpus) are attached in a zipfile.
P.S. I would have preferred a name like Happy Hummingbird, or something that doesn't sound so much like Hadeda (the reference to a bird does not help it's case). Surely in light of Hoary Hedgehog they should skip H entirely?
| Attachment | Size |
|---|---|
| choose_ubuntu.zip | 5.89 KB |


















The next version should allow you to feed a starting letter in, instead of all this randomness. My favourite combination so far is "Great Gerbil".
How about http://images.google.com/images?q=hadeda+ibis
I have changed the link and text ;)
Cheesy Chupacabra
Relieved Reptile
Soaring Siskin
Gaia Goldfinch
Wicked Worm
Furious Fox
Filthy Foundling
Delightful Duck
Damp Donkey
Greasy Goblin
Null Naiad
Curious Clam
Bumpy Bull
Wily Whale
Impossible Ichthyosaur
Archaic Alliteration
Strange Sabretooth
Lethal Lizard
Humourous Human
Inebriated Ibex
Jazzy Jay
Horned Hare
Depressed Doe
Risky Raptor
Best out of that has to be "Humourous Human"
Sarcastic Snail, anyone?
Is it too late to point out the the bird image is an Ibis?
It is a Hadeda Ibis
Post new comment