:type digits: List[int]
    :rtype: List[int]
767831
def plus_one_v1(digits):
    
    digits[-1] = digits[-1] + 1
    res = []
    ten = 0
    i = len(digits)-1
    while i >= 0 or ten == 1:
        summ = 0
        if i >= 0:
            summ += digits[i]
        if ten:
            summ += 1
        res.append(summ % 10)
        ten = summ // 10
        i -= 1
    return res[::-1]
233128
def hex(self):
        """"""

        sign = '-' if self._sign() else ''
        e = self._exponent()
        if isinstance(e, six.string_types):
            return sign + e

        m = self._significand()
        _, digits, _ = _mpfr_get_str2(
            16,
            0,
            m,
            ROUND_TIES_TO_EVEN,
        )
        # only print the number of digits that are actually necessary
        n = 1 + (self.precision - 1) // 4
        assert all(c == '0' for c in digits[n:])
        result = '%s0x0.%sp%+d' % (sign, digits[:n], e)
        return result
847570
def checksum(digits):
    
    s = 0
    p = len(digits) + 1
    for i in range(0, len(digits)):
        s += digits[i] * p
        p -= 1

    reminder = s % 11
    if reminder == 0 or reminder == 1:
        return 0
    else:
        return 11 - reminder
778911
def number(self) -> int:
        
        match = self._NUMBER_SUFFIX.search(self.epno)
        return int(match.group(1))
1193340
def of number
      raise_on_type_mismatch number
      digits = convert_number_to_digits(number)
      digits.reduce(0){ |check, digit| QUASIGROUP[check][digit] }
    end
24695
def base_to_int(s, base):
    
    
    digit = {}
    for i,c in enumerate(string.digits + string.ascii_uppercase):
        digit[c] = i
    multiplier = 1
    res = 0
    for c in s[::-1]:
        res += digit[c] * multiplier
        multiplier *= base
    return res
333222
def num_examples(self):
        """"""
        if self.is_list:
            return len(self.list_or_slice)
        else:
            start, stop, step = self.slice_to_numerical_args(
                self.list_or_slice, self.original_num_examples)
            return stop - start
181803
def digit(nstr, schema):
    
    if isinstance(nstr, int):
        nstr = str(nstr)
    elif not isinstance(nstr, basestring):
        return False

    return nstr.isdigit()
753562
private String digits() {
    StringBuilder sb = new StringBuilder();
    do {
      sb.append(consumeNextCharacter(CharType.DIGIT));
    } while (chars.positiveLookahead(CharType.DIGIT));
    return sb.toString();
  }
517027
function numToDigits(num) {
	var digits = num.toString().split('');
	for (var i = 0; i < digits.length; i++) {
		digits[i] = +digits[i];
	}
	digits.reverse();
	return digits;
}
972010
def get_rounded(self, digits):
        
        result = self.copy()
        result.round(digits)
        return result
110515
void appendHex( int value, int digits ) {
        if( digits > 1 ) {
            appendHex( value >>> 4, digits-1 );
        }
        output.append( DIGITS[ value & 0xF ] );
    }
1179380
def calc_check_digit(digits):
        """"""
        ints = [int(d) for d in digits]
        l = len(ints)
        odds = slice((l - 1) % 2, l, 2)
        even = slice(l % 2, l, 2)
        checksum = 3 * sum(ints[odds]) + sum(ints[even])
        return str(-checksum % 10)
735002
function(digits, n) {
		n = n.toString();
		while(n.length < digits)
		n = '0' + n;
		return n;
	}
30986
def number(items):
    """"""
    n = len(items)
    if n == 0:
        return items
    places = str(int(math.log10(n) // 1 + 1))
    format = '[{0[0]:' + str(int(places)) + 'd}] {0[1]}'
    return map(
        lambda x: format.format(x),
        enumerate(items)
    )
792536
def numbers(self):
        "
        numstring = '{:011d}{:02d}{:04d}{}{}'.format(
            self._receipt.point_of_sales.owner.cuit,  # 11 digits
            int(self._receipt.receipt_type.code),  # 2 digits
            self._receipt.point_of_sales.number,  # point of sales
            self._receipt.validation.cae,  # 14 digits
            self._receipt.validation.cae_expiration.strftime('%Y%m%d'),  # 8
        )
        return [int(num) for num in numstring]
1243762
def as_tuple(self):
        """"""
        if self._tuple is None:
            # extract leading digits from year
            year = 9999
            if self.year:
                m = self.DIGITS.match(self.year)
                if m:
                    year = int(m.group(0))
            month = self.month_num or 99
            day = self.day if self.day is not None else 99

            # should we include calendar name in tuple too?
            self._tuple = year, month, day

        return self._tuple