I should find a way to speed that up
490386
private function isOrganizationManager(TokenInterface $token, User $user)
    {
        $adminOrganizations = $token->getUser()->getAdministratedOrganizations();
        $userOrganizations = $user->getOrganizations();

        foreach ($adminOrganizations as $adminOrganization) {
            foreach ($userOrganizations as $userOrganization) {
                if ($userOrganization === $adminOrganization) return true;
            }
        }

        return false;
    }
1049277
def fix(h, i):
    """"""
    down(h, i, h.size())
    up(h, i)
624202
def _push_next(self):
        """"""
        r = next(self._iter, None)
        if r is None:
            return
        self._key_queue.put((self._sent_idx, r))
        self._sent_idx += 1
1045553
def push(self, item):
        '''
        '''
        hash(item)
        heapq.heappush(self._items, item)
758172
protected function increaseCapacity()
    {
        $this->capacity = $this->square(max(count($this) + 1, $this->capacity * $this->getGrowthFactor()));
    }
1078472
def add_time(self, extra_time):
        """"""
        window_start = self.parent.value('window_start') + extra_time
        self.parent.overview.update_position(window_start)
1309808
def set_speed(self,speed):
	""""""
	self.speed=speed
	self.send_cmd("SPEED"+str(speed))
896793
def move(self):
        """"""
        k = random.choice(self.keys)
        multiplier = random.choice((0.95, 1.05))

        invalid_key = True
        while invalid_key:
            # make sure bias doesn't exceed 1.0
            if k == "bias":
                if self.state[k] > 0.909:
                    k = random.choice(self.keys)
                    continue

            invalid_key = False

        newval = self.state[k] * multiplier
        self.state[k] = newval
574107
def add!(&blk)
      t = Benchmark.measure(&blk)
      @utime  = utime + t.utime
      @stime  = stime + t.stime
      @cutime = cutime + t.cutime
      @cstime = cstime + t.cstime
      @real   = real + t.real
      self
    end
196395
private void expandIfNecessary(int minBlockCount) {
    if (minBlockCount > blocks.length) {
      this.blocks = Arrays.copyOf(blocks, nextPowerOf2(minBlockCount));
    }
  }
1095885
private void _advance(int count) {
        if (buf != null) {
            bufPos += count;
            if (bufPos == buf.length) {
                buf = null;
            }
        } else {
            pos.setIndex(pos.getIndex() + count);
            if (pos.getIndex() > text.length()) {
                pos.setIndex(text.length());
            }
        }
    }
523706
function () {
				if (q) {
					for (var i = 0, len = arguments.length; i < len; i++) {
						q.push(arguments[i]);
						if (!q.pending) {
							doNext.apply({}, q.args || []);
						}
					}
				}
				return me;
			}
1202912
public function advance() : void
    {
        if ($this->cursor < count($this->stream->getTokens()) - 1) {
            ++$this->cursor;
        }
    }
637105
function maybeFinish() {
        if (to !== null) clearTimeout(to);
        to = setTimeout(function() {
            var alldone = true;
            var names = Object.keys(files);
            for (var i=0; i<names.length; i++) {
                if (!files[names[i]]["done"]) {
                    alldone = false;
                    break;
                }
            }
            if (alldone && !returned) {
                returned = true;
                callback(null);
            }
        }, 1000);
    }
1319876
def _spin_up(self, images, duration):
        """"""
        total = 0
        # pylint: disable=no-member

        for image in images:
            self.microbit.display.show(image)
            time.sleep(0.05)
            total += 0.05
            if total >= duration:
                return
        remaining = duration - total
        self._full_speed_rumble(images[-2:], remaining)
        self.set_display()
211263
def up(self):
        '''  '''
        # Set new flags
        flags = self.ifflags | IFF_UP
        self.ifflags = flags
        self.get_mtu()
356103
def open_fast(self):
        """"""
        open_command = StandardSend(self._address,
                                    COMMAND_LIGHT_ON_FAST_0X12_NONE, cmd2=0xff)
        self._send_method(open_command, self._open_message_received)