Default ffdc dump routine - always invoked
492239
public void ffdcDumpDefault(Throwable t, IncidentStream is, Object callerThis, Object[] objs, String sourceId) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "ffdcDumpDefault");

    // First trace the Throwable, so that we can actually spot the exception in the trace
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "FFDC for " + t);
    // Trace the first line of the stacktrace too, as it'll help debugging
    if (t != null) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "  at... " + t.getStackTrace()[0]);
    }

    // Capture the Messaging Engine Name and other default information
    super.captureDefaultInformation(is);

    // The objs parm may contain one request or several. Each call to dumpUsefulStuff()
    // deals with a single request. If it contains several requests, each entry
    // in objs is itself an Object[]. If not, the first entry is just an Object.
    if (objs != null && objs.length > 0) {
      if (objs[0] instanceof Object[]) {
        for (int i = 0; i < objs.length; i++) {
          // Belt & braces - we don't want FFDC to fail because someone inserted something invalid
          if (objs[i] instanceof Object[]) dumpUsefulStuff(is, (Object[])objs[i]);
        }
      }
      else {
        dumpUsefulStuff(is, objs);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "ffdcDumpDefault");
  }
1366436
function ffmpeg(os) {
  var stdio = os.stdio===undefined? STDIO:os.stdio;
  return new Promise((fres, frej) => cp.exec(command(os), {stdio}, (err, stdout, stderr) => {
    if(err) frej(err);
    else fres({stdout, stderr});
  }));
}
822166
def _xfsdump_output(data):
    '''
    
    '''
    out = {}
    summary = []
    summary_block = False

    for line in [l.strip() for l in data.split("\n") if l.strip()]:
        line = re.sub("^xfsdump: ", "", line)
        if line.startswith("session id:"):
            out['Session ID'] = line.split(" ")[-1]
        elif line.startswith("session label:"):
            out['Session label'] = re.sub("^session label: ", "", line)
        elif line.startswith("media file size"):
            out['Media size'] = re.sub(r"^media file size\s+", "", line)
        elif line.startswith("dump complete:"):
            out['Dump complete'] = re.sub(r"^dump complete:\s+", "", line)
        elif line.startswith("Dump Status:"):
            out['Status'] = re.sub(r"^Dump Status:\s+", "", line)
        elif line.startswith("Dump Summary:"):
            summary_block = True
            continue

        if line.startswith(" ") and summary_block:
            summary.append(line.strip())
        elif not line.startswith(" ") and summary_block:
            summary_block = False

    if summary:
        out['Summary'] = ' '.join(summary)

    return out
267416
def dump_commands(commands, directory=None, sub_dir=None):
    
    print('\t' + str(len(commands)), 'failed commands')

    # Create dump_dir directory
    if directory and os.path.isfile(directory):
        dump_dir = set_dump_directory(os.path.dirname(directory), sub_dir)
        return_dir = dump_dir
    elif directory:
        dump_dir = set_dump_directory(directory, sub_dir)
        return_dir = dump_dir
    else:
        dump_dir = TemporaryDirectory().name
        return_dir = TemporaryDirectory()

    # Create list of (path, content) tuples
    command_filepath = [(fail, os.path.join(dump_dir, str(count) + '.sql')) for count, fail in enumerate(commands)]

    # Dump failed commands to text file in the same directory as the commands
    # Utilize's multiprocessing module if it is available
    timer = Timer()
    if MULTIPROCESS:
        pool = Pool(cpu_count())
        pool.map(write_text_tup, command_filepath)
        pool.close()
        print('\tDumped ', len(command_filepath), 'commands\n\t\tTime      : {0}'.format(timer.end),
              '\n\t\tMethod    : (multiprocessing)\n\t\tDirectory : {0}'.format(dump_dir))
    else:
        for tup in command_filepath:
            write_text_tup(tup)
        print('\tDumped ', len(command_filepath), 'commands\n\t\tTime      : {0}'.format(timer.end),
              '\n\t\tMethod    : (sequential)\n\t\tDirectory : {0}'.format(dump_dir))

    # Return base directory of dumped commands
    return return_dir
