[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: very simple Genetic Algorithm completed

Matthew_WARREN

2/1/2008 4:13:00 PM








On Feb 1, 9:11 am, Matthew_WAR...@bnpparibas.com wrote:
>
> > 0. Tack this bit onto the end of quickga.py, and you wont have to
> > write a separate routine to import quickga and invoke evolve():
> >
> > >     if __name__ == "__main__":
> > >         evolve()
> >
> > I hear you, but something I dont tend to do as I use pythons
interactive
> > prompt a lot, and I like things not autorunning when I import them. I
> > normally add it in at the end of writing something.
> >
>
> Not to fear! The test 'if __name__ == "__main__":' guards against
> running this code when the module is imported. The following code is
> run *only* if the module is invoked directly, as in "python
> quickga.py".
>
> This way, test or demonstration code can be included right with your
> library module, and it wont get run when the module is imported. It
> really is a good idiom to learn, whether you use the interactive
> prompt a lot or not.

Heh, that's what I get for assuming it did what I thought and ignoring
it...

Matt.




This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
Do not print this message unless it is necessary,
consider the environment.

---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire,
pensez a l'environnement.
2 Answers

Ruud66

12/18/2012 6:28:00 PM

0

On Dec 18, 5:10 pm, "Eddie Haskell" <dhd...@sqpjf.com> wrote:
> "Ruut66" <ruu...@gmail.com> wrote in message
>
> news:53a74fb8-83b2-4cfb-98ca-d538588adcef@r14g2000vbd.googlegroups.com...
> On Dec 18, 3:59 pm, Johnny Asia <johnnyasia2...@yahoo.com> wrote:
>
> > "I intend to close Guantanamo, and I will follow through on that" A
> > promise by Obozo on CBS 60 Minutes on November 16, 2008.
> > Decdmber 18, 2012: Gitmo Is Still Open And Going Strong
> > Hey, Wingers! Remember This?
> > Closure Of Guantanamo Detention
> > Facilities -http://www.whitehouse.gov/the_press_office/ClosureOfGuantan......
>
> > Sure we remember. The disposition matrix is not yet ready.
> >http://en.wikipedia.org/wiki/Disposit...
> > Wayne LaPierre just got put on for rendition before his ass gets sued
> > for terrorist activity.
>
> Oh, look. Now the sick fucks are out in the open with their hatred of the
> constitution.
>

The disposition matrix is very constitutional. There's no real
difference between Wayne and Osama.

R

Google

12/18/2012 6:40:00 PM

0


"Ruut66" <ruut66@gmail.com> wrote in message
news:8b069517-d5b4-47a1-bedf-cdc19ad84f32@a6g2000vbh.googlegroups.com...
On Dec 18, 5:10 pm, "Eddie Haskell" <dhd...@sqpjf.com> wrote:
> "Ruut66" <ruu...@gmail.com> wrote in message
>
> news:53a74fb8-83b2-4cfb-98ca-d538588adcef@r14g2000vbd.googlegroups.com...
> On Dec 18, 3:59 pm, Johnny Asia <johnnyasia2...@yahoo.com> wrote:
>
> > "I intend to close Guantanamo, and I will follow through on that" A
> > promise by Obozo on CBS 60 Minutes on November 16, 2008.
> > Decdmber 18, 2012: Gitmo Is Still Open And Going Strong
> > Hey, Wingers! Remember This?
> > Closure Of Guantanamo Detention
> > Facilities -http://www.whitehouse.gov/the_press_office/ClosureOfGuantan......
>
> > Sure we remember. The disposition matrix is not yet ready.
> >http://en.wikipedia.org/wiki/Disposit...
> > Wayne LaPierre just got put on for rendition before his ass gets sued
> > for terrorist activity.
>
> Oh, look. Now the sick fucks are out in the open with their hatred of the
> constitution.

> The disposition matrix is very constitutional. There's no real
> difference between Wayne and Osama.

I bet you're a member of the ACLU, aren't you, you sick bastard?

ACLU Killed Connecticut Forcible Institutionalization Law That Might Have
Prevented Killings

While we're having that whole conversation about wadding up the Bill of
Rights and throwing it into the trash, why don't we have a brief
conversation about what might have actually prevented the shooting by
dealing with the mental illness of the shooter.

Let's talk ACLU instead of NRA.

Connecticut is one of only SIX states in the U.S. that doesn't have a type
of "assisted outpatient treatment" (AOT) law (sometimes referred to as
"involuntary outpatient treatment"). There's no one standard for these types
of laws, but (roughly speaking) these are laws that allow for people with
mental illness to be forcibly treated BEFORE they commit a serious crime.

Whereas previous legal standards held that the mentally ill cannot be
institutionalized or medicated until they harm someone or themselves, or
until they express an immediate intent to do so, AOT laws (again, roughly
speaking) allow for preventative institutionalization or forced medication
AOT laws vary state-by-state, and often bear the name of a person murdered
by an untreated mentally ill person ("Kendra's Law" in New York, "Laura's
Law" in California, etc.).

Earlier this year, Connecticut considered passing an AOT law (and a weak
one, at that), and it failed, due to protests from "civil liberties" groups.
But thankfully the ACLU won and over two dozen children were murdered. And
there will be of course no cries that the ACLU, rather than the NRA, should
be held accountable for a dangerous lunatic being on the loose.

http://frontpagemag.com/2012/dgreenfield/aclu-killed-connecticut-forcible-institutionalization-law-that-might-have-prevented...

-Eddie Haskell