Execute a bundle of operations
768224
def execute(self):
        
        self.bitshares.blocking = "head"
        r = self.bitshares.txbuffer.broadcast()
        self.bitshares.blocking = False
        return r
1093772
def execute(self, processProtocol, command, env={},
                path=None, uid=None, gid=None, usePTY=0, childFDs=None):
        
        raise NotImplementedError()
164933
public void execute() throws MojoExecutionException {

        // 1. Create and set up directories
        getLog().info("Creating and setting up the bundle directories");
        buildDirectory.mkdirs();

        File bundleDir = new File(buildDirectory, bundleName + ".app");
        bundleDir.mkdirs();

        File contentsDir = new File(bundleDir, "Contents");
        contentsDir.mkdirs();

        File resourcesDir = new File(contentsDir, "Resources");
        resourcesDir.mkdirs();

        File javaDirectory = new File(contentsDir, "Java");
        javaDirectory.mkdirs();

        File macOSDirectory = new File(contentsDir, "MacOS");
        macOSDirectory.mkdirs();

        // 2. Copy in the native java application stub
        getLog().info("Copying the native Java Application Stub");
        File launcher = new File(macOSDirectory, javaLauncherName);
        launcher.setExecutable(true);

        FileOutputStream launcherStream = null;
        try {
            launcherStream = new FileOutputStream(launcher);
        } catch (FileNotFoundException ex) {
            throw new MojoExecutionException("Could not copy file to directory " + launcher, ex);
        }

        InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);
        try {
            IOUtil.copy(launcherResourceStream, launcherStream);
        } catch (IOException ex) {
            throw new MojoExecutionException("Could not copy file " + javaLauncherName + " to directory " + macOSDirectory, ex);
        }

        // 3.Copy icon file to the bundle if specified
        if (iconFile != null) {
            File f = searchFile(iconFile, project.getBasedir());

            if (f != null && f.exists() && f.isFile()) {
                getLog().info("Copying the Icon File");
                try {
                    FileUtils.copyFileToDirectory(f, resourcesDir);
                } catch (IOException ex) {
                    throw new MojoExecutionException("Error copying file " + iconFile + " to " + resourcesDir, ex);
                }
            } else {
                throw new MojoExecutionException(String.format("Could not locate iconFile '%s'", iconFile));
            }
        }

        // 4. Resolve and copy in all dependencies from the pom
        getLog().info("Copying dependencies");
        List<String> files = copyDependencies(javaDirectory);
        if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {
            files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, "lib", additionalBundledClasspathResources));
        }

        // 5. Check if JRE should be embedded. Check JRE path. Copy JRE
        if (jrePath != null) {
            File f = new File(jrePath);
            if (f.exists() && f.isDirectory()) {
                // Check if the source folder is a jdk-home
                File pluginsDirectory = new File(contentsDir, "PlugIns/JRE/Contents/Home/jre");
                pluginsDirectory.mkdirs();

                File sourceFolder = new File(jrePath, "Contents/Home");
                if (new File(jrePath, "Contents/Home/jre").exists()) {
                    sourceFolder = new File(jrePath, "Contents/Home/jre");
                }

                try {
                    getLog().info("Copying the JRE Folder from : [" + sourceFolder + "] to PlugIn folder: [" + pluginsDirectory + "]");
                    FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);
                    File binFolder = new File(pluginsDirectory, "bin");
                    //Setting execute permissions on executables in JRE
                    for (String filename : binFolder.list()) {
                        new File(binFolder, filename).setExecutable(true, false);
                    }

                    new File (pluginsDirectory, "lib/jspawnhelper").setExecutable(true,false);
                    embeddJre = true;
                } catch (IOException ex) {
                    throw new MojoExecutionException("Error copying folder " + f + " to " + pluginsDirectory, ex);
                }
            } else {
                getLog().warn("JRE not found check jrePath setting in pom.xml");
            }
        } else if (jreFullPath != null){
            getLog().info("JRE Full path is used [" + jreFullPath + "]");
            embeddJre = true;
        }

        // 6. Create and write the Info.plist file
        getLog().info("Writing the Info.plist file");
        File infoPlist = new File(bundleDir, "Contents" + File.separator + "Info.plist");
        this.writeInfoPlist(infoPlist, files);

        // 7. Copy specified additional resources into the top level directory
        getLog().info("Copying additional resources");
        if (additionalResources != null && !additionalResources.isEmpty()) {
            this.copyResources(buildDirectory, additionalResources);
        }

        // 7. Make the stub executable
        if (!SystemUtils.IS_OS_WINDOWS) {
            getLog().info("Making stub executable");
            Commandline chmod = new Commandline();
            try {
                chmod.setExecutable("chmod");
                chmod.createArgument().setValue("755");
                chmod.createArgument().setValue(launcher.getAbsolutePath());

                chmod.execute();
            } catch (CommandLineException e) {
                throw new MojoExecutionException("Error executing " + chmod + " ", e);
            }
        } else {
            getLog().warn("The stub was created without executable file permissions for UNIX systems");
        }

        // 8. Create the DMG file
        if (generateDiskImageFile) {
            if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {
                getLog().info("Generating the Disk Image file");
                Commandline dmg = new Commandline();
                try {
                    // user wants /Applications symlink in the resulting disk image
                    if (includeApplicationsSymlink) {
                        createApplicationsSymlink();
                    }
                    dmg.setExecutable("hdiutil");
                    dmg.createArgument().setValue("create");
                    dmg.createArgument().setValue("-srcfolder");
                    dmg.createArgument().setValue(buildDirectory.getAbsolutePath());
                    dmg.createArgument().setValue(diskImageFile.getAbsolutePath());

                    try {
                        dmg.execute().waitFor();
                    } catch (InterruptedException ex) {
                        throw new MojoExecutionException("Thread was interrupted while creating DMG " + diskImageFile, ex);
                    } finally {
                        if (includeApplicationsSymlink) {
                            removeApplicationsSymlink();
                        }
                    }
                } catch (CommandLineException ex) {
                    throw new MojoExecutionException("Error creating disk image " + diskImageFile, ex);
                }

                if (diskImageInternetEnable) {
                    getLog().info("Enabling the Disk Image file for internet");
                    try {
                        Commandline internetEnableCommand = new Commandline();

                        internetEnableCommand.setExecutable("hdiutil");
                        internetEnableCommand.createArgument().setValue("internet-enable");
                        internetEnableCommand.createArgument().setValue("-yes");
                        internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());

                        internetEnableCommand.execute();
                    } catch (CommandLineException ex) {
                        throw new MojoExecutionException("Error internet enabling disk image: " + diskImageFile, ex);
                    }
                }
                projectHelper.attachArtifact(project, "dmg", null, diskImageFile);
            }
            if (SystemUtils.IS_OS_LINUX) {
                getLog().info("Generating the Disk Image file");
                Commandline linux_dmg = new Commandline();
                try {
                    linux_dmg.setExecutable("genisoimage");
                    linux_dmg.createArgument().setValue("-V");
                    linux_dmg.createArgument().setValue(bundleName);
                    linux_dmg.createArgument().setValue("-D");
                    linux_dmg.createArgument().setValue("-R");
                    linux_dmg.createArgument().setValue("-apple");
                    linux_dmg.createArgument().setValue("-no-pad");
                    linux_dmg.createArgument().setValue("-o");
                    linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());
                    linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());

                    try {
                        linux_dmg.execute().waitFor();
                    } catch (InterruptedException ex) {
                        throw new MojoExecutionException("Thread was interrupted while creating DMG " + diskImageFile,
                                ex);
                    }
                } catch (CommandLineException ex) {
                    throw new MojoExecutionException("Error creating disk image " + diskImageFile + " genisoimage probably missing", ex);
                }
                projectHelper.attachArtifact(project, "dmg", null, diskImageFile);

            } else {
                getLog().warn("Disk Image file cannot be generated in non Mac OS X and Linux environments");
            }
        }

        getLog().info("App Bundle generation finished");
    }
