Returns all the channels where (optionally specified) nodes are subscribed
968437
def get_subscriptions(self, nodes=[]):
        
        if len(nodes) > 0:
            data = [node for node in self.get_clients() if node['name'] in nodes]
        else:
            data = self.get_clients()
        channels = []
        for client in data:
            if 'subscriptions' in client:
                if isinstance(client['subscriptions'], list):
                    for channel in client['subscriptions']:
                        if channel not in channels:
                            channels.append(channel)
                else:
                    if client['subscriptions'] not in channels:
                        channels.append(client['subscriptions'])
        return channels
907782
def _get_initialized_channels_for_service(self, org_id, service_id):
        ''''''
        channels_dict = self._get_initialized_channels_dict_for_service(org_id, service_id)
        return list(channels_dict.values())
17984
def check_channels!(integration)
      integration.channels.map(&:network).map(&:name).each do |network|
        find_network!(network)
      end
    end
532464
def channels(self):
        """"""
        return types.MappingProxyType({
            ch.name: ch for ch in self._refs.values()
            if not ch.is_pattern})
387255
public function channelsSubscriptions($channel, $options = [], $token = null)
    {
        $availableOptions = ['limit', 'offset', 'direction'];

        return $this->sendRequest('GET', 'channels/'.$channel.'/subscriptions', $this->getToken($token), $options, $availableOptions);
    }
110993
@Override
    public List<Channel> getChannels()
    {
        List<Channel> channels = new LinkedList<>();
        if (_acceptingParty != null)
            channels.add(_acceptingParty);
        if (_originatingParty != null)
            channels.add(_originatingParty);
        if (_transferTargetParty != null)
            channels.add(_transferTargetParty);
        return channels;
    }
352098
function matchesWildcard (subscriptions, channel) {
    var i;
    var subs = Object.keys(subscriptions);
    for (i=0; i < subs.length; i++) {
        if (matchesFilter(subs[i], channel)) {
            return subs[i];
        }
    }
    return undefined;
}
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
1019882
def GetNeighboringChannels(channel):
    '''
    

    '''

    x = divmod(channel - 1, 4)[1]
    return channel + np.array(range(-x, -x + 4), dtype=int)
59659
function connectNode (subscriptions, host, clientId) {
    // Create client
    var url = "tcp://" + host + ":1883";
    var client = mqtt_lib.connect(url, {clientId : clientId});
    // Register incoming message callback
    client.on('message', function(channel, message) {
        // Execute all the appropriate callbacks:
        // the ones specific to this channel with a single parameter (message)
        // the ones associated to a wildcard channel, with two parameters (message and channel)
        var cbs = findCallbacks(subscriptions, channel);
        if (cbs!==undefined) {
            cbs.forEach(function(cb) {
                if (Object.keys(subscriptions).indexOf(channel)!==-1) {
                    cb(message.toString());
                } else {
                    cb(message.toString(), channel);
                }
            });
        }
    });
    return client;
}
276544
def get_channels(self):
        
        selectedItems = self.idx_chan.selectedItems()
        selected_chan = [x.text().split('—')[0] for x in selectedItems]
        chan_in_order = []
        for chan in self.one_grp['chan_to_plot']:
            if chan in selected_chan:
                chan_in_order.append(chan)

        return chan_in_order
927613
void reSubscribeByName(EventChannelStruct event_channel_struct, String name) {
        Enumeration callback_structs = event_callback_map.elements();
        while (callback_structs.hasMoreElements()) {
            EventCallBackStruct callback_struct = (EventCallBackStruct) callback_structs.nextElement();
            if (callback_struct.channel_name.equals(name)) {
                reSubscribe(event_channel_struct, callback_struct);
            }
        }
    }
230299
private List<IGenericEvent<T>> getSubscribers(String eventName, boolean canCreate) {
        List<IGenericEvent<T>> subscribers = subscriptions.get(eventName);
        
        if (subscribers == null && canCreate) {
            subscribers = new LinkedList<>();
            subscriptions.put(eventName, subscribers);
        }
        
        return subscribers;
    }
1302822
def source_channels(self):
        
        source_channels = [v.coordinates.keys() for v in self.verts]
        return set(itertools.chain(*source_channels))
1043775
def channels(self):
        
        resp = self._rtm_client.get('v1/current_team.channels')
        if resp.is_fail():
            raise RTMServiceError(
                'Failed to get channels of current team',
                resp
            )
        return resp.data['result']
937647
function findSubscribers( self, eventName ) {
   const subscribers = [];
   const parts = eventName.split( TOPIC_SEPARATOR );
   const node = self.subscriberTree_;

   findSubscribersRecursively( node, parts, subscribers );
   subscribers.sort( ( a, b ) => {
      const aWeight = a.subscriptionWeight;
      const bWeight = b.subscriptionWeight;
      if( aWeight[ 0 ] === bWeight[ 0 ] ) {
         return bWeight[ 1 ] - aWeight[ 1 ];
      }

      return bWeight[ 0 ] - aWeight[ 0 ];
   } );

   return subscribers;
}
773006
private void reSubscribeByName(EventChannelStruct eventChannelStruct, String name) {

        //  Get the map and the callback structure for channel
        Hashtable<String, EventCallBackStruct>
                callBackMap = EventConsumer.getEventCallbackMap();
        EventCallBackStruct callbackStruct = null;
        Enumeration channelNames = callBackMap.keys();
        while (channelNames.hasMoreElements()) {
            String  key = (String) channelNames.nextElement();
            EventCallBackStruct eventStruct = callBackMap.get(key);
            if (eventStruct.channel_name.equals(name)) {
                callbackStruct = eventStruct;
            }
        }

        //  Get the callback structure
        if (callbackStruct!=null) {
            callbackStruct.consumer.reSubscribeByName(eventChannelStruct, name);
        }
    }