API: relabel(self, i)
        Description:
        Used by max_flow_preflowpush() method for display purposed.
        Post:
            'color' and 'label' attribute of edges/nodes are updated.
547625
def show_flow(self):
        '''
        
        '''
        for n in self.get_node_list():
            excess = self.get_node_attr(n, 'excess')
            distance = self.get_node_attr(n, 'distance')
            self.set_node_attr(n, 'label', str(excess)+'/'+str(distance))
            for neighbor in self.get_neighbors(n):
                capacity = self.get_edge_attr(n, neighbor, 'capacity')
                flow = self.get_edge_attr(n, neighbor, 'flow')
                if capacity == INF:
                    self.set_edge_attr(n, neighbor, 'label',
                                       'INF'+'/'+str(flow))
                else:
                    self.set_edge_attr(n, neighbor, 'label',
                                       str(capacity)+'/'+str(flow))
                if capacity == flow:
                    self.set_edge_attr(n, neighbor, 'color', 'red')
                elif flow > 0:
                    self.set_edge_attr(n, neighbor, 'color', 'green')
                else:
                    self.set_edge_attr(n, neighbor, 'color', 'black')
        self.display()
122671
def update_label(signature, post_data):
    '''
    
    '''
    current_tag_infos = MPost2Label.get_by_uid(signature).objects()
    if 'tags' in post_data:
        pass
    else:
        return False

    tags_arr = [x.strip() for x in post_data['tags'].split(',')]
    for tag_name in tags_arr:
        if tag_name == '':
            pass
        else:
            MPost2Label.add_record(signature, tag_name, 1)

    for cur_info in current_tag_infos:
        if cur_info.tag_name in tags_arr:
            pass
        else:
            MPost2Label.remove_relation(signature, cur_info.tag_id)
185355
def label(self, t):
        
        if self.labels is None:
            return None
        prev_label = None
        for l in self.labels:
            if l.time > t:
                break
            prev_label = l
        if prev_label is None:
            return None
        return prev_label.name
416443
def select_edges(edges, label)
      label.nil? ? edges : edges.select { |edge| edge.label == label }
    end
99901
def p_label_line_co(p):
    
    lbl = make_label(p[1], p.lineno(1))
    p[0] = make_block(lbl, p[2]) if len(p) == 3 else lbl
1198338
def _redraw_labels(self):
        """"""
        ax = self.get_axes()
        # Remove any previous labels
        for mpl_object in self._to_remove:
            mpl_object.remove()
        self._to_remove = []
        # Redraw the labels with the appropriate angles
        label_data = list(self._labels.values())
        label_data.extend(self._corner_labels.values())
        for (label, position, rotation, kwargs) in label_data:
            transform = ax.transAxes
            x, y = project_point(position)
            # Calculate the new angle.
            position = numpy.array([x, y])
            new_rotation = ax.transData.transform_angles(
                numpy.array((rotation,)), position.reshape((1, 2)))[0]
            text = ax.text(x, y, label, rotation=new_rotation,
                           transform=transform, horizontalalignment="center",
                           **kwargs)
            text.set_rotation_mode("anchor")
            self._to_remove.append(text)
987099
def make_label(id_, lineno):
    
    entry = SYMBOL_TABLE.declare_label(id_, lineno)
    if entry:
        gl.DATA_LABELS[id_] = gl.DATA_PTR_CURRENT  # This label points to the current DATA block index
    return entry
1358079
def _stmt_graph_annotate_edges(self, edges_to_annotate, **new_labels):
        

        graph = self.graph

        for src, dst in edges_to_annotate:

            if src not in graph:
                continue
            if dst not in graph[src]:
                continue

            data = graph[src][dst]

            for k, v in new_labels.items():
                if k in data:
                    if v not in data[k]:
                        data[k] = data[k] + (v,)
                else:
                    # Construct a tuple
                    data[k] = (v,)
806234
def node_label_present(
        name,
        node,
        value,
        **kwargs):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'result': False,
           'comment': ''}

    labels = __salt__['kubernetes.node_labels'](node, **kwargs)

    if name not in labels:
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'The label is going to be set'
            return ret
        __salt__['kubernetes.node_add_label'](label_name=name,
                                              label_value=value,
                                              node_name=node,
                                              **kwargs)
    elif labels[name] == value:
        ret['result'] = True
        ret['comment'] = 'The label is already set and has the specified value'
        return ret
    else:
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'The label is going to be updated'
            return ret

        ret['comment'] = 'The label is already set, changing the value'
        __salt__['kubernetes.node_add_label'](
            node_name=node,
            label_name=name,
            label_value=value,
            **kwargs)

    old_labels = copy.copy(labels)
    labels[name] = value

    ret['changes']['{0}.{1}'.format(node, name)] = {
        'old': old_labels,
        'new': labels}
    ret['result'] = True

    return ret
