Nice size.

    :param size: the size.
    :type size: int
    :return: a nicely printed size.
    :rtype: string
13094
def nice_size(size):
    
    unit = 'B'
    if size > 1024:
        size /= 1024.0
        unit = 'KB'
        if size > 1024:
            size /= 1024.0
            unit = 'MB'
            if size > 1024:
                size /= 1024.0
                unit = 'GB'
    return '%s %s' % (nice_number(size, max_ndigits_after_dot=2), unit)
1178665
def calculate_size(name, count):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    return data_size
280847
def human_size(size_bytes, precision=0):
    
    if size_bytes == 1:
        # because I really hate unnecessary plurals
        return "1 byte"

    suffixes_table = [('bytes',0),('KB',0),('MB',1),('GB',2),('TB',2), ('PB',2)]

    num = float(size_bytes)
    for suffix, precision in suffixes_table:
        if num < 1024.0:
            break
        num /= 1024.0

    if precision == 0:
        formatted_size = "%d" % num
    else:
        formatted_size = str(round(num, ndigits=precision))

    return "%s %s" % (formatted_size, suffix)
878857
def size(ctx, dataset, kwargs):
    ""

    kwargs = parse_kwargs(kwargs)
    (print)(data(dataset, **ctx.obj).get(**kwargs).complete_set.size)
1369790
def sizeof(s):
    
    if hasattr(s, '_size_'):
        return s._size_

    elif isinstance(s, bytes):
        return len(s)

    raise ValueError(s)
816000
public void printVectorSize(VectorSize size) {
        format(Locale.ENGLISH, "%10d %19d%n", size.size(), size.numEntries());
    }
1034665
def Size(self):
        

        return s.uint8 + GetVarSize(self.Key) + GetVarSize(self.Field) + GetVarSize(self.Value)
202882
def maybe_set_size(self, min_itemsize=None):
        
        if _ensure_decoded(self.kind) == 'string':

            if isinstance(min_itemsize, dict):
                min_itemsize = min_itemsize.get(self.name)

            if min_itemsize is not None and self.typ.itemsize < min_itemsize:
                self.typ = _tables(
                ).StringCol(itemsize=min_itemsize, pos=self.pos)
901786
def resize(self, size):
		
		if size < len(self):
			raise ValueError("Value is out of bound. Array can't be shrinked")
		current_size = self.__size
		for i in range(size - current_size):
			self.__array.append(WBinArray(0, self.__class__.byte_size))
		self.__size = size
648724
def resize(self, height, width):
        
        return self.client.api.resize(self.id, height, width)
867538
def get_size(self):
        
        raise NotImplementedError("%s not implemented for %s" % (self.get_size.__func__.__name__,
                                                                 self.__class__.__name__))
890643
def parse_size(size_raw):
    
    try:
        width_str, height_str = size_raw.lower().split('x')
    except AttributeError:
        size = None
    except ValueError:
        size = None
    else:
        try:
            width = int(width_str)
            assert width > 0
        except (ValueError, AssertionError):
            width = None
        try:
            height = int(height_str)
            assert height > 0
        except (ValueError, AssertionError):
            height = None
        size = width, height
        if not all(size):
            size = None
    return size
24786
def readable_size(C, bytes, suffix='B', decimals=1, sep='\u00a0'):
        """"""
        if bytes is None:
            return
        size = float(bytes)
        for unit in C.SIZE_UNITS:
            if abs(size) < 1024 or unit == C.SIZE_UNITS[-1]:
                return "{size:.{decimals}f}{sep}{unit}{suffix}".format(
                    size=size,
                    unit=unit,
                    suffix=suffix,
                    sep=sep,
                    decimals=C.SIZE_UNITS.index(unit) > 0 and decimals or 0,  # B with no decimal
                )
            size /= 1024
546624
def human_size(size):
    
    if isinstance(size, string_types):
        size = int(size, 10)

    if size < 0:
        return "-??? bytes"

    if size < 1024:
        return "%4d bytes" % size
    for unit in ("KiB", "MiB", "GiB"):
        size /= 1024.0
        if size < 1024:
            return "%6.1f %s" % (size, unit)

    return "%6.1f GiB" % size
199244
def chunk(self, size):
        
        chunks = self._chunk(size)

        return self.__class__(list(map(self.__class__, chunks)))
476697
def resize(self, size):
        
        if isinstance(self._data, Stream):
            self._data.resize(size)
1150172
def sizeof(self, fields):
        

        if type(fields) in [tuple, list]:
            str = ','.join(fields)
        else:
            str = fields
        n = _C.VSsizeof(self._id, str)
        _checkErr('sizeof', n, "cannot retrieve field sizes")
        return n