Author Topic: What have you done today?  (Read 157161 times)

0 Members and 9 Guests are viewing this topic.

Offline Lucifer

  • Seraphic Elite
  • Elder
  • Almighty Postwhore
  • *****
  • Posts: 25050
  • Karma: 1544
  • Gender: Female
Re: What have you done today?
« Reply #2970 on: April 10, 2008, 07:07:31 AM »
another five hours on the thesis.  :GA:

duncvis

  • Guest
Re: What have you done today?
« Reply #2971 on: April 10, 2008, 07:09:37 AM »
some tinkering with t'Drivel; been having a bit of a rest since I have to drive 150 miles later. gonna get off my arse and vac and wash up in a minute.

thepeaguy

  • Guest
Re: What have you done today?
« Reply #2972 on: April 10, 2008, 07:58:08 AM »
Pissed people off.

Offline Leto729

  • The God Emperor of the Aspie Elite
  • Elder
  • Maniacal Postwhore
  • *****
  • Posts: 14008
  • Karma: 596
  • Gender: Male
  • Shai-Hulud
Re: What have you done today?
« Reply #2973 on: April 10, 2008, 08:21:03 AM »
Just woke up.
Guardian of the Empire

thepeaguy

  • Guest
Re: What have you done today?
« Reply #2974 on: April 10, 2008, 09:06:41 AM »

Offline odeon

  • Witchlet of the Aspie Elite
  • Webmaster
  • Postwhore Beyond Repair
  • *****
  • Posts: 108879
  • Karma: 4482
  • Gender: Male
  • Replacement Despot
Re: What have you done today?
« Reply #2975 on: April 10, 2008, 12:33:21 PM »
Went to the dentist with my son ridiculously early. Worked. Tinkered with my ftp client, without understanding anything. Logged on here, noting that Dunc had solved the attachment/avatar problem. :yawn:

Have to get more sleep, sooner or later.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

- Albert Einstein

Offline Lucifer

  • Seraphic Elite
  • Elder
  • Almighty Postwhore
  • *****
  • Posts: 25050
  • Karma: 1544
  • Gender: Female
Re: What have you done today?
« Reply #2976 on: April 10, 2008, 12:34:24 PM »
Went to the dentist with my son ridiculously early. Worked. Tinkered with my ftp client, without understanding anything. Logged on here, noting that Dunc had solved the attachment/avatar problem. :yawn:

Have to get more sleep, sooner or later.

/says nothing...  :P

Offline Peter

  • Amazing Cyber-Human Hybrid
  • Elder
  • Insane Postwhore
  • *****
  • Posts: 11846
  • Karma: 1115
  • Gender: Male
Re: What have you done today?
« Reply #2977 on: April 10, 2008, 03:13:58 PM »
I wrote a little program to simulate population growth after the biblical flood.  It assumes the population grows under near-miraculous levels of fertility and zero mortality, with each female producing a baby every 40 weeks once they're 12 years old.  Unfortunately I suck at coding, so it's very inefficient and slows almost to a halt on my machine after about 50 years, when the population is 33456.  Dates are given as (years,weeks), counting from (0,0) at the start of the run.

Code: [Select]
import random
class Person():
    def __init__(self, age=(0,0), gender=random.randrange(0,1), timetobirth=(0,0), children=0):
        self.age = age
        self.gender = gender
        self.timetobirth = timetobirth
        self.children = children
    def update(self, poplist):
        self.age = addtime(self.age,(0,1))
        if self.gender == 0 and self.age[0] >= 12:
            self.timetobirth = addtime(self.timetobirth,(0,1))
            if self.timetobirth[1] >=40:
                self.timetobirth = (0,0)
                self.children = self.children + 1
                poplist = poplist + [Person()]
        return poplist

def addtime((years1, weeks1), (years2, weeks2)):
    weeks = weeks1 + weeks2
    years = years1 + years2
    while weeks >= 52:
        years = years + 1
        weeks = weeks - 52
    return (years, weeks)

########
##Initialise data
########
date = (0,0) #start date set at 0 years, 0 weeks
timetobirth = (0,0) #40 weeks for pregnancy

