Created
February 25, 2009 17:11
-
-
Save drewconway/70283 to your computer and use it in GitHub Desktop.
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
def snowball_build(twitter_api,seed_user,rounds): | |
# Main network building loop | |
for r in range(0,rounds): | |
if r<1: | |
# Create initial egonet | |
net=create_egonet(twitter_api,seed_user) | |
if net.size()>99: | |
print 'Running this script will exceed your Twitter API rate limit. You already have enough friends!' | |
break | |
else: | |
# Now perform snowball | |
net=snowball_search(net,twitter_api,seed_user,r) | |
return net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment