Display value and cumulation
778987
def _value_format(self, value, serie, index):
        
        sum_ = serie.points[index][1]
        if serie in self.series and (
                self.stack_from_top
                and self.series.index(serie) == self._order - 1
                or not self.stack_from_top and self.series.index(serie) == 0):
            return super(StackedLine, self)._value_format(value)
        return '%s (+%s)' % (self._y_format(sum_), self._y_format(value))
324805
def display(self):
        """"""
        def render(line):
            is_wide_char = False
            for x in range(self.columns):
                if is_wide_char:  # Skip stub
                    is_wide_char = False
                    continue
                char = line[x].data
                assert sum(map(wcwidth, char[1:])) == 0
                is_wide_char = wcwidth(char[0]) == 2
                yield char

        return ["".join(render(self.buffer[y])) for y in range(self.lines)]
306958
def _displaystr2num(st):
    """"""
    num = None
    for s, n in [('DFP-', 16), ('TV-', 8), ('CRT-', 0)]:
        if st.startswith(s):
            try:
                curnum = int(st[len(s):])
                if 0 <= curnum <= 7:
                    num = n + curnum
                    break
            except Exception:
                pass
    if num is not None:
        return num
    else:
        raise ValueError('Unrecognised display name: ' + st)
1032997
def display_scores(params, scores, append_star=False):
    """"""
    params = ", ".join("{0}={1}".format(k, v)
                      for k, v in params.items())
    line = "{0}:\t\t{1:.3f} (+/-{2:.3f})".format(
        params, np.mean(scores), sem(scores))
    if append_star:
        line += " *"
    return line
688122
def when_value_edited(self, *args, **kargs):
        
        if len(self.value) > self.instance_num:
            self.value.pop(-2)
            self.display()
23758
def value(self):
    """"""
    return self._sum / tf.cast(self._count, self._dtype)
801541
def _call(self, x):
        """"""

        if abs(x.ufuncs.sum() / self.sum_value - 1) <= self.sum_rtol:
            return 0
        else:
            return np.inf
221732
def values(self):
        
        result = {}
        result['fontsz'] = self.ui.fontszSpnbx.value()
        result['display_attributes'] = self.ui.detailWidget.getCheckedDetails()
        return result
1064383
def _values(self):
        """"""
        return [
            val for serie in self.series for val in serie.values
            if val is not None
        ]
535700
def do_display(self, arg):
        
        if not arg:
            self.message('Currently displaying:')
            for item in self.displaying.get(self.curframe, {}).items():
                self.message('%s: %s' % bdb.safe_repr(item))
        else:
            val = self._getval_except(arg)
            self.displaying.setdefault(self.curframe, {})[arg] = val
            self.message('display %s: %s' % (arg, bdb.safe_repr(val)))
1228933
function display(data) {
    let total = 0;
    const rows = Object.keys(data)
        .map(key => {
            const time = data[key];

            total += time;
            return [key, time];
        })
        .sort((a, b) => b[1] - a[1])
        .slice(0, 10);

    rows.forEach(row => {
        row.push(`${(row[1] * 100 / total).toFixed(1)}%`);
        row[1] = row[1].toFixed(3);
    });

    rows.unshift(HEADERS);

    const widths = [];

    rows.forEach(row => {
        const len = row.length;

        for (let i = 0; i < len; i++) {
            const n = row[i].length;

            if (!widths[i] || n > widths[i]) {
                widths[i] = n;
            }
        }
    });

    const table = rows.map(row => (
        row
            .map((cell, index) => ALIGN[index](cell, widths[index]))
            .join(" | ")
    ));

    table.splice(1, 0, widths.map((width, index) => {
        const extraAlignment = index !== 0 && index !== widths.length - 1 ? 2 : 1;

        return ALIGN[index](":", width + extraAlignment, "-");
    }).join("|"));

    console.log(table.join("\n")); // eslint-disable-line no-console
}
417450
def _cumulate(exact = false, force = false)
      unless force
        factor = if @last_cumulate == 0
                   Float::INFINITY
                 else
                   (@n.to_f / @last_cumulate)
                 end
        return if @n == @last_cumulate || (!exact && @cx && @cx > factor)
      end

      cumn = 0
      @centroids.each do |_, c|
        c.mean_cumn = cumn + c.n / 2.0
        cumn = c.cumn = cumn + c.n
      end
      @n = @last_cumulate = cumn
      nil
    end
733316
private void displayValue() {

        if (m_currentValue == null) {
            m_picker.displayValue("");
            m_picker.setPreviewVisible(false);
            m_picker.setLocationInfo(Collections.<String, String> emptyMap());
        } else {
            m_picker.displayValue(m_editValue.getAddress());
            Map<String, String> infos = new LinkedHashMap<String, String>();
            if (hasLatLng()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_LATITUDE_0), m_editValue.getLatitudeString());
                infos.put(Messages.get().key(Messages.GUI_LOCATION_LONGITUDE_0), m_editValue.getLongitudeString());
                infos.put(Messages.get().key(Messages.GUI_LOCATION_ZOOM_0), String.valueOf(m_editValue.getZoom()));
            }
            if (hasSize()) {
                infos.put(
                    Messages.get().key(Messages.GUI_LOCATION_SIZE_0),
                    m_editValue.getWidth() + " x " + m_editValue.getHeight());
            }
            if (hasType()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_TYPE_0), m_editValue.getType());
            }
            if (hasMode()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_MODE_0), m_editValue.getMode());
            }
            m_picker.setLocationInfo(infos);
            m_picker.setPreviewVisible(true);
            if (!isApiLoaded()) {

                onApiReady(new Command() {

                    public void execute() {

                        return;
                    }
                });
            }
        }
    }
246152
def summarize_attr(key, value, col_width=None):
    """"""
    # Indent key and add ':', then right-pad if col_width is not None
    k_str = '    {}:'.format(key)
    if col_width is not None:
        k_str = pretty_print(k_str, col_width)
    # Replace tabs and newlines, so we print on one line in known width
    v_str = str(value).replace('\t', '\\t').replace('\n', '\\n')
    # Finally, truncate to the desired display width
    return maybe_truncate('{} {}'.format(k_str, v_str),
                          OPTIONS['display_width'])
1153095
def show_value(self, value):
        
        values = self.get_values()
        values = [x for x in values if x['label'] == value]
        if len(values) == 0:
            raise Exception("Unknown value")
        else:
            return values[0]
1299459
public void computeDetail(IValue value, IValueDetailListener listener)
	{
		String detail = "";
		try
		{
			if (value instanceof VdmValue)
			{
				VdmValue vdmValue = (VdmValue) value;
				vdmValue.getVariables();
				detail = vdmValue.getRawValue();
			} else
			{
				detail = value.getValueString();
			}

		} catch (DebugException e)
		{
		}
		listener.detailComputed(value, detail);
	}
343916
def addValue(self, value):
    """"""
    self['count'] += 1
    self.__sample.update(value)
    if time.time() > self.__timestamp + 20 and len(self.__sample) > 1:
      self.__timestamp = time.time()
      self['min'] = self.__sample.min
      self['max'] = self.__sample.max
      self['mean'] = self.__sample.mean
      self['stddev'] = self.__sample.stddev

      percentiles = self.__sample.percentiles([0.5, 0.75, 0.95, 0.98, 0.99, 0.999])
      self['median'] = percentiles[0]
      self['75percentile'] = percentiles[1]
      self['95percentile'] = percentiles[2]
      self['98percentile'] = percentiles[3]
      self['99percentile'] = percentiles[4]
      self.percentile99 = percentiles[4]
      self['999percentile'] = percentiles[5]