The actual execution of the actor.

        :return: None if successful, otherwise error message
        :rtype: str
174125
def do_execute(self):
        
        data = self.input.payload
        if self.storagehandler is None:
            return "No storage handler available!"
        sname = str(self.resolve_option("storage_name"))
        if sname not in self.storagehandler.storage:
            return "No storage item called '" + sname + "' present!"
        cls = self.storagehandler.storage[sname]
        if isinstance(cls, Classifier):
            evl = Evaluation(data)
            evl.discard_predictions = bool(self.resolve_option("discard_predictions"))
            evl.test_model(
                cls,
                data,
                self.resolve_option("output"))
        elif isinstance(cls, Clusterer):
            evl = ClusterEvaluation()
            evl.set_model(cls)
            evl.test_model(data)
        else:
            return "Unhandled class: " + classes.get_classname(cls)
        self._output.append(Token(evl))
        return None
1347026
def Execute(self, action, *args, **kw):
        
        action = self.Action(action, *args, **kw)
        result = action([], [], self)
        if isinstance(result, SCons.Errors.BuildError):
            errstr = result.errstr
            if result.filename:
                errstr = result.filename + ': ' + errstr
            sys.stderr.write("scons: *** %s\n" % errstr)
            return result.status
        else:
            return result
950921
async def execute(self, *, return_exceptions=False):
        
        assert not self._done, "Pipeline already executed. Create new one."
        self._done = True

        if self._pipeline:
            if isinstance(self._pool_or_conn, AbcPool):
                async with self._pool_or_conn.get() as conn:
                    return await self._do_execute(
                        conn, return_exceptions=return_exceptions)
            else:
                return await self._do_execute(
                    self._pool_or_conn,
                    return_exceptions=return_exceptions)
        else:
            return await self._gather_result(return_exceptions)
999668
def do_execute(self):
        
        if isinstance(self.input.payload, classes.JavaObject) and self.input.payload.is_serializable:
            copy = serialization.deepcopy(self.input.payload)
            if copy is not None:
                self._output.append(Token(copy))
        else:
            self._output.append(self.input)
        return None
532217
def can_be_executed(self):
        
        missingParams = filter(lambda rp: rp not in self._parameters, self._requiredParameters)
        return len(missingParams) == 0
848354
def do_execute(self):
        
        if self.storagehandler is None:
            return "No storage handler available!"
        sname = str(self.resolve_option("storage_name"))
        if sname not in self.storagehandler.storage:
            return "No storage item called '" + sname + "' present!"
        self._output.append(Token(self.storagehandler.storage[sname]))
        return None
888536
def perform_command(self):
        
        self.log(u"This function should be overloaded in derived classes")
        self.log([u"Invoked with %s", self.actual_arguments])
        return self.NO_ERROR_EXIT_CODE
57819
def execute(self):
        
        # Ensure that we have commands registered
        if not self.commands or self._parser is None:
            raise NotImplementedError(
                "No commands registered with this program!"
            )

        # Handle input from the command line
        args = self.parser.parse_args()                # Parse the arguments

        try:

            handle_default_args(args)                  # Handle the default args

            if not hasattr(args, 'func'):              # Handle no subcommands
                self.parser.print_help()
                self.exit(0)

            msg = args.func(args)                      # Call the default function
            msg = "{}\n".format(msg) if msg else ''    # Format the message
            self.exit(0, msg)                          # Exit cleanly with message

        except Exception as e:
            if hasattr(args, 'traceback') and args.traceback:
                traceback.print_exc()

            msg = color.format(str(e), color.RED)
            self.exit(1, msg)
69628
def execute(self):
        
        es = connections.get_connection(self._using)

        self._response = self._response_class(
            self,
            es.update_by_query(
                index=self._index,
                body=self.to_dict(),
                **self._params
            )
        )
        return self._response
