Output finih message
15893
public function showFinish()
    {
        $processingTime = $this->getFormatTime($this->diffBetweenStart());
        $message = "Finished after $processingTime\tHandled: $this->handled items";

        $this->stdout(PHP_EOL . $message . PHP_EOL, static::FG_GREEN);
        // Yii::$app->controller->stdout(PHP_EOL . $message . PHP_EOL, Console::FG_GREEN);
    }
84210
def shout(msg, f=sys.stderr):
    ''''''
    print >> f, "{0}: {1}".format(_PROG, msg)
    f.flush()
1334939
def make_fout(fout='./tmp', fmt='pcap'):
        
        if fmt == 'pcap':       # output PCAP file
            from pcapkit.dumpkit import PCAP as output
        elif fmt == 'plist':    # output PLIST file
            from dictdumper import PLIST as output
        elif fmt == 'json':     # output JSON file
            from dictdumper import JSON as output
        elif fmt == 'tree':     # output treeview text file
            from dictdumper import Tree as output
            fmt = 'txt'
        elif fmt == 'html':     # output JavaScript file
            from dictdumper import JavaScript as output
            fmt = 'js'
        elif fmt == 'xml':      # output XML file
            from dictdumper import XML as output
        else:                   # no output file
            from pcapkit.dumpkit import NotImplementedIO as output
            if fmt is not None:
                warnings.warn(f'Unsupported output format: {fmt}; disabled file output feature',
                              FormatWarning, stacklevel=stacklevel())
            return output, ''

        try:
            pathlib.Path(fout).mkdir(parents=True, exist_ok=True)
        except FileExistsError as error:
            if fmt is None:
                warnings.warn(error.strerror, FileWarning, stacklevel=stacklevel())
            else:
                raise FileExists(*error.args) from None

        return output, fmt
882600
def _send_ffs(self, pid, n_blocks, fr):
        
        sfr = fr | (1 << 31)
        self._send_scp(
            255, 255, 0, SCPCommands.nearest_neighbour_packet,
            (NNCommands.flood_fill_start << 24) | (pid << 16) |
            (n_blocks << 8), 0x0, sfr
        )
18110
def write_message f, full=true, date=Time.now
    raise ArgumentError, "no pre-defined date: header allowed" if @header["Date"]
    f.puts format_headers(@header).first
    f.puts <<EOS
Date: #{date.rfc2822}
Message-Id: #{@message_id}
EOS
    if full
      f.puts <<EOS
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Redwood/#{Redwood::VERSION}
EOS
    end

    f.puts
    f.puts sanitize_body(@body.join("\n"))
    f.puts sig_lines if full unless $config[:edit_signature]
  end
198178
def output!
      output  = "#{Time.now} | "
      output += "[#{@namespace.gsub('_', ' ')}] " unless @namespace.nil?
      output += @message
      puts output if defined?(Logg::ALWAYS_PUTS) && Logg::ALWAYS_PUTS
      return output
    end
837151
def output_callback(self, line, kill_switch):
        """"""
        self.notifications += line + "\n"

        if "Initialization Sequence Completed" in line:
            self.started = True
        if "ERROR:" in line or "Cannot resolve host address:" in line:
            self.error = True
        if "process exiting" in line:
            self.stopped = True
147160
def fini ( method )
      raise TypeError, error_message(method, __method__) unless method.instance_of? Method
      @fini = method
    end
794539
def fout(self, output, newline=True):
        """"""
        if output is not None:
            self.out(self.fmt(output), newline=newline)
702119
def print
      return unless $stdout.tty?
      return if recently_fetched?

      resp = fetch_server_message
      update_fetched
      puts resp unless resp.empty?
    end
277864
function processZtagOutput(output) {
  return output.split('\n').reduce(function(memo, line) {
    var match, key, value;
      match = ztagRegex.exec(line);
      if(match) {
        key = match[1];
        value = match[2];
        memo[key] = value;
      }
      return memo;
  }, {});
}
571049
def output(data, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    color = salt.utils.color.get_colors(
            __opts__.get('color'),
            __opts__.get('color_theme'))
    strip_colors = __opts__.get('strip_colors', True)
    ident = 0
    if __opts__.get('__multi_key'):
        ident = 4
    if __opts__['transport'] in ('zeromq', 'tcp'):
        acc = 'minions'
        pend = 'minions_pre'
        den = 'minions_denied'
        rej = 'minions_rejected'

        cmap = {pend: color['RED'],
                acc: color['GREEN'],
                den: color['MAGENTA'],
                rej: color['BLUE'],
                'local': color['MAGENTA']}

        trans = {pend: u'{0}{1}Unaccepted Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_RED'],
                                    color['ENDC']),
                 acc: u'{0}{1}Accepted Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_GREEN'],
                                    color['ENDC']),
                 den: u'{0}{1}Denied Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_MAGENTA'],
                                    color['ENDC']),
                 rej: u'{0}{1}Rejected Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_BLUE'],
                                    color['ENDC']),
                 'local': u'{0}{1}Local Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_MAGENTA'],
                                    color['ENDC'])}
    else:
        acc = 'accepted'
        pend = 'pending'
        rej = 'rejected'

        cmap = {pend: color['RED'],
                acc: color['GREEN'],
                rej: color['BLUE'],
                'local': color['MAGENTA']}

        trans = {pend: u'{0}{1}Unaccepted Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_RED'],
                                    color['ENDC']),
                 acc: u'{0}{1}Accepted Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_GREEN'],
                                    color['ENDC']),
                 rej: u'{0}{1}Rejected Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_BLUE'],
                                    color['ENDC']),
                 'local': u'{0}{1}Local Keys:{2}'.format(
                                    ' ' * ident,
                                    color['LIGHT_MAGENTA'],
                                    color['ENDC'])}

    ret = ''

    for status in sorted(data):
        ret += u'{0}\n'.format(trans[status])
        for key in sorted(data[status]):
            key = salt.utils.data.decode(key)
            skey = salt.output.strip_esc_sequence(key) if strip_colors else key
            if isinstance(data[status], list):
                ret += u'{0}{1}{2}{3}\n'.format(
                        ' ' * ident,
                        cmap[status],
                        skey,
                        color['ENDC'])
            if isinstance(data[status], dict):
                ret += u'{0}{1}{2}:  {3}{4}\n'.format(
                        ' ' * ident,
                        cmap[status],
                        skey,
                        data[status][key],
                        color['ENDC'])
    return ret
