Writes gadgets to stdout.
 @param [Array<OneGadget::Gadget::Gadget>] gadgets
 @param [Boolean] raw
   In raw mode, only the offset of gadgets are printed.
 @return [true]
2568
def display_gadgets(gadgets, raw)
      if raw
        show(gadgets.map(&:offset).join(' '))
      else
        show(gadgets.map(&:inspect).join("\n"))
      end
    end
647287
def write(self, title, data, output=None):
        '''
        
        '''
        if not isinstance(data, (dict, list, tuple)):
            data = {'raw-content': str(data)}
        output = output or self.__default_outputter

        if output != 'null':
            try:
                if isinstance(data, dict) and 'return' in data:
                    data = data['return']
                content = self._printout(data, output)
            except Exception:  # Fall-back to just raw YAML
                content = None
        else:
            content = None

        if content is None:
            data = json.loads(json.dumps(data))
            if isinstance(data, dict) and data.get('return'):
                data = data.get('return')
            content = yaml.safe_dump(data, default_flow_style=False, indent=4)

        self.__current_section.append({title: content})
1196565
def write_to_blobs_file(raw, address)
      begin
        File.write(@blobs_file_name, raw, address)
      rescue IOError => e
        PEROBS.log.fatal "Cannot write blobs file #{@blobs_file_name}: " +
          e.message
      end
    end
944699
def dump(device, args=None):
    '''
    
    '''
    cmd = 'blockdev --getro --getsz --getss --getpbsz --getiomin --getioopt --getalignoff ' \
          '--getmaxsect --getsize --getsize64 --getra --getfra {0}'.format(device)
    ret = {}
    opts = [c[2:] for c in cmd.split() if c.startswith('--')]
    out = __salt__['cmd.run_all'](cmd, python_shell=False)
    if out['retcode'] == 0:
        lines = [line for line in out['stdout'].splitlines() if line]
        count = 0
        for line in lines:
            ret[opts[count]] = line
            count = count+1
        if args:
            temp_ret = {}
            for arg in args:
                temp_ret[arg] = ret[arg]
            return temp_ret
        else:
            return ret
    else:
        return False
839649
def dump(records, dump = '')
      # each is faster than inject
      records.each do |record|
        record[1] = @serializer.dump(record.last)
        dump << @format.dump(record)
      end
      dump
    end
893801
def write(self, out):
        """"""

        if not self.rawtagtable:
            self.rawtagtable = self.rawtagdict.items()
        tags = tagblock(self.rawtagtable)
        self.writeHeader(out, 128 + len(tags))
        out.write(tags)
        out.flush()

        return self
1288086
def add_raw_code(self, string_or_list):
        
        if _is_string(string_or_list):
            self._GMSH_CODE.append(string_or_list)
        else:
            assert isinstance(string_or_list, list)
            for string in string_or_list:
                self._GMSH_CODE.append(string)
        return
372922
def write(models, out=None, base=None, propertybase=None, shorteners=None, logger=logging):
    '''
    
    '''
    assert out is not None #Output stream required
    if not isinstance(models, list): models = [models]
    shorteners = shorteners or {}

    all_propertybase = [propertybase] if propertybase else []
    all_propertybase.append(VERSA_BASEIRI)

    if any((base, propertybase, shorteners)):
        out.write('# @docheader\n\n* @iri:\n')
    if base:
        out.write('    * @base: {0}'.format(base))
    #for k, v in shorteners:
    #    out.write('    * @base: {0}'.format(base))

    out.write('\n\n')

    origin_space = set()
    #base_out = models[0].base
    for m in models:
        origin_space.update(all_origins(m))

    for o in origin_space:
        out.write('# {0}\n\n'.format(o))
        for o_, r, t, a in m.match(o):
            abbr_r = abbreviate(r, all_propertybase)
            value_format(t)
            out.write('* {0}: {1}\n'.format(abbr_r, value_format(t)))
            for k, v in a.items():
                abbr_k = abbreviate(k, all_propertybase)
                out.write('    * {0}: {1}\n'.format(k, value_format(v)))

        out.write('\n')
    return
392730
def _write_raw(self, suffix):
        
        if not self.enabled: return

        self.buffer.write(CSI)
        self.buffer.write(suffix)
627941
def emit(self, item, defaults=None, stencil=None, to_log=False, item_formatter=None):
        
        item_text = self.format_item(item, defaults, stencil)

        # Post-process line?
        if item_formatter:
            item_text = item_formatter(item_text)

        # For a header, use configured escape codes on a terminal
        if item is None and os.isatty(sys.stdout.fileno()):
            item_text = ''.join((config.output_header_ecma48, item_text, "\x1B[0m"))

        # Dump to selected target
        if to_log:
            if callable(to_log):
                to_log(item_text)
            else:
                self.LOG.info(item_text)
        elif self.options.nul:
            sys.stdout.write(item_text + '\0')
            sys.stdout.flush()
        else:
            print(item_text)

        return item_text.count('\n') + 1
866513
def capture_content
      original, @_output = output, Output.new
      yield
      original.widgets.concat(output.widgets) # todo: test!!!
      output.to_s
    ensure
      @_output = original
    end
705644
def _textOutput(self, gaObjects):
        
        for variant in gaObjects:
            print(
                variant.id, variant.variant_set_id, variant.names,
                variant.reference_name, variant.start, variant.end,
                variant.reference_bases, variant.alternate_bases,
                sep="\t", end="\t")
            for key, value in variant.attributes.attr.items():
                val = value.values[0].string_value
                print(key, val, sep="=", end=";")
            print("\t", end="")
            for c in variant.calls:
                print(
                    c.call_set_id,
                    c.genotype.__str__().replace('\n', ''),
                    c.genotype_likelihood, c.attributes,
                    c.phaseset, sep=":", end="\t")
            print()
550819
def handle_gadgets(gadgets, libc_file)
      return false if gadgets.empty? # error occurs when fetching gadgets
      return handle_script(gadgets, @options[:script]) if @options[:script]
      return handle_near(libc_file, gadgets, @options[:near]) if @options[:near]

      display_gadgets(gadgets, @options[:raw])
    end
548672
def _raw(self, msg):
        
        self.device.write(msg)
        if self.auto_flush:
            self.flush()
39210
def do_dump(self, arg):
        '''  '''
        if not self.arm.is_connected():
            print(self.style.error('Error: ', 'Arm is not connected.'))
            return
        print(self.arm.dump())
8604
def print_devices(self, devices):
        
        for device in devices:
            print('ID: {} OS: {} IP: {} State: {} ({}) Tags: {}'
                  .format(device.id,
                          device.operating_system.slug,
                          self.get_public_ip(device.ip_addresses),
                          device.state,
                          'spot' if device.spot_instance else 'on-demand',
                          device.tags))
1014170
public void setRawInputRecords(java.util.Collection<String> rawInputRecords) {
        if (rawInputRecords == null) {
            this.rawInputRecords = null;
            return;
        }

        this.rawInputRecords = new java.util.ArrayList<String>(rawInputRecords);
    }