Hardy Heron

brad's picture

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?

AttachmentSize
choose_ubuntu.zip5.89 KB

Trackback URL for this post:

http://whijo.net/trackback/116
brad's picture

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".

brad's picture

I have changed the link and text ;)

brad's picture

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"

Is it too late to point out the the bird image is an Ibis?

brad's picture

It is a Hadeda Ibis

Post new comment

The content of this field is kept private and will not be shown publicly.
Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Syndicate content

The Whijos

site tools

User login

Log in using OpenID

Syndicate

Syndicate content

@love() python

Recent comments

About this website

Whijo.net is the online internets of Bradley Whittington, Amanda Joseph, and our son Finley James Whittington. "Whijo" is 29% Whittington, 33% Joseph, and 37% Internet. Quite Web 2.0 of us.