Checks for CRTF compatibility.
518528
def check_crtf(self):
        
        if self.region_type not in regions_attributes:
            raise ValueError("'{0}' is not a valid region type in this package"
                             "supported by CRTF".format(self.region_type))

        if self.coordsys not in valid_coordsys['CRTF']:
            raise ValueError("'{0}' is not a valid coordinate reference frame in "
                             "astropy supported by CRTF".format(self.coordsys))
1053376
def _check(self):
        """"""
        final = self._md_context.digest()
        exp = self._inf._md_expect
        if exp is None:
            return
        if final is None:
            return
        if self._returncode:
            check_returncode(self, '')
        if self._remain != 0:
            raise BadRarFile("Failed the read enough data")
        if final != exp:
            raise BadRarFile("Corrupt file - CRC check failed: %s - exp=%r got=%r" % (
                self._inf.filename, exp, final))
245291
def is_philips(dicom_input):
    
    # read dicom header
    header = dicom_input[0]

    if 'Manufacturer' not in header or 'Modality' not in header:
        return False  # we try generic conversion in these cases

    # check if Modality is mr
    if header.Modality.upper() != 'MR':
        return False

    # check if manufacturer is Philips
    if 'PHILIPS' not in header.Manufacturer.upper():
        return False

    return True
446725
def _is_type_compatible(a, b):
    """"""
    is_ts_compat = lambda x: isinstance(x, (Timestamp, DateOffset))
    is_td_compat = lambda x: isinstance(x, (Timedelta, DateOffset))
    return ((is_number(a) and is_number(b)) or
            (is_ts_compat(a) and is_ts_compat(b)) or
            (is_td_compat(a) and is_td_compat(b)) or
            com._any_none(a, b))
929947
def is_compatible(self, model, version):
        
        if not model in self.models:
            return False
        if self.max_ykver:
            return (version >= self.min_ykver and
                    version <= self.max_ykver)
        else:
            return version >= self.min_ykver
802851
def is_valid(self) -> bool:
        
        return CRCPubkey.from_pubkey(self.pubkey).crc == self.crc
1114020
function checkCRLF() {
				/*function check if the current character is NEWLINE or RETURN
				if RETURN it checks if the next is NEWLINE (CRLF)
				afterwards it sets the charIndex after the NEWLINE, RETURN OR CRLF and currentCharacter to the character at index charIndex*/
				//check if current character at charIndex is NEWLINE (set eol)
				//adds 1 to charIndex
				if ((currentCharacter = text.charCodeAt(charIndex++)) === NEWLINE)
					eol = true;
				//checks if equal to RETURN
				else if (currentCharacter === RETURN) {
					eol = true;
					//checks next character equal to NEWLINE and adds 1 to charindex (total =2)
					if (text.charCodeAt(charIndex) === NEWLINE)
						++charIndex;
				}
				return eol;
			}
1213788
def _check(self):
        

        if self.timestamp < 0.0:
            raise ValueError("the timestamp may not be negative")
        if isinf(self.timestamp):
            raise ValueError("the timestamp may not be infinite")
        if isnan(self.timestamp):
            raise ValueError("the timestamp may not be NaN")

        if self.is_remote_frame and self.is_error_frame:
            raise ValueError("a message cannot be a remote and an error frame at the sane time")

        if self.arbitration_id < 0:
            raise ValueError("arbitration IDs may not be negative")

        if self.is_extended_id:
            if 0x20000000 <= self.arbitration_id:
                raise ValueError("Extended arbitration IDs must be less than 2^29")
        elif 0x800 <= self.arbitration_id:
            raise ValueError("Normal arbitration IDs must be less than 2^11")

        if self.dlc < 0:
            raise ValueError("DLC may not be negative")
        if self.is_fd:
            if 64 < self.dlc:
                raise ValueError("DLC was {} but it should be <= 64 for CAN FD frames".format(self.dlc))
        elif 8 < self.dlc:
            raise ValueError("DLC was {} but it should be <= 8 for normal CAN frames".format(self.dlc))

        if self.is_remote_frame:
            if self.data is not None and len(self.data) != 0:
                raise ValueError("remote frames may not carry any data")
        elif self.dlc != len(self.data):
            raise ValueError("the DLC and the length of the data must match up for non remote frames")

        if not self.is_fd:
            if self.bitrate_switch:
                raise ValueError("bitrate switch is only allowed for CAN FD frames")
            if self.error_state_indicator:
                raise ValueError("error state indicator is only allowed for CAN FD frames")
1139290
public static function checkPcreSupport(): void
	{
		static $supported = null;

		if ($supported === null) {
			$supported = @preg_match('/\pL/u', 'a') === 1;
		}

		if (!$supported) {
			throw new \RuntimeException(sprintf('Missing PCRE unicode support'));
		}
	}
245221
def check_compatibility(name):
    

    comp = comp_names[name]

    if sys.version_info.major < 3 and comp.compat == "python3":
        return False

    if sys.version_info.major >= 3 and comp.compat != "python3":
        return False

    return True
682670
def ok(self):
        
        try:
            v = int(self._value)
            if v < self.imin or v > self.imax:
                return False
            else:
                return True
        except:
            return False
178374
def _crc32(self, ch, crc):
        """"""
        return ((crc >> 8) & 0xffffff) ^ self.crctable[(crc ^ ord(ch)) & 0xff]
678349
def validate_v_rgb(value):
    """"""
    if len(value) != 6:
        raise vol.Invalid(
            '{} is not six characters long'.format(value))
    return validate_hex(value)
1077115
def _verify_shape_compatibility(self, img, img_type):
        """"""

        if self.input_image.shape[:-1] != img.shape:
            raise ValueError('Shape of the {} ({}) is not compatible '
                             'with input image shape: {} '
                             ''.format(img_type, img.shape, self.input_image.shape[:-1]))
58810
private static boolean isNumericSuffix(char c)
  {
    if(c == 'L') return true;
    if(c == 'F') return true;
    if(c == 'D') return true;
    if(c == 'l') return true;
    if(c == 'f') return true;
    if(c == 'd') return true;
    return false;
  }
1253752
def com_google_fonts_check_linegaps(ttFont):
  """"""
  if ttFont["hhea"].lineGap != 0:
    yield WARN, Message("hhea", "hhea lineGap is not equal to 0.")
  elif ttFont["OS/2"].sTypoLineGap != 0:
    yield WARN, Message("OS/2", "OS/2 sTypoLineGap is not equal to 0.")
  else:
    yield PASS, "OS/2 sTypoLineGap and hhea lineGap are both 0."
1080913
def checkReszie(self):
        ''''''
        if not self.resized:
            oldypx = self.ypx
            oldxpx = self.xpx
            self.ypx = self.figure.get_size_inches()[1]*self.figure.dpi
            self.xpx = self.figure.get_size_inches()[0]*self.figure.dpi
            if (oldypx != self.ypx) or (oldxpx != self.xpx):
                self.resized = True
            else:
                self.resized = False