<commit_before>import hashlib

from calendar import timegm
from datetime import datetime

from builtins import int

import testdata

def now():
    return timegm(datetime.utcnow().utctimetuple())

class ClaimsFactory(testdata.DictFactory):
    iat = testdata.Constant(now())
    exp = testdata.RandomInteger(int(now() + 15), int(now()*10))
    iss = 'aap.ebi.ac.uk'
    sub = testdata.Sum([testdata.Constant('usr-'), testdata.HashHexDigestFactory(hashlib.md5)])
    email = testdata.FakeDataFactory('email')
    name = testdata.FakeDataFactory('name')
    nickname = testdata.HashHexDigestFactory(hashlib.sha256)

if __name__ == '__main__':
    for claims in ClaimsFactory().generate(10):
        print claims<commit_msg>fix: properly generate the iss claim<commit_after>import hashlib

from calendar import timegm
from datetime import datetime

from builtins import int

import testdata

def now():
    return timegm(datetime.utcnow().utctimetuple())

class ClaimsFactory(testdata.DictFactory):
    iat = testdata.Constant(now())
    exp = testdata.RandomInteger(int(now() + 15), int(now()*10))
    iss = testdata.Constant('aap.ebi.ac.uk')
    sub = testdata.Sum([testdata.Constant('usr-'), testdata.HashHexDigestFactory(hashlib.md5)])
    email = testdata.FakeDataFactory('email')
    name = testdata.FakeDataFactory('name')
    nickname = testdata.HashHexDigestFactory(hashlib.sha256)

if __name__ == '__main__':
    for claims in ClaimsFactory().generate(10):
        print claims
{'fraction_non_alphanumeric': 0.12398921832884097, 'fraction_numerical': 0.013477088948787063, 'mean_word_length': 4.823529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5482228', 'n_tokens_mistral': 489, 'n_tokens_neox': 462, 'n_words': 100}