Create the format string used for the output.
179352
private List<String> createPluginStrings() {
        final List<String> formatList = new ArrayList<String>();
        for (final Plugin plugin : overriddenParameters.getPlugins()) {
            formatList.add(plugin.asPluginString(fileCounter));
        }
        return formatList;
    }
333474
function formatOutput(obj) {
	if (argv.m) {
		return JSON.stringify(obj);
	}
	return JSON.stringify(obj, null, 2);
}
487445
public void format(StringBuffer fmt, Set done, Set todo, int indent) {
    formatName(fmt, indent);
    fmt.append("[");
    if (fields != null) {
      fmt.append("\n");
      for (int i = 0; i < fields.length; i++) {
        if (i > 0)
          fmt.append(",\n");
        fields[i].format(fmt, done, todo, indent + 2);
      }
      fmt.append("\n");
      indent(fmt, indent);
    }
    fmt.append("]");
  }
37450
async def format(self, fstype, *, uuid=None):
        """"""
        self._data = await self._handler.format(
            system_id=self.node.system_id, id=self.id,
            fstype=fstype, uuid=uuid)
430911
def make_format_op_generator(fmt_string):
    
    def gen(arg_types):
        converted_arg_types = list(map(get_op_format_from_const_ty, arg_types))
        op = fmt_string.format(arg_t=converted_arg_types)
        return op
    return gen
138613
def pretty_str(self, indent=0):
        
        return '{}{} {} = {}'.format(' ' * indent, self.result, self.name,
                                     pretty_str(self.value))
356374
def _format_output(selected_number, raw_data):
    """"""
    tmp_data = {}
    data = collections.defaultdict(lambda: 0)
    balance = raw_data.pop('balance')
    for number in raw_data.keys():
        tmp_data = dict([(k, int(v) if v is not None else "No limit")
                         for k, v in raw_data[number].items()])
        tmp_data['number'] = number
        if selected_number is None or selected_number == number:
            data[number] = tmp_data

    output = ("""Account Balance
=======

Balance:      {:.2f} $
""")
    print(output.format(balance))
    for number_data in data.values():
        _print_number(number_data)
1107845
function output(data, format) {
    switch(format) {
        case 'json':
            return json(data, 2);
        case 'min':
            return json(data);
        case 'unix':
            return unix(data);
        default:
            throw `Invalid format: ${format}`;
    }
}
307681
def _format_output(account, data):
    """"""
    data['account'] = account
    output = ("""Ebox data for account: {d[account]}

Balance
=======
Balance:      {d[balance]:.2f} $

Usage
=====
Usage:      {d[usage]:.2f} %

Before offpeak
==============
Download: {d[before_offpeak_download]:.2f} Gb
Upload:   {d[before_offpeak_upload]:.2f} Gb
Total:    {d[before_offpeak_total]:.2f} Gb

Offpeak
=======
Download: {d[offpeak_download]:.2f} Gb
Upload:   {d[offpeak_upload]:.2f} Gb
Total:    {d[offpeak_total]:.2f} Gb

Total
=====
Download: {d[download]:.2f} Gb
Upload:   {d[upload]:.2f} Gb
Total:    {d[total]:.2f} Gb
Limit:    {d[limit]:.2f} Gb
""")
    print(output.format(d=data))
377575
def format(
        self,
        format_string,
        module=None,
        param_dict=None,
        force_composite=False,
        attr_getter=None,
    ):
        
        # fix python 2 unicode issues
        if python2 and isinstance(format_string, str):
            format_string = format_string.decode("utf-8")

        if param_dict is None:
            param_dict = {}

        # if the processed format string is not in the cache then create it.
        if format_string not in self.block_cache:
            self.build_block(format_string)

        first_block = self.block_cache[format_string]

        def get_parameter(key):
            """
            function that finds and returns the value for a placeholder.
            """
            if key in param_dict:
                # was a supplied parameter
                param = param_dict.get(key)
            elif module and hasattr(module, key):
                param = getattr(module, key)
                if hasattr(param, "__call__"):
                    # we don't allow module methods
                    raise Exception()
            elif attr_getter:
                # get value from attr_getter function
                try:
                    param = attr_getter(key)
                except:  # noqa e722
                    raise Exception()
            else:
                raise Exception()
            if isinstance(param, Composite):
                if param.text():
                    param = param.copy()
                else:
                    param = u""
            elif python2 and isinstance(param, str):
                param = param.decode("utf-8")
            return param

        # render our processed format
        valid, output = first_block.render(get_parameter, module)

        # clean things up a little
        if isinstance(output, list):
            output = Composite(output)
        if not output:
            if force_composite:
                output = Composite()
            else:
                output = ""

        return output
