Length of list (estimate).
498969
def _len_list(obj):
    '''
    '''
    n = len(obj)
     # estimate over-allocation
    if n > 8:
       n += 6 + (n >> 3)
    elif n:
       n += 4
    return n
1229940
def lengths( self ):
        
        return( np.array( [ math.sqrt( sum( row**2 ) ) for row in self.matrix ] ) )
918894
def reduce_list_size(li):
    
    # sys.getsizeof is nearly useless. All our data is stringable so rather
    # use that as a measure of size.
    size = len(repr(li))
    keep = li
    toss = []
    n = len(li)
    decrement_by = max(n / 10, 10)
    while (size >= MAX_SIZE) and (n > 0):
        n -= decrement_by
        toss = li[:-n]
        keep = li[-n:]
        size = len(repr(keep))
    return keep, toss
221820
private static int maxLength(List<String> coll) {
		int max = 0;
		for (String e : coll) {
			int length = e.length();
			if (length > max) {
				max = length;
			}
		}
		return max;
	}
1277011
def geometricmean(inlist):
    
    mult = 1.0
    one_over_n = 1.0 / len(inlist)
    for item in inlist:
        mult = mult * pow(item, one_over_n)
    return mult
60121
def length(self):
        """"""
        length = self.parse['attributes'].get('Shape_Length')
        if length:
            return round(float(length))
701797
function (list) {
            var batch_size = 100,
                cutoff;

            if (list.length >= batch_size) {
                // If we have more clients than our batch size, call ourself with the next batch
                setTimeout(function () {
                    sendCommandBatch(list.slice(batch_size));
                }, 200);

                cutoff = batch_size;

            } else {
                cutoff = list.length;
            }

            list.slice(0, cutoff).forEach(function (client) {
                if (!client.disposed) {
                    client.sendKiwiCommand(command, data);
                }
            });

            if (cutoff === list.length && typeof callback === 'function') {
                callback();
            }
        }
865111
def length(cls, dataset):
        
        return np.product([len(d.points) for d in dataset.data.coords(dim_coords=True)], dtype=np.intp)
696548
def p_pvar_inst_list(self, p):
        ''''''
        if len(p) == 3:
            p[1].append(p[2])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
394561
def length(self, t0=0, t1=1, error=None, min_depth=None):
        """"""
        return abs(self.end - self.start)*(t1-t0)
936190
def length(self, rows=None):
    
    rows = tf.range(self._capacity) if rows is None else rows
    return tf.gather(self._length, rows)
53723
def _list_rjust(self, L, width, fillchar=0):
        ''''''
        length = max(0, width - len(L))
        return [fillchar]*length + L
631675
public static int getSize (Object[] list)
    {
        int size = 0;
        for (int ii = 0, nn = (list == null) ? 0 : list.length; ii < nn; ii++) {
            if (list[ii] != null) {
                size++;
            }
        }
        return size;
    }
587906
def length(self):
        
        length = float(sum(i.length(self.vertices)
                           for i in self.entities))
        return length
338822
def equalize_list_lengths(a,b):
    
    if not _s.fun.is_iterable(a): a = [a]
    a = list(a)
    while len(a)>len(b): a.pop(-1)
    while len(a)<len(b): a.append(a[-1])
    return a
569588
def get_length(self):
        
        length = 0
        for i, point in enumerate(self.points):
            if i != 0:
                length += point.distance(self.points[i - 1])
        return length
435674
def _check_list_len(row, length):
        
        if len(row) != length:
            raise Exception(
                "row length does not match expected length of " +
                str(length) + "\nrow: " + str(row))