Return ``True`` if the mimetype is not blacklisted.

    :rtype: bool
197848
def is_valid_mimetype(response):
    
    blacklist = [
        'image/',
    ]

    mimetype = response.get('mimeType')
    if not mimetype:
        return True

    for bw in blacklist:
        if bw in mimetype:
            return False

    return True
633199
def set_blacklisted_plugins(self, plugins):
        
        plugins = util.return_list(plugins)
        self.blacklisted_plugins = plugins
1075821
private function verifyMimeType($mime_type)
    {
        $allowed = $this->config['allowed_mime_types'];
        if (! empty($allowed) && ! in_array(strtolower($mime_type), $allowed)) {
            throw FileNotSupportedException::mimeRestricted(strtolower($mime_type), $allowed);
        }

        return $mime_type;
    }
310903
def check_type(self):
        """"""
        self.isdiscrete = {}
        for stochastic in self.stochastics:
            if stochastic.dtype in integer_dtypes:
                self.isdiscrete[stochastic] = True
            elif stochastic.dtype in bool_dtypes:
                raise ValueError(
                    'Binary stochastics not supported by AdaptativeMetropolis.')
            else:
                self.isdiscrete[stochastic] = False
583512
def get_filter(cls, mimetype):
        
        filters = ' '.join(
            ['*%s' % ext for ext in mimetypes.guess_all_extensions(mimetype)])
        return '%s (%s)' % (mimetype, filters)
557044
def set_mime_type(self, mime_type):
        
        try:
            self.set_lexer_from_mime_type(mime_type)
        except ClassNotFound:
            _logger().exception('failed to get lexer from mimetype')
            self._lexer = TextLexer()
            return False
        except ImportError:
            # import error while loading some pygments plugins, the editor
            # should not crash
            _logger().warning('failed to get lexer from mimetype (%s)' %
                              mime_type)
            self._lexer = TextLexer()
            return False
        else:
            return True
1167216
def is_no_type_check(memb):
    
    try:
        return hasattr(memb, '__no_type_check__') and memb.__no_type_check__ or \
                memb in _not_type_checked
    except TypeError:
        return False
904835
def mime(self):
        '''
        
        '''
        return self.metadata['ContentType'] if 'ContentType' in self.metadata else BaseEngine.get_mimetype(self.buffer)
345036
function isMimeType(str) {
  (0, _assertString.default)(str);
  return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
}
62190
public function isType($path, $mimeType)
    {
        $mimeTypes = explode('|', $mimeType);

        return (in_array(self::getType($path), $mimeTypes));
    }
855333
def _remove_blacklisted(self, filepaths):
        
        filepaths = util.remove_from_set(filepaths, self.blacklisted_filepaths)
        return filepaths
205168
protected boolean shouldDetectMimeType(String mimeType) {
		for (String prefix : untrustfulMimeTypes) {
			if (mimeType.startsWith(prefix)) return true;
		}
		return false;
	}
1255481
def detect_mimetype(file_data)
      if file_data.content_type.strip == "application/octet-stream"
        return File.mime_type?(file_data.original_filename)
      else
        return file_data.content_type
      end
    end
1346218
def is_pk_descriptor(descriptor, include_alt=False):
    """"""
    if descriptor.pk is True or type(descriptor.pk) is int:
        return True
    if include_alt:
        return descriptor.alt_pk is True or type(descriptor.alt_pk) is int
    else:
        return False
657523
def check_backend() -> bool:
        """"""
        try:
            import bluepy.btle  # noqa: F401 #pylint: disable=unused-import
            return True
        except ImportError as importerror:
            _LOGGER.error('bluepy not found: %s', str(importerror))
        return False
809100
def IsBinary(self, filename):
		""""""
		mimetype = mimetypes.guess_type(filename)[0]
		if not mimetype:
			return False  # e.g. README, "real" binaries usually have an extension
		# special case for text files which don't start with text/
		if mimetype in TEXT_MIMETYPES:
			return False
		return not mimetype.startswith("text/")
92138
def _is_excluded(self, prop, info_dict):
        
        if prop.key in BLACKLISTED_KEYS:
            return True

        if info_dict.get('exclude', False):
            return True

        if prop.key in self.excludes:
            return True

        if self.includes and prop.key not in self.includes:
            return True

        return False