Show information about the cluster with id/label `cluster_id_label`.
436919
def show(cls, cluster_id_label):
        
        conn = Qubole.agent()
        return conn.get(cls.element_path(cluster_id_label))
413674
def cluster_node(self, node_id):
        
        path = '/ws/v1/cluster/nodes/{nodeid}'.format(nodeid=node_id)

        return self.request(path)
1018797
def _fetch_partition_info(self, topic_id, partition_id):
        """"""
        info_path = "/brokers/topics/{topic_id}/partitions/{p_id}"
        try:
            _, partition_info = self.get(
                info_path.format(topic_id=topic_id, p_id=partition_id),
            )
            return partition_info
        except NoNodeError:
            return {}
1011202
def show(self):
        """"""
        for entry in self._entries:
            print "{'%s': %s, 'records': %s}" % (
                entry._record_type, entry.host, entry.records)
        print
933372
def start(cls, cluster_id_label, api_version=None):
        
        conn = Qubole.agent(version=api_version)
        data = {"state": "start"}
        return conn.put(cls.element_path(cluster_id_label) + "/state", data)
570329
def _OnNodeInfo(self, node_id):
        """"""
        handler, value, attrs = self._get_handling_triplet(node_id)
        frame_color = handler.on_frame_color(value, attrs)

        node_info = idaapi.node_info_t()

        if frame_color is not None:
            node_info.frame_color = frame_color

        flags = node_info.get_flags_for_valid()

        self.SetNodeInfo(node_id, node_info, flags)
760358
def show_object_info(self, text, call=False, force=False):
        """"""
        text = to_text_string(text)

        # Show docstring
        help_enabled = self.help_enabled or force
        if force and self.help is not None:
            self.help.dockwidget.setVisible(True)
            self.help.dockwidget.raise_()
        if help_enabled and (self.help is not None) and \
           (self.help.dockwidget.isVisible()):
            # Help widget exists and is visible
            if hasattr(self, 'get_doc'):
                self.help.set_shell(self)
            else:
                self.help.set_shell(self.parent())
            self.help.set_object_text(text, ignore_unknown=False)
            self.setFocus() # if help was not at top level, raising it to
                            # top will automatically give it focus because of
                            # the visibility_changed signal, so we must give
                            # focus back to shell

        # Show calltip
        if call and getattr(self, 'calltips', None):
            # Display argument list if this is a function call
            iscallable = self.iscallable(text)
            if iscallable is not None:
                if iscallable:
                    arglist = self.get_arglist(text)
                    name =  text.split('.')[-1]
                    argspec = signature = ''
                    if isinstance(arglist, bool):
                        arglist = []
                    if arglist:
                        argspec = '(' + ''.join(arglist) + ')'
                    else:
                        doc = self.get__doc__(text)
                        if doc is not None:
                            # This covers cases like np.abs, whose docstring is
                            # the same as np.absolute and because of that a
                            # proper signature can't be obtained correctly
                            argspec = getargspecfromtext(doc)
                            if not argspec:
                                signature = getsignaturefromtext(doc, name)
                    if argspec or signature:
                        if argspec:
                            tiptext = name + argspec
                        else:
                            tiptext = signature
                        # TODO: Select language and pass it to call
                        self.show_calltip(tiptext, color='#2D62FF', is_python=True)
805849
def get_clusters(self, variant_id):
        
        query = {'variant_id':variant_id}
        identities = self.db.identity.find(query)
        return identities
1191849
def select(self, *cluster_ids):
        """"""
        # HACK: allow for `select(1, 2, 3)` in addition to `select([1, 2, 3])`
        # This makes it more convenient to select multiple clusters with
        # the snippet: `:c 1 2 3` instead of `:c 1,2,3`.
        if cluster_ids and isinstance(cluster_ids[0], (tuple, list)):
            cluster_ids = list(cluster_ids[0]) + list(cluster_ids[1:])
        # Remove non-existing clusters from the selection.
        cluster_ids = self._keep_existing_clusters(cluster_ids)
        # Update the cluster view selection.
        self.cluster_view.select(cluster_ids)
161232
def label_with_id(label_id, options = {})
      if options && options[:index] then
        label(:id => label_id.to_s, :index => options[:index]).text
      else
        label(:id, label_id.to_s).text
      end
    end
1094311
def get_label(self, name):
        """"""
        label_tag = self._find_label(name)
        return _Label(label_tag.get('id'), label_tag.get('color'), label_tag.text)
822815
def cluster_labels_A(hdf5_file, c, lock, I, rows_slice):
    

    with Worker.hdf5_lock:
        with tables.open_file(hdf5_file, 'r+') as fileh:
            S = fileh.root.aff_prop_group.similarities
            s = S[rows_slice, ...]
        
    s = np.argmax(s[:, I], axis = 1)
          
    with lock:        
        c[rows_slice] = s[:]
        
    del s
329642
def show():
    """"""
    items = list(collection.find())
    # JSON conversion chokes on the _id objects, so we convert
    # them to strings here
    for i in items:
        i['_id'] = str(i['_id'])
    return items
1170519
def _update_cluster_view(self):
        """"""
        logger.log(5, "Update the cluster view.")
        cluster_ids = [int(c) for c in self.clustering.cluster_ids]
        self.cluster_view.set_rows(cluster_ids)
416481
def output_clusters(labels, cluster_centers_indices):
    
            
    here = os.getcwd()
    try:
        output_directory = os.path.join(here, 'concurrent_AP_output')
        os.makedirs(output_directory)
    except OSError:
        if not os.path.isdir(output_directory):
            print("ERROR: concurrent_AP: output_clusters: cannot create a directory "
                  "for storage of the results of Affinity Propagation clustering "
                  "in your current working directory")
            sys.exit(1)
            
    if any(np.isnan(labels)):
        fmt = '%.1f'
    else:
        fmt = '%d'
                
    with open(os.path.join(output_directory, 'labels.tsv'), 'w') as fh:
        np.savetxt(fh, labels, fmt = fmt, delimiter = '\t')
        
    if cluster_centers_indices is not None:    
        with open(os.path.join(output_directory, 'cluster_centers_indices.tsv'), 'w') as fh:
            np.savetxt(fh, cluster_centers_indices, fmt = '%.1f', 
                       delimiter = '\t')
98898
def info(self):
        """"""
        uri = ','.join(x['hostname'] for x in self.routers)
        mongodb_uri = 'mongodb://' + uri
        result = {'id': self.id,
                  'shards': self.members,
                  'configsvrs': self.configsvrs,
                  'routers': self.routers,
                  'mongodb_uri': mongodb_uri,
                  'orchestration': 'sharded_clusters'}
        if self.login:
            result['mongodb_auth_uri'] = self.mongodb_auth_uri(uri)
        return result
814946
def label(self):
        """""""
        for c in self.table.columns:
            if c.parent == self.name and 'label' in c.valuetype:
                return PartitionColumn(c, self._partition)