699640
def execute(self):
        
        func_params = []
        exec_str = self.func.__name__ + '(' 
        for p in self.params:
            if p[0][0:2] != '__':   # ignore custom param names
                exec_str += p[0] + '="' + self._force_str(p[1]) + '", '
                func_params.append(p[1])
        exec_str = exec_str[:-2]
        exec_str += ')  # task' + str(self.task_id) + ': ' + self.name
        
        
        self.result = self.func(*func_params)
        print(exec_str + ' loaded ', self.result)
776875
def execute(self, conn, app, release_version, pset_hash, output_label, global_tag, transaction = False):
        
        binds = {}
        binds["app_name"]=app
        binds["release_version"]=release_version
        binds["pset_hash"]=pset_hash
        binds["output_module_label"]=output_label
        binds["global_tag"]=global_tag

        result = self.dbi.processData(self.sql, binds, conn, transaction)

        plist = self.formatDict(result)

	if len(plist) < 1: return -1
        return plist[0]["output_mod_config_id"]
937171
def run(state, command, args):
    """"""
    from ..core import do_run
    do_run(
        command=command, args=args, three=state.three, python=state.python, pypi_mirror=state.pypi_mirror
    )
304668
def run(self, **options):
        """"""
        if not self.is_setup:
            self.setup()

        if self.twisted:
            self.run_with_twisted(**options)
        elif self.gunicorn:
            self.run_with_gunicorn(**options)
        else:
            self.run_with_werkzeug(**options)