215948
public static String format(double[][] m, String pre) {
    StringBuilder output = new StringBuilder() //
        .append(pre).append("[\n").append(pre);
    for(int i = 0; i < m.length; i++) {
      formatTo(output.append(" ["), m[i], ", ").append("]\n").append(pre);
    }
    return output.append("]\n").toString();
  }
1227148
static String buildFormatString(FormatOptions options, FormatChar formatChar) {
    // The format char is guaranteed to be a lower-case ASCII character, so can be made upper case
    // by simply subtracting 0x20 (or clearing the 6th bit).
    char c = formatChar.getChar();
    c = options.shouldUpperCase() ? (char) (c & ~0x20) : c;
    return options.appendPrintfOptions(new StringBuilder("%")).append(c).toString();
  }
1245530
def serialize_output(output):
    
    if not ('value' in output and 'script_hex' in output):
        raise Exception('Invalid output')

    return ''.join([
        hexlify(struct.pack('<Q', output['value'])), # pack into 8 bites
        hexlify(variable_length_int(len(output['script_hex'])/2)),
        output['script_hex']
    ])
1024067
def do_format(self, format):
        
        fmt = ('jpg' if (format is None) else format)
        if (fmt == 'png'):
            self.logger.debug("format: png")
            self.mime_type = "image/png"
            self.output_format = fmt
            format = 'png'
        elif (fmt == 'jpg'):
            self.logger.debug("format: jpg")
            self.mime_type = "image/jpeg"
            self.output_format = fmt
            format = 'jpeg'
        elif (fmt == 'webp'):
            self.logger.debug("format: webp")
            self.mime_type = "image/webp"
            self.output_format = fmt
            format = 'webp'
        else:
            raise IIIFError(code=415, parameter='format',
                            text="Unsupported output file format (%s), only png,jpg,webp are supported." % (fmt))
        if (self.outfile is None):
            # Create temp
            f = tempfile.NamedTemporaryFile(delete=False)
            self.outfile = f.name
            self.outtmp = f.name
            self.image.save(f, format=format)
        else:
            # Save to specified location
            self.image.save(self.outfile, format=format)
1154884
public void format(StringBuffer fmt, Set done, Set todo, int indent) {
    formatName(fmt, indent);
    fmt.append("*(\n");
    itemType.format(fmt, done, todo, indent + 2);
    fmt.append("\n");
    indent(fmt, indent);
    fmt.append(")*");
  }
1329495
private <T> String format(final T t,
                              final IClassContainer container,
                              final Mode mode) {
        final List<ExportContainer> exportContainers = extractExportContainers(t, container);

        final String tabObject = (mode == Mode.SINGLE) ? "" : "\t";

        final StringBuilder builder = new StringBuilder()
                .append(tabObject)
                .append(wrapOpenXmlTag(container.getExportClassName()))
                .append("\n");

        final String resultValues = exportContainers.stream()
                .map(c -> buildXmlValue(mode, container.getField(c.getExportName()), c))
                .collect(Collectors.joining("\n"));

        builder.append(resultValues)
                .append("\n");

        return builder.append(tabObject)
                .append(wrapCloseXmlTag(container.getExportClassName()))
                .toString();
    }
633764
private String createString(String f)
    {
        StringBuilder sb = new StringBuilder();
        sb.append("format="+cudaResourceViewFormat.stringFor(format)+f);
        sb.append("width="+width+f);
        sb.append("height="+height+f);
        sb.append("depth="+depth+f);
        sb.append("firstMipmapLevel="+firstMipmapLevel+f);
        sb.append("lastMipmapLevel="+lastMipmapLevel+f);
        sb.append("firstLayer="+firstLayer+f);
        sb.append("lastLayer="+lastLayer+f);
        return sb.toString();
    }