Classify entry pair.
491742
def classify(self, peer_dir_meta):
        """"""
        assert self.operation is None
        # write("CLASSIFIY", self, peer_dir_meta)
        # Note: We pass False if the entry is not listed in the metadata.
        #       We pass None if we don't have metadata all.
        peer_entry_meta = peer_dir_meta.get(self.name, False) if peer_dir_meta else None
        # write("=>", self, peer_entry_meta)
        if self.local:
            self.local.classify(peer_dir_meta)
            self.local_classification = self.local.classification
        elif peer_entry_meta:
            self.local_classification = "deleted"
        else:
            self.local_classification = "missing"

        if self.remote:
            self.remote.classify(peer_dir_meta)
            self.remote_classification = self.remote.classification
        elif peer_entry_meta:
            self.remote_classification = "deleted"
        else:
            self.remote_classification = "missing"

        c_pair = (self.local_classification, self.remote_classification)

        self.operation = operation_map.get(c_pair)
        if not self.operation:
            raise RuntimeError(
                "Undefined operation for pair classification {}".format(c_pair)
            )

        if PRINT_CLASSIFICATIONS:
            write("classify {}".format(self))
        # if not entry.meta:
        # assert self.classification in PAIR_CLASSIFICATIONS
        assert self.operation in PAIR_OPERATIONS
        return self.operation
908859
def get_correction(self, entry):
        
        eigenvalues = entry.parameters["eigenvalues"]
        kpoint_weights = entry.parameters["kpoint_weights"]
        potalign = entry.parameters["potalign"]
        vbm = entry.parameters["vbm"]
        cbm = entry.parameters["cbm"]

        bf_corr = self.perform_bandfill_corr(eigenvalues, kpoint_weights, potalign, vbm, cbm)

        entry.parameters["bandfilling_meta"] = dict(self.metadata)

        return {"bandfilling": bf_corr}
1331820
def classify(text)
      result, score = classify_with_score(text)
      result = nil if threshold_enabled? && (score < @threshold || score == Float::INFINITY)
      result
    end
1289444
def cublasSsymm(handle, side, uplo, m, n, alpha, A, lda, B, ldb, beta, C, ldc):
    
    
    status = _libcublas.cublasSsymm_v2(handle,
                                       _CUBLAS_SIDE_MODE[side], 
                                       _CUBLAS_FILL_MODE[uplo], 
                                       m, n, ctypes.byref(ctypes.c_float(alpha)),
                                       int(A), lda, int(B), ldb, 
                                       ctypes.byref(ctypes.c_float(beta)), 
                                       int(C), ldc)
    cublasCheckStatus(status)
822364
def classify_file(f):
    
    cols=f[1].columns
    if len(cols) == 2:
        #Then we must have a simple file
        return (True,False)
    elif len(cols) == 3 and ('ERROR' in cols.names):
        return (True,True)
    elif len(cols) > 2 and ('ERROR' not in cols.names):
        return (True,False)
    else:
        return (False,True)
443228
def matches(target, entry):
    """"""

    # It must match all the non-empty entries.
    for t, e in itertools.zip_longest(target, entry):
        if e and t != e:
            return False

    # ...and the provider and user can't be empty.
    return entry[0] and entry[1]
233825
def cublasSgemm(handle, transa, transb, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc):
    

    status = _libcublas.cublasSgemm_v2(handle,
                                       _CUBLAS_OP[transa],
                                       _CUBLAS_OP[transb], m, n, k, 
                                       ctypes.byref(ctypes.c_float(alpha)),
                                       int(A), lda, int(B), ldb,
                                       ctypes.byref(ctypes.c_float(beta)),
                                       int(C), ldc)
    cublasCheckStatus(status)
1175633
def classify(self, line):
		""""""
		
		for handler in self._handler:
			if handler.match(self, line):
				return handler
1207890
def get_pair(self, term1, term2):

        

        key = self.key(term1, term2)
        return self.pairs.get(key, None)
1118063
def entries(self):
        """"""
        timer = Timer()
        passwords = []
        logger.info("Scanning %s ..", format_path(self.directory))
        listing = self.context.capture("find", "-type", "f", "-name", "*.gpg", "-print0")
        for filename in split(listing, "\0"):
            basename, extension = os.path.splitext(filename)
            if extension == ".gpg":
                # We use os.path.normpath() to remove the leading `./' prefixes
                # that `find' adds because it searches the working directory.
                passwords.append(PasswordEntry(name=os.path.normpath(basename), store=self))
        logger.verbose("Found %s in %s.", pluralize(len(passwords), "password"), timer)
        return natsort(passwords, key=lambda e: e.name)
1087155
def predict(self, L, P, R):
        
        phi = self.extract_one(L, P, R)
        return self.classifier.predict(phi)
1374236
function LDA(...classes) {
	// Compute pairwise LDA classes (needed for multiclass LDA)
	if(classes.length < 2) {
		throw new Error('Please pass at least 2 classes');
	}

	let numberOfPairs = classes.length * (classes.length - 1) / 2;
	let pair1 = 0;
	let pair2 = 1;

	let pairs = new Array(numberOfPairs);

	for(let i = 0; i < numberOfPairs; i++){
		pairs[i] = computeLdaParams(classes[pair1], classes[pair2], pair1, pair2);

		pair2++;
		if(pair2 == classes.length) {
			pair1++;
			pair2 = pair1 + 1;
		}
	} 

	this.pairs = pairs;
	this.numberOfClasses = classes.length;
}
1052139
def entries(self):
        """"""
        passwords = []
        for store in self.stores:
            passwords.extend(store.entries)
        return natsort(passwords, key=lambda e: e.name)
721632
def _maybe_classify(self, y, k, cutoffs):
        '''

        '''

        rows, cols = y.shape
        if cutoffs is None:
            if self.fixed:
                mcyb = mc.Quantiles(y.flatten(), k=k)
                yb = mcyb.yb.reshape(y.shape)
                cutoffs = mcyb.bins
                k = len(cutoffs)
                return yb, cutoffs[:-1], k
            else:
                yb = np.array([mc.Quantiles(y[:, i], k=k).yb for i in
                               np.arange(cols)]).transpose()
                return yb, None, k
        else:
            cutoffs = list(cutoffs) + [np.inf]
            cutoffs = np.array(cutoffs)
            yb = mc.User_Defined(y.flatten(), np.array(cutoffs)).yb.reshape(
                y.shape)
            k = len(cutoffs)
            return yb, cutoffs[:-1], k
609458
def match_entry_line(str_to_match, regex_obj=MAIN_REGEX_OBJ):
    """"""
    match_obj = regex_obj.match(str_to_match)
    if not match_obj:
        error_message = ('Line "%s" is unrecognized by overlay4u. '
                'This is only meant for use with Ubuntu Linux.')
        raise UnrecognizedMountEntry(error_message % str_to_match)
    return match_obj.groupdict()
1083879
def markPairs(self, labeled_pairs):
        '''
        
        '''
        self._checkTrainingPairs(labeled_pairs)

        for label, examples in labeled_pairs.items():
            self.training_pairs[label].extend(examples)

        if self.active_learner:
            examples, y = flatten_training(labeled_pairs)
            self.active_learner.mark(examples, y)
728682
def filter(self, entries):
        
        return [
            entry for entry in entries
            if self.split(entry)[0] in self.declarations
        ]