692390
function ExecuteSql()
    {
        $versionCompare = version_compare($this->installedVersion, $this->manifest->Version());
       
        if ($versionCompare > 0)
        {
            $bundle = $this->manifest->BundleName();
            throw new \Exception("Error instaling bundle $bundle: Previously installed version is greater than curren code version. Please re-install the bundle.");
        }
        else if ($versionCompare === 0)
        {
            return;
        }
        $engineFolder = $this->FindEngineFolder();
        if (!$engineFolder)
        {
            return;
        }
        $this->ExecuteScripts($engineFolder);       
    }
784821
def do_execute(self):
        
        for f in self.resolve_option("files"):
            self._output.append(Token(f))
        return None
460746
function execute(req, res) {
  // TODO: ensure a conflict is triggered on all watched keys
  this.store.flushall();
  res.send(null, Constants.OK);
}
1113955
def run(addr, *commands, **kwargs):
    
    results = []
    handler = VarnishHandler(addr, **kwargs)
    for cmd in commands:
        if isinstance(cmd, tuple) and len(cmd)>1:
            results.extend([getattr(handler, c[0].replace('.','_'))(*c[1:]) for c in cmd])
        else:
            results.append(getattr(handler, cmd.replace('.','_'))(*commands[1:]))
            break
    handler.close()
    return results
