Run notebook as an application
        :param params: parameters to inject in the notebook
        :return:
967701
def run(self):
        

        if not self.args:
            self.parse_args()

        if self.args.log_level:
            logging.getLogger().setLevel(logging.getLevelName(self.args.log_level))
            logging.debug('Enabled {} logging level'.format(self.args.log_level))

        if self.args.import_ipynb:
            check_isfile(self.args.import_ipynb)
            logging.info('Loading Jupyter notebook {}'.format(self.args.import_ipynb))
            self.nb = nbf.read(self.args.import_ipynb, as_version=4)
            uid = self.args.import_ipynb
        else:
            uid = self.load_cells_params()

        logging.debug("Unique id: '{}'".format(uid))
        logging.info('Disable cache: {}'.format(self.args.disable_cache))
        logging.info('Ignore cache: {}'.format(self.args.ignore_cache))

        if self.args.export_pynb and not self.args.no_exec:
            fatal('--export-pynb requires --no-exec')

        if self.args.kernel:
            self.set_kernel(self.args.kernel)

        self.process(uid=uid,
                     add_footer=not self.args.disable_footer,
                     no_exec=self.args.no_exec,
                     disable_cache=self.args.disable_cache,
                     ignore_cache=self.args.ignore_cache)

        if self.args.export_html:
            self.export_html(self.args.export_html)

        if self.args.export_ipynb:
            self.export_ipynb(self.args.export_ipynb)

        if self.args.export_pynb:
            self.export_pynb(self.args.export_pynb)
623029
function validateAppParams(params) {
  params = params || {};

  var expectedAppParams = ["project", "app", "accessKey", "appApiKey", "url"];

  var missingParam = validateCommonParams(params);

  if (missingParam) {
    return new Error("Missing Param " + missingParam);
  }

  missingParam = validateParamsPresent(expectedAppParams, params);

  if (missingParam) {
    return new Error("Missing MbaaS Config Param " + missingParam);
  }

  return undefined;
}
848502
public static ApplicationContext run(Class cls, String... args) {
        return run(new Class[]{cls}, args);
    }
1374890
def run(self, *args, **kw):
        
        if self._runFunc is not None:
            # remove the two args sent by EditParDialog which we do not use
            if 'mode' in kw: kw.pop('mode')
            if '_save' in kw: kw.pop('_save')
            return self._runFunc(self, *args, **kw)
        else:
            raise taskpars.NoExecError('No way to run task "'+self.__taskName+\
                '". You must either override the "run" method in your '+ \
                'ConfigObjPars subclass, or you must supply a "run" '+ \
                'function in your package.')
344206
def run(self, target, payload, instance=None, hook_id=None, **kwargs):
        
        response = requests.post(
            url=target,
            data=json.dumps(payload, cls=DjangoJSONEncoder),
            headers={'Content-Type': 'application/json'}
        )

        if response.status_code == 410 and hook_id:
            HookModel = get_hook_model()
            hook = HookModel.object.get(id=hook_id)
            hook.delete()
834654
def run_notebook(self, nb, f):
        """"""

        if PYTHON_MAJOR_VERSION == 3:
            kernel_name = 'python3'
        elif PYTHON_MAJOR_VERSION == 2:
            kernel_name = 'python2'
        else:
            raise Exception('Only Python 2 and 3 are supported')
        ep = ExecutePreprocessor(timeout=600, kernel_name=kernel_name)
        try:
            ep.preprocess(nb, {'metadata': {'path': '.'}})
        except CellExecutionError:
            msg = 'Error executing the notebook "%s".\n\n' % f.name
            msg += 'See notebook "%s" for the traceback.' % f.name
            print(msg)
            raise
        finally:
            nbformat.write(nb, f)
79794
def run(ident):
    ''''''
    source = get_source(ident)
    cls = backends.get(current_app, source.backend)
    backend = cls(source)
    backend.harvest()
526817
def execute_executable(nova_args, env_vars):
    
    process = subprocess.Popen(nova_args,
                               stdout=sys.stdout,
                               stderr=subprocess.PIPE,
                               env=env_vars)
    process.wait()
    return process
