8f559736769f60f2b8ae6937d60a7a65e3b6024a,oneoffs/oneoff_utils.py,,parse_sgf,#Any#,24

Before Change


    with open(sgf_path) as f:
        sgf_contents = f.read()

    collection = sgf.parse(sgf_contents)
    game = collection.children[0]
    props = game.root.properties
    assert int(sgf_prop_get(props, "GM", "1")) == 1, "Not a Go SGF!"

    result = parse_game_result(sgf_prop_get(props, "RE", ""))

    positions, moves = zip(*[(p.position, p.next_move)
                             for p in replay_sgf(sgf_contents)])
    return positions, moves, result, props


def check_year(props, year):
    if year is None:

After Change


    with open(sgf_path) as f:
        sgf_contents = f.read()

    return zip(*[(p.position, p.next_move, p.result)
                 for p in sgf_wrapper.replay_sgf(sgf_contents)])


def check_year(props, year):
    if year is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: tensorflow/minigo
Commit Name: 8f559736769f60f2b8ae6937d60a7a65e3b6024a
Time: 2018-04-05
Author: braintwo@gmail.com
File Name: oneoffs/oneoff_utils.py
Class Name:
Method Name: parse_sgf


Project Name: pantsbuild/pants
Commit Name: 9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/pylint/rules_integration_test.py
Class Name: PylintIntegrationTest
Method Name: make_target_with_origin


Project Name: pantsbuild/pants
Commit Name: 924b78c5a75ef2e0fd7a3640f8c2ec82c9c9f657
Time: 2016-10-07
Author: yujieproject@gmail.com
File Name: src/python/pants/build_graph/target_scopes.py
Class Name: ScopedDependencyFactory
Method Name: __call__


Project Name: snipsco/snips-nlu
Commit Name: 9cecc52e1fbf8b281d88244f6c43d2b76e374993
Time: 2018-02-07
Author: adrien.ball@snips.net
File Name: snips_nlu/nlu_engine/nlu_engine.py
Class Name: SnipsNLUEngine
Method Name: parse