def legendre_symbol(a, p):
    ls = pow(a, (p - 1) / 2, p)
    return -1 if ls == p - 1 else ls
Get instance type by name.
dataset/ETHPy150Open bitxbay/BitXBay/electru/build/lib/electrum/msqr.py/legendre_symbol--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/db/api.py/flavor_get_by_name