5ac177662e054b9b8f4ad95fc9053561cc69a6a8,floydker/src/floydker/utils.py,,gen_target_env_from_tag,#Any#,124

Before Change


    sample input: "tensorflow:1.0.1-gpu-py3"
    sample output: ("1.0.1", "py3.gpu")
    
    img_commit = img_tag.split(":")[-1]
    version, target = img_commit.split("-", 1)
    target = ".".join(reversed(target.split("-", 1)))
    return version, target

After Change


    sample input: "tensorflow:1.0.1-gpu-py3_aws"
    sample output: ("1.0.1", "py3.gpu_aws")
    
    match = docker_tag_re.match(img_tag)
    if not match:
        return None, None
    target_env = match.group("env")
    if match.group("arch"):
        target_env += "." + match.group("arch")
    if match.group("cloud"):
        target_env += "_" + match.group("cloud")
    return match.group("version"), target_env
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: floydhub/dockerfiles
Commit Name: 5ac177662e054b9b8f4ad95fc9053561cc69a6a8
Time: 2017-06-20
Author: dave2008713@gmail.com
File Name: floydker/src/floydker/utils.py
Class Name:
Method Name: gen_target_env_from_tag


Project Name: floydhub/dockerfiles
Commit Name: 5ac177662e054b9b8f4ad95fc9053561cc69a6a8
Time: 2017-06-20
Author: dave2008713@gmail.com
File Name: floydker/src/floydker/utils.py
Class Name:
Method Name: gen_target_env_from_tag


Project Name: eth-cscs/reframe
Commit Name: 2e180b4eda979e3455df916c89cb0295370fc7d7
Time: 2018-06-07
Author: rafael.sarmiento@cscs.ch
File Name: reframe/utility/versioning.py
Class Name: _RelationalValidator
Method Name: __init__


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 32dd1ac4e1d44382f481d0e4e22a81cbb5a66510
Time: 2015-08-13
Author: nlavine@google.com
File Name: perfkitbenchmarker/benchmarks/fio_benchmark.py
Class Name:
Method Name: GetIODepths