Show results in an easily machine-readable format.
499521
public void dumpResults(PrintStream out) throws IOException 
    {
        PrintfFormat fmt = new PrintfFormat("%7.2f\t%s\t%s\n");
        for (int i=0; i<pairs.length; i++) {
            if (pairs[i]!=null) {
                String aText = (pairs[i].getA()==null) ? "***" : pairs[i].getA().unwrap();
                String bText = (pairs[i].getB()==null) ? "***" : pairs[i].getB().unwrap();
                out.print( fmt.sprintf( new Object[] { 
                            new Double(pairs[i].getDistance()),
                            aText,
                            bText
                        }));
            }
        }
    }
1011202
def show(self):
        """"""
        for entry in self._entries:
            print "{'%s': %s, 'records': %s}" % (
                entry._record_type, entry.host, entry.records)
        print
355180
def stdout_to_results(s):
    """"""
    results = s.strip().split('\n')
    return [BenchmarkResult(*r.split()) for r in results]
560577
def create_detailed_results(result):
    
    string = ""
    # Validation Response output
    # string += "VALIDATION RESPONSE\n"
    string += "STATUS: {}\n".format(result["status"])
    if result["feedback"]:
        string += "WARNINGS: {}\n".format(len(result["feedback"]["wrnMsgs"]))
        # Loop through and output the Warnings
        for msg in result["feedback"]["wrnMsgs"]:
            string += "- {}\n".format(msg)
        string += "ERRORS: {}\n".format(len(result["feedback"]["errMsgs"]))
        # Loop through and output the Errors
        for msg in result["feedback"]["errMsgs"]:
            string += "- {}\n".format(msg)
    return string
505464
function report (results) {
  const arr = []

  results.forEach(result => {
    const name = result.name
    const output = result.output
    const success = result.success

    arr.push('\n')
    arr.push(`${chalk.bold(`> ${name}:`)}\n`)
    arr.push('\n')

    if (success && !output.trim()) {
      arr.push(padding(passedMessage))
    } else {
      arr.push(padding(output))
    }

    arr.push('\n')
  })

  arr.push('\n')

  return reduceEmptyLine(arr.join(''))
}
1141221
def check_results(tmp_):
        """"""
        # TODO: Fix this to work with more meaningful names
        if tmp_['t'] > 0:
            if tmp_['l'] > 0:
                if tmp_['rr'] > 0 or tmp_['ra'] > 1:
                    print 1, 3, tmp_
                    return 3
                elif tmp_['cr'] > 0 or tmp_['ca'] > 1:
                    print 2, 3, tmp_
                    return 3
                elif tmp_['mr'] > 0 or tmp_['ma'] > 1:
                    print 3, 2, tmp_
                    return 2
            if tmp_['cr'] > 1 or tmp_['ca'] > 2:
                print 4, 2, tmp_
                return 2
            if tmp_['mr'] > 0 or tmp_['ma'] > 1:
                if tmp_['cr'] > 0 or tmp_['ca'] > 1:
                    print 6, 0, tmp_
                    return 0
            if tmp_['rr'] > 1 or tmp_['ra'] > 2:
                print 7, 0, tmp_
                return 0
            if tmp_['sr'] > 1 or tmp_['sa'] > 2:
                print 8, 0, tmp_
                return 0
        if tmp_['l'] > 0:
            if tmp_['rr'] > 0 or tmp_['ra'] > 1:
                print 9, 2, tmp_
                return 2
            if tmp_['cr'] > 0 or tmp_['ca'] > 1:
                print 10, 0, tmp_
                return 0
        return -1
567416
def print_schema_results(results, level=0):
    
    for error in results.errors:
        print_level(logger.error, _RED + "[X] %s", level, error)
174099
def print_results(args):
    """"""
    min_comics, filename = args
    min_comics = int(min_comics)
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            path, num = entry
            if num >= min_comics:
                fp.write(u"add(%r, %r)\n" % (
                  str(truncate_name(name)), str(path)))
851037
def print_results(cls, stdout, stderr):
        """"""
        for line in stderr:
            print(line, file=sys.stderr)
        if stdout:
            if stderr:  # blank line to separate stdout from stderr
                print(file=sys.stderr)
            cls._print_stdout(stdout)
        else:
            print(':) No issues found.')
831881
def output_result(self):
        """"""
        output = {}
        output['draw'] = str(int(self.params.get('draw', 1)))
        output['recordsTotal'] = str(self.cardinality)
        output['recordsFiltered'] = str(self.cardinality_filtered)
        if self.error:
            output['error'] = self.error
            return output

        output['data'] = self.results
        for k, v in self.yadcf_params:
            output[k] = v
        return output
602776
def pretty(timings, label):
        ''''''
        results = [(sum(values), len(values), key)
            for key, values in timings.items()]
        print(label)
        print('=' * 65)
        print('%20s => %13s | %8s | %13s' % (
            'Command', 'Average', '# Calls', 'Total time'))
        print('-' * 65)
        for total, length, key in sorted(results, reverse=True):
            print('%20s => %10.5f us | %8i | %10i us' % (
                key, float(total) / length, length, total))
