Best Python code snippet using localstack_python
kms_listener.py
Source:kms_listener.py
...69 data[NAME] = ""70 data[CREATION_DATE] = time.time()71 grants[data[GRANT_ID]] = data72 return {GRANT_ID: data[GRANT_ID], "GrantToken": data[GRANT_TOKENS][0]}73def filter_if_present(grant, data, filter_key):74 return filter_key not in data or grant[filter_key] == data[filter_key]75def filter_grantee_principal(grant, data):76 return filter_if_present(grant, data, GRANTEE_PRINCIPAL)77def filter_grant_id(grant, data):78 return filter_if_present(grant, data, GRANT_ID)79def handle_list_grants(data):80 if KEY_ID not in data:81 raise ValidationException("KeyId must be specified")82 verify_key_exists(data[KEY_ID])83 grants = KMSBackend.get().grants84 limit = data.get("Limit", 50)85 if "Marker" in data:86 markers = KMSBackend.get().markers87 filtered = markers.get(data["Marker"], [])88 else:89 filtered = [90 grant91 for grant in grants.values()92 if grant[KEY_ID] == data[KEY_ID]...
filter-if-present.py
Source:filter-if-present.py
...13ht = khmer.new_hashbits(K, HASHTABLE_SIZE, N_HT)14print 'loading mask from', sys.argv[1]15ht.consume_fasta(sys.argv[1])16print 'filtering', sys.argv[2]...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!