Update layer description label.
977226
def tvBrowserExposure_selection_changed(self):
        """"""
        (is_compatible, desc) = self.get_layer_description_from_browser(
            'exposure')
        self.lblDescribeBrowserExpLayer.setText(desc)
        self.parent.pbnNext.setEnabled(is_compatible)
71642
def __update_info(self):
        """"""

        from f311 import explorer as ex
        import f311

        t = self.tableWidget
        z = self.listWidgetVis
        z.clear()
        classes = self.__vis_classes = []
        propss = self.__lock_get_current_propss()
        npp = len(propss)
        s0, s1 = "", ""
        if npp == 1:
            p = propss[0]
            # Visualization options
            if p.flag_scanned:
                if isinstance(p.f, f311.DataFile):
                    classes.extend(f311.get_suitable_vis_classes(p.f))
                    if ex.VisPrint in classes:
                        classes.remove(ex.VisPrint)
                if p.flag_text:
                    # This is an exception, since "txt" is not a Vis descendant.
                    # This will be properly handled in __visualize()
                    classes.append("txt")

                for x in classes:
                    if x == "txt":
                        text = "View plain text"
                    else:
                        text = x.action
                        text += " ("+x.__name__+")"
                    item = QListWidgetItem(text)
                    z.addItem(item)

            # File info
            s0 = p.get_summary()
            s1 = p.get_info()

        elif npp >= 2:
            s0 = "{0:d} selected".format(npp)
            ff = [p.f for p in propss]
            flag_spectra = all([isinstance(f, f311.FileSpectrum) for f in ff])

            # gambiarra to visualize several PFANT .mod files
            has_pyfant = False
            try:
                import pyfant
                has_pyfant = True
            except:
                pass

            flag_mod = False
            if has_pyfant:
                flag_mod = all([isinstance(f, pyfant.FileModBin) and len(f.records) > 1 for f in ff])

            if flag_spectra:
                z.addItem(QListWidgetItem("Plot spectra stacked"))
                classes.append("sta")
                z.addItem(QListWidgetItem("Plot spectra overlapped"))
                classes.append("ovl")
            elif flag_mod:

                # TODO plugin-based way to handle visualization of multiple selection

                z.addItem(QListWidgetItem("View model grid"))
                classes.append("modgrid")
                
        # File info
        self.labelSummary.setText(s0)
        self.textEditInfo.setPlainText(s1)
483681
def update(self, pbar):
        
        if pbar.label != self._label:
            self.label = pbar.label

        return self.label
1048169
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqb*con.tind)
1131427
def rename(self, old_label_name, new_label_name):
        
        assert(old_label_name != new_label_name)
        self._bayes.pop(old_label_name)
        old_baye_dir = self._get_baye_dir(old_label_name)
        new_baye_dir = self._get_baye_dir(new_label_name)
        logger.info("Renaming label training {} -> {} : {} -> {}".format(
            old_label_name, new_label_name, old_baye_dir, new_baye_dir
        ))
        os.rename(old_baye_dir, new_baye_dir)
963934
def update_label(self, old_label, new_label):
        
        logger.info("%s : Updating label ([%s] -> [%s])"
                    % (str(self), old_label.name, new_label.name))
        labels = self.labels
        try:
            labels.remove(old_label)
        except ValueError:
            # this document doesn't have this label
            return

        logger.info("%s : Updating label ([%s] -> [%s])"
                    % (str(self), old_label.name, new_label.name))
        labels.append(new_label)
        with self.fs.open(self.fs.join(self.path, self.LABEL_FILE), 'w') \
                as file_desc:
            for label in labels:
                file_desc.write("%s,%s\n" % (label.name,
                                             label.get_color_str()))
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()
358787
function updateLabels(potentialLabel) {
    var lowerCaseLabel = potentialLabel.toLowerCase();
    if (!labelSet.hasOwnProperty(lowerCaseLabel)) {
      labels.push(potentialLabel);
      // now value is in our set
      labelSet[lowerCaseLabel] = true;
    }
    return lowerCaseLabel;
  }
496019
def update(self):
        
        self.info.display_dataset()
        self.overview.update()
        self.labels.update(labels=self.info.dataset.header['chan_name'])
        self.channels.update()

        try:
            self.info.markers = self.info.dataset.read_markers()
        except FileNotFoundError:
            lg.info('No notes/markers present in the header of the file')
        else:
            self.notes.update_dataset_marker()
382171
def update(self, data):
        """"""
        if not isinstance(data, list): data = [data] # otherwise no conversion is necessary
        master = Handler.ALL_VERS_DATA
        for record in data:
            #print(record)
            for k,v in iteritems(record): # ensure record contents aretyped appropriately
                try:                record[k] = int(v)
                except ValueError:  record[k] = v
            try: label = record["label"] # verify this record has the required 'label' key
            except KeyError:
                raise ValueError("Must provide a valid label argument.  Given:%s%s"%(\
                    os.linesep, ("%s  "%(os.linesep)).join(
                        ["%15s:%s"%(k,v) for k,v in iteritems(kwargs)]
                    )))
            try:    masterLabel = master[label] # identify the already existing record that matches this to-be-updated record, if any
            except KeyError: # master hasn't been defined yet
                master[label] = record
                self._updated = True # a new record should also be saved
                continue
            for k,v in iteritems(record): # determine whether master needs to be updated
                try:
                    if masterLabel[k] == v:  continue # whether an entry in the record needs to be updated (doesn't match)
                except KeyError:             pass # this condition means that k is a new key, so the record must be updated
                self._updated = True
                try:    master[label].update(record) # index each record by its label
                except KeyError:             break
394794
def update(self, labels, preds):
        """"""
        batch_sum_metric = 0
        batch_num_inst = 0
        for label, pred_outcaps in zip(labels[0], preds[0]):
            label_np = int(label.asnumpy())
            pred_label = int(np.argmax(pred_outcaps.asnumpy()))
            batch_sum_metric += int(label_np == pred_label)
            batch_num_inst += 1
        batch_loss = preds[1].asnumpy()
        recon_loss = preds[2].asnumpy()
        self.sum_metric += batch_sum_metric
        self.num_inst += batch_num_inst
        self.loss += batch_loss
        self.recon_loss += recon_loss
        self.batch_sum_metric = batch_sum_metric
        self.batch_num_inst = batch_num_inst
        self.batch_loss = batch_loss
        self.n_batch += 1
459927
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqd1*con.tind)
579006
def _replace_layer(self, layer_id, new_layer):
        """"""
        old_layer = self.layer_list[layer_id]
        new_layer.input = old_layer.input
        new_layer.output = old_layer.output
        new_layer.output.shape = new_layer.output_shape
        self.layer_list[layer_id] = new_layer
        self.layer_to_id[new_layer] = layer_id
        self.layer_to_id.pop(old_layer)
79346
def update(self, duration):
        """"""
        if duration >= 0:
            self.histogram.update(duration)
            self.meter.mark()
451972
def relabel(self, change):
        ""
        class_new,class_old,file_path = change.new,change.old,change.owner.file_path
        fp = Path(file_path)
        parent = fp.parents[1]
        self._csv_dict[fp] = class_new
18826
def update_title(self, _, info):
        # type: (object, TitleInfo) -> None
        """"""
        with self._lock:
            self._block.meta.set_label(info.title)
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)