Returns the channel details.
482118
def detail(self, block_identifier: BlockSpecification) -> ChannelDetails:
        
        return self.token_network.detail(
            participant1=self.participant1,
            participant2=self.participant2,
            block_identifier=block_identifier,
            channel_identifier=self.channel_identifier,
        )
158118
def get_channel_max_user_count(self, channel=None):
        
        if channel is None:
            channel = self.get_network_channel()
        access = self.get_user_access(channel=channel, uid=1)
        return access['channel_info']['max_user_count']
1198189
def _next_channel(self):
        """"""
        chanid = self._channel_counter
        while self._channels.get(chanid) is not None:
            self._channel_counter = (self._channel_counter + 1) & 0xffffff
            chanid = self._channel_counter
        self._channel_counter = (self._channel_counter + 1) & 0xffffff
        return chanid
755914
def _detail_participant(
            self,
            channel_identifier: ChannelID,
            participant: Address,
            partner: Address,
            block_identifier: BlockSpecification,
    ) -> ParticipantDetails:
        

        data = self._call_and_check_result(
            block_identifier,
            'getChannelParticipantInfo',
            channel_identifier=channel_identifier,
            participant=to_checksum_address(participant),
            partner=to_checksum_address(partner),
        )
        return ParticipantDetails(
            address=participant,
            deposit=data[ParticipantInfoIndex.DEPOSIT],
            withdrawn=data[ParticipantInfoIndex.WITHDRAWN],
            is_closer=data[ParticipantInfoIndex.IS_CLOSER],
            balance_hash=data[ParticipantInfoIndex.BALANCE_HASH],
            nonce=data[ParticipantInfoIndex.NONCE],
            locksroot=data[ParticipantInfoIndex.LOCKSROOT],
            locked_amount=data[ParticipantInfoIndex.LOCKED_AMOUNT],
        )
1087681
def show_channel_names(self):
        
        for name in self.get_channel_names():
            channel = self.get_channel(name)
            channel.fitsimage.onscreen_message(name, delay=2.5)
556052
def text_channels(self):
        
        r = [ch for ch in self._channels.values() if isinstance(ch, TextChannel)]
        r.sort(key=lambda c: (c.position, c.id))
        return r
835772
def _next_channel_id(self):
        ''''''
        self._channel_counter += 1
        if self._channel_counter >= self._channel_max:
            self._channel_counter = 1
        return self._channel_counter
18305
async def async_determine_channel(channel):
    '''
    
    '''
    from fuzzywuzzy import process
    channel_data = await async_get_channels()
    if not channel_data:
        _LOGGER.error('No channel data. Cannot determine requested channel.')
        return
    channels = [c for c in channel_data.get('data', {}).keys()]
    if channel in channels:
        return channel
    else:
        res = process.extractOne(channel, channels)[0]
        _LOGGER.debug('No direct match found for %s. Resort to guesswork.'
                      'Guessed %s', channel, res)
        return res
1123278
def info(self):
        
        info = {}
        for key in ("author", "department", "project", "subject"):
            value = self.header[key].decode("latin-1").strip(" \n\t\0")
            info[key] = value
        info["version"] = self.version
        info["groups"] = len(self.groups)
        for i, gp in enumerate(self.groups):
            if gp.data_location == v23c.LOCATION_ORIGINAL_FILE:
                stream = self._file
            elif gp.data_location == v23c.LOCATION_TEMPORARY_FILE:
                stream = self._tempfile
            inf = {}
            info[f"group {i}"] = inf
            inf["cycles"] = gp.channel_group.cycles_nr
            inf["comment"] = gp.channel_group.comment
            inf["channels count"] = len(gp.channels)
            for j, channel in enumerate(gp.channels):
                name = channel.name

                if channel.channel_type == v23c.CHANNEL_TYPE_MASTER:
                    ch_type = "master"
                else:
                    ch_type = "value"
                inf[f"channel {j}"] = f'name="{name}" type={ch_type}'

        return info
1181041
def get_channel(self):
        '''
        
        '''
        c = pygame.mixer.find_channel(not self.dynamic)
        while c is None:
            self.channels += 1
            pygame.mixer.set_num_channels(self.channels)
            c = pygame.mixer.find_channel()
        return c
156887
@Override
    public List<ChannelInformation> listChannels() {
        List<Channel> channels = channelDirectory.getChannels();

        List<ChannelInformation> channelInformationList = new LinkedList<ChannelInformation>();
        for (Channel channel : channels) {

            ChannelInformation channelInfo = new ChannelInformation(channel.getChannelId(), 0, 0);
            channelInformationList.add(channelInfo);
        }
        return channelInformationList;
    }
1128036
def _get_stream_parameters(kind, device, channels, dtype, latency, samplerate):
    """"""
    if device is None:
        if kind == 'input':
            device = _pa.Pa_GetDefaultInputDevice()
        elif kind == 'output':
            device = _pa.Pa_GetDefaultOutputDevice()

    info = device_info(device)
    if channels is None:
        channels = info['max_' + kind + '_channels']
    dtype = np.dtype(dtype)
    try:
        sample_format = _np2pa[dtype]
    except KeyError:
        raise ValueError("Invalid " + kind + " sample format")
    if samplerate is None:
        samplerate = info['default_samplerate']
    parameters = ffi.new(
        "PaStreamParameters*",
        (device, channels, sample_format, latency, ffi.NULL))
    return parameters, dtype, samplerate
561602
def show_channel(self, channel, owner):
        '''
        '''
        url = '%s/channels/%s/%s' % (self.domain, owner, channel)

        res = self.session.get(url)
        self._check_response(res, [200])
        return res.json()
258895
def channel(self):
        
        # start shell, non-blocking channel
        chan = self.cli.invoke_shell(width=360, height=80)
        chan.setblocking(0)
        # set channel timeout
        chan.settimeout(10)
        # now waiting for shell prompt ('username@')
        result = ""
        count = 0
        while count < 10:
            try:
                recv_part = chan.recv(16384).decode()
                result += recv_part
            except socket.timeout:
                # socket.timeout here means 'no more data'
                pass

            if result.find('%s@' % self.username) != -1:
                return chan
            time.sleep(1)
            count += 1
        # failed to get shell prompt on channel :-(
        raise StitchesConnectionException("Failed to get shell prompt")
976823
def get(self, channel):
        """"""
        checked_channel = self._check_channel_no(channel)
        self.i2c.write_raw8(checked_channel  | self._dac_enabled)
        reading = self.i2c.read_raw8() 
        reading = self.i2c.read_raw8() 
        return reading / 255.0
871899
public function getChannel()
    {
        if ($this->_oChannel === null) {
            $this->_oChannel = $this->_getRssFeed()->getChannel();
        }

        return $this->_oChannel;
    }
472712
def channels(self, topic):
        """"""
        nsq.assert_valid_topic_name(topic)
        return self._request('GET', '/channels', fields={'topic': topic})