{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":117682,"databundleVersionId":15062069,"sourceType":"competition"},{"sourceId":14591369,"sourceType":"datasetVersion","datasetId":9276509}],"dockerImageVersionId":31259,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\n# import os\n# for dirname, _, filenames in os.walk('/kaggle/input'):\n#     for filename in filenames:\n#         print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2026-01-28T19:06:24.627588Z","iopub.execute_input":"2026-01-28T19:06:24.627816Z","iopub.status.idle":"2026-01-28T19:06:25.703250Z","shell.execute_reply.started":"2026-01-28T19:06:24.627794Z","shell.execute_reply":"2026-01-28T19:06:25.702701Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"This is test (vibe coding) fir PIX2PIX . All credits go tho PIX2PIX authors.\nI've used default resolution i order to see if has an impact on training results.\n\nAt a first glance: smaller is better. 400-5000 random samples vs full dataset. ","metadata":{}},{"cell_type":"markdown","source":"# Test for resnet_9blocks --netD pixel","metadata":{}},{"cell_type":"code","source":"import os\nimport random\nimport glob\nimport subprocess\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport numpy as np\nimport re\nimport time\n\n# --- SCALE CONFIGURATION ---\nDATASET_ROOT = '/kaggle/input/vesuvius-image-slices/single_channel_data/train/'\nPOC_DIR = '/kaggle/working/datasets/vesuvius_large'\nMODEL_NAME = 'vesuvius_pix2pix_2k'\nTRAIN_SIZE = 20000  \nTEST_SIZE = 20     \n\ndef initialize_environment():\n    print(\"--- 0. Initializing Environment ---\")\n    repo_dir = \"pytorch-CycleGAN-and-pix2pix\"\n    if not os.path.exists(repo_dir):\n        subprocess.run([\"git\", \"clone\", \"https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix\"], check=True)\n    os.chdir(repo_dir)\n    subprocess.run([\"pip\", \"-q\", \"install\", \"dominate\"], check=True)\n\ndef setup_large_dataset():\n    print(f\"\\n--- 1. Preparing Large Dataset ({TRAIN_SIZE} files) ---\")\n    base_poc = os.path.abspath(POC_DIR)\n    if os.path.exists(base_poc):\n        import shutil\n        shutil.rmtree(base_poc)\n        \n    for folder in ['train', 'test']:\n        os.makedirs(os.path.join(base_poc, folder), exist_ok=True)\n\n    all_images = glob.glob(os.path.join(DATASET_ROOT, '*.png'))\n    random.shuffle(all_images)\n    \n    # Cap at TRAIN_SIZE or total available\n    actual_train_size = min(TRAIN_SIZE, len(all_images) - TEST_SIZE)\n    \n    for img in all_images[:actual_train_size]:\n        os.symlink(img, os.path.join(base_poc, 'train', os.path.basename(img)))\n    for img in all_images[actual_train_size:actual_train_size+TEST_SIZE]:\n        os.symlink(img, os.path.join(base_poc, 'test', os.path.basename(img)))\n    print(f\"✅ Dataset Prepared. Train: {actual_train_size}, Test: {TEST_SIZE}\")\n\ndef run_large_training():\n    print(f\"\\n--- 2. Starting Large-Scale Training ---\")\n    # Using 3 epochs + 3 decay epochs for a total of 6 passes over 2000 images.\n    # This should stay within Kaggle time limits while providing deep learning.\n    cmd = (\n        f\"python train.py \"\n        f\"--dataroot {os.path.abspath(POC_DIR)} \"\n        f\"--name {MODEL_NAME} \"\n        f\"--model pix2pix \"\n        f\"--direction BtoA \"\n        f\"--netG resnet_9blocks \"\n        f\"--input_nc 3 --output_nc 3 \"\n        f\"--load_size 128 --crop_size 128 \"\n        f\"--batch_size 16 \"  # Increased batch size for faster processing on GPU\n        f\"--n_epochs 20 \"       \n        f\"--n_epochs_decay 3 \" \n        f\"--save_epoch_freq 1 \"\n        f\"--no_html\"\n    )\n    os.system(cmd)\n\ndef plot_loss():\n    print(f\"\\n--- 3. Plotting Final Convergence ---\")\n    log_path = f'checkpoints/{MODEL_NAME}/loss_log.txt'\n    if not os.path.exists(log_path): return\n\n    losses = {'G_GAN': [], 'G_L1': [], 'D_real': [], 'D_fake': []}\n    with open(log_path, 'r') as f:\n        for line in f:\n            for key in losses.keys():\n                match = re.search(fr'{key}: ([\\d\\.]+)', line)\n                if match: losses[key].append(float(match.group(1)))\n\n    if losses['G_GAN']:\n        fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))\n        ax1.plot(losses['G_GAN'], label='GAN (Realism)'); ax1.plot(losses['G_L1'], label='L1 (Ink Match)')\n        ax1.set_title('Generator Losses'); ax1.legend()\n        ax2.plot(losses['D_real'], label='D_Real'); ax2.plot(losses['D_fake'], label='D_Fake')\n        ax2.set_title('Discriminator Accuracy'); ax2.legend()\n        plt.show()\n\ndef run_test_and_visualize():\n    print(f\"\\n--- 4. Final Visual Results ---\")\n    cmd_test = (\n        f\"python test.py \"\n        f\"--dataroot {os.path.abspath(POC_DIR)} \"\n        f\"--name {MODEL_NAME} \"\n        f\"--model pix2pix \"\n        f\"--direction BtoA \"\n        f\"--netG resnet_9blocks \"\n        f\"--input_nc 3 --output_nc 3 \"\n        f\"--load_size 128 --crop_size 128 \"\n        f\"--num_test 10\"\n    )\n    os.system(cmd_test)\n\n    res_path = f'results/{MODEL_NAME}/test_latest/images/'\n    fakes = sorted(glob.glob(os.path.join(res_path, '*_fake_B.png')))\n    reals_in = sorted(glob.glob(os.path.join(res_path, '*_real_B.png')))\n    reals_tar = sorted(glob.glob(os.path.join(res_path, '*_real_A.png')))\n\n    if fakes:\n        num_display = min(len(fakes), 5)\n        fig, axes = plt.subplots(num_display, 3, figsize=(15, 4 * num_display))\n        for i in range(num_display):\n            axes[i, 0].imshow(Image.open(reals_tar[i]))\n            axes[i, 0].set_title(\"X-ray Input\")\n            axes[i, 1].imshow(Image.open(reals_in[i]))\n            axes[i, 1].set_title(\"Target (Ink=Red)\")\n            axes[i, 2].imshow(Image.open(fakes[i]))\n            axes[i, 2].set_title(\"Predicted Ink\")\n            for ax in axes[i]: ax.axis('off')\n        plt.tight_layout()\n        plt.show()\n\nif __name__ == \"__main__\":\n    initialize_environment()\n    setup_large_dataset()\n    run_large_training()\n    plot_loss()\n    run_test_and_visualize()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-01-29T20:23:26.811744Z","iopub.execute_input":"2026-01-29T20:23:26.812004Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"Test for unet_256 ","metadata":{}},{"cell_type":"code","source":"1+2","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-01-28T19:06:49.821485Z","iopub.execute_input":"2026-01-28T19:06:49.821912Z","iopub.status.idle":"2026-01-28T19:06:49.840986Z","shell.execute_reply.started":"2026-01-28T19:06:49.821886Z","shell.execute_reply":"2026-01-28T19:06:49.840256Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# test for unet_256","metadata":{}},{"cell_type":"code","source":"import os\nimport random\nimport glob\nimport subprocess\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport numpy as np\nimport re\nimport time\n\n# --- CONFIGURATION ---\nDATASET_ROOT = '/kaggle/input/vesuvius-image-slices/single_channel_data/train/'\nPOC_DIR = '/kaggle/working/datasets/vesuvius_unet_4k'\nMODEL_NAME = 'vesuvius_unet_v4'\nTRAIN_SIZE = 8000  \nTEST_SIZE = 30     \n\ndef initialize_environment():\n    print(\"--- 0. Initializing Environment ---\")\n    repo_dir = \"pytorch-CycleGAN-and-pix2pix\"\n    if not os.path.exists(repo_dir):\n        subprocess.run([\"git\", \"clone\", \"https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix\"], check=True)\n    os.chdir(repo_dir)\n    subprocess.run([\"pip\", \"-q\", \"install\", \"dominate\"], check=True)\n\ndef setup_filtered_dataset():\n    print(f\"\\n--- 1. Filtering & Preparing 4K Dataset ---\")\n    base_poc = os.path.abspath(POC_DIR)\n    if os.path.exists(base_poc):\n        import shutil\n        shutil.rmtree(base_poc)\n    for folder in ['train', 'test']:\n        os.makedirs(os.path.join(base_poc, folder), exist_ok=True)\n\n    all_images = glob.glob(os.path.join(DATASET_ROOT, '*.png'))\n    random.shuffle(all_images)\n    \n    # Filter: Only keep images where Red (Ink) exists\n    # This prevents the model from being overwhelmed by 'Blue' unlabeled space\n    filtered_train = []\n    print(\"Scanning for ink-heavy samples...\")\n    for img_path in all_images:\n        img = Image.open(img_path)\n        # Check the left half (Ground Truth) for Red pixels\n        gt_part = np.array(img.crop((0, 0, img.size[0]//2, img.size[1])))\n        if np.sum(gt_part[:,:,0] > 150) > 50: # More than 50 red pixels\n            filtered_train.append(img_path)\n        if len(filtered_train) >= TRAIN_SIZE + TEST_SIZE:\n            break\n            \n    random.shuffle(filtered_train)\n    for img in filtered_train[:TRAIN_SIZE]:\n        os.symlink(img, os.path.join(base_poc, 'train', os.path.basename(img)))\n    for img in filtered_train[TRAIN_SIZE:]:\n        os.symlink(img, os.path.join(base_poc, 'test', os.path.basename(img)))\n    print(f\"✅ Created dataset with {len(filtered_train[:TRAIN_SIZE])} ink-rich samples.\")\n\ndef run_unet_training():\n    print(f\"\\n--- 2. Starting U-Net Training ---\")\n    # netG: unet_256 for better pixel-level segmentation\n    # batch_size: 16 (safe for Kaggle T4/P100)\n    # lr: 0.0001 for finer convergence\n    cmd = (\n        f\"python train.py \"\n        f\"--dataroot {os.path.abspath(POC_DIR)} \"\n        f\"--name {MODEL_NAME} \"\n        f\"--model pix2pix \"\n        f\"--direction BtoA \"\n        f\"--netG unet_256 \"      \n        f\"--dataset_mode aligned \"\n        f\"--norm batch \"\n        f\"--load_size 256 \"      \n        f\"--crop_size 256 \"      \n        f\"--batch_size 16 \"      \n        f\"--lr 0.0001 \"          \n        f\"--n_epochs 9 \"         \n        f\"--n_epochs_decay 7 \"   \n        f\"--save_epoch_freq 2 \"\n        f\"--no_html\"\n    )\n    os.system(cmd)\n\ndef plot_training_results():\n    log_path = f'checkpoints/{MODEL_NAME}/loss_log.txt'\n    if not os.path.exists(log_path): return\n    \n    metrics = {'G_GAN': [], 'G_L1': [], 'D_real': [], 'D_fake': []}\n    with open(log_path, 'r') as f:\n        for line in f:\n            for key in metrics.keys():\n                match = re.search(fr'{key}: ([\\d\\.]+)', line)\n                if match: metrics[key].append(float(match.group(1)))\n    \n    fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 5))\n    ax1.plot(metrics['G_L1'], color='orange', label='L1 (Ink Reconstruction)')\n    ax1.set_title('Ink Detection Accuracy'); ax1.legend()\n    ax2.plot(metrics['D_real'], label='D_Real'); ax2.plot(metrics['D_fake'], label='D_Fake')\n    ax2.set_title('Discriminator Stability'); ax2.legend()\n    plt.show()\n\ndef visualize_cleaned_ink():\n    print(f\"\\n--- 4. Visualizing Cleaned Ink Results ---\")\n    cmd_test = f\"python test.py --dataroot {os.path.abspath(POC_DIR)} --name {MODEL_NAME} --model pix2pix --direction BtoA --netG unet_256 --num_test 10\"\n    os.system(cmd_test)\n\n    res_path = f'results/{MODEL_NAME}/test_latest/images/'\n    fakes = sorted(glob.glob(os.path.join(res_path, '*_fake_B.png')))\n    reals_tar = sorted(glob.glob(os.path.join(res_path, '*_real_A.png')))\n\n    num = min(len(fakes), 5)\n    fig, axes = plt.subplots(num, 3, figsize=(18, 5 * num))\n    \n    for i in range(num):\n        # 1. Ground Truth\n        axes[i, 0].imshow(Image.open(reals_tar[i]))\n        axes[i, 0].set_title(\"Ground Truth (Ink)\")\n        \n        # 2. Raw Prediction (With Blue haze)\n        pred_img = Image.open(fakes[i])\n        axes[i, 1].imshow(pred_img)\n        axes[i, 1].set_title(\"Raw Model Prediction\")\n        \n        # 3. Cleaned Ink (Thresholded Red Channel)\n        pred_arr = np.array(pred_img)\n        red_channel = pred_arr[:,:,0]\n        # Binary threshold: remove everything below 130 intensity\n        cleaned = np.where(red_channel > 130, 255, 0).astype(np.uint8)\n        \n        axes[i, 2].imshow(cleaned, cmap='Reds')\n        axes[i, 2].set_title(\"Cleaned Ink Signal\")\n        \n        for ax in axes[i]: ax.axis('off')\n    plt.tight_layout()\n    plt.show()\n\nif __name__ == \"__main__\":\n    initialize_environment()\n    setup_filtered_dataset()\n    run_unet_training()\n    plot_training_results()\n    visualize_cleaned_ink()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-01-28T19:37:26.128886Z","iopub.execute_input":"2026-01-28T19:37:26.129180Z","iopub.status.idle":"2026-01-28T20:15:20.205330Z","shell.execute_reply.started":"2026-01-28T19:37:26.129157Z","shell.execute_reply":"2026-01-28T20:15:20.204495Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"treat blue mask different\n\nThe \"Blue\" Confusion:During Filtering: It skips patches that are mostly blue space.During Visualization: It extracts the blue channel from the original label to create a binary mask. It then \"multiplies\" your model's prediction by the inverse of that mask. This ensures the model isn't penalized (and you aren't misled) by noise appearing in unlabeled regions.Fine-Tuning Control: You can now easily adjust LEARNING_RATE and EPOCHS_DECAY. For Vesuvius, a long decay period often helps the model distinguish between the \"crackle\" of the papyrus and the actual \"ink\" signal.Four-Column Insight:Col 1: Shows what the model \"sees.\"Col 2: Shows the complex RGB label (Red=Ink, Blue=Void).Col 3: Shows the raw \"hallucination\" of the model.Col 4: Shows the scientifically relevant binary mask with an IoU (Intersection over Union) score.The IoU is calculated as:$$\\text{IoU} = \\frac{\\text{Area of Overlap}}{\\text{Area of Union}}","metadata":{}},{"cell_type":"code","source":"import os\nimport random\nimport glob\nimport subprocess\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport numpy as np\nimport shutil\n\n# --- 1. GLOBAL CONFIGURATION ---\nDATASET_ROOT = '/kaggle/input/vesuvius-image-slices/single_channel_data/train/'\nPOC_DIR = '/kaggle/working/datasets/vesuvius_unet_4k'\nMODEL_NAME = 'vesuvius_unet_v4_finetuned'\n\n# Fine-Tuning Hyperparameters\nTRAIN_SIZE = 8000   \nTEST_SIZE = 30\nLEARNING_RATE = 0.0001   \nBATCH_SIZE = 16          \nNET_G = 'unet_256'       \nEPOCHS_STABLE = 10       \nEPOCHS_DECAY = 10        \n\n# Blue Mask / Filtering Logic\nMAX_BLUE_RATIO = 0.4     \nINK_THRESHOLD = 150      \nBLUE_THRESHOLD = 150     \n\ndef initialize_environment():\n    print(\"--- 0. Initializing Environment ---\")\n    repo_dir = \"pytorch-CycleGAN-and-pix2pix\"\n    if not os.path.exists(repo_dir):\n        subprocess.run([\"git\", \"clone\", \"https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix\"], check=True)\n    \n    subprocess.run([\"pip\", \"-q\", \"install\", \"dominate\"], check=True)\n    # Ensure we are in the correct directory for the scripts\n    if os.getcwd().split('/')[-1] != repo_dir:\n        os.chdir(repo_dir)\n\ndef setup_filtered_dataset():\n    print(f\"\\n--- 1. Filtering Dataset (Targeting Ink, Avoiding Blue Void) ---\")\n    base_poc = os.path.abspath(POC_DIR)\n    if os.path.exists(base_poc):\n        shutil.rmtree(base_poc)\n    for folder in ['train', 'test']:\n        os.makedirs(os.path.join(base_poc, folder), exist_ok=True)\n\n    all_images = glob.glob(os.path.join(DATASET_ROOT, '*.png'))\n    random.shuffle(all_images)\n    \n    filtered_list = []\n    print(\"Scanning images for quality patches...\")\n    \n    for img_path in all_images:\n        with Image.open(img_path) as img:\n            gt_part = np.array(img.crop((0, 0, img.size[0]//2, img.size[1])))\n            ink_pixels = np.sum(gt_part[:,:,0] > INK_THRESHOLD)\n            blue_ratio = np.mean(gt_part[:,:,2] > BLUE_THRESHOLD)\n            \n            if ink_pixels > 50 and blue_ratio < MAX_BLUE_RATIO:\n                filtered_list.append(img_path)\n        \n        if len(filtered_list) >= TRAIN_SIZE + TEST_SIZE:\n            break\n            \n    for i, img in enumerate(filtered_list):\n        subset = 'train' if i < TRAIN_SIZE else 'test'\n        os.symlink(img, os.path.join(base_poc, subset, os.path.basename(img)))\n    \n    print(f\"✅ Created dataset: {len(filtered_list)} samples total.\")\n\ndef run_unet_training():\n    print(f\"\\n--- 2. Starting U-Net Training ---\")\n    # Removed --display_id 0 as it was causing the \"unrecognized argument\" error\n    cmd = [\n        \"python\", \"train.py\",\n        \"--dataroot\", os.path.abspath(POC_DIR),\n        \"--name\", MODEL_NAME,\n        \"--model\", \"pix2pix\",\n        \"--direction\", \"BtoA\",\n        \"--netG\", NET_G,\n        \"--dataset_mode\", \"aligned\",\n        \"--norm\", \"batch\",\n        \"--load_size\", \"256\",\n        \"--crop_size\", \"256\",\n        \"--batch_size\", str(BATCH_SIZE),\n        \"--lr\", str(LEARNING_RATE),\n        \"--n_epochs\", str(EPOCHS_STABLE),\n        \"--n_epochs_decay\", str(EPOCHS_DECAY),\n        \"--no_html\",        # Keeps the output clean\n        \"--display_freq\", \"1000\" # Reduces overhead\n    ]\n    subprocess.run(cmd)\n\ndef calculate_iou(target, prediction):\n    intersection = np.logical_and(target, prediction)\n    union = np.logical_or(target, prediction)\n    if np.sum(union) == 0: return 0\n    return np.sum(intersection) / np.sum(union)\n\ndef visualize_and_mask_results(threshold=130):\n    print(f\"\\n--- 3. Visualizing Results ---\")\n    \n    # Check if model exists before testing\n    model_path = f'checkpoints/{MODEL_NAME}/latest_net_G.pth'\n    if not os.path.exists(model_path):\n        print(f\"❌ Error: Model weights not found at {model_path}. Training likely failed.\")\n        return\n\n    subprocess.run([\"python\", \"test.py\", \"--dataroot\", os.path.abspath(POC_DIR), \n                    \"--name\", MODEL_NAME, \"--model\", \"pix2pix\", \"--direction\", \"BtoA\", \n                    \"--netG\", NET_G, \"--num_test\", \"10\", \"--no_dropout\"])\n\n    res_path = f'results/{MODEL_NAME}/test_latest/images/'\n    fakes = sorted(glob.glob(os.path.join(res_path, '*_fake_B.png')))\n    reals_src = sorted(glob.glob(os.path.join(res_path, '*_real_B.png')))\n    reals_tar = sorted(glob.glob(os.path.join(res_path, '*_real_A.png')))\n\n    if not fakes:\n        print(\"❌ No test images found in results directory.\")\n        return\n\n    num = min(len(fakes), 5)\n    fig, axes = plt.subplots(num, 4, figsize=(24, 6 * num))\n    \n    # Handle the case where num=1 (axes becomes 1D)\n    if num == 1: axes = np.expand_dims(axes, axis=0)\n\n    for i in range(num):\n        # 1. Initial X-ray Input\n        axes[i, 0].imshow(Image.open(reals_src[i]))\n        axes[i, 0].set_title(\"1. Initial X-ray Input\")\n        \n        # 2. RGB Label (Shows Red Ink and Blue Void)\n        label_img = np.array(Image.open(reals_tar[i]))\n        unlabeled_mask = label_img[:,:,2] > BLUE_THRESHOLD\n        ink_gt = label_img[:,:,0] > INK_THRESHOLD\n        axes[i, 1].imshow(label_img)\n        axes[i, 1].set_title(\"2. Ground Truth (Label)\")\n        \n        # 3. Model Output\n        pred_img = Image.open(fakes[i])\n        axes[i, 2].imshow(pred_img)\n        axes[i, 2].set_title(\"3. Raw Prediction\")\n        \n        # 4. Cleaned Mask (Blue Mask applied)\n        pred_arr = np.array(pred_img.convert('L'))\n        pred_arr[unlabeled_mask] = 0 # Force unlabeled areas to black\n        final_binary = pred_arr > threshold\n        \n        iou = calculate_iou(ink_gt, final_binary)\n        axes[i, 3].imshow(final_binary, cmap='gray')\n        axes[i, 3].set_title(f\"4. Cleaned Mask\\nIoU: {iou:.4f}\")\n        \n        for ax in axes[i]: ax.axis('off')\n\n    plt.tight_layout()\n    plt.show()\n\nif __name__ == \"__main__\":\n    initialize_environment()\n    setup_filtered_dataset()\n    run_unet_training()\n    visualize_and_mask_results()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-01-28T20:37:56.583628Z","iopub.execute_input":"2026-01-28T20:37:56.584525Z","iopub.status.idle":"2026-01-28T21:29:00.183059Z","shell.execute_reply.started":"2026-01-28T20:37:56.584487Z","shell.execute_reply":"2026-01-28T21:29:00.182299Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"Some continous lines can add some very little value ","metadata":{}},{"cell_type":"code","source":"1+1\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-01-28T21:29:00.184376Z","iopub.execute_input":"2026-01-28T21:29:00.184663Z","iopub.status.idle":"2026-01-28T21:29:00.190262Z","shell.execute_reply.started":"2026-01-28T21:29:00.184636Z","shell.execute_reply":"2026-01-28T21:29:00.189524Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}