Lists the processors.

        Processors are returned in lexicographical order.

        :param Optional[str] instance: A Yamcs instance name.
        :rtype: ~collections.Iterable[.Processor]
485625
def list_processors(self, instance=None):
        
        # Server does not do pagination on listings of this resource.
        # Return an iterator anyway for similarity with other API methods
        url = '/processors'
        if instance:
            url += '/' + instance
        response = self.get_proto(path=url)
        message = rest_pb2.ListProcessorsResponse()
        message.ParseFromString(response.content)
        processors = getattr(message, 'processor')
        return iter([Processor(processor) for processor in processors])
810518
def get_processors(self):
        ""
        procs_x,procs_y = listify(self.train.x._processor),listify(self.train.y._processor)
        xp = ifnone(self.train.x.processor, [p(ds=self.train.x) for p in procs_x])
        yp = ifnone(self.train.y.processor, [p(ds=self.train.y) for p in procs_y])
        return xp,yp
1281734
def list_devices(self, shop_id=None, page_index=1, page_size=20):
        
        data = optionaldict(
            shop_id=shop_id,
            pageindex=page_index,
            pagesize=page_size
        )
        res = self._post(
            'device/list',
            data=data,
            result_processor=lambda x: x['data']
        )
        return res
935126
public void initializeAllProcessors(UimaContext aContext) {
		for(Priority prio : processorNames.keySet()) {
			for(String pn : processorNames.get(prio)) {
				try {
					Class<?> c = Class.forName(pn);
					GenericProcessor p = (GenericProcessor) c.newInstance();
					p.initialize(aContext);
					processors.get(prio).add(p);
				} catch (Exception exception) {
					exception.printStackTrace();
					Logger.printError(component, "Unable to initialize registered Processor " + pn + ", got: " + exception.toString());
					System.exit(-1);
				}
			}
		}
		
		this.initialized = true;
	}
665868
def to_utf8_optional_iterator(x):
    
    if isinstance(x, STRING_TYPES):
        return to_utf8(x)

    try:
        l = list(x)
    except TypeError as e:
        assert 'is not iterable' in str(e)
        return x
    else:
        return [ to_utf8_if_string(e) for e in l ]
265679
def process_one(self, item:ItemBase, processor:PreProcessors=None):
        ""
        if processor is not None: self.processor = processor
        self.processor = listify(self.processor)
        for p in self.processor: item = p.process_one(item)
        return item
1353564
public void registerProcessor(String processor, Priority prio) {
		this.processorNames.get(prio).add(processor);
	}
980030
def list_v2(
            self,
            bucket: str,
            prefix: str=None,
            delimiter: str=None,
            start_after_key: str=None,
            token: str=None,
            k_page_max: int=None,
    ) -> typing.Iterable[typing.Tuple[str, dict]]:
        
        raise NotImplementedError()
1241856
@NonNull
    public IconicsAnimatedDrawable processors(@NonNull IconicsAnimationProcessor... processors) {
        if (processors == null || processors.length == 0) return this;
        for (IconicsAnimationProcessor processor : processors) {
            processor(processor);
        }
        return this;
    }
