Show special characters for display
166928
function inspect (s) {
  return s
    .replace(/\\/g, '\\\\')
    .replace(/\n/g, '\\n')
    .replace(/\t/g, '\\t')
    .replace(/"/g, '\\"')
    .replace(/\r/g, '\\r')
}
438179
def pretty_str(self, indent=0):
        
        if self.parenthesis:
            return (' ' * indent) + '(' + self.name + ')'
        return (' ' * indent) + self.name
306757
def default_display(value, with_module=True):
    """"""
    object_type = type(value)
    try:
        name = object_type.__name__
        module = object_type.__module__
        if with_module:
            return name + ' object of ' + module + ' module'
        else:
            return name
    except:
        type_str = to_text_string(object_type)
        return type_str[1:-1]
21353
def show(db, encoding, no_limit, zip, case_insensitive):
    """"""

    limit = 15

    if no_limit:
        limit = float('inf')

    with open_db(db, zip, encoding=encoding, case_sensitive=not case_insensitive) as dbf:
        for idx, row in enumerate(dbf, 1):
            click.secho('')

            for key, val in row._asdict().items():
                click.secho('  %s: %s' % (key, val))

            if idx == limit:
                click.secho(
                    'Note: Output is limited to %s rows. Use --no-limit option to bypass.' % limit, fg='red')
                break
558408
def _show(self):
         
        p = _runshell([brctlexe, 'show', self.name],
            "Could not show %s." % self.name)
        return p.stdout.read().split()[7:]
678503
def display(name):
    '''
    
    '''
    cmd = [_get_cmd(), '--display', name]
    out = __salt__['cmd.run_all'](cmd, python_shell=False)
    if out['retcode'] > 0 and out['stderr'] != '':
        return out['stderr']
    return out['stdout']
291358
def pretty_print(self):
        
        return u"%s\t%.3f\t%.3f\t%s" % (
            (self.identifier or u""),
            (self.begin if self.begin is not None else TimeValue("-2.000")),
            (self.end if self.end is not None else TimeValue("-1.000")),
            (self.text or u"")
        )
604523
def display(self):
        """"""
        if self.title and self.organization:
            disp = self.title + u' at ' + self.organization
        else:
            disp = self.title or self.organization or None
        if disp and self.industry:
            if self.date_range is not None:
                disp += u' (%s, %d-%d)' % ((self.industry,) + \
                                           self.date_range.years_range)
            else:
                disp += u' (%s)' % self.industry
        else:
            disp = ((disp or u'') + u' ' + (self.industry or u'')).strip()
            if disp and self.date_range is not None:
                disp += u' (%d-%d)' % self.date_range.years_range
        return disp
1263938
def force_ascii_values(data):
    """"""
    return {
        k: v.encode('utf8').decode('ascii', 'backslashreplace')
        for k, v in data.items()
    }
22907
function toColorfulString(result) {
	var color;
	if (!result) {
		return '';
	}
	if (result.color == null) {
		return result.value;
	}
	color = result.color;
	return '<font color="' + color + '">' + result.value + '<\/font>';
}
1268822
def _ipython_display_(self):
        """"""
        contents = self.describe()
        display({  # noqa: F821
            'application/json': contents,
            'text/plain': pretty_describe(contents)
        }, metadata={
            'application/json': {'root': contents["name"]}
        }, raw=True)
529110
def get_display_name(self):
        """"""
        return DisplayText(text=self.id_.get_identifier(),
                           language_type=DEFAULT_LANGUAGE_TYPE,
                           script_type=DEFAULT_SCRIPT_TYPE,
                           format_type=DEFAULT_FORMAT_TYPE,)
990749
def prettify_object(obj):
    """"""

    try:
        return pprint.pformat(str(obj))
    except UnicodeDecodeError as e:
        raise
    except Exception as e:
        return "[could not display: <%s: %s>]" % (e.__class__.__name__, str(e))
970553
def display(self):
        
        for line in self.adb_shell('dumpsys display').splitlines():
            m = _DISPLAY_RE.search(line, 0)
            if not m:
                continue
            w = int(m.group('width'))
            h = int(m.group('height'))
            return collections.namedtuple('Display', ['width', 'height'])(w, h)
        else:
            w, h = self.info['displayWidth'], self.info['displayHeight']
            return collections.namedtuple('Display', ['width', 'height'])(w, h)
765095
def prettyln(text, fill='-', align='^', prefix='[ ', suffix=' ]', length=69):
    """"""
    text = '{prefix}{0}{suffix}'.format(text, prefix=prefix, suffix=suffix)
    print(
        "{0:{fill}{align}{length}}".format(
            text, fill=fill, align=align, length=length
        )
    )
1264330
def display(self, content = None, **settings):
        
        sys.stdout.write("\r")
        sys.stdout.write(self.render(content, **settings))
        sys.stdout.flush()
402504
def for_display(self):
        
        skip = ""
        if self.skip:
            skip = " [SKIP]"
        result = "{step_num}: {path}{skip}".format(
            step_num=self.step_num, path=self.path, skip=skip
        )
        description = self.task_config.get("description")
        if description:
            result += ": {}".format(description)
        return result