The default implementation which tries to select a reasonable
        amount of padding and which might change in future versions.

        Returns:
            int: Amount of padding after saving
966359
def get_default_padding(self):
        

        high = 1024 * 10 + self.size // 100  # 10 KiB + 1% of trailing data
        low = 1024 + self.size // 1000  # 1 KiB + 0.1% of trailing data

        if self.padding >= 0:
            # enough padding left
            if self.padding > high:
                # padding too large, reduce
                return low
            # just use existing padding as is
            return self.padding
        else:
            # not enough padding, add some
            return low
115692
def getUpperDetectionLimit(self):
        
        udl = self.getField('UpperDetectionLimit').get(self)
        try:
            return float(udl)
        except ValueError:
            return 0
1113060
def compute_width(self):
        """"""
        if not self._enabled:
            return 0
        digits = 1
        maxb = max(1, self.editor.blockCount())
        while maxb >= 10:
            maxb /= 10
            digits += 1
        if self._margin:
            margin = 3+self.editor.fontMetrics().width('9'*digits)
        else:
            margin = 0
        return margin+self.get_markers_margin()
348110
def _pad_data(self, max_len=None):
        
        if not max_len:
            max_len = max([len(x) for x in self._data])
        for _, col in enumerate(self._data):
            col.extend([None] * (max_len - len(col)))
254327
def _padleft(width, s, has_invisible=True):
    

    def impl(val):
        iwidth = width + len(val) - len(_strip_invisible(val)) if has_invisible else width
        fmt = "{0:>%ds}" % iwidth
        return fmt.format(val)

    num_lines = s.splitlines()
    return len(num_lines) > 1 and '\n'.join(map(impl, num_lines)) or impl(s)
863982
def get_padding_lengths(self) -> Dict[str, int]:
        
        # Our basic outline: we will iterate over `TokenIndexers`, and aggregate lengths over tokens
        # for each indexer separately.  Then we will combine the results for each indexer into a single
        # dictionary, resolving any (unlikely) key conflicts by taking a max.
        lengths = []
        if self._indexed_tokens is None:
            raise ConfigurationError("You must call .index(vocabulary) on a "
                                     "field before determining padding lengths.")

        # Each indexer can return a different sequence length, and for indexers that return
        # multiple arrays each can have a different length.  We'll keep track of them here.
        for indexer_name, indexer in self._token_indexers.items():
            indexer_lengths = {}

            for indexed_tokens_key in self._indexer_name_to_indexed_token[indexer_name]:
                # This is a list of dicts, one for each token in the field.
                token_lengths = [indexer.get_padding_lengths(token)
                                 for token in self._indexed_tokens[indexed_tokens_key]]
            if not token_lengths:
                # This is a padding edge case and occurs when we want to pad a ListField of
                # TextFields. In order to pad the list field, we need to be able to have an
                # _empty_ TextField, but if this is the case, token_lengths will be an empty
                # list, so we add the default empty padding dictionary to the list instead.
                token_lengths = [{}]
            # Iterate over the keys and find the maximum token length.
            # It's fine to iterate over the keys of the first token since all tokens have the same keys.
            for key in token_lengths[0]:
                indexer_lengths[key] = max(x[key] if key in x else 0 for x in token_lengths)
            lengths.append(indexer_lengths)

        padding_lengths = {}
        num_tokens = set()
        for indexer_name, token_list in self._indexed_tokens.items():
            padding_lengths[f"{indexer_name}_length"] = len(token_list)
            num_tokens.add(len(token_list))

        # We don't actually use this for padding anywhere, but we used to.  We add this key back in
        # so that older configs still work if they sorted by this key in a BucketIterator.  Taking
        # the max of all of these should be fine for that purpose.
        padding_lengths['num_tokens'] = max(num_tokens)

        # Get all keys which have been used for padding for each indexer and take the max if there are duplicates.
        padding_keys = {key for d in lengths for key in d.keys()}
        for padding_key in padding_keys:
            padding_lengths[padding_key] = max(x[padding_key] if padding_key in x else 0 for x in lengths)
        return padding_lengths
