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/p/e/petl-HEAD/src/petl/transform.py   petl(Download)
        # initialise the first chunk
        rows = list(islice(it, 0, self.buffersize))
        rows.sort(key=getkey, reverse=reverse)
 
        # have we exhausted the source iterator?
                # grab the next chunk
                rows = list(islice(it, 0, self.buffersize))
                rows.sort(key=getkey, reverse=reverse)
 
            if self.cache:
    f2vals = set(itervalues(source, f2)) # TODO sampling
    f2vals = list(f2vals)
    f2vals.sort()
    outflds = [f1]
    outflds.extend(f2vals)

src/k/a/Kamaelia-0.6.0/Examples/SimpleGraphicalApps/Slideshows/topology_slideshow.py   Kamaelia(Download)
        files.append(os.path.join(path,fname))
 
files.sort()
 
Graphline(

src/k/a/Kamaelia-0.6.0/Examples/SimpleGraphicalApps/Slideshows/slideshow.py   Kamaelia(Download)
        files.append(os.path.join(path,fname))
 
files.sort()
 
Graphline(

src/t/e/TEES-HEAD/ExampleWriters/EntityExampleWriter.py   TEES(Download)
            types.add(entity.get("type"))
        types = list(types)
        types.sort()
        typeString = ""
        for type in types:

src/t/e/TEES-HEAD/ExampleBuilders/ModifierExampleBuilder.py   TEES(Download)
            types.add(entity.get("type"))
        types = list(types)
        types.sort()
        typeString = ""
        for type in types:

src/m/r/mrv-1-1.0.3-stable/mrv/maya/nt/base.py   MRV(Download)
 
		# long paths first
		dagnodes.sort(key = lambda n: len(str(n).split('|')), reverse = True)
 
		# use all of these in order

src/i/n/input-lib-HEAD/packages/dumbo/dumbo/util.py   input-lib(Download)
def sorted(iterable, piecesize=None, key=None, reverse=False):
    if not piecesize:
        values = list(iterable)
        values.sort(key=key, reverse=reverse)
        for value in values:
        while True:
            values = list(sequence.next() for i in xrange(piecesize))
            values.sort(key=key, reverse=reverse)
            for value in values:
                yield value

src/d/j/django-angular-HEAD/examples/server/tests/test_forms.py   django-angular(Download)
    def test_initial_data(self):
        initial_data = self.unbound_form.get_initial_data()
        initial_keys = list(initial_data.keys())
        initial_keys.sort()
        valid_keys = list(self.valid_data.keys())
        valid_keys.sort()
        self.assertEqual(initial_keys, valid_keys)
        initial_keys = list(initial_data['sub1'].keys())
        initial_keys.sort()
        initial_keys.sort()
        valid_keys = list(self.valid_data['sub1'].keys())
        valid_keys.sort()
        self.assertEqual(initial_keys, valid_keys)
 

src/h/o/Hoboken-HEAD/hoboken/objects/mixins/accept.py   Hoboken(Download)
    def __init__(self, values=None):
        vals = list(values or ())
        vals.sort(key=lambda v: (v[1], v[0]), reverse=True)
        list.__init__(self, vals)
 

src/c/l/CleanAdminDjango-1.5.3.1/django/contrib/gis/geos/mutable_list.py   CleanAdminDjango(Download)
    def sort(self, cmp=None, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            if cmp is not None:
                temp.sort(cmp=cmp, reverse=reverse)
                temp.sort(cmp=cmp, reverse=reverse)
            else:
                temp.sort(reverse=reverse)
            self[:] = temp
 

Previous  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17  Next