List all `kadastrale afdelingen` in Flanders.

        :param integer sort: Field to sort on.
        :rtype: A :class:`list` of :class:`Afdeling`.
429714
def list_kadastrale_afdelingen(self):
        '''
        
        '''

        def creator():
            gemeentes = self.list_gemeenten()
            res = []
            for g in gemeentes:
                res += self.list_kadastrale_afdelingen_by_gemeente(g)
            return res

        if self.caches['permanent'].is_configured:
            key = 'list_afdelingen_rest'
            afdelingen = self.caches['permanent'].get_or_create(key, creator)
        else:
            afdelingen = creator()
        return afdelingen
41505
def natural_sorted(iterable):
    
    def sortkey(x):
        return [(int(c) if c.isdigit() else c) for c in re.split(numbers, x)]

    numbers = re.compile(r'(\d+)')
    return sorted(iterable, key=sortkey)
883811
def _list_fields(self):
        
        opts = {'model': self.__proxy__, 'model_name': self.__name__}
        response = _turicreate.extensions._nearest_neighbors.list_fields(opts)

        return sorted(response.keys())
179177
def sort_index(self):
        
        sort = sorted_list_indexes(self._index)
        # sort index
        self._index = blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]
        # sort data
        self._data = blist([self._data[x] for x in sort]) if self._blist else [self._data[x] for x in sort]
1142235
def searchsorted(self, value, side="left", sorter=None):
        

        # We are much more performant if the searched
        # indexer is the same type as the array.
        #
        # This doesn't matter for int64, but DOES
        # matter for smaller int dtypes.
        #
        # xref: https://github.com/numpy/numpy/issues/5370
        try:
            value = self.dtype.type(value)
        except ValueError:
            pass

        return super().searchsorted(value, side=side, sorter=sorter)
553443
def all(cls, sort=None, limit=None):
        
        return cls.where(sort=sort, limit=limit)
623741
public final void mSORT() throws RecognitionException {
		try {
			int _type = SORT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:622:6: ( ( 'SORT' ) )
			// druidG.g:622:8: ( 'SORT' )
			{
			// druidG.g:622:8: ( 'SORT' )
			// druidG.g:622:9: 'SORT'
			{
			match("SORT"); 

			}

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
327665
function createKVSortedIndex(value, allowAsterisk) {
        var index = kv2List(value, 1, allowAsterisk);
        index.sort(descSorterByKOrName);
        return index;
    }
524735
def order_by(self, *args):
        
        if self._solr_locked:
            raise Exception("Query already executed, no changes can be made."
                            "%s %s" % (self._solr_query, self._solr_params)
                            )

        for arg in args:
            if arg.startswith('-'):
                self._solr_params['sort'][arg[1:]] = 'desc'
            else:
                self._solr_params['sort'][arg] = 'asc'
1311916
def sort_field(self, field_name, direction, field_vals=None):
        
        field_name = self._normalize_field_name(field_name)
        if direction > 0:
            direction = 1
        elif direction < 0:
            direction = -1
        else:
            raise ValueError("direction {} is undefined".format(direction))

        self.fields_sort.append(field_name, [direction, field_name, list(field_vals) if field_vals else field_vals])
        return self
402378
def sorts_query(sortables):
        

        stmts = []

        for sortable in sortables:
            if sortable.desc:
                stmts.append('{} DESC'.format(sortable.field))
            else:
                stmts.append('{} ASC'.format(sortable.field))

        return ' ORDER BY {}'.format(', '.join(stmts))
964946
def sort_set(input, **params):
    
    PARAM_SORT_FIELD = 'sort.field'
    PARAM_SORT_ORDER = 'sort.order'

    df = pd.DataFrame.from_records(input)
    sort_field = params.get(PARAM_SORT_FIELD)
    sort_order = params.get(PARAM_SORT_ORDER) if PARAM_SORT_ORDER in params else None
    if sort_order:
        df[sort_field] = df[sort_field].astype('category')
        df[sort_field].cat.set_categories(sort_order, inplace=True)
    df.sort_values(by=sort_field, inplace=True)
    return Converter.df2list(df)
267353
def list_gemeenten(self, gewest=2, sort=1):
        '''
        
        '''
        try:
            gewest_id = gewest.id
        except AttributeError:
            gewest_id = gewest
            gewest = self.get_gewest_by_id(gewest_id)
        gewest.clear_gateway()

        def creator():
            res = crab_gateway_request(
                self.client, 'ListGemeentenByGewestId', gewest_id, sort
            )
            return[
                Gemeente(
                    r.GemeenteId,
                    r.GemeenteNaam,
                    r.NISGemeenteCode,
                    gewest
                )for r in res.GemeenteItem if r.TaalCode == r.TaalCodeGemeenteNaam
            ]
        if self.caches['permanent'].is_configured:
            key = 'ListGemeentenByGewestId#%s#%s' % (gewest_id, sort)
            gemeenten = self.caches['permanent'].get_or_create(key, creator)
        else:
            gemeenten = creator()
        for g in gemeenten:
            g.set_gateway(self)
        return gemeenten
839936
def sort_index(self):
        
        sort = sorted_list_indexes(self._index)
        # sort index
        self._index = blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]
        # each column
        for c in range(len(self._data)):
            self._data[c] = blist([self._data[c][i] for i in sort]) if self._blist else [self._data[c][i] for i in sort]
1122855
def sort(self):
        
        self._matches.sort_values(
            by=[constants.SIZE_FIELDNAME, constants.NGRAM_FIELDNAME,
                constants.COUNT_FIELDNAME, constants.LABEL_FIELDNAME,
                constants.WORK_FIELDNAME, constants.SIGLUM_FIELDNAME],
            ascending=[False, True, False, True, True, True], inplace=True)
50316
public void sortbyselection(List<String> sortFlds, List<Integer> sortDirs) {
		moveToId(-1);
		int i = 0;
		while (super.next()) {
			int minId = findSmallestFrom(i, sortFlds, sortDirs);
			if (minId != i) {
				swapRecords(i, minId);
			}
			moveToId(i);
			i++;
		}
	}
322195
def build_sort(self, **kwargs):
        '''  '''
        sort = []
        order = kwargs.get('order_by', None)
        if order:
            if type(order) is list:
                order = order[0]
            if order[:1] == '-':
                sort.append((order[1:], -1))
            else:
                sort.append((order, 1))
        return sort