sender should look like 'username_streamId'
334237
public void unsubscribeFromVideo(String sender) throws IOException {
    JsonObject params = new JsonObject();
    params.addProperty(UNSUBSCRIBEFROMVIDEO_SENDER_PARAM, sender);
    client.sendRequest(UNSUBSCRIBEFROMVIDEO_METHOD, params);
  }
393215
function(userObj, setname, hashPrefix, cb){
      
      console.log("\nCreating new user account %s", userObj.network.username)
      
      /*
      userObj = {
        network: {
          type : 'facebook',
          first_name: 'Joe',
          last_name: 'McCann',
          username: 'joemccann',
          full_name: 'Joe McCann'
        },
        email_address: 'joseph.isaac@gmail.com',
        oauth: {}
      }
      */
      
      // TODO: CHECK IF HASH EXISTS

      // Schema should be:
      var schema = 
      {
        uuid: null,
        networks: { 
          twitter: {},
          facebook: {},
          instagram: {},
          flickr: {},
          dropbox: {},
          google_drive: {}
        },
        email_addresses: [],
        cache: {
          twitter: null,
          facebook: null,
          instagram: null,
          flickr: null,
          dropbox: null,
          google_drive: null
        }
      }

      // Generate unique user id
      schema.uuid = sha1(redisConfig.salt, userObj.email_address)

      // "Official" email address is schema.email_addresses[0]
      // Add it to the email addresses for the user
      schema.email_addresses.push(userObj.email_address)

      // Let's 
      client.sadd(setname, schema.uuid, function(e,d){

        if(cb){
          return cb(e,d)
        } 
        
        userSetAddHandler(e,d)

        client.hmset(hashPrefix +":"+schema.uuid, userObj, hmsetCb || userSetHashHandler)
        
      })

    }
11053
def format_trigger(self, stream):
        

        src = u'value'
        if self.use_count:
            src = u'count'

        return u"{}({}) {} {}".format(src, stream, self.comp_string, self.reference)
882242
def token_reply_info(client, scope, user = nil, state = nil, refresh = false)
    interval = client[:access_token_validity] || 3600
    token_body = { jti: SecureRandom.uuid, aud: scope, scope: scope,
        client_id: client[:client_id], exp: interval + Time.now.to_i }
    if user
      token_body[:user_id] = user[:id]
      token_body[:email] = primary_email(user[:emails])
      token_body[:user_name] = user[:username]
    end
    info = { access_token: TokenCoder.encode(token_body, :algorithm => 'none'),
        token_type: 'bearer', expires_in: interval, scope: scope}
    info[:state] = state if state
    info[:refresh_token] = 'universal_refresh_token' if refresh
    inject_error(info)
    info
  end
832729
function readNotifyUser(message, tokens) {
	message.userName = protocol.decodeString(tokens[1]);
	message.userPassword = protocol.decodeString(tokens[3]);
	readNotifyUserHeaders(message, tokens.slice(4));
}
926117
def fx_username(self):
        
        msg = StandardSend(self._address, COMMAND_FX_USERNAME_0X03_0X01)
        self._send_msg(msg)
1364309
def _prompt_username(prompt="Username: ", prefill=None):
    """"""
    if prefill:
        readline.set_startup_hook(lambda: readline.insert_text(prefill))

    try:
        return input(prompt).strip()
    except EOFError:
        print()
    finally:
        readline.set_startup_hook()
134012
def _FormatUsername(self, event):
    
    username = self._output_mediator.GetUsername(event)
    return self._SanitizeField(username)
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}
1189899
def rest_put_stream(self, url, stream, headers=None, session=None, verify=True, cert=None):
        
        res = session.put(url, headers=headers, data=stream, verify=verify, cert=cert)
        return res.text, res.status_code
372760
def user_loggedin(sender, **kwargs):
    
    values = {
        'value': 1,
        'path': kwargs['request'].path,
        'user_id': str(kwargs['user'].pk),
        'username': kwargs['user'].username,
    }
    write('user_logins', values=values)
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
895025
def _handle_chat_name(self, data):
        """"""

        self.room.user.nick = data
        self.conn.enqueue_data("user", self.room.user)
988193
def show(config, username):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        CLI.show_user(user_api.show(username))
222488
def build_channel(namespace, name, user_ids):
    
    ids = ','.join(map(str, user_ids))
    return "{0}:{1}#{2}".format(namespace, name, ids)
818808
Rule FieldUserdefPrint() {
		return Sequence(String("U:"),
				ZeroOrMore(WSP()).suppressNode(),
				Userdef(), HeaderEol()).label(FieldUserdefPrint);
	}
667289
def v1_stream_id_associations(tags, stream_id):
    '''
    '''
    stream_id = stream_id.decode('utf-8').strip()
    return {'associations': tags.assocs_by_stream_id(stream_id)}