Return True if names are not incompatible.

        This checks that the gender of titles and compatibility of suffixes
765077
def _is_compatible_with(self, other):
        

        title = self._compare_title(other)
        suffix = self._compare_suffix(other)

        return title and suffix
374898
public function checkName () {
        $result = true;

        if ($this->name != preg_replace('/[^a-z0-9_ -]/i', '', $this->name)) {
            $result = false;
        }
        return $result;
    }
419894
private static boolean isPropertyName(String name) {
        return ((name.length() > 0) && Character.isUpperCase(name.charAt(0))) || ((name.length() > 1) && Character.isUpperCase(name.charAt(1)));
    }
223046
def equate_prefix(name1, name2):
    

    if len(name1) == 0 or len(name2) == 0:
        return False

    return name1.startswith(name2) or name2.startswith(name1)
466356
public boolean is(String... names)
	{
		boolean b = true;
		for (String n : names)
		{
			b &= name.toLowerCase().contains(n.toLowerCase());
		}
		return b;
	}
1153360
def match(self, name):
		''''''
		if (self.ns + self.name).startswith(name):
			return True

		for alias in self.aliases:
			if (self.ns + alias).startswith(name):
				return True
1146873
def suffixes_for(name)
      name = name.to_s
      self.suffixes[name] ||= begin
        ol = overlay
        name_x = name.dup
        if name_x.sub!(/_([A-Z]+)$/, '')
          ol = $1
        end
        name_x.freeze
        result = if ol
          ol_ = ol.upcase
          ol = ol.downcase
          x = []
          SUFFIXES.each do |suffix|
            # Standard, no overlay:
            # e.g.: database_<suffix>.yml
            x << suffix

            # Overlay:
            # e.g.: database_(US|GB)_<suffix>.yml
            x << [ol_, suffix]
          end
          [name_x, x.freeze]
        else
          [name.dup.freeze, SUFFIXES.freeze]
        end
        result.freeze

        logger.debug "suffixes(#{name}) => #{result.inspect}"

        result
      end
    end
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
200567
def _publish_match(self, publish, names=False, name_only=False):
        
        if names:
            for name in names:
                if not name_only and isinstance(name, re._pattern_type):
                    if re.match(name, publish.name):
                        return True
                else:
                    operand = name if name_only else [name, './%s' % name]
                    if publish in operand:
                        return True
            return False
        else:
            return True
1137291
private boolean compatible(int i, int j, Set<Integer> T[][]) {
	if(s2comp[i] != s2comp[j]) return false;
	for(int k = 0; k < nbLabels; k++) {
	    if(! T[i][k].equals(T[j][k])) return false;
	}
	return true;
    }
1059114
def compatible(self, a, b):
        """"""
        return len(set([a] + self.descendants(a))
                   .intersection([b] + self.descendants(b))) > 0
896178
def can_handle_suffix(self, suffix):
        
        for index in self._indexes:
            if index.can_handle_suffix(suffix):
                return True

        return False
537159
def full_name(self, gender: Optional[Gender] = None,
                  reverse: bool = False) -> str:
        
        if gender is None:
            gender = get_random_item(Gender, rnd=self.random)

        if gender and isinstance(gender, Gender):
            gender = gender
        else:
            raise NonEnumerableError(Gender)

        fmt = '{1} {0}' if reverse else '{0} {1}'
        return fmt.format(
            self.name(gender),
            self.surname(gender),
        )
84928
public boolean matches(String name) {
		if (name == null) {
			return pattern.equals("");
		}
		if (all != null) {
			return all.equals(name);
		}
		if (middle != null) {
			return name.contains(middle);
		}
		if (start != null && !name.startsWith(start)) {
			return false;
		}

		return end == null || name.endsWith(end);
	}
448761
def name_is_valid(name):
    
    # The name can only be 80 characters long.
    if len(name) > MAX_NAME_LENGTH:
        return False
    return bool(NAME_VALID_CHARS_REGEX.match(name))
164525
def match(self, name):
        
        for pat in self.pats:
            if fnmatch.fnmatch(name, pat):
                return True

        return False
38610
def is_compatible(self, other):
        
        super(Array2D, self).is_compatible(other)
        # check y-axis metadata
        if isinstance(other, type(self)):
            try:
                if not self.dy == other.dy:
                    raise ValueError("%s sample sizes do not match: "
                                     "%s vs %s." % (type(self).__name__,
                                                    self.dy, other.dy))
            except AttributeError:
                raise ValueError("Series with irregular y-indexes cannot "
                                 "be compatible")

        return True