Morph this Null executor to a real Executor object.
485263
def _morph(self):
        """"""
        batches = self.batches
        self.__class__ = Executor
        self.__init__([])            
        self.batches = batches
40192
def nasm_null_safe_mutable_data_finalizer(env, code, data):
    

    if data or env.buffers:
        # Determine length of nullify + shellcode and adjust data pointer
        xor_offsets = []
        masked_data = OrderedDict()

        for datum, (offset, orig_datum) in six.iteritems(data):
            xor_offsets.extend([
                                   offset + i
                                   for i, b in enumerate(six.iterbytes(datum))
                                   if b in (0, 10, 13)
                                   ])

            masked_datum = b''.join([
                                        six.int2byte(b) if b not in (0, 10, 13)
                                        else six.int2byte(b ^ 0xff)
                                        for b in six.iterbytes(datum)
                                        ])
            masked_data[masked_datum] = (offset, orig_datum)

        if xor_offsets:
            # Build code to restore NUL, \r and \n
            temp_reg = env.TEMP_REG[env.target.bits]
            null_code = env.reg_load(env.BL, 255) + \
                        env.reg_load(temp_reg, env.OFFSET_REG)

            last_offset = 0
            for offset in xor_offsets:
                offset -= last_offset
                null_code.extend(
                    env.reg_add(temp_reg, offset) +
                    ['xor [%s], bl' % temp_reg]
                )
                last_offset += offset
            code = ['\t%s' % line for line in null_code] + code
            data = masked_data

        code_len = len(asm('\n'.join(code), target=env.target))
        adjust_ebp = env.reg_add(env.OFFSET_REG, code_len)

        return [
            '\tjmp __getpc1',
            '__getpc0:',
            '\tpop %s' % env.OFFSET_REG,
        ] + [
            '\t%s' % line for line in adjust_ebp
        ] + [
            '\tjmp __realstart',
            '__getpc1:',
            '\tcall __getpc0',
            '__realstart:',
        ] + code + _pack_data(data)
    else:
        return code
1299243
public final Cache2kBuilder<K,V> asyncListenerExecutor(Executor v) {
    config().setAsyncListenerExecutor(new CustomizationReferenceSupplier<Executor>(v));
    return this;
  }
749320
public QueueBuilder<T>  executor(Executor executor)
    {
        Preconditions.checkNotNull(executor, "executor cannot be null");

        this.executor = executor;
        return this;
    }
1207163
def morph(self, into):
		
		return self.game.cheat_action(self, [actions.Morph(self, into)])
498171
protected static function construct(ExecutionContext $exeContext = null): Executor
    {
        $executorReflection = new \ReflectionClass(Executor::class);
        /** @var Executor $executor */
        $executor = $executorReflection->newInstanceWithoutConstructor();

        if ($exeContext !== null) {
            $constructor = $executorReflection->getConstructor();
            $constructor->setAccessible(true);
            $constructor->invoke($executor, $exeContext);
        }

        return $executor;
    }
79056
public void encodeNullToNull(Writer writer, T obj) throws IOException {
		if (obj == null) {
			writer.write("null");
			return;
		}

		JsonUtil.startHash(writer);

		encodeValue(writer, obj);

		JsonUtil.endHash(writer);

		writer.flush();
	}
1140528
private static synchronized ExecutorService initAsyncExecutorService() {
		if (ASYNC_EXECUTOR_SERVICE == null) {
			ASYNC_EXECUTOR_SERVICE = java.util.concurrent.Executors.newSingleThreadExecutor(
				new ThreadFactory() {
					public Thread newThread(Runnable r) {
						Thread thread = new Thread(r, "javasimon-async");
						thread.setDaemon(true);
						return thread;
					}
				});
		}
		return ASYNC_EXECUTOR_SERVICE;
	}
755415
def dev_null_wrapper(func, *a, **kwargs):
    
    os.dup2(dev_null, sys.stdout.fileno())
    return_object = func(*a, **kwargs)
    sys.stdout.flush()
    os.dup2(tmp_stdout, sys.stdout.fileno())
    return return_object
1346381
public JerseyClientBuilder using(ExecutorService executorService, ObjectMapper objectMapper) {
        this.executorService = executorService;
        this.objectMapper = objectMapper;
        return this;
    }
