{"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":4117,"databundleVersionId":46665,"sourceType":"competition"}],"dockerImageVersionId":31090,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\n\n# DATA_DIR = \"/kaggle/input/malware-classification/\"\n\nprint(os.listdir(\"/kaggle/input/malware-classification/\"))","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:31:31.110309Z","iopub.execute_input":"2025-09-09T15:31:31.110579Z","iopub.status.idle":"2025-09-09T15:31:31.116111Z","shell.execute_reply.started":"2025-09-09T15:31:31.110554Z","shell.execute_reply":"2025-09-09T15:31:31.115531Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!apt-get install -y p7zip-full\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:31:34.488170Z","iopub.execute_input":"2025-09-09T15:31:34.488759Z","iopub.status.idle":"2025-09-09T15:31:36.623761Z","shell.execute_reply.started":"2025-09-09T15:31:34.488726Z","shell.execute_reply":"2025-09-09T15:31:36.622884Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!mkdir -p /kaggle/working/sampleData\n!7z e /kaggle/input/malware-classification/dataSample.7z -o/kaggle/working/sampleData","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:33:04.398059Z","iopub.execute_input":"2025-09-09T15:33:04.398844Z","iopub.status.idle":"2025-09-09T15:33:05.184759Z","shell.execute_reply.started":"2025-09-09T15:33:04.398813Z","shell.execute_reply":"2025-09-09T15:33:05.183623Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(os.listdir(\"/kaggle/working/sampleData\")[:10])\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:33:31.162628Z","iopub.execute_input":"2025-09-09T15:33:31.162898Z","iopub.status.idle":"2025-09-09T15:33:31.167893Z","shell.execute_reply.started":"2025-09-09T15:33:31.162873Z","shell.execute_reply":"2025-09-09T15:33:31.167224Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import pandas as pd\n\nlabels = pd.read_csv(\"/kaggle/input/malware-classification/trainLabels.csv\")\nprint(labels.head())\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:34:01.124905Z","iopub.execute_input":"2025-09-09T15:34:01.125622Z","iopub.status.idle":"2025-09-09T15:34:01.427788Z","shell.execute_reply.started":"2025-09-09T15:34:01.125595Z","shell.execute_reply":"2025-09-09T15:34:01.427187Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import os\n\nbytes_files = [f for f in os.listdir(\"/kaggle/working/sampleData\") if f.endswith(\".bytes\")]\nprint(\"Found\", len(bytes_files), \"bytes files\")\nprint(bytes_files[:5])\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:34:28.635461Z","iopub.execute_input":"2025-09-09T15:34:28.635713Z","iopub.status.idle":"2025-09-09T15:34:28.640352Z","shell.execute_reply.started":"2025-09-09T15:34:28.635694Z","shell.execute_reply":"2025-09-09T15:34:28.639779Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"sample_path = \"/kaggle/working/sampleData/\" + bytes_files[0]\n\nwith open(sample_path, \"r\") as f:\n    lines = f.readlines()[:10]  # read first 10 lines\n\nfor l in lines:\n    print(l.strip())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-09-09T15:34:58.184209Z","iopub.execute_input":"2025-09-09T15:34:58.184485Z","iopub.status.idle":"2025-09-09T15:34:58.213479Z","shell.execute_reply.started":"2025-09-09T15:34:58.184465Z","shell.execute_reply":"2025-09-09T15:34:58.212902Z"}},"outputs":[],"execution_count":null}]}