-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrepeats_check.py
36 lines (32 loc) · 906 Bytes
/
repeats_check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# repeats_check.py
#
"""
A little script to check how many names one can expect to get without
hitting repeats. Obviously this could be done using math, but
(unsatisfying excuses here).
"""
import cumberbatch
first_names = []
while True:
name = cumberbatch.first()
if name in first_names:
break
else:
first_names.append(name)
print 'Generated {} clean first names before a repeat appeared.'.format(len(first_names))
last_names = []
while True:
name = cumberbatch.last()
if name in last_names:
break
else:
last_names.append(name)
print 'Generated {} clean last names before a repeat appeared.'.format(len(last_names))
full_names = []
while True:
name = cumberbatch.full()
if name in full_names:
break
else:
full_names.append(name)
print 'Generated {} clean full names before a repeat appeared.'.format(len(full_names))