305953
def cmd_fft(args):
    ''''''
    from MAVProxy.modules.lib import mav_fft
    if len(args) > 0:
        condition = args[0]
    else:
        condition = None
    child = multiproc.Process(target=mav_fft.mavfft_display, args=[mestate.filename,condition])
    child.start()
902321
def ffmpeg(*args, **kwargs):
    """"""

    ff = FFMPEG(*args, **kwargs)
    ff.start(
            stdin=kwargs.get("stdin", None),
            stdout=kwargs.get("stdout", None),
            stderr=kwargs.get("stderr", subprocess.PIPE)
        )

    ff.wait(kwargs.get("progress_handler", None))

    if ff.return_code:
        err = indent(ff.error_log)
        logging.error("Problem occured during transcoding\n\n{}\n\n".format(err))
        return False
    return True
240675
def init_command(default_output_format, default_myproxy_username):
    
    # now handle the output format, requires a little bit more care
    # first, prompt if it isn't given, but be clear that we have a sensible
    # default if they don't set it
    # then, make sure that if it is given, it's a valid format (discard
    # otherwise)
    # finally, set it only if given and valid
    if not default_output_format:
        safeprint(
            textwrap.fill(
                'This must be one of "json" or "text". Other values will be '
                "ignored. ENTER to skip."
            )
        )
        default_output_format = (
            click.prompt(
                "Default CLI output format (cli.output_format)", default="text"
            )
            .strip()
            .lower()
        )
        if default_output_format not in ("json", "text"):
            default_output_format = None

    if not default_myproxy_username:
        safeprint(textwrap.fill("ENTER to skip."))
        default_myproxy_username = click.prompt(
            "Default myproxy username (cli.default_myproxy_username)",
            default="",
            show_default=False,
        ).strip()

    # write to disk
    safeprint(
        "\n\nWriting updated config to {0}".format(os.path.expanduser("~/.globus.cfg"))
    )
    write_option(OUTPUT_FORMAT_OPTNAME, default_output_format)
    write_option(MYPROXY_USERNAME_OPTNAME, default_myproxy_username)
527355
def main() -> None:
    
    main_only_quicksetup_rootlogger(level=logging.DEBUG)
    parser = argparse.ArgumentParser()
    parser.add_argument("directory", nargs="?", default=os.getcwd())
    parser.add_argument("--reportevery", default=10000)
    args = parser.parse_args()
    log.info("Extensions in directory {!r}:", args.directory)
    print("\n".join(repr(x) for x in
                    list_file_extensions(args.directory,
                                         reportevery=args.reportevery)))
862707
def dump_all_keys_or_addrs(wallet_obj):
    '''
    
    '''

    print_traversal_warning()

    puts('\nDo you understand this warning?')
    if not confirm(user_prompt=DEFAULT_PROMPT, default=False):
        puts(colored.red('Dump Cancelled!'))
        return

    mpub = wallet_obj.serialize_b58(private=False)

    if wallet_obj.private_key:
        desc_str = 'private keys'
    else:
        desc_str = 'addresses'
        puts('Displaying Public Addresses Only')
        puts('For Private Keys, please open bcwallet with your Master Private Key:\n')
        priv_to_display = '%s123...' % first4mprv_from_mpub(mpub=mpub)
        print_bcwallet_basic_priv_opening(priv_to_display=priv_to_display)

    puts('How many %s (on each chain) do you want to dump?' % desc_str)
    puts('Enter "b" to go back.\n')

    num_keys = get_int(
            user_prompt=DEFAULT_PROMPT,
            max_int=10**5,
            default_input='5',
            show_default=True,
            quit_ok=True,
            )

    if num_keys is False:
        return

    if wallet_obj.private_key:
        print_childprivkey_warning()

    puts('-' * 70)
    for chain_int in (0, 1):
        for current in range(0, num_keys):
            path = "m/%d/%d" % (chain_int, current)
            if current == 0:
                if chain_int == 0:
                    print_external_chain()
                    print_key_path_header()
                elif chain_int == 1:
                    print_internal_chain()
                    print_key_path_header()
            child_wallet = wallet_obj.get_child_for_path(path)
            if wallet_obj.private_key:
                wif_to_use = child_wallet.export_to_wif()
            else:
                wif_to_use = None
            print_path_info(
                    address=child_wallet.to_address(),
                    path=path,
                    wif=wif_to_use,
                    coin_symbol=coin_symbol_from_mkey(mpub),
                    )

    puts(colored.blue('\nYou can compare this output to bip32.org'))
