This file contains 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
"""Check the time penalty for checking socket liveliness""" | |
import errno | |
import gc | |
import socket | |
import time | |
import gevent.socket | |
ITERATIONS = 10_000 |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am spladug on github. | |
* I am spladug (https://keybase.io/spladug) on keybase. | |
* I have a public key whose fingerprint is 2A2D AD15 78F0 5F89 5CF7 336A 4343 B50C 8F8D 8190 | |
To claim this, I am signing this object: |
This file contains 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
#!/usr/bin/python | |
import itertools | |
import random | |
IDEAL_SLEEP = 300 | |
SLEEPER_COUNT = 3000 |
This file contains 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
function retry { | |
local retry_max=$1 | |
shift | |
local count=$retry_max | |
while [ $count -gt 0 ]; do | |
"$@" && break | |
count=$(($count - 1)) | |
sleep 1 | |
done |
This file contains 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
### Following are all the precomputed queries in reddit including | |
### those from queries.py and promote.py. user/author_id is an account | |
### sr is a subreddit, sort is one of ("hot", "new", "top", "controversial") | |
### and time is one of ("all", "hour", "day", "week", "month", "year"). | |
### I've divided them into two rough groupings: user and subreddit. | |
def get_links(sr, sort, time): | |
def get_spam_links(sr): | |
def get_spam_comments(sr): | |
def get_reported_links(sr): |
This file contains 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
The install script has moved to the main reddit repository: | |
https://github.com/reddit/reddit/blob/master/install-reddit.sh |