all engines will pass through it
6335
function (name, options, cb) {
                var engine = enginesByExtension[this.ext],
                    that = this,
                    // queue
                    stack = [],
                    ctx = {
                        name    : name,
                        options : options,
                        cb      : cb
                    };

                this.engines = engines;
                this.thru = function (name, _name, _options, _cb) {
                    var engine = engines[name];
                    if (!engine) {
                        return cb(Error('Unknown engine ' + name));
                    }
                    this.ext = engine.extension;
                    engine.call(this, _name || ctx.name, _options || ctx.options, _cb || ctx.cb);
                };

                options.forceLoad = options.hasOwnProperty('forceLoad') ? options.forceLoad : !expressBem.envLoadCache;
                options.forceExec = options.hasOwnProperty('forceExec') ? options.forceExec : !expressBem.envExecCache;

                if (!middlewares.length) {
                    return engine.call(this, ctx.name, ctx.options, ctx.cb);
                }

                // async fn queue
                middlewares.forEach(function (mw) {
                    if (!mw.engine /* || shouldUseMiddlewareFor(mw.engine)*/) {
                        stack.push(mw.fn);
                    }
                });

                // put engine as last call
                stack.push(function (ctx) {
                    engine.call(this, ctx.name, ctx.options, ctx.cb);
                });

                function next () {
                    var fn = stack.shift();
                    fn.call(that, ctx, next);
                }

                process.nextTick(next);

                return this;
            }
1257806
def _collect_data(self):
        
        all_data = []
        for line in self.engine.run_engine():
            logging.debug("Adding {} to all_data".format(line))
            all_data.append(line.copy())
            logging.debug("all_data is now {}".format(all_data))

        return all_data
1179515
private function resolveEngines()
    {
        foreach ($this->engines as $i => $engine) {
            if (\is_string($engine)) {
                $this->engines[$i] = $this->container->get($engine);
            }
        }
    }
922005
public static Cycles all(IAtomContainer container, int length) throws Intractable {
        return all().find(container, length);
    }
80074
def from_everything(everything, engine, limit=None):
    
    if isinstance(everything, Table):
        return from_table(everything, engine, limit=limit)

    if type(everything) is DeclarativeMeta:
        return from_object(everything, engine, limit=limit)

    if isinstance(everything, Query):
        return from_query(everything, engine, limit=limit)

    if isinstance(everything, Select):
        return from_sql(everything, engine, limit=limit)

    if isinstance(everything, ResultProxy):
        return from_resultproxy(everything)

    if isinstance(everything, list):
        return from_data(everything)
567068
def sendall(self, data, **kws):
        """"""
        return SendAll(self, data, timeout=self._timeout, **kws)
71246
function _go() {
        if(workers < concurrency) {
            var job = queue.shift();
            if(job !== undefined) {
                var worker = job.shift();
                job.push(over);
                workers++;
                process.nextTick(function nextTickWorker() {
                    worker.apply(null, job);
                });
                return true;
            }
        }
        return false;
    }
611923
function(callback, opt_this) {
      function visit(ec) {
        callback.call(opt_this, ec);
        ec.iterateAllChildEventContainers(visit);
      }
      visit(this);
    }
99166
function Engine() {
      var _this;

      var ua = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var cssFlagsPrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'engine';

      _classCallCheck(this, Engine);

      _this = _possibleConstructorReturn(this, _getPrototypeOf(Engine).call(this, ua, flags, cssFlagsPrefix));
      _this.version = 'n/a';
      return _this;
    }
388939
public boolean goForward() {
	if (currentNode.hasChildren()) {
	    currentNode = currentNode.getChildren().get(0);
	    return true;
	} else if (currentNode.getParent() == null) {
	    return false;
	}
	while (true) {
	    N parent = currentNode.getParent();
	    if ((parent == null) || (currentNode == tree)) {
		return false;
	    }
	    int index = parent.getChildren().indexOf(currentNode);
	    if (parent.getChildren().size() > index + 1) {
		currentNode = parent.getChildren().get(index + 1);
		return true;
	    } else {
		currentNode = parent;
	    }
	}
    }
1134965
def all_in(self, name) -> iter:
        """"""
        for elem in self.inclusions[name]:
            yield elem
            yield from self.all_in(elem)
354755
def portals(self):
        """"""
        char = self.character
        make_edge = self.engine._get_edge
        for (o, d) in self.engine._edges_cache.iter_keys(
                self.character.name, *self.engine._btt()
        ):
            yield make_edge(char, o, d)