2484
def fill_phenotype_label(self,inplace=False):
        
        def _get_phenotype(d):
            vals = [k for k,v in d.items() if v ==  1]
            return np.nan if len(vals) == 0 else vals[0]
        if inplace:
            if self.shape[0] == 0: return self
            self['phenotype_label'] = self.apply(lambda x: _get_phenotype(x['phenotype_calls']),1)
            return
        fixed = self.copy()
        if fixed.shape[0] == 0: return fixed
        fixed['phenotype_label'] = fixed.apply(lambda x: _get_phenotype(x['phenotype_calls']),1)
        return fixed
607915
private void updateSetsLabeled(int i1, final double a1, final double C)
    {
        final double y_i = label[i1];
        I1[i1] = a1 == 0 && y_i == 1;
        I2[i1] = a1 == C && y_i == -1;
        I3[i1] = a1 == C && y_i == 1;
        I4[i1] = a1 == 0 && y_i == -1;
    }
627119
def newShape(self):
        
        if not self.useDefaultLabelCheckbox.isChecked() or not self.defaultLabelTextLine.text():
            if len(self.labelHist) > 0:
                self.labelDialog = LabelDialog(
                    parent=self, listItem=self.labelHist)

            # Sync single class mode from PR#106
            if self.singleClassMode.isChecked() and self.lastLabel:
                text = self.lastLabel
            else:
                text = self.labelDialog.popUp(text=self.prevLabelText)
                self.lastLabel = text
        else:
            text = self.defaultLabelTextLine.text()

        # Add Chris
        self.diffcButton.setChecked(False)
        if text is not None:
            self.prevLabelText = text
            generate_color = generateColorByText(text)
            shape = self.canvas.setLastLabel(text, generate_color, generate_color)
            self.addLabel(shape)
            if self.beginner():  # Switch to edit mode.
                self.canvas.setEditing(True)
                self.actions.create.setEnabled(True)
            else:
                self.actions.editMode.setEnabled(True)
            self.setDirty()

            if text not in self.labelHist:
                self.labelHist.append(text)
        else:
            # self.canvas.undoLastLine()
            self.canvas.resetAllLines()
656456
def label(self, request, tag):
        
        if self.parameter.label:
            tag[self.parameter.label]
        return tag
251852
def print_flow(self):
        '''
        
        '''
        print('printing current edge, flow, capacity')
        for e in self.edge_attr:
            if self.edge_attr[e]['flow']!=0:
                print(e, str(self.edge_attr[e]['flow']).ljust(4), end=' ')
                print(str(self.edge_attr[e]['capacity']).ljust(4))
143519
def create_label(self, name, color, description=github.GithubObject.NotSet):
        
        assert isinstance(name, (str, unicode)), name
        assert isinstance(color, (str, unicode)), color
        assert description is github.GithubObject.NotSet or isinstance(description, (str, unicode)), description
        post_parameters = {
            "name": name,
            "color": color,
        }
        if description is not github.GithubObject.NotSet:
            post_parameters["description"] = description
        headers, data = self._requester.requestJsonAndCheck(
            "POST",
            self.url + "/labels",
            input=post_parameters,
            headers={'Accept': Consts.mediaTypeLabelDescriptionSearchPreview}
        )
        return github.Label.Label(self._requester, headers, data, completed=True)
600351
def _update(self):
        
        self._colorbar.halfdim = self._halfdim
        self._border.halfdim = self._halfdim

        self._label.text = self._label_str
        self._ticks[0].text = str(self._clim[0])
        self._ticks[1].text = str(self._clim[1])

        self._update_positions()

        self._colorbar._update()
        self._border._update()
595230
function ProgressDots(id, anchor){
		if(id === undefined){ throw new Error("Missing reqired argument: id"); }
		if(anchor === undefined){ throw new Error("Missing reqired argument: anchor"); }
		
		this._id = id;
		this._anchor = anchor;
		
		// we add a prefix for the id label
		this._prefix = "progressDots:";
	}