SECTION: PREPROCESSOR
349274
@Override
	public void process(Request request)
	{
		String name = getRouteName(request);

		if (name == null || name.isEmpty()) return;

		if (!ROUTE_TIMERS.containsKey(name))
		{
			ROUTE_TIMERS.putIfAbsent(name, metrics.timer(getTimerName(name)));
		}

		if (!EXCEPTION_COUNTERS_BY_ROUTE.containsKey(name))
		{
			EXCEPTION_COUNTERS_BY_ROUTE.putIfAbsent(name, metrics.counter(getExceptionCounterName(name)));
		}
	}
392443
def do_preprocess(defn):
    
    from pycparser.ply import lex, cpp
    lexer = lex.lex(cpp)
    p = cpp.Preprocessor(lexer)
    # p.add_path(dir) will add dir to the include search path
    p.parse(defn)
    return ''.join(tok.value for tok in p.parser if tok.type not in p.ignore)
289677
private void preprocess(IoBuffer pat) {
    this.b = new int[256];
    for (int i = this.patternPos; i < this.patternLimit; i++) {
      int p = ByteBufferUtils.uByte(pat.get(i));
      this.b[p] = this.b[p] | (1 << i);
    }
  }
789605
public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type)
    {
        return Compiler::PHP_OPEN . $prepend . 'ob_start();' . $append . Compiler::PHP_CLOSE;
    }
78914
def check_preprocessor(self):
    """"""
    if _is_arraylike(self.preprocessor):
      self.preprocessor_ = ArrayIndexer(self.preprocessor)
    elif callable(self.preprocessor) or self.preprocessor is None:
      self.preprocessor_ = self.preprocessor
    else:
      raise ValueError("Invalid type for the preprocessor: {}. You should "
                       "provide either None, an array-like object, "
                       "or a callable.".format(type(self.preprocessor)))
1186655
def preprocess_tree(self, tree):
        """"""
        visitor = RinohTreePreprocessor(tree, self)
        tree.walkabout(visitor)
331563
def simple_preprocess(doc, deacc=False, min_len=2, max_len=15):
    
    tokens = [
        token for token in tokenize(doc, lower=True, deacc=deacc, errors='ignore')
        if min_len <= len(token) <= max_len and not token.startswith('_')
    ]
    return tokens
1239946
function descriptions(filepath, info, callback) {
  applicable(filepath, info, (err, preprocessors) => {
    if (err) return callback(err);
    callback(null, preprocessors.map((preprocessor) => {
      return preprocessor.description;
    }));
  });
}
415928
def print_preprocessing_list(preprocessing_queue):
    
    print("## Preprocessing")
    print("```")
    for algorithm in preprocessing_queue:
        print("* " + str(algorithm))
    print("```")
938957
function () {
		var prepData, supportDesc;
		for ( var instanceNo in this.workerDescription.workerSupports ) {

			supportDesc = this.workerDescription.workerSupports[ instanceNo ];
			if ( ! supportDesc.inUse ) {

				if ( this.instructionQueuePointer < this.instructionQueue.length ) {

					prepData = this.instructionQueue[ this.instructionQueuePointer ];
					this._kickWorkerRun( prepData, supportDesc );
					this.instructionQueuePointer++;

				} else {

					this._deregister( supportDesc );

				}

			}

		}

		if ( ! this.isRunning() && this.callbackOnFinishedProcessing !== null ) {

			this.callbackOnFinishedProcessing();
			this.callbackOnFinishedProcessing = null;

		}
	}
1163043
public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type)
    {
        $params       = $compiler->getCompiledParams($params);
        $parsedParams = array();
        if (!isset($params['*'])) {
            $params['*'] = array();
        }
        foreach ($params['*'] as $param => $defValue) {
            if (is_numeric($param)) {
                $param    = $defValue;
                $defValue = null;
            }
            $param = trim($param, '\'"');
            if (!preg_match('#^[a-z0-9_]+$#i', $param)) {
                throw new CompilationException($compiler, 'Function : parameter names must contain only A-Z, 0-9 or _');
            }
            $parsedParams[$param] = $defValue;
        }
        $params['name'] = substr($params['name'], 1, - 1);
        $params['*']    = $parsedParams;
        $params['uuid'] = uniqid();
        $compiler->addTemplatePlugin($params['name'], $parsedParams, $params['uuid']);
        $currentBlock           = &$compiler->getCurrentBlock();
        $currentBlock['params'] = $params;

        return '';
    }
