Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/core/sequence.py   cogent(Download)
from cogent.util.transform import keep_chars, for_seq, per_shortest, \
    per_longest
from cogent.util.misc import DistanceFromMatrix
from cogent.core.genetic_code import DEFAULT as DEFAULT_GENETIC_CODE, \
    GeneticCodes
        sequences are identical.
        """
        return self.distance(other, DistanceFromMatrix(matrix))
 
    def fracSame(self, other):
        sequences are identical.
        """
        return self.distance(other, DistanceFromMatrix(matrix))
 
    def shuffle(self):

src/p/y/pycogent-HEAD/cogent/core/sequence.py   pycogent(Download)
from cogent.util.transform import keep_chars, for_seq, per_shortest, \
    per_longest
from cogent.util.misc import DistanceFromMatrix
from cogent.core.genetic_code import DEFAULT as DEFAULT_GENETIC_CODE, \
    GeneticCodes
        sequences are identical.
        """
        return self.distance(other, DistanceFromMatrix(matrix))
 
    def fracSame(self, other):
        sequences are identical.
        """
        return self.distance(other, DistanceFromMatrix(matrix))
 
    def shuffle(self):

src/c/o/cogent-1.5.3/tests/test_util/test_misc.py   cogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
    def test_DistanceFromMatrix(self):
        """DistanceFromMatrix should return correct elements"""
        m = {'a':{'3':4, 6:1}, 'b':{'3':5,'6':2}}
        d = DistanceFromMatrix(m)
        self.assertEqual(d('a','3'), 4)

src/p/y/pycogent-HEAD/tests/test_util/test_misc.py   pycogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
    def test_DistanceFromMatrix(self):
        """DistanceFromMatrix should return correct elements"""
        m = {'a':{'3':4, 6:1}, 'b':{'3':5,'6':2}}
        d = DistanceFromMatrix(m)
        self.assertEqual(d('a','3'), 4)