562158
public void dump()
    {
        Object allData[] = new Object[] {
                                         this,
                                         "EJBName                     = " + ivEjbName,
                                         "method name                 = " + ivMethodName,
                                         "method parameters           = " + ivMethodParms,
                                         "binding style               = " + ivBindingStyle,
                                         "exclude default inteceptors = " + ivExcludeDefaultLevelInterceptors,
                                         "exclude class inteceptors   = " + ivExcludeClassLevelInterceptors,
        }; // d457352

        int totalLength = allData.length;

        String[] interceptorOrder = null;
        if (ivInterceptorOrder != null)
        {
            interceptorOrder = new String[ivInterceptorOrder.size()];
            interceptorOrder = ivInterceptorOrder.toArray(interceptorOrder);
            totalLength += interceptorOrder.length + 2;
        }

        String[] interceptorNames = null;
        if (ivInterceptorClassNames != null)
        {
            interceptorNames = new String[ivInterceptorClassNames.size()];
            interceptorNames = ivInterceptorClassNames.toArray(interceptorNames);
            totalLength += interceptorNames.length + 2;
        }

        int index = 0;
        Object dumpData[] = new Object[totalLength];
        System.arraycopy(allData, 0, dumpData, index, allData.length);
        index += allData.length;

        if (interceptorOrder != null)
        {
            dumpData[index++] = "Interceptor Order: ";
            dumpData[index++] = " ";
            System.arraycopy(interceptorOrder, 0, dumpData, index, interceptorOrder.length);
            index += interceptorOrder.length;
        }

        if (interceptorNames != null)
        {
            dumpData[index++] = "Interceptor Class Names: ";
            dumpData[index++] = " ";
            System.arraycopy(interceptorNames, 0, dumpData, index, interceptorNames.length);
            index += interceptorNames.length;
        }

        Tr.dump(tc, "-- EJBInterceptorBinding Dump --", dumpData);
        Tr.dump(tc, "-- EJBInterceptorBinding Dump End --");
    }
539966
private File createThreadDump(File outputDir) {
        // Determine if we're using Java Attach (VirtualMachine.remoteDataDump)
        // or the DiagnosticCommand MBean.  Java Attach is only available on
        // JREs (not JDKs) and sometimes fails to connect, but we prefer it when
        // available because DiagnosticCommand returns the entire thread dump as
        // a single String, which risks OutOfMemoryError.
        VirtualMachine vm = null;
        try {
            vm = getAttachedVirtualMachine();
            if (vm == null && diagnosticCommandName == null) {
                // Neither Java Attach nor DiagnosticCommand are available, so
                // it's not possible to create a thread dump.
                return null;
            }
        } catch (VirtualMachineException e) {
            // Sometimes Java Attach fails spuriously.  If DiagnosticCommand is
            // available, try that.  Otherwise, propagate the failure.
            if (diagnosticCommandName == null) {
                Throwable cause = e.getCause();
                throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause);
            }
        }

        File outputFile = null;
        InputStream input = null;
        OutputStream output = null;
        boolean success = false;

        try {
            // Use a filename that resembles an IBM javacore.
            outputFile = createNewFile(outputDir, "javadump", "txt");

            if (vm != null) {
                input = vm.remoteDataDump();
                input = new BufferedInputStream(input);

                output = new FileOutputStream(outputFile);
                output = new BufferedOutputStream(output);

                byte[] buf = new byte[8192];
                for (int read; (read = input.read(buf)) != -1;) {
                    output.write(buf, 0, read);
                }
            } else {
                String outputString;
                try {
                    outputString = (String) platformMBeanServer.invoke(diagnosticCommandName,
                                                                       "threadPrint",
                                                                       new Object[] { new String[] { "-l" } },
                                                                       new String[] { String[].class.getName() });
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }

                output = new FileOutputStream(outputFile);
                Writer writer = new OutputStreamWriter(output, "UTF-8");
                writer.write(outputString);
                writer.close();
            }

            success = true;
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        } finally {
            Utils.tryToClose(input);
            Utils.tryToClose(output);

            if (!success && outputFile != null && !outputFile.delete()) {
                // Avoid FindBugs warning.  We .delete() as a best effort.
                outputFile = null;
            }
        }

        return outputFile;
    }