1205640
def output(self):
        
        return luigi.LocalTarget(path=self.path(digest=True, ext='html'))
1279908
def _print_message(self, flag_message=None, color=None, padding=None,
                       reverse=False):
        
        if flag_message:
            flag_message = stdout_encode(flag(flag_message,
                                              color=color if self.pretty else None,
                                              show=False))
            if not reverse:
                print(padd(flag_message, padding),
                      self.format_messages(self.message))
            else:
                print(self.format_messages(self.message),
                      padd(flag_message, padding))
        else:
            print(self.format_messages(self.message))
        self.message = []
1294349
def output_text(account, all_data, show_hourly=False):
    """"""
    print("""
#################################
# Hydro Quebec data for account #
# {}
#################################""".format(account))
    for contract, data in all_data.items():
        data['contract'] = contract
        if data['period_total_bill'] is None:
            data['period_total_bill'] = 0.0
        if data['period_projection'] is None:
            data['period_projection'] = 0.0
        if data['period_mean_daily_bill'] is None:
            data['period_mean_daily_bill'] = 0.0
        output = ("""
----------------------------------------------------------------

Contract: {d[contract]}
===================

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

Period Info
===========
Period day number:      {d[period_length]:d}
Period total days:      {d[period_total_days]:d} days

Period current bill
===================
Total Bill:             {d[period_total_bill]:.2f} $
Projection bill:        {d[period_projection]:.2f} $
Mean Daily Bill:        {d[period_mean_daily_bill]:.2f} $

Total period consumption
========================
Lower price:            {d[period_lower_price_consumption]:.2f} kWh
Higher price:           {d[period_higher_price_consumption]:.2f} kWh
Total:                  {d[period_total_consumption]:.2f} kWh
Mean daily:             {d[period_mean_daily_consumption]:.2f} kWh""")
        print(output.format(d=data))
        if data.get("period_average_temperature") is not None:
            output2 = ("""Temperature:            {d[period_average_temperature]:d} °C""")
            print(output2.format(d=data))
        if data.get("yesterday_average_temperature") is not None:
            output3 = ("""
Yesterday consumption
=====================
Temperature:            {d[yesterday_average_temperature]:d} °C
Lower price:            {d[yesterday_lower_price_consumption]:.2f} kWh
Higher price:           {d[yesterday_higher_price_consumption]:.2f} kWh
Total:                  {d[yesterday_total_consumption]:.2f} kWh""")
            print(output3.format(d=data))
        if show_hourly:
            msg = ("""
Yesterday consumption details
-----------------------------
   Hour  | Temperature | Lower price consumption | Higher price consumption | total comsumption
""")
            for hdata in data['yesterday_hourly_consumption']:
                msg += ("{d[hour]} | {d[temp]:8d} °C | {d[lower]:19.2f} kWh | "
                        "{d[high]:20.2f} kWh | {d[total]:.2f} kWh\n").format(d=hdata)
            print(msg)

        if data['annual_total_bill']:
            output3 = ("""
    Annual Total
    ============

    Start date:             {d[annual_date_start]}
    End date:               {d[annual_date_end]}
    Total bill:             {d[annual_total_bill]} $
    Mean daily bill:        {d[annual_mean_daily_bill]} $
    Total consumption:      {d[annual_total_consumption]} kWh
    Mean dailyconsumption:  {d[annual_mean_daily_consumption]} kWh
    kWh price:              {d[annual_kwh_price_cent]} ¢
    """)
            print(output3.format(d=data))
279724
def output_service(gandi, service, status, justify=10):
    
    output_line(gandi, service, status, justify)
1200584
def output_to_bar(self, message, comma=True):
        
        if comma:
            message += ','
        sys.stdout.write(message + '\n')
        sys.stdout.flush()