1059935
def list_solvers(args=None):
    """"""
    parser = argparse.ArgumentParser(
        description='''List LP solver available in PSAMM. This will produce a
                       list of all of the available LP solvers in prioritized
                       order. Addtional requirements can be imposed with the
                       arguments (e.g. integer=yes to select only solvers that
                       support MILP problems). The list will also be influenced
                       by the PSAMM_SOLVER environment variable which can be
                       used to only allow specific solvers (e.g.
                       PSAMM_SOLVER=cplex).''')
    parser.add_argument(
        'requirement', nargs='*', type=str,
        help='Additional requirements on the selected solvers')
    parsed_args = parser.parse_args(args)

    requirements = {}
    for arg in parsed_args.requirement:
        try:
            key, value = parse_solver_setting(arg)
        except ValueError as e:
            parser.error(str(e))
        else:
            requirements[key] = value

    solvers = list(filter_solvers(_solvers, requirements))
    solver_names = set(solver['name'] for solver in solvers)

    # Obtain solver priority from environment variable, if specified.
    priority = {}
    if 'PSAMM_SOLVER' in os.environ:
        names = os.environ['PSAMM_SOLVER'].split(',')
        for i, solver_name in enumerate(names):
            priority[solver_name] = len(names) - i
        solvers = [s for s in solvers if s['name'] in priority]
        solver_names = set(priority)
    else:
        # Use built-in priorities
        for solver in solvers:
            priority[solver['name']] = solver['priority']

    solvers = sorted(solvers, key=lambda s: priority.get(s['name'], 0),
                     reverse=True)

    status = 0

    if len(solvers) > 0:
        print('Prioritized solvers:')
        for solver in solvers:
            print('Name: {}'.format(solver['name']))
            print('Priority: {}'.format(solver['priority']))
            print('MILP (integer) problem support: {}'.format(
                solver['integer']))
            print('QP (quadratic) problem support: {}'.format(
                solver['quadratic']))
            print('Rational solution: {}'.format(solver['rational']))
            print('Class: {}'.format(solver['class']))
            print()
    else:
        status = 1
        print('No solvers fullfil the requirements!')
        print()

    filtered_solvers_count = len(_solvers) - len(solvers)
    if filtered_solvers_count > 0 or len(_solver_import_errors) > 0:
        print('Unavailable solvers:')
        for solver in _solvers:
            if solver['name'] not in solver_names:
                print('{}: Does not fullfil the specified requirements'.format(
                    solver['name']))

        for solver, error in iteritems(_solver_import_errors):
            print('{}: Error loading solver: {}'.format(solver, error))

    if status != 0:
        parser.exit(status)
218074
def list_engines_by_priority(engines=None):
    
    if engines is None:
        engines = ENGINES

    return sorted(engines, key=operator.methodcaller("priority"))
183642
async def preprocess_request(
        self, request_context: Optional[RequestContext]=None,
    ) -> Optional[ResponseReturnValue]:
        
        request_ = (request_context or _request_ctx_stack.top).request
        blueprint = request_.blueprint
        processors = self.url_value_preprocessors[None]
        if blueprint is not None:
            processors = chain(processors, self.url_value_preprocessors[blueprint])  # type: ignore
        for processor in processors:
            processor(request.endpoint, request.view_args)

        functions = self.before_request_funcs[None]
        if blueprint is not None:
            functions = chain(functions, self.before_request_funcs[blueprint])  # type: ignore
        for function in functions:
            result = await function()
            if result is not None:
                return result
        return None
713990
def list_services(self, instance):
        
        # Server does not do pagination on listings of this resource.
        # Return an iterator anyway for similarity with other API methods
        url = '/services/{}'.format(instance)
        response = self.get_proto(path=url)
        message = rest_pb2.ListServiceInfoResponse()
        message.ParseFromString(response.content)
        services = getattr(message, 'service')
        return iter([Service(service) for service in services])
785526
def _subprocessor(self, disabled_qubits):
        
        edgelist = [(p, q) for p, q in self._edgelist if
                    p not in disabled_qubits and
                    q not in disabled_qubits]
        return eden_processor(edgelist, self.M, self.N, self.L, random_bundles=self._random_bundles)
1294737
def process(processor_or_config = nil)
      if processor_or_config.respond_to?(:process)
        processor = processor_or_config
      elsif processor_or_config.nil?
        processor = Processor.new
      else
        processor = Processor.new(processor_or_config)
      end

      processor.process(self)
    end
760246
def ensure_list(iterable: Iterable[A]) -> List[A]:
    
    if isinstance(iterable, list):
        return iterable
    else:
        return list(iterable)
674594
def get_process_list(mc, x_=None, y_=None, p_=None,
                     app_ids=None, applications=None, states=None):
    

    system_info = mc.get_system_info()
    for (x, y), chip_info in sorted(iteritems(system_info)):
        if x_ is not None and x_ != x:
            continue
        if y_ is not None and y_ != y:
            continue

        for p in range(chip_info.num_cores):
            if p_ is not None and p_ != p:
                continue

            try:
                status = mc.get_processor_status(x=x, y=y, p=p)
                keep = (match(str(status.app_id), app_ids) and
                        match(status.app_name, applications) and
                        match(status.cpu_state.name, states))

                if keep:
                    yield (x, y, p,
                           status.cpu_state,
                           status.rt_code,
                           status.app_name,
                           status.app_id)
            except SCPError as e:
                # If an error occurs while communicating with a chip, we bodge
                # it into the "cpu_status" field and continue (note that it
                # will never get filtered out).
                class DeadStatus(object):
                    name = "{}: {}".format(e.__class__.__name__, str(e))
                yield (x, y, p, DeadStatus(), None, "", -1)