Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(64)  |  Call(52)  |  Derive(0)  |  Import(12)

src/b/i/biopython-1.63/Bio/GA/Mutation/General.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
 
 

src/b/i/biopython-1.63/Bio/GA/Crossover/General.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
 
 

src/b/i/biopython-HEAD/Bio/GA/Mutation/General.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
 
 

src/b/i/biopython-HEAD/Bio/GA/Crossover/General.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
 
 

src/b/i/biopython-1.63/Tests/test_GAOrganism.py   biopython(Download)
    def setUp(self):
        self.alphabet = TestAlphabet()
        self.genome = MutableSeq("1234", self.alphabet)
        self.organism = Organism.Organism(self.genome, fitness_calculator)
 
    def test_organism_basic(self):
        """Exercise basic organism functionality.
        """
        same_genome = MutableSeq("1234", self.alphabet)
        same_organism = Organism.Organism(same_genome, fitness_calculator)
 
        dif_genome = MutableSeq("1111", self.alphabet)
        dif_organism = Organism.Organism(dif_genome, fitness_calculator)
 
        assert str(self.organism) == str(same_organism), \
        # make sure not supplying fitness works
        try:
            new_org = Organism.Organism(genome, fitness_calc)
            raise AssertionError("Did not calculate fitness when expected.")
        except ValueError:
            pass
 
        # make sure supplying fitness works
        new_org = Organism.Organism(genome, fitness_calc, 50)

src/b/i/biopython-HEAD/Tests/test_GAOrganism.py   biopython(Download)
    def setUp(self):
        self.alphabet = TestAlphabet()
        self.genome = MutableSeq("1234", self.alphabet)
        self.organism = Organism.Organism(self.genome, fitness_calculator)
 
    def test_organism_basic(self):
        """Exercise basic organism functionality.
        """
        same_genome = MutableSeq("1234", self.alphabet)
        same_organism = Organism.Organism(same_genome, fitness_calculator)
 
        dif_genome = MutableSeq("1111", self.alphabet)
        dif_organism = Organism.Organism(dif_genome, fitness_calculator)
 
        assert str(self.organism) == str(same_organism), \
        # make sure not supplying fitness works
        try:
            new_org = Organism.Organism(genome, fitness_calc)
            raise AssertionError("Did not calculate fitness when expected.")
        except ValueError:
            pass
 
        # make sure supplying fitness works
        new_org = Organism.Organism(genome, fitness_calc, 50)

src/b/i/biopython-1.63/Tests/test_GACrossover.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
from Bio.GA.Crossover.General import SafeFitnessCrossover
from Bio.GA.Crossover.GeneralPoint import GeneralPointCrossover
    def setUp(self):
        self.alphabet = TestAlphabet()
        genome_1 = MutableSeq("11111", self.alphabet)
        self.org_1 = Organism(genome_1, test_fitness)
 
        genome_2 = MutableSeq("22222", self.alphabet)
        self.org_2 = Organism(genome_2, test_fitness)
    def setUp(self):
        self.alphabet = TestAlphabet()
        genome_1 = MutableSeq("11111111", self.alphabet)
        self.org_1 = Organism(genome_1, test_fitness)
 
        genome_2 = MutableSeq("22222222", self.alphabet)
        self.org_2 = Organism(genome_2, test_fitness)

src/b/i/biopython-HEAD/Tests/test_GACrossover.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
from Bio.GA.Crossover.General import SafeFitnessCrossover
from Bio.GA.Crossover.GeneralPoint import GeneralPointCrossover
    def setUp(self):
        self.alphabet = TestAlphabet()
        genome_1 = MutableSeq("11111", self.alphabet)
        self.org_1 = Organism(genome_1, test_fitness)
 
        genome_2 = MutableSeq("22222", self.alphabet)
        self.org_2 = Organism(genome_2, test_fitness)
    def setUp(self):
        self.alphabet = TestAlphabet()
        genome_1 = MutableSeq("11111111", self.alphabet)
        self.org_1 = Organism(genome_1, test_fitness)
 
        genome_2 = MutableSeq("22222222", self.alphabet)
        self.org_2 = Organism(genome_2, test_fitness)

src/b/i/biopython-1.63/Tests/test_GASelection.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
from Bio.GA.Selection.Diversity import DiversitySelection
from Bio.GA.Selection.Tournament import TournamentSelection
def random_organism():
    """Generate a random organism.
    """
    genome = random_genome()
    return Organism(genome, test_fitness)
    def test_select_best(self):
        """Ensure selection of a best organism in a population of 2.
        """
        worst_genome = MutableSeq("0", TestAlphabet())
        worst_org = Organism(worst_genome, test_fitness)
 
        better_genome = MutableSeq("1", TestAlphabet())
        better_org = Organism(better_genome, test_fitness)

src/b/i/biopython-HEAD/Tests/test_GASelection.py   biopython(Download)
 
# local stuff
from Bio.GA.Organism import Organism
from Bio.GA.Selection.Diversity import DiversitySelection
from Bio.GA.Selection.Tournament import TournamentSelection
def random_organism():
    """Generate a random organism.
    """
    genome = random_genome()
    return Organism(genome, test_fitness)
    def test_select_best(self):
        """Ensure selection of a best organism in a population of 2.
        """
        worst_genome = MutableSeq("0", TestAlphabet())
        worst_org = Organism(worst_genome, test_fitness)
 
        better_genome = MutableSeq("1", TestAlphabet())
        better_org = Organism(better_genome, test_fitness)

  1 | 2  Next