actually this should be in a log_conversion model
186945
public function deleteGoalConversions($idSite, $idGoal)
    {
        $table = Common::prefixTable("log_conversion");

        Db::deleteAllRows($table, "WHERE idgoal = ? AND idsite = ?", "idvisit", 100000, array($idGoal, $idSite));
    }
518637
def interpolate_logscale_single(start, end, coefficient):
    
    return np.exp(np.log(start) + (np.log(end) - np.log(start)) * coefficient)
412595
def log_x_cb(self, w, val):
        """"""
        self.tab_plot.logx = val
        self.plot_two_columns()
703899
def get_worker_log(self, log_id, log_type, size=0):
        
        params = OrderedDict([('log', ''), ('id', log_id)])
        if log_type is not None:
            log_type = log_type.lower()
            if log_type not in LOG_TYPES_MAPPING:
                raise ValueError('log_type should choose a value in ' +
                                 ' '.join(six.iterkeys(LOG_TYPES_MAPPING)))
            params['logtype'] = LOG_TYPES_MAPPING[log_type]
        if size > 0:
            params['size'] = str(size)
        resp = self._client.get(self.resource(), params=params)
        return resp.text
341927
function log() {
    var _console;

    if (LatticeLogs.failFast(LatticeLogs.LOG)) return;

    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
      args[_key3] = arguments[_key3];
    }

    (_console = console).log.apply(_console, (0, _toConsumableArray2.default)(args.map(LatticeLogs.argMapper)));
  }
376940
def _logsumexp(ary, *, b=None, b_inv=None, axis=None, keepdims=False, out=None, copy=True):
    
    # check dimensions for result arrays
    ary = np.asarray(ary)
    if ary.dtype.kind == "i":
        ary = ary.astype(np.float64)
    dtype = ary.dtype.type
    shape = ary.shape
    shape_len = len(shape)
    if isinstance(axis, Sequence):
        axis = tuple(axis_i if axis_i >= 0 else shape_len + axis_i for axis_i in axis)
        agroup = axis
    else:
        axis = axis if (axis is None) or (axis >= 0) else shape_len + axis
        agroup = (axis,)
    shape_max = (
        tuple(1 for _ in shape)
        if axis is None
        else tuple(1 if i in agroup else d for i, d in enumerate(shape))
    )
    # create result arrays
    if out is None:
        if not keepdims:
            out_shape = (
                tuple()
                if axis is None
                else tuple(d for i, d in enumerate(shape) if i not in agroup)
            )
        else:
            out_shape = shape_max
        out = np.empty(out_shape, dtype=dtype)
    if b_inv == 0:
        return np.full_like(out, np.inf, dtype=dtype) if out.shape else np.inf
    if b_inv is None and b == 0:
        return np.full_like(out, -np.inf) if out.shape else -np.inf
    ary_max = np.empty(shape_max, dtype=dtype)
    # calculations
    ary.max(axis=axis, keepdims=True, out=ary_max)
    if copy:
        ary = ary.copy()
    ary -= ary_max
    np.exp(ary, out=ary)
    ary.sum(axis=axis, keepdims=keepdims, out=out)
    np.log(out, out=out)
    if b_inv is not None:
        ary_max -= np.log(b_inv)
    elif b:
        ary_max += np.log(b)
    out += ary_max.squeeze() if not keepdims else ary_max
    # transform to scalar if possible
    return out if out.shape else dtype(out)
1200658
def horner_log(coeffs, log_coeff, x):
    ''''''
    tot = 0.0
    for c in coeffs:
        tot = tot*x + c
    return tot + log_coeff*log(x)