poplist = [Person((18,0),0,(0,40)),Person((18,0),0,(0,40)),Person((18,0),0,(0,40)),
           Person((18,0),1,(0,0)),Person((18,0),1,(0,0)),Person((18,0),1,(0,0))]

for i in poplist:
    print (i.age, i.gender, i.timetobirth)
print ''

########
###Main loop
########
counter = 0
for i in range(5220): #Insert run length in weeks
#    if date[1] == 0 #uncomment for yearly update
    if counter == 520 or if date == (0,0): #Print an update every decade and once at the start
        counter = 0
        print ""
        print "Date ==", date
        print "Population ==", len(poplist)
        age0_11 = 0
        age12_18 = 0
        age19_64 = 0
        age65_99 = 0
        age100_199 = 0
        age200_499 = 0
        age500_999 = 0
        age1000plus = 0

        for i in poplist:
            if i.age[0] <= 11:
                age0_11 = age0_11 + 1
            elif i.age[0] >=12 and i.age[0] <=18:
                age12_18 = age12_18 + 1
            elif i.age[0] >=19 and i.age[0] <= 64:
                age19_64 = age19_64 + 1
            elif i.age[0] >= 65 and i.age[0] <= 99:
                age65_99 = age65_99 + 1
            elif i.age[0] >= 100 and i.age[0] <= 199:
                age100_199 = age100_199 + 1
            elif i.age[0] >= 200 and i.age[0] <= 499:
                age200_499 = age200_499 + 1
            elif i.age[0] >= 500 and i.age[0] <= 999:
                age500_999 = age500_999 + 1
            else:
                age1000plus = age1000plus + 1
               
        print "Age 0 to 11 ==", age0_11
        print "Age 12 to 18 ==", age12_18
        print "Age 19 to 64 ==", age19_64
        print "Age 65 to 99 ==", age65_99
        print "Age 100 to 199 ==", age100_199
        print "Age 200 to 499 ==", age200_499
        print "Age 500 to 999 ==", age500_999
        print "Age 1000+ ==", age1000plus

        children= age0_11 + age12_18
        adults = age19_64 + age65_99 + age100_199 + age200_499 + age200_499 + age500_999 + age1000plus
        try:
            print "Children per adult ==", float(children)/adults
        except:
            print 0
           
    counter = counter + 1
    date = addtime(date, (0,1))                     
    index = -1
    for i in range(len(poplist)):
        index = index + 1
        poplist = poplist[index].update(poplist)


Quote from: output
((18, 0), 0, (0, 40))
((18, 0), 0, (0, 40))
((18, 0), 0, (0, 40))
((18, 0), 1, (0, 0))
((18, 0), 1, (0, 0))
((18, 0), 1, (0, 0))


Date == (10, 0)
Population == 45
Age 0 to 11 == 39
Age 12 to 18 == 0
Age 19 to 64 == 6
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 6.5

Date == (20, 0)
Population == 249
Age 0 to 11 == 210
Age 12 to 18 == 27
Age 19 to 64 == 12
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 19.75

Date == (30, 0)
Population == 1119
Age 0 to 11 == 957
Age 12 to 18 == 111
Age 19 to 64 == 51
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 20.9411764706

Date == (40, 0)
Population == 6195
Age 0 to 11 == 5388
Age 12 to 18 == 519
Age 19 to 64 == 288
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 20.5104166667

Date == (50, 0)
Population == 33456
Age 0 to 11 == 28710
Age 12 to 18 == 3357
Age 19 to 64 == 1383
Age 65 to 99 == 6
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 23.0863930886
Quote
14:10 - Moarskrillex42: She said something about knowing why I wanted to move to Glasgow when she came in. She plopped down on my bed and told me to go ahead and open it for her.

14:11 - Peter5930: So, she thought I was your lover and that I was sending you a box full of sex toys, and that you wanted to move to Glasgow to be with me?

Offline DirtDawg

  • Insensitive Oaf and Earthworm Whisperer
  • Elder
  • Almighty Postwhore
  • *****
  • Posts: 31602
  • Karma: 2544
  • Gender: Male
  • Last rays of the last days
