Given tenth and one integer number (for cent), return converted word ---------- Parameters ---------- tenth: int Tenth number one: int One number
769099
function getCent(tenth, one) {
  var centWord = "";
  if (tenth || one) {
    centWord += convertTenths(int(str(tenth) + str(one)));
  }

  if (centWord) {
    centWord = "Cents " + centWord + " ";
  }

  return centWord;
}
669939
def real_value(value, digit):
    
    return str(float(value) / math.pow(10, float(digit)))
824428
def apply_T10(word):
    ''''''
    WORD = word
    offset = 0

    for iou in iou_sequences(WORD):
        i = iou.start(1) + 1 + offset
        WORD = WORD[:i] + '.' + WORD[i:]
        offset += 1

    RULE = ' T10' if word != WORD else ''

    return WORD, RULE
306972
def is_mod10(self):
        """"""
        double = 0
        total = 0
        for i in range(len(self.number) - 1, -1, -1):
            for c in str((double + 1) * int(self.number[i])):
                total = total + int(c)
            double = (double + 1) % 2
        return (total % 10) == 0
545069
def as_cnpj(numero):
    
    _num = digitos(numero)
    if is_cnpj(_num):
        return '{}.{}.{}/{}-{}'.format(
                _num[:2], _num[2:5], _num[5:8], _num[8:12], _num[12:])
    return numero
749653
def number(self):
        
        return int(math.ceil(self.total_size / float(self.size)))
1028758
def num_to_thaiword(number: int) -> str:
    
    ret = ""

    if number is None:
        pass
    elif number == 0:
        ret = "ศูนย์"
    else:
        _POS_CALL = ["แสน", "หมื่น", "พัน", "ร้อย", "สิบ", ""]
        _NUM_CALL = [
            "",
            "หนึ่ง",
            "สอง",
            "สาม",
            "สี่",
            "ห้า",
            "หก",
            "เจ็ด",
            "แปด",
            "เก้า",
        ]

        if number > 1000000:
            ret += num_to_thaiword(int(number / 1000000)) + "ล้าน"
            number = int(math.fmod(number, 1000000))
        divider = 100000

        pos = 0
        while number > 0:
            d = int(number / divider)

            if (divider == 10) and (d == 2):
                ret += "ยี่"
            elif (divider == 10) and (d == 1):
                ret += ""
            elif (divider == 1) and (d == 1) and (ret != ""):
                ret += "เอ็ด"
            else:
                ret += _NUM_CALL[d]

            if d:
                ret += _POS_CALL[pos]
            else:
                ret += ""

            number = number % divider
            divider = divider / 10
            pos += 1

    return ret
229584
def as_int(self, method):
        
        (new_radix, relation) = self.rounded(0, method)
        value = Nats.convert_to_int(new_radix.integer_part, new_radix.base)
        return (value * self.sign, relation)
124818
def getbit(self, key, offset):
        
        key = self._encode(key)
        index, bits, mask = self._get_bits_and_offset(key, offset)

        if index >= len(bits):
            return 0

        return 1 if (bits[index] & mask) else 0
583878
function getDollar(hundredth, tenth, one, base) {
  var dollarWord = "";
  if (hundredth) {
    dollarWord += convertOnes(hundredth) + " Hundred";
  }

  // Add "And" if there's numbers after hundredths
  if (hundredth && (tenth || one)) {
    dollarWord += " And ";
  }

  if (tenth || one) {
    dollarWord += convertTenths(int(str(tenth) + str(one)));
  }

  if (base) {
    dollarWord += " " + base;
  }

  return dollarWord;
}
462508
def roundup(ctx, number, num_digits):
    
    number = conversions.to_decimal(number, ctx)
    num_digits = conversions.to_integer(num_digits, ctx)

    return decimal_round(number, num_digits, ROUND_UP)
130115
def word(value, digits=2):
    '''
    

    '''

    convention = locale.localeconv()
    decimal_point = convention['decimal_point']
    decimal_zero = re.compile(r'%s0+' % re.escape(decimal_point))
    prefix = value < 0 and '-' or ''
    value = abs(int(value))
    if value < 1000:
        return u''.join([
            prefix,
            decimal_zero.sub('', _format(value, digits)),
        ])

    for base, suffix in enumerate(LARGE_NUMBER_SUFFIX):
        exp = (base + 2) * 3
        power = 10 ** exp
        if value < power:
            value = value / float(10 ** (exp - 3))
            return ''.join([
                prefix,
                decimal_zero.sub('', _format(value, digits)),
                ' ',
                suffix,
            ])

    raise OverflowError
522356
def round_to_x_digits(number, digits):
    
    return round(number * math.pow(10, digits)) / math.pow(10, digits)
115277
def _convert_number(self, number):
        """"""

        number = float(number)
        return int(number) if number.is_integer() else float(number)
403155
def get_numwords():
    """"""
    numwords = {'and': (1, 0), 'a': (1, 1), 'an': (1, 1)}

    for idx, word in enumerate(UNITS):
        numwords[word] = (1, idx)
    for idx, word in enumerate(TENS):
        numwords[word] = (1, idx * 10)
    for idx, word in enumerate(SCALES):
        numwords[word] = (10 ** (idx * 3 or 2), 0)

    all_numbers = ur'|'.join(ur'\b%s\b' % i for i in numwords.keys() if i)

    return all_numbers, numwords
906389
function(num) {
    num = parseInt(num);

    if (num < 10) {
      num = '0' + num;
    } else {
      num = num.toString();
    }

    return num;
  }
237162
private static int toInteger(CharSequence seq) {
    int len = seq.length();
    int n = 0;
    int i = 0;
    while (i < len) {
      char c = seq.charAt(i);
      if (c >= '0' && c <= '9') {
        n *= 10;
        n += (int)(c - '0');
      } else {
        break;
      }
      i++;
    }
    return n;
  }