{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.11.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":99552,"databundleVersionId":13190393,"sourceType":"competition"}],"dockerImageVersionId":31089,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# Lasts\nimport shutil\nimport os\nfrom tqdm import tqdm","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-07-31T21:58:00.677759Z","iopub.execute_input":"2025-07-31T21:58:00.678068Z","iopub.status.idle":"2025-07-31T21:58:00.69971Z","shell.execute_reply.started":"2025-07-31T21:58:00.678041Z","shell.execute_reply":"2025-07-31T21:58:00.698796Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"source_path = '/kaggle/input/rsna-intracranial-aneurysm-detection/segmentations'\nfolders = os.listdir(source_path)[120:]\ndest_dir = '/kaggle/working/segmentations/'\nos.makedirs(dest_dir, exist_ok=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-07-31T21:58:00.700822Z","iopub.execute_input":"2025-07-31T21:58:00.701076Z","iopub.status.idle":"2025-07-31T21:58:00.751225Z","shell.execute_reply.started":"2025-07-31T21:58:00.701052Z","shell.execute_reply":"2025-07-31T21:58:00.750302Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"for folder in tqdm(folders):\n    src = os.path.join(source_path, folder)\n    dst = os.path.join(dest_dir, folder)\n    shutil.copytree(src, dst, dirs_exist_ok=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-07-31T21:58:00.75255Z","iopub.execute_input":"2025-07-31T21:58:00.752846Z","iopub.status.idle":"2025-07-31T22:00:40.686694Z","shell.execute_reply.started":"2025-07-31T21:58:00.752823Z","shell.execute_reply":"2025-07-31T22:00:40.685249Z"}},"outputs":[],"execution_count":null}]}