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

All Samples(7646)  |  Call(7646)  |  Derive(0)  |  Import(0)
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1

src/e/c/ecspy-1.1/examples/infinite_monkey_theorem.py   ecspy(Download)
def observer(population, num_generations, num_evaluations, args):
    if num_generations % 100 == 0:
        population = list(population)
        population.sort(reverse=True)
        best_fit = population[0].candidate

src/g/r/gr-0.5.0/doc/ext/examples.py   gr(Download)
def main():
 
    # Get examples and sort
    examples = list(get_example_filenames(EXAMPLES_DIR))
    examples.sort(key=lambda x: x[1])

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/urls.py   gae-twitter-oauth-example(Download)
    if sort:
        iterable = list(iterable)
        iterable.sort(key=key)
    tmp = []
    for key, value in iterable:

src/d/a/datacommons-HEAD/dcentity/tools/management/commands/entity_sample.py   datacommons(Download)
                    """ % ("%s", step_limit, step_offset, amount_divisions),
                    [etype]))
                rqs.sort(key=lambda e: e.total)
                print i, etype, step_limit, step_offset, count, len(rqs)
                samples += rqs

src/s/a/sage-HEAD/src/sage/structure/sequence.py   sage(Download)
        """
        self._require_mutable()
        list.sort(self, cmp=cmp, key=key, reverse=reverse)
 
    def __hash__(self):

src/o/h/oh-mainline-HEAD/vendor/packages/Django/django/contrib/gis/geos/mutable_list.py   oh-mainline(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Django-1.2.3/django/contrib/gis/geos/mutable_list.py   hortonworks-sandbox(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

src/h/u/hue-HEAD/desktop/core/ext-py/Django-1.4.5/django/contrib/gis/geos/mutable_list.py   hue(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

src/a/p/appscale-HEAD/AppServer/lib/django-1.4/django/contrib/gis/geos/mutable_list.py   appscale(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

src/a/p/appscale-HEAD/AppServer/lib/django-1.3/django/contrib/gis/geos/mutable_list.py   appscale(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

Previous  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next