Satisfies a platform
542245
function satisfiesPlatform(platform, list) {
    if (_.contains(list, platform)) return true;

    // By default, user 32bits version
    if (_.contains(list+'_32', platform)) return true;

    return false;
}
573584
function satisfies(version, range) {
  range = range.trim();

  // Range '<=99.999.99999' means "all versions", but fails on "2014.10.20-1"
  if (range === '<=99.999.99999') return true;

  // If semver satisfies, we return true
  if (semver.satisfies(version, range)) return true;

  // If range is a specific version, return eq
  if (semver.valid(range)) return semver.eq(version, range);

  if (range.includes('||')) {
    // Multiple ranges, "or"
    return range.split('||').some(sub => satisfies(version, sub.trim()));
  }

  if (range.includes(' ')) {
    // Multiple ranges, "and"
    return range.split(' ')
      .map(x => x.trim())
      .filter(x => x)
      .every(sub => satisfies(version, sub));
  }

  // Comparison
  if (range.startsWith('>=')) {
    const sub = range.slice(2).trim();
    if (semver.valid(sub)) return semver.gte(version, sub);
  } else if (range.startsWith('<=')) {
    const sub = range.slice(2).trim();
    if (semver.valid(sub)) return semver.lte(version, sub);
  } else if (range.startsWith('>')) {
    const sub = range.slice(1).trim();
    if (semver.valid(sub)) return semver.gt(version, sub);
  } else if (range.startsWith('<')) {
    const sub = range.slice(1).trim();
    if (semver.valid(sub)) return semver.lt(version, sub);
  }

  console.error(`Unprocessed version/range: ${version}, ${JSON.stringify(range)}`);

  return false;
}
663497
def satisfies_constraint(self, site):
        
        if not site.is_ordered:
            return False

        if self.species_constraints \
                and str(site.specie) in self.species_constraints:
            satisfies_constraints = True
        else:
            satisfies_constraints = False

        if self.site_constraint_name \
                and self.site_constraint_name in site.properties:
            prop = site.properties[self.site_constraint_name]
            if prop in self.site_constraints:
                satisfies_constraints = True
            else:
                satisfies_constraints = False

        return satisfies_constraints
1327482
async def build_platform(self, cls: Type[Platform], custom_id):
        

        from bernard.server.http import router

        p = cls()

        if custom_id:
            p._id = custom_id

        await p.async_init()
        p.on_message(self.fsm.handle_message)
        p.hook_up(router)
        return p
516334
function getPlatforms(tdef) {
	const platforms = [];

	if (tdef) {
		tdef.deployUnits.array.forEach((du) => {
			const platform = du.findFiltersByID('platform');
			if (platform && platforms.indexOf(platform.value) === -1) {
				platforms.push(platform.value);
			}
		});
	}

	return platforms;
}
1210040
@Override
	public boolean satisfies(Match match, int... ind)
	{
		Collection<BioPAXElement> set = con.generate(match, ind);
		
		switch (type)
		{
			case EQUAL: return set.size() == size;
			case GREATER: return set.size() > size;
			case GREATER_OR_EQUAL: return set.size() >= size;
			case LESS: return set.size() < size;
			case LESS_OR_EQUAL: return set.size() <= size;
			default: throw new RuntimeException(
				"Should not reach here. Did somebody modify Type enum?");
		}
	}
1101690
def satisfiesExternal(cntxt: Context, n: Node, se: ShExJ.ShapeExternal, c: DebugContext) -> bool:
    
    if c.debug:
        print(f"id: {se.id}")
    extern_shape = cntxt.external_shape_for(se.id)
    if extern_shape:
        return satisfies(cntxt, n, extern_shape)
    cntxt.fail_reason = f"{se.id}: Shape is not in Schema"
    return False
872088
function fetchAndInstantiate() {
    return fetch(url).then(response =>
      response.arrayBuffer()
    ).then(buffer =>
      WebAssembly.instantiate(buffer, importObject)
    )
  }
1046578
@Override
	public boolean satisfies(Match match, int... ind)
	{
		PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[0]);
		PhysicalEntity pe2 = (PhysicalEntity) match.get(ind[1]);

		Set<ModificationFeature>[] mods =
			DifferentialModificationUtil.getChangedModifications(pe1, pe2);

		Set<String> terms;

		if (type == Type.GAIN) terms = collectTerms(mods[0]);
		else if (type == Type.LOSS) terms = collectTerms(mods[1]);
		else terms = collectTerms(mods);

		return termsContainDesired(terms);
	}
1265368
public boolean satisfied( PropertySet properties)
    {
    boolean isSatisfied;
    Iterator<IDisjunct> disjuncts;
    
    for( disjuncts = getDisjuncts(),
           isSatisfied = true;
           

         isSatisfied
           && disjuncts.hasNext();

         isSatisfied = disjuncts.next().satisfied( properties));
    
    return isSatisfied;
    }
688664
async function finaliseRepo(config, branchList) {
  // TODO: Promise.all
  await validatePrs(config);
  await pruneStaleBranches(config, branchList);
  await platform.ensureIssueClosing(
    `Action Required: Fix ${appName} Configuration`
  );
}
78336
@Override
	public boolean satisfies(Match match, int... ind)
	{
		int x = -1;
		for (MappedConst mc : con)
		{
			if (mc.satisfies(match, ind)) x *= -1;
		}
		return x == 1;
	}
615170
def install_boards(boardfamily)
      # TODO: find out why IO.pipe fails but File::NULL succeeds :(
      result = run_and_capture(flag_install_boards, boardfamily)
      already_installed = result[:err].include?("Platform is already installed!")
      result[:success] || already_installed
    end
746535
function isValidPlatform() {
    if (appSettings.overrides && appSettings.overrides.platform) {
        return true; //If a platform override is set, it's always valid
    }
    return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
}
488968
public static boolean satisfiesSome( IConjunct condition, PropertySet properties)
    {
    boolean satisfies;
    Iterator<IDisjunct> disjuncts;
    for( disjuncts = condition.getDisjuncts(),
           satisfies = !disjuncts.hasNext();
         
         !satisfies
           && disjuncts.hasNext();

         satisfies = disjuncts.next().satisfied( properties));

    return satisfies;
    }
543870
def _fulfills_version_spec(versions, oper, desired_version,
                           ignore_epoch=False):
    '''
    
    '''
    cmp_func = __salt__.get('pkg.version_cmp')
    # stripping "with_origin" dict wrapper
    if salt.utils.platform.is_freebsd():
        if isinstance(versions, dict) and 'version' in versions:
            versions = versions['version']
    for ver in versions:
        if (oper == '==' and fnmatch.fnmatch(ver, desired_version)) \
                or salt.utils.versions.compare(ver1=ver,
                                               oper=oper,
                                               ver2=desired_version,
                                               cmp_func=cmp_func,
                                               ignore_epoch=ignore_epoch):
            return True
    return False
165588
private static boolean pointEqualsPoint_(Point2D pt_a, Point2D pt_b,
			double tolerance, ProgressTracker progress_tracker) {
		if (Point2D.sqrDistance(pt_a, pt_b) <= tolerance * tolerance)
			return true;

		return false;
	}