Sequentially add new live point proposals to the queue.
5340
def _fill_queue(self, loglstar):
        """"""

        # Add/zip arguments to submit to the queue.
        point_queue = []
        axes_queue = []
        while self.nqueue < self.queue_size:
            if self._beyond_unit_bound(loglstar):
                # Propose points using the provided sampling/bounding options.
                point, axes = self.propose_point()
                evolve_point = self.evolve_point
            else:
                # Propose/evaluate points directly from the unit cube.
                point = self.rstate.rand(self.npdim)
                axes = np.identity(self.npdim)
                evolve_point = sample_unif
            point_queue.append(point)
            axes_queue.append(axes)
            self.nqueue += 1
        loglstars = [loglstar for i in range(self.queue_size)]
        scales = [self.scale for i in range(self.queue_size)]
        ptforms = [self.prior_transform for i in range(self.queue_size)]
        logls = [self.loglikelihood for i in range(self.queue_size)]
        kwargs = [self.kwargs for i in range(self.queue_size)]
        args = zip(point_queue, loglstars, axes_queue,
                   scales, ptforms, logls, kwargs)

        if self.use_pool_evolve:
            # Use the pool to propose ("evolve") a new live point.
            self.queue = list(self.M(evolve_point, args))
        else:
            # Propose ("evolve") a new live point using the default `map`
            # function.
            self.queue = list(map(evolve_point, args))
996270
private void addSinkTasks() {
    Runnable sinkTasks = new Runnable() {
      @Override
      public void run() {
        while (!metricsInSinkQueue.isEmpty()) {
          metricsSink.processRecord(metricsInSinkQueue.poll());
        }
      }
    };

    slaveLooper.addTasksOnWakeup(sinkTasks);
  }
974859
function addToQueue(queue, packageInfo) {
  var exists;

  function matchesVersion(version, range) {
    var matches;

    try {
      matches = semver.satisfies(packageInfo.version, item.version);
    }
    catch (err) {
      matches = false;
    }

    return matches;
  }

  exists = queue.some(function(item) {
    var matches = false;

    if (item.name === packageInfo.name) {
      matches = matchesVersion(packageInfo.version, item.version);
    }

    return matches;
  });

  if (!exists) {
    queue.push(packageInfo);
  }
}
84084
def refill(self, sess):
    """"""
    sess.run(self._clear_queue)
    # Run until full.
    while sess.run(self._fill_queue):
      pass
1113947
void addInProgressCheckpoint(PendingCheckpointStats pending) {
		if (readOnly) {
			throw new UnsupportedOperationException("Can't create a snapshot of a read-only history.");
		}

		if (maxSize == 0) {
			return;
		}

		checkNotNull(pending, "Pending checkpoint");

		// Grow the array if required. This happens only for the first entries
		// and makes the iterator logic easier, because we don't have any
		// null elements with the growing array.
		if (checkpointsArray.length < maxSize) {
			checkpointsArray = Arrays.copyOf(checkpointsArray, checkpointsArray.length + 1);
		}

		// Wrap around if we are at the end. The next pos is the least recently
		// added checkpoint.
		if (nextPos == checkpointsArray.length) {
			nextPos = 0;
		}

		checkpointsArray[nextPos++] = pending;
	}
425479
def propose_live(self):
        """"""

        # Copy a random live point.
        i = self.rstate.randint(self.nlive)
        u = self.live_u[i, :]

        # Check for ellipsoid overlap.
        ell_idxs = self.mell.within(u)
        nidx = len(ell_idxs)

        # Automatically trigger an update if we're not in any ellipsoid.
        if nidx == 0:
            try:
                # Expected ln(prior volume) at a given iteration.
                expected_vol = math.exp(self.saved_logvol[-1] - self.dlv)
            except:
                # Expected ln(prior volume) at the first iteration.
                expected_vol = math.exp(-self.dlv)
            pointvol = expected_vol / self.nlive  # minimum point volume

            # Update the bounding ellipsoids.
            bound = self.update(pointvol)
            if self.save_bounds:
                self.bound.append(bound)
            self.nbound += 1
            self.since_update = 0

            # Check for ellipsoid overlap (again).
            ell_idxs = self.mell.within(u)
            nidx = len(ell_idxs)

        # Pick a random ellipsoid that encompasses `u`.
        ell_idx = ell_idxs[self.rstate.randint(nidx)]

        # Choose axes.
        if self.sampling in ['rwalk', 'rstagger', 'rslice']:
            ax = self.mell.ells[ell_idx].axes
        elif self.sampling == 'slice':
            ax = self.mell.ells[ell_idx].paxes
        else:
            ax = np.identity(self.npdim)

        return u, ax
