9bc517732374321e907a16a1f9ea2674a8251589,tools/make_transforms_docs.py,,,#,159

Before Change


if __name__ == "__main__":
    args = parse_args()
    command = args.command
    if command not in {"make", "check"}:
        raise ValueError(
            "You should provide a valid command: {{make|check}}. Got {command} instead.".format(command=command)
        )
    transforms_info = get_transforms_info()
    image_only_transforms = {transform: info for transform, info in transforms_info.items() if info["image_only"]}
    dual_transforms = {transform: info for transform, info in transforms_info.items() if not info["image_only"]}
    image_only_transforms_links = make_transforms_targets_links(image_only_transforms)
    dual_transforms_table = make_transforms_targets_table(
        dual_transforms, header=["Transform"] + [target.value for target in Targets]
    )
    if command == "make":
        print(image_only_transforms_links)
        print(dual_transforms_table)
    else:
        check_docs(args.filepath, image_only_transforms_links, dual_transforms_table)

After Change




if __name__ == "__main__":
    main()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: albu/albumentations
Commit Name: 9bc517732374321e907a16a1f9ea2674a8251589
Time: 2020-05-01
Author: dipetm@gmail.com
File Name: tools/make_transforms_docs.py
Class Name:
Method Name:


Project Name: stanfordnlp/stanza
Commit Name: 9cac004f43a74d77f8fdc3ad45bfc3cfcf300357
Time: 2020-11-27
Author: horatio@gmail.com
File Name: stanza/utils/prepare_mwt_treebank.py
Class Name:
Method Name: main


Project Name: stanfordnlp/stanza
Commit Name: 9cac004f43a74d77f8fdc3ad45bfc3cfcf300357
Time: 2020-11-27
Author: horatio@gmail.com
File Name: stanza/utils/prepare_tokenizer_treebank.py
Class Name:
Method Name: main