Displays diagnostics to the user

        Args:
            stdout (bool): print results to the console
            plot (bool): use Seaborn to plot results
322737
def summary(self, stdout=True, plot=False):
        '''
        
        '''
        if stdout:
            print('Collinearity summary:')
            print(pd.concat([self.results['Eigenvalues'],
                             self.results['ConditionIndices'],
                             self.results['VIFs'],
                             self.results['CorrelationMatrix']],
                            axis=1))

            print('Outlier summary:')
            print(self.results['RowMahalanobisDistances'])
            print(self.results['ColumnMahalanobisDistances'])

            print('Validity summary:')
            print(self.results['Variances'])

        if plot:
            verify_dependencies('seaborn')
            for key, result in self.results.items():
                if key == 'CorrelationMatrix':
                    ax = plt.axes()
                    sns.heatmap(result, cmap='Blues', ax=ax)
                    ax.set_title(key)
                    sns.plt.show()
                else:
                    result.plot(kind='bar', title=key)
                    plt.show()
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']
1240102
def get_status_display(self, **kwargs):
        
        if 'value' in kwargs:
            value = kwargs['value']
        else:
            value = self.status

        if self.show_stdev_seconds:
            stdev = self.stdev(self.show_stdev_seconds)
            return f'{value}±{stdev:2.2}'
        else:
            return str(value)
1294761
def _print_results(results, stat=False, verbose=False):
    
    results.generate_pretty_output(stat=stat,
                                   verbose=verbose,
                                   output_function=click.secho)
903202
def output(results_dir, config, parent='../../'):
    
    start = time.time()
    print("Compiling results...")
    results_dir = os.path.abspath(results_dir)
    results = ReportResults(config['run_time'], config['results_ts_interval'])
    results.compile_results()
    print("Results compiled in {} seconds\n".format(time.time() - start))

    if results.total_transactions == 0:
        print("No results, cannot create report")
        return False

    print_infos(results)

    data = {
        'report': results,
        'run_time': config['run_time'],
        'ts_interval': config['results_ts_interval'],
        'turrets_config': results.turrets,
        'results': {"all": results.main_results, "timers": results.timers_results}
    }

    print("Generating graphs...")
    partial = time.time()
    generate_graphs(results.main_results, 'All_Transactions', results_dir)

    for key, value in results.timers_results.items():
        generate_graphs(value, key, results_dir)
    print("All graphs generated in {} seconds\n".format(time.time() - partial))

    write_template(data, results_dir, parent)
    print("Full report generated in {} seconds".format(time.time() - start))
    return True
166162
def display(self, stats, cs_status=None):
        
        # Init the internal line/column for Glances Curses
        self.init_line_column()

        # Get the current screen size
        screen_x = self.screen.getmaxyx()[1]
        screen_y = self.screen.getmaxyx()[0]
        stats_max = screen_y - 3
        stats_len = len(stats)

        self._page_max_lines = stats_max
        self._page_max = int(math.ceil(stats_len / stats_max))
        # Init position
        x = 0
        y = 0

        # Display top header
        if stats_len == 0:
            if self.first_scan and not self.args.disable_autodiscover:
                msg = 'Glances is scanning your network. Please wait...'
                self.first_scan = False
            else:
                msg = 'No Glances server available'
        elif len(stats) == 1:
            msg = 'One Glances server available'
        else:
            msg = '{} Glances servers available'.format(stats_len)
        if self.args.disable_autodiscover:
            msg += ' (auto discover is disabled)'
        if screen_y > 1:
            self.term_window.addnstr(y, x,
                                     msg,
                                     screen_x - x,
                                     self.colors_list['TITLE'])

            msg = '{}'.format(self._get_status_count(stats))
            self.term_window.addnstr(y + 1, x,
                                     msg,
                                     screen_x - x)

        if stats_len > stats_max and screen_y > 2:
            msg = '{} servers displayed.({}/{}) {}'.format(self.get_pagelines(stats),
                                                            self._current_page + 1, 
                                                            self._page_max, 
                                                            self._get_status_count(stats))
            self.term_window.addnstr(y + 1, x,
                                     msg,
                                     screen_x - x)
        
        if stats_len == 0:
            return False

        # Display the Glances server list
        # ================================

        # Table of table
        # Item description: [stats_id, column name, column size]
        column_def = [
            ['name', 'Name', 16],
            ['alias', None, None],
            ['load_min5', 'LOAD', 6],
            ['cpu_percent', 'CPU%', 5],
            ['mem_percent', 'MEM%', 5],
            ['status', 'STATUS', 9],
            ['ip', 'IP', 15],
            # ['port', 'PORT', 5],
            ['hr_name', 'OS', 16],
        ]
        y = 2

        # Display table header
        xc = x + 2
        for cpt, c in enumerate(column_def):
            if xc < screen_x and y < screen_y and c[1] is not None:
                self.term_window.addnstr(y, xc,
                                         c[1],
                                         screen_x - x,
                                         self.colors_list['BOLD'])
                xc += c[2] + self.space_between_column
        y += 1

        # If a servers has been deleted from the list...
        # ... and if the cursor is in the latest position
        if self.cursor > len(stats) - 1:
            # Set the cursor position to the latest item
            self.cursor = len(stats) - 1

        stats_list = self._get_stats(stats)
        start_line = self._page_max_lines * self._current_page 
        end_line = start_line + self.get_pagelines(stats_list)
        current_page = stats_list[start_line:end_line]
        
        # Display table
        line = 0
        for v in current_page:
            # Limit the number of displayed server (see issue #1256)
            if line >= stats_max:
                continue
            # Get server stats
            server_stat = {}
            for c in column_def:
                try:
                    server_stat[c[0]] = v[c[0]]
                except KeyError as e:
                    logger.debug(
                        "Cannot grab stats {} from server (KeyError: {})".format(c[0], e))
                    server_stat[c[0]] = '?'
                # Display alias instead of name
                try:
                    if c[0] == 'alias' and v[c[0]] is not None:
                        server_stat['name'] = v[c[0]]
                except KeyError:
                    pass

            # Display line for server stats
            cpt = 0
            xc = x

            # Is the line selected ?
            if line == self.cursor:
                # Display cursor
                self.term_window.addnstr(
                    y, xc, ">", screen_x - xc, self.colors_list['BOLD'])

            # Display the line
            xc += 2
            for c in column_def:
                if xc < screen_x and y < screen_y and c[1] is not None:
                    # Display server stats
                    self.term_window.addnstr(
                        y, xc, format(server_stat[c[0]]), c[2], self.colors_list[v['status']])
                    xc += c[2] + self.space_between_column
                cpt += 1
            # Next line, next server...
            y += 1
            line += 1

        return True
