Skip to content

Instantly share code, notes, and snippets.

@licsber
Created April 26, 2021 08:46
Show Gist options
  • Select an option

  • Save licsber/66e803884dfdb97e3cc8d8aef42c9a51 to your computer and use it in GitHub Desktop.

Select an option

Save licsber/66e803884dfdb97e3cc8d8aef42c9a51 to your computer and use it in GitHub Desktop.
import aip
APP_ID = '1'
API_KEY = '2'
SECRET_KEY = '3'
def run_all(c, start=0):
dirs = dir(c)
print(len(dirs))
for i in range(start, len(dirs)):
if dirs[i].startswith('_'):
continue
print(i)
try:
res = eval(f"c.{dirs[i]}(test_image)")
print(res)
except Exception as e:
print(e, dirs[i])
if __name__ == '__main__':
test_image = open('../datasets/Kirito.jpg', 'rb').read()
for i in dir(aip):
if i.startswith('Aip'):
client = eval(f"aip.{i}(APP_ID, API_KEY, SECRET_KEY)")
run_all(client)
@licsber
Copy link
Author

licsber commented Apr 26, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment