Skip to content

Instantly share code, notes, and snippets.

@heyalexej
Created September 9, 2015 04:55
Show Gist options
  • Save heyalexej/1a3a37fbb3e65dc63f11 to your computer and use it in GitHub Desktop.
Save heyalexej/1a3a37fbb3e65dc63f11 to your computer and use it in GitHub Desktop.

Revisions

  1. heyalexej created this gist Sep 9, 2015.
    35 changes: 35 additions & 0 deletions bishop.py
    Original 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