346713
private CompletableFuture<Void> uniRunNow(Object r, Executor e, Runnable f) {
    Throwable x;
    CompletableFuture<Void> d = newIncompleteFuture();
    if (r instanceof AltResult && (x = ((AltResult) r).ex) != null)
      d.result = encodeThrowable(x, r);
    else
      try {
        if (e != null) {
          e.execute(new UniRun<T>(null, d, this, f));
        } else {
          f.run();
          d.result = NIL;
        }
      } catch (Throwable ex) {
        d.result = encodeThrowable(ex);
      }
    return d;
  }
769722
private Future<?> submit(FLVFinalizer flvFinalizer) {
        if (executor != null && !executor.isTerminated()) {
            return executor.submit(flvFinalizer);
        }
        return null;
    }
788555
protected static ExecutorService createDefaultExecutor(Args options) {
    return (options.workerThreads > 0) ? Executors.newFixedThreadPool(options.workerThreads) : null;
  }
697912
def get_executor(sym, ctx, data_inputs, initializer=None):
    """"""
    data_shapes = {k: v.shape for k, v in data_inputs.items()}
    arg_names = sym.list_arguments()
    aux_names = sym.list_auxiliary_states()
    param_names = list(set(arg_names) - set(data_inputs.keys()))
    arg_shapes, output_shapes, aux_shapes = sym.infer_shape(**data_shapes)
    arg_name_shape = {k: s for k, s in zip(arg_names, arg_shapes)}
    params = {n: nd.empty(arg_name_shape[n], ctx=ctx) for n in param_names}
    params_grad = {n: nd.empty(arg_name_shape[n], ctx=ctx) for n in param_names}
    aux_states = {k: nd.empty(s, ctx=ctx) for k, s in zip(aux_names, aux_shapes)}
    exe = sym.bind(ctx=ctx, args=dict(params, **data_inputs),
                   args_grad=params_grad,
                   aux_states=aux_states)
    if initializer is not None:
        for k, v in params.items():
            initializer(k, v)
    return exe, params, params_grad, aux_states
510434
@Nullable
  private EventExecutorGroup createEventExecutorGroup(int size) {
    if (size <= 0) {
      return null;
    }

    ThreadFactory threadFactory = new ThreadFactory() {
      private final ThreadGroup threadGroup = new ThreadGroup(serviceName + "-executor-thread");
      private final AtomicLong count = new AtomicLong(0);

      @Override
      public Thread newThread(Runnable r) {
        Thread t = new Thread(threadGroup, r, String.format("%s-executor-%d", serviceName, count.getAndIncrement()));
        t.setDaemon(true);
        return t;
      }
    };

    UnorderedThreadPoolEventExecutor executor = new UnorderedThreadPoolEventExecutor(size, threadFactory,
                                                                                     rejectedExecutionHandler);
    if (execThreadKeepAliveSecs > 0) {
      executor.setKeepAliveTime(execThreadKeepAliveSecs, TimeUnit.SECONDS);
      executor.allowCoreThreadTimeOut(true);
    }
    return new NonStickyEventExecutorGroup(executor);
  }
856731
public Object get(String descriptor, String[] actualReturn) {
        if (descriptor == null) {
            throw new NullPointerException("descriptor must not be null");
        }
        return getKey(createKey(descriptor), actualReturn);
    }
1190927
private MethodHandle buildProcessor(FunctionManager functionManager, Type fromType, Type toType, boolean isKey)
    {
        MethodHandle getter = nativeValueGetter(fromType);

        // Adapt cast that takes ([ConnectorSession,] ?) to one that takes (?, ConnectorSession), where ? is the return type of getter.
        ScalarFunctionImplementation castImplementation = functionManager.getScalarFunctionImplementation(functionManager.lookupCast(CastType.CAST, fromType.getTypeSignature(), toType.getTypeSignature()));
        MethodHandle cast = castImplementation.getMethodHandle();
        if (cast.type().parameterArray()[0] != ConnectorSession.class) {
            cast = MethodHandles.dropArguments(cast, 0, ConnectorSession.class);
        }
        cast = permuteArguments(cast, methodType(cast.type().returnType(), cast.type().parameterArray()[1], cast.type().parameterArray()[0]), 1, 0);
        MethodHandle target = compose(cast, getter);

        // If the key cast function is nullable, check the result is not null.
        if (isKey && castImplementation.isNullable()) {
            target = compose(nullChecker(target.type().returnType()), target);
        }

        MethodHandle writer = nativeValueWriter(toType);
        writer = permuteArguments(writer, methodType(void.class, writer.type().parameterArray()[1], writer.type().parameterArray()[0]), 1, 0);

        return compose(writer, target.asType(methodType(unwrap(target.type().returnType()), target.type().parameterArray())));
    }