Bring a specific channel to the zero-indexed position in channels.

        All other channels get pushed back but remain in order.

        Parameters
        ----------
        channel : int or str
            Channel index or name.
197347
def bring_to_front(self, channel):
        
        channel_index = wt_kit.get_index(self.channel_names, channel)
        new = list(self.channel_names)
        new.insert(0, new.pop(channel_index))
        self.channel_names = new
159591
def push_msg(self, channel_id, msg):
        

        if type(msg) is not str:
            msg = urlencode(msg)

        return self.push(channel_id, msg)
458481
def change_axis(self, axis_num, channel_name):
        
        current_channels = list(self.current_channels)
        if len(current_channels) == 1:
            if axis_num == 0:
                new_channels = channel_name,
            else:
                new_channels = current_channels[0], channel_name
        else:
            new_channels = list(current_channels)
            new_channels[axis_num] = channel_name

        self.set_axes(new_channels, self.ax)
803370
def join(self, channel_name):
        
        self.params.update({
            'name': channel_name,
            })
        return FromUrl('https://slack.com/api/channels.join', self._requests)(data=self.params).post()
383623
def _index(self, value):
        '''
        '''

        if self.conv in ('channels_last', 'tf'):
            return np.transpose(value, (2, 1, 0))

        else:  # self.conv in ('channels_first', 'th')
            return np.transpose(value, (0, 2, 1))
149705
def _end_channel(self, channel):
        
        self.stop_on_empty_queue[channel] = True

        # by joining the we wait until its loop finishes.
        # it won't loop forever since we've set self.stop_on_empty_queue=True
        write_thread = self.thread_write_instances[channel]

        thread_join_non_blocking(write_thread)
302332
def _bridge(self, channel):
        
        channel.setblocking(False)
        channel.settimeout(0.0)
        self._tasks = [
            gevent.spawn(self._forward_inbound, channel),
            gevent.spawn(self._forward_outbound, channel)
        ]
        gevent.joinall(self._tasks)
59592
def channels_unarchive(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.unarchive', roomId=room_id, kwargs=kwargs)
958614
def add_channel(self):
        
        config.LOGGER.info("   Creating channel {0}".format(self.channel.title))
        payload = {
            "channel_data":self.channel.to_dict(),
        }
        response = config.SESSION.post(config.create_channel_url(), data=json.dumps(payload))
        response.raise_for_status()
        new_channel = json.loads(response._content.decode("utf-8"))

        return new_channel['root'], new_channel['channel_id']
128544
function processChannel(channel) {
    if (0 == bestAlpha) {
      return bottom[channel]
    } else {
      return bottom[channel] + (top[channel] - bottom[channel]) / bestAlpha
    }
  }
577945
def move_complete_channel(self):
        

        to_channel = Channel.objects.get(self.current.task_data['target_channel_key'])
        chosen_channels = self.current.task_data['chosen_channels']
        chosen_channels_names = self.current.task_data['chosen_channels_names']

        with BlockSave(Subscriber, query_dict={'channel_id': to_channel.key}):
            for s in Subscriber.objects.filter(channel_id__in=chosen_channels, typ=15):
                s.channel = to_channel
                s.save()

        with BlockDelete(Message):
            Message.objects.filter(channel_id__in=chosen_channels, typ=15).delete()

        with BlockDelete(Channel):
            Channel.objects.filter(key__in=chosen_channels).delete()

        self.current.task_data[
            'msg'] = _(u"Chosen channels(%s) have been merged to '%s' channel successfully.") % \
                     (', '.join(chosen_channels_names), to_channel.name)
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
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
82579
def join_channel(self, channel):
        
        self.s.send(('JOIN #%s\r\n' % channel).encode('utf-8'))
        if self.verbose:
            print('JOIN #%s\r\n' % channel)
695018
def linear_positions(n_channels):
    """"""
    return np.c_[np.zeros(n_channels),
                 np.linspace(0., 1., n_channels)]
1183449
def invite(self, channel, nick):
        
        with self.lock:
            self.is_in_channel(channel)

            self.send('INVITE %s %s' % (nick, channel))

            while self.readable():
                    msg = self._recv(expected_replies=('341', '301'))

                    if msg[0] == '341':
                        pass
                    elif msg[0] == '301':
                        away_msg = msg[2].split()[1].replace(':', '', 1)
                        return 'AWAY', away_msg
1053879
def join(channel, key = nil)
      channel = Channel(channel)
      channel.join(key)

      channel
    end