346818
function(query, model, logger) {
    const Log = logger.bind()
    if (query.$term) {
      query.$or = [] // TODO: allow option to choose ANDing or ORing of searchFields/queryableFields
      let queryableFields = this.getQueryableFields(model, Log)
      let stringFields = this.getStringFields(model, Log)

      // EXPL: we can only search fields that are a string type
      queryableFields = queryableFields.filter(function(field) {
        return stringFields.indexOf(field) > -1
      })

      // EXPL: search only specified fields if included
      if (query.$searchFields) {
        if (!Array.isArray(query.$searchFields)) {
          query.$searchFields = query.$searchFields.split(',')
        }

        // EXPL: we can only search fields that are a string type
        query.$searchFields = query.$searchFields.filter(function(field) {
          return stringFields.indexOf(field) > -1
        })

        query.$searchFields.forEach(function(field) {
          let obj = {}
          obj[field] = new RegExp(query.$term, 'i')
          query.$or.push(obj)
        })
      } else {
        queryableFields.forEach(function(field) {
          let obj = {}
          obj[field] = new RegExp(query.$term, 'i')
          query.$or.push(obj)
        })
      }
    }

    delete query.$searchFields
    delete query.$term
  }
1060936
def getCustomLogger(name, logLevel, logFormat='%(asctime)s %(levelname)-9s:%(name)s:%(module)s:%(funcName)s: %(message)s'):
  '''
  
  '''
  assert isinstance(logFormat, basestring), ("logFormat must be a string but is %r" % logFormat)
  assert isinstance(logLevel, basestring), ("logLevel must be a string but is %r" % logLevel)
  assert isinstance(name, basestring), ("name must be a string but is %r" % name)

  validLogLevels = ['CRITICAL', 'DEBUG', 'ERROR', 'INFO', 'WARNING']

  if not logLevel:
    logLevel = 'DEBUG'

  # If they don't specify a valid log level, err on the side of verbosity
  if logLevel.upper() not in validLogLevels:
    logLevel = 'DEBUG'

  numericLevel = getattr(logging, logLevel.upper(), None)
  if not isinstance(numericLevel, int):
    raise ValueError("Invalid log level: %s" % logLevel)

  logging.basicConfig(level=numericLevel, format=logFormat)
  logger = logging.getLogger(name)
  return logger
638578
def dump_to_log(self):
        
        if self._event_dict:
            logger.info('Events:')
            for event_str, count_int in sorted(self._event_dict.items()):
                logger.info('  {}: {}'.format(event_str, count_int))
        else:
            logger.info('No Events')
817655
def log_interp(x, xp, *args, **kwargs):
    """"""
    return log_interpolate_1d(x, xp, *args, **kwargs)
1119821
def log(self):
        '''
        
        '''

        log = self._log(num=10, format='%h::%b').get('stdout')
        if log:
            return [
                dict(commit=c, message=m) for c, m in [
                    l.split('::') for l in log
                ]
            ]
894369
def log(cls, x: 'TensorFluent') -> 'TensorFluent':
        '''
        '''
        return cls._unary_op(x, tf.log, tf.float32)
99141
def _from_keras_log_format(data, **kwargs):
    
    data_val = pd.DataFrame(data[['epoch']])

    data_val['acc'] = data['val_acc']
    data_val['loss'] = data['val_loss']
    data_val['data'] = 'validation'

    data_training = pd.DataFrame(data[['acc', 'loss', 'epoch']])
    data_training['data'] = 'training'

    result = pd.concat([data_training, data_val], sort=False)
    plot(result, **kwargs)
901965
def log_to_file(self, message):
        """"""

        with self.build_fs.open(self.log_file, 'a+') as f:
            f.write(unicode(message + '\n'))
376694
void log(ECoordinate v) {
		double d = v.m_eps / v.m_value;
		m_value = Math.log(v.m_value);
		m_eps = d * (1.0 + 0.5 * d) + epsCoordinate() * Math.abs(m_value);
	}
1150046
function dtlog(df) {
      var t;

      t = -bd0(df / 2, (df + 1) / 2) + stirlerr((df + 1) / 2) - stirlerr(df / 2);
      return function(x) {
         var x2n, logx2n, u;

         if (utils.hasNaN(x, df) || df <= 0) { return NaN; }

         x2n = x * x / df;
         logx2n = Math.log(1 + x2n) / 2;
         u = x2n > 0.2 ? df * logx2n
                       : x * x / 2 - bd0(df / 2, (df + x * x) / 2);
         return t - u - (logx2n + Math.log(sqrt2pi));
      };
   }