1189520
private Node addWaiter(Node mode) {
        Node node = new Node(mode);

        for (;;) {
            Node oldTail = tail;
            if (oldTail != null) {
                U.putObject(node, Node.PREV, oldTail);
                if (compareAndSetTail(oldTail, node)) {
                    oldTail.next = node;
                    return node;
                }
            } else {
                initializeSyncQueue();
            }
        }
    }
478150
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            self._queue.push(session)
1170857
def add(self, item):
        
        def result_fnc(f):
            if f.result():
                return True
            raise Full("Queue is full!")

        return self.offer(item).continue_with(result_fnc)
288196
private void addNewTracks() {
//		System.out.println("----------- Adding new tracks ---------------");

		tracker.spawnTracks();
		List<PointTrack> spawned = tracker.getNewTracks(null);

		// estimate 3D coordinate using stereo vision
		for( PointTrack t : spawned ) {
			Point2D3DTrack p = t.getCookie();
			if( p == null) {
				t.cookie = p = new Point2D3DTrack();
			}

			// discard point if it can't localized
			if( !pixelTo3D.process(t.x,t.y) || pixelTo3D.getW() == 0 ) {
				tracker.dropTrack(t);
			} else {
				Point3D_F64 X = p.getLocation();

				double w = pixelTo3D.getW();
				X.set(pixelTo3D.getX() / w, pixelTo3D.getY() / w, pixelTo3D.getZ() / w);

				// translate the point into the key frame
				// SePointOps_F64.transform(currToKey,X,X);
				// not needed since the current frame was just set to be the key frame

				p.lastInlier = tick;
				pixelToNorm.compute(t.x, t.y, p.observation);
			}
		}
	}
697843
def insert(self, index = 0, *widgets):
        """"""
        for widget in widgets:
            self._add(widget, index)
            index +=1 # as we are moving forwards
        self._sort()
317810
void proposeNewEpoch()
      throws IOException {
    long maxEpoch = persistence.getProposedEpoch();
    int maxSyncTimeoutMs = getSyncTimeoutMs();
    for (PeerHandler ph : this.quorumMap.values()) {
      if (ph.getLastProposedEpoch() > maxEpoch) {
        maxEpoch = ph.getLastProposedEpoch();
      }
      if (ph.getSyncTimeoutMs() > maxSyncTimeoutMs) {
        maxSyncTimeoutMs = ph.getSyncTimeoutMs();
      }
    }
    // The new epoch number should be larger than any follower's epoch.
    long newEpoch = maxEpoch + 1;
    // Updates leader's last proposed epoch.
    persistence.setProposedEpoch(newEpoch);
    // Updates leader's sync timeout to the largest timeout found in the quorum.
    setSyncTimeoutMs(maxSyncTimeoutMs);
    LOG.debug("Begins proposing new epoch {} with sync timeout {} ms",
              newEpoch, getSyncTimeoutMs());
    // Sends new epoch message to quorum.
    broadcast(this.quorumMap.keySet().iterator(),
              MessageBuilder.buildNewEpochMessage(newEpoch,
                                                  getSyncTimeoutMs()));
  }
670977
def add(self, client):
        """"""
        if client.pool_id in self._client_ids:
            log.info("%r is already in the penalty box. Ignoring.", client)
            return
        release = time.time() + self._min_wait
        heapq.heappush(self._clients, (release, (client, self._min_wait)))
        self._client_ids.add(client.pool_id)
1159871
public void push(Point point) {
    BatchPoints.Builder batchPointsBuilder = BatchPoints.database(database).retentionPolicy(DEFAULT_RETENTION_POLICY);
    batchPointsBuilder.point(point);
    influxDB.write(batchPointsBuilder.build());
  }
1360114
function add(message) {
        if (!message.order || // no keep order needed
                message.inProcess) {// or already in process
            return false; // should continue
        }

        var queue = this.getQueue(message.context);
        queue.unshift(message); // FIFO
        message.pointId = this.pipe._id;
        var moreInQueue = queue.length > 1;
        message.inProcess = !moreInQueue;

        return moreInQueue;
    }
285061
protected void addToQueue(double closestDistanceSq , KdTree.Node node , P target ) {

		if( !node.isLeaf() ) {
			Helper h;
			if( unused.isEmpty() ) {
				h = new Helper();
			} else {
				h = unused.remove( unused.size()-1 );
			}

			h.closestPossibleSq = closestDistanceSq;
			h.node = node;

			queue.add(h);
		} else {
			checkBestDistance(node, target);
		}
	}
1010365
function done() {
        var index = queue.length;

        while (index--) {
            patch(queue[index], one(queue[index]));
        }
    }