Remove a peer from the peer db and (if given) peer table.
498796
def atlasdb_remove_peer( peer_hostport, con=None, path=None, peer_table=None ):
    
    # remove from db
    with AtlasDBOpen(con=con, path=path) as dbcon:

        log.debug("Delete peer '%s'" % peer_hostport)

        sql = "DELETE FROM peers WHERE peer_hostport = ?;"
        args = (peer_hostport,)

        cur = dbcon.cursor()
        res = atlasdb_query_execute( cur, sql, args )
        dbcon.commit()

    # remove from the peer table as well
    with AtlasPeerTableLocked(peer_table) as ptbl:

        if ptbl.has_key(peer_hostport):
            if not atlas_peer_is_whitelisted( peer_hostport, peer_table=ptbl ) and not atlas_peer_is_blacklisted( peer_hostport, peer_table=ptbl ):
                del ptbl[peer_hostport]

    return True
409596
public void remove(int p) {
        npoints--;
        int q = index[p];
        index[points[q] = points[npoints]] = q;

        for (int i = 0; i < npoints; i++) {
            if (neighbor[points[i]] == p) {
                findNeighbor(points[i]);
            }
        }
    }
272720
def removeByIndex(self, index):
        """"""
        if index < len(self._invites) -1 and \
           index >=0:
            self._invites.remove(index)
574049
def drop(self, table):
        
        blueprint = self._create_blueprint(table)

        blueprint.drop()

        self._build(blueprint)
770294
def delete_table(self, tablename):
        
        self.tables = filter(lambda x: x.name != tablename, self.tables)
296504
def remove(self, hostport):
        
        assert hostport, "hostport is required"
        peer = self._peers.pop(hostport, None)
        peer_in_heap = peer and peer.index != -1
        if peer_in_heap:
            self.peer_heap.remove_peer(peer)
        return peer
292048
private void removeFromTable(Node[] table, Node node) {
    int last = table.length - 1;
    table[node.index] = table[last];
    table[node.index].index = node.index;
    table[last] = null;
  }
1090334
def remove_node(self, p_id, remove_unconnected_nodes=True):
        
        if self.has_node(p_id):
            for neighbor in self.incoming_neighbors(p_id):
                self._edges[neighbor].remove(p_id)

            neighbors = set()
            if remove_unconnected_nodes:
                neighbors = self.outgoing_neighbors(p_id)

            del self._edges[p_id]

            for neighbor in neighbors:
                if self.is_isolated(neighbor):
                    self.remove_node(neighbor)
1069031
def delete(self, receiver_id=None, event_id=None):
        """"""
        event = self._get_event(receiver_id, event_id)
        event.delete()
        db.session.commit()
        return make_response(event)
625124
public void removeIt()
    {
        if (m_queryRecord != null)
            if (this.getOwner() != null)
                m_queryRecord.removeRecord(this.getOwner());
        m_queryRecord = null;
    }
861557
def user_remove(user,
                host='localhost',
                **connection_args):
    '''
    
    '''
    dbc = _connect(**connection_args)
    if dbc is None:
        return False

    cur = dbc.cursor()
    qry = 'DROP USER %(user)s@%(host)s'
    args = {}
    args['user'] = user
    args['host'] = host
    try:
        _execute(cur, qry, args)
    except MySQLdb.OperationalError as exc:
        err = 'MySQL Error {0}: {1}'.format(*exc.args)
        __context__['mysql.error'] = err
        log.error(err)
        return False

    if not user_exists(user, host, **connection_args):
        log.info('User \'%s\'@\'%s\' has been removed', user, host)
        return True

    log.info('User \'%s\'@\'%s\' has NOT been removed', user, host)
    return False
1053171
def user_remove(username,
                user=None,
                host=None,
                port=None,
                maintenance_db=None,
                password=None,
                runas=None):
    '''
    
    '''
    return _role_remove(username,
                        user=user,
                        host=host,
                        port=port,
                        maintenance_db=maintenance_db,
                        password=password,
                        runas=runas)
272569
public void free()
    {
        if (m_pTable != null)
        {
            PDatabase pDatabase = m_pTable.getPDatabase();
            m_pTable.removePTableOwner(this, true);
            pDatabase.removePDatabaseOwner(this, true);
        }
        m_pTable = null;
        super.free();
    }
795720
def clean(self):
        
        self.exec_pg_success(['dropdb', '-U', self.user, self.database])
        self.exec_pg_success(['createdb', '-U', self.user, self.database])
38921
def unregister_peer(self, connection_id):
        
        public_key = self.peer_to_public_key(connection_id)
        if public_key:
            self._consensus_notifier.notify_peer_disconnected(public_key)

        with self._lock:
            if connection_id in self._peers:
                del self._peers[connection_id]
                LOGGER.debug("Removed connection_id %s, "
                             "connected identities are now %s",
                             connection_id, self._peers)
                self._topology.set_connection_status(connection_id,
                                                     PeerStatus.TEMP)
            else:
                LOGGER.warning("Connection unregister failed as connection "
                               "was not registered: %s",
                               connection_id)
167808
def remove_p(self):
        
        try:
            self.unlink()
        except OSError:
            _, e, _ = sys.exc_info()
            if e.errno != errno.ENOENT:
                raise
        return self
1310650
public void removePeerFilterProvider(PeerFilterProvider provider) {
        lock.lock();
        try {
            checkNotNull(provider);
            checkArgument(peerFilterProviders.remove(provider));
        } finally {
            lock.unlock();
        }
    }