1261298
def _at_dump_functions(self, calculator, rule, scope, block):
        
        sys.stderr.write("%s\n" % repr(rule.namespace._functions))
1124395
def dump(self, f):
        
        ret = libxml2mod.xmlDocDump(f, self._o)
        return ret
419122
def create_dump():
    
    dump = upkey("dump").setResultsName("action")
    return (
        dump
        + upkey("schema")
        + Optional(Group(delimitedList(table)).setResultsName("tables"))
    )
530203
def dump():
    

    if not self.isactive():
        lib.echo("ERROR: Enter a project first")
        sys.exit(lib.USER_ERROR)

    # Print custom environment variables first
    custom = sorted(os.environ.get("BE_ENVIRONMENT", "").split())
    if custom:
        lib.echo("Custom:")
        for key in custom:
            lib.echo("- %s=%s" % (key, os.environ.get(key)))

    # Then print redirected variables
    project = os.environ["BE_PROJECT"]
    root = os.environ["BE_PROJECTSROOT"]
    be = _extern.load(project, "be", optional=True, root=root)
    redirect = be.get("redirect", {}).items()
    if redirect:
        lib.echo("\nRedirect:")
        for map_source, map_dest in sorted(redirect):
            lib.echo("- %s=%s" % (map_dest, os.environ.get(map_dest)))

    # And then everything else
    prefixed = dict((k, v) for k, v in os.environ.iteritems()
                    if k.startswith("BE_"))
    if prefixed:
        lib.echo("\nPrefixed:")
        for key in sorted(prefixed):
            if not key.startswith("BE_"):
                continue
            lib.echo("- %s=%s" % (key, os.environ.get(key)))

    sys.exit(lib.NORMAL)
1211767
def dump(self, **kwargs):
        import sys
        ''''''
        if not self.seq:
            self.seq = self.getSequence()
        print("StringGenerator version: %s" % (__version__))
        print("Python version: %s" % sys.version)
        # this doesn't work anymore in p3
        # print("Random method provider class: %s" % randint.im_class.__name__)
        self.seq.dump()
        return self.render(**kwargs)
246909
def __dump_stack(self):
        
        maxdepth = len(self._mode_stack)
        maxdepth_strlen = len(str(maxdepth))
        index_width = 4 - (-maxdepth_strlen) % 4 + 4
        index_str = lambda i: '{:<{}d}'.format(i, index_width)

        self.stdout.write(index_str(0) + self.root_prompt)
        self.stdout.write('\n')

        tree_prefix = '└── '
        for i in range(maxdepth):
            index_prefix = index_str(i + 1)
            whitespace_prefix = ' ' * len(tree_prefix) * i
            mode = self._mode_stack[i]
            line = index_prefix + whitespace_prefix + \
                    tree_prefix + mode.prompt + \
                    ': {}@{}'.format(mode.cmd, mode.args)
            self.stdout.write(line)
            self.stdout.write('\n')