<?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 Abisha Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Abisha Shrestha on Medium]]></description>
        <link>https://medium.com/@abishashrestha04?source=rss-6a43c10a5902------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4RX1R-2G5-Uk0gU7</url>
            <title>Stories by Abisha Shrestha on Medium</title>
            <link>https://medium.com/@abishashrestha04?source=rss-6a43c10a5902------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:20:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abishashrestha04/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[Day-33 of Building a Telegram Chatbot: Bringing Ideas to Life]]></title>
            <link>https://medium.com/@abishashrestha04/day-33-of-building-a-telegram-chatbot-bringing-ideas-to-life-8639dad0002f?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/8639dad0002f</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 12:16:25 GMT</pubDate>
            <atom:updated>2024-12-27T12:18:55.422Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i5wFMloI7KudV_G-ygfmOg.jpeg" /></figure><p>Creating a Telegram chatbot is a fascinating milestone in any programmer’s journey. It combines coding, creativity, and problem-solving into one cohesive experience. This project is more than just an exercise — it’s an opportunity to make something that interacts with real users, performing tasks that simplify lives or spark joy.</p><h4>What Makes Telegram Chatbots Special?</h4><p>Telegram is a versatile platform that supports bots capable of anything from sending automated messages to managing complex workflows. The best part? You don’t need to be a seasoned expert to create one. With tools like Python and the Telegram Bot API, building a chatbot becomes an achievable and exciting goal.</p><h4>The Creation Journey</h4><p>The process of creating a chatbot begins with an idea. What purpose will your bot serve? Is it a tool to send reminders, a personal assistant, or perhaps a fun trivia bot? Defining its role is the first step toward bringing it to life.</p><p>With Python as your toolkit, you dive into coding. You learn how to set up the Telegram Bot API, manage messages, and respond dynamically to user inputs. Concepts like asynchronous programming might come into play, adding an extra layer of sophistication.</p><p>Here’s a Python example of creating a simple Telegram chatbot using the python-telegram-bot library:</p><h3>Telegram Chatbot Code</h3><pre>from telegram import Update<br>from telegram.ext import ApplicationBuilder, CommandHandler, MessageHandler, filters, ContextTypes<br><br># Step 1: Define your bot token from BotFather<br>BOT_TOKEN = &quot;YOUR_BOT_TOKEN_HERE&quot;<br><br># Step 2: Define the start command<br>async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -&gt; None:<br>    &quot;&quot;&quot;Send a welcome message when the /start command is issued.&quot;&quot;&quot;<br>    await update.message.reply_text(<br>        &quot;Hello! I&#39;m your chatbot. I can reply to your messages. Type anything!&quot;<br>    )<br><br># Step 3: Define the help command<br>async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -&gt; None:<br>    &quot;&quot;&quot;Send a list of commands when the /help command is issued.&quot;&quot;&quot;<br>    await update.message.reply_text(<br>        &quot;Here are the commands I support:\n&quot;<br>        &quot;/start - Start interacting with me\n&quot;<br>        &quot;/help - Get help information\n&quot;<br>        &quot;Or just type a message, and I&#39;ll echo it back!&quot;<br>    )<br><br># Step 4: Define a message handler<br>async def echo(update: Update, context: ContextTypes.DEFAULT_TYPE) -&gt; None:<br>    &quot;&quot;&quot;Echo back user messages.&quot;&quot;&quot;<br>    user_message = update.message.text<br>    await update.message.reply_text(f&quot;You said: {user_message}&quot;)<br><br># Step 5: Set up the main application<br>def main():<br>    # Create an application instance<br>    app = ApplicationBuilder().token(BOT_TOKEN).build()<br><br>    # Add command handlers<br>    app.add_handler(CommandHandler(&quot;start&quot;, start))<br>    app.add_handler(CommandHandler(&quot;help&quot;, help_command))<br><br>    # Add a message handler for non-command text<br>    app.add_handler(MessageHandler(filters.TEXT &amp; ~filters.COMMAND, echo))<br><br>    # Start the bot<br>    print(&quot;Bot is running...&quot;)<br>    app.run_polling()<br><br># Step 6: Run the application<br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h3>Steps to Set Up and Run the Bot</h3><ol><li><strong>Get a Bot Token</strong>:</li></ol><ul><li>Go to Telegram and search for <strong>BotFather</strong>.</li><li>Use the /newbot command to create a new bot.</li><li>Follow the instructions and copy the API token you receive.</li></ul><p><strong>2. Install the Required Library</strong>:</p><ul><li>Install the python-telegram-bot library:</li></ul><pre>pip install python-telegram-bot</pre><p><strong>3. Replace the Token</strong>:</p><ul><li>Replace &quot;YOUR_BOT_TOKEN_HERE&quot; in the code with your BotFather token.</li></ul><p><strong>4. Run the Code</strong>:</p><ul><li>Save the script as telegram_bot.py and run it:</li></ul><pre>python telegram_bot.py</pre><p><strong>5. Test Your Bot</strong>:</p><ul><li>Search for your bot in Telegram (using the name you set with BotFather).</li><li>Start a conversation and try sending messages.</li></ul><h3>What This Bot Does</h3><ul><li>Responds to the /start command with a welcome message.</li><li>Lists available commands with /help.</li><li>Echoes back any message you send.</li></ul><h4>Challenges and Growth</h4><p>Every bug encountered and solved along the way is a lesson learned. From managing errors gracefully to designing user-friendly interactions, building a chatbot sharpens your skills in real-world scenarios. It’s a hands-on way to understand the intricacies of APIs and event-driven programming.</p><h4>Why It’s Motivating</h4><p>Watching your chatbot respond to commands for the first time is a moment of pure accomplishment. It’s proof that you’ve turned lines of code into something functional and interactive. Sharing it with others and seeing their reactions only adds to the excitement.</p><h4>The Bigger Picture</h4><p>Telegram chatbots aren’t just for fun — they have real-world applications. Businesses use them for customer support, developers for automating tasks, and educators for delivering lessons. By learning to create one, you’re stepping into a realm of endless possibilities.</p><p>So, keep innovating and experimenting. This is more than just a technical exercise; it’s a creative process that merges technology with problem-solving. Your chatbot isn’t just code — it’s a glimpse into what you’re capable of achieving in the tech world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8639dad0002f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day-32 of Taking Databases to the Next Level: Advanced Coding Adventures]]></title>
            <link>https://medium.com/@abishashrestha04/day-32-of-taking-databases-to-the-next-level-advanced-coding-adventures-11b3aabff5ab?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/11b3aabff5ab</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 11:57:01 GMT</pubDate>
            <atom:updated>2024-12-27T12:21:35.248Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mlK4hDtLg9VsX_-1HYNiBQ.jpeg" /></figure><p>Once the foundation of databases is laid, stepping into advanced coding is like leveling up in a video game. You’ve mastered the basics; now it’s time to explore features and techniques that make databases not just functional but powerful tools in managing and analyzing data.</p><h4>Unlocking Advanced Features</h4><p>Advanced database coding introduces concepts like joins, indexes, transactions, and stored procedures. These features allow you to create efficient, scalable, and secure systems. Imagine performing complex queries to extract valuable insights or optimizing data retrieval with techniques that save both time and resources.</p><h4>The Beauty of Complex Queries</h4><p>This stage involves writing queries that combine multiple tables, filter specific data, and compute results dynamically. Techniques like INNER JOIN, LEFT JOIN, and subqueries enable you to build intricate relationships between data sets. Crafting such queries feels like solving a challenging puzzle — each line of code brings you closer to the complete picture.</p><h4>Transactions: Ensuring Reliability</h4><p>Transactions are your safeguard, ensuring that operations are completed successfully or not at all. This is crucial for maintaining data integrity. Think of it as a safety net: if something goes wrong during a multi-step process, the database can roll back to its original state.</p><h4>Optimizing Performance</h4><p>Indexes are another gem in advanced database coding. By indexing frequently accessed columns, you can speed up queries dramatically. This optimization feels like upgrading a regular car into a sports car — tasks that used to take seconds are completed in milliseconds.</p><h4>Why This Matters</h4><p>Understanding these advanced concepts doesn’t just make you a better programmer; it prepares you to tackle real-world challenges. From building robust e-commerce platforms to managing large-scale analytics, the possibilities are endless. You’re not just coding; you’re creating systems that can transform data into actionable insights.</p><h4>Staying Motivated</h4><p>Learning advanced database coding can be challenging, but each success is immensely rewarding. Every optimized query, successful transaction, or well-structured join is proof of your progress. Remember, the skills you’re building today are not just for solving problems — they’re for innovating, creating, and leaving an impact.</p><p>Embrace the complexity and keep pushing forward. The more you explore, the more you realize the potential of databases as a cornerstone of modern technology. This journey is just beginning, and the future is brighter with every line of code!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11b3aabff5ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day-31 of Unlocking the Power of Databases: The First Step in Data Mastery]]></title>
            <link>https://medium.com/@abishashrestha04/day-31-of-unlocking-the-power-of-databases-the-first-step-in-data-mastery-78cf196e226d?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/78cf196e226d</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 11:55:10 GMT</pubDate>
            <atom:updated>2024-12-27T12:22:09.186Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xy8Kmc1AC4RRJ-QXPCNK1A.jpeg" /></figure><p>Embarking on the journey of understanding databases can feel like uncovering a hidden treasure chest in the digital world. As you open the lid, you realize that databases are the backbone of countless systems we interact with daily — from the apps on your phone to the websites you browse. Learning their basics is like receiving a golden key to a realm of endless possibilities.</p><h4>Why Databases Matter</h4><p>Imagine the chaos of trying to manage vast amounts of information without structure or order. Databases swoop in as the unsung heroes, organizing data into a structured format that makes it accessible, secure, and ready for use. Whether it’s a simple to-do list or the massive systems powering e-commerce platforms, databases are at the core.</p><h4>The First Steps: Basics and Beyond</h4><p>The initial dive into databases may involve understanding how data is stored, retrieved, and managed. Concepts like tables, rows, and columns are akin to learning the alphabet of this new language. With coding, you can start creating, updating, and querying your own data. These basic operations lay the groundwork for building robust applications in the future.</p><h4>Finding Joy in the Process</h4><p>As you delve into the basics, you might write your first few lines of code to interact with a database. Each success, no matter how small, is a step forward. Debugging errors and solving problems along the way adds to the excitement and sharpens your skills. It’s a reminder that growth often comes from persistence and curiosity.</p><h4>Motivation to Keep Going</h4><p>Learning databases is more than just a technical endeavor; it’s a gateway to innovation. Think of the impact you can make by creating systems that simplify lives, enhance efficiency, or provide new insights. Your journey today is a seed planted for a thriving skillset tomorrow. Every click of the keyboard brings you closer to mastering a tool that drives modern technology.</p><p>So, dive into databases with enthusiasm, knowing that you’re building a solid foundation for the future. Every skill you acquire strengthens your ability to create, analyze, and innovate. The possibilities are endless, and this is just the beginning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78cf196e226d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 30: Mastering Advanced Web Automation in Python]]></title>
            <link>https://medium.com/@abishashrestha04/day-30-mastering-advanced-web-automation-in-python-757a0634b367?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/757a0634b367</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 07:01:26 GMT</pubDate>
            <atom:updated>2024-12-27T12:25:46.374Z</atom:updated>
            <content:encoded><![CDATA[<p>After diving into the basics of web automation, I decided to push the boundaries and explore <strong>advanced techniques</strong>. From handling dynamic content to performing headless browsing and automating complex workflows, today’s learning journey showcased the true power of web automation. Let me take you through the advanced concepts, examples, and why this skill is indispensable in today’s digital era.</p><h3>What Does Advanced Web Automation Entail?</h3><p>Advanced web automation involves tackling challenges that basic automation might struggle with, such as:</p><ul><li>Handling <strong>JavaScript-rendered content</strong>.</li><li>Managing <strong>file uploads and downloads</strong>.</li><li>Interacting with <strong>pop-ups, iframes, and modal windows</strong>.</li><li>Running scripts efficiently with <strong>headless browsing</strong>.</li><li>Implementing <strong>error handling and retry mechanisms</strong> for robustness.</li></ul><p>These techniques empower developers to build scalable, reliable, and efficient automation scripts for real-world applications.</p><h3>Example 1: Handling Dynamic Content with Selenium</h3><p>Modern websites often load content dynamically using JavaScript, which means you can’t simply scrape the HTML. Selenium’s WebDriverWait helps handle such cases:</p><pre>from selenium import webdriver<br>from selenium.webdriver.common.by import By<br>from selenium.webdriver.support.ui import WebDriverWait<br>from selenium.webdriver.support import expected_conditions as EC<br><br># Initialize the driver<br>driver = webdriver.Chrome()<br><br># Open a dynamically loaded website<br>driver.get(&quot;https://example.com/dynamic-page&quot;)<br><br># Wait until the element is visible<br>try:<br>    element = WebDriverWait(driver, 10).until(<br>        EC.presence_of_element_located((By.ID, &quot;dynamic-content&quot;))<br>    )<br>    print(&quot;Dynamic content loaded:&quot;, element.text)<br>except:<br>    print(&quot;Failed to load dynamic content.&quot;)<br>finally:<br>    driver.quit()</pre><h3>How It Works:</h3><ul><li><strong>WebDriverWait</strong>: Waits for a specific condition (e.g., element presence).</li><li><strong>expected_conditions</strong>: Ensures actions occur only when content is ready.</li></ul><p>This ensures your script doesn’t fail when encountering slow-loading content.</p><h3>Example 2: Headless Browsing for Speed</h3><p>Headless browsing runs your automation scripts without opening a browser window, making it faster and more efficient:</p><pre>from selenium import webdriver<br>from selenium.webdriver.chrome.options import Options<br><br># Set up headless mode<br>options = Options()<br>options.add_argument(&quot;--headless&quot;)<br><br>driver = webdriver.Chrome(options=options)<br><br># Navigate to a page<br>driver.get(&quot;https://example.com&quot;)<br>print(&quot;Page title:&quot;, driver.title)<br><br>driver.quit()</pre><h3>Benefits of Headless Browsing:</h3><ol><li>Faster execution since no GUI is rendered.</li><li>Ideal for server environments or CI/CD pipelines.</li><li>Saves system resources.</li></ol><h3>Example 3: Automating File Downloads</h3><p>Sometimes, automation involves downloading files. Selenium can manage download settings directly:</p><pre>from selenium import webdriver<br><br># Set up download preferences<br>options = webdriver.ChromeOptions()<br>prefs = {&quot;download.default_directory&quot;: &quot;/path/to/download/folder&quot;}<br>options.add_experimental_option(&quot;prefs&quot;, prefs)<br><br>driver = webdriver.Chrome(options=options)<br><br># Download a file<br>driver.get(&quot;https://example.com/download&quot;)<br>download_button = driver.find_element(&quot;id&quot;, &quot;download-button&quot;)<br>download_button.click()<br><br>print(&quot;File downloaded successfully!&quot;)<br>driver.quit()</pre><h3>Significance of Advanced Web Automation</h3><ol><li><strong>Enhanced Productivity</strong>: Automating complex workflows saves hours of manual effort.</li><li><strong>Data-Driven Decision Making</strong>: Extract large-scale data from dynamic websites for better analysis.</li><li><strong>Scalability</strong>: Build robust scripts that adapt to changes in website structures.</li><li><strong>Testing at Scale</strong>: Simulate user interactions across various devices and browsers efficiently.</li><li><strong>Business Impact</strong>:</li></ol><ul><li><strong>E-commerce</strong>: Monitor competitors’ pricing and stock in real time.</li><li><strong>Market Research</strong>: Scrape and analyze industry trends faster.</li><li><strong>Content Automation</strong>: Manage blog uploads, SEO audits, and social media updates.</li></ul><h3>Real-World Applications</h3><ol><li><strong>Automated Testing</strong>: Regression tests for web applications, ensuring user experience quality.</li><li><strong>Custom Web Bots</strong>: Build chatbots that interact with web pages on behalf of users.</li><li><strong>Data Monitoring</strong>: Automate monitoring of financial data, sports scores, or weather updates.</li><li><strong>Web Scraping at Scale</strong>: Scrape thousands of pages daily with error handling and retries.</li></ol><h3>What I Learned Today</h3><p>Advanced web automation takes patience and problem-solving. It requires an understanding of both the tools and the intricacies of web technologies like HTML, CSS, and JavaScript. Mastering these skills ensures you can tackle any automation challenge, from simple tasks to complex workflows.</p><h3>What’s Next?</h3><p>I aim to integrate web automation with:</p><ol><li><strong>APIs</strong>: For combined scraping and API-based workflows.</li><li><strong>Machine Learning</strong>: To analyze the data I scrape for actionable insights.</li><li><strong>Frameworks</strong>: Explore tools like <strong>Playwright</strong> and <strong>Scrapy</strong> for additional capabilities.</li></ol><p>The world of web automation is vast, and I can’t wait to explore its full potential!</p><p>Web automation isn’t just a programming skill; it’s a catalyst for innovation. By mastering these advanced techniques, I’m not just saving time — I’m creating opportunities for smarter solutions in business, research, and everyday life.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=757a0634b367" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 29: Automating the Web with Python]]></title>
            <link>https://medium.com/@abishashrestha04/day-29-automating-the-web-with-python-37d8352a53e6?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/37d8352a53e6</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 06:57:57 GMT</pubDate>
            <atom:updated>2024-12-26T06:57:57.811Z</atom:updated>
            <content:encoded><![CDATA[<p>The internet is a vast resource of information and opportunities, but navigating it manually can be tedious and time-consuming. Enter <strong>web automation</strong> — a skill that allows you to programmatically interact with websites, saving time and effort while unlocking endless possibilities. On Day 29 of my Python learning journey, I dove into web automation, exploring its tools, applications, and significance in the modern digital world.</p><h3>What Is Web Automation?</h3><p>Web automation involves using code to perform repetitive tasks on the web, such as filling out forms, extracting data, or testing web applications. Instead of manually navigating through websites, you can write Python scripts to do the work for you.</p><p>It’s particularly useful for:</p><ul><li><strong>Data Extraction</strong>: Scraping information like prices, headlines, or stock market data.</li><li><strong>Automated Testing</strong>: Ensuring websites work as intended without human effort.</li><li><strong>Routine Tasks</strong>: Automating login processes, downloads, or email management.</li></ul><h3>Key Tools for Web Automation in Python</h3><ol><li><strong>Selenium</strong>: A powerful tool for browser automation, allowing you to control web browsers programmatically.</li><li><strong>BeautifulSoup</strong>: Ideal for extracting and parsing data from HTML or XML documents.</li><li><strong>Requests</strong>: Simplifies HTTP requests to fetch web pages without a browser.</li></ol><p>For web automation, <strong>Selenium</strong> often takes the spotlight due to its robust capabilities in interacting with dynamic websites.</p><h3>Example 1: Logging into a Website with Selenium</h3><pre>from selenium import webdriver<br>from selenium.webdriver.common.keys import Keys<br><br># Set up the browser driver<br>driver = webdriver.Chrome()<br><br># Navigate to the login page<br>driver.get(&quot;https://example.com/login&quot;)<br><br># Locate the username and password fields<br>username = driver.find_element(&quot;id&quot;, &quot;username&quot;)<br>password = driver.find_element(&quot;id&quot;, &quot;password&quot;)<br><br># Enter your credentials<br>username.send_keys(&quot;your_username&quot;)<br>password.send_keys(&quot;your_password&quot;)<br><br># Submit the form<br>login_button = driver.find_element(&quot;id&quot;, &quot;loginButton&quot;)<br>login_button.click()<br><br>print(&quot;Login successful!&quot;)<br>driver.quit()</pre><h3>How It Works:</h3><ol><li><strong>Browser Driver</strong>: Selenium uses a browser driver (e.g., ChromeDriver) to control the browser.</li><li><strong>Element Selection</strong>: Locate web elements using identifiers like id, class, or name.</li><li><strong>Simulating Actions</strong>: Perform actions like typing, clicking, and navigating.</li></ol><h3>Example 2: Scraping Data from a Website</h3><pre>from selenium import webdriver<br><br># Launch browser<br>driver = webdriver.Chrome()<br><br># Open the website<br>driver.get(&quot;https://example.com/products&quot;)<br><br># Scrape product names<br>products = driver.find_elements(&quot;class name&quot;, &quot;product-name&quot;)<br>for product in products:<br>    print(product.text)<br><br>driver.quit()</pre><p>This script fetches product names from a website. It’s a stepping stone toward building advanced web scrapers.</p><h3>Significance of Web Automation</h3><ol><li><strong>Efficiency</strong>: Automating repetitive tasks saves time and reduces errors.</li><li><strong>Scalability</strong>: With web automation, you can process hundreds of tasks faster than manual effort.</li><li><strong>Cost-Effectiveness</strong>: Companies leverage web automation for tasks like testing, reducing human resource needs.</li><li><strong>Real-World Applications</strong>:</li></ol><ul><li><strong>E-commerce</strong>: Monitor price changes and trends.</li><li><strong>Content Management</strong>: Automate blog posts or social media updates.</li><li><strong>Web Testing</strong>: Simulate user behavior to detect bugs.</li></ul><h3>Overcoming Challenges</h3><p>While web automation is powerful, it comes with challenges:</p><ul><li><strong>Dynamic Websites</strong>: Modern websites often load content dynamically with JavaScript, requiring tools like Selenium.</li><li><strong>Rate Limits</strong>: Websites might block excessive automated requests.</li><li><strong>Maintenance</strong>: Websites update their structure, so your scripts may need adjustments.</li></ul><h3>What I Loved About Web Automation</h3><p>Web automation made me feel like I was giving my Python skills a superpower. The ability to control browsers programmatically and scrape information efficiently opens a new dimension of possibilities in both personal projects and professional tasks.</p><h3>What’s Next?</h3><p>Having learned the basics of web automation, I plan to explore:</p><ol><li><strong>Advanced Selenium Features</strong>: Handling pop-ups, dropdowns, and file uploads.</li><li><strong>Headless Browsing</strong>: Running scripts without opening a browser window for faster performance.</li><li><strong>Integrating Automation with APIs</strong>: For even more streamlined workflows.</li></ol><p>Web automation isn’t just a skill; it’s a tool for innovation and problem-solving in the digital age. Whether you’re a programmer, researcher, or entrepreneur, mastering it can transform how you interact with the web.</p><p>Stay tuned as I continue my Python journey and uncover more exciting applications!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37d8352a53e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 28: Unlocking the Power of APIs in Python]]></title>
            <link>https://medium.com/@abishashrestha04/day-28-unlocking-the-power-of-apis-in-python-9223ec3eb437?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/9223ec3eb437</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 06:55:00 GMT</pubDate>
            <atom:updated>2024-12-26T06:55:00.879Z</atom:updated>
            <content:encoded><![CDATA[<p>APIs, or Application Programming Interfaces, are like digital bridges, enabling different applications to communicate seamlessly. On Day 28 of my Python learning journey, I explored APIs and discovered their significance in building modern, connected applications. Here’s what I learned, complete with examples and why mastering APIs is a game-changer for any programmer.</p><h3>What Are APIs, and Why Are They Important?</h3><p>APIs allow developers to access the functionality of another application or service without knowing its inner workings. For example, every time you check the weather on a mobile app, book a ride, or stream a video, APIs are working behind the scenes.</p><p>For Python developers, APIs open the door to integrating powerful services, automating workflows, and building smarter applications. Imagine creating a program that fetches real-time stock prices or posts tweets directly from your Python script — APIs make it all possible.</p><h3>Core Concepts: Requests and Responses</h3><p>Understanding APIs begins with HTTP methods like:</p><ul><li><strong>GET</strong>: Retrieve data (e.g., fetch weather updates).</li><li><strong>POST</strong>: Send data (e.g., add an entry to a database).</li></ul><p>APIs communicate using structured data formats like <strong>JSON</strong> or <strong>XML</strong>, which Python can easily handle.</p><h3>Example: Fetching Weather Data</h3><p>Here’s a simple Python program that uses the OpenWeatherMap API to fetch the current temperature of a city:</p><pre>import requests<br><br># Replace &#39;your_api_key&#39; with an actual API key<br>api_key = &quot;your_api_key&quot;<br>city = &quot;London&quot;<br>url = f&quot;http://api.openweathermap.org/data/2.5/weather?q={city}&amp;appid={api_key}&amp;units=metric&quot;<br><br>response = requests.get(url)<br><br>if response.status_code == 200:<br>    data = response.json()<br>    temperature = data[&quot;main&quot;][&quot;temp&quot;]<br>    print(f&quot;The temperature in {city} is {temperature}°C.&quot;)<br>else:<br>    print(&quot;Failed to fetch weather data. Check your API key or city name.&quot;)</pre><h3>How It Works:</h3><ol><li><strong>requests.get(url)</strong>: Makes a GET request to the API endpoint.</li><li><strong>JSON Parsing</strong>: The response.json() method converts the JSON data into a Python dictionary.</li><li><strong>Error Handling</strong>: The response.status_code ensures successful data retrieval.</li></ol><h3>Significance of APIs in Python</h3><p>APIs are not just tools — they’re gateways to building practical, real-world applications:</p><ul><li><strong>Automation</strong>: Automate repetitive tasks, such as sending emails or managing databases.</li><li><strong>Data Access</strong>: Fetch real-time data, from stock prices to COVID-19 statistics.</li><li><strong>Scalability</strong>: Enhance your projects with features from popular services like Google Maps or Twitter.</li><li><strong>Integration</strong>: Connect your Python applications to countless platforms and services.</li></ul><h3>Another Example: Posting Data to an API</h3><p>Here’s an example of sending data to an API using the POST method:</p><pre>import requests<br><br>url = &quot;https://jsonplaceholder.typicode.com/posts&quot;<br>data = {<br>    &quot;title&quot;: &quot;Learning APIs in Python&quot;,<br>    &quot;body&quot;: &quot;APIs make programming incredibly powerful!&quot;,<br>    &quot;userId&quot;: 1<br>}<br><br>response = requests.post(url, json=data)<br><br>if response.status_code == 201:  # HTTP 201: Created<br>    print(&quot;Data successfully sent!&quot;)<br>    print(&quot;Response:&quot;, response.json())<br>else:<br>    print(&quot;Failed to send data.&quot;)</pre><p>This snippet demonstrates how you can create resources on a server, such as adding a new blog post or user entry.</p><h3>Key Takeaways</h3><ol><li><strong>APIs Simplify Integration</strong>: They allow your Python programs to access and use data or functionality from other services.</li><li><strong>Learning APIs is Future-Proof</strong>: From web development to AI, APIs are indispensable in countless domains.</li><li><strong>Practical Applications</strong>: Whether automating mundane tasks or building an innovative project, APIs give your Python code superpowers.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9223ec3eb437" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 27- Mastering Python’s datetime Module: A Comprehensive Guide]]></title>
            <link>https://medium.com/@abishashrestha04/day-27-mastering-pythons-datetime-module-a-comprehensive-guide-901693acccdb?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/901693acccdb</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 14:43:57 GMT</pubDate>
            <atom:updated>2024-12-23T14:43:57.503Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with dates and times in Python, the datetime module is a must-have in your programming toolkit. It allows you to handle date and time operations effortlessly, from simple date formatting to complex time calculations. Here’s a detailed yet concise guide to using the datetime module effectively.</p><h3>Getting Started with datetime</h3><p>To use the datetime module, you need to import it first:</p><pre>import datetime</pre><h3>Creating Dates and Times</h3><p>You can create date and time objects using the datetime class:</p><pre># Creating a date object<br>my_date = datetime.date(2024, 12, 21)<br>print(&quot;Date:&quot;, my_date)  # Output: 2024-12-21<br><br># Creating a time object<br>my_time = datetime.time(14, 30, 45)<br>print(&quot;Time:&quot;, my_time)  # Output: 14:30:45<br><br># Creating a combined datetime object<br>my_datetime = datetime.datetime(2024, 12, 21, 14, 30, 45)<br>print(&quot;Datetime:&quot;, my_datetime)  # Output: 2024-12-21 14:30:45</pre><h3>Getting the Current Date and Time</h3><p>To fetch the current date and time:</p><pre>current_datetime = datetime.datetime.now()<br>print(&quot;Current Date and Time:&quot;, current_datetime)</pre><p>If you only need the date or time:</p><pre>current_date = datetime.date.today()<br>print(&quot;Current Date:&quot;, current_date)  # Output: YYYY-MM-DD<br><br>current_time = current_datetime.time()<br>print(&quot;Current Time:&quot;, current_time)  # Output: HH:MM:SS.microseconds</pre><h3>Formatting Dates and Times</h3><p>The strftime() method allows you to format dates and times into human-readable strings:</p><pre>formatted_date = current_datetime.strftime(&quot;%d-%m-%Y %H:%M:%S&quot;)<br>print(&quot;Formatted Datetime:&quot;, formatted_date)  # Output: 21-12-2024 14:30:45</pre><p>Common format codes:</p><ul><li>%d: Day of the month</li><li>%m: Month</li><li>%Y: Year</li><li>%H: Hour (24-hour clock)</li><li>%M: Minute</li><li>%S: Second</li></ul><h3>Parsing Strings into datetime Objects</h3><p>Use the strptime() method to convert a string into a datetime object:</p><pre>date_string = &quot;21-12-2024 14:30:45&quot;<br>parsed_date = datetime.datetime.strptime(date_string, &quot;%d-%m-%Y %H:%M:%S&quot;)<br>print(&quot;Parsed Datetime:&quot;, parsed_date)</pre><h3>Date Arithmetic</h3><p>Perform operations like adding or subtracting days using timedelta:</p><pre>current_date = datetime.date.today()<br>print(&quot;Current Date:&quot;, current_date)  # Output: YYYY-MM-DD<br><br>current_time = current_datetime.time()<br>print(&quot;Current Time:&quot;, current_time)  # Output: HH:MM:SS.microseconds</pre><h3>Comparing Dates and Times</h3><p>You can compare datetime objects using comparison operators:</p><pre>date1 = datetime.date(2024, 12, 21)<br>date2 = datetime.date(2024, 12, 25)<br><br>print(date1 &lt; date2)  # Output: True<br>print(date1 == date2)  # Output: False</pre><h3>Practical Example: Countdown Timer</h3><p>Here’s a simple countdown program using datetime:</p><pre>import time<br><br>event_date = datetime.datetime(2024, 12, 31, 23, 59, 59)<br>while True:<br>    now = datetime.datetime.now()<br>    remaining_time = event_date - now<br>    print(f&quot;Time left: {remaining_time}&quot;, end=&quot;\r&quot;)<br>    if remaining_time.total_seconds() &lt;= 0:<br>        print(&quot;Happy New Year!&quot;)<br>        break<br>    time.sleep(1)</pre><h3>Conclusion</h3><p>Python’s datetime module is incredibly versatile and essential for managing date and time in your projects. From basic operations to complex calculations, it’s the go-to tool for handling temporal data efficiently. Experiment with these examples and discover how datetime can simplify your coding tasks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=901693acccdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 26: Error Handling In Python]]></title>
            <link>https://medium.com/@abishashrestha04/day-26-error-handling-in-python-5e93bcfbc7ea?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e93bcfbc7ea</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 20 Dec 2024 11:10:06 GMT</pubDate>
            <atom:updated>2024-12-20T11:10:06.550Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started learning Python, encountering errors felt like hitting a brick wall. But on Day 26 of my journey, I discovered the magic of error handling — and everything changed. Learning how to gracefully manage errors not only made my code more robust but also boosted my confidence as a developer. Let me share my experience and insights on this essential Python concept.</p><h3>Why Learn Error Handling?</h3><p>Errors are inevitable in programming. Whether it’s a typo, an unexpected input, or a network failure, something will go wrong at some point. Error handling allows you to anticipate these problems and respond appropriately, ensuring that your program doesn’t crash and burn. It’s like adding a safety net to your code.</p><h3>Types of Errors in Python</h3><p>Before diving into error handling, it’s important to understand the common types of errors:</p><ol><li><strong>Syntax Errors</strong>: Mistakes in the structure of your code, like missing colons or parentheses.</li><li><strong>Runtime Errors</strong>: Errors that occur during program execution, such as division by zero or accessing a non-existent file.</li><li><strong>Logical Errors</strong>: Bugs that result in incorrect output due to flawed logic, which Python won’t catch automatically.</li></ol><h3>Tools of the Trade</h3><p>Python provides several tools for handling errors:</p><ul><li><strong>try</strong>: The block where you place code that might raise an error.</li><li><strong>except</strong>: The block where you handle the error.</li><li><strong>else</strong>: Code that runs if no errors occur.</li><li><strong>finally</strong>: Code that runs no matter what, perfect for cleanup tasks.</li></ul><h3>Steps to Implement Error Handling</h3><ol><li><strong>Identify Potential Errors</strong>: Look for parts of your code that might fail, such as file operations, user inputs, or network requests.</li><li><strong>Wrap Code in try-except Blocks</strong>: Here’s a simple example:</li></ol><pre>try:<br>    number = int(input(&quot;Enter a number: &quot;))<br>    result = 10 / number<br>    print(f&quot;Result: {result}&quot;)<br>except ValueError:<br>    print(&quot;Please enter a valid number.&quot;)<br>except ZeroDivisionError:<br>    print(&quot;Division by zero is not allowed.&quot;)<br>finally:<br>    print(&quot;Thank you for using the program.&quot;)</pre><p><strong>3. Test Your Error Handling</strong>: Deliberately cause errors to see how your program responds. For example, input non-numeric values or zero in the above script.</p><p><strong>4. Refine Your Approach</strong>: Add specific error messages or log errors to a file for debugging.</p><h3>Lessons Learned</h3><p>Error handling taught me to anticipate the unexpected. It’s not just about fixing bugs; it’s about designing programs that can gracefully recover from failure. Writing effective error-handling code feels like having a conversation with your program, guiding it on what to do when things go wrong.</p><h3>What’s Next?</h3><p>I’m excited to explore more advanced techniques like custom exceptions and integrating error handling with logging systems. These skills will be invaluable as I tackle larger projects.</p><p>If you’re new to Python, I encourage you to practice error handling early. It’s a game-changer that will make your programs more reliable and user-friendly. Remember, errors are just opportunities to learn and improve.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e93bcfbc7ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day-25 How to make Installer]]></title>
            <link>https://medium.com/@abishashrestha04/day-25-how-to-make-installer-62b95a252dfd?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/62b95a252dfd</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 20 Dec 2024 11:07:14 GMT</pubDate>
            <atom:updated>2024-12-20T11:07:14.143Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started learning Python, I never imagined that one day I’d be making my own installer. Yet here I am, on day 25 of my Python journey, transforming code into a packaged application that anyone can install and use. It’s an exhilarating feeling to turn lines of logic into something tangible and user-friendly. If you’ve been dreaming about creating your own installer but don’t know where to start, let me walk you through the process. Trust me, it’s simpler than you think!</p><h3>Why Create an Installer?</h3><p>As a developer, sharing your program with others is part of the fun. However, not everyone is tech-savvy enough to clone repositories or run Python scripts in the terminal. Creating an installer bridges this gap by packaging your program into a format that users can easily download, install, and run. It’s a crucial step if you’re thinking of making your work accessible to a wider audience.</p><h3>Tools of the Trade</h3><p>To make an installer, you’ll need a few tools. The one I used is <strong>PyInstaller</strong>, a fantastic Python library that converts your scripts into standalone executables. It wraps up your code, dependencies, and resources into one neat package.</p><p>Here’s what I used to get started:</p><ul><li><strong>Python</strong>: The language of choice.</li><li><strong>PyInstaller</strong>: The magic wand for creating executables.</li><li>A sprinkle of enthusiasm and curiosity.</li></ul><h3>Steps to Build Your Installer</h3><ol><li><strong>Install PyInstaller</strong>: Open your terminal or command prompt and run:</li></ol><ul><li>pip install pyinstaller</li></ul><ol><li><strong>Prepare Your Script</strong>: Make sure your Python script is ready and fully functional. For example, I had a simple program that calculates interest rates for a hypothetical banking app.</li><li><strong>Run PyInstaller</strong>: In the terminal, navigate to the directory where your script is located and run:</li></ol><ul><li>pyinstaller --onefile your_script.py</li></ul><ol><li>The --onefile flag ensures that your output is a single executable file.</li><li><strong>Locate Your Executable</strong>: After running the command, you’ll find a folder named dist. Inside, there’s your shiny new .exe file (or equivalent for other operating systems).</li><li><strong>Test It</strong>: Run the executable to make sure everything works smoothly.</li><li><strong>Share It</strong>: Congratulations, you’ve created your first installer! Share it with friends or colleagues and watch them marvel at your creation.</li></ol><h3>Lessons Learned</h3><p>This wasn’t just about learning a technical skill; it was about breaking down barriers. Before starting, I’d assumed creating an installer required deep knowledge of operating systems and packaging tools. But like most things in programming, taking it step-by-step made the process manageable and, dare I say, enjoyable.</p><h3>What’s Next?</h3><p>Creating an installer has opened up a world of possibilities. Now, I’m brainstorming ways to make my projects more professional — adding icons, customizing installation paths, and maybe even creating a full GUI for my next project. The sky’s the limit!</p><p>If you’re on your own Python learning journey, I encourage you to try this out. The sense of accomplishment is unmatched, and it’s a skill you can proudly showcase in your portfolio. Remember, learning Python isn’t just about writing scripts; it’s about building something meaningful and sharing it with the world.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62b95a252dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 24- Exploring File Handling and AI with Python]]></title>
            <link>https://medium.com/@abishashrestha04/day-24-exploring-file-handling-and-ai-with-python-61faa23dc5d8?source=rss-6a43c10a5902------2</link>
            <guid isPermaLink="false">https://medium.com/p/61faa23dc5d8</guid>
            <dc:creator><![CDATA[Abisha Shrestha]]></dc:creator>
            <pubDate>Fri, 20 Dec 2024 07:46:27 GMT</pubDate>
            <atom:updated>2024-12-20T07:46:27.401Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is renowned for its versatility, and two of its standout capabilities are efficient file handling and the ability to create AI-powered applications. Learning these skills not only boosts your programming toolkit but also unlocks the potential to work with data, build intelligent systems, and create real-world solutions.</p><p>Let’s delve into file handling basics and explore how Python integrates with AI frameworks to pave the way for exciting projects.</p><p><strong>File Handling in Python</strong></p><p>File handling enables your programs to read, write, and manipulate data stored in files. Python’s built-in functionality makes it straightforward to work with files of various types, such as text files, CSVs, and JSONs.</p><p><strong>1. Basics of File Operations</strong></p><p><strong>Opening and Closing Files</strong></p><p>Python’s open() function allows you to access files. You can specify the mode for reading (r), writing (w), or appending (a).</p><pre># Opening a file<br> file = open(&quot;example.txt&quot;, &quot;w&quot;)<br> file.write(&quot;Hello, Python File Handling!&quot;)<br> file.close()<br> <br> # Reading from a file<br> file = open(&quot;example.txt&quot;, &quot;r&quot;)<br> content = file.read()<br> print(content)<br> file.close()</pre><p><strong>Using with Statement</strong></p><p>The with statement simplifies file handling by automatically closing the file after operations are complete.</p><pre>with open(&quot;example.txt&quot;, &quot;r&quot;) as file:<br> content = file.read()<br> print(content)</pre><p><strong>2. Working with Different File Types</strong></p><p><strong>CSV Files</strong></p><p>CSV files are commonly used to store tabular data. The csv module in Python provides tools for reading and writing CSVs.</p><pre>import csv<br> <br> # Writing to a CSV file<br> with open(&quot;data.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as file:<br> writer = csv.writer(file)<br> writer.writerow([&quot;Name&quot;, &quot;Age&quot;, &quot;City&quot;])<br> writer.writerow([&quot;Alice&quot;, 30, &quot;New York&quot;])<br> <br> # Reading from a CSV file<br> with open(&quot;data.csv&quot;, &quot;r&quot;) as file:<br> reader = csv.reader(file)<br> for row in reader:<br> print(row)</pre><p><strong>JSON Files</strong></p><p>JSON files store structured data in a lightweight format. The json module helps parse and write JSON data.</p><pre>import csv<br> <br> # Writing to a CSV file<br> with open(&quot;data.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as file:<br> writer = csv.writer(file)<br> writer.writerow([&quot;Name&quot;, &quot;Age&quot;, &quot;City&quot;])<br> writer.writerow([&quot;Alice&quot;, 30, &quot;New York&quot;])<br> <br> # Reading from a CSV file<br> with open(&quot;data.csv&quot;, &quot;r&quot;) as file:<br> reader = csv.reader(file)<br> for row in reader:<br> print(row)</pre><p><strong>Introduction to AI with Python</strong></p><p>Python is the leading language for AI development due to its rich ecosystem of libraries and frameworks. Here, we’ll introduce two key libraries: <strong>NumPy</strong> for data manipulation and <strong>scikit-learn</strong> for machine learning.</p><p><strong>1. NumPy: Working with Arrays</strong></p><p>NumPy is a powerful library for numerical computations. It’s essential for handling large datasets in AI projects.</p><pre>import numpy as np<br> <br> # Creating a NumPy array<br> array = np.array([1, 2, 3, 4, 5])<br> print(&quot;Array:&quot;, array)<br> <br> # Performing operations<br> print(&quot;Mean:&quot;, np.mean(array))<br> print(&quot;Standard Deviation:&quot;, np.std(array))</pre><p><strong>2. Building a Simple Machine Learning Model</strong></p><p><strong>Linear Regression with scikit-learn</strong></p><p>Linear regression is a foundational concept in AI. It predicts a continuous target variable based on input features.</p><pre>from sklearn.linear_model import LinearRegression<br> import numpy as np<br> <br> # Sample data<br> X = np.array([[1], [2], [3], [4], [5]]) # Features<br> y = np.array([2, 4, 6, 8, 10]) # Target<br> <br> # Initialize the model<br> model = LinearRegression()<br> <br> # Train the model<br> model.fit(X, y)<br> <br> # Make predictions<br> predictions = model.predict([[6], [7]])<br> print(&quot;Predictions:&quot;, predictions)</pre><p><strong>Mini-Project: Combining File Handling and AI</strong></p><p>Let’s build a project that integrates file handling and AI. We’ll use a CSV file to store data and train a machine learning model to make predictions.</p><p><strong>Project: Predicting House Prices</strong></p><p><strong>Step 1: Create a CSV File with Data</strong></p><pre>import csv<br> <br> # Creating a dataset<br> with open(&quot;house_data.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as file:<br> writer = csv.writer(file)<br> writer.writerow([&quot;Size&quot;, &quot;Price&quot;])<br> writer.writerow([500, 150000])<br> writer.writerow([1000, 300000])<br> writer.writerow([1500, 450000])<br> writer.writerow([2000, 600000])</pre><p><strong>Step 2: Train a Model Using the Data</strong></p><pre>import numpy as np<br> from sklearn.linear_model import LinearRegression<br> import csv<br> <br> # Load data from CSV<br> sizes = []<br> prices = []<br> with open(&quot;house_data.csv&quot;, &quot;r&quot;) as file:<br> reader = csv.reader(file)<br> next(reader) # Skip header<br> for row in reader:<br> sizes.append(float(row[0]))<br> prices.append(float(row[1]))<br> <br> # Convert to NumPy arrays<br> X = np.array(sizes).reshape(-1, 1)<br> y = np.array(prices)<br> <br> # Train the model<br> model = LinearRegression()<br> model.fit(X, y)<br> <br> # Predict house price for a new size<br> new_size = 2500<br> predicted_price = model.predict([[new_size]])<br> print(f&quot;Predicted price for a house of size {new_size}: {predicted_price[0]}&quot;)</pre><p>Enjoy your time coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61faa23dc5d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>