Returns dict {group name -> group indices}.
186322
def indices(self):
        """"""
        self._prep_pandas_groupby()

        def extract_group_indices(frame):
            return (frame[0], frame[1].index)

        return self._mergedRDD.map(extract_group_indices).collectAsMap()
49421
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'gateway_id') and self.gateway_id is not None:
            _dict['gateway_id'] = self.gateway_id
        if hasattr(self, 'name') and self.name is not None:
            _dict['name'] = self.name
        if hasattr(self, 'status') and self.status is not None:
            _dict['status'] = self.status
        if hasattr(self, 'token') and self.token is not None:
            _dict['token'] = self.token
        if hasattr(self, 'token_id') and self.token_id is not None:
            _dict['token_id'] = self.token_id
        return _dict
2528
def get_action_group_names(self):
        """"""
        return self.get_group_names(
            list(itertools.chain(
                *[self._get_array('add'),
                  self._get_array('remove'),
                  self._get_array('isolation-group')])))
1129018
def commdct2grouplist(gcommdct):
    """"""
    gdict = {}
    for objidd in gcommdct:
        group = objidd[0]['group']
        objname = objidd[0]['idfobj']
        if group in gdict:
            gdict[group].append(objname)
        else:
            gdict[group] = [objname, ]
    return gdict
470404
def group(self):
        ""
        if self._group:
            return self._group
        group =  get_ndmapping_label(self, 'group') if len(self) else None
        if group is None:
            return type(self).__name__
        return group
1281315
def groupby_dict(dictionary, key):
    ''' 
    '''
    return dict((k, list(g)) for k, g in itertools.groupby(sorted(dictionary.keys(), key=lambda name: dictionary[name][key]), key=lambda name: dictionary[name][key]))
7901
def get_groupnames(self, sgs):
        
        return ','.join([sgs[sg].get_name() for sg in self.servicegroups])
454905
def to_dict(self):
        
        return {'n':self.n, 'delta':self.delta, 'K':self.K, 'centroids':self.centroids_to_list()}
245717
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'session_id') and self.session_id is not None:
            _dict['session_id'] = self.session_id
        return _dict
283059
def get_groupnames(self, hostgroups):
        
        group_names = []
        for hostgroup_id in self.hostgroups:
            hostgroup = hostgroups[hostgroup_id]
            group_names.append(hostgroup.get_name())
        return ','.join(sorted(group_names))
1097199
def get_group_names(self):
        
        if self._group_names is None:
            self._load_cached_attr("_group_names")

        if self._group_names is None:
            group_infos = self._get_group_infos()
            self._group_names = {
                self._group_type.group_name_from_info(group_info)
                for group_info in group_infos
            }
            self._cache_attr("_group_names")

        return self._group_names
953428
def to_dict(self):
        """"""
        return {
            'high': self.high,
            'low': self.low,
            'mean': self.mean,
            'count': self.count,
            'deviation': self.deviation,
        }
908197
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'name') and self.name is not None:
            _dict['name'] = self.name
        if hasattr(self, 'classifier_id') and self.classifier_id is not None:
            _dict['classifier_id'] = self.classifier_id
        if hasattr(self, 'classes') and self.classes is not None:
            _dict['classes'] = [x._to_dict() for x in self.classes]
        return _dict
418363
def get_group_dict(user=None, include_default=True):
    '''
    
    '''
    if HAS_GRP is False or HAS_PWD is False:
        return {}
    group_dict = {}
    group_names = get_group_list(user, include_default=include_default)
    for group in group_names:
        group_dict.update({group: grp.getgrnam(group).gr_gid})
    return group_dict
999163
def get_group(self, group_descriptor):
        
        route_values = {}
        if group_descriptor is not None:
            route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str')
        response = self._send(http_method='GET',
                              location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('GraphGroup', response)
903255
def convert_to_dict(self):
        """"""
        out_dict = {}
        out_dict["groupName"] = self.group_name
        out_dict["atomNameList"] = self.atom_name_list
        out_dict["elementList"] = self.element_list
        out_dict["bondOrderList"] = self.bond_order_list
        out_dict["bondAtomList"] = self.bond_atom_list
        out_dict["formalChargeList"] = self.charge_list
        out_dict["singleLetterCode"] = self.single_letter_code
        out_dict["chemCompType"] = self.group_type
        return out_dict
1105227
def groups(self):
        """"""
        self._prep_pandas_groupby()

        def extract_group_labels(frame):
            return (frame[0], frame[1].index.values)

        return self._mergedRDD.map(extract_group_labels).collectAsMap()