52136a7dda72978004f6af8e90e9ebe7596c27b8,examples/misc/image_thumbnail_sgskip.py,,,#,20
Before Change
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
outdir = "thumbs"
if not os.path.exists(outdir):
os.makedirs(outdir)
for fname in glob.glob(os.path.join(indir, "*.png")):
basedir, basename = os.path.split(fname)
outfile = os.path.join(outdir, basename)
fig = image.thumbnail(fname, outfile, scale=0.15)
print("saved thumbnail of %s to %s" % (fname, outfile))
After Change
for path in args.imagedir.glob("*.png"):
outpath = outdir / path.name
fig = image.thumbnail(path, outpath, scale=0.15)
print(f"saved thumbnail of {path} to {outpath}")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: 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: vatlab/SoS
Commit Name: 7eb019d10d9a603e5f2b29300fa2d811e197d529
Time: 2017-02-10
Author: bpeng@mdanderson.org
File Name: sos/__main__.py
Class Name:
Method Name: cmd_remove
Project Name: Shawn1993/cnn-text-classification-pytorch
Commit Name: 8dce7f2abeb2223ecad036c7ffff3480981657fb
Time: 2017-11-22
Author: pengxiaoping1993@gmail.com
File Name: train.py
Class Name:
Method Name: train