Prepare list of allowed group names.

    :param groups: The complete list of groups.
    :returns: A filtered list of groups.
485109
def fetch_groups(groups):
    
    hidden_groups = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS', OAUTHCLIENT_CERN_HIDDEN_GROUPS)
    hidden_groups_re = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE',
        OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE)
    groups = [group for group in groups if group not in hidden_groups]
    filter_groups = []
    for regexp in hidden_groups_re:
        for group in groups:
            if regexp.match(group):
                filter_groups.append(group)
    groups = [group for group in groups if group not in filter_groups]

    return groups
702075
def Subgroups(self):
		

		return(Groups(alias=self.alias,groups_lst=self.data['groups'],session=self.session))
123385
def list_groups(self, **kwargs):
        
        response = self._do_request('GET', '/v2/groups')
        groups = self._parse_response(
            response, MarathonGroup, is_list=True, resource_name='groups')
        for k, v in kwargs.items():
            groups = [o for o in groups if getattr(o, k) == v]
        return groups
475621
def setGroups(self, *args, **kwargs):
        
        try:
            groups = self.mambugroupsclass(creditOfficerUsername=self['username'], *args, **kwargs)
        except AttributeError as ae:
            from .mambugroup import MambuGroups
            self.mambugroupsclass = MambuGroups
            groups = self.mambugroupsclass(creditOfficerUsername=self['username'], *args, **kwargs)
        self['groups'] = groups

        return 1
689385
def get_groupaliases(self, hostgroups):
        
        group_aliases = []
        for hostgroup_id in self.hostgroups:
            hostgroup = hostgroups[hostgroup_id]
            group_aliases.append(hostgroup.alias)
        return ','.join(sorted(group_aliases))
265524
def get_groups(self, load):
        '''
        
        '''
        if 'eauth' not in load:
            return False
        fstr = '{0}.groups'.format(load['eauth'])
        if fstr not in self.auth:
            return False
        fcall = salt.utils.args.format_call(
            self.auth[fstr],
            load,
            expected_extra_kws=AUTH_INTERNAL_KEYWORDS)
        try:
            return self.auth[fstr](*fcall['args'], **fcall['kwargs'])
        except IndexError:
            return False
        except Exception:
            return None
437766
def _group_get_hostnames(self, group_name):
        
        hostnames = []

        hosts_section = self._get_section(group_name, 'hosts')
        if hosts_section:
            for entry in hosts_section['entries']:
                hostnames.extend(self.expand_hostdef(entry['name']))

        children_section = self._get_section(group_name, 'children')
        if children_section:
            for entry in children_section['entries']:
                hostnames.extend(self._group_get_hostnames(entry['name']))

        return hostnames
131544
def get_groups(self):
        
        response = self.client.list_groups(UserPoolId=self.user_pool_id)
        return [self.get_group_obj(group_data)
                for group_data in response.get('Groups')]
303719
def get_group(self, name, default=NoGroupError):
        '''
        
        '''

        if name in self.groups:
            return self.groups[name]

        if default is NoGroupError:
            raise NoGroupError('No such group: {0}'.format(name))

        return default
163881
def _init_groups(self, string):
        

        taf_group_pattern = """
            (?:FM|(?:PROB(?:\d{1,2})\s*(?:TEMPO)?)|TEMPO|BECMG|[\S\s])[A-Z0-9\+\-/\s$]+?(?=FM|PROB|TEMPO|BECMG|$)
        """

        group_list = []

        groups = re.findall(taf_group_pattern, string, re.VERBOSE)
        if not groups:
            raise MalformedTAF("No valid groups found")

        for group in groups:
            group_list.append(group)

        return(group_list)
299276
def groups(self):
        
        _tables()
        self._check_if_open()
        return [
            g for g in self._handle.walk_groups()
            if (not isinstance(g, _table_mod.link.Link) and
                (getattr(g._v_attrs, 'pandas_type', None) or
                 getattr(g, 'table', None) or
                (isinstance(g, _table_mod.table.Table) and
                 g._v_name != 'table')))
        ]
301917
def get_groups(self):
        
        res = self._make_ocs_request(
            'GET',
            self.OCS_SERVICE_CLOUD,
            'groups'
        )

        if res.status_code == 200:
            tree = ET.fromstring(res.content)
            groups = [x.text for x in tree.findall('data/groups/element')]

            return groups

        raise HTTPResponseError(res)
1212073
def _groupname():
    '''
    
    '''
    if grp:
        try:
            groupname = grp.getgrgid(os.getgid()).gr_name
        except KeyError:
            groupname = ''
    else:
        groupname = ''

    return groupname
1020909
def iter_groups(self):
        

        for i, _ in enumerate(self.groups):
            yield self.get_group(i)
277425
def groups(self):
        
        HiisiHDF._clear_cache()
        self.CACHE['group_paths'].append('/')
        self.visititems(HiisiHDF._is_group)
        return HiisiHDF.CACHE['group_paths']
1347686
def hosts_in_group(self, groupname):
        
        result = []
        for hostname, hostinfo in self.hosts.items():
            if groupname == 'all':
                result.append(hostname)
            elif 'groups' in hostinfo:
                if groupname in hostinfo['groups']:
                    result.append(hostname)
            else:
                hostinfo['groups'] = [groupname]
        return result
659478
def get_nested_groups(self, username):
        

        response = self._get(self.rest_url + "/user/group/nested",
                             params={"username": username})

        if not response.ok:
            return None

        return [g['name'] for g in response.json()['groups']]