Topic setter and time on channel join.
179819
async def on_raw_333(self, message):
        
        target, channel, setter, timestamp = message.params
        if not self.in_channel(channel):
            return

        # No need to sync user since this is most likely outdated info.
        self.channels[channel]['topic_by'] = self._parse_user(setter)[0]
        self.channels[channel]['topic_set'] = datetime.datetime.fromtimestamp(int(timestamp))
1079541
function(req, topic, messages){
    payloads[0]['topic'] = topic
    payloads[0]['messages']= JSON.stringify(messages);
    console.log(payloads[0]['messages']);
    setTimeout(function () {
        producer.send(payloads, function (err, data) {
            if(err){
                console.log(err);
            }
        });
        producer.on('error', function (err) {
            console.log(err);
        });
    }, 1000);
}
217642
def set_topic_attributes(TopicArn, AttributeName, AttributeValue, region=None, key=None, keyid=None,
                         profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        conn.set_topic_attributes(TopicArn=TopicArn, AttributeName=AttributeName,
                                  AttributeValue=AttributeValue)
        log.debug('Set attribute %s=%s on SNS topic %s',
                  AttributeName, AttributeValue, TopicArn)
        return True
    except botocore.exceptions.ClientError as e:
        log.error('Failed to set attribute %s=%s for SNS topic %s: %s',
                  AttributeName, AttributeValue, TopicArn, e)
        return False
969326
def start (self):
        '''
        

        '''
        self.sub = rospy.Subscriber(self.topic, LaserScan, self.__callback)
761538
function getChannelsSchedule(channel,date){
  var p = '/ibl/v1/channels/{channel}/schedule/{date}';
  p = p.replace('{channel}',channel);
  p = p.replace('{date}',date);
  return p;
}
1266693
def text_channels(self):
        """"""
        ret = [c for c in self.guild.channels
            if c.category_id == self.id
            and isinstance(c, TextChannel)]
        ret.sort(key=lambda c: (c.position, c.id))
        return ret
554450
def bind(topic, signal=None, kind=MIDDLE, nice=-1):
    
    def f(func):
        if not topic in _receivers:
            receivers = _receivers[topic] = []
        else:
            receivers = _receivers[topic]
        
        if nice == -1:
            if kind == MIDDLE:
                n = 500
            elif kind == HIGH:
                n = 100
            else:
                n = 900
        else:
            n = nice
        if callable(func):
            func_name = func.__module__ + '.' + func.__name__
            func = func
        else:
            func_name = func
            func = None
        _f = (n, {'func':func, 'signal':signal, 'func_name':func_name})
        receivers.append(_f)
        return func
    return f
90702
async def set_topic(self, topic):
        """"""
        self.topic = topic
        try:
            if self.topicchannel:
                await client.edit_channel(self.topicchannel, topic=topic)
        except Exception as e:
            logger.exception(e)
601009
def started(topic, event)
      subscribers_for(topic).each{ |subscriber| subscriber.started(event) }
    end
1258571
def subscribe_topics(self):
        """"""
        base = self.topic
        subscribe = self.mqtt.subscribe

        # device topics
        subscribe(b"/".join((base, b"$stats/interval/set")))
        subscribe(b"/".join((self.settings.MQTT_BASE_TOPIC, b"$broadcast/#")))

        # node topics
        nodes = self.nodes
        for node in nodes:
            for topic in node.subscribe:
                topic = b"/".join((base, topic))
                # print('MQTT SUBSCRIBE: {}'.format(topic))
                subscribe(topic)
                self.topic_callbacks[topic] = node.callback
641337
def subscribe_multi(self, topics):
        """"""
        if self.sock == NC.INVALID_SOCKET:
            return NC.ERR_NO_CONN
        
        self.logger.info("SUBSCRIBE: %s", ', '.join([t for (t,q) in topics]))
        return self.send_subscribe(False, [(utf8encode(topic), qos) for (topic, qos) in topics])
1152690
def _join_date_and_time(dates, times, joiner):
  
  return tuple("{}{}{}".format(d, joiner, t) for (d, t) in itertools.product(dates, times))
472712
def channels(self, topic):
        """"""
        nsq.assert_valid_topic_name(topic)
        return self._request('GET', '/channels', fields={'topic': topic})
946531
def start (self):
        '''
        

        '''
        self.sub = rospy.Subscriber(self.topic, BumperEvent, self.__callback)
772193
def on_chat(self, data):
        '''  '''
        # XXX: we cannot use on_message as it's 'official' one already used
        # by sockjsroom to create multiple on_* elements (like on_chat),
        # so we use on_chat instead of on_message

        # data => message
        if self.roomId != '-1':
            self.publishToRoom(self.roomId, 'chat', {
                'username': self.username,
                'time': datetime.now(),
                'message': str(data['message'])
            })
269780
def sub(self, topic, channel):
        ''''''
        return self.send(' '.join((constants.SUB, topic, channel)))
357802
def set_room_topic(self, room_id, topic, timestamp=None):
        
        body = {
            "topic": topic
        }
        return self.send_state_event(room_id, "m.room.topic", body, timestamp=timestamp)