Generates a random email address.
480331
def email(anon, obj, field, val):
    
    return anon.faker.email(field=field)
388273
def generate_random(number_of_bytes=None, region=None, key=None, keyid=None,
                    profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    r = {}
    try:
        random = conn.generate_random(number_of_bytes)
        r['random'] = random['Plaintext']
    except boto.exception.BotoServerError as e:
        r['error'] = __utils__['boto.get_error'](e)
    return r
425054
function generateRandomClientId() {
    var length = 22;
    var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    var result = '';
    for (var i = length; i > 0; --i) {
        result += chars[Math.round(Math.random() * (chars.length - 1))];
    }
    return result;
}
1138245
def generate_random_string(cls, length):
        
        # avoid things that could be mistaken ex: 'I' and '1'
        letters = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ"
        return "".join([random.choice(letters) for _ in range(length)])
837875
def add_email_address(self, email, hidden=None):
        
        existing_emails = get_value(self.obj, 'email_addresses', [])
        found_email = next(
            (existing_email for existing_email in existing_emails if existing_email.get('value') == email),
            None
        )
        if found_email is None:
            new_email = {'value': email}
            if hidden is not None:
                new_email['hidden'] = hidden
            self._append_to('email_addresses', new_email)
        elif hidden is not None:
            found_email['hidden'] = hidden
1349707
def recipient_address_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/recipient_addresses.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1334960
def random_str(size=10):
    
    return ''.join(random.choice(string.ascii_lowercase) for _ in range(size))
218763
def create_contact(self, email=None, first_name=None, last_name=None, phone_number=None):
        
        result = {}
        if email:
            result['email'] = email
        if first_name is not None:
            result['first_name'] = first_name
        if last_name is not None:
            result['last_name'] = last_name
        if phone_number is not None:
            result['phone_number'] = phone_number
        return result if len(result) > 0 else None
12488
def random_letters(count):
    """"""
    rv = random.choice(string.ascii_uppercase)
    while len(rv) < count:
        l = random.choice(string.ascii_uppercase)
        if not l in rv:
            rv += l
    return rv
1319438
def random_id(k=5):
  """"""
  #  https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits-in-python
  return ''.join(random.choices(string.ascii_lowercase + string.digits, k=k))
105043
def rand_email():
    
    name = rand_str(random.randint(4, 14), string.ascii_lowercase) + \
           rand_str(random.randint(1, 4), string.digits)
    domain = rand_str(random.randint(2, 10), string.ascii_lowercase)
    surfix = random.choice(DOMAIN_SURFIX)
    return "%s@%s.%s" % (name, domain, surfix)
462630
def email(safe:false)
      @email ||= -> {
        domains = if safe
                    ['example.com']
                  else
                    Jia::Utils.load_data('email_domain')
                  end
        account = ::PinYin.of_string(full_name).join('.')
        suffix = rand(999)
        "#{account}#{suffix}@#{domains.sample}"
      }.call
    end
1058702
def gen_random_string(str_len):
    
    return ''.join(
        random.choice(string.ascii_letters + string.digits) for _ in range(str_len))
723007
def setup_user_email(request, user, addresses):
    
    from .models import EmailAddress

    assert not EmailAddress.objects.filter(user=user).exists()
    priority_addresses = []
    # Is there a stashed e-mail?
    adapter = get_adapter(request)
    stashed_email = adapter.unstash_verified_email(request)
    if stashed_email:
        priority_addresses.append(EmailAddress(user=user,
                                               email=stashed_email,
                                               primary=True,
                                               verified=True))
    email = user_email(user)
    if email:
        priority_addresses.append(EmailAddress(user=user,
                                               email=email,
                                               primary=True,
                                               verified=False))
    addresses, primary = cleanup_email_addresses(
        request,
        priority_addresses + addresses)
    for a in addresses:
        a.user = user
        a.save()
    EmailAddress.objects.fill_cache_for_user(user, addresses)
    if (primary and email and email.lower() != primary.email.lower()):
        user_email(user, primary.email)
        user.save()
    return primary
488237
def create_job(self, emails):
        
        resp = self._call(endpoint='bulk', data={'input_location': '1', 'input': '\n'.join(emails)})
        return Job(resp['job_id'])
815013
def random_string(length=6, alphabet=string.ascii_letters+string.digits):
    
    return ''.join([random.choice(alphabet) for i in xrange(length)])
372545
def get_random_id(length):
    """"""
    alphabet = string.ascii_uppercase + string.ascii_lowercase + string.digits
    return ''.join(random.choice(alphabet) for _ in range(length))