52136a7dda72978004f6af8e90e9ebe7596c27b8,examples/misc/image_thumbnail_sgskip.py,,,#,20

Before Change


if len(sys.argv) != 2:
    print("Usage: python %s IMAGEDIR" % __file__)
    raise SystemExit
indir = sys.argv[1]
if not os.path.isdir(indir):
    print("Could not find input directory "%s"" % indir)
    raise SystemExit

After Change


    sys.exit(f"Could not find input directory {args.imagedir}")

outdir = Path("thumbs")
outdir.mkdir(parents=True, exist_ok=True)

for path in args.imagedir.glob("*.png"):
    outpath = outdir / path.name
    fig = image.thumbnail(path, outpath, scale=0.15)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: matplotlib/matplotlib
Commit Name: 52136a7dda72978004f6af8e90e9ebe7596c27b8
Time: 2019-11-26
Author: anntzer.lee@gmail.com
File Name: examples/misc/image_thumbnail_sgskip.py
Class Name:
Method Name:


Project Name: hyperspy/hyperspy
Commit Name: 629167ee324a0b955ef46cd5a0cd7bb504ef8c44
Time: 2020-09-09
Author: tjof2@cam.ac.uk
File Name: hyperspy/misc/io/tools.py
Class Name:
Method Name: ensure_directory


Project Name: deepmipt/DeepPavlov
Commit Name: b552d0cb84cc02b40146982e926f56513c51cdaf
Time: 2020-11-10
Author: shuu01@gmail.com
File Name: deeppavlov/download.py
Class Name:
Method Name: download_resource