517769
def get_preprocessor(space):
    """"""

    legacy_patch_shapes(space)
    obs_shape = space.shape

    if isinstance(space, gym.spaces.Discrete):
        preprocessor = OneHotPreprocessor
    elif obs_shape == ATARI_OBS_SHAPE:
        preprocessor = GenericPixelPreprocessor
    elif obs_shape == ATARI_RAM_OBS_SHAPE:
        preprocessor = AtariRamPreprocessor
    elif isinstance(space, gym.spaces.Tuple):
        preprocessor = TupleFlatteningPreprocessor
    elif isinstance(space, gym.spaces.Dict):
        preprocessor = DictFlatteningPreprocessor
    else:
        preprocessor = NoPreprocessor

    return preprocessor
347737
function preprocessor_branch(if_directive,
                                 elif_directives,
                                 else_directive) {
      var elseList = elif_directives;
      if (else_directive) {
        elseList = elseList.concat([else_directive]);
      }
      var result = if_directive[0];
      result.guarded_statements = if_directive[1].statements;
      var current_branch = result;
      for (var i = 0; i < elseList.length; i++) {
        current_branch.elseBody = elseList[i][0];
        current_branch.elseBody.guarded_statements =
          elseList[i][1].statements;
        current_branch = current_branch.elseBody;
      }
      return result;
    }
856964
def pre_process(self, xout, y0, params=()):
        
        for pre_processor in self.pre_processors:
            xout, y0, params = pre_processor(xout, y0, params)
        return [self.numpy.atleast_1d(arr) for arr in (xout, y0, params)]
415115
def pre_build #:nodoc:
            load!

            prolog = ""
            data = ""
            objoff = 0
            @objects.to_a.sort.each do |num,obj|

                obj.set_indirect(false)
                obj.objstm_offset = objoff

                prolog << "#{num} #{objoff} "
                objdata = "#{obj} "

                objoff += objdata.size
                data << objdata
                obj.set_indirect(true)
                obj.no = num
            end

            self.data = prolog + data

            @dictionary[:N] = @objects.size
            @dictionary[:First] = prolog.size

            super
        end
1336416
private void preprocess(IoBuffer pat) {
    this.b = new int[256];
    this.lim = 0;
    for (int i = 0; i < 256; i++) {
      this.b[i] = ~0;

    }
    for (int i = 0, j = 1; i < this.patternLen; i++, j <<= 1) {
      this.b[ByteBufferUtils.uByte(pat.get(i))] &= ~j;
      this.lim |= j;
    }
    this.lim = ~(this.lim >> 1);

  }
668053
def _make_compiler_include(precompile, extralinks):
    """"""
    base = """ifeq ($(FAM),ifort)
  include {2}/Makefile.ifort{0}{3}
else
ifeq ($(FAM),gfortran)
  include {2}/Makefile.gfortran{1}{3}
else
  include Makefile.error
endif
endif"""
    if extralinks is not None and len(extralinks) > 0:
        from os import path
        libs = []
        for i, link in enumerate(extralinks):
            #We can only include *directories* for the -I specification.
            if path.isdir(link):
                libs.append("-I$(LBD{0:d})".format(i))
        exlinks = "\n  FFLAGS += {}".format(' '.join(libs))
    else:
        exlinks = ""
        
    #We need to see whether to include the pre-compiler directive or not.    
    if precompile:
        insert = ["\n  FFLAGS += -fpp -save-temps -heap-arrays", "\n  FFLAGS += -cpp",
                  get_fortpy_templates(), exlinks]
        return base.format(*insert)
    else:
        return base.format("", "", get_fortpy_templates(), exlinks)