63ea9b2637ce8e478c854b68d8af7ca42e19abcf,iam/api-client/quickstart.py,,quickstart,#,18

Before Change


    // Call the Cloud IAM Roles API
    // If using pylint, disable weak-typing warnings
    // pylint: disable=no-member
    response = service.roles().list().execute()
    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"])

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}]")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

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: biocore/scikit-bio
Commit Name: 70f6c672fa027c5328c1b0c92b51a750d31fed39
Time: 2016-05-06
Author: kestrel.gorlick@gmail.com
File Name: skbio/io/format/stockholm.py
Class Name: _MSAData
Method Name: add_gf_metadata


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 298bbc1b8623a34687bb3aeb183484a4423f5f13
Time: 2020-04-30
Author: billyjacobson@users.noreply.github.com
File Name: bigtable/metricscaler/metricscaler.py
Class Name:
Method Name: get_cpu_load


Project Name: pgmpy/pgmpy
Commit Name: c9ed2af699941168beb762546d11715ebb27b931
Time: 2015-07-09
Author: mailme.abinashpanda@gmail.com
File Name: pgmpy/models/ClusterGraph.py
Class Name: ClusterGraph
Method Name: get_factors