Re: What have you done today?
« Reply #2978 on: April 10, 2008, 03:31:20 PM »

Tried to prepare for a physical inventory of every last fucking thing with no lights in the warehouse.

Seems the "genius" from the electrical utility reset some things in our power system for Green Compliance   and got PM and AM mixed up when the part about "minimal serviceable lighting" came up.

We went dead dark in the warehouse at ten thirty this morning and inventory crunch time is here.

:rofl:
Jimi Hendrix: When the power of love overcomes the love of power the world will know peace. 

Ghandi: Live as if you were to die tomorrow. Learn as if you were to live forever.

The end result of life's daily pain and suffering, trials and failures, tears and laughter, readings and listenings is an accumulation of wisdom in its purest form.

Offline jman

  • Road warrior pimpdaddy of the aspie elite
  • Elder
  • Dedicated Postwhore
  • *****
  • Posts: 2564
  • Karma: 161
Re: What have you done today?
« Reply #2979 on: April 10, 2008, 06:12:04 PM »
I wrote a little program to simulate population growth after the biblical flood.  It assumes the population grows under near-miraculous levels of fertility and zero mortality, with each female producing a baby every 40 weeks once they're 12 years old.  Unfortunately I suck at coding, so it's very inefficient and slows almost to a halt on my machine after about 50 years, when the population is 33456.  Dates are given as (years,weeks), counting from (0,0) at the start of the run.

Code: [Select]
import random
class Person():
    def __init__(self, age=(0,0), gender=random.randrange(0,1), timetobirth=(0,0), children=0):
        self.age = age
        self.gender = gender
        self.timetobirth = timetobirth
        self.children = children
    def update(self, poplist):
        self.age = addtime(self.age,(0,1))
        if self.gender == 0 and self.age[0] >= 12:
            self.timetobirth = addtime(self.timetobirth,(0,1))
            if self.timetobirth[1] >=40:
                self.timetobirth = (0,0)
                self.children = self.children + 1
                poplist = poplist + [Person()]
        return poplist

def addtime((years1, weeks1), (years2, weeks2)):
    weeks = weeks1 + weeks2
    years = years1 + years2
    while weeks >= 52:
        years = years + 1
        weeks = weeks - 52
    return (years, weeks)

########
##Initialise data
########
date = (0,0) #start date set at 0 years, 0 weeks
timetobirth = (0,0) #40 weeks for pregnancy

poplist = [Person((18,0),0,(0,40)),Person((18,0),0,(0,40)),Person((18,0),0,(0,40)),
           Person((18,0),1,(0,0)),Person((18,0),1,(0,0)),Person((18,0),1,(0,0))]

for i in poplist:
    print (i.age, i.gender, i.timetobirth)
print ''

########
###Main loop
########
counter = 0
for i in range(5220): #Insert run length in weeks
#    if date[1] == 0 #uncomment for yearly update
    if counter == 520 or if date == (0,0): #Print an update every decade and once at the start
        counter = 0
        print ""
        print "Date ==", date
        print "Population ==", len(poplist)
        age0_11 = 0
        age12_18 = 0
        age19_64 = 0
        age65_99 = 0
        age100_199 = 0
        age200_499 = 0
        age500_999 = 0
        age1000plus = 0

        for i in poplist:
            if i.age[0] <= 11:
                age0_11 = age0_11 + 1
            elif i.age[0] >=12 and i.age[0] <=18:
                age12_18 = age12_18 + 1
            elif i.age[0] >=19 and i.age[0] <= 64:
                age19_64 = age19_64 + 1
            elif i.age[0] >= 65 and i.age[0] <= 99:
                age65_99 = age65_99 + 1
            elif i.age[0] >= 100 and i.age[0] <= 199:
                age100_199 = age100_199 + 1
            elif i.age[0] >= 200 and i.age[0] <= 499:
                age200_499 = age200_499 + 1
            elif i.age[0] >= 500 and i.age[0] <= 999:
                age500_999 = age500_999 + 1
            else:
                age1000plus = age1000plus + 1
               
        print "Age 0 to 11 ==", age0_11
        print "Age 12 to 18 ==", age12_18
        print "Age 19 to 64 ==", age19_64
        print "Age 65 to 99 ==", age65_99
        print "Age 100 to 199 ==", age100_199
        print "Age 200 to 499 ==", age200_499
        print "Age 500 to 999 ==", age500_999
        print "Age 1000+ ==", age1000plus

        children= age0_11 + age12_18
        adults = age19_64 + age65_99 + age100_199 + age200_499 + age200_499 + age500_999 + age1000plus
        try:
            print "Children per adult ==", float(children)/adults
        except:
            print 0
           
    counter = counter + 1
    date = addtime(date, (0,1))                     
    index = -1
    for i in range(len(poplist)):
        index = index + 1
        poplist = poplist[index].update(poplist)


