6dea5616e673b6a71492175f4bc89b174ce05961,numerox/tournament.py,,tournament_str2int,#Any#,59

Before Change


    "Convert tournament name (as str) to tournament integer"
    if tournament_str not in TOURNAMENT_NAMES:
        raise ValueError("`tournament_str` name not recognized")
    return TOURNAMENT_NAMES[tournament_str]


def tournament_count():
    "Returns the number of tournaments as an integer"

After Change


    if tournament_str not in nx.tournament_names(active_only=False):
        raise ValueError("`tournament_str` name not recognized")
    for tourney in TOURNAMENTS:
        if tourney["name"] == tournament_str:
            return tourney["number"]
    raise RuntimeError("Did not find tournament number")


def tournament_count(active_only=True):
    "Returns the number of tournaments as an integer"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: kwgoodman/numerox
Commit Name: 6dea5616e673b6a71492175f4bc89b174ce05961
Time: 2019-03-07
Author: kwgoodman@gmail.com
File Name: numerox/tournament.py
Class Name:
Method Name: tournament_str2int


Project Name: pytorch/audio
Commit Name: 2fd32dd017c0332956e913bb08c20867bfbe3abe
Time: 2020-06-08
Author: 855818+mthrok@users.noreply.github.com
File Name: torchaudio/_backend.py
Class Name:
Method Name: _get_audio_backend_module


Project Name: facebookresearch/ParlAI
Commit Name: 7754695ccf3bd340a27e64604408105cb00d2501
Time: 2019-02-27
Author: edinan@fb.com
File Name: parlai/core/torch_ranker_agent.py
Class Name: TorchRankerAgent
Method Name: _find_match