runs a command on heroku similar to `$ heroku run #foo`
 but programatically and with more control
355453
def run(cmd_type, command = nil, options = {}, &block)
      command        = cmd_type.to_s if command.nil?
      heroku_options = (options.delete(:heroku) || {}).map do |k,v|
        arg = "--#{k.to_s.shellescape}"
        arg << "=#{v.to_s.shellescape}" unless v.nil?
        arg
      end.join(" ")
      heroku_command = "heroku run -a #{name} #{heroku_options} --exit-code -- #{command}"
      bundle_exec do
        if block_given?
          ReplRunner.new(cmd_type, heroku_command, options).run(&block)
        else
          `#{heroku_command}`
        end
      end
    end
693610
def run(self, conn, tmp, module_name, module_args, inject):
        '''  '''

        # shell and command are the same module
        if module_name == 'shell':
            module_name = 'command'
            module_args += " #USE_SHELL"

        vv("REMOTE_MODULE %s %s" % (module_name, module_args), host=conn.host)
        return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject)
667712
def run_command(self, command, arg=None, is_eval=False):
        
        mode = is_eval and 'eval' or 'command'

        if isinstance(arg, tuple):
            name, d = arg
        else:
            name, d = arg, {}

        result = getattr(self.connection.admin, mode)(command, name, **d)
        return result
903375
def execute_command(cmd, **kwargs):
    
    cmd_dict = {
        c: 'flask_philo.commands_flask_philo.' + c for c
            in dir(commands_flask_philo) if not c.startswith('_') and c != 'os'  # noqa
    }

    # loading specific app commands
    try:
        import console_commands
        for cm in console_commands.__all__:
            if not cm.startswith('_'):
                cmd_dict[cm] = 'console_commands.' + cm
    except Exception:
        pass

    if cmd not in cmd_dict:
        raise ConfigurationError('command {} does not exists'.format(cmd))
    cmd_module = importlib.import_module(cmd_dict[cmd])
    kwargs['app'] = app
    cmd_module.run(**kwargs)
27598
function run(command) {
  const script = findScript(command);
  const config = findConfig();

  if (!script) {
    console.error(`ERROR: File not found: scripts/${command}.js`);
    process.exit(1);
  }

  const start = new Date();
  console.log(`Starting '${chalk.bold.gray(command)}'...`);

  return Promise.resolve().then(() => require(script)(config)).then(() => {
    console.log(
      `Finished '${chalk.bold.gray(command)}' after ` +
      `${chalk.bold(new Date().getTime() - start.getTime())}ms`
    );
  }, err => console.error(err.stack));
}
513400
def run(command_line)
      require 'open3'
      env = Hash[environment_vars.map { |k, v| [k.to_s, v.to_s] }]
      Open3.capture2e(env, command_line.to_s)
    end
344233
function runJekyll (next) {

      // Build the command string
      if (options.bundleExec) {
        command = 'bundle exec ' + command;
      }

      if (options.serve) {
        command += majorVersion > 0 ? ' serve' : ' server';
      }
      else {
        command += ' build';
      }

      // Insert temporary config path into the config option
      if (typeof rawConfigFile !== 'undefined') {
        options.config = options.config ? options.config + ',' + rawConfigFile : rawConfigFile;
      }

      // Add flags to command if running serve or build
      Object.keys(optionList).forEach(function(option) {
        if (options[option]) {
          command += ' ' + optionList[option];
          if (typeof options[option] !== 'boolean') {
            command += ' ' + options[option];
          }
          if (!options[option]) {
            grunt.warn('`' + option + '` has been deprecated. You may want to try this as a `raw` option in your Gruntfile or in `_config.yml`.');
          }
        }
      });

      // Execute command
      grunt.log.write('`' + command + '` was initiated.\n');

      if (options.serve) {
        grunt.log.write('Started web server on http://localhost:' + (options.port || 4000) + '. Press Ctrl-C to stop it.\n');
      }

      exec(command, function(err, stdout) {
        grunt.log.write('\n\nJekyll output:\n' + stdout);

        if (err) {
          grunt.fail.warn(err);
          done(false);
        }
        else {
          next();
        }
      });
    }
