Sign in
apache
/
incubator-flagon-stout
/
refs/heads/dependabot/pip/urllib3-1.26.5
/
.
/
op_tasks
/
mechanicalTurk.py
blob: de78eff2df7a69917ecf86308c7568dd180ea99e [
file
] [
log
] [
blame
]
import
hashlib
def
generateCode
(
uid
,
uhash
):
hash
=
hashlib
.
sha1
()
hash
.
update
(
uhash
)
part2
=
hash
.
hexdigest
()[
15
:-
15
]
part1
=
str
(
999999
-(
uid
%
1000000
)).
zfill
(
6
)
return
part1
+
part2