Snippets

Biosig Lab Retrieve results for single prediction jobs - DynaMut2

Updated by Carlos Miranda Rodrigues

File retrieve_results_single_prediction.py Modified

  • Ignore whitespace
  • Hide word diff
 import requests
 import sys
 
-URL = "https://biosig.lab.uq.edu.au/dynamut2app/api/prediction_single"
+URL = "https://biosig.lab.uq.edu.au/dynamut2/api/prediction_single"
 
 def main(args):
     job_id = args.job_id
Updated by Carlos Miranda Rodrigues

File retrieve_results_single_prediction.py Modified

  • Ignore whitespace
  • Hide word diff
 import requests
 import sys
 
-URL = "http://biosig.unimelb.edu.au/dynamut2app/api/prediction_single"
+URL = "https://biosig.lab.uq.edu.au/dynamut2app/api/prediction_single"
 
 def main(args):
     job_id = args.job_id
Created by Carlos Miranda Rodrigues

File retrieve_results_single_prediction.py Added

  • Ignore whitespace
  • Hide word diff
+import argparse
+import requests
+import sys
+
+URL = "http://biosig.unimelb.edu.au/dynamut2app/api/prediction_single"
+
+def main(args):
+    job_id = args.job_id
+
+    params = {
+        "job_id": job_id,
+    }
+
+    req = requests.get(URL, data=params)
+    print(req.json())
+    return True
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description='Retrieve job results for single prediction - DynaMut2')
+    parser.add_argument('--job_id', dest='job_id', type=str, help='Job identifier code generated upon submission', required=False, default=None)
+
+    args = parser.parse_args()
+    main(args)
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.