Return a list of idle connections

        :rtype: list
486879
def idle_connections(self):
        
        return [c for c in self.connections.values()
                if not c.busy and not c.closed]
1211607
def get_connections(self):
        
        con = []
        maxconn = self.max_connectivity
        for ii in range(0, maxconn.shape[0]):
            for jj in range(0, maxconn.shape[1]):
                if maxconn[ii][jj] != 0:
                    dist = self.s.get_distance(ii, jj)
                    con.append([ii, jj, dist])
        return con
632101
def all_active(cls):
        

        prefix = context.get_current_config()["redis_prefix"]
        queues = []
        for key in context.connections.redis.keys():
            if key.startswith(prefix):
                queues.append(Queue(key[len(prefix) + 3:]))

        return queues
782838
def get(self, session):
        
        idle = self.idle_connections
        if idle:
            connection = idle.pop(0)
            connection.lock(session)
            if self.idle_start:
                with self._lock:
                    self.idle_start = None
            return connection.handle
        raise NoIdleConnectionsError(self.id)
821101
def close_idle_connections(self, pool_id=None):
        """"""
        if not hasattr(self, '_pools'):
            return

        if pool_id:
            if pool_id not in self._pools:
                raise ProgrammingError("pool %r does not exist" % pool_id)
            else:
                pool = self._pools[pool_id]
                pool.close()
        else:
            for pool_id, pool in self._pools.items():
                pool.close()
311621
def selectedConnections( self ):
        
        output = []
        for item in self.selectedItems():
            if ( isinstance(item, XNodeConnection) ):
                output.append(item)
        return output
1305878
def get_refresh_ids(self):
        
        ids = []
        for bucket in self.router.lonely_buckets():
            rid = random.randint(*bucket.range).to_bytes(20, byteorder='big')
            ids.append(rid)
        return ids
838417
def connections(self):
        """"""
        self._check_session()
        status, data = self._rest.get_request('connections')
        return data
980603
def interconnects(self):
        
        if not self.__interconnects:
            self.__interconnects = Interconnects(self.__connection)
        return self.__interconnects
210781
def outputConnections(self, cls=None):
        
        scene = self.scene()
        if not scene:
            return []
        
        if not cls:
            cls = XNodeConnection
        
        output = []
        for item in scene.items():
            if not isinstance(item, cls):
                continue
            
            if item.outputNode() == self:
                output.append(item)
        
        return output
600004
def run_idle(self):
    
    if not self.idlers or self.inactive >= len(self.idlers):
      return False
    idler = self.idlers.popleft()
    callback, args, kwds = idler
    _logging_debug('idler: %s', callback.__name__)
    res = callback(*args, **kwds)
    # See add_idle() for the meaning of the callback return value.
    if res is not None:
      if res:
        self.inactive = 0
      else:
        self.inactive += 1
      self.idlers.append(idler)
    else:
      _logging_debug('idler %s removed', callback.__name__)
    return True
940854
def await_idle(self, parent_id, timeout):
        """"""
        while True:
            # Get a message from the kernel iopub channel
            msg = self.get_message(timeout=timeout, stream='iopub') # raises Empty on timeout!

            if msg['parent_header'].get('msg_id') != parent_id:
                continue
            if msg['msg_type'] == 'status':
                if msg['content']['execution_state'] == 'idle':
                    break
10447
def get_connections_by_dest(self, dest):
        ''''''
        with self._mutex:
            res = []
            for c in self.connections:
                if c.has_port(self) and c.has_port(dest):
                    res.append(c)
            return res
801270
def ThreadsWithRunningExecServers(self):
    """"""
    socket_dir = '/tmp/pyringe_%s' % self.inferior.pid
    if os.path.isdir(socket_dir):
      return [int(fname[:-9])
              for fname in os.listdir(socket_dir)
              if fname.endswith('.execsock')]
    return []
68943
def _get_socketpair(self):
        
        try:
            return self._cls_idle_socketpairs.pop()  # pop() must be atomic
        except IndexError:
            rsock, wsock = socket.socketpair()
            set_cloexec(rsock.fileno())
            set_cloexec(wsock.fileno())
            self._cls_all_sockets.extend((rsock, wsock))
            return rsock, wsock
1072222
def connected_outports(self):
        '''

        '''
        return [p for p in self.ports \
                    if p.__class__.__name__ == 'DataOutPort' \
                    and p.is_connected]
307605
async function listConnections() {
    const connList = await executeCommand(
        ['nmcli', '-f', 'NAME,DEVICE', '-t', 'connection', 'show']);
    const ret = {};
    connList.split('\n').map((l) => {
        return l.split(/:/);
    }).filter((ary) => {
        return ary[0] && ary[1];
    }).forEach((ary) => {
        ret[ary[0]] = ary[1];
    });
    return ret;
}