866647
def run(self, command, variables=[], board=None, packages=[]):
        """"""

        # -- Check for the SConstruct file
        if not isfile(util.safe_join(util.get_project_dir(), 'SConstruct')):
            variables += ['-f']
            variables += [util.safe_join(
                util.get_folder('resources'), 'SConstruct')]
        else:
            click.secho('Info: use custom SConstruct file')

        # -- Resolve packages
        if self.profile.check_exe_default():
            # Run on `default` config mode
            if not util.resolve_packages(
              packages,
              self.profile.packages,
              self.resources.distribution.get('packages')
             ):
                # Exit if a package is not installed
                raise Exception
        else:
            click.secho('Info: native config mode')

        # -- Execute scons
        return self._execute_scons(command, variables, board)
623795
def invoke(command, params={})
      command_string = compile_command(command, params)
      output_command(command_string)
      execute(command_string, params)
    end
1243759
def run_command(self, args=None, node_paths=None):
    """"""
    return command_gen(
      self.tool_installations,
      self.name,
      args=args,
      node_paths=node_paths
    )
712329
def run(self, cmd, fn=None, globals=None, locals=None):
        """"""
        if globals is None:
            import __main__
            globals = __main__.__dict__
        if locals is None:
            locals = globals
        self.reset()
        if isinstance(cmd, str):
            str_cmd = cmd
            cmd = compile(str_cmd, fn or "<wdb>", "exec")
            self.compile_cache[id(cmd)] = str_cmd
        if fn:
            from linecache import getline
            lno = 1
            while True:
                line = getline(fn, lno, globals)
                if line is None:
                    lno = None
                    break
                if executable_line(line):
                    break
                lno += 1

        self.start_trace()
        if lno is not None:
            self.breakpoints.add(LineBreakpoint(fn, lno, temporary=True))
        try:
            execute(cmd, globals, locals)
        finally:
            self.stop_trace()
1345705
def run_from_command_line():
    
    for commands_conf in firenado.conf.management['commands']:
        logger.debug("Loading %s commands from %s." % (
            commands_conf['name'],
            commands_conf['module']
        ))
        exec('import %s' % commands_conf['module'])
    command_index = 1
    for arg in sys.argv[1:]:
        command_index += 1
        if arg[0] != "-":
            break
    parser = FirenadoArgumentParser(prog=os.path.split(sys.argv[0])[1],
                                    add_help=False)
    parser.add_argument("-h", "--help", default=argparse.SUPPRESS)
    parser.add_argument("command", default="help", help="Command to executed")

    try:
        namespace = parser.parse_args(sys.argv[1:command_index])
        if not command_exists(namespace.command):
            show_command_line_usage(parser)
        else:
            run_command(namespace.command, sys.argv[command_index-1:])
    except FirenadoArgumentError:
        show_command_line_usage(parser, True)
1179612
function run(appName, command, callback) {
    commons.get(format('/%s/apps/%s/run/', deis.version, appName), callback);
  }
1337380
function run(argv, done) {
  if (!argv) {
    argv = parser.argv;
  }

  if (argv.h) {
    parser.showHelp();
    return done(null);
  }

  if (!argv._.length) {
    return done(new Error('Requires an input argument'));
  } else if (argv._.length > 2) {
    return done(new Error('Too many arguments given!'));
  }

  var input = argv._[0];
  if (input.indexOf('http://') === 0 || input.indexOf('https://') === 0) {
    request(input, function (err, res, body) {
      if (err) {
        return done(err);
      }
      convert(body, done);
    });
  } else {
    if (!fs.existsSync(input)) {
      return done(new Error('`' + input + '` does not exist!'));
    }

    fs.readFile(input, 'utf-8', function (err, content) {
      if (err) {
        return done(err);
      }

      convert(content, done);
    });
  }
}
1252463
def run(self, command):
        
        if isinstance(command, basestring):
            command = command.split()
        else:
            command = list(command)
        self.external.omero_cli(command)
273794
async def command(dev, service, method, parameters):
    """"""
    params = None
    if parameters is not None:
        params = ast.literal_eval(parameters)
    click.echo("Calling %s.%s with params %s" % (service, method, params))
    res = await dev.raw_command(service, method, params)
    click.echo(res)
433899
def get(self, key, subcommand="config:get"):
        """"""
        cmd = ["heroku", subcommand, key, "--app", self.name]
        return self._result(cmd)