Callback for partial output.
17367
def _partial(self):
        """"""
        raw_stdout = self._process.readAllStandardOutput()
        stdout = handle_qbytearray(raw_stdout, self._get_encoding())

        if self._partial_stdout is None:
            self._partial_stdout = stdout
        else:
            self._partial_stdout += stdout

        self.sig_partial.emit(self, stdout, None)
1232465
def callback(self, sources):
        """"""
        enable = bool(sources)
        if not enable:
            self.plot_widget.value = False
        enable_widget(self.plot_widget, enable)

        if self.done_callback:
            self.done_callback(sources)
175884
def __partial(source, data={})
      if source.kind_of?(Source)
        Undies::Template.new(source, data, @_undies_io)
      else
        @_undies_io.current.partial(source.to_s)
      end
    end
1358840
def _process_content_body(self, channel, payload):
        """"""
        partial = self.partial_messages[channel]
        partial.add_payload(payload)
        if partial.complete:
            #
            # Stick the message in the queue and go back to
            # waiting for method frames
            #
            self._quick_put((channel, partial.method_sig,
                             partial.args, partial.msg))
            self.partial_messages.pop(channel, None)
            self.expected_types[channel] = 1
1355459
def output(self,delimiter = '\t', addnormalised=False):
        """"""
        for type, count in self:
            if isinstance(type,tuple) or isinstance(type,list):
                if addnormalised:
                    yield " ".join((u(x) for x in type)) + delimiter + str(count) + delimiter + str(count/self.total)
                else:
                    yield " ".join((u(x) for x in type)) + delimiter + str(count)
            elif isstring(type):
                if addnormalised:
                    yield type + delimiter + str(count) + delimiter + str(count/self.total)
                else:
                    yield type + delimiter + str(count)
            else:
                if addnormalised:
                    yield str(type) + delimiter + str(count) + delimiter + str(count/self.total)
                else:
                    yield str(type) + delimiter + str(count)
766404
function(func, ctx, partials) {
      var cx = ctx[ctx.length - 1];
      return func.call(cx);
    }
785852
def expect_output(output)
      if output.respond_to?(:~)
        assert_matching_output(output.to_s, all_output)
      else
        assert_partial_output(output, all_output)
      end
    end
381444
function hookStdout(callback)
{
  process.stdout._oWrite = process.stdout.write;

  // take control
  process.stdout.write = function(string, encoding, fd)
  {
    callback(string, encoding, fd);
  };

  // reverse it
  return function()
  {
    process.stdout.write = process.stdout._oWrite;
  };
}
1005230
def prepare_output(d):
    """"""
    outDir = os.path.join(d, 'inorder')
    if not os.path.exists(outDir):
        os.mkdir(outDir)
    for f in os.listdir(outDir):
        f = os.path.join(outDir, f)
        if os.path.islink(f):
            os.remove(f)
    return outDir
355180
def stdout_to_results(s):
    """"""
    results = s.strip().split('\n')
    return [BenchmarkResult(*r.split()) for r in results]
446781
def call_output(cmd, stdin=None, encoding_errors="replace", **kwargs):
    """"""
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
    stdout, stderr, retcode = [], [], None
    while retcode is None:
        if stdin is not None:
            logger.log_prefix("<0 ", stdin.rstrip())
        raw_out, raw_err = p.communicate(stdin)
        stdin = None

        out = raw_out.decode(get_encoding(sys.stdout), encoding_errors) if raw_out else ""
        if out:
            logger.log_prefix("1> ", out.rstrip())
        stdout.append(out)

        err = raw_err.decode(get_encoding(sys.stderr), encoding_errors) if raw_err else ""
        if err:
            logger.log_prefix("2> ", err.rstrip())
        stderr.append(err)

        retcode = p.poll()
    return stdout, stderr, retcode
404901
def s(cls: Type[C], *args, **kwargs) -> Partial[C]:
        
        return Partial(cls, *args, **kwargs)
11994
def eager_partial_regardless(self, fn, *a, **kw):
        """"""
        if self.has_annotations(fn):
            return self.eager_partial(fn, *a, **kw)
        return functools.partial(fn, *a, **kw)
210818
def js_output(self, attrs=None):
        """"""
        result = []
        items = sorted(self.items())
        for key, value in items:
            result.append(value.js_output(attrs))
        return _nulljoin(result)
1033338
function() {
                if(partialOutputMode === 'disabled') {
                    return;
                }
                if(outputBinary) {
                    responseByteArray(xhr, partialBuffer);
                } else {
                    partialBuffer = xhr.responseText;
                }
                partial = partialOutputMode === 'joined' ? partialBuffer : partialBuffer.slice(partialPosition);
                partialPosition = partialBuffer.length;
            }
734212
def default_callback(self, text):
        """"""
        text = text.replace("\r\n", "\n")
        text = "%s\n" % text
        flush_print(text, sep="", end="")
        return text
1026829
function partial(fn) {
  var preset=_slice.call(arguments, 1), self=this
  return function(){ return fn.apply(self, arrfill(preset, arguments)) }
}