sender should look like 'username_streamId'
513983
public String receiveVideoFrom(String sender, String sdpOffer) throws IOException {
    JsonObject params = new JsonObject();
    params.addProperty(RECEIVEVIDEO_SENDER_PARAM, sender);
    params.addProperty(RECEIVEVIDEO_SDPOFFER_PARAM, sdpOffer);
    JsonElement result = client.sendRequest(RECEIVEVIDEO_METHOD, params);
    return JsonRoomUtils.getResponseProperty(result, RECEIVEVIDEO_SDPANSWER_PARAM, String.class);
  }
1312316
def users_changed_handler(stream):
    
    while True:
        yield from stream.get()

        # Get list list of current active users
        users = [
            {'username': username, 'uuid': uuid_str}
            for username, uuid_str in ws_connections.values()
        ]

        # Make packet with list of new users (sorted by username)
        packet = {
            'type': 'users-changed',
            'value': sorted(users, key=lambda i: i['username'])
        }
        logger.debug(packet)
        yield from fanout_message(ws_connections.keys(), packet)
802031
def username(self, value):
        """"""
        if isinstance(value, str):
            self._username = value
            self._handler = None
1257162
private void maybePushConfigChunk() {
        String currentChunk = responseContent.toString(CHARSET);

        int separatorIndex = currentChunk.indexOf("\n\n\n\n");
        if (separatorIndex > 0) {
            String content = currentChunk.substring(0, separatorIndex);
            streamingConfigObservable.onNext(content.trim());
            responseContent.clear();
            responseContent.writeBytes(currentChunk.substring(separatorIndex + 4).getBytes(CHARSET));
        }
    }
104740
def member_add(self, stream_id, user_id):
        '''  '''
        req_hook = 'pod/v1/room/' + str(stream_id) + '/membership/add'
        req_args = '{ "id": %s }' % user_id
        status_code, response = self.__rest__.POST_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
94920
def __parse_identities(self, stream):
        """"""

        for aliases in self.__parse_stream(stream):
            identity = self.__parse_alias(aliases[0])
            uuid = identity.email

            uid = self._identities.get(uuid, None)

            if not uid:
                uid = UniqueIdentity(uuid=uuid)
                identity.uuid = uuid
                uid.identities.append(identity)
                self._identities[uuid] = uid

                profile = Profile(uuid=uuid, name=identity.name, email=identity.email,
                                  is_bot=False)
                uid.profile = profile

            # Aliases
            for alias in aliases[1:]:
                identity = self.__parse_alias(alias, uuid)
                uid.identities.append(identity)

            self._identities[uuid] = uid
926117
def fx_username(self):
        
        msg = StandardSend(self._address, COMMAND_FX_USERNAME_0X03_0X01)
        self._send_msg(msg)
818808
Rule FieldUserdefPrint() {
		return Sequence(String("U:"),
				ZeroOrMore(WSP()).suppressNode(),
				Userdef(), HeaderEol()).label(FieldUserdefPrint);
	}
831783
public function describeLiveStreamOnlineUserNum($streamName = null, $startTime = null, $endTime = null)
    {
        $params = [
            'Action' => 'DescribeLiveStreamOnlineUserNum',
            'DomainName' => $this->domain,
            'AppName' => $this->appName
        ];
        if (!empty($streamName)) {
            $params['StreamName'] = $streamName;
        }
        if (!empty($startTime) && !empty($endTime)) {
            $params['StartTime'] = gmdate('Y-m-d\TH:i:s\Z', $startTime);
            $params['EndTime'] = gmdate('Y-m-d\TH:i:s\Z', $endTime);
        }
        return $this->createRequest($params);
    }
386227
def _quote_username(name):
    '''
    
    '''
    if not isinstance(name, six.string_types):
        return str(name)  # future lint: disable=blacklisted-function
    else:
        return salt.utils.stringutils.to_str(name)
1223804
function sendEmailToServer(formName){
  var email = $('#' + formName + ' [name=ep_email]').val();
  var userId = pad.getUserId();
  var message = {};
  message.type = 'USERINFO_UPDATE';
  message.userInfo = {};
  message.padId = pad.getPadId();
  message.userInfo.email = email;
  message.userInfo.email_option = $('#' + formName + ' [name=ep_email_option]').val();
  message.userInfo.email_onStart = $('#' + formName + ' [name=ep_email_onStart]').is(':checked');
  message.userInfo.email_onEnd = $('#' + formName + ' [name=ep_email_onEnd]').is(':checked');
  message.userInfo.formName = formName;
  message.userInfo.userId = userId;
  if(email){
    pad.collabClient.sendMessage(message);
  }
}
60514
function emitToUsers(users, channelName, data) {
        const usersArray = Array.isArray(users) ? users : [users];
        usersArray.map(function (user) {
            Object.keys(io.sockets.sockets).filter(function (key) {
                return io.sockets.sockets[key].transomUser._id.toString() === user._id.toString();
            }).map(function (socketKey) {
                io.sockets.sockets[socketKey].emit(channelName, data);
            });
        });
    }
548727
def get_pub_id_owner(self, pub_id):
        """"""
        con = self.connection or self._connect()
        cur = con.cursor()

        cur.execute(
            """SELECT distinct username from upload.reaction
            WHERE pub_id = '{pub_id}'"""
            .format(pub_id=pub_id))

        username = cur.fetchall()[0][0]

        return username
815724
function (username) {
        var channels = null;
        // get the user's object
        this.notifications.some(function (element) {
            if (element.username === username) {
                channels = element.channels;
                return true;
            }
            return false;
        });
        return channels;
    }
1234691
def _whoami():
    # type: () -> Tuple[Text,Text]
    """"""
    username = getuser()
    try:
        if onWindows():
            get_user_name = ctypes.windll.secur32.GetUserNameExW  # type: ignore
            size = ctypes.pointer(ctypes.c_ulong(0))
            get_user_name(3, None, size)

            name_buffer = ctypes.create_unicode_buffer(size.contents.value)
            get_user_name(3, name_buffer, size)
            fullname = str(name_buffer.value)
        else:
            fullname = pwd.getpwuid(os.getuid())[4].split(',')[0]
    except (KeyError, IndexError):
        fullname = username

    return (username, fullname)
691070
function usernameIsUnique ( id ) {
        var deferred = q.defer();

        db.users.query( [ { key: 'identities.basic.username', cmp: '=', value: user.identities.basic.username } ] ,
            { limit: 1, skip: 0 } ).then(
                function ( payload ) {
                    if ( payload.total === 0 ) {
                        deferred.resolve();
                    }
                    else if( !_.isUndefined( id ) && payload.results[0]._id.toString() === id.toString() ) {
                        deferred.resolve();
                    }
                    else {
                        deferred.reject( new Error(messages.duplicate_username) );
                    }
                },
                function ( err ) {
                    deferred.reject( err );
                }
            );

        return deferred.promise;
    }
569584
def _parse_user_id(stream, packet_type='user_id'):
    """"""
    value = stream.read()
    to_hash = b'\xb4' + util.prefix_len('>L', value)
    return {'type': packet_type, 'value': value, '_to_hash': to_hash}