Returns a prettier, more comprehensible version of a row evolution label for display.
7371
private function cleanOriginalLabel($label)
    {
        $label = str_replace(LabelFilter::SEPARATOR_RECURSIVE_LABEL, ' - ', $label);
        $label = SafeDecodeLabel::decodeLabelSafe($label);
        return $label;
    }
21521
def pretty(self, indent=0, debug=False):
        
        debug_details = ''
        if debug:
            debug_details += '<isliteral=%r, iscanonical=%r>' % (self.isliteral, self.iscanonical)

        obj = "'%s'" % self.obj if isinstance(self.obj, basestring) else repr(self.obj)
        return (' ' * indent) + ('%s(%s%s)' % (self.__class__.__name__, debug_details, obj))
869443
def as_html(self, max_rows=0):
        """"""
        if not max_rows or max_rows > self.num_rows:
            max_rows = self.num_rows
        omitted = max(0, self.num_rows - max_rows)
        labels = self.labels
        lines = [
            (0, '<table border="1" class="dataframe">'),
            (1, '<thead>'),
            (2, '<tr>'),
            (3, ' '.join('<th>' + label + '</th>' for label in labels)),
            (2, '</tr>'),
            (1, '</thead>'),
            (1, '<tbody>'),
        ]
        fmts = self._get_column_formatters(max_rows, True)
        for row in itertools.islice(self.rows, max_rows):
            lines += [
                (2, '<tr>'),
                (3, ' '.join('<td>' + fmt(v, label=False) + '</td>' for
                    v, fmt in zip(row, fmts))),
                (2, '</tr>'),
            ]
        lines.append((1, '</tbody>'))
        lines.append((0, '</table>'))
        if omitted:
            lines.append((0, '<p>... ({} rows omitted)</p>'.format(omitted)))
        return '\n'.join(4 * indent * ' ' + text for indent, text in lines)
1323356
def _render_internal_label(self):
        '''  '''
        ncc = self._num_complete_chars
        bar = self._lbl.center(self.iwidth)
        cm_chars = self._comp_style(bar[:ncc])
        em_chars = self._empt_style(bar[ncc:])
        return f'{self._first}{cm_chars}{em_chars}{self._last}'
1344260
def font(row, col, sheet = nil)
      sheet ||= default_sheet
      read_cells(sheet)
      row, col   = normalize(row, col)
      style_name = @style[sheet][[row, col]] || @style_defaults[sheet][col - 1] || 'Default'
      @font_style_definitions[style_name]
    end
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)
612810
public static String getOrGenerateMatchLabel(QuerySolution row, boolean operationDiscovery) {
        String label;
        if (operationDiscovery) {
            label = getOrGenerateOperationLabel(row);
        } else {
            label = getOrGenerateServiceLabel(row);
        }
        return label;
    }
1209038
def _label_desc(self, label, desc, label_color=''):
        '''  '''
        return self.BRIGHT +  label_color + label + self.RESET + desc
1375048
def picture(self, row):
        

        template = '_Xn'
        types = (type(None), binary_type, int)

        def guess_type(v):

            try:
                v = text_type(v).strip()
            except ValueError:
                v = binary_type(v).strip()
                #v = v.decode('ascii', 'replace').strip()

            if not bool(v):
                return type(None)

            for t in (float, int, binary_type, text_type):
                try:
                    return type(t(v))
                except:
                    pass

        def p(e):
            tm = t = None

            try:
                t = guess_type(e)
                tm = self.type_map.get(t, t)
                return template[types.index(tm)]
            except ValueError as e:
                raise ValueError("Type '{}'/'{}' not in the types list: {} ({})".format(t, tm, types, e))

        return ''.join(p(e) for e in row)
1118236
def font(row, col, sheet = nil)
      key = normalize(row, col)
      definition_index = safe_send(sheet_for(sheet).cells[key], :style)
      styles.definitions[definition_index] if definition_index
    end
112507
def _repr_pretty_(self, builder, cycle):
        
        builder.text(self.__class__.__name__ + "(")
        if cycle:
            builder.text("<cycle>")
        else:
            builder.pretty(self.__dict__)
        builder.text(")")
691214
def get_blank_row(self, filler="-", splitter="+"):
        
        return self.get_pretty_row(
            ["" for _ in self.widths],  # blanks
            filler,  # fill with this
            splitter,  # split columns with this
        )
284611
public <T> Builder rowh(String label, T data) {
        return tag("tr").cellHeader(label, false).cell(data).end();
    }
188248
def _table_relabel(table, substitutions, replacements=None):
    
    if replacements is not None:
        raise NotImplementedError

    observed = set()

    exprs = []
    for c in table.columns:
        expr = table[c]
        if c in substitutions:
            expr = expr.name(substitutions[c])
            observed.add(c)
        exprs.append(expr)

    for c in substitutions:
        if c not in observed:
            raise KeyError('{0!r} is not an existing column'.format(c))

    return table.projection(exprs)
1251292
def show_label(self, text, size = None, color = None, font_desc = None):
        """"""
        font_desc = pango.FontDescription(font_desc or _font_desc)
        if color: self.set_color(color)
        if size: font_desc.set_absolute_size(size * pango.SCALE)
        self.show_layout(text, font_desc)
1282196
def as_colr(
            self, label_args=None, type_args=None, type_val_args=None,
            value_args=None):
        
        label_args = label_args or {'fore': 'red'}
        type_args = type_args or {'fore': 'yellow'}
        type_val_args = type_val_args or {'fore': 'grey'}
        value_args = value_args or {'fore': 'blue', 'style': 'bright'}

        return Colr(self.default_format.format(
            label=Colr(':\n    ').join(
                Colr('Expecting color name/value', **label_args),
                ',\n    '.join(
                    '{lbl:<5} ({val})'.format(
                        lbl=Colr(l, **type_args),
                        val=Colr(v, **type_val_args),
                    )
                    for l, v in self.accepted_values
                )
            ),
            value=Colr(repr(self.value), **value_args)
        ))
148674
def _display_runner(rows,
                    labels,
                    title,
                    display=_DEFAULT_DISPLAY,
                    outputter=_DEFAULT_OUTPUTTER):
    '''
    
    '''
    if display:
        if outputter == 'table':
            ret = salt.output.out_format({'rows': rows, 'labels': labels},
                                         'table',
                                         __opts__,
                                         title=title,
                                         rows_key='rows',
                                         labels_key='labels')
        else:
            ret = salt.output.out_format(rows,
                                         outputter,
                                         __opts__)
        print(ret)
    else:
        return rows