Return True or False for the given feature.
488188
def show_feature(self, user, feature):
        
        user_filter = {
            self.model.USER_FEATURE_FIELD: user,
        }
        return self.get_feature(feature).filter(
            models.Q(**user_filter) | models.Q(everyone=True)).exists()
5685
def check(self, feature):
        """"""
        mapper = feature.as_dataframe_mapper()
        mapper.fit(self.X, y=self.y)
744977
def validate_feature_api(project, force=False):
    """"""
    if not force and not project.on_pr():
        raise SkippedValidationTest('Not on PR')

    validator = FeatureApiValidator(project)
    result = validator.validate()
    if not result:
        raise InvalidFeatureApi
850905
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.getLocation().getLatitude() === point.getLatitude() &&
        feature.getLocation().getLongitude() === point.getLongitude()) {
      return feature;
    }
  }
  var name = '';
  feature = new messages.Feature();
  feature.setName(name);
  feature.setLocation(point);
  return feature;
}
332605
public static <S,V> boolean the(S subject, Feature<? super S,V> feature, Matcher<? super V> criteria) {
        return criteria.matches(feature.of(subject));
    }
1128074
public boolean isEnabled(Feature feature) {
        Boolean enabled = features.get(feature);
        if (enabled == null) {
            return feature.isEnabledByDefault();
        } else {
            return enabled;
        }
    }
443263
public function canUse($feature)
    {
        // Get features and usage
        $feature_value = $this->value($feature);

        if (is_null($feature_value)) {
            return false;
        }

        // Match "booleans" type value
        if ($this->enabled($feature) === true) {
            return true;
        }

        // If the feature value is zero, let's return false
        // since there's no uses available. (useful to disable
        // countable features)
        if ($feature_value === '0') {
            return false;
        }

        // Check for available uses
        return $this->remainings($feature) > 0;
    }
369605
def check(self, feature):
        """"""
        input = feature.input
        is_str = isa(str)
        is_nested_str = all_fn(
            iterable, lambda x: all(is_str, x))
        assert is_str(input) or is_nested_str(input)
891785
def to_feature(value):
  """"""
  if isinstance(value, FeatureConnector):
    return value
  elif utils.is_dtype(value):  # tf.int32, tf.string,...
    return Tensor(shape=(), dtype=tf.as_dtype(value))
  elif isinstance(value, dict):
    return FeaturesDict(value)
  else:
    raise ValueError('Feature not supported: {}'.format(value))
1107485
public function HasFeature($Feature) {
      return isset($this->Features[$Feature]) ? $this->Features[$Feature] : Gdn_Cache::CACHEOP_FAILURE;
   }
516984
public function supports($feature)
    {
        if (!$this->controller) {
            return false;
        }

        $s = 'support'.$feature;

        return $this->controller->$s;
    }
343692
def has_feature_flags():
    '''
    
    '''
    # get man location
    man = salt.utils.path.which('man')
    return _check_retcode('{man} zpool-features'.format(
        man=man
    )) if man else False
1166747
def getFeature(self, prop):
        """"""

        f = self.props.get(prop, None)
        if not f:
            return None
        if isinstance(f, Feature):
            return f
        if isinstance(f, tuple):
            if f[0]:
                return f[0]
            elif f[1]:
                return f[1]
            raise Exception("Getting value from a property with a constrain")
        if isinstance(f, list):
            return f
        raise Exception("Getting value from a not simple property.")
1031470
private static boolean requiredByOtherFeature(Map<String, ProvisioningFeatureDefinition> features, File baseDir, File testFile) {
        for (ProvisioningFeatureDefinition fd : features.values()) {
            if (requiredByFile(fd, baseDir, testFile))
                return true;
        }
        return false;
    }
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, [])]))
855661
def p_feature_contains(self, t):
        """"""

        t[0] = Feature(t[1], t[2], Features(t[4]), line=t.lineno(1))
1068248
function(feature) {
        var activated = false;
        if(!this.handlers.drag.dragging) {
            this.feature = feature;
            this.handlers.drag.activate();
            activated = true;
            this.over = true;
            OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over");
            this.onEnter(feature);
        } else {
            if(this.feature.id == feature.id) {
                this.over = true;
            } else {
                this.over = false;
            }
        }
        return activated;
    }