<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Python in Plain English - Medium]]></title>
        <description><![CDATA[New Python content every day. Follow to join our 3.5M+ monthly readers. - Medium]]></description>
        <link>https://python.plainenglish.io?source=rss----78073def27b8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Python in Plain English - Medium</title>
            <link>https://python.plainenglish.io?source=rss----78073def27b8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 21:33:52 GMT</lastBuildDate>
        <atom:link href="https://python.plainenglish.io/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Google Workspace MCP Now Rejects Unmarked Agent Clients. Check Yours.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/google-workspace-mcp-now-rejects-unmarked-agent-clients-check-yours-593ae03607bd?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/1600/1*RlC3Ql4oWnQtkeXfwLp3eA.png" width="1600"></a></p><p class="medium-feed-snippet">Google&#x2019;s November 11&#x2013;12 OAuth change affects user-delegated Workspace MCP clients. Here is how to identify the affected path, split mixed&#x2026;</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/google-workspace-mcp-now-rejects-unmarked-agent-clients-check-yours-593ae03607bd?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/google-workspace-mcp-now-rejects-unmarked-agent-clients-check-yours-593ae03607bd?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/593ae03607bd</guid>
            <dc:creator><![CDATA[Mehulpratapsingh]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 17:25:47 GMT</pubDate>
            <atom:updated>2026-11-13T17:25:45.942Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Learn to Debug Before You Learn to Prompt]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/learn-to-debug-before-you-learn-to-prompt-68d2b6ace736?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/1280/1*m-4J_IXWMsrOT-hXmQlRYg.png" width="1280"></a></p><p class="medium-feed-snippet">The 10-minute routine I run before I paste any stack trace into an AI tool, and why this week&#x2019;s &#x201C;fired from OpenAI&#x201D; joke landed so hard</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/learn-to-debug-before-you-learn-to-prompt-68d2b6ace736?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/learn-to-debug-before-you-learn-to-prompt-68d2b6ace736?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/68d2b6ace736</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Shubh Jain]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 17:11:50 GMT</pubDate>
            <atom:updated>2026-11-13T17:11:48.845Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[LoopMR: Accelerated MRI Reconstruction With One Looped Block]]></title>
            <link>https://python.plainenglish.io/loopmr-accelerated-mri-reconstruction-with-one-looped-block-6f08555a22c0?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/6f08555a22c0</guid>
            <category><![CDATA[radiology]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[medical-imaging]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[mri]]></category>
            <dc:creator><![CDATA[Mohammed El Amine Mokhtari]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 17:04:52 GMT</pubDate>
            <atom:updated>2026-11-13T17:04:51.651Z</atom:updated>
            <content:encoded><![CDATA[<p>One Restormer block, run 12 times, rebuilds undersampled brain, knee, heart and carotid MRI with a ninth of PromptMR+’s parameters.</p><p>AI-assistance disclosure: I drafted this article with AI assistance, then edited it and fact-checked every number against the paper (arXiv:2611.14947).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8qd_B0CL3RPueLAVt6dfg.png" /></figure><p>Every accelerated MRI product hits the same trade. You skip k-space lines to cut scan time, and a network has to fill in what you skipped. The networks that win the reconstruction challenges do it with a stack of cascades, each with its own weights, so the model gets bigger every time you add a step. PromptMR+, which won both tasks of the CMRxRecon2024 challenge, is at 92.9M parameters. A team at Cedars-Sinai Medical Center in Los Angeles tried the opposite: reuse one good block at every step. The result is LoopMR, described in arXiv:2611.14947, with code and weights public under a non-commercial license.</p><p>What LoopMR does</p><p>LoopMR is an unrolled reconstruction network. It takes undersampled multi-coil k-space and the sampling mask, and returns a coil-combined image. It starts from the zero-filled image and coil sensitivity maps, which come from the sensitivity estimator of PromptMR+ (1.87M parameters). Then it runs the same loop 12 times.</p><p>In each pass, one Restormer block, a transformer that computes attention across channels rather than across pixels so it stays affordable at full MRI resolution, looks at the current image estimate and a few extra inputs. Those are the estimate pushed back through the acquisition mask, the zero-filled image, the difference between the two, and four latent images that act as the block’s memory of earlier passes. The block returns an image update and new latents. The update goes back to k-space, where a soft data-consistency step pulls it toward the k-space lines that were measured. The same block and the same two learned step sizes are used in every pass.</p><p>The block has 8.40M parameters and the whole model 10.27M. The released models also take five adjacent slices as input; on cardiac data those are adjacent time frames or weightings rather than slices.</p><p>What they tested it on</p><p>Brain: 67 fully sampled 12-coil T1-weighted volumes from Calgary-Campinas (CC359), with the exact split and Poisson-disc masks used by PromptMR+ (47 train, 10 validation, 10 test) at ×5 and ×10. Knee: 199 proton-density volumes from the fastMRI validation set, split 159 / 40, at ×4 and ×8. Heart: CMRxRecon2023 cine and T1/T2 mapping, 100 patients for training and 20 (76 files) for testing at ×4, ×8 and ×10. Carotid: an in-house set of 45 3D MPRAGE vessel-wall volumes from 6 to 27 receive coils at different centres, with the GRAPPA ×2 clinical reconstruction as reference, tested at ×6 and ×12.</p><p>The baselines are E2E-VarNet, PromptMR and PromptMR+. LoopMR came out ahead in PSNR and SSIM on all four datasets at every acceleration, and the difference against PromptMR+ was significant everywhere (p &lt; 0.01, Wilcoxon signed-rank). Its SSIM was higher than PromptMR+ on 137 of 138 test cases. The margin was largest on the carotid data, where PSNR went up by 0.84 dB at ×6 and 0.76 dB at ×12 over PromptMR+.</p><p>If you read scans, look at the qualitative figures. On a CC359 slice at ×10, PromptMR+ draws a temporal sulcus as broken where the reference shows it continuous; LoopMR keeps it whole. On a fastMRI knee slice that carries a radiologist annotation from fastMRI+, LoopMR renders the subchondral bone edema closest to the reference. On the carotid set, it depicts the vessel wall closer to the reference than the other three methods. The featured image above shows the brain, knee and heart cases from Fig. 3, with error maps where brighter means further from the fully sampled image.</p><p>The finding behind the model</p><p>The authors also ran a controlled comparison. They trained the same model with one shared block and with distinct blocks at 6, 12 and 24 iterations. The shared version matched or beat the distinct one at every depth, with 5 to 20 times fewer parameters (10.2M against 52M, 102M and 202M). They then repeated the test with four block types. Shared transformer blocks (Restormer, SwinIR) held up or did better; shared CNN blocks (E2E-VarNet and PromptMR+ blocks) did worse, though the gap narrowed as the block grew. Their reading is that per-iteration weights mostly make up for a block that is too small, which would explain why older shared-weight models like MoDL, at about 0.1M parameters, lagged.</p><p>Two other details are useful if you build reconstruction pipelines. Going from 12 to 24 iterations bought little; a bigger block helped more than more passes. And training with a loss on every iteration, not only the final one, gives a model that produces a usable image after about four passes and stays stable past 12, for a cost of about 0.1 dB at the trained depth. The authors suggest that could power a fast preview on the console while the full reconstruction finishes.</p><p>Why a viewer or clinic team should care</p><p>LoopMR works on raw multi-coil k-space, before anything becomes a DICOM series. A PACS or a web viewer never sees the input it needs. So the direct users are scanner vendors, research sites that export raw data, and teams building reconstruction for low-field or custom sequences.</p><p>For a shop that builds clinical platforms around MRI, three things still apply. A 10M-parameter model is easier to ship, version and validate than a 93M one, and its peak memory on an H100 was 0.7 to 3.0 GB. A single block that you can run for a chosen number of passes fits a preview-then-final workflow better than a fixed cascade. And if you run research MRI with raw data access, this is a reconstruction baseline with public code, released weights and per-volume result files you can rerun without a GPU.</p><p>What it does not tell you yet</p><p>It is slower than PromptMR+. The saving is in parameters. Inference took 203 to 624 ms per slice on an H100, against 100 to 121 ms for PromptMR+.</p><p>Training sets are modest (47 training volumes on CC359). Whether distinct weights win back the advantage with large multi-site data is open.</p><p>Each model is trained for one dataset and one mask family (Poisson-disc on CC359, 1-D Cartesian elsewhere). The authors do not expect it to generalise to unseen anatomies or sampling patterns. It did hold its lead on unseen accelerations (×4 and ×16) and on fastMRI brain, which it never saw in training.</p><p>All undersampling is retrospective, and the carotid data is not public.</p><p>Quality was measured with PSNR and SSIM only. There is no radiologist reading, so hallucinated structure at high acceleration has not been assessed.</p><p>The PDF uses an IEEE Transactions on Medical Imaging template, but the arXiv listing does not state acceptance anywhere. Treat it as a preprint.</p><p>How to try it</p><p>The repository at github.com/hym97/LoopMR has training configs for CC359, fastMRI knee and CMRxRecon2023, evaluation scripts that follow each dataset’s official protocol, and a notebook committed with its outputs that reconstructs a CC359 slice at ×5 and ×10 and shows the image after 1, 2, 4, 8 and 12 passes. Weights for the three public datasets are on Hugging Face at hym97/loopmri, along with the PromptMR+ baselines the authors retrained for knee and heart. The stack is Python 3.10, PyTorch 2.8 and fastmri 0.3.0.</p><p>The license is the catch for commercial teams. The code and weights are CC BY-NC 4.0, the vendored PromptMR+ code is under a Rutgers non-commercial research license, and only the vendored SDUM code is Apache-2.0. You can study it, benchmark it and publish with it; you cannot put it in a product without talking to the authors. For other MRI reconstruction work on the blog, see LGGS, which uses a patient’s previous scan to speed up follow-up brain MRI, and GSMR3D for thick-slice brain MRI super-resolution.</p><p>Source and license</p><p>Paper: Yimeng He, Yibin Xie, Yi Zheng, Yifan Gao, Lixia Wang, Yin-Chen Hsu, Yufeng Wang, Meng Lu, Debiao Li and Xiuzhen Huang, “One Block Is Enough: LoopMR for Accelerated MRI Reconstruction”, arXiv:2611.14947 (eess.IV, 11 November 2026). All authors are with Cedars-Sinai Medical Center, Los Angeles (Biomedical Imaging Research Institute and Department of Computational Biomedicine); Debiao Li and Xiuzhen Huang are the corresponding authors. Code: github.com/hym97/LoopMR, CC BY-NC 4.0 (vendored PromptMR+ code under Rutgers’ non-commercial research license, vendored SDUM code Apache-2.0). Weights: huggingface.co/hym97/loopmri, CC BY-NC 4.0. Data: Calgary-Campinas, fastMRI and CMRxRecon2023 under their own terms; the carotid set is in-house. Featured image: Fig. 3 of the paper, PromptMR+ and LoopMR rows only, panels cropped and scaled.</p><p>Originally published on pycad.co, the canonical version: <a href="https://pycad.co/blog/loopmr-accelerated-mri-reconstruction-one-looped-block/">https://pycad.co/blog/loopmr-accelerated-mri-reconstruction-one-looped-block/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f08555a22c0" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/loopmr-accelerated-mri-reconstruction-with-one-looped-block-6f08555a22c0">LoopMR: Accelerated MRI Reconstruction With One Looped Block</a> was originally published in <a href="https://python.plainenglish.io">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Debugging Techniques That Actually Work]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/python-debugging-techniques-that-actually-work-31e2e0c8fa46?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/1672/1*nULv5oy_ocHM89FOzhXy1Q.png" width="1672"></a></p><p class="medium-feed-snippet">This happens to everyone who works with Python.
You write a program, run it &#x2014; and it stops working for some reason.
Maybe you get a&#x2026;</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/python-debugging-techniques-that-actually-work-31e2e0c8fa46?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/python-debugging-techniques-that-actually-work-31e2e0c8fa46?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/31e2e0c8fa46</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Dr Abdullah Azhar]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 16:55:32 GMT</pubDate>
            <atom:updated>2026-11-13T16:55:31.175Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Truncate and Insert Data from SQL Server to MySQL in Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/truncate-and-insert-data-from-sql-server-to-mysql-in-python-f4a6d13ce7c9?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/685/1*aKy4m2xqeoKXi6-zjkzFNg.png" width="685"></a></p><p class="medium-feed-snippet">While it is quite common to manage data across databases, challenges are frequently met when it comes to transferring data between MySQL&#x2026;</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/truncate-and-insert-data-from-sql-server-to-mysql-in-python-f4a6d13ce7c9?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/truncate-and-insert-data-from-sql-server-to-mysql-in-python-f4a6d13ce7c9?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/f4a6d13ce7c9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Shafa]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 16:50:45 GMT</pubDate>
            <atom:updated>2026-11-13T16:50:44.666Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Build a Full-Stack App with Python and HTMX]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/build-a-full-stack-app-with-python-and-htmx-14af65e558be?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/1536/1*zR9AENwQd7rgYb9n2eaAEA.png" width="1536"></a></p><p class="medium-feed-snippet">Build an interactive task manager with FastAPI, HTMX, SQLite, and server-rendered HTML, without React or complex JavaScript state.</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/build-a-full-stack-app-with-python-and-htmx-14af65e558be?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/build-a-full-stack-app-with-python-and-htmx-14af65e558be?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/14af65e558be</guid>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[htmx]]></category>
            <dc:creator><![CDATA[Malik Hussain]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 11:26:33 GMT</pubDate>
            <atom:updated>2026-11-13T11:26:31.965Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Day 10 — Selecting Columns by Name, Regex and Dtype]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://python.plainenglish.io/day-10-selecting-columns-by-name-regex-and-dtype-b1f57ab894b3?source=rss----78073def27b8---4"><img src="https://cdn-images-1.medium.com/max/1400/1*JT4KS7-Qp2-JKyz-GXTA9w.png" width="1400"></a></p><p class="medium-feed-snippet">100 Days of Polars &#xB7; Phase 2: Expressions</p><p class="medium-feed-link"><a href="https://python.plainenglish.io/day-10-selecting-columns-by-name-regex-and-dtype-b1f57ab894b3?source=rss----78073def27b8---4">Continue reading on Python in Plain English »</a></p></div>]]></description>
            <link>https://python.plainenglish.io/day-10-selecting-columns-by-name-regex-and-dtype-b1f57ab894b3?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/b1f57ab894b3</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[100daysofpolars]]></category>
            <category><![CDATA[polars-dataframe]]></category>
            <dc:creator><![CDATA[Double Espresso Data]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 11:26:19 GMT</pubDate>
            <atom:updated>2026-11-13T11:26:18.178Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How Python Quietly Became the Brain Behind Modern AI]]></title>
            <link>https://python.plainenglish.io/how-python-quietly-became-the-brain-behind-modern-ai-2df5708c70d6?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/2df5708c70d6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Secret of codes ]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 11:25:55 GMT</pubDate>
            <atom:updated>2026-11-13T11:25:53.605Z</atom:updated>
            <content:encoded><![CDATA[<h4>From simple lines of code to powering the world’s smartest machines – discover how Python quietly took over the AI revolution.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*jp3Id_kGBUTh6aVL0lwGqg@2x.jpeg" /></figure><p><strong>For years I made the same embarrassing assumption. </strong>I believed that real AI had to be written in something fast and serious, like C++, and that Python was the friendly toy language people used before graduating to the grown up tools.</p><p>Then I opened the source of an actual modern AI project and went looking for the serious code. I found Python. Almost everywhere. Training scripts, data pipelines, evaluation loops, the glue holding the whole thing together.</p><p><strong>That did not make sense to me</strong>. Python is slow. Everybody says so. So why does the most important technology of this decade run on it?</p><p>It took me an embarrassingly long time to find the answer, and it changed how I think about programming languages. Here is what I learned.</p><p><strong>The Short Answer: Why Python Is Used for AI</strong></p><p>Python for AI works because Python acts as the control layer, not the engine. Researchers write readable Python to describe models and experiments, while libraries like NumPy, PyTorch, and TensorFlow hand the heavy math to fast C, C++, and GPU code underneath. You get the speed of low level code with the writing speed of a scripting language.</p><p>That is the whole secret. The rest of this article explains how it happened, what the 2026 data says, and where Python still genuinely struggles.</p><p><strong>It Started as an Accident</strong></p><p>Python was created by Guido van Rossum and first released in 1991. It was designed to be readable, not to be fast, and certainly not to run neural networks. Nobody was planning an AI revolution.</p><p><strong>What happened next was a slow, almost boring build up inside the scientific community:</strong></p><p>Scientists wanted a free alternative to expensive proprietary tools for crunching numbers.</p><p>NumPy arrived and gave Python fast array math, with the real work done in compiled C underneath.</p><p>SciPy and Matplotlib added scientific algorithms and plotting.</p><p>IPython, and later Jupyter notebooks, let people mix code, charts, and notes in one place.</p><p>scikit learn gave beginners a consistent way to try classical machine learning in a few lines.</p><p>By the time deep learning exploded, Python was already the place where numerical people lived. The tools, the tutorials, and the habits were all there. The AI boom did not choose Python. It walked into a house that was already furnished.</p><p><strong>5 Reasons Python Won the AI Race</strong></p><ol><li>It reads like pseudocode</li><li>Machine learning is full of ideas that change weekly. Researchers need to try a thought in an afternoon, not a month. Python’s clean syntax lets you express a model almost the way you would sketch it on paper.</li><li>Less time fighting the language means more time testing ideas. In research, that speed of iteration beats raw execution speed almost every time.</li></ol><p><strong>2. It is a glue language</strong></p><p>This is the part I missed for years. Python is rarely doing the heavy computation itself. It calls into optimized libraries written in C, C++, and CUDA that run on GPUs.</p><p>When you write one line to multiply two giant matrices, Python simply passes the instruction along. The compiled code does the work. Python is the steering wheel. It was never meant to be the engine.</p><p><strong>3. The ecosystem has gravity</strong></p><p>Once NumPy, pandas, scikit learn, TensorFlow, and PyTorch all lived in Python, everything else followed. New research code shipped in Python. New tutorials were written in Python. New hires already knew Python.</p><p>That is a network effect. Each new library made the next developer more likely to choose Python, which made the next library more likely to be built for Python. It is extremely hard for a rival language to break that loop.</p><p><strong>4. Notebooks made experimenting feel like a conversation</strong></p><p>Jupyter notebooks let you run a small piece of code, look at the result, tweak it, and run it again. For exploring data and debugging models, that feedback loop is hard to beat. It made Python feel less like programming and more like thinking out loud.</p><p>5. <strong>Research culture picked it as the default</strong></p><p>When a new paper comes out, the code that comes with it is overwhelmingly likely to be Python. TensorFlow, released by Google in 2015, helped push deep learning into the mainstream. PyTorch arrived from Facebook’s AI research group in 2016 and became a favorite in research because it felt like writing ordinary Python rather than describing a separate computation graph.</p><p>Later, platforms like Hugging Face made sharing and using pretrained models a few lines of Python. Each step pulled the field deeper into the same language.</p><p><strong>The Two Language Secret Nobody Mentions</strong></p><p>Here is the layered picture that finally made everything click for me.</p><p><strong>Layer	What it does	Typical language</strong></p><p>Your experiment	Defines the model, data flow, and training loop	Python</p><p>Framework	Organizes tensors, gradients, and layers	Python on the surface, C++ underneath</p><p>Math kernels	Runs matrix operations at high speed	C, C++, CUDA</p><p><strong>Hardware	Executes the math in parallel	GPUs and other accelerators</strong></p><p>Python lives at the top, where humans work. Fast languages live at the bottom, where machines work. Each layer does what it is best at.</p><p>So when someone says “Python is slow, so it cannot power AI,” they are looking at the wrong layer. The slow part is a thin layer of instructions. The fast part is everything those instructions trigger.</p><p><strong>What the Data Says in 2026</strong></p><p>Popularity depends on who is counting, and the sources do not agree. That is actually the interesting part.</p><p><strong>Source:What it measures	What it shows</strong></p><p>Stack Overflow Developer Survey 2025	What developers say they use	Python used by about 57.9 percent, up 7 percentage points from 2024</p><p>TIOBE Index, October 2026	Search activity about the language	Python still ranks first, though its share is lower than its 2025 peak</p><p>GitHub Octoverse 2025	Contributor activity on GitHub	TypeScript overtook Python and JavaScript in August 2025</p><p><strong>My honest read: Python is not winning every race.</strong> JavaScript still leads in reported usage, and TypeScript now leads GitHub by contributor count, partly because AI coding assistants favor typed languages in everyday web work.</p><p>But for building and training AI itself, Python remains the default. Stack Overflow linked its jump in adoption to AI, data science, and back end development.</p><p><strong>Where Python Genuinely Hurts</strong></p><p><strong>I promised an honest verdict, so here are the real problems.</strong></p><p>The Global Interpreter Lock (GIL). For decades, the GIL meant only one thread could run Python code at a time, which limited multi core use for CPU heavy Python code. Teams worked around it with multiprocessing, which adds complexity and memory use.</p><p>Raw speed. Pure Python loops are slow. Performance critical code gets pushed down into compiled libraries, which is exactly why the two language setup exists.</p><p>Packaging and environments. Anyone who has fought with conflicting library versions knows this pain. It is the least glamorous problem in the ecosystem and one of the most common.</p><p>GPU memory and deployment. Python overhead matters less during training and more when you squeeze out latency in production, where teams often move serving code to other languages.</p><p><strong>Python 3.14 Changes the GIL Story</strong></p><p>Python 3.14 shipped in October 2025 with official support for a free threaded build that runs without the GIL. It is a separate build, so the standard version still keeps the lock.</p><p><strong>Why this matters for AI:</strong> GPU heavy work already escapes the GIL, but the CPU side of pipelines, such as data preprocessing, evaluation, and multi agent systems, can now use multiple cores in a single process.</p><p><strong>Early reports show real gains and real caveats:</strong></p><p>One hands on test reported a file reading task dropping from about 18.8 seconds to 5.1 seconds with threads on the free threaded build.</p><p>The same test found a multiprocessing version of a matrix task running slower on the free threaded build than on the standard one, so it is not a magic switch.</p><p>Free threaded builds carry some extra memory use, and many third party C extensions still need updates before they work well.</p><p>Even Guido van Rossum has reportedly cautioned that the importance of removing the GIL can be overstated. His point is that Python’s real advantage is its ecosystem, not its threading model.</p><p>That matches my own conclusion. The language wins because of everything built around it, not because it is the fastest.</p><p><strong>Will Something Replace Python?</strong></p><p>Challengers exist. Julia targets numerical computing and rejoined the TIOBE top 20 in October 2026. Mojo aims to combine Python style syntax with systems level speed. Rust is increasingly used for fast tooling and data infrastructure.</p><p>None of them has the thing Python has: a decade and a half of libraries, tutorials, jobs, and habits. Replacing a language is easy. Replacing an ecosystem is not.</p><p>More likely, the future looks like the present with more layers. Python on top, faster languages doing more of the underlying work, and the boundary between them getting smoother.</p><p><strong>If You Are Learning AI, Here Is What I Would Do</strong></p><p>Learn core Python first. Functions, classes, lists, dictionaries, and reading error messages.</p><p>Get comfortable with NumPy and pandas. Almost everything else sits on top of them.</p><p>Train a small model with scikit learn. Understand data splits, overfitting, and evaluation before touching deep learning.</p><p>Move to PyTorch. Build a tiny neural network by hand, then use pretrained models.</p><p>Learn a little about what is underneath. Know what a GPU does and why tensor operations are fast. That knowledge separates people who use libraries from people who understand them.</p><p><strong><em>Frequently Asked Questions</em></strong></p><p><strong>Why is Python used for AI and machine learning?</strong></p><p>Python is readable, quick to experiment in, and surrounded by a huge ecosystem of libraries like NumPy, PyTorch, TensorFlow, and scikit learn. It acts as the control layer while fast compiled code does the heavy computation underneath.</p><p><strong>Is Python too slow for AI?</strong></p><p>Not for most AI work. The heavy math runs in optimized C, C++, and GPU code that Python simply calls. Python itself is slow for raw loops, but those loops are rarely where AI time is spent.</p><p><strong>Is Python still the best language for AI in 2026?</strong></p><p>For building and training models, yes, it remains the default. TypeScript has overtaken it on GitHub by contributor count and JavaScript leads in reported usage, but those measure broader software work rather than AI model development.</p><p><strong>What is the GIL and does it matter for AI?</strong></p><p>The Global Interpreter Lock lets only one thread run Python code at a time. Python 3.14 offers an optional free threaded build without it, which can help CPU heavy parts of AI pipelines, though library support is still maturing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2df5708c70d6" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/how-python-quietly-became-the-brain-behind-modern-ai-2df5708c70d6">How Python Quietly Became the Brain Behind Modern AI</a> was originally published in <a href="https://python.plainenglish.io">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From monthly budget to home price: inverting the mortgage payment formula in Python]]></title>
            <link>https://python.plainenglish.io/from-monthly-budget-to-home-price-inverting-the-mortgage-payment-formula-in-python-481354869f70?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/481354869f70</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mortgage]]></category>
            <category><![CDATA[personal-finance]]></category>
            <dc:creator><![CDATA[Sebastian Bardach]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 01:16:51 GMT</pubDate>
            <atom:updated>2026-11-13T01:16:50.085Z</atom:updated>
            <content:encoded><![CDATA[<p>Most mortgage calculators go one way: type a price, get a payment. When you are house hunting, the question usually runs the other way. You know roughly what you can pay each month and want the highest price that fits. Because every part of the payment is linear in the price, the formula inverts cleanly. This post is arithmetic, not financial advice.</p><h3>The forward formula</h3><p>The monthly payment on a fixed-rate loan has four parts:</p><pre>payment = principal_and_interest + property_tax / 12 + insurance / 12 + hoa</pre><p>Principal and interest uses the standard amortisation formula, with r the monthly rate and n the number of monthly payments:</p><pre>principal_and_interest = loan × r / (1 − (1 + r)^−n)</pre><p>When the rate is 0, this becomes loan / n.</p><h3>Turning it around</h3><p>Write the loan as price × (1 − down_share) and the tax as price × tax_rate. Everything that depends on the price then collapses into one number, the monthly cost per dollar of price:</p><pre>per_dollar_of_price = (1 − down_share) × r / (1 − (1 + r)^−n) + tax_rate / 12</pre><p>Insurance and HOA dues do not depend on the price, so they come off the budget first:</p><pre>max_price = (budget − insurance / 12 − hoa) / per_dollar_of_price</pre><h3>The code</h3><pre>def payment_per_loan_dollar(annual_rate_pct, years):<br>    n = years * 12<br>    if annual_rate_pct == 0:<br>        return 1 / n<br>    r = annual_rate_pct / 100 / 12<br>    return r / (1 - (1 + r) ** -n)</pre><pre>def max_home_price(budget, down_pct, annual_rate_pct, years,<br>                   tax_pct_of_price, insurance_per_year, hoa_per_month=0):<br>    per_dollar = ((1 - down_pct / 100) * payment_per_loan_dollar(annual_rate_pct, years)<br>                  + tax_pct_of_price / 100 / 12)<br>    return (budget - insurance_per_year / 12 - hoa_per_month) / per_dollar</pre><pre>def monthly_payment(price, down_pct, annual_rate_pct, years,<br>                    tax_pct_of_price, insurance_per_year, hoa_per_month=0):<br>    loan = price * (1 - down_pct / 100)<br>    pi = loan * payment_per_loan_dollar(annual_rate_pct, years)<br>    return pi + price * tax_pct_of_price / 100 / 12 + insurance_per_year / 12 + hoa_per_month</pre><pre>price = max_home_price(2400, down_pct=10, annual_rate_pct=6.0, years=30,<br>                       tax_pct_of_price=1.2, insurance_per_year=1500)<br>print(round(price))                                                   # 355694<br>print(round(monthly_payment(price, 10, 6.0, 30, 1.2, 1500), 2))       # 2400.0<br>print(round(max_home_price(2400, 10, 7.0, 30, 1.2, 1500)))            # 325571</pre><p>The second print is the test: feed the price back into the forward formula and you should get the budget again.</p><h3>The worked example, step by step</h3><p>Every input here is an example assumption, including the interest rate. It is not a forecast or a typical value.</p><ul><li>Budget: 2,400 a month, all-in. 10 % down, 30 years, 6.0 % a year (example assumption).</li><li>Property tax: 1.2 % of the price a year (example assumption; it varies a lot by location). Insurance: 1,500 a year. No HOA.</li><li>Monthly rate r = 0.06 ÷ 12 = 0.005, n = 360. Principal and interest per loan dollar = 0.00599551.</li><li>Per dollar of price: 0.9 × 0.00599551 + 0.012 ÷ 12 = 0.00539595 + 0.00100000 = 0.00639595.</li><li>Insurance is 1,500 ÷ 12 = 125 a month, leaving 2,400 − 125 = 2,275 for the price-dependent parts.</li><li>Max price: 2,275 ÷ 0.00639595 = <strong>about 355,694</strong>.</li></ul><p>Check with a price of 355,694: the loan is 320,124.60, principal and interest 1,919.31, tax 355.69, insurance 125.00, total 2,400.00.</p><p>The last line of the code shows how sensitive the answer is. Same budget, 7.0 % instead of 6.0 % (again an example, not a prediction): about <strong>325,571</strong>, roughly 30,000 less.</p><h3>What the formula leaves out</h3><p>Private mortgage insurance, which a lender may add when the down payment is under 20 %. Closing costs, moving costs, repairs, utilities. Your credit, the loan type, and what a lender will actually offer. Treat the result as an upper bound for the budget you chose, and choose that budget from your own finances, not from what a lender approves.</p><h3>Try it in the browser</h3><p>The same payment formula, plus a price limit from an income guideline, runs in a free calculator, nothing stored: <a href="https://tools.bardach-technologies.com/tool/home-affordability-monthly-payment-calculator?utm_source=syn-medium">home affordability and monthly payment calculator</a>.</p><p><em>Disclosure: I built the calculator linked above and make Viewingshub, a planned assistant (not available yet) for contacting listing agents and keeping track of home viewings. Written with AI assistance and checked by me.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=481354869f70" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/from-monthly-budget-to-home-price-inverting-the-mortgage-payment-formula-in-python-481354869f70">From monthly budget to home price: inverting the mortgage payment formula in Python</a> was originally published in <a href="https://python.plainenglish.io">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Late-payment interest on an overdue invoice, as a Python function]]></title>
            <link>https://python.plainenglish.io/late-payment-interest-on-an-overdue-invoice-as-a-python-function-f1095d0992ad?source=rss----78073def27b8---4</link>
            <guid isPermaLink="false">https://medium.com/p/f1095d0992ad</guid>
            <category><![CDATA[small-business]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[freelancing]]></category>
            <dc:creator><![CDATA[Sebastian Bardach]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 01:16:43 GMT</pubDate>
            <atom:updated>2026-11-13T01:16:42.136Z</atom:updated>
            <content:encoded><![CDATA[<p>An invoice is overdue and your terms allow interest. The number you put on the reminder should be one the client can check in a minute. Simple daily interest does that: no compounding, one rate, a count of days. Here it is as a short function, with the rate as an input because the right rate depends on your contract and your country.</p><p>This is not legal advice: charge interest or a fee only if your contract or invoice terms allow it and your local law does too.</p><h3>The formula</h3><pre>interest     = invoice amount × yearly rate × days late ÷ 365<br>interest/day = invoice amount × yearly rate ÷ 365<br>amount due   = invoice amount + interest + flat late fee</pre><p>Three details matter:</p><ul><li><strong>Days late count from the due date</strong>, not the invoice date. An invoice is only late once it is due.</li><li><strong>Simple interest</strong>: the rate applies to the invoice amount only, never to interest already added.</li><li><strong>A monthly rate converts by multiplying by 12</strong> as simple interest: 1.5 % a month is 18 % a year.</li></ul><h3>The function</h3><pre>from datetime import date</pre><pre>def late_interest(amount, yearly_rate_pct, due, today, flat_fee=0.0):<br>    days_late = max(0, (today - due).days)<br>    per_day = amount * yearly_rate_pct / 100 / 365<br>    interest = amount * yearly_rate_pct / 100 * days_late / 365<br>    return {<br>        &quot;days_late&quot;: days_late,<br>        &quot;interest_per_day&quot;: round(per_day, 2),<br>        &quot;interest&quot;: round(interest, 2),<br>        &quot;amount_due&quot;: round(amount + interest + flat_fee, 2),<br>    }</pre><pre>print(late_interest(3200, 10, due=date(2026, 9, 30), today=date(2026, 11, 7), flat_fee=40))<br># {&#39;days_late&#39;: 38, &#39;interest_per_day&#39;: 0.88, &#39;interest&#39;: 33.32, &#39;amount_due&#39;: 3273.32}</pre><p>The inputs are an example, not a recommendation: a 3,200 invoice, a yearly rate of 10 % and a flat fee of 40 are assumptions for this example. Substitute what your terms actually say.</p><p>Step by step:</p><ul><li>Days late: 30 September to 7 November is 38 days.</li><li>Interest per day: 3,200 × 0.10 ÷ 365 = 0.8767, shown as 0.88.</li><li>Interest: 3,200 × 0.10 × 38 ÷ 365 = 33.32.</li><li>Amount due: 3,200 + 33.32 + 40 = 3,273.32.</li></ul><h3>Why the function does not multiply the rounded daily figure</h3><p>0.88 × 38 = 33.44, twelve cents more than 33.32. If you round the daily interest first and then multiply, the error grows with every day. Compute the total from the unrounded values and round once at the end; show the daily figure on the reminder only as information.</p><h3>Where the rate comes from</h3><p>Use the rate written in your contract or invoice terms. Some countries also set a statutory rate for late payments between businesses, usually as a reference rate plus a margin, and those reference rates change over time. In the UK, for example, GOV.UK describes statutory interest on late commercial payments as 8 % plus the Bank of England base rate, where no other rate is agreed in the contract. Check the official page for your country on the day you calculate, and pass the result in as yearly_rate_pct.</p><p>Some places also cap late fees or interest, and rules for consumers are often stricter than for business customers. That is a legal question the arithmetic cannot answer.</p><h3>Put the working on the reminder</h3><p>List the original amount, the due date, the days late, the rate, the interest and any fee, each on its own line. A client who can recompute the figure has less to dispute.</p><h3>Without code</h3><p>The same formula runs in a free calculator, no sign-up, nothing stored: <a href="https://tools.bardach-technologies.com/tool/late-invoice-interest-calculator?utm_source=syn-medium">late invoice interest calculator</a>.</p><p><em>Disclosure: I built the calculator linked above and make Clientsroster, a Notion template for freelancers that tracks leads, clients, projects and which invoices are due, paid or overdue. Written with AI assistance and checked by me.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1095d0992ad" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/late-payment-interest-on-an-overdue-invoice-as-a-python-function-f1095d0992ad">Late-payment interest on an overdue invoice, as a Python function</a> was originally published in <a href="https://python.plainenglish.io">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>