<?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[Stories by Mayur Ghadge on Medium]]></title>
        <description><![CDATA[Stories by Mayur Ghadge on Medium]]></description>
        <link>https://medium.com/@mjghadge9007?source=rss-8dce56fe0d35------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mWmsVv3bcXJuzfOalnd5xg.jpeg</url>
            <title>Stories by Mayur Ghadge on Medium</title>
            <link>https://medium.com/@mjghadge9007?source=rss-8dce56fe0d35------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 21:48:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mjghadge9007/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[Stop Prompting Harder: 10 Claude Code Commands for a Calmer, Faster Workflow]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/stop-prompting-harder-10-claude-code-commands-for-a-calmer-faster-workflow-3884738eb384?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/1536/1*W2o2N7Owtoga5DJ3oPri2w.png" width="1536"></a></p><p class="medium-feed-snippet">Your Claude Code session probably doesn&#x2019;t need a better prompt. It may just need the right command.</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/stop-prompting-harder-10-claude-code-commands-for-a-calmer-faster-workflow-3884738eb384?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/stop-prompting-harder-10-claude-code-commands-for-a-calmer-faster-workflow-3884738eb384?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/3884738eb384</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-coding-assistant]]></category>
            <category><![CDATA[claudetools]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 04:50:54 GMT</pubDate>
            <atom:updated>2026-10-06T04:51:42.737Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Archify: Turning Your Codebase into Interactive Architecture Diagrams with AI Agents]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/archify-turning-your-codebase-into-interactive-architecture-diagrams-with-ai-agents-a0614f09ca18?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/984/1*a6YgZta_8i2oQf9MeQnJdg.png" width="984"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/archify-turning-your-codebase-into-interactive-architecture-diagrams-with-ai-agents-a0614f09ca18?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/archify-turning-your-codebase-into-interactive-architecture-diagrams-with-ai-agents-a0614f09ca18?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0614f09ca18</guid>
            <category><![CDATA[archify]]></category>
            <category><![CDATA[claudetools]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 13:13:11 GMT</pubDate>
            <atom:updated>2026-10-06T03:38:36.307Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Context Rot: The Hidden Problem in Long-Context AI Systems]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/context-rot-the-hidden-problem-in-long-context-ai-systems-e63706d517c4?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/1774/1*w0P8sZRsZ-cxxVmrqEE43g.png" width="1774"></a></p><p class="medium-feed-snippet">As LLM context windows keep getting larger, it is tempting to think that more context automatically means better results.</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/context-rot-the-hidden-problem-in-long-context-ai-systems-e63706d517c4?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/context-rot-the-hidden-problem-in-long-context-ai-systems-e63706d517c4?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/e63706d517c4</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[context-engineering]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 07:32:41 GMT</pubDate>
            <atom:updated>2026-08-29T07:32:41.313Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Next Evolution in Object Detection: Introducing YOLO11]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/the-next-evolution-in-object-detection-introducing-yolo11-bcabab63e26f?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/1598/1*LeqpSLf5chnoOPvF6XUFYA.png" width="1598"></a></p><p class="medium-feed-snippet">Object detection has seen significant advancements over the years, with Ultralytics YOLO11 standing out as the latest cutting-edge model&#x2026;</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/the-next-evolution-in-object-detection-introducing-yolo11-bcabab63e26f?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/the-next-evolution-in-object-detection-introducing-yolo11-bcabab63e26f?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcabab63e26f</guid>
            <category><![CDATA[image-segmentation]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[yolo]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 10:33:07 GMT</pubDate>
            <atom:updated>2024-10-06T10:33:07.669Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Managing Audio Files on AWS S3 with Python, Boto3 and Pydub]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">A Comprehensive Guide to Uploading, Retrieving, and Processing Audio Files with Boto3 and Pydub</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/managing-audio-files-on-aws-s3-with-python-boto3-and-pydub-b570d5216849?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/managing-audio-files-on-aws-s3-with-python-boto3-and-pydub-b570d5216849?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/b570d5216849</guid>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[pydub]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[boto3]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 05:06:30 GMT</pubDate>
            <atom:updated>2024-10-02T05:06:30.393Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Unlock the Secrets of Sorting in Python]]></title>
            <link>https://python.plainenglish.io/unlock-the-secrets-of-sorting-in-python-bc5e14241086?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc5e14241086</guid>
            <category><![CDATA[sort]]></category>
            <category><![CDATA[sorting]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 08:10:03 GMT</pubDate>
            <atom:updated>2024-09-30T04:17:13.129Z</atom:updated>
            <content:encoded><![CDATA[<p>Discover the power of advanced sorting techniques in Python: Master Custom Functions, sorted(), and natsort for Seamless Data Handling and Optimized Performance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DiQV07xNvRL-PCwb" /><figcaption>Photo by <a href="https://unsplash.com/@jankolar?utm_source=medium&amp;utm_medium=referral">Jan Antonin Kolar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Sorting is one of the core operations in programming, and mastering it can significantly enhance your ability to manipulate and sort data efficiently. In Python, we have a range of tools at our disposal to perform sorting tasks, from the built-in sort(), sorted() function to more specialized libraries like natsort for handling natural sorting scenarios. Throughout my journey in Python, I&#39;ve found that understanding not just the basics of sorting but also how to customize it for different use cases opens up new possibilities for tackling complex data.</p><p>In this blog post, I will walk you through some of the most effective ways to approach sorting in Python. We’ll explore how to use custom functions with sorted(), dive into the natsort library for natural sorting, and highlight other essential methods for sorting data efficiently.</p><h4>Introduction</h4><p>Sorting is the process of arranging items in a specified sequence, either in ascending or descending order. Python provides several ways to sort data structures such as lists, dictionaries, and more. The built-in sorted() function is commonly used, but it can also be enhanced through custom functions or specialized libraries.</p><h4>Example 1: Basic usage of sort() and sorted()</h4><p>The sort() and sorted() method in Python allows you to sort iterables easily. By default, it sorts data in ascending order based on natural ordering (for numbers) or lexicographical ordering (for strings).</p><p><strong>a) Using </strong><strong>sort() method:</strong></p><p>sort() sorts the list <strong>in place</strong>, modifying the original list directly.</p><pre># Using sort() to sort the original list in place<br>numbers = [12, 4, 19, 3, 7, 16, 20, 5, 18, 13]<br>numbers.sort()<br><br>print(&quot;Sorted list (in place):&quot;, numbers)  <br><br># Output: Sorted list (in place): [3, 4, 5, 7, 12, 13, 16, 18, 19, 20]</pre><p><strong>b) Using </strong><strong>sorted() method:</strong></p><p>sorted() returns a <strong>new</strong> sorted list without modifying the original list.</p><pre># Using sorted() to create a new sorted list<br>numbers = [12, 4, 19, 3, 7, 16, 20, 5, 18, 13]<br>sorted_numbers = sorted(numbers)<br><br>print(&quot;Original list:&quot;, numbers)<br>print(&quot;New sorted list:&quot;, sorted_numbers)<br><br># Output: Original list: [12, 4, 19, 3, 7, 16, 20, 5, 18, 13]<br># Output: New sorted list: [3, 4, 5, 7, 12, 13, 16, 18, 19, 20]</pre><h4><strong>Example 2: Sorting Strings with Numeric Parts (Problem)</strong></h4><p>Now, let’s say we have a list of filenames where each filename contains a numeric part. If we use the default sorted() function, which performs lexicographical (alphabetical) sorting for strings, the results might not be what we expect. Let’s see why.</p><pre># List of audio chunks<br>audio_files = [&quot;chunk_3.wav&quot;, &quot;chunk_1.wav&quot;, &quot;chunk_10.wav&quot;, &quot;chunk_2.wav&quot;]<br><br># Sorting without a custom key<br>sorted_audio_files = sorted(audio_files)<br>print(&quot;Incorrectly sorted audio files:&quot;, sorted_audio_files)<br><br># Output: Incorrectly sorted audio files: [&#39;chunk_1.wav&#39;, &#39;chunk_10.wav&#39;, &#39;chunk_2.wav&#39;, &#39;chunk_3.wav&#39;]</pre><ul><li>Lexicographically, “chunk_10.wav” comes <strong>before</strong> “chunk_2.wav”, even though numerically we would expect “chunk_2.wav” to come before “chunk_10.wav”.</li><li>This is because sorted() sorts strings based on character-by-character comparison, and &quot;1&quot; comes before &quot;2&quot;, so &quot;chunk_10.wav&quot; appears in the wrong position.</li></ul><h4>Example 3: Custom Sorting with a Key Function (Solution)</h4><p>To solve the above problem, we can provide a <strong>custom key function</strong> that extracts the numeric part of the filename and sorts based on that. Let’s modify our example to use os.path.basename() to isolate the filename, then split and extract the numeric part for proper sorting.</p><p><strong>Solution-1: Using Custom Function</strong></p><pre>import os<br><br># define a function<br>def extract_numeric_part(filename):<br>    &quot;&quot;&quot;Extract the numeric part from the filename.&quot;&quot;&quot;<br>    return int(os.path.basename(filename).split(&#39;_&#39;)[-1].split(&#39;.&#39;)[0])<br><br><br># List of audio chunks<br>audio_files = [&quot;chunk_3.wav&quot;, &quot;chunk_1.wav&quot;, &quot;chunk_10.wav&quot;, &quot;chunk_2.wav&quot;]<br><br># Use the custom function in sorted()<br>sorted_audio_files = sorted(audio_files, key=extract_numeric_part)<br><br>print(&quot;Correctly sorted audio files:&quot;, sorted_audio_files)<br># Output: Correctly sorted audio files: [&#39;chunk_1.wav&#39;, &#39;chunk_2.wav&#39;, &#39;chunk_3.wav&#39;, &#39;chunk_10.wav&#39;]</pre><p><strong>Solution-2: Using Lambda Function</strong></p><pre>import os<br><br># List of audio chunks<br>audio_files = [&quot;chunk_3.wav&quot;, &quot;chunk_1.wav&quot;, &quot;chunk_10.wav&quot;, &quot;chunk_2.wav&quot;]<br><br># Custom sort key to extract the numeric part<br>sorted_audio_files = sorted(audio_files, key=lambda x: int(os.path.basename(x).split(&#39;_&#39;)[-1].split(&#39;.&#39;)[0]))<br><br>print(&quot;Correctly sorted audio files:&quot;, sorted_audio_files)<br># Output: Correctly sorted audio files: [&#39;chunk_1.wav&#39;, &#39;chunk_2.wav&#39;, &#39;chunk_3.wav&#39;, &#39;chunk_10.wav&#39;]</pre><ul><li>The key argument is a function that extracts the sorting criterion.</li><li>We use os.path.basename(x) to isolate the file name, then split it on the underscore (_) to extract the numeric part, which is converted into an integer for proper numeric sorting.</li><li>Now, “chunk_10.wav” is correctly placed <strong>after</strong> “chunk_3.wav”.</li></ul><h4>Example 4. Natural Sorting with natsort (Solution)</h4><p>While custom functions work well for many cases, natural sorting — where strings containing numbers are sorted in a way that humans naturally expect — is a common requirement. This is where the natsort library comes in handy.</p><p><strong>Installing </strong><strong>natsort</strong></p><pre>pip install natsort</pre><p><strong>Example-1</strong></p><pre>from natsort import natsorted<br><br># List of audio chunks<br>audio_files = [&quot;chunk_3.wav&quot;, &quot;chunk_1.wav&quot;, &quot;chunk_10.wav&quot;, &quot;chunk_2.wav&quot;]<br><br># Natural sorting with natsorted<br>sorted_audio_files = natsorted(audio_files)<br>print(&quot;Naturally sorted audio files:&quot;, sorted_audio_files)  <br><br># Output: [&#39;chunk_1.wav&#39;, &#39;chunk_2.wav&#39;, &#39;chunk_3.wav&#39;, &#39;chunk_10.wav&#39;]</pre><p><strong>Example-2</strong></p><pre>from natsort import natsorted<br><br>mixed_files = [&quot;file_2.txt&quot;, &quot;file_10.txt&quot;, &quot;file_1.txt&quot;, &quot;file_20.txt&quot;, &quot;file_3a.txt&quot;, &quot;file_3.txt&quot;]<br><br># Sorting with natsorted<br>sorted_mixed_files_natsort = natsorted(mixed_files)<br><br>print(&quot;Correctly sorted mixed files (using natsort):&quot;, sorted_mixed_files_natsort)<br># Output: [&#39;file_1.txt&#39;, &#39;file_2.txt&#39;, &#39;file_3.txt&#39;, &#39;file_3a.txt&#39;, &#39;file_10.txt&#39;, &#39;file_20.txt&#39;]</pre><p>To achieve correct natural sorting, you can use the natsort library, which handles both numeric and non-numeric parts effectively.</p><h4>Summary</h4><p>Sorting is a crucial aspect of data manipulation, and Python offers a range of methods to achieve it. Whether you need simple sorting with sorted() or more advanced natural sorting with natsort, there are flexible options to suit your needs. Understanding these techniques can enhance your programming skills and enable you to handle data more efficiently.</p><p>Feel free to explore these sorting methods in your projects and tailor them to meet your specific requirements!</p><p>✨ Thanks for reading! If you found this guide helpful, don’t keep it a secret! Give it a clap 👏👏👏 I appreciate five claps!<br>✨follow for more insights, and share it with fellow developers to spread the knowledge.</p><h4>References</h4><ul><li><a href="https://docs.python.org/3/library/functions.html#sorted">Python Official Documentation on Sorted</a></li><li><a href="https://pypi.org/project/natsort/">natsort Documentation</a></li></ul><h4>🌟 <strong>Explore More on Python and NLP!</strong> 🌟</h4><p>Dive deeper into the world of Natural Language Processing with my published blogs:</p><ol><li><a href="https://medium.com/@mjghadge9007/building-your-own-custom-named-entity-recognition-ner-model-with-spacy-v3-a-step-by-step-guide-15c7dcb1c416"><strong>Building Your Own Custom Named Entity Recognition (NER) Model with SpaCy v3: A Step-by-Step Guide</strong></a><br>Learn how to create a tailored NER model using SpaCy v3 with this comprehensive guide.</li><li><a href="https://medium.com/python-in-plain-english/mastering-multilingualism-top-5-python-language-detection-techniques-explained-b87c0f0328d8"><strong>Mastering Multilingualism: Top 5 Python Language Detection Techniques Explained</strong></a><br>Discover effective techniques for language detection in Python and enhance your multilingual applications.</li><li><a href="https://medium.com/@mjghadge9007/detecting-languages-and-retrieving-language-names-in-python-46af8270b777"><strong>Detecting Languages and Retrieving Language Names in Python</strong></a><br>A practical guide on how to detect languages and retrieve their names using Python.</li></ol><p>✨ Check them out, and let’s continue our journey in the exciting field of AI and Machine Learning! Your feedback and insights are always welcome!</p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc5e14241086" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/unlock-the-secrets-of-sorting-in-python-bc5e14241086">Unlock the Secrets of Sorting 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[Exploring the Pydub Library: A Comprehensive Guide to Audio Manipulation in Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/exploring-the-pydub-library-a-comprehensive-guide-to-audio-manipulation-in-python-46a09c96f69b?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/2600/0*bofLvnLuQtniTzF2" width="6000"></a></p><p class="medium-feed-snippet">Audio manipulation is a crucial aspect of many applications, from media processing to data analysis. The Pydub library in Python provides&#x2026;</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/exploring-the-pydub-library-a-comprehensive-guide-to-audio-manipulation-in-python-46a09c96f69b?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/exploring-the-pydub-library-a-comprehensive-guide-to-audio-manipulation-in-python-46a09c96f69b?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/46a09c96f69b</guid>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pydub]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 15:38:30 GMT</pubDate>
            <atom:updated>2024-09-26T13:41:28.201Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Setting Up a Logger in Python for Production: Best Practices]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/setting-up-a-logger-in-python-for-production-best-practices-703f72567da4?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/2600/0*AVfgvSK5o0TZK85i" width="6000"></a></p><p class="medium-feed-snippet">In this tutorial, I will walk through the process of setting up logging in Python from scratch. We will start by explaining the&#x2026;</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/setting-up-a-logger-in-python-for-production-best-practices-703f72567da4?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/setting-up-a-logger-in-python-for-production-best-practices-703f72567da4?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/703f72567da4</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[python-logging]]></category>
            <category><![CDATA[logger]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 07:39:13 GMT</pubDate>
            <atom:updated>2024-09-23T15:49:38.245Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Building Your Own Custom Named Entity Recognition (NER) Model with spaCy V3: A Step-by-Step Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mjghadge9007.medium.com/building-your-own-custom-named-entity-recognition-ner-model-with-spacy-v3-a-step-by-step-guide-15c7dcb1c416?source=rss-8dce56fe0d35------2"><img src="https://cdn-images-1.medium.com/max/1684/1*VY2OROzEW0vzMVNIXbvutA.png" width="1684"></a></p><p class="medium-feed-snippet">In this blog post, I&#x2019;ll take you on a journey into the world of custom NER using spaCy v3. We&#x2019;ll explore why custom NER is essential, how&#x2026;</p><p class="medium-feed-link"><a href="https://mjghadge9007.medium.com/building-your-own-custom-named-entity-recognition-ner-model-with-spacy-v3-a-step-by-step-guide-15c7dcb1c416?source=rss-8dce56fe0d35------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mjghadge9007.medium.com/building-your-own-custom-named-entity-recognition-ner-model-with-spacy-v3-a-step-by-step-guide-15c7dcb1c416?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/15c7dcb1c416</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ner]]></category>
            <category><![CDATA[spacy]]></category>
            <category><![CDATA[model-training]]></category>
            <category><![CDATA[named-entity-recognition]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 07:29:40 GMT</pubDate>
            <atom:updated>2024-09-23T15:41:39.647Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Guide to Python’s assert Statement]]></title>
            <link>https://python.plainenglish.io/a-comprehensive-guide-to-pythons-assert-statement-563b56899b11?source=rss-8dce56fe0d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/563b56899b11</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[assertions]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Mayur Ghadge]]></dc:creator>
            <pubDate>Mon, 04 Sep 2023 16:45:58 GMT</pubDate>
            <atom:updated>2023-09-12T06:05:07.000Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is known for its readability and simplicity, but it also provides powerful tools for debugging and testing code. One such tool is the assert statement. In this blog post, we will explore what the assert statement is, how it works, and provide several examples to illustrate its usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXIkArOcMbz0m3s_QctQWQ.png" /></figure><h3><strong>Understanding the </strong><strong>assert Statement</strong></h3><p><strong>What is the </strong><strong>assert statement?</strong></p><p>The assert statement is a built-in Python statement that is used to check whether a given condition is True. If the condition is True, the program continues to execute normally. However, if the condition is False, an AssertionError exception is raised, halting program execution.</p><p><strong>Why use </strong><strong>assert statements?</strong></p><ul><li>Debugging: assert statements are invaluable for debugging code as they allow you to catch errors early in development.</li><li>Testing: They can be used to ensure that functions and methods behave as expected.</li><li>Documentation: They serve as self-documenting code, making it clear what assumptions your code relies on.</li></ul><p><strong>Syntax and basic usage:</strong></p><pre>assert condition, &quot;Optional message&quot;</pre><ul><li>condition: The expression to be evaluated.</li><li>&quot;Optional message&quot;: An optional message that is displayed when the condition is False.</li></ul><h3><strong>Examples of </strong><strong>assert Statements:</strong></h3><p><strong>Example 1: Checking Function Preconditions</strong></p><p>Before executing a function, you can use assert to check if the input parameters meet certain conditions. For example:</p><pre>def divide(x, y):<br>    assert y != 0, &quot;Division by zero is not allowed.&quot;<br>    return x / y<br><br>result = divide(10, 2)  # This will work.<br>result = divide(5, 0)   # This will raise an AssertionError.</pre><p><strong>Example 2: Testing Function Outputs</strong></p><pre>def square(x):<br>    return x * x<br><br>assert square(5) == 25  # This will not raise an AssertionError.<br>assert square(3) == 9   # This will not raise an AssertionError.<br>assert square(2) == 5   # This will raise an AssertionError.</pre><p><strong>Example 3: Debugging</strong></p><p>During development, you can use assert to quickly identify issues in your code. For example:</p><pre>def calculate_tax(income):<br>    assert income &gt;= 0, &quot;Income should be non-negative&quot;<br>    # Calculate tax here</pre><p><strong>Example 4:</strong> <strong>Ensuring Invariants</strong></p><p>In object-oriented programming, you can use assert to ensure that object invariants are maintained. For example:</p><pre>class Circle:<br>    def __init__(self, radius):<br>        assert radius &gt; 0, &quot;Radius must be positive&quot;<br>        self.radius = radius</pre><p><strong>While </strong><strong>assert can be a powerful tool, it&#39;s essential to follow best practices:</strong></p><ol><li>Use assert for debugging and testing during development, but disable them in production for performance reasons.</li><li>Provide clear and informative error messages to aid debugging.</li><li>Ensure that the conditions tested by assert are expressions that should always be True.</li></ol><h3>Conclusion</h3><p>The assert statement is a valuable tool in Python for checking conditions and debugging code. When used wisely, it helps you catch issues early in the development process, making your code more robust and reliable.</p><p>Now that you’ve learned about the assert statement in Python, you can use it effectively in your projects to improve code quality and reliability.</p><h3>In Plain English</h3><p><em>Thank you for being a part of our community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer! 👏</em></li><li><em>You can find even more content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><strong><em> 🚀</em></strong></li><li><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. 🗞️</em></li><li><em>Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><strong><em>(X</em></strong>), <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a>, <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a>, and <a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=563b56899b11" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/a-comprehensive-guide-to-pythons-assert-statement-563b56899b11">A Comprehensive Guide to Python’s assert Statement</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>