f9b010c181c3a4eee28d5e53d738afee4e837aaf,numerox/tournament.py,,tournament_int2str,#,47

Before Change


        raise ValueError("`tournament_int` must be greater than 0")
    if tournament_int > 7:
        raise ValueError("`tournament_int` must be less than 8")
    return TOURNAMENT_NAMES[tournament_int - 1]


def tournament_str2int(tournament_str):
    "Convert tournament name (as str) to tournament integer"

After Change


    if tournament_int not in TOURNAMENT_NAMES.values():
        raise ValueError("`tournament_int` not recognized")
    for name in TOURNAMENT_NAMES:
        if TOURNAMENT_NAMES[name] == tournament_int:
            return name
    raise RuntimeError("Did not find tournament name")


def tournament_str2int(tournament_str):
    "Convert tournament name (as str) to tournament integer"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: kwgoodman/numerox
Commit Name: f9b010c181c3a4eee28d5e53d738afee4e837aaf
Time: 2018-12-17
Author: kwgoodman@gmail.com
File Name: numerox/tournament.py
Class Name:
Method Name: tournament_int2str


Project Name: grrrr/nsgt
Commit Name: 523a62159f0324438901e9716b593775ec4c5c10
Time: 2012-08-31
Author: gr@grrrr.org
File Name: nsgt/nsigtf.py
Class Name:
Method Name: nsigtf_sl


Project Name: grrrr/nsgt
Commit Name: 523a62159f0324438901e9716b593775ec4c5c10
Time: 2012-08-31
Author: gr@grrrr.org
File Name: nsgt/nsgtf.py
Class Name:
Method Name: nsgtf_sl


Project Name: IDSIA/sacred
Commit Name: 958e50b6eddf4fe101cdd8aabf755e8843256b37
Time: 2016-12-01
Author: qwlouse@gmail.com
File Name: sacred/experiment.py
Class Name: Experiment
Method Name: __init__


Project Name: pfnet/optuna
Commit Name: b2a87d8aac1c0cce59ea70d6a57522cbc973ad34
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: examples/pytorch_distributed_simple.py
Class Name:
Method Name: