Report whether a sample of the feature satisfies the criteria.
332605
public static <S,V> boolean the(S subject, Feature<? super S,V> feature, Matcher<? super V> criteria) {
        return criteria.matches(feature.of(subject));
    }
444543
def mark_fit_good(self, fit, spec=None):
        
        if spec == None:
            for spec, fits in list(self.pmag_results_data['specimens'].items()):
                if fit in fits:
                    break
        samp = self.Data_hierarchy['sample_of_specimen'][spec]
        if 'sample_orientation_flag' not in self.Data_info['er_samples'][samp]:
            self.Data_info['er_samples'][samp]['sample_orientation_flag'] = 'g'
        samp_flag = self.Data_info['er_samples'][samp]['sample_orientation_flag']
        if samp_flag == 'g':
            self.bad_fits.remove(fit)
            return True
        else:
            self.user_warning(
                "Cannot mark this interpretation good its sample orientation has been marked bad")
            return False
155708
def check(self, feature):
        """"""
        mapper = feature.as_dataframe_mapper()
        X = mapper.fit_transform(self.X, y=self.y)
        assert not np.any(np.isnan(X))
945499
def validate_feature (name):
    
    assert isinstance(name, basestring)
    if name not in __all_features:
        raise InvalidFeature ("'%s' is not a valid feature name" % name)
    else:
        return __all_features[name]
1139291
def hasFeature(self, prop, check_softs=False):
        """"""

        return prop in self.props or (check_softs and
                                      any([fs.hasFeature(prop) for fs in self.props.get(SoftFeatures.SOFT, [])]))
1084713
function checkFeature(point) {
  var feature;
  // Check if there is already a feature object for the given point
  for (var i = 0; i < feature_list.length; i++) {
    feature = feature_list[i];
    if (feature.location.latitude === point.latitude &&
        feature.location.longitude === point.longitude) {
      return feature;
    }
  }
  var name = '';
  feature = {
    name: name,
    location: point
  };
  return feature;
}
959046
def __criteria(self, obj, matches=None, mt=None, lt=None, eq=None):
        '''
        
        '''
        # Fail matcher if "less than"
        for field, value in (mt or {}).items():
            if getattr(obj, field) <= value:
                return False

        # Fail matcher if "more than"
        for field, value in (lt or {}).items():
            if getattr(obj, field) >= value:
                return False

        # Fail matcher if "not equal"
        for field, value in (eq or {}).items():
            if getattr(obj, field) != value:
                return False

        # Fail matcher if "doesn't match"
        for field, value in (matches or {}).items():
            if not re.search(value, str(getattr(obj, field))):
                return False

        return True
138868
def successful(self):
        """"""
        status = self.status
        assert status >= COMPLETED, "status is %s" % status
        return (self.status == COMPLETED)
399348
def hasFeature(featureList, feature):
    
    for f in featureList:
        if f[0] == feature or Features[f[0]] == feature:
            return f[1]
1005526
def is_valid_shape(value):
    """"""
    if is_int_positive(value):
        return True, value
    elif isinstance(value, tuple) or isinstance(value, list):
        for v in value:
            if not is_int_positive(v):
                return False, value
        return True, value
    else:
        return False, value
1292242
def satisfies_constraints(self, possible_solution):
        """"""
        for c in self._constraints:
            values = c.extract_values(possible_solution)
            if values is None or not c(*values):
                return False
        return True
579565
def _record(self, value, rank, delta, successor):
        """"""
        self._observations += 1
        self._items += 1

        return _Sample(value, rank, delta, successor)
987775
public function hasFeature($feature)
    {
        return (isset($this->_aFeatures[$feature]) && !is_null($this->_aFeatures[$feature]));
    }
393409
def check(self, item_id):
        
        response = self._request("/submission/sample/{sample_id}".format(sample_id=item_id), headers=self.headers)

        if response.status_code == 404:
            # unknown id
            return False

        try:
            finished = False
            for submission in response.json()['data']:
                finished = finished or submission['submission_finished']
            if finished:
                return True

        except (ValueError, KeyError) as e:
            raise sandboxapi.SandboxError(e)

        return False
58910
def _get_sample_select(samples, keep):
    """"""
    k = np.ones_like(samples, dtype=bool)
    if keep is not None:
        k = np.array([s in keep for s in samples], dtype=bool)
        if np.sum(k) == 0:
            logger.warning("No samples matched the keep list")
    return k
90365
def report(data):
    """"""
    work_dir = dd.get_work_dir(data[0][0])
    out_dir = op.join(work_dir, "report")
    safe_makedir(out_dir)
    summary_file = op.join(out_dir, "summary.csv")
    with file_transaction(summary_file) as out_tx:
        with open(out_tx, 'w') as out_handle:
            out_handle.write("sample_id,%s\n" % _guess_header(data[0][0]))
            for sample in data:
                info = sample[0]
                group = _guess_group(info)
                files = info["seqbuster"] if "seqbuster" in info else "None"
                out_handle.write(",".join([dd.get_sample_name(info),
                                           group]) + "\n")
    _modify_report(work_dir, out_dir)
    return summary_file
161309
def report(rel):
    """"""

    if "Fedora" in rel.product:
        return make_pass("IS_FEDORA", product=rel.product)
    else:
        return make_fail("IS_NOT_FEDORA", product=rel.product)