Create a data channel with the given label.

        :rtype: :class:`RTCDataChannel`
184783
def createDataChannel(self, label, maxPacketLifeTime=None, maxRetransmits=None,
                          ordered=True, protocol='', negotiated=False, id=None):
        
        if maxPacketLifeTime is not None and maxRetransmits is not None:
            raise ValueError('Cannot specify both maxPacketLifeTime and maxRetransmits')

        if not self.__sctp:
            self.__createSctpTransport()

        parameters = RTCDataChannelParameters(
            id=id,
            label=label,
            maxPacketLifeTime=maxPacketLifeTime,
            maxRetransmits=maxRetransmits,
            negotiated=negotiated,
            ordered=ordered,
            protocol=protocol)
        return RTCDataChannel(self.__sctp, parameters)
1212455
def p_data(p):
    
    label_ = make_label(gl.DATA_PTR_CURRENT, lineno=p.lineno(1))
    datas_ = []
    funcs = []

    if p[2] is None:
        p[0] = None
        return

    for d in p[2].children:
        value = d.value
        if is_static(value):
            datas_.append(d)
            continue

        new_lbl = '__DATA__FUNCPTR__{0}'.format(len(gl.DATA_FUNCTIONS))
        entry = make_func_declaration(new_lbl, p.lineno(1), type_=value.type_)
        if not entry:
            continue

        func = entry.entry
        func.convention = CONVENTION.fastcall
        SYMBOL_TABLE.enter_scope(new_lbl)
        func.local_symbol_table = SYMBOL_TABLE.table[SYMBOL_TABLE.current_scope]
        func.locals_size = SYMBOL_TABLE.leave_scope()

        gl.DATA_FUNCTIONS.append(func)
        sent = make_sentence('RETURN', func, value)
        func.body = make_block(sent)
        datas_.append(entry)
        funcs.append(entry)

    gl.DATAS.append([label_, datas_])
    id_ = api.utils.current_data_label()
    gl.DATA_PTR_CURRENT = id_
682240
def send(self, channel, payload):
        
        with track('send_channel=' + channel):
            with track('create event'):
                Event.objects.create(
                    group=self,
                    channel=channel,
                    value=payload)
            ChannelGroup(str(self.pk)).send(
                    {'text': json.dumps({
                        'channel': channel,
                        'payload': payload
                    })})
1358877
def append_data(self, data_buffer):
        

        if len(data_buffer) % (self.sample_width * self.channels) != 0:
            raise ValueError("length of data_buffer must be a multiple of (sample_width * channels)")

        self._buffer += data_buffer
        self._left += len(data_buffer)
349544
protected ChannelData createChannelData(String name, Class<?> factoryClass, Map<Object, Object> properties, int weight) {

        return new ChannelDataImpl(name, factoryClass, properties, weight, this);
    }
674339
def create_label(label_tuple, extra_label=None):
    
    if extra_label is not None:
        return '[' + ' - '.join(label_tuple) + '] ' + str(extra_label)
    else:
        return '[' + ' - '.join(label_tuple) + ']'
503417
def directive_DCB(self, label, params):
        
        # TODO make this read only
        # TODO check for byte size
        self.labels[label] = self.space_pointer
        if params in self.equates:
            params = self.equates[params]
        self.memory[self.space_pointer] = self.convert_to_integer(params) & 0xFF
        self.space_pointer += 1
812762
function channelDef (opt) {
	var self = {
		name : new type.BinaryString(null, { readLength : new type.CallableValue(8) }),
		options : new type.UInt32Le()
	};
	
	return new type.Component(self, opt);
}
399548
public void createDataChannel() {
        if (null != callReference) {
            RespokeCall call = callReference.get();
            if (null != call) {
                PeerConnection peerConnection = call.getPeerConnection();
                dataChannel = peerConnection.createDataChannel("respokeDataChannel", new DataChannel.Init());
                dataChannel.registerObserver(this);
            }
        }
    }
93913
def create(channel, body, properties=None):
        
        properties = properties or {}
        if 'correlation_id' not in properties:
            properties['correlation_id'] = str(uuid.uuid4())
        if 'message_id' not in properties:
            properties['message_id'] = str(uuid.uuid4())
        if 'timestamp' not in properties:
            properties['timestamp'] = datetime.utcnow()

        return Message(channel, auto_decode=False,
                       body=body, properties=properties)
792097
def create_channel(n = nil, _pool_size = 1, *_args)
      # raise same error as {Bunny::Session#create_channel}
      raise ArgumentError, 'channel number 0 is reserved in the protocol and cannot be used' if n && n.zero?

      # return cached channel if exists
      return @channels[n] if n && @channels.key?(n)

      # create and open channel
      channel = Channel.new self, n
      channel.open

      # return channel
      @channels[n] = channel
    end
82300
def make_viewer(self, vname, channel):
        
        if vname not in self.viewer_db:
            raise ValueError("I don't know how to build a '%s' viewer" % (
                vname))

        stk_w = channel.widget

        bnch = self.viewer_db[vname]

        viewer = bnch.vclass(logger=self.logger,
                             settings=channel.settings)
        stk_w.add_widget(viewer.get_widget(), title=vname)

        # let the GUI respond to this widget addition
        self.update_pending()

        # let the channel object do any necessary initialization
        channel.connect_viewer(viewer)

        # finally, let the viewer do any viewer-side initialization
        viewer.initialize_channel(self, channel)
1302497
def encode(self, label):
        
        label = super().encode(label)

        return torch.tensor(self.stoi.get(label, self.unknown_index))
498489
def label(self,x,y,label,offset=[0,0]):
        """"""
        (xc,yc)=self.p2c([x,y])
        return self.create_text(xc-offset[0],yc-offset[1],text=label)
1292027
async def async_send_to_pipe_channel(channel_name,
                                     label,
                                     value):
    ''
    pcn = _form_pipe_channel_name(channel_name)

    channel_layer = get_channel_layer()
    await channel_layer.group_send(pcn,
                                   {"type":"pipe.value",
                                    "label":label,
                                    "value":value})
1258083
async def create_category(self, name, *, overwrites=None, reason=None):
        
        data = await self._create_channel(name, overwrites, ChannelType.category, reason=reason)
        channel = CategoryChannel(state=self._state, guild=self, data=data)

        # temporarily add to the cache
        self._channels[channel.id] = channel
        return channel
412325
def provide_label(self):
        """"""
        return [(k, tuple([self.batch_size] + list(v.shape[1:]))) for k, v in self.label]