455052
function executeBatches(bulkOperation, options, callback) {
  let numberOfCommandsToExecute = bulkOperation.s.batches.length;
  // Execute over all the batches
  for (let i = 0; i < bulkOperation.s.batches.length; i++) {
    executeBatch(bulkOperation, bulkOperation.s.batches[i], options, function(err) {
      // Count down the number of commands left to execute
      numberOfCommandsToExecute = numberOfCommandsToExecute - 1;

      // Execute
      if (numberOfCommandsToExecute === 0) {
        // Driver level error
        if (err) return handleCallback(callback, err);

        const writeResult = new BulkWriteResult(bulkOperation.s.bulkResult);
        if (bulkOperation.handleWriteError(callback, writeResult)) return;

        return handleCallback(callback, null, writeResult);
      }
    });
  }
}
482649
@Override
    public void execute ()
        throws BuildException
    {
        // make sure everythign was set up properly
        ensureSet(_actionDef, "Must specify the action sequence " +
                  "definitions via the 'actiondef' attribute.");
        ensureSet(_classDef, "Must specify the component class definitions " +
                  "via the 'classdef' attribute.");
        ensureSet(_target, "Must specify the path to the target bundle " +
                  "file via the 'target' attribute.");

        // make sure we can write to the target bundle file
        OutputStream fout = null;
        try {

            // parse our metadata
            Tuple<Map<String, ActionSequence>, Map<String, TileSet>> tuple = parseActions();
            Map<String, ActionSequence> actions = tuple.left;
            Map<String, TileSet> actionSets = tuple.right;
            Map<String, ComponentClass> classes = parseClasses();

            fout = createOutputStream(_target);

            // throw the serialized actions table in there
            fout = nextEntry(fout, BundleUtil.ACTIONS_PATH);
            ObjectOutputStream oout = new ObjectOutputStream(fout);
            oout.writeObject(actions);
            oout.flush();

            // throw the serialized action tilesets table in there
            fout = nextEntry(fout, BundleUtil.ACTION_SETS_PATH);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(actionSets);
            oout.flush();

            // throw the serialized classes table in there
            fout =  nextEntry(fout, BundleUtil.CLASSES_PATH);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(classes);
            oout.flush();

            // close it up and we're done
            fout.close();

        } catch (IOException ioe) {
            String errmsg = "Unable to output to target bundle " +
                "[path=" + _target.getPath() + "].";
            throw new BuildException(errmsg, ioe);

        } finally {
            if (fout != null) {
                try {
                    fout.close();
                } catch (IOException ioe) {
                    // nothing to complain about here
                }
            }
        }
    }
273497
function exec() {

  var actions = {
    commands: {
      'list-dependencies': { action: _listDependencies },
      'list-devdependencies': { action: _listDevDependencies },
      'list-peerdependencies': { action: _listPeerDependencies },
      'list-optdependencies': { action: _listOptDependencies },
      'list-alldependencies': { action: _listAllDependencies },
      'set-node-engine': { action: _setNodeEngine },
      'sort-dependencies': { action: _sortDependencies },
      'sort-devdependencies': { action: _sortDevDependencies },
      'sort-peerdependencies': { action: _sortPeerDependencies },
      'sort-optdependencies': { action: _sortOptDependencies },
      'sort-alldependencies': { action: _sortAllDependencies },
      'traverse-dependencies': { action: _traverseDependencies },
      'upgrade-version-patch': { action: _upgradeVersionPatch },
      'upgrade-version-minor': { action: _upgradeVersionMinor },
      'upgrade-version-major': { action: _upgradeVersionMajor },
      'upgrade-version': { action: _upgradeVersionPatch },
      'upgrade-dependencies': { action: _upgradeDependencies },
    }
  };

  cli.command(__dirname, actions);
}
765285
def execute(self, *args, **options):
        ''''''
        if options['verbose']:
            options['verbosity'] = 3
        if options['quiet']:
            options['verbosity'] = 0
        self.verbosity = options.get('verbosity', 1)
        super().execute(*args, **options)
163853
def execute_by_options(args):
    
    if args['subcommand'] == 'sphinx':
        s = Sphinx(proj_info)
        if args['quickstart']:
            s.quickstart()
        elif args['gen_code_api']:
            s.gen_code_api()
        elif args['rst2html']:
            s.rst2html()
        pass
    elif args['subcommand'] == 'offline_dist':
        pod = PyOfflineDist()
        if args['freeze_deps']:
            pod.freeze_deps()
        elif args['download_deps']:
            pod.download_deps()
        elif args['install_deps']:
            pod.install_deps()
        elif args['clean_deps']:
            pod.clean_deps()
        elif args['mkbinary']:
            pod.pyinstaller_mkbinary(args['mkbinary'])
        elif args['clean_binary']:
            pod.clean_binary()

    pass
785636
function execute(req, res) {
  var t = systime();
  res.send(null, [t.s, t.m]);
}