Log a named numeric value. The value type may be 'value',
    'count', or None.
8253
def log(self, name, value, valueType=None, stamp=None):
    """"""
    if type(value) == float:
      form = "%s%s %2.2f %d\n"
    else:
      form = "%s%s %s %d\n"

    if valueType is not None and len(valueType) > 0 and valueType[0] != '.':
      valueType = '.' + valueType

    if not stamp:
      stamp = time.time()

    self._sendMsg(form % (self._sanitizeName(name), valueType or '', value, stamp))
912165
private function logNumberOfConstants(): void
  {
    $n_id  = sizeof($this->labels);
    $n_len = sizeof($this->constants) - $n_id;

    $this->io->writeln('');
    $this->io->text(sprintf('Number of constants based on column widths: %d', $n_len));
    $this->io->text(sprintf('Number of constants based on database IDs : %d', $n_id));
  }
881194
public static int calculateDigitCount(long value) {
        if (value < 0) {
            if (value != Long.MIN_VALUE) {
                return calculateDigitCount(-value) + 1;
            } else {
                return 20;
            }
        }
        return 
            (value < 10 ? 1 :
             (value < 100 ? 2 :
              (value < 1000 ? 3 :
               (value < 10000 ? 4 :
                ((int)(Math.log(value) / LOG_10) + 1)))));
    }
543945
private static void ensureNumber(Object value) throws ExecutionException {

        if (!isNumber(value)) {
            String message = value.getClass().getCanonicalName() + " can not cast to a Number.";
            LOGGER.error(message);
            throw new ExecutionException(message);
        }
    }
640041
function(num) {
            if(typeof num !== "number") {
                return NaN;
            }
            var isNegative = num < 0;
            num = (isNegative) ? -num : num;
            var log = this.logBaseTen(num),
                result = Math.pow(10, Math.floor(log));

            return (isNegative) ? -result: result;
        }
306277
def _file_nums_str(self, n_all, n_type, n_ign):
        
        # 'other' is the difference between all and named
        n_oth = n_all - np.sum(n_type)

        f_str = "{} Files".format(n_all) + " ("
        if len(n_type):
            f_str += ", ".join("{} {}".format(name, num) for name, num in
                               zip(self._COUNT_FILE_TYPES, n_type))
            f_str += ", "
        f_str += "other {}; {} ignored)".format(n_oth, n_ign)
        return f_str
590091
def number(v):
    """"""
    if nodesetp(v):
        v = string(v)
    try:
        return float(v)
    except ValueError:
        return float('NaN')
928327
def log(args, number=None, oneline=False, quiet=False):
    
    options = ' '.join([
        number and str('-n %s' % number) or '',
        oneline and '--oneline' or ''
    ])
    try:
        return run('log %s %s' % (options, args), quiet=quiet)
    except UnknownRevision:
        return ''
377625
function log(msg, type) {
	switch (type) {
	case 'error':
		fancyLog(`${PLUGINNAME}: ${colors.red(`Error, ${msg}`)}`);
		break;

	case 'warn':
		fancyLog(`${PLUGINNAME}: ${colors.yellow(`Warning, ${msg}`)}`);
		break;

	case 'info':
		fancyLog(`${PLUGINNAME}: ${colors.green(`Info, ${msg}`)}`);
		break;

	default:
		fancyLog(`${PLUGINNAME}: ${colors.green(`Info, ${msg}`)}`);
		break;
	}

}
581275
def serialize_numeric(self, tag):
        """"""
        str_func = int.__str__ if isinstance(tag, int) else float.__str__
        return str_func(tag) + tag.suffix
585929
def value(self, data):
        """"""
        value = data.get(self.name)
        if value:
            return int(value)
        return self.default
180755
def Value(self, name):
    """"""
    if name in self._enum_type.values_by_name:
      return self._enum_type.values_by_name[name].number
    raise ValueError('Enum %s has no value defined for name %s' % (
        self._enum_type.name, name))
1167977
function num(type, value) {
  var val;
  if(type === NUMERIC.INTEGER) {
    val = utils.strtoint(value);
    if(isNaN(val)) throw IntegerRange;
  }else{
    val = utils.strtofloat(value);
    if(isNaN(val)) throw InvalidFloat;
  }
  return val;
}
456815
function isNotNumber(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && (typeof value === 'number' || value instanceof Number)) {
        throw TypeException.expectedType(assertionTypes.IS_NOT_NUMBER, value, '<number>', message, id);
    }
}
496829
def _log(self, num=None, format=None):
        '''
        
        '''

        num = '-n %s' % (num) if num else ''
        format = '--format="%s"' % (format) if format else ''
        return self.m(
            'getting git log',
            cmdd=dict(cmd='git log %s %s' % (num, format), cwd=self.local),
            verbose=False
        )
831478
def validate(self, value, messages=None):
        
        valid     = True
        primitive = value

        def log(msg):
            if messages is not None:
                messages.append(msg)

        if self.enum:
            if value not in self.enum.keys():
                valid = False
                args  = (self.name, str(value))
                log("%s value '%s' not in allowed enumerated values." % args)
            else:
                primitive = int(self.enum[value])

        if self.type:
            if self.type.validate(primitive, messages, self.name) is False:
                valid = False

        if self.range:
            if primitive < self.range[0] or primitive > self.range[1]:
                valid = False
                args  = (self.name, str(primitive), self.range[0], self.range[1])
                log("%s value '%s' out of range [%d, %d]." % args)

        return valid
75383
def visit_Num(self, node):
        
        ty = type(node.n)
        sty = pytype_to_ctype(ty)
        if node in self.immediates:
            sty = "std::integral_constant<%s, %s>" % (sty, node.n)

        self.result[node] = self.builder.NamedType(sty)