summaryrefslogtreecommitdiff
path: root/crop-thirds.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-09 23:12:19 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-09 23:12:19 +0100
commit333a743e278dac3f0997bad1b6480ecbceb1d71c (patch)
tree854c2b5ecedb0cf495526e96b1796a8674d76cb0 /crop-thirds.py
parentfd022cafdc8a782e00bdb91fb2afb3f4d7893fec (diff)
uprez thirds
Diffstat (limited to 'crop-thirds.py')
-rw-r--r--crop-thirds.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/crop-thirds.py b/crop-thirds.py
index fddba9d..96653a3 100644
--- a/crop-thirds.py
+++ b/crop-thirds.py
@@ -60,7 +60,8 @@ for i in range(opt.count):
if x < 0:
x = 0
crops.append((x, y0, w, y0 + crop_height + y_margin + y_margin,))
- path = os.path.join(out_path, chr(97 + i))
+ letter = chr(97 + i)
+ path = os.path.join(out_path, letter)
os.makedirs(path)
paths.append(path)
@@ -87,22 +88,3 @@ def build_thumbnail(i, fn):
chunksize = 3
with Pool(processes=cpu_count()) as pool:
pool.starmap(build_thumbnail, dataset, chunksize)
-
-# if opt.folder_id > 0:
-# endpoint = os.getenv('API_REMOTE') + '/api/file/'
-# for label in labels:
-# subprocess.call([
-# "curl",
-# "-X", "POST",
-# "-d", "folder_id={}".format(opt.folder_id),
-# "-d", "module=pix2pixhd",
-# "-d", "name={}.mov".format(label),
-# "-d", "url=https://s3.amazonaws.com/i.asdf.us/cortex/lens/data/{}/{}.mov".format(opt.folder_id, label),
-# "-d", "dataset={}".format(label),
-# "-d", "activity=splice",
-# "-d", "generated=0",
-# "-d", "processed=1",
-# "-d", "datatype=video",
-# endpoint
-# ])
-