Checks to see if the residue is non-canonical.
15689
def check_for_non_canonical(residue):
        """"""
        res_label = list(residue[0])[0][2]
        atom_labels = {x[2] for x in itertools.chain(
            *residue[1].values())}  # Used to find unnatural aas
        if (all(x in atom_labels for x in ['N', 'CA', 'C', 'O'])) and (
                len(res_label) == 3):
            return Residue, True
        return None
348433
def _is_sub_intrinsic(data):
        
        return isinstance(data, dict) and len(data) == 1 and LambdaUri._FN_SUB in data
705566
function isMultiplicationOfTerms(node) {
  if (Node.Type.isParenthesis(node)) {
    return isMultiplicationOfTerms(node.content);
  }
  return (Node.Type.isOperator(node, '*') &&
          !Node.PolynomialTerm.isPolynomialTerm(node));
}
882375
@Override
    public boolean isSingular() {

        for( int i = 0; i < m; i++ ) {
            double real = dataLU[i*stride+i*2];
            double imaginary = dataLU[i*stride+i*2+1];

            double mag2 = real*real + imaginary*imaginary;

            if( mag2 < UtilEjml.EPS*UtilEjml.EPS )
                return true;
        }
        return false;
    }
387487
private boolean isXMMod(String kennung)
	{
		if (kennung.equals("Extended Module: ")) return true;
		if (kennung.toLowerCase().equals("extended module: ")) return true;
		return false;
	}
1171029
def _sanity_check_coerce_type_outside_of_fold(ir_blocks):
    """"""
    is_in_fold = False
    for first_block, second_block in pairwise(ir_blocks):
        if isinstance(first_block, Fold):
            is_in_fold = True

        if not is_in_fold and isinstance(first_block, CoerceType):
            if not isinstance(second_block, (MarkLocation, Filter)):
                raise AssertionError(u'Expected MarkLocation or Filter after CoerceType, '
                                     u'but none was found: {}'.format(ir_blocks))

        if isinstance(second_block, Unfold):
            is_in_fold = False
249712
private boolean isInRoots(String canonicalPath) {

        if (canonicalPath.startsWith(m_rootPath)) {
            return true;
        }
        if (m_additionalRoots != null) {
            for (String root : m_additionalRoots) {
                if (canonicalPath.startsWith(root)) {
                    return true;
                }

            }
        }
        return false;
    }
341757
def is_regular(self):
        

        """
        warn = False
        msg = 'The given matrix'

        # check symmetry
        if np.abs(self.A - self.A.T).sum() > 0:
            warn = True
            msg = '{} is not symmetric,'.format(msg)

        # check parallel edged
        if self.A.max(axis=None) > 1:
            warn = True
            msg = '{} has parallel edges,'.format(msg)

        # check that d is d-regular
        if np.min(self.d) != np.max(self.d):
            warn = True
            msg = '{} is not d-regular,'.format(msg)

        # check that g doesn't contain any self-loop
        if self.A.diagonal().any():
            warn = True
            msg = '{} has self loop.'.format(msg)

        if warn:
            self.logger.warning('{}.'.format(msg[:-1]))
438977
private boolean isInnerSubClass(ClassSymbol c, Symbol base) {
            while (c != null && !c.isSubClass(base, types)) {
                c = c.owner.enclClass();
            }
            return c != null;
        }
425249
function shouldIntroduceTraceBreak(aaStretch, prevResidue, thisResidue) {
  // these checks are on purpose more relaxed than the checks we use in 
  // deriveConnectivity(). We don't really care about correctness of bond 
  // lengths here. The only thing that matters is that the residues are 
  // more or less close so that they could potentially be connected.
  var prevAtom, thisAtom;
  if (aaStretch) {
    prevAtom = prevResidue.atom('C');
    thisAtom = thisResidue.atom('N');
  } else {
    prevAtom = prevResidue.atom('O3\'');
    thisAtom = thisResidue.atom('P');
  }

  // in case there is a bond, we don't introduce a chain break
  if (prevAtom.isConnectedTo(thisAtom)) {
    return false;
  }
  var sqrDist = vec3.sqrDist(prevAtom.pos(), thisAtom.pos());
  return (Math.abs(sqrDist - 1.5*1.5) > 1);
}
143751
def is_canonical(version, loosedev=False):  # type: (str, bool) -> bool
    
    if loosedev:
        return loose440re.match(version) is not None
    return pep440re.match(version) is not None
218014
boolean symtabExtends(SymbolTable other)
    {
        // Throws ClassCastException if other isn't a local symtab
        LocalSymbolTable subset = (LocalSymbolTable) other;

        // Gather snapshots of each LST's data, so we don't

        // Superset must have same/more known symbols than subset.
        if (getMaxId() < subset.getMaxId()) return false;

        // TODO amzn/ion-java/issues/18 Currently, we check imports by their refs. which
        //      might be overly strict; imports which are not the same ref.
        //      but have the same semantic states fails the extension check.
        if (! myImportsList.equalImports(subset.myImportsList))
            return false;

        int subLocalSymbolCount = subset.mySymbolsCount;

        // Superset extends subset if subset doesn't have any declared symbols.
        if (subLocalSymbolCount == 0) return true;

        // Superset must have same/more declared (local) symbols than subset.
        if (mySymbolsCount < subLocalSymbolCount) return false;

        String[] subsetSymbols = subset.mySymbolNames;

        // Before we go through the expensive iteration from the front,
        // check the last (largest) declared symbol in subset beforehand
        if (! safeEquals(mySymbolNames[subLocalSymbolCount- 1],
                                  subsetSymbols[subLocalSymbolCount- 1]))
        {
            return false;
        }

        // Now, we iterate from the first declared symbol, note that the
        // iteration below is O(n)!
        for (int i = 0; i < subLocalSymbolCount - 1; i++)
        {
            if (! safeEquals(mySymbolNames[i], subsetSymbols[i]))
                return false;
        }

        return true;
    }
1061487
public static function isSystemLittleEndian()
    {
        if (self::$isLittleEndian === null) {
            self::$isLittleEndian = (pack("P", 2) === pack("Q", 2));
        }
        return self::$isLittleEndian;
    }
653635
def add(self, r):
        ''''''
        id = r.get_residue_id()
        if self.order:
            last_id = self.order[-1]

            # KAB - allow for multiresidue noncanonicals
            if id in self.order:
                raise colortext.Exception('Warning: using code to "allow for multiresidue noncanonicals" - check this case manually.')
                id = '%s.%d'%(str(id),self.special_insertion_count)
                self.special_insertion_count += 1

            assert(r.Chain == self.sequence[last_id].Chain)
            assert(r.residue_type == self.sequence[last_id].residue_type)
        self.order.append(id)
        self.sequence[id] = r
65824
public static boolean containsNaN(DoubleTuple tuple)
    {
        for (int i=0; i<tuple.getSize(); i++)
        {
            if (Double.isNaN(tuple.get(i)))
            {
                return true;
            }
        }
        return false;
    }
1226627
def is_descendant_of(self, other, include_self=False):
        """"""
        if other.pk == self.pk:
            return include_self

        return self._closure_model.objects.filter(
            parent=other,
            child=self
        ).exclude(pk=self.pk).exists()
838782
def mod_issquare(a, p):
    
    if not a:
        return True
    p1 = p // 2
    p2 = pow(a, p1, p)
    return p2 == 1