63ea9b2637ce8e478c854b68d8af7ca42e19abcf,iam/api-client/quickstart.py,,quickstart,#,18
Before Change
roles = response["roles"]
// Process the response
for role in roles:
print("Title: " + role["title"])
print("Name: " + role["name"])
if "description" in role:
print("Description: " + role["description"])
print("")
// [END iam_quickstart]
if __name__ == "__main__":
quickstart()
After Change
// Gets the project"s policy and prints all members with the "Log Writer" role.
policy = get_policy(crm_service, project_id)
binding = next(b for b in policy["bindings"] if b["role"] == role)
print(f"Role: {(binding["role"])}")
print("Members: ")
for m in binding["members"]:
print(f"[{m}]")
// Removes the member from the "Log Writer" role.
modify_policy_remove_member(crm_service, project_id, role, member)
def initialize_service():
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 63ea9b2637ce8e478c854b68d8af7ca42e19abcf
Time: 2020-09-22
Author: 35782177+melaniedejong@users.noreply.github.com
File Name: iam/api-client/quickstart.py
Class Name:
Method Name: quickstart
Project Name: nilmtk/nilmtk
Commit Name: 74c80d4f994c380f1baccd9d6651c233a22abf43
Time: 2015-11-25
Author: jack-list@xlk.org.uk
File Name: nilmtk/disaggregate/combinatorial_optimisation.py
Class Name: CombinatorialOptimisation
Method Name: train
Project Name: nilmtk/nilmtk
Commit Name: b523b464d8cafe29e352981c1c6df941f205592a
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: mean_normalized_error_power
Project Name: ellisdg/3DUnetCNN
Commit Name: acb627f8dbff7e334796bc5ee2d8bf10993ba6ba
Time: 2018-09-21
Author: david.ellis@unmc.edu
File Name: test/test_generator.py
Class Name: TestDataGenerator
Method Name: test_generator_with_permutations
Project Name: ANSSI-FR/SecuML
Commit Name: 39efccc696a1c20745a52cc50935cdc24f92230d
Time: 2019-05-09
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/classifiers/__init__.py
Class Name: Classifier
Method Name: _predict_streaming