1003614
function() {
     var paddingLeft = 0;
     if (this.g.vis.get("labels")) { paddingLeft += this.getLabelWidth(); }
     if (this.g.vis.get("metacell")) { paddingLeft += this.getMetaWidth(); }
     //paddingLeft += 15 # scroll bar
     return paddingLeft;
  }
842021
public float getDefaultTextSize() {
		ScoreAttribute.Size s = (ScoreAttribute.Size)
			getAttributeObject(ScoreAttribute.TEXT_DEFAULT_SIZE);
		if (s.getUnit().equals(SizeUnit.PT))
			return s.getSize();
		else {
			//% of notation size
			return (s.getSize()/100f)
				* getAttributeSize(ScoreAttribute.NOTATION_SIZE);
		}
	}
533842
def space_after(self):
        
        spcAft = self.spcAft
        if spcAft is None:
            return None
        spcPts = spcAft.spcPts
        if spcPts is None:
            return None
        return spcPts.val
1311576
def default_cx(self):
        
        px_width = self.image.px_width
        horz_dpi = self.image.horz_dpi
        width_in_inches = px_width / horz_dpi
        return Inches(width_in_inches)
823596
def default(self):
        
        try:
            return self.__resolved_default
        except AttributeError:
            resolved_default = super(EnumField, self).default
            if isinstance(resolved_default, (six.string_types,
                                             six.integer_types)):
                # pylint:disable=not-callable
                resolved_default = self.type(resolved_default)
            self.__resolved_default = resolved_default
            return self.__resolved_default
953176
def _pad(self):
    
    if self._indent:
      self.whitespace(self._indent * len(self._open_elements))
468689
def pad_position_l(self, i):
        
        if i >= self.n_pads_l:
            raise ModelError("pad index out-of-bounds")
        return (self.length - self.pad_length) / (self.n_pads_l - 1) * i + self.pad_length / 2
902733
def get_default_config(self):
        
        config = super(DatadogHandler, self).get_default_config()

        config.update({
            'api_key': '',
            'queue_size': '',
        })

        return config
111898
def paddings(number_size)
      left_padding = internal_padding = right_padding = ''
      if padded?
        left_padding_size, internal_padding_size, right_padding_size = padding.padding_sizes(number_size)
        right_padding_size = right_padding_size/fill.size
        right_padding = fill*right_padding_size
        d = right_padding_size - right_padding.size
        left_padding_size = (left_padding_size + d)/fill.size
        left_padding = fill*left_padding_size
        internal_padding_size = internal_padding_size/fill.size
        internal_padding = fill*internal_padding_size
      end
      [left_padding, internal_padding, right_padding ]
    end
287287
def _default_pad(self, data_type, numElems):
        '''
        
        '''
        order = self._convert_option()
        if (data_type == 1) or (data_type == 41):
            pad_value = struct.pack(order+'b', -127)
        elif data_type == 2:
            pad_value = struct.pack(order+'h', -32767)
        elif data_type == 4:
            pad_value = struct.pack(order+'i', -2147483647)
        elif (data_type == 8) or (data_type == 33):
            pad_value = struct.pack(order+'q', -9223372036854775807)
        elif data_type == 11:
            pad_value = struct.pack(order+'B', 254)
        elif data_type == 12:
            pad_value = struct.pack(order+'H', 65534)
        elif data_type == 14:
            pad_value = struct.pack(order+'I', 4294967294)
        elif (data_type == 21) or (data_type == 44):
            pad_value = struct.pack(order+'f', -1.0E30)
        elif (data_type == 22) or (data_type == 45):
            pad_value = struct.pack(order+'d', -1.0E30)
        elif (data_type == 31):
            pad_value = struct.pack(order+'d', 0.0)
        elif (data_type == 32):
            pad_value = struct.pack(order+'2d', *[0.0, 0.0])
        elif (data_type == 51) or (data_type == 52):
            tmpPad = str(' '*numElems).encode()
            form = str(numElems)
            pad_value = struct.pack(form+'b', *tmpPad)
        return pad_value
375210
def get_default_value(self):
        
        val = self.show
        if not val:
            val = self.raw_value
        if not val:
            val = self.showname
        return val