1345141
def do_execute(self):
        
        fname = self.input.payload
        data = serialization.read_all(fname)
        if len(data) == 1:
            if is_instance_of(data[0], "weka.classifiers.Classifier"):
                cont = ModelContainer(model=Classifier(jobject=data[0]))
            elif is_instance_of(data[0], "weka.clusterers.Clusterer"):
                cont = ModelContainer(model=Clusterer(jobject=data[0]))
            else:
                return "Unhandled class: " + classes.get_classname(data[0])
        elif len(data) == 2:
            if is_instance_of(data[0], "weka.classifiers.Classifier"):
                cont = ModelContainer(model=Classifier(jobject=data[0]), header=Instances(data[1]))
            elif is_instance_of(data[0], "weka.clusterers.Clusterer"):
                cont = ModelContainer(model=Clusterer(jobject=data[0]), header=Instances(data[1]))
            else:
                return "Unhandled class: " + classes.get_classname(data[0])
        else:
            return "Expected 1 or 2 objects, but got " + str(len(data)) + " instead reading: " + fname
        self._output.append(Token(cont))
        return None
710246
def do_execute(self):
        
        iquery = InstanceQuery()
        iquery.db_url = str(self.resolve_option("db_url"))
        iquery.user = str(self.resolve_option("user"))
        iquery.password = str(self.resolve_option("password"))
        props = str(self.resolve_option("custom_props"))
        if (len(props) > 0) and os.path.isfile(props):
            iquery.custom_properties = props
        iquery.query = str(self.resolve_option("query"))
        data = iquery.retrieve_instances()
        self._output.append(Token(data))
        return None
600364
def do_execute(self):
        
        expr = str(self.resolve_option("expression"))
        expr = expr.replace("{X}", str(self.input.payload))
        self._output.append(Token(eval(expr)))
        return None
772551
def execute(self, result=None):
        
        try:
            return self.unsafe_execute(result=result)
        except Exception as exc:
            return self._onerror(Result.from_exception(exc, uuid=self.uuid))
467072
def execute(self, script):
	
		
		
		try:
			conn = self.__connect()
			conn.cursor().execute(script)
			conn.commit()
		finally:
			conn.close()
605815
def stop(self, actor, exc=None, exit_code=None):
        
        if actor.state <= ACTOR_STATES.RUN:
            # The actor has not started the stopping process. Starts it now.
            actor.state = ACTOR_STATES.STOPPING
            actor.event('start').clear()
            if exc:
                if not exit_code:
                    exit_code = getattr(exc, 'exit_code', 1)
                if exit_code == 1:
                    exc_info = sys.exc_info()
                    if exc_info[0] is not None:
                        actor.logger.critical('Stopping', exc_info=exc_info)
                    else:
                        actor.logger.critical('Stopping: %s', exc)
                elif exit_code == 2:
                    actor.logger.error(str(exc))
                elif exit_code:
                    actor.stream.writeln(str(exc))
            else:
                if not exit_code:
                    exit_code = getattr(actor._loop, 'exit_code', 0)
            #
            # Fire stopping event
            actor.exit_code = exit_code
            actor.stopping_waiters = []
            actor.event('stopping').fire()

            if actor.stopping_waiters and actor._loop.is_running():
                actor.logger.info('asynchronous stopping')
                # make sure to return the future (used by arbiter for waiting)
                return actor._loop.create_task(self._async_stopping(actor))
            else:
                if actor.logger:
                    actor.logger.info('stopping')
                self._stop_actor(actor)

        elif actor.stopped():
            return self._stop_actor(actor, True)
695045
def do_execute(self):
        
        result = None
        data = self.input.payload
        pltdataset.line_plot(
            data,
            atts=self.resolve_option("attributes"),
            percent=float(self.resolve_option("percent")),
            seed=int(self.resolve_option("seed")),
            title=self.resolve_option("title"),
            outfile=self.resolve_option("outfile"),
            wait=bool(self.resolve_option("wait")))
        return result
280760
def do_execute(self):
        
        data = self.input.payload
        search = self.config["search"].shallow_copy()
        evl = self.config["eval"].shallow_copy()
        asel = attsel.AttributeSelection()
        asel.search(search)
        asel.evaluator(evl)
        asel.select_attributes(data)
        cont = AttributeSelectionContainer(
            original=data,
            reduced=asel.reduce_dimensionality(data),
            num_atts=asel.number_attributes_selected,
            selected=asel.selected_attributes,
            results=asel.results_string)
        self._output.append(Token(cont))
        return None