393251
public function setAllLoaded()
	{
		$this->_allChildrenloaded = true;

		foreach ($this->_children as $child)
		{
			$child->setAllLoaded();
		}
	}
863248
function computeSlotSegPressures(seg) {
	var forwardSegs = seg.forwardSegs;
	var forwardPressure = 0;
	var i, forwardSeg;

	if (seg.forwardPressure === undefined) { // not already computed

		for (i=0; i<forwardSegs.length; i++) {
			forwardSeg = forwardSegs[i];

			// figure out the child's maximum forward path
			computeSlotSegPressures(forwardSeg);

			// either use the existing maximum, or use the child's forward pressure
			// plus one (for the forwardSeg itself)
			forwardPressure = Math.max(
				forwardPressure,
				1 + forwardSeg.forwardPressure
			);
		}

		seg.forwardPressure = forwardPressure;
	}
}
1304624
function move (leftPort, rightPort) {
  leftPort = leftPort || 'b'
  rightPort = rightPort || 'c'
  var write = writeAction('motors_write', [leftPort, rightPort])
  /**
   * Run motors forever
   * @param  {Number} speed speed of motor
   * @param  {Object} opts  object of optional params
   */
  function * forever (speed, turn, opts) {
    speed = speed || motorDefaults.speed
    var speeds = turnToSpeeds(turn, speed)

    yield write('run-forever', {
      left: {
        'speed_sp': speeds.left.toString()
      }, right: {
        'speed_sp': speeds.right.toString()
      }
    })
  }

  /**
   * Run drive motors for a number of degrees
   * @param  {Number} degrees degrees to turn motor
   * @param  {Number} speed   speed at which to turn motors
   * @param  {Number} turn    turn direction
   */
  function * degrees (deg, speed, turn) {
    speed = speed || motorDefaults.speed

    var opts = turnToDegrees(turn, speed, deg)
    yield * writeAndWait('run-to-rel-pos', {
      left: {
        'position_sp': opts.left.degrees.toString(),
        'speed_sp': opts.left.speed.toString()
      },
      right: {
        'position_sp': opts.right.degrees.toString(),
        'speed_sp': opts.right.speed.toString()
      }
    })
  }

  /**
   * Run drive motors for a number of rotations
   * @param  {Number} rotations number of rotations to turn the motor
   * @param  {Number} speed     speed at which to turn motors
   * @param  {Number} turn      turn direction
   */
  function * rotations (rots, speed, turn) {
    speed = speed || motorDefaults.speed
    yield * this.degrees(Math.round(rots * 360), speed, turn)
  }

  /**
   * Run drive motors for a specified amount of time
   * @param  {Number} time  time to run the motors for (in milliseconds)
   * @param  {Number} speed speed at which to turn motors
   * @param  {Number} turn  turn direction
   */
  function * timed (time, speed, turn) {
    speed = speed || motorDefaults.speed

    var speeds = turnToSpeeds(turn, speed)
    yield * writeAndWait('run-timed', {
      left: {
        'time_sp': time.toString(),
        'speed_sp': speeds.left.toString()
      },
      right: {
        'time_sp': time.toString(),
        'speed_sp': speeds.right.toString()
      }
    })
  }

  /**
   * Stops motors
   */
  function * stop () {
    yield write('stop', {left: {}, right: {}})
  }

  /**
   * Write and hold execution until the motors are done moving
   * @param  {string} command move command
   * @param  {object} opts    move options
   */
  function * writeAndWait (command, opts) {
    var ran = false
    yield write(command, opts)
    while (true) {
      var devices = yield * read()
      if (devices.motor(leftPort) === 'running' || devices.motor(rightPort) === 'running') {
        ran = true
      }
      if (devices.motor(leftPort) === '' && devices.motor(rightPort) === '' && ran) {
        break
      }
    }
  }

  return {
    forever: forever,
    degrees: degrees,
    rotations: rotations,
    timed: timed,
    stop: stop
  }
}
271458
def prepare(
            self, engine=None, mode=None, model=None, index=None, key=None,
            filter=None, projection=None, consistent=None, forward=None, parallel=None):
        """"""

        self.prepare_iterator_cls(engine, mode)
        self.prepare_model(model, index, consistent)
        self.prepare_key(key)
        self.prepare_projection(projection)
        self.prepare_filter(filter)
        self.prepare_constraints(forward, parallel)

        self.prepare_request()
129356
function Engine(opts) {
  opts = opts || {};
  this.ext = opts.ext || 'html';
  mkdirp = opts.mkdirp || mkdirp;
  this.version = require('./../package.json').version;
}