Quote from: output
((18, 0), 0, (0, 40))
((18, 0), 0, (0, 40))
((18, 0), 0, (0, 40))
((18, 0), 1, (0, 0))
((18, 0), 1, (0, 0))
((18, 0), 1, (0, 0))


Date == (10, 0)
Population == 45
Age 0 to 11 == 39
Age 12 to 18 == 0
Age 19 to 64 == 6
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 6.5

Date == (20, 0)
Population == 249
Age 0 to 11 == 210
Age 12 to 18 == 27
Age 19 to 64 == 12
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 19.75

Date == (30, 0)
Population == 1119
Age 0 to 11 == 957
Age 12 to 18 == 111
Age 19 to 64 == 51
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 20.9411764706

Date == (40, 0)
Population == 6195
Age 0 to 11 == 5388
Age 12 to 18 == 519
Age 19 to 64 == 288
Age 65 to 99 == 0
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 20.5104166667

Date == (50, 0)
Population == 33456
Age 0 to 11 == 28710
Age 12 to 18 == 3357
Age 19 to 64 == 1383
Age 65 to 99 == 6
Age 100 to 199 == 0
Age 200 to 499 == 0
Age 500 to 999 == 0
Age 1000+ == 0
Children per adult == 23.0863930886


Python?

Offline Parts

  • The Mad
  • Caretaker Admin
  • Almighty Postwhore
  • *****
  • Posts: 37470
  • Karma: 3062
  • Gender: Female
  • Who are you?
Re: What have you done today?
« Reply #2980 on: April 10, 2008, 11:43:46 PM »
Worked in the science classroom got firestop spray in my hair
"Eat it up.  Wear it out.  Make it do or do without." 

'People who say it cannot be done should not interrupt those who are doing it.'
George Bernard Shaw

Sophgay

  • Guest
Re: What have you done today?
« Reply #2981 on: April 11, 2008, 07:28:51 PM »
just noticed a thing i posted about my OCD on another site has been categorised under "sex confessions" and i don't know why

Offline Parts

  • The Mad
  • Caretaker Admin
  • Almighty Postwhore
  • *****
  • Posts: 37470
  • Karma: 3062
  • Gender: Female
  • Who are you?
Re: What have you done today?
« Reply #2982 on: April 11, 2008, 07:32:08 PM »
just noticed a thing i posted about my OCD on another site has been categorised under "sex confessions" and i don't know why

Oooh you dirty girl :laugh:
"Eat it up.  Wear it out.  Make it do or do without." 

'People who say it cannot be done should not interrupt those who are doing it.'
George Bernard Shaw

Offline Leto729

  • The God Emperor of the Aspie Elite
  • Elder
  • Maniacal Postwhore
  • *****
  • Posts: 14008
  • Karma: 596
  • Gender: Male
  • Shai-Hulud
Re: What have you done today?
« Reply #2983 on: April 11, 2008, 07:38:22 PM »
just noticed a thing i posted about my OCD on another site has been categorised under "sex confessions" and i don't know why

Oooh you dirty girl :laugh:
  :zoinks:
Guardian of the Empire

Sophgay

  • Guest
Re: What have you done today?
« Reply #2984 on: April 11, 2008, 07:41:54 PM »
it actually had nothing to do with sex at all :laugh:

maybe i put it in there myself, clicking on the wrong thing or something

strange anyway lol