convert py2 -> py3

This commit is contained in:
Ryan Petrello
2018-10-22 12:58:42 -04:00
parent f132ce9b64
commit f223df303f
202 changed files with 1137 additions and 2046 deletions

View File

@@ -147,14 +147,14 @@ def spread(n, m):
ret = []
# At least one in each slot, split up the rest exponentially so the first
# buckets contain a lot of entries
for i in xrange(m):
for i in range(m):
if n > 0:
ret.append(1)
n -= 1
else:
ret.append(0)
for i in xrange(m):
for i in range(m):
n_in_this_slot = n // 2
n-= n_in_this_slot
ret[i] += n_in_this_slot
@@ -239,7 +239,7 @@ def make_the_data():
print('# Creating %d organizations' % n_organizations)
for i in xrange(n_organizations):
for i in range(n_organizations):
sys.stdout.write('\r%d ' % (i + 1))
sys.stdout.flush()
org, _ = Organization.objects.get_or_create(name='%s Organization %d' % (prefix, i))