Skip to content

Instantly share code, notes, and snippets.

@borogove
Created November 7, 2019 05:47
Show Gist options
  • Save borogove/491c2db892ca81c5c84ea19eadb0c17b to your computer and use it in GitHub Desktop.
Save borogove/491c2db892ca81c5c84ea19eadb0c17b to your computer and use it in GitHub Desktop.
import random
import datetime
def d6():
return random.randint(1,6)
def d12():
return random.randint(1,12)
def d16():
return random.randint(1,16)
# spouse age +/- 11 years from mother's age
def ageVariance():
return d12() + d12() - 13
# birth age between 18 and 48, 33 median
def birthAge():
return 16 + d16() + d16()
mothersBirthAge = [27,36,41,33,28]
# https://www.mother.ly/child/top-50-gender-neutral-baby-names-youll-obsess-over-
# THIS IS SOME WYPIPO SHIT
NAMES = ["Charlie",
"Finley",
"Skyler",
"Justice",
"Royal",
"Lennon",
"Oakley",
"Armani",
"Azariah",
"Landry",
"Frankie",
"Sidney",
"Denver",
"Robin",
"Campbell",
"Dominique",
"Salem",
"Yael",
"Murphy",
"Jael",
"Ramsey",
"Hollis",
"Brighton",
"Perry",
"Gentry",
"Jaidyn",
"Reilly",
"Jules",
"Kylar",
"Austen",
"Ocean",
"Jackie",
"Storm",
"Honor",
"Riley",
"Marlo",
"Nikita",
"Ridley",
"Indiana",
"Taylen",
"Clarke",
"Kylin",
"Eastin",
"Payson",
"Amen",
"Timber",
"Cypress",
"Lake",
"Jaziah",
"Dakota"]
names = []
# this is a hate crime
for name in NAMES:
names.append(name)
if "ie" in name:
names.append( name.replace("ie", "y", 1) )
elif "i" in name:
names.append( name.replace("i", "y", 1) )
if "y" in name:
names.append( name.replace("y", "ee", 1) )
random.shuffle(names)
tree = []
class Person(object):
def __init__(self,generation,name,relation,birthYear,pureMatrilineal):
self.gen = generation
self.name = name
self.descr = relation
self.mother = None
self.other = None
self.birthYear = birthYear
self.pure = pureMatrilineal
tree.append( self )
def createParents(self):
parentGen = self.gen+1
if self.pure:
mba = mothersBirthAge[self.gen]
else:
mba = birthAge()
oba = mba + ageVariance()
mname = names.pop()
oname = names.pop()
# i'm assuming we have mothers and not necessarily fathers
self.mother = Person( parentGen, mname, "mother of "+self.name, self.birthYear - mba, self.pure )
self.other = Person( parentGen, oname, "other of "+self.name, self.birthYear - oba, False )
def fill(self):
if self.gen < 5:
self.createParents()
self.mother.fill()
self.other.fill()
def dump(self):
print "%s, %s, born %d"%(self.name, self.descr, self.birthYear )
vpc = Person( 0, "View", "Viewpoint character", 2164, True )
vpc.fill()
print "%d people in the tree"%len(tree)
for p in tree:
p.dump()
63 people in the tree
View, Viewpoint character, born 2164
Reillee, mother of View, born 2137
Indyana, other of View, born 2139
Charly, mother of Reillee, born 2101
Kylin, other of Reillee, born 2094
Jacky, mother of Charly, born 2060
Jaziah, other of Charly, born 2050
Paeeson, mother of Jacky, born 2027
Gentry, other of Jacky, born 2021
Hollys, mother of Paeeson, born 1999
Charlie, other of Paeeson, born 1995
Yael, mother of Gentry, born 1987
Finleee, other of Gentry, born 1986
Kylyn, mother of Jaziah, born 2019
Finley, other of Jaziah, born 2013
Justice, mother of Kylyn, born 1995
Robyn, other of Kylyn, born 1995
Murphee, mother of Finley, born 1984
Eastin, other of Finley, born 1984
Riley, mother of Kylin, born 2068
Clarke, other of Kylin, born 2062
Storm, mother of Riley, born 2040
Ramsey, other of Riley, born 2050
Domynique, mother of Storm, born 2000
Jaidyn, other of Storm, born 1995
Reilly, mother of Ramsey, born 2025
Franky, other of Ramsey, born 2034
Rydley, mother of Clarke, born 2020
Oakleee, other of Clarke, born 2020
Nikita, mother of Rydley, born 1980
Jael, other of Rydley, born 1979
Oakley, mother of Oakleee, born 1981
Denver, other of Oakleee, born 1989
Indiana, mother of Indyana, born 2111
Amen, other of Indyana, born 2106
Timber, mother of Indiana, born 2073
Austen, other of Indiana, born 2070
Perry, mother of Timber, born 2045
Ramseee, other of Timber, born 2052
Landry, mother of Perry, born 2014
Tymber, other of Perry, born 2020
Skeeler, mother of Ramseee, born 2010
Royal, other of Ramseee, born 2015
Jules, mother of Austen, born 2028
Dominique, other of Austen, born 2035
Sidney, mother of Jules, born 1994
Rileee, other of Jules, born 1991
Ocean, mother of Dominique, born 2003
Reylly, other of Dominique, born 2005
Nykita, mother of Amen, born 2066
Perree, other of Amen, born 2063
Landree, mother of Nykita, born 2024
Armani, other of Nykita, born 2028
Keelin, mother of Landree, born 2000
Taylen, other of Landree, born 2010
Gentree, mother of Armani, born 1997
Frankie, other of Armani, born 1992
Dakota, mother of Perree, born 2033
Eastyn, other of Perree, born 2040
Jaideen, mother of Dakota, born 1999
Sidneee, other of Dakota, born 1997
Bryghton, mother of Eastyn, born 2002
Marlo, other of Eastyn, born 1991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment