Created
September 9, 2015 04:55
-
-
Save heyalexej/1a3a37fbb3e65dc63f11 to your computer and use it in GitHub Desktop.
Revisions
-
heyalexej created this gist
Sep 9, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- import requests from itertools import permutations ep = 'http://profilebishop.com/run.php' p = list(permutations(range(1,6), 4)) def permutate(): for i in p: params = { 'craft' : i[0], 'creative' : i[1], 'spiritual' : i[2], 'tech' : i[3] } yield params all = [] for idx, i in enumerate(permutate(), 1): print '\npermutation # {:d}: {}'.format(idx, i) for j in range(3): r = requests.get(ep, params=i).text print r for k in r.strip('"').split(','): all.append(k.strip()) print "Individual Combos:", len(set(all)) for a in sorted(set(all)): print a