355180
def stdout_to_results(s):
    """"""
    results = s.strip().split('\n')
    return [BenchmarkResult(*r.split()) for r in results]
359421
def display(level='DEBUG'):
    """"""
    logger = get_logger()
    sh = logging.StreamHandler()
    sh.setLevel(getattr(logging, level))
    sh.setFormatter(DEFAULT_LOG_FORMAT)
    logger.addHandler(sh)
1350293
def show_output(self, txt, device='Console'):
        
        if device == 'Console':
            print(txt)
        elif device == 'File':
            raise ('show_output to File not implemented')
        elif device == 'Function_Return':  # hacky, to run test_AI_CLI.py
            return txt
497095
def _display_runner(rows, labels, title, display=_DEFAULT_DISPLAY):
    '''
    
    '''
    if display:
        net_runner_opts = _get_net_runner_opts()
        if net_runner_opts.get('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,
                                         net_runner_opts.get('outputter'),
                                         __opts__)
        print(ret)
    else:
        return rows
1184975
def printcolour(text, sameline=False, colour=get_colour("ENDC")):
    
    if sameline:
        sep = ''
    else:
        sep = '\n'
    sys.stdout.write(get_colour(colour) + text + bcolours["ENDC"] + sep)
880279
def printOut(value, end='\n'):
    
    sys.stdout.write(value)
    sys.stdout.write(end)
    sys.stdout.flush()
198661
def output(self):
        
        if not self.path_output:
            self.output_to_fd(sys.stdout)
        else:
            with open(self.path_output, "w") as out:
                self.output_to_fd(out)
889301
def printStats(self):
        
        print("--- Imagestats Results ---")

        if (self.fields.find('npix') != -1 ):
            print("Number of pixels  :  ",self.npix)
        if (self.fields.find('min') != -1 ):
            print("Minimum value     :  ",self.min)
        if (self.fields.find('max') != -1 ):
            print("Maximum value     :  ",self.max)
        if (self.fields.find('stddev') != -1 ):
            print("Standard Deviation:  ",self.stddev)
        if (self.fields.find('mean') != -1 ):
            print("Mean              :  ",self.mean)
        if (self.fields.find('mode') != -1 ):
            print("Mode              :  ",self.mode)
        if (self.fields.find('median') != -1 ):
            print("Median            :  ",self.median)
        if (self.fields.find('midpt') != -1 ):
            print("Midpt            :  ",self.midpt)
376348
def _create_stdout_logger():
    
    log = logging.getLogger(__name__)
    out_hdlr = logging.StreamHandler(sys.stdout)
    out_hdlr.setFormatter(logging.Formatter('%(message)s'))
    out_hdlr.setLevel(logging.INFO)
    log.addHandler(out_hdlr)
    log.setLevel(logging.INFO)
558408
def _show(self):
         
        p = _runshell([brctlexe, 'show', self.name],
            "Could not show %s." % self.name)
        return p.stdout.read().split()[7:]
23591
def print_results_adj(results, indent=False, prt=sys.stdout):
        """"""
        # Print column headers if there are results to be printed
        if results:
            prt.write("{R}\n".format(R="\t".join(GOEnrichmentStudy.get_prtflds_default(results))))
        # Print the GOEA results
        for rec in results:
            prt.write("{R}\n".format(R=rec.__str__(indent=indent)))