Update stats views.
190394
def update_views(self):
        """"""
        # Call the father's method
        super(Plugin, self).update_views()

        # Add specifics informations
        # Alert and log
        for key in ['user', 'system', 'iowait']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert_log(self.stats[key], header=key)
        # Alert only
        for key in ['steal', 'total']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
        # Alert only but depend on Core number
        for key in ['ctx_switches']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], maximum=100 * self.stats['cpucore'], header=key)
        # Optional
        for key in ['nice', 'irq', 'iowait', 'steal', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls']:
            if key in self.stats:
                self.views[key]['optional'] = True
1268077
def update_statistics(self, activityVectors):
        """"""
        Y = activityVectors
        n = self.output_size
        A = np.zeros((n, n))
        batchSize = len(Y)

        for y in Y:
            active_units = np.where( y == 1 )[0]
            for i in active_units:
                for j in active_units:
                    A[i,j] += 1.

        A = A/batchSize
        self.average_activity = self.exponential_moving_average(self.average_activity, A, self.smoothing_period)
22848
function updateViewerData(data) {
  console.log("updating data")
  var bindings = {
    connected: { selector: "#countConnected", data: 0 },
    desktop: { selector: "#countDesktop", data: 0 },
    mobile: { selector: "#countMobile", data: 0 },
    android: { selector: "#countAndroid", data: 0 },
    ios: { selector: "#countIOS", data: 0 },
    other: { selector: "#countOther", data: 0 }
  }

  bindings.connected.data = data.clients

  var stats = getUAStats(data.userAgents)

  Object.keys(stats).forEach(function(key) {
    bindings[key].data = stats[key]
  })

  Object.keys(bindings).forEach(function(key) {
    var binding = bindings[key]
    document.querySelector(binding.selector).innerText = binding.data
  })
}
721988
def update(self, **params):
        
        self._current_params = self._transform_params(**params)
        self._current_stats = ModelStats()
664678
def update(self) -> None:
        """"""
        mask = self.mask
        weights = self.refweights[mask]
        self[~mask] = numpy.nan
        self[mask] = weights/numpy.sum(weights)
786051
def update(self):
        """"""
        # For standalone and server modes
        # For each plugins, call the update method
        for p in self._plugins:
            if self._plugins[p].is_disable():
                # If current plugin is disable
                # then continue to next plugin
                continue
            # Update the stats...
            self._plugins[p].update()
            # ... the history
            self._plugins[p].update_stats_history()
            # ... and the views
            self._plugins[p].update_views()
554729
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        # Grab per-CPU stats using psutil's cpu_percent(percpu=True) and
        # cpu_times_percent(percpu=True) methods
        if self.input_method == 'local':
            stats = cpu_percent.get(percpu=True)
        else:
            # Update stats using SNMP
            pass

        # Update the stats
        self.stats = stats

        return self.stats
897629
def update(self,
               stats,
               duration=3):
        
        for plugin, attribute in self.plugins_list:
            # Check if the plugin exist and is enable
            if plugin in stats.getPluginsList() and \
               stats.get_plugin(plugin).is_enable():
                stat = stats.get_plugin(plugin).get_export()
            else:
                continue
            # Display stats
            if attribute is not None:
                # With attribute
                try:
                    printandflush("{}.{}: {}".format(plugin, attribute,
                                                     stat[attribute]))
                except KeyError as err:
                    logger.error("Can not display stat {}.{} ({})".format(plugin, attribute, err))
            else:
                # Without attribute
                printandflush("{}: {}".format(plugin, stat))

        # Wait until next refresh
        if duration > 0:
            time.sleep(duration)
318304
public function updateViews()
    {
        //preventing edit for anyone except malladmin
        if (\OxidEsales\Eshop\Core\Registry::getSession()->getVariable("malladmin")) {
            $oMetaData = oxNew(\OxidEsales\Eshop\Core\DbMetaDataHandler::class);
            $this->_aViewData["blViewSuccess"] = $oMetaData->updateViews();
        }
    }
179023
def update(self):
        """"""
        if self.single_channel:
            self.im.set_data(self.data[self.ind, :, :])
        else:
            self.im.set_data(self.data[self.ind, :, :, :])
        self.ax.set_ylabel('time frame %s' % self.ind)
        self.im.axes.figure.canvas.draw()
1145172
def update(self, request, datum):
        """"""
        if getattr(self, 'action_present', False):
            self.verbose_name = self._get_action_name()
            self.verbose_name_plural = self._get_action_name('plural')
160078
def update_displayed_information(self):
        

        for source in self.controller.sources:
            source_name = source.get_source_name()
            if (any(self.graphs_menu.active_sensors[source_name]) or
                    any(self.summary_menu.active_sensors[source_name])):
                source.update()

        for graph in self.visible_graphs.values():
            graph.update()

        # update graph summery
        for summary in self.visible_summaries.values():
            summary.update()

        # Only update clock if not is stress mode
        if self.controller.stress_conroller.get_current_mode() != 'Monitor':
            self.clock_view.set_text(seconds_to_text(
                (timeit.default_timer() - self.controller.stress_start_time)))
154712
def update_from_stats(self, stats):
        """"""

        sd = dict(stats)

        for c in self.columns:

            if c not in sd:
                continue

            stat = sd[c]

            if stat.size and stat.size > c.size:
                c.size = stat.size

            c.lom = stat.lom
140323
def update_stats(job_stats)
      s = @stats.stats
      current_speed = job_stats.stats[:current_speed] *
                      @stats.penalty(@threads)

      s[:resolution][:completed_records] +=
        job_stats.stats[:resolution][:completed_records]
      @stats.update_eta(current_speed)
      s[:resolution][:time_span] = Time.now - s[:resolution][:start_time]
      s[:matches][7] += job_stats.stats[:matches][7]
    end
937993
def update(self):
        """"""

        # Grab stats into self.stats
        if self.input_method == 'local':
            stats = self.update_local()
        elif self.input_method == 'snmp':
            stats = self.update_snmp()
        else:
            stats = self.get_init_value()

        # Update the stats
        self.stats = stats

        return self.stats
1156843
def update(self, score_vals):
        ''''''
        add = self.add
        for score, value in score_vals:
            add(score, value)
963288
def update(self):
        """"""
        # Reset stats
        self.reset()

        # Return psutil version as a tuple
        if self.input_method == 'local':
            # psutil version only available in local
            try:
                self.stats = psutil_version_info
            except NameError:
                pass
        else:
            pass

        return self.stats