102089
def run_nose(self, params):
        
        thread.set_index(params.thread_index)
        log.debug("[%s] Starting nose iterations: %s", params.worker_index, params)
        assert isinstance(params.tests, list)
        # argv.extend(['--with-apiritif', '--nocapture', '--exe', '--nologcapture'])

        end_time = self.params.ramp_up + self.params.hold_for
        end_time += time.time() if end_time else 0
        time.sleep(params.delay)

        plugin = ApiritifPlugin(self._writer)
        self._writer.concurrency += 1

        config = Config(env=os.environ, files=all_config_files(), plugins=DefaultPluginManager())
        config.plugins.addPlugins(extraplugins=[plugin])
        config.testNames = params.tests
        config.verbosity = 3 if params.verbose else 0
        if params.verbose:
            config.stream = open(os.devnull, "w")  # FIXME: use "with", allow writing to file/log

        iteration = 0
        try:
            while True:
                log.debug("Starting iteration:: index=%d,start_time=%.3f", iteration, time.time())
                thread.set_iteration(iteration)
                ApiritifTestProgram(config=config)
                log.debug("Finishing iteration:: index=%d,end_time=%.3f", iteration, time.time())

                iteration += 1

                # reasons to stop
                if plugin.stop_reason:
                    log.debug("[%s] finished prematurely: %s", params.worker_index, plugin.stop_reason)
                elif iteration >= params.iterations:
                    log.debug("[%s] iteration limit reached: %s", params.worker_index, params.iterations)
                elif 0 < end_time <= time.time():
                    log.debug("[%s] duration limit reached: %s", params.worker_index, params.hold_for)
                else:
                    continue  # continue if no one is faced

                break
        finally:
            self._writer.concurrency -= 1

            if params.verbose:
                config.stream.close()
1039229
def run(self, **run_params):
        """"""
        self.use_default_run_params()
        self.set_run_params(**run_params)
        if self.print_run_params:
            print("Run Params:", self.run_params)
        self.results = self._backend.backend_run()
267010
def run(entry_point, drivers, loop = None):
    ''' 
    '''
    program = setup(entry_point, drivers)
    dispose = program.run()
    if loop == None:
        loop = asyncio.get_event_loop()

    loop.run_forever()
    dispose()
756065
def run_in_memory(args, edges):
    """"""
    # Create an OSLOM runner with a temporary working directory
    oslom_runner = OslomRunner(tempfile.mkdtemp())

    # Write temporary edges file with re-mapped Ids
    logging.info("writing temporary edges file with re-mapped Ids ...")
    oslom_runner.store_edges(edges)

    # Run OSLOM
    logging.info("running OSLOM ...")
    log_file = os.path.join(oslom_runner.working_dir, OSLOM_LOG_FILE)
    result = oslom_runner.run(args.oslom_exec, args.oslom_args, log_file)
    with open(log_file, "r") as reader:
        oslom_log = reader.read()
    if result["retval"] != 0:
        logging.error("error running OSLOM, check the log")
        return (None, oslom_log)
    logging.info("OSLOM executed in %.3f secs", result["time"])

    # Read back clusters found by OSLOM
    logging.info("reading OSLOM clusters output file ...")
    clusters = oslom_runner.read_clusters(args.min_cluster_size)
    logging.info(
        "found %d cluster(s) and %d with size >= %d",
        clusters["num_found"], len(clusters["clusters"]), args.min_cluster_size)

    # Clean-up temporary working directory
    oslom_runner.cleanup()

    # Finished
    logging.info("finished")
    return (clusters, oslom_log)
620742
def execute_nb(fname, metadata=None, save=True, show_doc_only=False):
    ""
    # Any module used in the notebook that isn't inside must be in the same directory as this script
    with open(fname) as f: nb = nbformat.read(f, as_version=4)
    ep_class = ExecuteShowDocPreprocessor if show_doc_only else ExecutePreprocessor
    ep = ep_class(timeout=600, kernel_name='python3')
    metadata = metadata or {}
    ep.preprocess(nb, metadata)
    if save:
        with open(fname, 'wt') as f: nbformat.write(nb, f)
        NotebookNotary().sign(nb)
1203425
def convert_and_execute_notebook(self, name):
        """"""

        self.convert_notebook(name)
        code = self.read_code(name)#clean_code(name,'get_ipython')
        exec(code,globals())
1219710
def runlist_add_app(name, app, profile, force, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('runlist:add-app', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'app': app,
        'profile': profile,
        'force': force
    })
69921
def run():
    
    plugin_list = load_plugins()

    module = sys.modules['__main__']
    plugin_list.insert(0, ObjectSupplier(module))

    return run_with_plugins(plugin_list)
614469
def run(self, params):
        

        self.params = list(reversed(params))

        if not self.params:
            self.help()
            return

        while self.params:
            p = self.params.pop()

            if p in self.command:
                # If we got a known command, execute it.
                self.command[p](self)

            elif os.path.exists(p):
                # If we were given the name of an existing file, read it.
                self.read_moc(p)

            else:
                # Otherwise raise an error.
                raise CommandError('file or command {0} not found'.format(p))