Performs checks on the actors that are to be used. Raises an exception if invalid setup.

        :param actors: the actors to check
        :type actors: list
178276
def check_actors(self, actors):
        
        super(Sequence, self).check_actors(actors)
        actor = self.first_active
        if (actor is not None) and not isinstance(actor, InputConsumer):
            raise Exception("First active actor does not accept input: " + actor.full_name)
275650
def clear(self, actors=()):
        """"""
        if not utils.isSequence(actors):
            actors = [actors]
        if len(actors):
            for a in actors:
                self.removeActor(a)
        else:
            for a in settings.collectable_actors:
                self.removeActor(a)
            settings.collectable_actors = []
            self.actors = []
            for a in self.getActors():
                self.renderer.RemoveActor(a)
            for a in self.getVolumes():
                self.renderer.RemoveVolume(a)
            for s in self.sliders:
                s.EnabledOff()
            for b in self.buttons:
                self.renderer.RemoveActor(b)
            for w in self.widgets:
                w.EnabledOff()
            for c in self.scalarbars:
                self.renderer.RemoveActor(c)
1348491
def check(self):
        
        for character, followers in self.items():
            for follower in followers:
                if follower not in self:
                    return False
        return True
548431
def actors
      request = Message::List.new(Thread.mailbox)
      list = send_request request
      list.map!(&:to_sym)
    end
934390
def check_agent(options, cfg)
      identity = options[:identity]
      agent_type = options[:agent_type]
      type = AgentIdentity.parse(identity).agent_type if identity
      fail("Agent type #{agent_type.inspect} and identity #{identity.inspect} are inconsistent") if agent_type != type
      fail("Cannot find agent init.rb file in init directory of #{AgentConfig.root_dir.inspect}") unless AgentConfig.init_file

      actors = cfg[:actors]
      fail('Agent configuration is missing actors') unless actors && actors.respond_to?(:each)
      actors_dirs = AgentConfig.actors_dirs
      actors.each do |a|
        found = false
        actors_dirs.each { |d| break if (found = File.exist?(File.normalize_path(File.join(d, "#{a}.rb")))) }
        fail("Cannot find source for actor #{a.inspect} in #{actors_dirs.inspect}") unless found
      end
      true
    end
680464
def has_actor(self, aid):
        '''
        
        '''
        url = '%s://%s/%s' % (self.transport, self.host_url.netloc, aid)
        return url in self.actors.keys()
871329
def actor(self, obj, **kwargs):
        
        check(obj)
        return obj.actor_actions.public(**kwargs)
51149
def select(actor, targets)
    targets.find_all {|target| actor.size >= target.size}
  end
244886
def add_actors(self, actor):
        
        if isinstance(actor, list):
            self.actors.extend(actor)
        elif isinstance(actor, Actor):
            self.actors.append(actor)
        return self
423496
def spawn_actors(self, monitor):
        '''
        '''
        to_spawn = monitor.cfg.workers - len(self.managed_actors)
        if monitor.cfg.workers and to_spawn > 0:
            for _ in range(to_spawn):
                monitor.spawn()
180648
function loadActors (fount, actors) {
  let result

  function addActor (acc, instance) {
    let factory = isFunction(instance.state)
      ? instance.state : () => clone(instance.state)
    processHandles(instance)
    acc[ instance.actor.type ] = {
      factory: factory,
      metadata: instance
    }
    return acc
  }

  function onActors (list) {
    function onInstances (instances) {
      return instances.reduce(addActor, {})
    }

    let modules = filter(list)
    let promises = modules.map((modulePath) => {
      let actorFn = loadModule(modulePath)
      return fount.inject(actorFn)
    })

    return Promise
      .all(promises)
      .then(onInstances)
  }

  if (isString(actors)) {
    let filePath = actors
    if (!fs.existsSync(filePath)) {
      filePath = path.resolve(process.cwd(), filePath)
    }
    return getActors(filePath)
      .then(onActors)
  } else if (Array.isArray(actors)) {
    result = actors.reduce((acc, instance) => {
      addActor(acc, instance)
      return acc
    }, {})
    return Promise.resolve(result)
  } else if (isObject(actors)) {
    let keys = Object.keys(actors)
    result = keys.reduce((acc, key) => {
      let instance = actors[ key ]
      addActor(acc, instance)
      return acc
    }, {})
    return Promise.resolve(result)
  } else if (isFunction(actors)) {
    result = actors()
    if (!result.then) {
      result = Promise.resolve(result)
    }
    return result.then(function (list) {
      return list.reduce((acc, instance) => {
        addActor(acc, instance)
        return Promise.resolve(acc)
      }, {})
    })
  }
}
997962
def set_actor(user, sender, instance, signal_duid, **kwargs):
        
        if hasattr(threadlocal, 'auditlog'):
            if signal_duid != threadlocal.auditlog['signal_duid']:
                return
            try:
                app_label, model_name = settings.AUTH_USER_MODEL.split('.')
                auth_user_model = apps.get_model(app_label, model_name)
            except ValueError:
                auth_user_model = apps.get_model('auth', 'user')
            if sender == LogEntry and isinstance(user, auth_user_model) and instance.actor is None:
                instance.actor = user

            instance.remote_addr = threadlocal.auditlog['remote_addr']
583808
def setup(self):
        
        result = super(ActorHandler, self).setup()
        if result is None:
            self.update_parent()
            try:
                self.check_actors(self.actors)
            except Exception as e:
                result = str(e)
        if result is None:
            for actor in self.actors:
                name = actor.name
                newname = actor.unique_name(actor.name)
                if name != newname:
                    actor.name = newname
        if result is None:
            for actor in self.actors:
                if actor.skip:
                    continue
                result = actor.setup()
                if result is not None:
                    break
        if result is None:
            result = self._director.setup()
        return result
1227813
def stop_execution(self):
        
        if not (self._stopping or self._stopped):
            for actor in self.owner.actors:
                actor.stop_execution()
            self._stopping = True
384424
def mergeActors(actors, tol=0):
    
    polylns = vtk.vtkAppendPolyData()
    for a in actors:
        polylns.AddInputData(a.polydata())
    polylns.Update()
    pd = polylns.GetOutput()
    return Actor(pd)
1353048
def check_actors(self):
        
        actors = []
        for actor in self.owner.actors:
            if actor.skip:
                continue
            actors.append(actor)
        if len(actors) == 0:
            return
        for actor in actors:
            if not isinstance(actor, InputConsumer):
                raise Exception("Actor does not accept any input: " + actor.full_name)
336648
def actors(context):
    """"""
    fritz = context.obj
    fritz.login()

    for actor in fritz.get_actors():
        click.echo("{} ({} {}; AIN {} )".format(
            actor.name,
            actor.manufacturer,
            actor.productname,
            actor.actor_id,
        ))
        if actor.has_temperature:
            click.echo("Temp: act {} target {}; battery (low): {}".format(
                actor.temperature,
                actor.target_temperature,
                actor.battery_low,
            ))

            click.echo("Temp (via get): act {} target {}".format(
                actor.get_temperature(),
                actor.get_target_temperature(),
            ))