Reject some positive matches according to negative matches
        Args:
            pos_lst: List
            neg_lst: List

        Returns: List
967976
def _reject_neg(pos_lst: List, neg_lst: List) -> List:
        

        pos_lst.sort()
        neg_lst.sort()
        result = []
        pivot_pos = pos_lst[0]
        pivot_neg = neg_lst[0]
        while pos_lst:
            if pivot_pos[1] <= pivot_neg[0]:
                result.append(pivot_pos)
                pos_lst.pop(0)
                if pos_lst:
                    pivot_pos = pos_lst[0]
            elif pivot_pos[0] >= pivot_neg[1]:
                neg_lst.pop(0)
                if not neg_lst:
                    result += pos_lst
                    break
                else:
                    pivot_neg = neg_lst[0]
            else:
                pos_lst.pop(0)
                if pos_lst:
                    pivot_pos = pos_lst[0]
        return result
80263
def _check_elements_equal(lst):
    
    assert isinstance(lst, list), "Input value must be a list."
    return not lst or lst.count(lst[0]) == len(lst)
39731
def b_neg(self):
        '''
        
        '''
        nb = Point(self.center)

        if self.xAxisIsMinor:
            nb.x -= self.minorRadius
        else:
            nb.y -= self.minorRadius
        return nb
19309
def p_fail(p):
    
    if len(p) > 2:
        p[0] = Fail(float(p[2]))
    else:
        p[0] = Fail()
835549
def p_lpartselect_minus(self, p):
        ''
        p[0] = Partselect(p[1], p[3], Minus(p[3], p[5]), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
844912
def _backward_word(text, pos):
    
    while pos > 0 and not text[pos - 1].isalnum():
        pos -= 1
    while pos > 0 and text[pos - 1].isalnum():
        pos -= 1
    return text, pos
458026
function posToLine(pos, src) {
    if (pos >= src.length) {
        pos = src.length - 1;
    }

    if (pos <= -1) {
        return -1;
    }

    let line = 1;
    for (let i = 0; i < pos; i++) {
        if (src[i] === "\n") {
            ++line;
        }
    }

    return line;
}
634141
def reject_all(self):
        '''
        
        '''
        keys = self.list_keys()
        for key in keys[self.PEND]:
            try:
                shutil.move(
                        os.path.join(
                            self.opts['pki_dir'],
                            self.PEND,
                            key),
                        os.path.join(
                            self.opts['pki_dir'],
                            self.REJ,
                            key)
                        )
                eload = {'result': True,
                         'act': 'reject',
                         'id': key}
                self.event.fire_event(eload,
                                      salt.utils.event.tagify(prefix='key'))
            except (IOError, OSError):
                pass
        self.check_minion_cache()
        if self.opts.get('rotate_aes_key'):
            salt.crypt.dropfile(self.opts['cachedir'], self.opts['user'])
        return self.list_keys()
507241
function _not(expr) {
      var state = this.bt.current_state();
      try { var r = expr.call(this) } 
      catch (f) {
        this.bt.catch_mismatch(f);
        this.bt.restore(state);
        return true
      }
      this.bt.mismatch("Negative lookahead didn't match got " + r);
    }
700374
def recv_match(self, condition=None, type=None, blocking=False):
        ''''''
        if type is not None and not isinstance(type, list):
            type = [type]
        while True:
            m = self.recv_msg()
            if m is None:
                return None
            if type is not None and not m.get_type() in type:
                continue
            if not mavutil.evaluate_condition(condition, self.messages):
                continue
            return m
164359
def limit_pos(p, se_pos, nw_pos):
        
        if p > se_pos:
            _update(p, se_pos)
        elif p < nw_pos:
            _update(p, nw_pos)
155974
def _handleParListMismatch(self, probStr, extra=False):
        

        errmsg = 'ERROR: mismatch between default and current par lists ' + \
               'for task "'+self.taskName+'"'
        if probStr:
            errmsg += '\n\t'+probStr
        errmsg += '\n(try: "unlearn '+self.taskName+'")'
        print(errmsg)
        return False
1062672
def list_filter(lst, startswith=None, notstartswith=None,
                contain=None, notcontain=None):
    
    keeped = []
    for item in lst:
        keep = False
        if startswith is not None:
            if item.startswith(startswith):
                keep = True
        if notstartswith is not None:
            if not item.startswith(notstartswith):
                keep = True
        if contain is not None:
            if contain in item:
                keep = True
        if notcontain is not None:
            if not notcontain in item:
                keep = True

        if keep:
            keeped.append(item)
    return keeped
1178634
def get_false_negative(self, scalar=True):
        """"""
        ans = pd.Series(PrettyDict([(k, safe_div(np.sum(self.loc[k]) - self[k][k],
                                                 np.sum(self.sum() - self.loc[k]))) for k in self.columns]))
        if (not self._scalar_stats and not scalar) or self._num_classes != 2:
            return ans
        return ans[self._pos_label]
104237
def true_neg_rate(self):
        
        false_pos = self.matrix[1][0]
        true_neg = self.matrix[1][1]
        return divide(1.0 * true_neg, true_neg + false_pos)
499745
def max_neg(self):
        ''''''
        if self.__len__() == 0:
            return ArgumentError('empty set has no maximum negative value.')
        if self.contains(0):
            return None
        negative = [interval for interval in self.intervals
                    if interval.right < 0]
        if len(negative) == 0:
            return None
        return numpy.max(list(map(lambda i: i.right, negative)))
1202186
def _check_validity(cls, text):
        

        if not text[0].lstrip().startswith('1 ') or not text[1].lstrip().startswith('2 '):
            raise ValueError("Line number check failed")

        for line in text:
            line = line.strip()
            if str(cls._checksum(line)) != line[-1]:
                raise ValueError("Checksum validation failed")