Push a new peer into the heap
542827
def push_peer(self, peer):
        """"""

        self.order += 1
        peer.order = self.order + random.randint(0, self.size())
        heap.push(self, peer)
821701
def push(h, x):
    """"""
    h.push(x)
    up(h, h.size()-1)
168192
private void pushContentSource(char[] newBuffer) {
        nextContentSource = new ContentSource(nextContentSource, buffer, position, limit);
        buffer = newBuffer;
        position = 0;
        limit = newBuffer.length;
    }
429412
def push(self, item, priority=None):
        
        priority = item if priority is None else priority
        node = PriorityQueueNode(item, priority)
        for index, current in enumerate(self.priority_queue_list):
            if current.priority < node.priority:
                self.priority_queue_list.insert(index, node)
                return
        # when traversed complete queue
        self.priority_queue_list.append(node)
600583
public void insert(int n) {
    this.indices.growTo(n + 1, -1);
    assert !this.inHeap(n);
    this.indices.set(n, this.heap.size());
    this.heap.push(n);
    this.percolateUp(this.indices.get(n));
  }
529092
protected void peerUpdatedLock (String nodeName, NodeObject.Lock lock)
    {
        // notify the handler, if any
        LockHandler handler = _locks.get(lock);
        if (handler != null) {
            handler.peerUpdatedLock(nodeName);
        }
    }
510032
protected void init(peer_info p) {
        client = Vectors.byte_vector2utf8(p.get_client());
        totalDownload = p.getTotal_download();
        totalUpload = p.getTotal_upload();
        flags = p.get_flags();
        source = p.get_source();
        upSpeed = p.getUp_speed();
        downSpeed = p.getDown_speed();
        connectionType = ConnectionType.fromSwig(p.getConnection_type());
        progress = p.getProgress();
        progressPpm = p.getProgress_ppm();
        ip = new TcpEndpoint(p.getIp()).toString();
    }
455467
def push(self, stream, value):
        

        raise ArgumentError("Attempting to push reading to an invalid stream walker that cannot hold data", selector=self.selector, stream=stream)
1061526
def PushEvent(self, event):
    
    event_string = event.GetAttributeValuesString()
    heap_values = (event.timestamp, event.timestamp_desc, event_string, event)
    heapq.heappush(self._heap, heap_values)
55278
def insertPeer(self, peer):
        
        try:
            models.Peer.create(
                url=peer.getUrl(),
                attributes=json.dumps(peer.getAttributes()))
        except Exception as e:
            raise exceptions.RepoManagerException(e)
51892
def _push_packet(self, packet):
        
        self._read_queue.append((decode(packet), packet))

        if self._read_waiter is not None:
            w, self._read_waiter = self._read_waiter, None
            w.set_result(None)
814266
def insertInitialPeer(dataRepository, url, logger=None):
    
    insertPeer = dataRepository.insertPeer
    try:
        peer = datamodel.peers.Peer(url)
        insertPeer(peer)
    except exceptions.RepoManagerException as exc:
        if logger:
            logger.debug(
                "Peer already in registry {} {}".format(peer.getUrl(), exc))
    except exceptions.BadUrlException as exc:
        if logger:
            logger.debug("A URL in the initial "
                         "peer list {} was malformed. {}".format(url), exc)
944709
def push(self, item, priority):
        '''
        
        '''
        data = self._encode_item(item)
        pairs = {data: -priority}
        self.server.zadd(self.key, **pairs)
1235870
function Peer (options) {
  EventEmitter.call(this)
  bindFns(this)

  extend(this, options)
  var addr = this.address
  var hp = addr.split(':')
  this.host = hp[0]
  this.port = Number(hp[1])
  this._deliveryTrackers = []
  this.setMaxListeners(0)
  this._debug('new peer')
}
61766
private void pushState(Node<K,V>[] t, int i, int n) {
            TableStack<K,V> s = spare;  // reuse if possible
            if (s != null)
                spare = s.next;
            else
                s = new TableStack<K,V>();
            s.tab = t;
            s.length = n;
            s.index = i;
            s.next = stack;
            stack = s;
        }
811519
function push() {
	this.path.push(this.node);
	this.node = this.node.children[this.node.children.length - 1];
}
1202149
def _update_heap(self, peer):
        """"""
        rank = self.rank_calculator.get_rank(peer)
        if rank == peer.rank:
            return

        peer.rank = rank
        self.peer_heap.update_peer(peer)