Return the description matching the given ability name. Check abilities.json in the same directory.
437761
def get_ability_desc(ability):
    """"""
    srcpath = path.dirname(__file__)
    try:
        f = open(path.join(srcpath, 'abilities.json'), 'r')
    except IOError:
        get_abilities()
        f = open(path.join(srcpath, 'abilities.json'), 'r')
    finally:
        with f:
            return json.load(f)[ability].encode('utf-8')
351463
public boolean hasDescriptionForParameter(String name) {
    if (documentation == null || documentation.parameters == null) {
      return false;
    }

    return documentation.parameters.containsKey(name);
  }
1052367
def capabilities(self):
        
        response = self.get(PATH_CAPABILITIES)
        return _load_atom(response, MATCH_ENTRY_CONTENT).capabilities
1296697
def info(name):
    '''
    
    '''
    if HAS_SPWD:
        try:
            data = spwd.getspnam(name)
            ret = {
                'name': data.sp_nam,
                'passwd': data.sp_pwd,
                'lstchg': data.sp_lstchg,
                'min': data.sp_min,
                'max': data.sp_max,
                'warn': data.sp_warn,
                'inact': data.sp_inact,
                'expire': data.sp_expire}
        except KeyError:
            ret = {
                'name': '',
                'passwd': '',
                'lstchg': '',
                'min': '',
                'max': '',
                'warn': '',
                'inact': '',
                'expire': ''}
        return ret

    # SmartOS joyent_20130322T181205Z does not have spwd, but not all is lost
    # Return what we can know
    ret = {
        'name': '',
        'passwd': '',
        'lstchg': '',
        'min': '',
        'max': '',
        'warn': '',
        'inact': '',
        'expire': ''}

    try:
        data = pwd.getpwnam(name)
        ret.update({
            'name': name
        })
    except KeyError:
        return ret

    # To compensate for lack of spwd module, read in password hash from /etc/shadow
    s_file = '/etc/shadow'
    if not os.path.isfile(s_file):
        return ret
    with salt.utils.files.fopen(s_file, 'rb') as ifile:
        for line in ifile:
            comps = line.strip().split(':')
            if comps[0] == name:
                ret.update({'passwd': comps[1]})

    # For SmartOS `passwd -s <username>` and the output format is:
    #   name status mm/dd/yy min max warn
    #
    # Fields:
    #  1. Name: username
    #  2. Status:
    #      - LK: locked
    #      - NL: no login
    #      - NP: No password
    #      - PS: Password
    #  3. Last password change
    #  4. Minimum age
    #  5. Maximum age
    #  6. Warning period

    output = __salt__['cmd.run_all']('passwd -s {0}'.format(name), python_shell=False)
    if output['retcode'] != 0:
        return ret

    fields = output['stdout'].split()
    if len(fields) == 2:
        # For example:
        #   root      NL
        return ret
    # We have all fields:
    #   buildbot L 05/09/2013 0 99999 7
    ret.update({
        'name': data.pw_name,
        'lstchg': fields[2],
        'min': int(fields[3]),
        'max': int(fields[4]),
        'warn': int(fields[5]),
        'inact': '',
        'expire': ''
    })
    return ret
942484
def get_description(self):
        """"""
        return DisplayText(text='Agent representing ' + str(self.id_),
                           language_type=DEFAULT_LANGUAGE_TYPE,
                           script_type=DEFAULT_SCRIPT_TYPE,
                           format_type=DEFAULT_FORMAT_TYPE,)
210667
def describe(self):
        
        return {
            "name": self.name,
            "params": self.params,
            "returns": self.returns,
            "description": self.description,
        }
809140
def info(self, name):
        """"""
        r = requests.get('{}/{}'.format(self.url_service, name))
        return r.json()
237520
def json_data(self, name):
        

        # Check the write permission of the context
        # XXX: This should be done on field level by the field manager adapter
        if not self.can_write():
            raise Unauthorized("You are not allowed to modify this content")

        # fetch the field by name
        field = api.get_field(self.context, name)

        # bail out if we have no field
        if not field:
            return None

        fieldmanager = IFieldManager(field)
        return fieldmanager.json_data(self.context)
1204698
def check_description(package_info, *args):
    
    reason = "Description missing"
    result = False

    if package_info.get('description') not in BAD_VALUES:
        result = True

    return result, reason, HAS_DESCRIPTION
709246
def describe(Name,
             region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        rule = conn.describe_rule(Name=Name)
        if rule:
            keys = ('Name', 'Arn', 'EventPattern',
                    'ScheduleExpression', 'State',
                    'Description',
                    'RoleArn')
            return {'rule': dict([(k, rule.get(k)) for k in keys])}
        else:
            return {'rule': None}
    except ClientError as e:
        err = __utils__['boto3.get_error'](e)
        if e.response.get('Error', {}).get('Code') == 'RuleNotFoundException':
            return {'error': "Rule {0} not found".format(Rule)}
        return {'error': __utils__['boto3.get_error'](e)}
9737
def find_by_name name
      name = CGI.escape name.downcase.gsub(/\s/, '')
      DynamicModel.new perform_request api_url "summoners/by-name/#{name}"
    end
818592
def json_description(shape, **metadata):
    
    metadata.update(shape=shape)
    return json.dumps(metadata)
1138105
def get(name):
    """"""

    filename = find(name)
    if filename is None:
        raise RuntimeError('Could not find %s' % name)
    with open(filename) as fid:
        return fid.read()
1353601
async def get_available_abilities(self, units: Union[List[Unit], Units], ignore_resource_requirements=False) -> List[List[AbilityId]]:
        
        # right know only checks cooldown, energy cost, and whether the ability has been researched
        return await self._client.query_available_abilities(units, ignore_resource_requirements)
1295541
def list_capability_definitions(service_instance=None):
    '''
    
    '''
    profile_manager = salt.utils.pbm.get_profile_manager(service_instance)
    ret_list = [_get_capability_definition_dict(c) for c in
                salt.utils.pbm.get_capability_definitions(profile_manager)]
    return ret_list
762047
def _description(self):
        """"""

        inst = self.timemachine.presently

        if self.action_type == "dl":
            return "Deleted %s" % inst.content_type.name
        elif self.action_type == "cr":
            return "Created %s" % inst._object_type_html()
        else:
            return "Modified %s" % inst._object_type_html()
18124
def description(self, platform, key):
        """"""
        patterns = self._dict_dscr.get(platform, None)
        description = patterns.get(key, None)
        return description