Print stats data in markdown style.
554223
def prt_data(self, name, vals, prt=sys.stdout):
        """"""
        fld2val = self.get_fld2val(name, vals)
        prt.write(self.fmt.format(**fld2val))
        return fld2val
100750
def print(self):
        
        print("TOTALS -------------------------------------------")
        print(json.dumps(self.counts, indent=4, sort_keys=True))
        if self.sub_total:
            print("\nSUB TOTALS --- based on '%s' ---------" % self.sub_total)
            print(json.dumps(self.sub_counts, indent=4, sort_keys=True))
        if self.list_blank:
            print("\nMISSING nodes for '%s':" % self.list_blank,
                  len(self.blank))
1274066
def print_data(data):
    
    print(", ".join(["{}=>{}".format(key, value) for key, value in data]))
919591
public synchronized void printStatistics() {
        ClientStats stats = m_periodicStatsContext.fetchAndResetBaseline().getStats();
        long time = Math.round((stats.getEndTimestamp() - m_startTS) / 1000.0);

        StringBuilder statsBuilder = new StringBuilder();
        statsBuilder.append(String.format("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60));
        statsBuilder.append(String.format("Throughput %d/s, ", stats.getTxnThroughput()));
        statsBuilder.append(String.format("Aborts/Failures %d/%d",
                stats.getInvocationAborts(), stats.getInvocationErrors()));

        if (m_config.latencyreport) {
            statsBuilder.append(String.format(", Avg/95%% Latency %.2f/%.2fms",
                                stats.getAverageLatency(),
                                stats.kPercentileLatencyAsDouble(0.95)));
        }
        printLog(statsBuilder.toString());
    }
1177080
def printData(self, output = sys.stdout):
		""""""
		self.printDatum("Name          : ", self.fileName, output)
		self.printDatum("Author        : ", self.author, output)
		self.printDatum("Repository    : ", self.repository, output)
		self.printDatum("Category      : ", self.category, output)
		self.printDatum("Downloads     : ", self.downloads, output)
		self.printDatum("Date Uploaded : ", self.fileDate, output)
		self.printDatum("File Size     : ", self.fileSize, output)
		self.printDatum("Documentation : ", self.documentation, output)
		self.printDatum("Source Code   : ", self.sourceCode, output)
		self.printDatum("Description   : ", self.description, output)
#		print("\n", output)
		print >> output, "\n\n"
1200277
def print_stat(x, message=None):
    
    if message is None:
        message = x.op.name
    lst = [tf.shape(x), tf.reduce_mean(x)]
    if x.dtype.is_floating:
        lst.append(rms(x))
    return tf.Print(x, lst + [x], summarize=20,
                    message=message, name='print_' + x.op.name)
1143356
def print_stats(self, stream=None):
        
        if not stream: # pragma: no cover
            stream = sys.stdout
        self.metadata.sort(key=lambda x: -x.size)
        stream.write('%-10s %8s %-12s %-46s\n' % ('id', 'size', 'type', 'representation'))
        for g in self.metadata:
            stream.write('0x%08x %8d %-12s %-46s\n' % (g.id, g.size, trunc(g.type, 12),
                trunc(g.str, 46)))
        stream.write('Garbage: %8d collected objects (%s in cycles): %12s\n' % \
            (self.count, self.num_in_cycles, pp(self.total_size)))
996778
def print_stats(genomes):
    
    header = ['#genome', 'contig', 'locus', 'position', 'strand', 'length', \
                'sample', 'coverage', \
                'ref. Pn/Ps', 'ref SNP density', \
                'consensus Pn/Ps', 'consensus SNP density', \
                'product']
    print('\t'.join(header))
    for genome, contigs in list(genomes.items()):
        for contig, samples in list(contigs.items()):
            for sample, stats in list(samples.items()):
                for locus, rates in list(stats['sub_rates'].items()):
                    length = rates['info']['length']
                    position, strand = rates['info']['position']
                    position = '%s-%s' % position
                    out = [genome, contig, locus, position, strand, length, \
                            sample, '%.2f' % (rates['cov']), \
                            rates['ref PnPs'], rates['ref SNP density'], \
                            rates['consensus PnPs'], rates['consensus SNP density'], \
                            rates['info']['product'][0]]
                    print('\t'.join([str(i) for i in out]))
730306
def print_table(lines, separate_head=True):
	""""""
	#Count the column width
	widths = []
	for line in lines:
			for i,size in enumerate([len(x) for x in line]):
					while i >= len(widths):
							widths.append(0)
					if size > widths[i]:
							widths[i] = size
	   
	#Generate the format string to pad the columns
	print_string = ""
	for i,width in enumerate(widths):
			print_string += "{" + str(i) + ":" + str(width) + "} | "
	if (len(print_string) == 0):
			return
	print_string = print_string[:-3]
	   
	#Print the actual data
	for i,line in enumerate(lines):
			print(print_string.format(*line))
			if (i == 0 and separate_head):
					print("-"*(sum(widths)+3*(len(widths)-1)))
1189678
def _print_stats(cls, stats: Statistics, human_format_speed: bool=True):
        ''''''
        time_length = datetime.timedelta(
            seconds=int(stats.stop_time - stats.start_time)
        )
        file_size = wpull.string.format_size(stats.size)

        if stats.bandwidth_meter.num_samples:
            speed = stats.bandwidth_meter.speed()

            if human_format_speed:
                speed_size_str = wpull.string.format_size(speed)
            else:
                speed_size_str = '{:.1f} b'.format(speed * 8)
        else:
            speed_size_str = _('-- B')

        _logger.info(_('FINISHED.'))
        _logger.info(__(
            _(
                'Duration: {preformatted_timedelta}. '
                'Speed: {preformatted_speed_size}/s.'
            ),
            preformatted_timedelta=time_length,
            preformatted_speed_size=speed_size_str,
        ))
        _logger.info(__(
            gettext.ngettext(
                'Downloaded: {num_files} file, {preformatted_file_size}.',
                'Downloaded: {num_files} files, {preformatted_file_size}.',
                stats.files
            ),
            num_files=stats.files,
            preformatted_file_size=file_size
        ))

        if stats.is_quota_exceeded:
            _logger.info(_('Download quota exceeded.'))
616249
def stats_printer(stats_queue):
  """"""
  proc_stats = [ProcessStats(i) for i in range(FLAGS.parallel)]
  print_time = start_time = time.time()
  width = 107

  running = True
  while running:
    print_time += 10

    while time.time() < print_time:
      try:
        s = stats_queue.get(True, print_time - time.time())
        if s is None:  # Signal to print and exit NOW!
          running = False
          break
        proc_stats[s.proc_id] = s
      except queue.Empty:
        pass

    replay_stats = ReplayStats()
    for s in proc_stats:
      replay_stats.merge(s.replay_stats)

    print((" Summary %0d secs " % (print_time - start_time)).center(width, "="))
    print(replay_stats)
    print(" Process stats ".center(width, "-"))
    print("\n".join(str(s) for s in proc_stats))
    print("=" * width)
1322376
def stats(data):
    '''
    '''
    return {'len': len(data),
            'mean': np.mean(data),
            'sum': np.sum(data),
            'std': np.std(data),
            'min': np.min(data),
            'max': np.max(data)}
879252
def print_statistics(self):
        
        print("Q1 =", self.Q1)
        print("Q2 =", self.Q2)
        print("cR =", self.cR)
708996
def printStats(self):
        
        printDebug("----------------")
        printDebug("Parents......: %d" % len(self.parents()))
        printDebug("Children.....: %d" % len(self.children()))
        printDebug("Ancestors....: %d" % len(self.ancestors()))
        printDebug("Descendants..: %d" % len(self.descendants()))
        printDebug("----------------")
474797
def _print_stats(self, env, stats):
        

        def _format_time(mins):
            """ Generates formatted time string.
                """
            mins = int(mins)

            if mins < MINS_IN_HOUR:
                time_str = '0:{0:02}'.format(mins)
            else:
                hours = mins // MINS_IN_HOUR
                mins %= MINS_IN_HOUR

                if mins > 0:
                    time_str = '{0}:{1:02}'.format(hours, mins)
                else:
                    time_str = '{0}'.format(hours)

            return time_str

        if not stats:
            env.io.write('No stats found.')
            return

        for date, tasks in stats:
            env.io.write('')
            total_mins = float(sum(v[1] for v in tasks))
            env.io.write('[ {0} ]'.format(date.strftime('%Y-%m-%d')))
            env.io.write('')

            for name, mins in tasks:
                # format time
                time_str = _format_time(mins)

                # generate stat line
                line = '   {0:>5}'.format(time_str)
                line += ' ({0:2.0f}%) - '.format(mins * 100.0 / total_mins)
                if len(name) > 55:
                    name = name[:55] + '...'
                line += name
                env.io.write(line)

            # generate total line
            env.io.write('_' * len(line))
            time_str = _format_time(total_mins)
            env.io.write('   {0:>5} (total)'.format(time_str))
            env.io.write('')
824723
def print_stats(self):
        """"""
        funcname = self.fn.__name__
        filename = self.fn.__code__.co_filename
        lineno = self.fn.__code__.co_firstlineno
        print("")
        print("*** PROFILER RESULTS ***")
        print("%s (%s:%s)" % (funcname, filename, lineno))
        if self.skipped:
            skipped = "(%d calls not profiled)" % self.skipped
        else:
            skipped = ""
        print("function called %d times%s" % (self.ncalls, skipped))
        print("")
        stats = self.stats
        if self.filename:
            stats.dump_stats(self.filename)
        if not self.dirs:
            stats.strip_dirs()
        stats.sort_stats(*self.sort)
        stats.print_stats(self.entries)
273843
def format_stats(self, stats:TensorOrNumList)->None:
        ""
        str_stats = []
        for name,stat in zip(self.names,stats):
            str_stats.append('#na#' if stat is None else str(stat) if isinstance(stat, int) else f'{stat:.6f}')
        if self.add_time: str_stats.append(format_time(time() - self.start_epoch))
        if not self.silent: self.pbar.write(str_stats, table=True)