SMART L, Chisholm LOGN
484396
def normalized_log_term_frequency(document, term)
      count = document.term_count(term)
      if count > 0
        (1 + log(count)) / (1 + log(document.average_term_count))
      else
        0
      end
    end
1001230
def smeft_evolve_leadinglog(C_in, scale_in, scale_out, newphys=True):
    """"""
    C_out = deepcopy(C_in)
    b = beta.beta(C_out, newphys=newphys)
    for k, C in C_out.items():
        C_out[k] = C + b[k] / (16 * pi**2) * log(scale_out / scale_in)
    return C_out
1046871
function log(logLevel, level, content) {
	var output = true;

	switch (logLevel) {
	case 'slient':
		if (level !== 'lv1') {
			output = false;
		}
		break;
	case 'info':
		if (level === 'lv3') {
			output = false;
		}
		break;
	default:
		output = true;
	}
	if (output) {
		var data = Array.prototype.slice.call(content);
		fancyLog.apply(false, data);
	}
}
766189
function smartComment(description/*:string*/ = '', links/*: string[]*/ = []) {
  const descriptionLines = description.replace(/(.{1,72}\s)\s*?/g, '\n * $1')
  const linksLines = links.reduce((acc, link) => (
    `${acc} * @see ${link}\n`
  ), '')

  return commentBlock(`*${descriptionLines}\n${linksLines} `)
}
241041
function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_dropdown",
          "name": "BOOL",
          "options": [
            [Blockly.Msg.LOGIC_BOOLEAN_TRUE, "TRUE"],
            [Blockly.Msg.LOGIC_BOOLEAN_FALSE, "FALSE"]
          ]
        }
      ],
      "output": "Boolean",
      "colour": Blockly.Blocks.logic.HUE,
      "tooltip": Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP,
      "helpUrl": Blockly.Msg.LOGIC_BOOLEAN_HELPURL
    });
  }
1358109
def smart_email_list(self, status="all", client_id=None):
        """"""
        if client_id is None:
            response = self._get(
                "/transactional/smartEmail?status=%s" % status)
        else:
            response = self._get(
                "/transactional/smartEmail?status=%s&clientID=%s" % (status, client_id))
        return json_to_py(response)
1208996
function(q, lowerTail, logp) {
            var ind, ret;

            logp = logp === true;
            lowerTail = lowerTail !== false;

            if (utils.hasNaN(q)) { return NaN; }
            if (q < xs[0]) {
               ret = lowerTail ? 0 : 1;
            } else if (q >= xs[xs.length - 1]) {
               ret = lowerTail ? 1 : 0;
            } else {
               ind = binSearch(xs, function(y) { return y <= q; });
               ret = lowerTail ? cumsLeft[ind] : cumsRight[ind];
            }
            ret = Math.min(ret, 1);
            return logp ? Math.log(ret) : ret;
         }
229810
def solve(self):
        """"""

        super(RobustPCA, self).solve()
        return self.X, self.Y
1284333
function linComb_(x, y, a, b) {
  var i, c, k, kk;
  k=x.length<y.length ? x.length : y.length;
  kk=x.length;
  for (c=0, i=0; i<k; i++) {
    c+=a*x[i]+b*y[i];
    x[i]=c & mask;
    c>>=bpe;
  }
  for (i=k; i<kk; i++) {
    c+=a*x[i];
    x[i]=c & mask;
    c>>=bpe;
  }
}
884310
def _twofilter_smoothing_ON(self, t, ti, info, phi, lwinfo, return_ess,
                               modif_forward, modif_info):
        
        if modif_info is not None:
            lwinfo += modif_info
        Winfo = rs.exp_and_normalise(lwinfo)
        I = rs.multinomial(Winfo)
        if modif_forward is not None:
            lw = self.wgt[t].lw + modif_forward
            W = rs.exp_and_normalise(lw)
        else:
            W = self.wgt[t].W
        J = rs.multinomial(W)
        log_omega = self.model.logpt(t + 1, self.X[t][J], info.hist.X[ti][I])
        if modif_forward is not None:
            log_omega -= modif_forward[J]
        if modif_info is not None:
            log_omega -= modif_info[I]
        Om = rs.exp_and_normalise(log_omega)
        est = np.average(phi(self.X[t][J], info.hist.X[ti][I]), axis=0,
                         weights=Om)
        if return_ess:
            return (est, 1. / np.sum(Om**2))
        else:
            return est
831285
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) {
        return new Disjunction(left.getBuilder(), left, right);
    }
81976
def smart_text(s, encoding='utf-8', strings_only=False, errors='strict'):
    
    if isinstance(s, Promise):
        # The input is the result of a gettext_lazy() call.
        return s
    return force_text(s, encoding, strings_only, errors)
783750
def _get_logical(source_lines, result, logical_start, logical_end):
    
    row = result['line'] - 1
    col = result['column'] - 1
    ls = None
    le = None
    for i in range(0, len(logical_start), 1):
        assert logical_end
        x = logical_end[i]
        if x[0] > row or (x[0] == row and x[1] > col):
            le = x
            ls = logical_start[i]
            break
    if ls is None:
        return None
    original = source_lines[ls[0]:le[0] + 1]
    return ls, le, original
756081
private void rechecksqlistpl()
    {
    	if(data != null)
    	{
    		Node[] childrens = ((SimpleNode)data).getChildren();
    		if(childrens != null && childrens.length > 0)
    		{
    			boolean switchcase = true;
    			for(Node node:childrens)
    			{
    				if(!(node instanceof ASTText))
    				{
    					switchcase = false;
    					break;
    				}
    			}
    			if(switchcase)
    			{
    				this.esInfo.setTpl(false);
    				 
    			}
    			else
    			{
    				this.esInfo.setTpl(true);
    			}
    		}
    		
    	}
    }
1252926
def lsem (inlist):
    
    sd = stdev(inlist)
    n = len(inlist)
    return sd/math.sqrt(n)
439145
def binary_operation_logical(self, rule, left, right, **kwargs):
        
        return LogicalBinOpRule(rule.operation, left, right)
943118
public void addTerm(NewWord newWord) {
        NewWord temp = null;
        SmartForest<NewWord> smartForest = null;
        if ((smartForest = sf.getBranch(newWord.getName())) != null && smartForest.getParam() != null) {
            temp = smartForest.getParam();
            temp.update(newWord.getNature(), newWord.getAllFreq());
        } else {
            count++;
            if (splitWord == null) {
                newWord.setScore(-1);
            } else {
                newWord.setScore(-splitWord.cohesion(newWord.getName()));
            }

            synchronized (sf) {
                sf.add(newWord.getName(), newWord);
            }
        }
    }