MCPcopy Create free account
hub / github.com/fogleman/primitive / create_jobs

Function create_jobs

scripts/process.py:20–34  ·  view source on GitHub ↗
(in_folder, out_folder, n, a, m)

Source from the content-addressed store, hash-verified

18 subprocess.call(cmd, shell=True)
19
20def create_jobs(in_folder, out_folder, n, a, m):
21 result = []
22 for name in os.listdir(in_folder):
23 base, ext = os.path.splitext(name)
24 if ext.lower() not in ['.jpg', '.jpeg', '.png']:
25 continue
26 out_name = '%d.%%d.png' % (m)
27 in_path = os.path.join(in_folder, name)
28 out_path = os.path.join(out_folder, base, out_name)
29 if os.path.exists(out_path):
30 continue
31 key = (base, n, m)
32 args = (in_path, out_path, n, a, m)
33 result.append((key, args))
34 return result
35
36def worker(jobs, done):
37 while True:

Callers 1

processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…