MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / main

Function main

data_processing/uncompress_data.py:17–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def main():
18
19 #argparse
20 parser = argparse.ArgumentParser(description='Uncompress dataset')
21 parser.add_argument('--dataset_zipped_path', required=True, help='Path to the difflocks folder containing all zip files')
22 parser.add_argument('--out_path', required=True, type=str, help='Where to output the difflocks dataset')
23 args = parser.parse_args()
24
25
26 in_path=args.dataset_zipped_path
27 onlyfiles = [f for f in listdir(in_path) if isfile(join(in_path, f))]
28 for file_name in onlyfiles:
29 filepath=os.path.join(in_path,file_name)
30 cmd=["7zz","x", "-y", filepath, "-o"+args.out_path]
31 # print("cmd",cmd)
32 subprocess.run(cmd, capture_output=False)
33 print("filename", file_name)
34
35
36if __name__ == '__main__':

Callers 1

uncompress_data.pyFile · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected