def TestEntropy(n, tests, diff):
    nb = 0
    t1 = time.clock()
    for i in tests:
        print n.entropy(i[0])[0], entropy(i[0])
        print n.entropy(i[1])[0], entropy(i[1])
        nb += test( n.entropy(i[0])[0], n.entropy(i[1])[0], lambda x, y : (max(x,y) - min(x,y)) <= diff )
    t2 = time.clock()
    print "* Entropy %fs %d/%d" % (t2 - t1, nb, len(tests))
dataset/ETHPy150Open androguard/androguard/elsim/tests/test_similarity.py/TestEntropy/original