Create a new processor based on the processor in the current scope.
343675
function processor() {
    var destination = unified()
    var length = attachers.length
    var index = -1

    while (++index < length) {
      destination.use.apply(null, attachers[index])
    }

    destination.data(extend(true, {}, namespace))

    return destination
  }
321105
def append_processor(self, proc, source_proc=None):
        ""
        if source_proc is None and len(self.processors):
            source_proc = self.processors[0]

        if source_proc and not isinstance(source_proc, Processor):
            raise TypeError('source_proc must be a Processor or None')

        if not isinstance(proc, Processor):
            raise TypeError('proc must be a Processor or None')

        if proc.type == 'decoder' and len(self.processors):
            raise ValueError('Only the first processor in a pipe could be a Decoder')

        # TODO : check if the processor is already in the pipe
        if source_proc:
            for child in self._graph.neighbors_iter(source_proc.uuid()):
                child_proc = self._graph.node[child]['processor']
                if proc == child_proc:
                    proc._uuid = child_proc.uuid()
                    proc.process_pipe = self
                    break
        if not self._graph.has_node(proc.uuid()):
            self.processors.append(proc)  # Add processor to the pipe
            self._graph.add_node(proc.uuid(), processor=proc, id=proc.id())
            if source_proc:
                self._graph.add_edge(self.processors[0].uuid(), proc.uuid(),
                                     type='audio_source')
            proc.process_pipe = self
            # Add an edge between each parent and proc
            for parent in proc.parents.values():
                self._graph.add_edge(parent.uuid(), proc.uuid(),
                                     type='data_source')
334607
function cpu(callback) {

  return new Promise((resolve) => {
    process.nextTick(() => {
      getCpu().then(result => {
        if (callback) { callback(result); }
        resolve(result);
      });
    });
  });
}
1358832
@Override
	public void addNextProcessor(ChainedGlobalProcessor<T> nextProcessor) {

		if (this.nextProcessor == null) {
			this.nextProcessor = nextProcessor;
		} else {
			this.nextProcessor.addNextProcessor(nextProcessor);
		}
	}
1187292
@Override
    public Dsp newProcessor() throws InstantiationException, ClassNotFoundException, IllegalAccessException {
        int numClasses = this.classes.size();
    	Codec[] codecs = new Codec[numClasses];
        
        for(int i = 0; i < numClasses; i++) {
        	String fqn = this.classes.get(i);
        	Class<?> codecClass = DspFactoryImpl.class.getClassLoader().loadClass(fqn);
        	codecs[i] = (Codec) codecClass.newInstance();
        }
        return new Dsp(codecs);
    }
769084
@Override
	public Processor newProcessor(Processor p) {
		AMRRuleSetProcessor oldProcessor = (AMRRuleSetProcessor) p;
		Builder builder = new Builder(oldProcessor);
		AMRRuleSetProcessor newProcessor = builder.build();
		newProcessor.resultStream = oldProcessor.resultStream;
		newProcessor.statisticsStream = oldProcessor.statisticsStream;
		newProcessor.defaultRuleStream = oldProcessor.defaultRuleStream;
		return newProcessor;
	}
554916
protected void setProcessor(final Processor processor) throws BuildException, NullPointerException {
    if (processor == null) {
      throw new NullPointerException("processor");
    }
    if (isReference()) {
      throw super.tooManyAttributes();
    }
    if (this.env == null && !this.newEnvironment) {
      this.processor = processor;
    } else {
      this.processor = processor.changeEnvironment(this.newEnvironment, this.env);
    }
  }
965225
private Es6SyntacticScopeCreator createScopeCreator() {
    if (validityCheck) {
      return new Es6SyntacticScopeCreator(compiler);
    } else {
      dupHandler = new RedeclarationCheckHandler();
      return new Es6SyntacticScopeCreator(compiler, dupHandler);
    }
  }
1169885
@Override
    public Processor newProcessor(Processor sourceProcessor) {
        ClusteringDistributorProcessor newProcessor = new ClusteringDistributorProcessor();
        ClusteringDistributorProcessor originProcessor = (ClusteringDistributorProcessor) sourceProcessor;
        if (originProcessor.getOutputStream() != null)
            newProcessor.setOutputStream(originProcessor.getOutputStream());
        if (originProcessor.getEvaluationStream() != null)
            newProcessor.setEvaluationStream(originProcessor.getEvaluationStream());
        return newProcessor;
    }
836243
def lookupProcessor(name):
    """"""
    if name in _proc_lookup:
        return _proc_lookup[name]
    else:
        error_string = 'If you are creating a new processor, please read the\
documentation on creating a new processor'
        raise LookupError("Unknown processor %s\n%s" % (name, error_string))
977253
public Scriptable newObject(Scriptable scope)
    {
        NativeObject result = new NativeObject();
        ScriptRuntime.setBuiltinProtoAndParent(result, scope,
                TopLevel.Builtins.Object);
        return result;
    }
261503
def register_processor(self, processor):
        
        if not callable(processor):
            raise ValueError('Processor %s is not callable.' % processor.__class__.__name__)
        else:
            self.processors.append(processor)
447534
function cacher(f, scope, postprocessor) {
        function repush(array, item) {
            for (var i = 0, ii = array.length; i < ii; i++)
                if (array[i] === item) {
                    return array.push(array.splice(i, 1)[0]);
                }
        }

        function newf() {
            var arg = Array.prototype.slice.call(arguments, 0),
                args = arg.join('\u2400'),
                cache = newf.cache = newf.cache || {},
                count = newf.count = newf.count || [];
            if (cache.hasOwnProperty(args)) {
                repush(count, args);
                return postprocessor ? postprocessor(cache[args]) : cache[args];
            }
            if (count.length >= 1e3) {
                delete cache[count.shift()];
            }
            count.push(args);
            cache[args] = f.apply(scope, arg);
            return postprocessor ? postprocessor(cache[args]) : cache[args];
        }
        return newf;
    }
114667
public static <T, M, R> Processor<T, R> combine(
            Processor<T, M> processor1, Processor<M, R> processor2) {
        processor1.subscribe(processor2);
        return new Processor<>() {
            @Override
            public void subscribe(Flow.Subscriber<? super R> subscriber) {
                processor2.subscribe(subscriber);
            }

            @Override
            public void onSubscribe(Flow.Subscription subscription) {
                processor1.onSubscribe(subscription);
            }

            @Override
            public void onNext(T item) {processor1.onNext(item);}

            @Override
            public void onError(Throwable throwable) {
                processor1.onError(throwable);
            }

            @Override
            public void onComplete() {processor1.onComplete();}
        };
    }
251614
def new(self, items:Iterator, processor:PreProcessors=None, **kwargs)->'ItemList':
        ""
        processor = ifnone(processor, self.processor)
        copy_d = {o:getattr(self,o) for o in self.copy_new}
        kwargs = {**copy_d, **kwargs}
        return self.__class__(items=items, processor=processor, **kwargs)
789745
function processScope(scope) {
  if (!isObject(scope) || scope._bsontype === 'ObjectID') {
    return scope;
  }

  const keys = Object.keys(scope);
  let key;
  const new_scope = {};

  for (let i = keys.length - 1; i >= 0; i--) {
    key = keys[i];
    if ('function' === typeof scope[key]) {
      new_scope[key] = new Code(String(scope[key]));
    } else {
      new_scope[key] = processScope(scope[key]);
    }
  }

  return new_scope;
}
1306891
def append_scope(self):
        """"""
        self.stack.current.append(Scope(self.stack.current.current))