mirror of
https://github.com/ltcptgeneral/cs239-caching.git
synced 2025-04-16 10:17:24 +00:00
randomize friends further
This commit is contained in:
parent
9dd93d96f2
commit
f475991f50
@ -27,7 +27,7 @@ def parse_profile(text, user_id, num_users):
|
|||||||
|
|
||||||
followers = random.randint(10, 5000)
|
followers = random.randint(10, 5000)
|
||||||
|
|
||||||
friend_ids = [str(fid) for fid in range(num_users) if fid != user_id]
|
friend_ids = [str(fid) for fid in range(user_id) if fid != user_id]
|
||||||
random.shuffle(friend_ids)
|
random.shuffle(friend_ids)
|
||||||
friends = friend_ids[:random.randint(1, min(100, math.ceil(num_users/3)))]
|
friends = friend_ids[:random.randint(1, min(100, math.ceil(num_users/3)))]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user