Last active
February 7, 2020 04:24
-
-
Save dev4Fun/3f56c53b2e34017f36d130e6a83e5004 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _process_comments(self, comments): | |
| num_of_replies = round(len(comments) * 0.35) | |
| comments_to_leave = iter(random.sample(comment_reply_list, num_of_replies + 1)) | |
| for comment in random.sample(comments, num_of_replies): | |
| comment.upvote() | |
| sleep(random.randint(2, 3)) | |
| comment.reply(next(comments_to_leave, random.choice(comment_reply_list))) | |
| return num_of_replies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment