3a5a090b231a67b6531cc2da3c40ee4dc34801c2,keras/utils/io_utils.py,,ask_to_proceed_with_overwrite,#Any#,135

Before Change


        True if we can proceed with overwrite, False otherwise.
    
    get_input = input
    if sys.version_info[:2] <= (2, 7):
        get_input = raw_input
    overwrite = get_input("[WARNING] %s already exists - overwrite? "
                          "[y/n]" % (filepath))
    while overwrite not in ["y", "n"]:
        overwrite = get_input("Enter "y" (overwrite) or "n" (cancel).")

After Change


    overwrite = six.moves.input("[WARNING] %s already exists - overwrite? "
                                "[y/n]" % (filepath)).strip().lower()
    while overwrite not in ("y", "n"):
        overwrite = six.moves.input("Enter "y" (overwrite) or "n" "
                                    "(cancel).").strip().lower()
    if overwrite == "n":
        return False
    print("[TIP] Next time specify overwrite=True!")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: keras-team/keras
Commit Name: 3a5a090b231a67b6531cc2da3c40ee4dc34801c2
Time: 2018-02-02
Author: cclauss@bluewin.ch
File Name: keras/utils/io_utils.py
Class Name:
Method Name: ask_to_proceed_with_overwrite


Project Name: NervanaSystems/nlp-architect
Commit Name: 794bd558da80b65713b51a964ec61e7ef36d4bf2
Time: 2018-05-14
Author: peteriz@users.noreply.github.com
File Name: examples/intent_extraction/interactive.py
Class Name:
Method Name:


Project Name: deeppomf/DeepCreamPy
Commit Name: 569305e77b02632e215ef9df99de87dc6da8879b
Time: 2019-04-22
Author: 46418312+ccppoo@users.noreply.github.com
File Name: decensor.py
Class Name: Decensor
Method Name: decensor_all_images_in_folder