1322922
def display_data(raw_data_string, raw_data_id, model_folder, show_raw):
    """"""
    print("## Raw Data (ID: %i)" % raw_data_id)
    print("```")
    print(raw_data_string)
    print("```")

    preprocessing_desc, feature_desc, _ = _get_system(model_folder)

    # Print model
    print("## Model")
    print("%s\n" % model_folder)

    # Get the preprocessing queue
    tmp = preprocessing_desc['queue']
    preprocessing_queue = preprocessing.get_preprocessing_queue(tmp)

    # Get feature values as list of floats, rounded to 3 decimal places
    tmp = feature_desc['features']
    feature_list = features.get_features(tmp)

    # Print preprocessing queue
    preprocessing.print_preprocessing_list(preprocessing_queue)
    features.print_featurelist(feature_list)

    # Get Handwriting
    recording = handwritten_data.HandwrittenData(raw_data_string,
                                                 raw_data_id=raw_data_id)
    if show_raw:
        recording.show()

    recording.preprocessing(preprocessing_queue)

    feature_values = recording.feature_extraction(feature_list)
    feature_values = [round(el, 3) for el in feature_values]
    print("Features:")
    print(feature_values)

    # Get the list of data multiplication algorithms
    mult_queue = data_multiplication.get_data_multiplication_queue(
        feature_desc['data-multiplication'])

    # Multiply traing_set
    training_set = [{'id': 42,
                     'formula_id': 42,
                     'formula_in_latex': 'None',
                     'handwriting': recording}]
    training_set = create_ffiles.training_set_multiplication(training_set,
                                                             mult_queue)

    # Display it
    logging.info("Show %i recordings...", len(training_set))
    for recording in training_set:
        recording['handwriting'].show()
152015
function(options, filePaths, results, numResults) {
		var content = "{\n\t\"numResults\": " + numResults + ",\n" + 
			"\t\"creationDate\": \"" + _getISODateString() + "\",\n" + 
			"\t\"results\": {\n";

		var group = [];
		for (var file in results) {
			var groupStr = "\t\t\"" + file + "\": [\n";

			var matchGroup = [];
			for (var i=0; i<results[file].length; i++) {
				matchGroup.push("\t\t\t{\n" + 
					"\t\t\t\t\"line\": " + results[file][i].line + ",\n" + 
					"\t\t\t\t\"match\": " + "\"" + _cleanStr(results[file][i].match) + "\"" + 
					"\n\t\t\t}");
			}
			groupStr += matchGroup.join(",\n") + "\n";
			groupStr += "\t\t]"
			group.push(groupStr);
		}
		content += group.join(",\n");
		content += "\n\t}"

		if (options.outputExaminedFiles) {
			content += ",\n\t\"examinedFiles\": [\n";
			var files = [];
			for (var i=0; i<filePaths.length; i++) {
				files.push("\t\t\"" + _cleanStr(filePaths[i]) + "\"");
			}
			content += files.join(",\n");
			content += "\n\t]";
		}

		content += "\n}";

		return content;
	}
738376
def results(self):
        ""
        cur = self._conn.cursor()
        rows = cur.execute("SELECT * FROM results")
        for row in rows:
            yield (row['job_id'], _row_to_work_result(row))
312284
def format_result(result):
    """"""
    instance = None
    error = None

    if result["instance"] is not None:
        instance = format_instance(result["instance"])

    if result["error"] is not None:
        error = format_error(result["error"])

    result = {
        "success": result["success"],
        "plugin": format_plugin(result["plugin"]),
        "instance": instance,
        "error": error,
        "records": format_records(result["records"]),
        "duration": result["duration"]
    }

    if os.getenv("PYBLISH_SAFE"):
        schema.validate(result, "result")

    return result
1234859
function formatOutput (results) {
  var date = new Date()
  var commit

  try {
    commit = execSync('git rev-parse HEAD').toString().replace('\n', '')
  } catch (e) {
    commit = 'commit hash not found'
  }

  return {
    meta: {
      title: 'example benchmark',
      version: pkg.version,
      commit: commit,
      date: [
        date.toLocaleDateString(),
        date.toLocaleTimeString(),
        date.toString().match(/\(([A-Za-z\s].*)\)/)[1]
      ].join(' ')
    },
    results: results
  }
}
1340834
def nice_output(self):
        """"""
        dates = [
            str_format('Opening Day {0}: {1}.',
                       [self.year, date_format(self.first_date_seas)]),
            str_format('Last day of the 1st half: {0}.',
                       [date_format(self.last_date_1sth)]),
            str_format('{0} All Star Game: {1}.',
                       [self.year, date_format(self.all_star_date)]),
            str_format('First day of the 2nd half: {}.',
                       [date_format(self.first_date_2ndh)]),
            str_format('Last day of the {0} season: {1}.',
                       [self.year, date_format(self.last_date_seas)]),
            str_format('{0} Playoffs start: {1}.',
                       [self.year, date_format(self.playoffs_start_date)]),
            str_format('{0} Playoffs end: {1}.',
                       [self.year, date_format(self.playoffs_end_date)])
        ]
        return '\n'.join(dates)