Skip to content

Instantly share code, notes, and snippets.

@drewconway
Created February 25, 2009 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewconway/70283 to your computer and use it in GitHub Desktop.
Save drewconway/70283 to your computer and use it in GitHub Desktop.
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