{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":76728,"databundleVersionId":9057646,"sourceType":"competition"}],"dockerImageVersionId":30761,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\nimport shutil\nfrom IPython.display import FileLink","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-09-16T10:56:41.564176Z","iopub.execute_input":"2024-09-16T10:56:41.564862Z","iopub.status.idle":"2024-09-16T10:56:41.571603Z","shell.execute_reply.started":"2024-09-16T10:56:41.564809Z","shell.execute_reply":"2024-09-16T10:56:41.570057Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"directory = '/kaggle/input/playground-series-s4e9'\n\nall_entries = os.listdir(directory)\n\nfile_names = [entry for entry in all_entries if os.path.isfile(os.path.join(directory, entry))]\n\nprint(file_names)","metadata":{"execution":{"iopub.status.busy":"2024-09-16T10:56:41.574259Z","iopub.execute_input":"2024-09-16T10:56:41.574711Z","iopub.status.idle":"2024-09-16T10:56:41.590521Z","shell.execute_reply.started":"2024-09-16T10:56:41.574666Z","shell.execute_reply":"2024-09-16T10:56:41.588936Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dst_dir = '/kaggle/working/dataset'\n\nos.makedirs(dst_dir, exist_ok=True)\n\nfor file_name in file_names:\n    src_file_path = os.path.join(directory, file_name)\n    dst_file_path = os.path.join(dst_dir, file_name)\n    \n    shutil.copy(src_file_path, dst_file_path)","metadata":{"execution":{"iopub.status.busy":"2024-09-16T10:56:41.592130Z","iopub.execute_input":"2024-09-16T10:56:41.592578Z","iopub.status.idle":"2024-09-16T10:56:41.698125Z","shell.execute_reply.started":"2024-09-16T10:56:41.592536Z","shell.execute_reply":"2024-09-16T10:56:41.696830Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!zip -r dataset.zip /kaggle/working/dataset","metadata":{"execution":{"iopub.status.busy":"2024-09-16T10:56:41.701803Z","iopub.execute_input":"2024-09-16T10:56:41.702472Z","iopub.status.idle":"2024-09-16T10:56:44.564085Z","shell.execute_reply.started":"2024-09-16T10:56:41.702393Z","shell.execute_reply":"2024-09-16T10:56:44.562753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"FileLink(r'dataset.zip')","metadata":{"execution":{"iopub.status.busy":"2024-09-16T10:56:44.566289Z","iopub.execute_input":"2024-09-16T10:56:44.566848Z","iopub.status.idle":"2024-09-16T10:56:44.577570Z","shell.execute_reply.started":"2024-09-16T10:56:44.566787Z","shell.execute_reply":"2024-09-16T10:56:44.576064Z"},"trusted":true},"execution_count":null,"outputs":[]}]}