<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Artificial Corner: AI & Python 🐍]]></title><description><![CDATA[For Programmers: Learn Python, coding concepts, automation, and create AI apps (even if you're a complete beginner)]]></description><link>https://artificialcorner.com/s/ai-and-python</link><image><url>https://substackcdn.com/image/fetch/$s_!JsL9!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3e1cd4a-d846-4e20-ad60-d8573787c94d_1080x1080.png</url><title>Artificial Corner: AI &amp; Python 🐍</title><link>https://artificialcorner.com/s/ai-and-python</link></image><generator>Substack</generator><lastBuildDate>Thu, 23 Jul 2026 11:32:51 GMT</lastBuildDate><atom:link href="https://artificialcorner.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Frank Andrade]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[artificialcorner@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[artificialcorner@substack.com]]></itunes:email><itunes:name><![CDATA[Frank Andrade]]></itunes:name></itunes:owner><itunes:author><![CDATA[Frank Andrade]]></itunes:author><googleplay:owner><![CDATA[artificialcorner@substack.com]]></googleplay:owner><googleplay:email><![CDATA[artificialcorner@substack.com]]></googleplay:email><googleplay:author><![CDATA[Frank Andrade]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Python in Excel: Why It Matters for Data Analysts]]></title><description><![CDATA[Here's another reason to learn Python in 2025.]]></description><link>https://artificialcorner.com/p/python-in-excel-why-it-matters-for</link><guid isPermaLink="false">https://artificialcorner.com/p/python-in-excel-why-it-matters-for</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Mon, 09 Jun 2025 17:08:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bycS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bycS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bycS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bycS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bycS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bycS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bycS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg" width="800" height="530" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:530,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bycS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bycS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bycS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bycS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05afb932-23d2-4b7d-bf31-26c6000b3b1e_800x530.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image credit: <a href="https://www.pexels.com/photo/close-up-photo-of-survey-spreadsheet-590022/">Pexels</a></figcaption></figure></div><p>Two years ago, Microsoft announced Python in Excel.</p><p>Microsoft said it was a significant evolution in the analytical capabilities available within Excel. They combined the power of Python with the flexibility of Excel.</p><p>This integration is another good reason to learn Python in 2025.</p><p>With this integration, you can write Python code in Excel cells, create advanced visualizations using libraries such as matplotlib and seaborn, and even apply machine learning techniques using libraries like scikit-learn and statsmodels.</p><p>Python in Excel will change the way Excel analysts work. Just a few months ago, it became generally available to eligible <a href="https://techcommunity.microsoft.com/blog/excelblog/python-in-excel-%e2%80%93-available-now/4240212">Enterprise and Business users</a>. If you&#8217;ve recently taken one of my Python courses or are unsure whether to learn Python in 2025, keep reading.</p><blockquote><p><em>Artificial Corner is a reader-supported publication. Please, consider becoming a free or paid subscriber&#128071;</em> </p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Excel analysts will have to learn to code</h4><p>Excel is probably the most popular tool for data analysis because of its usability and flexibility.</p><p>Excel users don&#8217;t need to know how to code to clean data or create visualizations and macros. With a couple of formulas and some clicks, we can wrangle data and create pivot tables and charts in Excel.</p><p>Excel alone was great for doing basic data analysis, but its limitations didn&#8217;t allow data analysts to do complex data transformations and create advanced visualizations (let alone apply machine learning techniques). In contrast, programming languages like Python can handle complex computations.</p><p>Now, Excel analysts will need to learn Python to future-proof their careers.</p><p>But will they adapt? Well, the closest most Excel users have been to a programming language was Visual Basic for Applications (VBA), but even those who write VBA code don&#8217;t call themselves &#8220;programmers.&#8221; That&#8217;s why most Excel users saw learning to code as something either complex or unnecessary (why learn to code when you could get a pivot table with one click?)</p><p>Hopefully, Excel analysts will adapt. The good news is that Python is an easy language to learn. Excel users don&#8217;t even need to install Python on their computers and download a code editor to start writing Python code. In fact, there&#8217;s a new PY function in Excel that allows users to write Python code in an Excel cell.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DNqy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DNqy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 424w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 848w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 1272w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DNqy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin" width="960" height="466" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:466,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DNqy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 424w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 848w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 1272w, https://substackcdn.com/image/fetch/$s_!DNqy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f090de5-87d6-4400-be91-32335e9092bb_960x466.bin 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://techcommunity.microsoft.com/t5/excel-blog/announcing-python-in-excel-combining-the-power-of-python-and-the/ba-p/3893439">Microsoft Blog</a></figcaption></figure></div><p>Amazing, isn&#8217;t it? Now we can write Python code in a cell to get a dataframe, and visualizations inside our worksheet.</p><p>This is definitely an evolution in the analytical capabilities in Excel.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Python libraries for data analysis are available in Excel. This benefits both Python and Excel analysts</h4><p>Now it&#8217;s possible to use powerful Python libraries such as pandas, seaborn, and scikit-learn in an Excel workbook. These libraries will help us do advanced analytics, create amazing visualizations, and apply machine learning, predictive analytics, and forecasting techniques in Excel.</p><p>Excel analysts who can&#8217;t write Python code will have to settle for pivot tables, formulas, and Excel charts, but those who adapt will take their analytical skills to the next level.</p><p>Here are some examples of how doing data analysis looks with Python in Excel.</p><p>With Python in Excel, we&#8217;ll be able to use regular expressions (regex) to locate specific strings or patterns of text in cells. In the example below, a regex is used to extract dates from text.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QbBN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QbBN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 424w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 848w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 1272w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QbBN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin" width="960" height="929" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:929,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QbBN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 424w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 848w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 1272w, https://substackcdn.com/image/fetch/$s_!QbBN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad67b29f-f8c4-4807-a783-e2d5b09a4e1b_960x929.bin 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://techcommunity.microsoft.com/t5/excel-blog/announcing-python-in-excel-combining-the-power-of-python-and-the/ba-p/3893439">Microsoft Blog</a></figcaption></figure></div><p>Advanced visualizations such as heatmaps, violin maps, and swarm plots are now possible in Excel with Seaborn. Here&#8217;s the typical pair plot we&#8217;d create with Seaborn, but now displayed in an Excel worksheet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KxOL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KxOL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 424w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 848w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 1272w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KxOL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png" width="800" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KxOL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 424w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 848w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 1272w, https://substackcdn.com/image/fetch/$s_!KxOL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6dc743-27fd-48b5-b090-3c1dac1e594d_800x823.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://techcommunity.microsoft.com/t5/excel-blog/announcing-python-in-excel-combining-the-power-of-python-and-the/ba-p/3893439">Microsoft Blog</a></figcaption></figure></div><p>Last, but not least, now you can use machine learning models like a DecisionTreeClassifier in an Excel worksheet and fit the model using pandas dataframes.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Python in Excel will bridge the gap between Python and Excel analysts</h4><p>The days when Python and Excel analysts struggled to work together are nearly over.</p><p>Excel analysts will need to adapt to these new changes, not only to have Python as a new skill in their curriculum but to future-proof their careers. Learning VBA won&#8217;t be as relevant for Excel analysts as learning Python libraries such as Pandas and Numpy.</p><p>Python calculations will be run in the Microsoft Cloud, so even analysts running computers with limited resources will experience faster processing for complex computations.</p><p>On the other hand, Python analysts will be able to collaborate more easily with Excel analysts, bridging the gap between them.</p><p>Learning Python in 2025 becomes more relevant thanks to this integration.</p>]]></content:encoded></item><item><title><![CDATA[A Free 17-Hour Course to Learn Python for Data Science (for Beginners)]]></title><description><![CDATA[Learn data science with Python from scratch.]]></description><link>https://artificialcorner.com/p/a-free-17-hour-course-to-learn-python</link><guid isPermaLink="false">https://artificialcorner.com/p/a-free-17-hour-course-to-learn-python</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 29 May 2025 14:41:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TBvx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TBvx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TBvx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TBvx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2241210,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://artificialcorner.com/i/163911729?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TBvx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!TBvx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6b617b-7b8b-4abc-94ed-27ad7e40cb11_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image created with ChatGPT</figcaption></figure></div><p>Learning Python is a fundamental first step in becoming a data scientist. Python&#8217;s simplicity and ecosystem have made it the most popular programming language for data science.</p><p>That&#8217;s why I created a <a href="https://youtu.be/CMEWVn1uZpQ?si=z1TrsslzSys7oumB">free 17-hour video course</a> to learn it from scratch!</p><p>This complete course for absolute beginners goes from learning basic Python to applying machine learning on a text classification problem. Each topic builds on the previous ones, reflecting the real workflow of data science projects.</p><p>Let&#8217;s see each module in more detail!</p><blockquote><p>To get weekly articles like this, subscribe &#128071; After subscribing, check my welcome email to download my Python, ChatGPT, and more cheat sheets :)</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Module 1: Python Basics for Data Science</h4><p>For those new to programming, a crash course in core Python is crucial before diving into data science tools.</p><p>In this introductory module, we&#8217;ll learn basic Python syntax, data types (numbers, strings, lists, dictionaries), control structures (loops and conditionals), and functions. Mastering these basics will provide a strong foundation to write and understand code for data analysis tasks.</p><p>What does coding in Python look like?</p><pre><code># Basic Python operations

x = 5
y = 3
print("Sum:", x + y)

# Looping through a list

fruits = ["Apple", "Banana", "Cherry"]
for fruit in fruits:
    print("I like", fruit)</code></pre><p>Here&#8217;s the link to watch the first module of this course</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=xGrTD8fkjmlvBuum&amp;t=1710">Link: Module 1 - Python Basics for Data Science</a></strong></p><h4>Module 2: Introduction to Pandas and NumPy</h4><p>With core Python skills in place, the next step is learning NumPy and pandas, two libraries that form the backbone of data science in Python. These libraries provide high-performance data structures and functions that make it vastly easier to work with data.</p><p>Why are Pandas and NumPy essential? Together, they allow data scientists to load, manipulate, and analyze data efficiently. For example, with pandas one can read a CSV file into a DataFrame in one line of code and then easily filter or summarize it. NumPy provides the numerical foundation, enabling operations like vectorized calculations (applying a formula to an entire array) that are both convenient and fast. </p><p>The snippet below shows how one might use NumPy and pandas in practice. We create a NumPy array and compute a statistic, and we create a pandas DataFrame to perform an operation on a column:</p><pre><code>import numpy as np
import pandas as pd

# Using NumPy for numerical computations
data = np.array([1, 2, 3, 4])
print("NumPy mean:", data.mean())

# Using pandas for tabular data manipulation
df = pd.DataFrame({'A': [10, 20, 30],
                   'B': [2, 4, 6]})
print("DataFrame sum of A:", df['A'].sum())</code></pre><p>Here&#8217;s the link to watch the second module of this course:</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=6sxfM-VXhHN4mqw8&amp;t=6354">Link: Module 2 - Introduction to Pandas and NumPy</a></strong></p><h4>Module 3:  Web Scraping with Pandas (Project #1)</h4><p>The goal of this first project is to learn how to gather data from the web and import it into Python for analysis using pandas.</p><p>In many real-world situations, data is not neatly provided as a file &#8211; it might be embedded in web pages (HTML tables, lists, etc.) or available through web APIs. Web scraping is the technique of extracting data from websites, and it&#8217;s an essential skill for data scientists to build their own datasets. This project teaches beginners how to perform basic web scraping and load the data into a pandas DataFrame, which they can then analyze.</p><p>Pandas provides convenient functions for simple scraping tasks. For example, if a Wikipedia page contains a table, <code>read_html</code> can often fetch it directly. For more complex web scraping tasks &#8211; such as handling JavaScript, or scraping non-tabular data, we would need more powerful libraries like Selenium or Scrapy. That said,  pandas will give you a gentle introduction to web scraping.</p><p>Web scraping with pandas is sometimes as easy as this:</p><pre><code>import pandas as pd

url = "site link"
tables = pd.read_html(url)
df = tables[0]                    
print(df.head())    </code></pre><p>Here&#8217;s the link to watch the third module of this course:</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=CPf0xYd2j_YoxWvh&amp;t=12894">Link: Module 3 - Web Scraping with Pandas (Project #1)</a></strong></p><h4>Module 4: Filtering Data &amp; Data Extraction</h4><p>Once data is loaded into a pandas DataFrame, a fundamental operation is filtering the data. &#8220;Filtering&#8221; means selecting only those subsets of data (rows or columns) that meet certain criteria</p><p>Why is filtering essential? Real datasets often contain more information than you need for a particular analysis. For example, if you have a dataset of worldwide economic indicators but you are only studying data for a specific country, you would filter the dataset to that country. Similarly, if you have collected time-series data for a range of dates but only need the last year of data, filtering by date is necessary. Also, in data cleaning (a module we&#8217;ll see later), filtering is used to remove outliers or invalid entries.</p><p>Here&#8217;s what filtering data looks like:</p><pre><code>import pandas as pd

df = pd.DataFrame({'Name': ['Alice', 'Bob', 'Cathy'],
                   'Age':  [24, 27, 19]})

adults = df[df['Age'] &gt; 20]   # filter rows where Age &gt; 20
print(adults)</code></pre><p>Here&#8217;s the link to watch the fourth module of this course:</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=8NQF_yBEh3Pa5VtK&amp;t=15349">Link: Module 4 - Filtering Data &amp; Data Extraction</a></strong></p><h4>Module 5: Making Data Visualizations (Project #2)</h4><p>Data visualization is an important part of data science. It allows us to translate complex datasets into visual representations that are easier for the human brain to understand.  By plotting data, we can quickly identify patterns, trends, and outliers that might not be obvious from raw numbers. Visualization is also key to communicating results to others. A well-crafted chart can convey insights that would be hard to glean from tables.</p><p>Python offers different libraries for data visualization, such as Matplotlib and Seaborn. That said, probably the easiest way to make visualizations with Python is using the pandas library. </p><p>This second project consists in making visualizations such as barplots, histograms, scatterplots, and more with pandas.</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=SzbY2aNXAefkCiT8&amp;t=29438">Link: Module 5 - Making Data Visualizations (Project #2)</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Module 6: GroupBy, Aggregate Function, and Concatenation</h4><p>Many analytical questions are of the form &#8220;what is the value by some category?&#8221; For example,  &#8220;What is the average income by country?&#8221;, &#8220;How many transactions per day of the week?&#8221; or &#8220;What is the total sales for each product category?&#8220;</p><p>GroupBy allows you to answer these by aggregating data within each subgroup.</p><p>Common aggregation methods include <code>.sum()</code>, <code>.mean()</code>, and <code>.count()</code>, among others. For example, if you want to get the average income for each country present in a dataframe, you&#8217;d do something like this:</p><pre><code><code>df.groupby('Country')['Income'].mean()</code> </code></pre><p>Here&#8217;s the link to watch the fourth module of this course:</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=T4k08jddOf_5SwYF&amp;t=33539">Link: Module 6 - GroupBy and Aggregate Function</a></strong></p><h4>Module 7: Regular Expressions</h4><p>Data scientists often work with textual data, whether it&#8217;s extracting specific information from strings or cleaning and preprocessing raw text for analysis. Regular expressions (regex) are a powerful tool for such tasks. </p><p>A regular expression is essentially a pattern that describes a set of strings. With regex, you can test if a string matches a pattern, find all substrings that match, or replace parts of a string that match a pattern.</p><p>Here&#8217;s an example of how to use regex to filter data inside a dataframe.</p><pre><code>import pandas as pd

# Small dataset
data = {
    'Name': ['Alan', 'Bob', 'Ann'],
    'Age': [25, 22, 27]
}

df = pd.DataFrame(data)

# Using regex to filter names that start with 'A' and end with 'n'
filtered_df = df[df['Name'].str.contains(r'^A.*n$', regex=True)]

print(filtered_df)</code></pre><p>Here&#8217;s the link to watch the seventh module of this course:</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=_HJkS-thP2REKPtY&amp;t=44326">Link: Module 7 - Regular Expressions</a></strong></p><h4>Module 8: Data Cleaning with Pandas (Project #3)</h4><p>&#8220;Garbage in, garbage out&#8221; is a saying that highlights the importance of data cleaning.</p><p>Real-world data is often noisy, incomplete, or inconsistent. Before any analysis or modeling, this raw data needs to be cleaned and structured properly. Data professionals spend a large portion of their time on data cleaning &#8211; by some estimates, around 80% of a data scientist&#8217;s time is spent preparing and cleaning data. Data cleaning is thus one of the <em>essential steps</em> in the data science process, as the quality of insights you can draw is directly linked to the quality of your data.</p><p>In this third project, we will use pandas to perform common data cleaning tasks on a messy dataset.</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=0MMKzK2XS2iYuQdr&amp;t=47860">Link: Module 8&#8202;&#8212;&#8202;Data Cleaning with Pandas (Project #3)</a></strong></p><h4>Module 9: Machine Learning with Python</h4><p>After cleaning and exploring data, the next major step in a data science journey is often to build predictive models &#8211; in other words, to apply machine learning (ML).</p><p>Machine learning allows data scientists to extract patterns from data and make predictions or decisions without being explicitly programmed with rules. In practical terms, this is how we go from analyzing what has happened (descriptive analytics) to predicting what might happen (predictive analytics) or making automated decisions (like classifying an email as spam or not spam). Understanding ML opens up a huge range of applications: you can train a model to predict housing prices from past data, classify images, cluster customers into groups, etc.</p><p>In the video below, we&#8217;ll learn the core concepts of machine learning while building a linear regression model in Python. We'll use 2 basic machine learning libraries in Python: statsmodels and sklearn. </p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=u3jRaDG5O9vYM9E-&amp;t=53612">Link: Module 9 - Machine Learning with Python</a></strong></p><h4>Module 10: Text Classification (Project #4)</h4><p>The goal of this last project is to create a machine learning model that will predict whether a movie review is positive or negative. This is known as binary text classification and will help us explore the scikit-learn library while building a basic machine learning model from scratch.</p><p>Text classification is a supervised learning task where the input features are not numeric measurements but text strings. Thus, it introduces the concept of feature extraction from text. Typically, one must convert text into a numerical representation before feeding it to a machine learning model. The most common approach is the <em>Bag-of-Words</em> model or its variant TF-IDF:</p><ul><li><p>Bag-of-Words: We create features from word occurrences: for each document (text example), we count how often each word from a vocabulary appears. This transforms the text into a vector of numbers (word counts). For example, if our vocabulary is {"bad", "good", "great", "terrible"}, a review "This product is good and great" might transform into [0, 1, 1, 0]</p></li><li><p>TF-IDF: It&#8217;s a refinement of word counts that downweights common words and upweights rare but potentially informative words.</p></li></ul><p>These and more new concepts are covered in the project below.</p><p><strong><a href="https://youtu.be/CMEWVn1uZpQ?si=cHvz1eyPF4dbCxuU&amp;t=55233">Link: Module 10 - Text Classification (Project #4)</a></strong></p><div><hr></div><p>That&#8217;s it! Let your Python for data science journey begin</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[How I’d Learn Python faster using AI]]></title><description><![CDATA[How I&#8217;d use ChatGPT, Gemini, and NotebookLM to learn Python.]]></description><link>https://artificialcorner.com/p/learn-python-ai</link><guid isPermaLink="false">https://artificialcorner.com/p/learn-python-ai</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Fri, 25 Apr 2025 15:03:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6qAi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6qAi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6qAi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6qAi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2358360,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6qAi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6qAi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F437d7fc7-d9bb-4684-834b-5ebb2c0c748f_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Midjoruney</figcaption></figure></div><blockquote><p><em>This is an article written by me that was published on AI Supremacy some weeks ago. Today I&#8217;m making this article free for all of you. </em></p><p><em>If you&#8217;re new, subscribe to get weekly articles like this&#128071;</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p>Tools we know well like ChatGPT and Gemini can make learning to code easier and less frustrating. Also, less-known tools like NotebookLM are changing how we learn new subjects and coding is one of them.</p><p>In this article, we&#8217;ll explore how to make the most of these AI tools for learning to code. Since I often write about the Python programming language, I&#8217;ll use Python as an example. However, everything discussed here can be applied to other programming languages as well.</p><h3>ChatGPT Canvas: Run and debug your code within ChatGPT</h3><p>Canvas is a new interface for working with ChatGPT on writing and coding projects. Thanks to Canvas, now you can use ChatGPT as if it was your AI code editor.</p><p>This is a feature that I&#8217;d definitely use if I had to learn Python again because it allows us to do many things within ChatGPT, such as running Python code, debugging code, and asking in-line feedback and suggestions.</p><p>To use Canvas, just ask ChatGPT to write a simple &#8220;Hello World&#8221; script, and then click on view tools and select &#8220;Canvas.&#8221; Once you press enter, you&#8217;ll see a panel on the right. That&#8217;s your Python environment where you can test your code. Just click on run every time you modify your code, and the results will be printed on the console below. </p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;ef2b3f05-4569-41a2-aef9-a3e74e8513d6&quot;,&quot;duration&quot;:null}"></div><p>If you&#8217;re new to coding, things like installing Python, and setting up your code editor and environment might seem intimidating and frustrating at first. Fortunately, now you can skip these steps and focus on learning to code thanks to ChatGPT Canvas. </p><p>You can also import Python libraries using ChatGPT Canvas. In the example below, Canvas imports matplotlib and numpy to do a task common in data analysis, which is plotting visualizations. You can import many other libraries, but remember that there&#8217;s a limited number of libraries available.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;78cd4557-de50-48ea-ab29-f34f288a5d05&quot;,&quot;duration&quot;:null}"></div><p>Canvas has a button located in the bottom-right corner that displays many features useful for developers and software engineers. These features are:</p><ul><li><p>Review code</p></li><li><p>Port to a  language</p></li><li><p>Fix bugs</p></li><li><p>Add logs</p></li><li><p>Add comments to your code</p></li></ul><p>Besides Canvas, it&#8217;s worth mentioning other ways to learn Python with ChatGPT. My favorite is brainstorming unique projects with ChatGPT. Why projects? It&#8217;s the best way to put the concepts you learned into practice. </p><p>We can use ChatGPT to come up with cool and unique project ideas based on the programming knowledge we have and the things we like.</p><p>Here&#8217;s the prompt I use for this.</p><blockquote><p>Act as a programming mentor. I&#8217;m learning Python and have already learned [topic 1, topic 2, &#8230;]</p><p>What Python projects can I solve? Consider that I like [thing 1, thing 2, &#8230;]</p></blockquote><p>Here&#8217;s an example.</p><blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OyWU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OyWU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 424w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 848w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 1272w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OyWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png" width="800" height="773" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f28ca08a-4bc8-4056-9367-971b478d121d_800x773.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:773,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!OyWU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 424w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 848w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 1272w, https://substackcdn.com/image/fetch/$s_!OyWU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff28ca08a-4bc8-4056-9367-971b478d121d_800x773.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></blockquote><p>Once you select a project, you can ask for the steps to solve it (without making ChatGPT write the code for you).</p><p>In a previous <a href="https://artificialcorner.com/p/behind-ai-1-how-to-learn-python-with">article</a>, I covered other ways to use ChatGPT to learn Python. While some of those suggestions can now be accomplished with just one click using Canvas, others remain relevant.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Turn Gemini into your real-time AI tutor</h3><p>Gemini is Google&#8217;s AI model. One cool feature of Gemini 2.0 is real-time screen sharing. This feature allows us to share our screens with Gemini, enabling it to analyze on-screen content and provide real-time assistance. </p><p>As programmers, we can allow Gemini 2.0 to view our screen and provide real-time guidance for solving any coding problem we encounter.</p><p>Anyone with a Google account can use this feature for free. To use it, go to this <a href="http://aistudio.google.com">site</a>, click on &#8220;stream realtime&#8221; on the left panel, and select &#8220;share screen.&#8221; After that, Gemini will see your screen and you can talk with it in real-time. </p><p>You can open your code editor, start writing code, and ask for guidance from Gemini whenever you need it. Here&#8217;s a demo where I asked Gemini for help to create a Python script that generates ten random numbers.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;9b29fbbd-2552-40d1-9e36-69d088eb1386&quot;,&quot;duration&quot;:null}"></div><p>This is like having an AI tutor that can see whatever you&#8217;re working on 24/7. As a beginner, you can use Gemini to write a script, remember functions, learn terminal commands, set up your code environment, and more!</p><h3>Improve the way you learn to code with NotebookLM</h3><p>NotebookLM is an AI-powered research and note-taking tool developed by Google. You can use NotebookLM to:</p><ul><li><p>Convert long documents (PDFs, slides, links) into easy-to-understand summaries</p></li><li><p>Build your own study guides effortlessly</p></li><li><p>Create a podcast where an AI host walks you through complex material in minutes</p></li></ul><p>This is game-changing for learning new subjects. That&#8217;s why I think this tool will change the way you learn coding.</p><p>How do I use NotebookLM to learn Python? I use it to better understand any Python tutorial or guide I&#8217;m following and even go beyond that by asking questions about the content in the video or guide. To do this, go to <a href="http://notebooklm.google.com">NotebookLM</a>, and then provide the link to a YouTube tutorial or Python guide, book, etc. Once you upload your file, NotebookLM will analyze its content and then we can start a chat with it. </p><p>In the example below, I gave NotebookLM a link to my <a href="https://youtu.be/g_j6ILT-X0k">tutorial</a> on how to send emails with Python. Once it analyzed the video&#8217;s transcript, I could ask it questions like the libraries used in the video or what I should keep into account before writing the script to send emails with Python.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;eb1a4da1-69a7-49a9-9118-f383ca616236&quot;,&quot;duration&quot;:null}"></div><p>If you want to go beyond the tutorial, just generate a podcast from the document uploaded. To generate the podcast, just go to the Audio Overview section and click on Generate.  After some minutes, NotebookLM will generate an engaging audio discussion between two AI-generated hosts. The discussion is a summary of the material with some extra information that will help you deep diver into the topic and even learn new things.</p><p>Here&#8217;s the podcast NotebookLM generated from my YouTube video.</p><div class="native-audio-embed" data-component-name="AudioPlaceholder" data-attrs="{&quot;label&quot;:null,&quot;mediaUploadId&quot;:&quot;09d2e782-e9bf-4282-a49a-369fa727b576&quot;,&quot;duration&quot;:709.5641,&quot;downloadable&quot;:false,&quot;isEditorNode&quot;:true}"></div><p>I find the podcast a good complement to my video tutorial. While my video mostly focuses on the Python code to send the emails, the podcast dives into concepts such as SSL, SMTP, secure passwords, and more!</p><p>You can find another nice AI-generated podcast about my Python book recommendation, in this <a href="https://artificialcorner.com/p/i-built-a-second-brain-and-automated">article</a>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>GitHub Copilot: A general-purpose AI coding assistant</h3><p>Here&#8217;s a bonus for those with some coding experience: GitHub Copilot. </p><p>GitHub's AI tool is a game-changer for real-time code writing. What's cool about it is that it offers an interaction style similar to ChatGPT, but it's focused on coding. Plus, it can keep building out a program you're working on in the editor.</p><p>One feature that really stands out to me is the chat function. You can literally quiz it about constructing functions or clear up any doubts about specific bits of your code. It's like having a coding guru on standby, ready to jump in with insights or solutions.</p><p>Something I like about Copilot is that it doesn't just stop after giving a response. It keeps the ball rolling, offering up possible questions I might want to ask next or things to consider. Below is how Copilot completed a Fibonacci function and the follow-up questions it generated.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u-df!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u-df!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 424w, https://substackcdn.com/image/fetch/$s_!u-df!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 848w, https://substackcdn.com/image/fetch/$s_!u-df!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 1272w, https://substackcdn.com/image/fetch/$s_!u-df!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u-df!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png" width="520" height="583.859649122807" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:960,&quot;width&quot;:855,&quot;resizeWidth&quot;:520,&quot;bytes&quot;:84801,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!u-df!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 424w, https://substackcdn.com/image/fetch/$s_!u-df!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 848w, https://substackcdn.com/image/fetch/$s_!u-df!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 1272w, https://substackcdn.com/image/fetch/$s_!u-df!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f912e2d-2a57-4c0d-9403-e6f5d10787cd_855x960.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It's like having an ongoing conversation with your code!</p><p>Plus, there's a feature that lets you move the suggested code into your editor. This creates a seamless flow, letting you bounce between the chat and the editor.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eEOr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eEOr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 424w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 848w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 1272w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eEOr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png" width="710" height="218.94917582417582" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:1456,&quot;resizeWidth&quot;:710,&quot;bytes&quot;:87934,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!eEOr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 424w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 848w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 1272w, https://substackcdn.com/image/fetch/$s_!eEOr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde59feb7-14a6-4f19-a6cd-278305537af5_1766x545.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If you want to multitask within the editor, you can get the Copilot chat by pressing Ctrl + i<strong>. </strong></p><p>Here are some of my favorite commands:</p><ul><li><p>Diving deeper into the code: <code>/explain</code></p></li><li><p>Getting unstuck or fixing code snags: <code>/fix</code></p></li><li><p>Conducting tests on the code: <code>/tests</code></p></li></ul><p>I have to say Copilot is one of my favorite tools. It's like having the best of ChatGPT, but baked right into your IDE, making coding effortless and more efficient. You can add the GitHub Copilot extension to Visual Studio Code, Visual Studio, JetBrains, and Neovim.</p><p>GitHub Copilot is my favorite general-purpose coding assistant, but other tools excel in specific scenarios. In this <a href="https://artificialcorner.com/p/i-tried-multiple-ai-coding-assistants">article</a>, I reviewed all the AI coding assistants I tried.</p><div><hr></div><p>Are you using any other AI tool to learn to code? Let me know in the comments!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Your Mac Terminal Doesn't Have to Look Ugly. Upgrade It In a Few Minutes]]></title><description><![CDATA[Here's my guide to transform your Mac terminal, so that you become more productive as a programmer.]]></description><link>https://artificialcorner.com/p/your-mac-terminal-doesnt-have-to</link><guid isPermaLink="false">https://artificialcorner.com/p/your-mac-terminal-doesnt-have-to</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 19 Mar 2025 16:02:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nT5F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nT5F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nT5F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 424w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 848w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 1272w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nT5F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png" width="800" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nT5F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 424w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 848w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 1272w, https://substackcdn.com/image/fetch/$s_!nT5F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfadf90e-ec67-489a-915a-53dd64e441cf_800x800.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image made with Dall-E 3</figcaption></figure></div><blockquote><p>Before we start today&#8217;s article, I have a recommendation for anyone into Java and system design: Javin&#8217;s Substack, Javarevisited.</p><p>Javin has a Substack called <a href="https://javarevisited.substack.com/">Javarevisited</a> where he helps thousands of tech enthusiasts, developers, and software professionals to learn Java, Programming, and System Design and prepare for tech interviews. He has been writing blogs since 2010 and published Grokking the Java Interview <a href="http://javinpaul.gumroad.com/l/sowpfg">book</a> and <a href="https://www.udemy.com/course/1z0-830-java-se-21-developer-professional-exam-practice-test/?referralCode=816F7A9F8A35361AE1C1">courses</a> on Udemy. </p><p>If you're into Java or System Design, check out his Substack!</p></blockquote><p>The Mac terminal is quite a useful tool for programmers, yet it doesn&#8217;t have a friendly interface.</p><p>If you&#8217;re a programmer, chances are you spend a lot of time using the terminal. That&#8217;s why you should invest some minutes to upgrade it in order to become more productive when working with it.</p><p>Here&#8217;s how to upgrade your Mac terminal so it looks less like the first image and more like the second image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GFt-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GFt-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 424w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 848w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 1272w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GFt-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png" width="800" height="458" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:458,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GFt-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 424w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 848w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 1272w, https://substackcdn.com/image/fetch/$s_!GFt-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d4708d-d252-46cd-bea8-753c4aaa6b63_800x458.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Basic Mac terminal</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KSBq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KSBq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 424w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 848w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 1272w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KSBq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png" width="600" height="410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:410,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KSBq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 424w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 848w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 1272w, https://substackcdn.com/image/fetch/$s_!KSBq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb58ec9b-43d7-421d-9ba7-333b82b3e813_600x410.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Upgraded Mac terminal</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Install Homebrew</h4><p>In this guide, we&#8217;ll use the <code>brew</code> command a lot, so the first thing to do is install <a href="https://brew.sh/">Homebrew</a>. Open up a terminal and paste the command below.</p><pre><code>/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"</code></pre><h4>Install iTerm2</h4><p>Then we&#8217;re going to install iTerm 2. That&#8217;s a replacement for Terminal and has features you wouldn&#8217;t find on the default terminal. iTerm2 works on Macs with macOS 10.14 or newer. To install it run the command below in the terminal.</p><pre><code>brew install --cask iterm2</code></pre><p>Once you get the message &#8220;iterm2 was successfully installed!&#8221; a new iTerm icon will be added (press F4 to see it in launchpad)</p><p>Open iTerm 2. From now on, we&#8217;ll work with it. Now, let&#8217;s install some extra packages.</p><h4>Install Git</h4><p>Git will help us easily clone themes for our terminal a bit later.</p><pre><code>brew install git</code></pre><h4>Install Oh-My-ZSh</h4><p>Oh My Zsh is a framework that comes bundled with thousands of helpful functions, helpers, plugins, and themes that will help us transform our terminal.</p><pre><code>sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"</code></pre><h4>Install Themes</h4><p>There are many themes you can install to give a different look to your terminal. One cool theme I found on the internet is PowerLevel10K</p><p>First, install PowerLevel10K theme.</p><pre><code>git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k</code></pre><p>Then set the theme in configuration. To do so, go to the home folder and open ~/.zshrc with the command below (you can use nano or vim for that).</p><pre><code>nano ~/.zshrc
vim ~/.zshrc</code></pre><p>Once ~/.zshrc is opened, locate the word &#8220;ZSH_THEME&#8221; and change its value to the name of the theme we installed (powerlevel10k/powerlevel10k)</p><pre><code>ZSH_THEME=&#8221;powerlevel10k/powerlevel10k&#8221;</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VEWo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VEWo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 424w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 848w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 1272w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VEWo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png" width="800" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VEWo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 424w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 848w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 1272w, https://substackcdn.com/image/fetch/$s_!VEWo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac0f1c3-791c-44c8-b34c-9dea6e064a8c_800x552.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then exit ~/.zshrc (<code>esc</code> &gt; :<code>wq</code> or <code>^x</code> &gt; <code>enter</code>) and apply the changes running the command below.</p><pre><code>source ~/.zshrc</code></pre><p>Then you&#8217;ll see the window below. If you want to install Meslo Nert Font (which I recommend you), press Y.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5dlY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5dlY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 424w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 848w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 1272w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5dlY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png" width="800" height="521" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5dlY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 424w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 848w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 1272w, https://substackcdn.com/image/fetch/$s_!5dlY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa41b59b8-8924-44e7-9806-324e9ff23d77_800x521.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The font will be downloaded and then we have to quit iTerm (use Cmd+Q).</p><p>Open iTerm again. You should see the image below (if not run &#8220;p10k configure&#8221;). These are a series of questions to verify everything is fine. If everything is as indicated in the questions, press Y.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wwab!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wwab!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 424w, https://substackcdn.com/image/fetch/$s_!wwab!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 848w, https://substackcdn.com/image/fetch/$s_!wwab!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 1272w, https://substackcdn.com/image/fetch/$s_!wwab!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wwab!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png" width="800" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wwab!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 424w, https://substackcdn.com/image/fetch/$s_!wwab!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 848w, https://substackcdn.com/image/fetch/$s_!wwab!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 1272w, https://substackcdn.com/image/fetch/$s_!wwab!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a8d807-8bff-403a-a6b8-24e38f6551f7_800x486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then you&#8217;ll see some preferences to configure the prompt style, heads, tails, spacing, etc. You can choose the options you like the most.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VBft!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VBft!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 424w, https://substackcdn.com/image/fetch/$s_!VBft!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 848w, https://substackcdn.com/image/fetch/$s_!VBft!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 1272w, https://substackcdn.com/image/fetch/$s_!VBft!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VBft!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png" width="800" height="503" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:503,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VBft!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 424w, https://substackcdn.com/image/fetch/$s_!VBft!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 848w, https://substackcdn.com/image/fetch/$s_!VBft!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 1272w, https://substackcdn.com/image/fetch/$s_!VBft!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6911ef7c-ccb1-46f4-9e9d-4f635d3b6e9e_800x503.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After the setup is done, iTerm2 should look like the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l8u-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l8u-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 424w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 848w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 1272w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l8u-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png" width="800" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eaa9725b-5f88-4896-b928-4cb658356328_800x546.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l8u-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 424w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 848w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 1272w, https://substackcdn.com/image/fetch/$s_!l8u-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa9725b-5f88-4896-b928-4cb658356328_800x546.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Upgraded Mac terminal</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Extra Customizations</h4><p>ITerm 2 can be further customized. We can increase the font size, install useful plugins, and more.</p><h4>1. Change iTerm2 font size</h4><ol><li><p>Open iTerm2 preferences (cmd + ,)</p></li><li><p>Go to Profiles and click on Text</p></li><li><p>In the Font section, you can increase the font size and select other fonts</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_ZlU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_ZlU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 424w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 848w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 1272w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_ZlU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png" width="800" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_ZlU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 424w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 848w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 1272w, https://substackcdn.com/image/fetch/$s_!_ZlU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2e55878-b129-4e63-9ff0-108f0b032e6a_800x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>2. Install Plugins</h4><p>Here are some useful plugins I recommend you to install.</p><h4>a. Autosuggestions</h4><p>First, install autosuggestions to get suggestions based on the previous commands you run on the terminal.</p><pre><code>git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions</code></pre><p>After installing a plugin, you go to the home folder, open ~/.zshrc, and modify the line below.</p><pre><code>nano ~/.zshrc
vim ~/.zshrc</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0BAF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0BAF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 424w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 848w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 1272w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0BAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png" width="800" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0BAF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 424w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 848w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 1272w, https://substackcdn.com/image/fetch/$s_!0BAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2d7ce82-80bc-4d67-ac39-2f8496eae058_800x496.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Add this plugin inside the parenthesis.</p><pre><code>plugins=(git zsh-autosuggestions)</code></pre><p>Exit ~/.zshrc and apply the changes by running the command below.</p><pre><code>source ~/.zshrc</code></pre><p>Now you should have auto suggestions enabled. Every time you type a command, you&#8217;ll see the suggestions in gray.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3NKe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3NKe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 424w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 848w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 1272w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3NKe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png" width="800" height="123" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:123,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3NKe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 424w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 848w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 1272w, https://substackcdn.com/image/fetch/$s_!3NKe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ead4f82-65d1-4ab2-ae5e-d84a0d0312fa_800x123.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h4>b. Syntax-highlighting</h4><p>If you want to add syntax and highlighting to the commands we run (like in a code editor), you should install this plugin with the command below.</p><pre><code>git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting</code></pre><p>As we did before, after the installation, we need to add this new plugin to the plugin variable inside ~/.zshrc.</p><pre><code>plugins=(git zsh-autosuggestions zsh-syntax-highlighting)</code></pre><p>Exit ~/.zshrc and apply the changes by running the command below.</p><pre><code>source ~/.zshrc</code></pre><p>Now you should have auto syntax-highlighting enabled.</p><p>That&#8217;s it! You&#8217;ve just upgraded your Mac terminal.</p><h4>3. Bonus: Themes for Vim</h4><p>In case you&#8217;re using Vim as your text editor, you can also change the themes used for Vim.</p><p>To do so, open ~/.vimrc</p><pre><code>vim ~/.vimrc</code></pre><p>Now, to see a<strong> </strong>list of ready-to-use themes, type the following</p><pre><code>:colorscheme [space] [Ctrl+d]</code></pre><p>Now you should see all the themes available.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r27A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r27A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 424w, https://substackcdn.com/image/fetch/$s_!r27A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 848w, https://substackcdn.com/image/fetch/$s_!r27A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 1272w, https://substackcdn.com/image/fetch/$s_!r27A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r27A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png" width="782" height="105" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:105,&quot;width&quot;:782,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r27A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 424w, https://substackcdn.com/image/fetch/$s_!r27A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 848w, https://substackcdn.com/image/fetch/$s_!r27A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 1272w, https://substackcdn.com/image/fetch/$s_!r27A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd9e81b8-7720-450a-9248-e496cdd5e156_782x105.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If you want to set the default vim theme, type i (to enable insert mode) and then type the following to set the default color scheme to the color you want and also enable the syntax highlight</p><pre><code>colorscheme [colorscheme_name]
syntax on</code></pre><p>Here&#8217;s how your ~/.vimrc should look like (in this case, I chose the desert theme).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JOps!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JOps!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 424w, https://substackcdn.com/image/fetch/$s_!JOps!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 848w, https://substackcdn.com/image/fetch/$s_!JOps!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 1272w, https://substackcdn.com/image/fetch/$s_!JOps!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JOps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png" width="636" height="363" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:363,&quot;width&quot;:636,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JOps!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 424w, https://substackcdn.com/image/fetch/$s_!JOps!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 848w, https://substackcdn.com/image/fetch/$s_!JOps!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 1272w, https://substackcdn.com/image/fetch/$s_!JOps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cb22554-cee0-44e6-872c-04d28248b6d6_636x363.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now press escape and then :wq to save and quit. Now vim will have the theme you chose!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #39 : Here's What Most Python and Data Science Courses Don't Teach You]]></title><description><![CDATA[And free resources to learn them on your own.]]></description><link>https://artificialcorner.com/p/ai-and-python-39-heres-what-most</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-39-heres-what-most</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Mon, 03 Mar 2025 14:03:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6vtB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6vtB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6vtB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6vtB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg" width="1456" height="1038" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1038,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1409807,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://artificialcorner.com/i/158284978?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6vtB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6vtB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53df91fc-4a88-4975-b5bb-022174e977a7_4916x3506.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Credit: Unsplash</figcaption></figure></div><p>There&#8217;s no perfect course in this world, but do you know what most of them don&#8217;t teach you?</p><p>The not-so-obvious skills and tools you&#8217;ll need at work!</p><p>Most courses are great for getting you started with a programming language and refreshing your knowledge of tech skills, but they lack a couple of modules dedicated to the skills you need to have at work to work efficiently with other programmers and non-technical coworkers.</p><p>Here are three things you probably didn&#8217;t learn in an online course (plus resources to learn them on your own).</p><h4>Software Engineering Practices</h4><p>As a data scientist, you&#8217;ll be writing code in programming languages such as SQL, Python, and R. Although most data science courses will help you get started with coding, they won&#8217;t teach you or focus on good practices.</p><p>Good practices such as writing clean code, modular code, and optimizing your code are very popular in software engineering. Believe it or not, these good practices will help you become a better data scientist.</p><p>Here&#8217;s a simple example of how to optimize your code:</p><pre><code># Imagine we have an array of random exam scores and we want to get the average score of those who failed the exam (score&lt;70)
# Below are two way of solving this problem (one using loops and the other using vector operations)

<strong>import</strong> time
<strong>import</strong> numpy <strong>as</strong> np

random_scores = np.random.randint(1, 100, size=10000001)

<strong># SOL1: solving problem using a for loop</strong>
start = time.time()

count_failed = 0
sum_failed = 0
for score in random_scores:
    if score &lt; 70:
        sum_failed += score
        count_failed += 1

print(sum_failed/count_failed)
print(f'Duration: {time.time() - start} seconds')


<strong># SOL2: solving problem using vector operations</strong>
start = time.time()

mean_failed = (random_scores[random_scores &lt; 70]).mean()
print(mean_failed)

print(f'Duration: {time.time() - start} seconds')</code></pre><p>That&#8217;s only a basic example with a few lines of code! The longer the script, the more important it is to follow these good practices.</p><p>What can you do to learn good software engineering practices?</p><p>You can search for guides or tutorials to learn good <a href="https://artificialcorner.com/p/ai-and-python-32-software-engineering">software engineering practices for data science</a>, and read a book that covers all these points and gives a big picture on the topic.</p><p>Here are 5 <a href="https://artificialcorner.com/p/ai-and-python-33-4-python-books-that">Python books</a> that every beginner should read to go beyond the basics. I&#8217;d recommend checking the book &#8220;Clean Code in Python&#8221; in particular because it covers most of the points mentioned before.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-39-heres-what-most">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Self-Studying Python? Here’s What I Learned After Taking 10+ Online Courses]]></title><description><![CDATA[How to pick the right Python course for you and self-study using online courses.]]></description><link>https://artificialcorner.com/p/self-studying-python-heres-what-i</link><guid isPermaLink="false">https://artificialcorner.com/p/self-studying-python-heres-what-i</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 20 Feb 2025 16:04:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jIo4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jIo4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jIo4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jIo4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg" width="800" height="534" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:534,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jIo4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jIo4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8e8a838-bb20-4d14-8d85-65b05e3c3462_800x534.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image Credit: Shutterstock</figcaption></figure></div><p>Online courses helped me learn much of the Python stuff I know. I like going at my own pace and having the flexibility to study and work, so I finished most of them without any problem.</p><p>However, there were also times when I joined a course, took a couple of lectures, and never returned. Sometimes the course was too advanced for me, the instructor was too boring, or the concepts were poorly explained. After taking many online courses, I&#8217;d like to share with you my strategy for self-studying using online courses.</p><p>This guide covers things like how to pick the right Python course, how to make the most of online courses, and more.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>First Things First&#8202;&#8212;&#8202;Answer These 3 Vital Questions</h3><p>One of the key points to choosing the right course(s) for you is to know what exactly you&#8217;re looking for, why you want to learn that, and how much time you have to learn it.</p><p>Ask yourself these questions:</p><blockquote><p>1. What (exactly) do I wanna learn?<br>2. Why do I wanna learn it?<br>3. How much time available do I have to learn that?</p></blockquote><p>Questions #1 and #3 help you narrow down the courses, while question #2 supports your decision (keep this in mind whenever you feel you make little progress).</p><p>Say you know the basics of Python and want to learn more. There are many fields where Python can be used (data science, web development, AI programming, machine learning, etc), so you need to know what exactly you want to learn. Also, if you have little time available, you should stay away from those 50+ hour courses that you might never finish.</p><p><strong>Note</strong>: If you don&#8217;t know how to answer question 1, jump to the next section (there&#8217;s a course that might help you make up your mind).</p><p>Here is how I answered these questions when I was an absolute beginner.</p><blockquote><p>1. Data Science with Python<br>2. I like Python and working with data.<br>3. All day!</p></blockquote><p>Here is how I answered these questions after learning Python and data science for some years:</p><blockquote><p>1. Machine Learning with TensorFlow<br>2. I love ML and TensorFlow is popular among developers (it has Google&#8217;s support)<br>3. 1 hour on weekdays</p></blockquote><p>I gave these 2 examples, so the advice in the next section can fit most situations.</p><p>Great! Now is your time to answer these questions. Once you know the answers, choosing the right course will be way easier.</p><h3>How to choose the right course for you</h3><p>There are hundreds of courses out there, so choosing the right course might be overwhelming.</p><p>You might ask for advice from your friends and colleagues, but, the truth is, a course defined as &#8220;perfect&#8221; by your colleague might not be perfect for you. Why? Well, he/she might have a different background, experience, and goals!</p><p>Here are some rules of thumb that you should follow when picking a course as a beginner or advanced student:</p><ul><li><p>The course should have tasks, exercises, and projects. This helps put into practice what you learn</p></li><li><p>Keep an eye on the instructor(s). Smart people aren&#8217;t always the best teachers</p></li><li><p>If you want to join a course that involves coding, make sure the instructor doesn&#8217;t write code right away, but, whenever possible, makes some time to explain concepts with slides, an online whiteboard, etc.</p></li></ul><h4>If you&#8217;re an absolute beginner</h4><p>If you&#8217;ve just started your journey, take courses that focus on core concepts, so you can build a strong foundation. Also, if you still don&#8217;t know what exactly you want to learn, take courses that cover different topics.</p><p>Say you want to start your data science journey with Python. Here&#8217;s what I get after searching &#8220;Data Science with Python&#8221; on Udemy,</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZYfc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZYfc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZYfc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZYfc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYfc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe84dc54a-3225-497f-b8ee-7903f7e14ef2_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>After checking them out and considering the previous advice, course #3 looks like a good candidate. Why? It focuses on Python for data science and has plenty of exercises and projects.</p><p>Course #2 is good too, but isn&#8217;t only about Python but also math and statistics (this goes against my answer to question 1), On the other hand, course #4 is a bit advanced and not only focuses on Python but on R, while course #1 is kind of outdated.</p><h4>If you have previous knowledge</h4><p>If you already know some stuff and want to specialize in a topic, you should stay away from those &#8220;ultimate courses&#8221; that cover a lot of stuff but don&#8217;t delve into the topic you&#8217;re interested in.</p><p>Here&#8217;s what I get after searching &#8220;Machine Learning with TensorFlow&#8221; on Udemy.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y_RJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y_RJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y_RJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y_RJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!y_RJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd22d7fdf-e50d-4e18-9f93-0a198ef09be5_800x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>This time is harder to choose a good course.</p><p>Course #1 is too broad and basic. Course #3 lacks the projects and exercises, while course #4 is more about math for ML.</p><p>If I had to pick one of those courses I&#8217;d choose course #5 (it has a couple of good projects) and course #2. But they don&#8217;t convince me completely. Course #2 has some exercises, but not so many projects and I&#8217;m afraid it can be too broad (63 hours of content!).</p><p>The good news is that there are also other platforms we can check out. I like Udacity&#8217;s courses because they&#8217;re taught not only by 1 but many industry experts who are also good at teaching. Coursera is another great option.</p><h3>How to make the most of a course</h3><p>Now that you selected the right course, it&#8217;s time to get your hands dirty.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/self-studying-python-heres-what-i">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[4 Free Courses I Took to Learn Python for Data Science & AI]]></title><description><![CDATA[Beginner and advanced free courses I selected after taking over 10 courses.]]></description><link>https://artificialcorner.com/p/4-free-courses-i-took-to-learn-python</link><guid isPermaLink="false">https://artificialcorner.com/p/4-free-courses-i-took-to-learn-python</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 23 Jan 2025 13:05:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cYTM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cYTM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cYTM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cYTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg" width="800" height="571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:571,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cYTM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cYTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F344d9c2d-56d5-483b-867f-360cd567c6c2_800x571.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@janaloyy?utm_source=medium&amp;utm_medium=referral">Jana Leu</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Before paying for a course, it&#8217;s a good idea to check what has been published out there&#8202;&#8212;&#8202;there&#8217;s a decent amount of high-quality free content. This is what I did when I started learning Python for data science. I checked the curriculum of paid data science courses and then searched all the stuff related to Python.</p><p>I selected the best 4 free courses I took to learn Python for data science. The 4 courses cover some of the stuff in &#8220;<a href="https://artificialcorner.com/p/behind-ai-6-the-4-stages-of-learning">The 4 Stages of Learning Python for AI &amp; ML</a>.&#8221; Although you won&#8217;t get a nice certificate after completing any of these courses, the knowledge you will acquire is priceless.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>#1 Learn Python&#8202;&#8212;&#8202;Full Course for Beginners</h3><p>This <a href="https://www.youtube.com/watch?v=rfscVS0vtbw">4-hour Python beginners course</a> covers all the basic Python stuff you need before learning libraries used in data science. This is a crash course in Python&#8202;&#8212;&#8202;when I took this course I had zero knowledge about programming. The course will show you how to set up Python, teach you how to print your first &#8220;Hello World&#8221;, and explain all the core concepts in Python.</p><p>Please, do not skip the fundamentals of Python and jump to the essentials of Python for Data Science. Remember that Python is a programming language with applications not only in data science but in many fields. Some Python for Data Science courses might skip core Python concepts that will be necessary in the future.</p><p>Some of the topics covered in this course that are frequently used in data science are:</p><ul><li><p>Variables &amp; Data Types</p></li><li><p>Lists, Dictionaries, Tuples, Nested Lists</p></li><li><p>Functions, Return Statement, If Statements</p></li><li><p>For Loops, While Loop, Nested Loops</p></li><li><p>Try / Except, Reading and Writing to Files</p></li><li><p>Python Interpreter, Modules, Pip Classes</p></li><li><p>Objects, Object Functions, Inheritance</p></li></ul><p>Plus, there are practical exercises where you would put all the concepts learned into practice. You will build a basic calculator, guessing name, translator, and a multiple-choice quiz. On top of that, the instructor has good knowledge of Python, clear explanations, and engaging delivery.</p><h3>#2 Python for Data Analysis Course</h3><p>This one is more like a <a href="https://www.youtube.com/playlist?list=PLFCB5Dp81iNVmuoGIqcT5oF4K-7kTI5vp">playlist</a> than a course; however, you will find more useful lectures in this playlist than in some paid courses.</p><p>The first 8 videos in the playlist make a 10-hour data analysis course. It starts with the most popular data collection technique that data scientists use to build datasets&#8202;&#8212;&#8202;web scraping. Then you will learn data analysis libraries such as Pandas, Numpy, Matplotlib, and Scikit-learn. On top of that, the playlist includes cool projects that will help you get hands-on experience. All of this is carried out on Jupyter Notebooks, which is data scientists&#8217; computational notebook of choice.</p><p>Some of the datasets used in this course to teach the libraries mentioned before are:</p><ul><li><p><a href="https://www.kaggle.com/abcsds/pokemon">Pokemon Dataset</a></p></li><li><p><a href="https://www.kaggle.com/stefanoleone992/fifa-20-complete-player-dataset">FIFA 20 Dataset</a></p></li><li><p><a href="http://jmcauley.ucsd.edu/data/amazon/">Amazon Product Review Dataset</a></p></li><li><p>Sales Data</p></li></ul><p>So if you want to have fun analyzing Pokemon and FIFA datasets or build a machine-learning model using product review, consider watching this playlist.</p><p>I watched the first 8 videos of the playlist and that helped me build a strong foundation on Python for data analysis.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>#3 Natural Language Processing Course in Python</h3><p>This is a short yet useful <a href="https://www.youtube.com/watch?v=xvqsFTUsOmc">2-hour NLP course</a> for anyone interested in the field of Natural Language Processing. NLP is a branch of artificial intelligence that allows machines to understand human language. Data scientists use NLP techniques to interpret text data for analysis.</p><p>This introduction to NLP covers the following topics:</p><ul><li><p>Pre-processing techniques (tokenization, text normalization, and data cleaning)</p></li><li><p>Machine learning techniques (topic modeling, word embeddings, and text generation)</p></li><li><p>Python libraries for NLP (NLTK, TextBlob, spaCy, and gensim)</p></li></ul><p>I like this short course in particular because it&#8217;s highly engaging and includes cool exercises like spam email classification and sentiment analysis of tweets. Of course, to do all of this you will need to have at least a basic understanding of data analysis libraries such as Pandas and Scikit-learn.</p><h3>#4 Machine Learning &amp; Artificial Intelligence with Tensorflow 2.0 Course</h3><p><a href="https://www.youtube.com/watch?v=tPYj3fFJGjk">This is a 7-hour Tensorflow course</a> designed for Python programmers who wish to learn machine learning (ML) and artificial intelligence (AI) with TensorFlow. TensorFlow is one of the best libraries available for working with Machine Learning in Python. It makes machine learning model building easy for beginners.</p><p>In this course, you will find 8 modules that cover fundamental topics in ML &amp; AI. To name a few:</p><ul><li><p>Core Learning Algorithms</p></li><li><p>Neural Networks with TensorFlow</p></li><li><p>Deep Computer Vision&#8202;&#8212;&#8202;Convolutional Neural Networks</p></li><li><p>Natural Language Processing with RNNs</p></li><li><p>Reinforcement Learning with Q-Learning</p></li></ul><p>I like this course because the instructor has good knowledge of machine learning and artificial intelligence and has a clear explanation. Also, the course is engaging and contains valuable information and coding examples. All of this makes learning TensowFlow easier.</p><div><hr></div><p>That&#8217;s it! Hope these 4 courses help you enhance your knowledge of Python for data science and AI.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/4-free-courses-i-took-to-learn-python?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/4-free-courses-i-took-to-learn-python?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #38: The Easiest Way to Make Beautiful Interactive Visualizations With Pandas]]></title><description><![CDATA[One-liner interactive visualization with Pandas in Python]]></description><link>https://artificialcorner.com/p/ai-and-python-38-the-easiest-way</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-38-the-easiest-way</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 15 Jan 2025 12:54:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In a previous <a href="https://artificialcorner.com/p/no-code-tools-to-make-interactive">article</a>, I shared 5 no-code tools for interactive data visualization. Today, we&#8217;ll see how to create this type of visualization in Python without getting too technical and wasting a lot of time. I&#8217;ve been searching for libraries with that goal in mind and found an easy way to create interactive visualizations directly from Pandas. </p><p>We&#8217;ll see how this Python library works in detail in this guide.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Install the libraries</h4><p>To easily create interactive visualizations, we need to install Cufflinks. This is a library that connects Pandas with Plotly, so we can create visualizations directly from Pandas (in the past you had to learn workarounds to make them work together, but now it&#8217;s simpler)</p><p>First, make sure you install Pandas and Plotly by running the following commands on the terminal:</p><pre><code>pip install pandas
pip install plotly</code></pre><p>Note that you can also use conda to install Plotly: <code>conda install -c plotly</code>.</p><p>Once you have Plotly installed, run the following commands to install Cufflinks:</p><pre><code>pip install cufflinks</code></pre><h4>Import the libraries</h4><p>To start working, import the following libraries:</p><pre><code>import pandas as pd
import cufflinks as cf
from IPython.display import display,HTML</code></pre><pre><code>cf.set_config_file(sharing='public',theme='ggplot',offline=True) </code></pre><p>In this case, I&#8217;m using the <code>&#8216;ggplot&#8217;</code> theme, but feel free to choose any theme you want. Run the command <code>cf.getThemes()</code> to get all the themes available.</p><p>To make interactive visualizations with Pandas in the following sections, we only need to use the syntax <code>dataframe.iplot()</code>.</p><h4>The data</h4><p>For this guide, we&#8217;ll use a population dataframe. First, download the CSV file available on <a href="https://drive.google.com/file/d/1QpCcE4U8NIhznbqf0kdeO2ITKPEs9OSm/view?usp=sharing">Google Drive</a> or <a href="https://github.com/ifrankandrade/data-visualization/tree/main/datasets/population">Github</a>, move the file where your Python script is located, and then read it in a Pandas dataframe as shown below.</p><pre><code>df_population = pd.read_csv('population_total.csv')</code></pre><p>The dataframe contains the population throughout the years for most countries around the world and looks like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!as1l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!as1l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 424w, https://substackcdn.com/image/fetch/$s_!as1l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 848w, https://substackcdn.com/image/fetch/$s_!as1l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 1272w, https://substackcdn.com/image/fetch/$s_!as1l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!as1l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png" width="447" height="567" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:567,&quot;width&quot;:447,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!as1l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 424w, https://substackcdn.com/image/fetch/$s_!as1l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 848w, https://substackcdn.com/image/fetch/$s_!as1l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 1272w, https://substackcdn.com/image/fetch/$s_!as1l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a32af0f-bbd9-484b-aa85-c2e009f860a0_447x567.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>This dataframe is almost ready for plotting, we just have to drop null values, reshape it, and then select a couple of countries to test our interactive plots. The code shown below does all of this.</p><pre><code># dropping null values
df_population = df_population.dropna()

# reshaping the dataframe
df_population = df_population.pivot(index='year', columns='country',
                                    values='population')

# selecting 5 countries
df_population = df_population[['United States', 'India', 'China', 
                               'Indonesia', 'Brazil']]</code></pre><p>Now the dataframe looks like the picture below and is ready for plotting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OOxQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OOxQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 424w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 848w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 1272w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OOxQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png" width="792" height="662" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0984b93d-3109-4730-b033-77049c2363b0_792x662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:662,&quot;width&quot;:792,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OOxQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 424w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 848w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 1272w, https://substackcdn.com/image/fetch/$s_!OOxQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0984b93d-3109-4730-b033-77049c2363b0_792x662.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><blockquote><p>If you&#8217;d like to know how a data scientist collects real-world data like this &#8220;population_total.csv&#8221;, check <a href="https://artificialcorner.com/p/behind-ai-5-web-scraping-in-python">this</a> or <a href="https://artificialcorner.com/p/behind-ai-6-web-scraping-in-python">this</a> guide I made (you won&#8217;t always have a Kaggle dataset available for a data science project)</p></blockquote><p>Now let&#8217;s start making interactive visualization!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Lineplot</h3><p>Let&#8217;s make a lineplot to compare how much the population has grown from 1955 to 2020 for the 5 countries selected.</p><p>As mentioned before, we will use the syntax <code>df_population.iplot(kind='name_of_plot')</code> to make plots as shown below.</p><pre><code>df_population.iplot(kind='<strong>line</strong>',xTitle='Years', yTitle='Population',
                    title='Population (1955-2020)')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D731!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D731!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 424w, https://substackcdn.com/image/fetch/$s_!D731!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 848w, https://substackcdn.com/image/fetch/$s_!D731!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!D731!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D731!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif" width="1298" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1298,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D731!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 424w, https://substackcdn.com/image/fetch/$s_!D731!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 848w, https://substackcdn.com/image/fetch/$s_!D731!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!D731!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7969549-aad7-4ab4-a89f-707637e7df27_1298x628.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>At first glance, it&#8217;s easy to see that the population in India has grown faster than the other countries.</p><h3>Barplot</h3><p>We can make a single barplot on barplots grouped by categories. Let&#8217;s have a look.</p><h4>Single Barplot</h4><p>Let&#8217;s create a barplot that shows the population of each country by the year 2020. To do so, first, we select the year 2020 from the index and then transpose rows with columns to get the year in the column. We&#8217;ll name this new dataframe <code>df_population_2020</code> (we&#8217;ll use this dataframe again when plotting piecharts)</p><pre><code>df_population_2020 = df_population[df_population.index.isin([2020])]
df_population_2020 = df_population_2020.T</code></pre><p>Now we can plot this new dataframe with <code>.iplot()</code>. In this case, I&#8217;m going to set the bar color to light-green using the <code>color</code> argument.</p><pre><code>df_population_2020.iplot(kind='<strong>bar</strong>', color='lightgreen',
                         xTitle='Years', yTitle='Population',
                         title='Population in 2020')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TNtD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TNtD!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 424w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 848w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TNtD!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif" width="1298" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1298,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TNtD!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 424w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 848w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!TNtD!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa6e5165-80ec-4655-8c11-f9421d2470d7_1298x628.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><h4>Barplot grouped by &#8220;n&#8221; variables</h4><p>Now let&#8217;s see the evolution of the population at the beginning of each decade.</p><pre><code># filter years out
df_population_sample = df_population[df_population.index.isin([1980, 1990, 2000, 2010, 2020])]

# plotting
df_population_sample.iplot(kind='<strong>bar</strong>', xTitle='Years',
                           yTitle='Population')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1A6t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1A6t!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1A6t!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif" width="1364" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1A6t!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!1A6t!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2e20377-53c4-4452-b51c-9ab8ab95865f_1364x592.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>Naturally, all of them increased their population throughout the years, but some did it at a faster rate.</p><h3>Boxplot</h3><p>Boxplots are useful when we want to see the distribution of the data. The boxplot will reveal the minimum value, first quartile (Q1), median, third quartile (Q3), and maximum value. The easiest way to see those values is by creating an interactive visualization.</p><p>Let&#8217;s see the population distribution of the USA.</p><pre><code>df_population['United States'].iplot(kind='<strong>box</strong>', color='green', 
                                     yTitle='Population')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IeIK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IeIK!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IeIK!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif" width="1364" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IeIK!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!IeIK!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47b36c11-32c6-4dee-b936-952d9786e9aa_1364x592.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>Let&#8217;s now get the same distribution but for all the selected countries.</p><pre><code>df_population.iplot(kind='<strong>box</strong>', xTitle='Countries',
                    yTitle='Population')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4R_0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4R_0!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4R_0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif" width="1364" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4R_0!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 424w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 848w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 1272w, https://substackcdn.com/image/fetch/$s_!4R_0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb0fc12-4411-4681-a1e5-d51665444868_1364x592.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>As we can see, we can also filter out any country by clicking on the legends on the right.</p><h3>Histogram</h3><p>A histogram represents the distribution of numerical data. Let&#8217;s see the population distribution of the USA and Indonesia.</p><pre><code>df_population[['United States', 'Indonesia']].iplot(kind='<strong>hist</strong>',
                                                xTitle='Population')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xTk4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xTk4!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 424w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 848w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xTk4!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif" width="1276" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1276,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xTk4!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 424w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 848w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!xTk4!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff910553a-bcfb-48d3-a1b8-1d59c538d136_1276x626.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><h3>Piechart</h3><p>Let&#8217;s compare the population by the year 2020 again but now with a piechart. To do so, we&#8217;ll use the <code>df_population_2020</code> dataframe created in the &#8220;Single Barplot&#8221; section.</p><p>However, to make a piechart we need the &#8220;country&#8221; as a column and not as an index, so we use <code>.reset_index()</code> to get the column back. Then we transform the <code>2020</code> into a string.</p><pre><code># transforming data
df_population_2020 = df_population_2020.reset_index()
df_population_2020 =df_population_2020.rename(columns={2020:'2020'})

# plotting
df_population_2020.iplot(kind='<strong>pie</strong>', labels='country',
                         values='2020',
                         title='Population in 2020 (%)')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iidt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iidt!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 424w, https://substackcdn.com/image/fetch/$s_!iidt!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 848w, https://substackcdn.com/image/fetch/$s_!iidt!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!iidt!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iidt!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif" width="1276" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1276,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iidt!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 424w, https://substackcdn.com/image/fetch/$s_!iidt!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 848w, https://substackcdn.com/image/fetch/$s_!iidt!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!iidt!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219f5866-a0dc-43b9-b10e-6bee42c7c452_1276x626.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><h3>Scatterplot</h3><p>Although population data is not suitable for a scatterplot (the data follows a common pattern), I would make this plot for the purposes of this guide.</p><p>Making a scatterplot is similar to a line plot, but we have to add the <code>mode </code>argument.</p><pre><code>df_population.iplot(kind='<strong>scatter'</strong>, <strong>mode</strong>='markers')</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sZ87!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sZ87!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 424w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 848w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sZ87!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif" width="1304" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1304,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sZ87!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 424w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 848w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 1272w, https://substackcdn.com/image/fetch/$s_!sZ87!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66b59ed-6f6b-4c0e-855e-fca9a34770a2_1304x626.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p>That&#8217;s it! Now you&#8217;re ready to make your own beautiful interactive visualization with Pandas. If you want to learn other visualization libraries in Python such as Matplotlib and Seaborn, check out this <a href="https://artificialcorner.com/p/behind-ai-19-how-to-create-beautiful">guide</a>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #37: Books I Read to Automate Some Boring Tasks]]></title><description><![CDATA[Python automation.]]></description><link>https://artificialcorner.com/p/ai-and-python-37-books-i-read-to</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-37-books-i-read-to</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Tue, 07 Jan 2025 13:55:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!3c3v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3c3v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3c3v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3c3v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3c3v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3c3v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7769ada-1bc1-4bd0-9b71-0fc4d595b7e7_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@austindistel?utm_source=medium&amp;utm_medium=referral">Austin Distel</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>In this article, I will show you 3 books that helped me automate tasks such as sending emails, collecting data, creating reports, and more!</p><h3>1. Automate the Boring Stuff with Python</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W37_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W37_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W37_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W37_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W37_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W37_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg" width="377" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:377,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!W37_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W37_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W37_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W37_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cfadc1b-1da9-4308-bb43-b143c4d0ae9d_377x499.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><p>This is a <a href="https://www.amazon.com/Automate-Boring-Stuff-Python-2nd/dp/1593279922">book</a> that I think many have heard of. Automate the Boring Stuff with Python teaches you how to write programs that can accomplish in minutes what would take hours to do manually. Unlike some books listed in this article, this book doesn&#8217;t require any prior programming experience.</p><p>The book starts with some Python basics and then explains how to automate tedious tasks such as searching for text in a file, creating files, renaming files, searching the web, downloading content from the web (also known as web scraping), and sending email responses and text notifications.</p><p>The fact that Automate the Boring Stuff has a section that covers web scraping, makes this book worth it for data scientists. This skill will allow you to build your own dataset for your next data science project.</p><p>Also, I consider automation projects essential for those who have to deal with lots of repetitive tasks at work. If you&#8217;re quite familiar with the basics of Python, I would recommend you skip Part I and pick a project that you find interesting in Part II. By solving these real-world problems you will increase your knowledge of Python while automating your life.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>2. Python Automation Cookbook: 75 Python automation ideas</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sLa3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sLa3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sLa3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg" width="406" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:406,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sLa3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sLa3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d93fcc-f8c1-47bd-aba5-43812a16a5f0_406x500.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><p>This <a href="https://www.amazon.com/Jaime-Buelta-ebook/dp/B088NBRT6Z">book</a> is for Python beginners who want to expand their knowledge by automating everyday tasks. That said, you should at least know the basics of Python before reading this book.</p><p>The book contains 75 Python automation ideas with applications in the areas of marketing, sales, data science, and more. You will learn how to automate the web, generate automatic spreadsheet reports with graphs, communicate with automatically generated emails, get notifications via text message, and schedule tasks on your computer.</p><p>In the latest edition of this book, two new chapters were added: Cleaning &amp; Processing Data and Machine Learning for Automation. Both are great chapters for those who want to automate data science tasks.</p><p>In Cleaning &amp; Processing Data, you will learn how to batch process to speed up working with large data. I liked this project idea because cleaning and processing data usually takes a lot of a data scientist&#8217;s time.</p><p>On the other hand, the Machine Learning for Automation chapter shows how to use Google&#8217;s Machine Learning APIs to extract text from images. At the end of the chapter, you will create and train a model that detects which department an email should be assigned using text as input.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>3. Python for Excel: A Modern Environment for Automation and Data Analysis</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G-Tt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G-Tt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G-Tt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg" width="381" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:381,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G-Tt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!G-Tt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb39121-b5af-434c-a232-9b2fe3a9e584_381x499.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><p>Microsoft Excel is probably the most popular tool used for data analysis; however, its automation language, VBA, stopped evolving a long time ago. This is why some Excel users adopted Python to automate their everyday tasks.</p><p>In this <a href="https://www.amazon.com/Felix-Zumstein/dp/1492081000">book</a>, the creator of xlwings (a package to automate Excel with Python) shows how to integrate both Python and Excel efficiently. The book starts with some Python core concepts and then teaches you all the stuff you need to learn for automation and data analysis. You will learn how to use Pandas to clean and analyze data, learn xlwings to build interactive Excel tools (using Python under the hood), and automate tedious tasks like consolidating Excel workbooks and producing reports.</p><p>By the end of the book, you will replace VBA, Power Query, and Power Pivot with Python.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/ai-and-python-37-books-i-read-to?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/ai-and-python-37-books-i-read-to?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #36: Python Libraries You Should Learn]]></title><description><![CDATA[Multipurpose Python libraries that you&#8217;ll need regardless of your specialization.]]></description><link>https://artificialcorner.com/p/ai-and-python-36-python-libraries</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-36-python-libraries</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Fri, 20 Dec 2024 14:07:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_tUL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_tUL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_tUL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_tUL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_tUL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_tUL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793da781-fd68-43b3-80f7-c39805049603_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image via Shutterstock</figcaption></figure></div><p>Everyone has been in a situation where they don&#8217;t know what to learn next or what to specialize in.</p><p>You might like Python but that doesn&#8217;t mean you&#8217;ll learn every single library out there. You also don&#8217;t want to learn libraries that you may never use, so what should you do?</p><p>Well, there are a few Python libraries that will come in handy regardless of the field you&#8217;re in. Whether you&#8217;re into web development or data analysis, you&#8217;d need these libraries to some degree.</p><p>Here are some Python modules, libraries, and packages that you should learn whenever you don&#8217;t know what to learn next.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>OS/Pathlib</h3><p>Working with paths is something that anyone does sooner or later. Whether you&#8217;d like to export a dataset in a specific directory or read static files for your web application, you&#8217;d need to learn the OS or Pathlib modules.</p><p>The OS and Pathlib are Python modules that allow us to do file system operations such as creating directories, listing directory content, working with paths, and more.</p><p>But which one should you learn? OS or Pathlib?</p><p>The OS and Pathlib modules have some similarities. With the OS module, you can manage paths, create folders, and more, but this module represents paths as string values. This limitation may sometimes lead you to search for workarounds that could be avoided by using the Pathlib module.</p><p>Obtaining the parts of a path using Pathlib is as simple as calling an attribute. Let&#8217;s have a look.</p><pre><code><strong>from</strong> pathlib <strong>import</strong> Path

<em># obtaining the current working directory</em>
my_path = Path.cwd()

&gt;&gt;&gt; my_path
PosixPath('/Users/frankandrade')

&gt;&gt;&gt; my_path.parent
PosixPath('/Users')

&gt;&gt;&gt; my_path.name
'frankandrade'</code></pre><p>Unlike OS, Pathlib works with objects that have properties and internal methods that make working with paths simpler.</p><h3>Requests</h3><p>Whenever you need to interact with a server, you&#8217;ll have to use the Requests library. This is a Python library that you can use to send HTTP requests. HTTP is a request-response protocol between a client and a server that is the foundation of data exchange on the web.</p><p>Why do you need that? Nowadays it&#8217;s very common to connect to third-party services using APIs, so we can get access to data such as tweets and the weather or add functionality to your web app like adding payment, translation, and email. If those APIs didn&#8217;t exist, you&#8217;d have to create those services from scratch!</p><p>Fortunately, with APIs, we only need some minutes to get access to such services. That said, if you want to work with an API, you&#8217;ll need to send HTTP requests and receive responses. As you might guess, the Requests library is the perfect tool for this.</p><p>Here&#8217;s an example of how I used the requests library to perform speech-to-text using this API.</p><pre><code><strong>import</strong> requests

...

headers = {'authorization': api_key,
           'content-type': 'application/json'}

response = requests.post(upload_endpoint,
                         headers=headers,
                         data=read_file(filename))

audio_url = response.json()['upload_url']</code></pre><p>But that&#8217;s not all! If you add a web scraping library like Beautiful Soup, you can even extract data from websites using requests.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Selenium</h3><p>Every job has tasks that can be automated, and unless you want to waste time doing it manually, you should learn Selenium to automate most websites out there.</p><p>Selenium is an automation testing tool that you can use to automate websites with Python. With Selenium, you can perform web actions such as clicking on buttons, navigating through pages, selecting elements within a dropdown, and even extracting data!</p><p>You can also customize the bot further by adding waits and rotating proxies, so the bot behaves like a &#8220;regular person.&#8221;</p><p>Here&#8217;s some Python code to open a browser, go to a website, and then quit it using Selenium.</p><pre><code><strong>from</strong> selenium <strong>import</strong> webdriver
<strong>from</strong> selenium.webdriver.chrome.service <strong>import</strong> Service

web = 'https://www.example.com'
path = '/.../chromedriver'

<em># Creating the driver</em>
driver_service = Service(executable_path=path)
driver = webdriver.Chrome(service=driver_service)
driver.get(web)

<em># Quit driver
</em>driver.quit()</code></pre><p>And here&#8217;s a demo.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b89W!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b89W!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 424w, https://substackcdn.com/image/fetch/$s_!b89W!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 848w, https://substackcdn.com/image/fetch/$s_!b89W!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 1272w, https://substackcdn.com/image/fetch/$s_!b89W!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b89W!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif" width="640" height="361" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:361,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!b89W!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 424w, https://substackcdn.com/image/fetch/$s_!b89W!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 848w, https://substackcdn.com/image/fetch/$s_!b89W!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 1272w, https://substackcdn.com/image/fetch/$s_!b89W!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28ed8f6a-ea06-4375-8c65-31a3b613989a_640x361.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>The best thing about learning Selenium is that once you master it, you can automate not only one but most websites out there.</p><p>Here&#8217;s a <a href="https://youtu.be/UOsRrxMKJYk">video tutorial</a> to get you started with Selenium in Python.</p><h3>PyTest</h3><p>Anyone learning Python should be able to prepare their code for an industry setting.</p><p>How to do that? Testing your code!</p><p>PyTest is a framework that allows us to write test codes in Python. With Pytest, we can write small, readable tests that can scale to support complex functional testing for apps and libraries.</p><p>But why do we need to test our code? Well, we can make little mistakes when writing code that aren&#8217;t easy to detect simply because they don&#8217;t throw an error or crash a program. Your code may run fine once, but it could give you some headaches in the long run. This is why we need to test our code to avoid unexpected results and ensure we can rely on our output.</p><p>There are different ways to test code, but Pytest makes testing simple and also allows us to see which tests failed and which succeeded.</p><p>Here&#8217;s a test I made:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2ycK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2ycK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 424w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 848w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 1272w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2ycK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp" width="700" height="432" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:432,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33770,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2ycK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 424w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 848w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 1272w, https://substackcdn.com/image/fetch/$s_!2ycK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fee4ab-816f-45ed-856c-ed2fcb4a0415_700x432.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p>If you know a library that can be added to this list, let me know in the comments &#128071; </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/p/ai-and-python-36-python-libraries?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/p/ai-and-python-36-python-libraries?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #35: Data Science Projects in Python for All Levels]]></title><description><![CDATA[Beginner and advanced data science projects with source code.]]></description><link>https://artificialcorner.com/p/ai-and-python-35-data-science-projects</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-35-data-science-projects</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 12 Dec 2024 17:23:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Laok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Laok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Laok!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Laok!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Laok!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Laok!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Laok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2094582,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Laok!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Laok!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Laok!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Laok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd456566b-6678-4d41-b275-f1356f39411f_6000x3376.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Credit: <a href="https://unsplash.com/photos/a-screen-shot-of-a-computer-wtpTL_SzmhM">Unsplash</a></figcaption></figure></div><blockquote><p>Hi!</p><p>Before we start with today&#8217;s article, I&#8217;d like to tell you about something that might be of interest to those interested in Python and data science. DataCamp has an incredible certification program that&#8217;s perfect for you: <a href="https://datacamp.pxf.io/gOOdqr">The Python Data Associate Certification</a>.</p><p>This certification is designed to help you:</p><ul><li><p>Prove your Python skills are ready for real-world application</p></li><li><p>Build credibility in the competitive data industry</p></li><li><p>Land your dream job in the data field</p></li></ul><p>If you&#8217;re serious about standing out in the job market, this certification is the perfect step forward.  To get the certification, you need to <a href="https://datacamp.pxf.io/gOOdqr">register</a>, and then you&#8217;ll have 30 days to conquer a timed exam and practical exam. If you need to give it a second try, Datacamp can help you fill the gaps in your knowledge before you try again.</p><p>What I like about Datacamp is that they offer interactive lessons, practical exercises, and real-world projects. Projects are very useful to put the concepts we learn into practice, and today we&#8217;ll see 5 data science projects you can do with Python.</p></blockquote><p>I love solving projects to learn data science and Python.</p><p>Why? A project will help you put into practice all the knowledge you&#8217;ve acquired from math, statistics, and programming. It&#8217;s like putting the pieces of a puzzle together to solve a real-world problem.</p><p>In this article, I listed some data science projects you can do with Python. The projects are listed by difficulty starting with the beginner projects. Knowledge of libraries such as Pandas, Numpy, and Scikit-learn is necessary to solve most of these projects. I&#8217;ll leave links to tutorials to help you solve these projects.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>1. Sentiment Analysis</h3><p>The first project of this list is to build a machine-learning model that predicts the sentiment of a movie review. Sentiment analysis is an NLP technique used to determine whether data is positive, negative, or neutral. It&#8217;s really helpful for businesses because it helps them understand the overall opinions of their customers.</p><p>For this project, you will use an IMDB dataset that contains 50k movie reviews. with 2 columns (review and sentiment). The goal is to build the best machine learning model that predicts the sentiment given a movie review. </p><p>To make this project beginner friendly you only have to predict whether a movie review is positive or negative. This is known as binary text classification because there are only two possible outcomes.</p><p>One of the things that make this first project special is that you will explore the scikit-learn library while building a basic machine-learning model from scratch.</p><ul><li><p>Libraries: Pandas, Scikit-learn</p></li><li><p>Tutorial: <a href="https://artificialcorner.com/p/ai-and-python-25-lets-build-your">Sentiment Analysis in Python (Text Classification)</a></p></li></ul><h3>2. Fake News Detection</h3><p>The most beginner-friendly detection project is probably Fake News Detection. Fake news is spread everywhere on the internet. This generates confusion and panic among the population. This is why is important to identify the authenticity of the information. Fortunately, we can use Python to tackle this data science project.</p><ul><li><p>Libraries: Scikit learn (TfidfVectorizer and PassiveAggressiveClassifier<strong>)</strong>,<strong> </strong>Pandas and Numpy</p></li><li><p>Tutorial: <a href="https://data-flair.training/blogs/advanced-python-project-detecting-fake-news/">Detecting Fake News</a></p></li></ul><p>The goal of this project is to separate real news from fake news. To do so, we will use sklearn&#8217;s tools such as TfidfVectorizer and PassiveAggressiveClassifier.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>3. Credit card fraud detection</h3><p>Credit card fraud costs both consumers and companies billions of dollars while fraudsters keep trying to find new ways to commit these illegal actions. This is why fraud detection systems have become essential for banks to minimize losses.</p><p>In this project, you should analyze customer&#8217;s spending behavior from a dataset that contains transaction history. Variables like the location will help you identify fraudulent transactions.</p><ul><li><p>Libraries: Pandas, Numpy, Matplolib, Scikit-learn, Machine Learning Algorithms (XGBoost, Random forest, KNN, Logistic regression, SVM, and Decision tree )</p></li><li><p>Source Code: <a href="https://medium.com/codex/credit-card-fraud-detection-with-machine-learning-in-python-ac7281991d87">Credit Card Fraud Detection With Machine Learning in Python</a></p></li></ul><h3>4. Chatbots</h3><p>A chatbot is just a program that simulates human conversation through voice commands or text chats. Advanced chatbots are built using artificial intelligence and used in most messaging applications you have on your phone.</p><p>Although creating voice assistants like Siri and Alexa are too complex, we can still create a basic chatbot using Python and deep learning. In this project, you will have to train a chatbot with a dataset using data science techniques. As these chatbots process more interactions, their intelligence and accuracy will increase.</p><p>Building a simple chatbot will expose you to a variety of useful skills for data science and programming</p><ul><li><p>Libraries: Keras, NLTK, Numpy</p></li><li><p>Source Code: Python Chatbot Project (<a href="https://towardsdatascience.com/how-to-create-a-chatbot-with-python-deep-learning-in-less-than-an-hour-56a063bdfc44">Option 1</a>, <a href="https://data-flair.training/blogs/python-chatbot-project/">Option 2</a>)</p></li></ul><h3>5. Customer Churn Prediction</h3><p>Customer churn is the rate at which customers stop doing business with a company. This represents the percentage of subscribers who discontinue their subscriptions within a given time period. This is a good project to test your data science skills. I even had to solve it in hackathons!</p><p>The main goal of this project is to classify if a customer is going to churn or not. To do so, you will use a dataset that has financial data about a bank&#8217;s customers. Information such as credit score, tenure, number of products, and estimated salary will be used to build this prediction model.</p><p>This project and the credit card fraud detection project are the most complete data science projects listed in this article. It includes exploratory data analysis, feature engineering, data preparation, model fitting, and model selection.</p><ul><li><p>Libraries: Pandas, Matplolib, Scikit-learn, Machine Learning Algorithms (XGBoost, Random forest, KNN, Logistic regression, SVM, and Decision tree)</p></li><li><p>Source Code: <a href="https://www.kaggle.com/kmalit/bank-customer-churn-prediction">Bank Customer Churn Prediction</a></p></li></ul><div><hr></div><p>Good luck solving these projects!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #34: Tools That Made My Life Easier When Writing Code]]></title><description><![CDATA[Tools that you need as a beginner programmer.]]></description><link>https://artificialcorner.com/p/ai-and-python-34-tools-that-made</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-34-tools-that-made</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Fri, 06 Dec 2024 13:05:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oIc6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oIc6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oIc6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oIc6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg" width="800" height="534" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:534,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oIc6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oIc6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe44aa55c-cf1c-443b-a3ad-d4780361f8d4_800x534.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image via Shutterstock</figcaption></figure></div><p>As a beginner, I used to come across some roadblocks that slowed down my workflow.</p><p>Sometimes I forgot the format needed to create a cron job, a metacharacter needed to build the right regular expression, etc. The tools listed in this article helped me easily deal with these issues.</p><h4>Regex101: Test your regular expressions</h4><p>Have you been in a situation where you need to match a specific search pattern but can&#8217;t build the regular expression (regex) that does the job?</p><p>You know regex but you just don&#8217;t remember that metacharacter that does the trick or something goes wrong when you build a long regular expression.</p><p>I used to have this issue &#8230; until I found Regex101.</p><p><a href="https://regex101.com/">Regex101</a> is a tool that we can use to test our regular expressions. You only need to type a regex and the text that matches will be highlighted in blue.</p><p>Say we want to identify valid emails with a regular expression.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SGMa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SGMa!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 424w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 848w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 1272w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SGMa!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif" width="428" height="272" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/578688e3-620d-4385-9c18-2f2408accb61_428x272.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:272,&quot;width&quot;:428,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SGMa!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 424w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 848w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 1272w, https://substackcdn.com/image/fetch/$s_!SGMa!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F578688e3-620d-4385-9c18-2f2408accb61_428x272.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As you can see in the gif above, only the first email is highlighted in blue because that&#8217;s the only valid email.</p><h4>Crontab Guru</h4><p>Every time we need to schedule a task on macOS and Linux we create a cron job. This allows us to automate a script to complete a task any time we wish.</p><p>The problem is that if we don&#8217;t create the right cron expressions, the job could never start or fail.</p><p>That&#8217;s why we need to use <a href="https://crontab.guru/">Crontab Guru</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H9f7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H9f7!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 424w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 848w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 1272w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H9f7!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif" width="862" height="290" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:290,&quot;width&quot;:862,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H9f7!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 424w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 848w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 1272w, https://substackcdn.com/image/fetch/$s_!H9f7!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dbb5218-d8a7-4b29-978f-931d682c4918_862x290.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Crontab Guru is a quick and simple editor for cron schedule expressions.</p><p>You only need to type the minute, hour, day, and month to see what that expression means in plain English and know when&#8217;s the next time the script is going to be executed.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h4>Strftime</h4><p>Datetime is a very useful module that allows us to work with dates and times in Python. To convert a date/time object to string we need to use the <code>strftime()</code> method as shown below.</p><pre><code><code>from</code> <code>datetime import</code> <code>datetime
now =</code> <code>datetime.now()</code>
<code>now.strftime(&lt;format&gt;)</code></code></pre><p>Simple, right? The thing is, I sometimes forget the format used to convert the date to their string representation.</p><p>Fortunately, there&#8217;s a website called <a href="https://strftime.org/">strftime</a> where you can find a Python strftime cheatsheet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ikuz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ikuz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 424w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 848w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 1272w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ikuz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png" width="797" height="432" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2c5987c-4539-415e-a378-cadf861086c4_797x432.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:432,&quot;width&quot;:797,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ikuz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 424w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 848w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 1272w, https://substackcdn.com/image/fetch/$s_!ikuz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c5987c-4539-415e-a378-cadf861086c4_797x432.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now I can easily get today&#8217;s date in the format I want.</p><pre><code>&gt;&gt;&gt; now.strftime("%B %d, %Y")
'October 28, 2022'</code></pre><h4>HTML Editor</h4><p><a href="https://html-online.com/editor/">HTML Editor</a> is a tool that allows us to create HTML documents as if we were typing text in a Word document.</p><p>Say we want to create an HTML document that has a title, paragraph, and list that looks like the one below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZNph!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZNph!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 424w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 848w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZNph!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png" width="700" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZNph!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 424w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 848w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNph!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36661c94-5f64-4e73-b50f-99af3d78643e_700x336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>Well, we can easily do that with HTML Editor.</p><p>On this website, we only need to type text in the visual editor on the left and it automatically generates its HTML code on the right.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i_Xd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i_Xd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 424w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 848w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 1272w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i_Xd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png" width="800" height="301" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:301,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i_Xd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 424w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 848w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 1272w, https://substackcdn.com/image/fetch/$s_!i_Xd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1872a7d6-fd26-414e-a35d-e8053d8abae0_800x301.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by author</figcaption></figure></div><p>Note that you can use the toolbar to add different elements to the document such as lists, lines, images, links, etc.</p><p>Although there are other alternatives, HTML editor is the best online software with visual preview, inline editor, and markup clean-up feature.</p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-34-tools-that-made">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #33: 4 Python Books That Every Beginner Should Read to Go Beyond The Basics]]></title><description><![CDATA[Move from nooby to advanced Python programmer.]]></description><link>https://artificialcorner.com/p/ai-and-python-33-4-python-books-that</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-33-4-python-books-that</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 20 Nov 2024 16:49:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gpDO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you&#8217;ve already mastered the basics of Python, know how to automate stuff, and are able to do simple tasks at work, but still feel you could do more, it&#8217;s time to take your Python skills to the next level.</p><p>Probably your current Python skills are enough for your personal projects or to keep your boss happy, but there&#8217;s a lot more to learn! Now you might not pay attention to scalability, readability, and organization when writing code, but if you want to move from beginner to advanced Python programmer, these are some of the topics you should learn next.</p><p>Here are 4 books that cover intermediate and advanced programming concepts that you should learn to go beyond the basic Python stuff.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Object-Oriented Python</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gpDO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gpDO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gpDO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg" width="378" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:378,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gpDO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gpDO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11331eae-9bb5-49c5-bc99-95665a76c40e_378x499.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from&nbsp;Amazon</figcaption></figure></div><p>If you have a basic knowledge of Python, you probably write code following a sequence of steps line by line to get things done. As a result, you end up with multiple sections that don&#8217;t have a strong logical connection. This is known as procedural programming, which isn&#8217;t bad for general-purpose programming, but this creates code that is neither reusable nor easy to scale.</p><p>If you want to take your Python skills to the next level you should learn object-oriented programming (OOP). With OOP, we can break a program into reusable blueprint-like components. In OOP we use classes, which are the foundation of Python objects&#8202;&#8212;&#8202;if we master classes, we can create any type of Python objects, therefore any type of program.</p><p>A good book for learning OOP in Python is <a href="https://www.amazon.com/Object-Oriented-Python-Master-Building-Games/dp/1718502060">Object-Oriented Python by Irv Kalb</a>. This book covers cover the basics of OOP and put theory into practice using the pygame package. You&#8217;ll learn key concepts of OOP such as encapsulation, polymorphism, and inheritance. In the end, you&#8217;ll build a complete video game with animations and sounds.</p><h3>Clean Code in Python: Develop maintainable and efficient code</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zJCE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zJCE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zJCE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg" width="406" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:406,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zJCE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zJCE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c2a22a-0762-4219-a342-84a1171cd1a4_406x500.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from&nbsp;Amazon</figcaption></figure></div><p>As a beginner, you probably write code to get things done fast at the expense of organization, readability, and testability, which might lead you to write spaghetti code.</p><p>How to overcome this? Writing clean code.</p><p>If you learn Python and want to develop maintainable and efficient code, you should read <a href="https://www.amazon.com/Clean-Code-Python-maintainable-efficient/dp/1800560214">Clean Code in Python by Mariano Anaya</a>. The book covers topics such as Pythonic code, the SOLID principles, decorators, generators, iterators, asynchronous programming, unit testing, refactoring, and more! To sum it up, many concepts you need to become an advanced programmer.</p><p>By the end of the book, you&#8217;ll be able to apply industry-approved coding practices to design clean, sustainable, and readable real-world Python code.</p><p>Note: Another good option is &#8220;Beyond the Basic Stuff with Python&#8221; by Al Sweigart. In that book, you&#8217;ll also learn how to use tools like the command line, code formatters, type checkers, linters, and version control.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and&nbsp;More</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U2_e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U2_e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U2_e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg" width="378" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:378,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U2_e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!U2_e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f9de3d0-aa52-44a9-bc42-484e7c5e81e2_378x499.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from&nbsp;Amazon</figcaption></figure></div><p><a href="https://www.amazon.com/Serious-Python-Black-Belt-Deployment-Scalability-ebook/dp/B074S4G1L5">Serious Python</a> is a book written for developers and experienced programmers that brings together over 15 years of Python experience to teach you how to avoid common mistakes, write code more efficiently, and build better programs in less time.</p><p>If you ever wanted to get advice from experts and sharpen your Python skills, this is the perfect book for you. This book is a collection of practical tips and real-world advice for tackling common Python problems.</p><p>Here are some of the things covered in this book:</p><ul><li><p>What you should consider before you take a project</p></li><li><p>Python modules, libraries, and frameworks (and how they work under the hood)</p></li><li><p>How to document your project and manage an API as your project grows</p></li><li><p>How to handle time zones in your programs</p></li><li><p>Packaging and distribution standards</p></li><li><p>Methods and decorators</p></li><li><p>Functional programming</p></li><li><p>Performance and optimization</p></li><li><p>Scaling and architecture</p></li><li><p>How to manage relational databases.</p></li></ul><p>The best part of the book is that at the end of each chapter, there&#8217;s an interview with expert Python developers<strong> </strong>who share real-world advice from years of experience.</p><h3>Fluent Python: Clear, Concise, and Effective Programming</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MgK5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MgK5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MgK5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg" width="381" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:381,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MgK5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MgK5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86bf00d-bae4-4473-823b-55a50ef80e31_381x499.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from&nbsp;Amazon</figcaption></figure></div><p>Everyone likes Python because of its simplicity. That&#8217;s good when you start learning the language, but once you master the basics, you should unlock the full potential of Python. To do so, you must learn how to write effective, idiomatic Python code by leveraging its best features</p><p>In the book <a href="https://www.amazon.com/Fluent-Python-Concise-Effective-Programming/dp/1491946008">Fluent Python</a>, you&#8217;ll learn how to make your code shorter, faster, and more readable at the same time.</p><p>Here are some of the topics that the book covers:</p><ul><li><p>Python data model</p></li><li><p>Data structures: An array of sequences, dictionaries and sets, and text vs bytes.</p></li><li><p>Functions as objects</p></li><li><p>Object-oriented idioms: References, mutability, interfaces, operator overloading, and multiple inheritance.</p></li><li><p>Control flow: Context managers, generators, coroutines, and concurrency with futures and asyncio.</p></li><li><p>Metaprogramming:<strong> </strong>Dynamic attributes and properties, attribute descriptors, and class metaprogramming.</p></li></ul><div><hr></div><p>Any Python book recommendation? Share it in the comments!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #32: Software Engineering Practices Anyone Learning Python Should Know]]></title><description><![CDATA[Best practices that you should learn.]]></description><link>https://artificialcorner.com/p/ai-and-python-32-software-engineering</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-32-software-engineering</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Tue, 12 Nov 2024 16:43:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!5rJo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5rJo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5rJo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5rJo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2132402,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5rJo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!5rJo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d5e4f4f-ec03-4dd3-ab66-e3fba790ea6d_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s face it, we sometimes don&#8217;t pay attention to things like writing efficient code,  code structure, and maintainability.</p><p>But we should!</p><p>One day you&#8217;ll be part of projects that involve working with other people. This is why we need to write robust code and follow some good practices that software engineers have.</p><p>Here are some software engineering best practices that you should know.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>Write Clean&nbsp;Code</h3><p>Writing clean code means writing readable, simple, and concise code. Clean code is the foundation of a script that is easy to maintain.</p><p>Believe me, you&#8217;ll make the lives of your teammates easier by writing code that is easy to understand. Simple is better than complex, so don&#8217;t write complex code that even you might struggle to understand.</p><p>Here&#8217;s an example of writing clean code:</p><pre><code># Imagine we want to write a program that categorizes a task based on its execution time
# Below are two ways of writing this code (one is more clean than the other)

<strong># bad</strong>
t = end - start_time  # get execution time
c = category(t)  # get category of task
print(f'Task Duration: {t} seconds, Category: {c}')

<strong># good</strong>
execution_time = end_time - start_time  # get execution time
category = categorize_task(t)  # get category of task
print(f'Task Duration: {execution_time} seconds, Category: {category}')</code></pre><p>Below are the good practices followed in the previous example:</p><ul><li><p>Use meaningful variable names: Make your variable names explanatory and descriptive. A variable named <code>end</code> isn't as explanatory as <code>end_time. </code>A boolean variable <code>single</code> isn&#8217;t as descriptive as <code>is_single</code>.</p></li><li><p>Don&#8217;t use abbreviations in a variable name that no one will understand (e.g.,<code>t</code> and <code>c</code>).</p></li><li><p>Don&#8217;t write too long variable names that no one will remember.</p></li><li><p>Use indentation and whitespaces properly: There are many conventions here like using four spaces for indentation or separating sections with a blank line. They might be hard to remember; fortunately, IDEs like Pycharm will suggest you follow such conventions and show you how to do it.</p></li><li><p>Follow <a href="https://visualgit.readthedocs.io/en/latest/pages/naming_convention.html">PEP8</a> conventions as much as possible when naming objects (e.g., how to use case convention, when to use an underscore, etc)</p></li></ul><h3>Write Modular&nbsp;Code</h3><p>Modular code means writing code that can be separated into functions and modules.</p><p>A program that can be broken into modules helps when debugging. As a program grows in size, it&#8217;s a good practice to split your code into modules. This lets you easily pinpoint the source of errors.</p><p>Also, modular code will help you avoid repetition and write efficient and reusable code.</p><p>Here&#8216;s some advice to start writing modular code:</p><ul><li><p>Don&#8217;t repeat yourself: If you&#8217;re using the same function/method to accomplish a single task, consider creating a function or a for loop instead.</p></li></ul><pre><code># Imagine we have a list named "numbers" and we want to sum a random number to each element of the list and store it in a new list
# Below are two ways of writing this code (one avoids repetition)

numbers = [10, 20, 30, 40, 50]

<strong># bad</strong>
numbers1 = []
for number in numbers:
    numbers1.append(number+1)

numbers5 = []
for number in numbers:
    numbers5.append(number+5)


<strong># better</strong>
def sum_number(my_list, n):
    return [number + n for number in my_list]

sum_1 = sum_number(numbers, 1)
sum_5 = sum_number(numbers, 5)</code></pre><ul><li><p>Minimize the number of functions, classes, and modules</p></li><li><p>Single responsibility principle: A class/function should have only one responsibility. If they do more than one thing, consider refactoring them to two or more classes/functions.</p></li><li><p>Use modules</p></li></ul><h3>Optimize Your&nbsp;Code</h3><p>Writing code that works is good, but you know what&#8217;s better? Writing efficient code that runs fast and consumes little memory and storage. This is why you should optimize your code (even if it already does the job).</p><p>Writing efficient code isn&#8217;t easy. This is a skill that you&#8217;ll learn over time. That said, here&#8217;s some advice that will help you start writing more efficient code today.</p><ul><li><p>Vectorize your operations: Use vector operations (Numpy) over loops whenever possible.</p></li><li><p>Inspect the running time of every operation: This will help you find bottlenecks in your script.</p></li><li><p>Know your data structures and which methods are faster</p></li></ul><p>Let&#8217;s see an example of how vectorizing your operations can help optimize the performance of your script:</p><pre><code># Imagine we have an array of random exam scores and we want to get the average score of those who failed the exam (score&lt;70)
# Below are two way of solving this problem (one using loops and the other using vector operations)

<strong>import</strong> time
<strong>import</strong> numpy <strong>as</strong> np

random_scores = np.random.randint(1, 100, size=10000001)

<strong># SOL1: solving problem using a for loop</strong>
start = time.time()

count_failed = 0
sum_failed = 0
for score in random_scores:
    if score &lt; 70:
        sum_failed += score
        count_failed += 1

print(sum_failed/count_failed)
print(f'Duration: {time.time() - start} seconds')


<strong># SOL2: solving problem using vector operations</strong>
start = time.time()

mean_failed = (random_scores[random_scores &lt; 70]).mean()
print(mean_failed)

print(f'Duration: {time.time() - start} seconds')</code></pre><p>If you run the snippet above, you&#8217;ll see that both solutions get the same result; however, it takes around 2.57 seconds for solution 1 to get the job done, while solution 2 only needs 0.06 seconds.</p><p>Although this little tweak barely saved us 2 seconds, at a larger scale, it can make a big difference in performance.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-32-software-engineering">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #31: How to Self Study Python And Other Technical Stuff]]></title><description><![CDATA[The 5 steps to master Python, SQL, statistics, and more.]]></description><link>https://artificialcorner.com/p/ai-and-python-31-how-to-self-study</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-31-how-to-self-study</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 07 Nov 2024 13:31:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jong!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jong!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jong!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jong!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jong!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jong!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jong!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2143900,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jong!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jong!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jong!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jong!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29195d38-1a6c-4a9f-8031-5432b3611b3b_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Created with Midjourney</figcaption></figure></div><p>There have never been so many free resources online to learn technical subjects.</p><p><em>Do you want to learn Python? There are thousands of tutorials on Youtube<br>Do you want to practice SQL? You can google SQL exercises with solutions&nbsp;<br>Do you want to learn statistics? Khan Academy has many lectures you need for data science</em></p><p>But when it comes to learning all of this on our own, things get a bit complicated. You might wonder where to start, how to study less and learn more, how to retain more information, how to reach your peak performance when studying, and how to make consistent progress.</p><p>In this article, I&#8217;ll show you the 5 steps I follow to learn Python and other technical stuff.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-31-how-to-self-study">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #30: One-Liners Anyone Learning Python Should Know]]></title><description><![CDATA[Make your Python code concise with these one-liners]]></description><link>https://artificialcorner.com/p/ai-and-python-30-one-liners-anyone</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-30-one-liners-anyone</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Tue, 05 Nov 2024 15:22:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!K6pL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K6pL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K6pL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K6pL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1909802,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!K6pL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!K6pL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98d5d834-72da-457e-a839-61b7019a0a26_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p>Hi!</p><p>Before we start with today&#8217;s article, I have great news for all of you! </p><p>From <strong>November 4th to 10th</strong>, DataCamp is offering <strong><a href="https://datacamp.pxf.io/3JA3gn">unlimited FREE access</a></strong> to their entire learning platform! It&#8217;s the perfect chance to level up your Python, data and AI skills.</p><p>This includes:</p><ul><li><p>Access to 510+ courses, career tracks, and certifications</p></li><li><p>Learn Python, ChatGPT, Power BI, SQL, and more</p></li><li><p>Land your dream job with data and AI skills</p></li></ul><p>Don&#8217;t miss out on this exclusive opportunity. <a href="https://datacamp.pxf.io/3JA3gn">Click here</a> to get free access to Datacamp. In case you don&#8217;t know where to start, I recommend you to try this <a href="https://datacamp.pxf.io/MAn1rn">Python Data Fundamentals</a> course.</p></blockquote><p>When we start learning Python, we usually write code that gets the job done without paying attention to the readability of our code and how concise and efficient it is.</p><p>That&#8217;s fine, but there are ways to make our Python code shorter without neglecting readability. This is what one-liners are all about (if you use them properly).</p><p>Here are 8 one-liners that anyone learning Python should know.</p><h3>1. If&#8202;&#8212;&#8202;Else Statement</h3><p>The if-else statement is one of the first statements we learn in Python. It&#8217;s used to execute the true and false parts of a given condition.</p><p>We use this statement quite often, but do you know it can be simplified in one line of code? In this case, both the if and else statements would be on the same line.</p><pre><code>age = 18

valid = "You're an adult"
invalid = "You're NOT an adult"

<strong>print</strong>(valid) <strong>if</strong> age &gt;= 18 <strong>else</strong> <strong>print</strong>(invalid)</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>2. Create a list based on existing&nbsp;lists</h3><p>Lists are a common way to store data, but do you know you can create a new list based on existing lists with just one line of code?</p><p>That&#8217;s true! It&#8217;s called list comprehension and it offers a short syntax to create a list based on the values of an existing list. List comprehension is more compact than functions and loops for making lists.</p><p>Here&#8217;s the syntax, we&#8217;ll use.</p><pre><code>[expression <strong>for</strong> item <strong>in</strong> list]</code></pre><p>Here&#8217;s an example:</p><pre><code>words = ['united states', 'brazil', 'united kingdom']

capitalized = [word.title() <strong>for</strong> word <strong>in</strong> words]

&gt;&gt;&gt; capitalized
['United States', 'Brazil', 'United Kingdom']</code></pre><p>It looks better, isn&#8217;t it? </p><p>Remember that we should keep the code user-friendly, so don&#8217;t write very long list comprehensions in a single line.</p><h3>3. Dictionary Comprehension</h3><p>Similar to list comprehension, there&#8217;s also dictionary comprehension in Python. The idea is the same. Dictionary comprehension offers a short syntax to create a dictionary in one line of code.</p><p>Here&#8217;s the syntax, we&#8217;ll use:</p><pre><code>{key: value <strong>for</strong> key, value <strong>in</strong> iterable}</code></pre><p>Here&#8217;s an example:</p><pre><code>dict_numbers = {x:x*x <strong>for</strong> x <strong>in</strong> range(1,6) }

&gt;&gt;&gt; dict_numbers
{1: 1, 2: 4, 3: 9, 4: 16, 5:25}</code></pre><h3>4. Join Dictionaries</h3><p>There are different ways to join dictionaries. You can use the <code>update()</code> method, <code>merge()</code> operator, and even dictionary comprehension.</p><p>That said, there&#8217;s a simpler way to join dictionaries in Python. This is by using the unpack operator <code>**</code>. We only need to add the <code>**</code> in front of each dictionary we wish to combine and use an additional dictionary to store the output.</p><pre><code>dict_1 = {'a': 1, 'b': 2}
dict_2 = {'c': 3, 'd': 4}

merged_dict = {<strong>**</strong>dict_1, <strong>**</strong>dict_2}

&gt;&gt;&gt; merged_dict
{'a': 1, 'b': 2, 'c': 3, 'd': 4}</code></pre><p>After we apply the <code>**</code> operator to the dictionaries, both will expand their content and combine to create a new dictionary.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>5. Remove Duplicates in a&nbsp;List</h3><p>Sometimes we need to make sure there isn&#8217;t any duplicate value in our list. Although there isn&#8217;t a method that can take care of it easily, you can use sets to get rid of duplicates.</p><p>A set is an unordered collection of items where every element is unique. This means that if we turn our list into a set, we can remove duplicates. Then we only need to convert the set into a list again.</p><p>Let&#8217;s see a basic example to get the hang of it.</p><pre><code>numbers = [1,1,1,2,2,3,4,5,6,7,7,8,9,9,9]

&gt;&gt;&gt; <strong>list</strong>(<strong>set</strong>(numbers))
[1, 2, 3, 4, 5, 6, 7, 8, 9]</code></pre><h3>6. Filter values from a&nbsp;list</h3><p>Say we want to filter some values from a list. You can use many approaches to do this, but a simple way to do it is by using the <code>filter()</code> function.</p><p>Here&#8217;s the syntax of the <code>filter</code> function:</p><pre><code><strong>filter</strong>(function, iterable)</code></pre><p>If you add a <code>lambda</code> function inside of the <code>filter</code> function, things get even better!</p><p>Let&#8217;s get the hang of it by filtering even numbers from a list.</p><pre><code>my_list = [10, 11, 12, 13, 14, 15]

&gt;&gt;&gt; <strong>list</strong>(<strong>filter</strong>(<strong>lambda</strong> x: x%2 == 0, my_list ))
[10, 12, 14]</code></pre><h3>7. Sort dictionary by&nbsp;keys</h3><p>Sorting dictionaries isn&#8217;t as simple as sorting lists&#8202;&#8212;&#8202;we can&#8217;t use either <code>sort() </code>or <code>sorted()</code> to sort dictionaries as we do it with lists.</p><p>The good news is that we can combine dictionary comprehension with the <code>sorted()</code> function to sort dictionaries by keys.</p><p>Let&#8217;s have a look. In the example below, we&#8217;ll sort the dictionaries by the name of the products.</p><pre><code>product_prices = {'Z': 9.99, 'Y': 9.99, 'X': 9.99}

&gt;&gt;{key:product_prices[key] <strong>for</strong> key <strong>in</strong> <strong>sorted</strong>(product_prices.keys())}
{'X': 9.99, 'Y': 9.99, 'Z': 9.99}</code></pre><h3>8. Sort dictionary by&nbsp;values</h3><p>Similarly to sorting dictionaries by keys, we need to use the <code>sorted()</code> function and list comprehension to sort dictionaries by values. But, in addition to that, we also need to add a <code>lambda</code> function.</p><p>First, let&#8217;s see all the parameters that the <code>sorted()</code> function has.</p><pre><code>sorted(iterable, key=None, reverse=False)</code></pre><p>To sort a dictionary by values, we need to use the <em>key</em> parameter. This parameter accepts a function that serves as a key for the sort comparison. Here we can use a <code>lambda</code> function to make things simpler.</p><p>Let&#8217;s say we have a dictionary with population values and we want to sort it by values.</p><pre><code>population = {'USA':329.5, 'Brazil': 212.6, 'UK': 67.2}

&gt;&gt;&gt; <strong>sorted</strong>(population.items(), <strong>key</strong>=<strong>lambda</strong> x:x[1])
[('UK', 67.2), ('Brazil', 212.6), ('USA', 329.5)]</code></pre><p>Now the only thing left is to add dictionary comprehension.</p><pre><code>population = {'USA':329.5, 'Brazil': 212.6, 'UK': 67.2}

&gt;&gt;&gt; {k:v <strong>for</strong> k, v <strong>in</strong> <strong>sorted</strong>(population.items(), <strong>key</strong>=<strong>lambda</strong> x:x[1])}
{'UK': 67.2, 'Brazil': 212.6, 'USA': 329.5}</code></pre><div><hr></div><p>That&#8217;s it! If you have another one-liner that you use frequently, share it in the comments!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[AI & Python #29: Python Projects You Can Finish in a Weekend]]></title><description><![CDATA[Beginner and advanced projects that will help you level up your Python code]]></description><link>https://artificialcorner.com/p/ai-and-python-29-python-projects</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-29-python-projects</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Thu, 31 Oct 2024 13:44:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nw9a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nw9a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nw9a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nw9a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1803756,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nw9a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nw9a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9c7ea93-3997-4340-90fa-6fd17972b589_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Learning Python can be difficult. You might spend a lot of time watching videos and reading books; however, if you can&#8217;t put all the concepts learned into practice, that time will be wasted.</p><p>This is why you should get your hands dirty with Python projects. A project will help you bring together everything you&#8217;ve learned, stay motivated, build a portfolio, and come up with ways of approaching problems and solving them with code.</p><p>In this article, I listed some projects that helped me level up my Python code and hopefully will help you too. The projects are listed by difficulty, so the beginner projects are in the beginning, while the advanced projects are at the end of the article.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-29-python-projects">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #28: The Notebook Used for Data Science and AI Projects]]></title><description><![CDATA[Let's explore Jupyter Notebook and its extensions that make coding a bit easier]]></description><link>https://artificialcorner.com/p/ai-and-python-28-the-notebook-used</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-28-the-notebook-used</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 23 Oct 2024 12:59:07 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ri0B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ri0B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ri0B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ri0B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg" width="800" height="533" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ri0B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ri0B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5202ca4-15f8-4972-aaf7-a33563846093_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@max_duz?utm_source=medium&amp;utm_medium=referral">Max Duzij</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Jupyter Notebook is the computational notebook of choice for data scientists and AI enthusiasts. It allows you to create documents containing not only live code but also equations, visualizations, and text. However, by default, Jupyter Notebook lacks several useful features, such as autocompletion, a table of contents, code folding, etc.</p><p>This is why I made a list of useful Jupyter Notebook extensions that will make your life easier and increase your productivity when writing code.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>How to Install Extensions</h3><p>To install extensions, run the following code in the command prompt or terminal</p><pre><code>pip install jupyter_contrib_nbextensions</code></pre><p>Then run the code below to add the nbextensions files into the Jupyter server&#8217;s search directory.</p><pre><code>jupyter contrib nbextension install</code></pre><p>Now open Jupyter Notebooks. There should be a new tab called &#8220;Nbextensions.&#8221; Click on it and you&#8217;ll see a bunch of extensions you can use to increase your productivity on Jupyter Notebooks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!whkg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!whkg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 424w, https://substackcdn.com/image/fetch/$s_!whkg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 848w, https://substackcdn.com/image/fetch/$s_!whkg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 1272w, https://substackcdn.com/image/fetch/$s_!whkg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!whkg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png" width="1200" height="553" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:553,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!whkg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 424w, https://substackcdn.com/image/fetch/$s_!whkg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 848w, https://substackcdn.com/image/fetch/$s_!whkg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 1272w, https://substackcdn.com/image/fetch/$s_!whkg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd62121b2-7bc5-40b5-8f2d-350718e7f577_1200x553.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><p>The following are the extensions I find the most useful.</p><h4>Move selected&nbsp;cell</h4><p>This is an extremely useful extension that will allow you to move selected cell(s) using keyboard shortcuts <code>Alt-up</code> and <code>Alt-down</code>. Just check the &#8220;Move selected cell&#8221; box inside Nbextensions. Then, refresh the notebook and you will be able to move cells via simple keystrokes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c9TV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c9TV!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 424w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 848w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 1272w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c9TV!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif" width="846" height="364" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:364,&quot;width&quot;:846,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!c9TV!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 424w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 848w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 1272w, https://substackcdn.com/image/fetch/$s_!c9TV!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fceadd4a0-a22c-4133-b2a5-c83b8447cc43_846x364.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><h4><strong>E</strong>nable<strong> </strong>autocompletion (Hinterland)</h4><p>This is an extremely useful extension for those who struggle writing code on Jupyter Notebooks because there&#8217;s no autocompletion. By checking the &#8216;Hinterland&#8217; box, you&#8217;ll enable autocompletion on Jupyter Notebooks and would be able to write code like in your favorite editor.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SB1x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SB1x!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 424w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 848w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 1272w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SB1x!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif" width="774" height="318" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:318,&quot;width&quot;:774,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SB1x!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 424w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 848w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 1272w, https://substackcdn.com/image/fetch/$s_!SB1x!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc21cd93e-d1bf-4911-abb9-167f51fb2181_774x318.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by&nbsp;author</figcaption></figure></div><blockquote><p><em>Explore the complete list of extensions handpicked by me by becoming a paid subscriber :)</em></p></blockquote>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-28-the-notebook-used">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #27: Books I Read to Learn Data Science and Machine Learning]]></title><description><![CDATA[Books handpicked by me.]]></description><link>https://artificialcorner.com/p/ai-and-python-27-books-i-read-to</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-27-books-i-read-to</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 16 Oct 2024 14:40:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VjK1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VjK1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VjK1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VjK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg" width="800" height="517" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:517,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Stack of books&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Stack of books" title="Stack of books" srcset="https://substackcdn.com/image/fetch/$s_!VjK1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VjK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897cc1c7-b7ad-451b-a7de-40bdbece9186_800x517.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@epicantus?utm_source=medium&amp;utm_medium=referral">Daria Nepriakhina</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>I&#8217;ve made a list of 5 books I read some years ago.</p><p>I recommend reading them if you&#8217;ve been dabbling in data science, ML, or AI and would like to learn them from scratch. Also, the books are great for those with some previous knowledge of Python, statistics, or math and would like to know how that knowledge can be used in data science, ML, and AI.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p><h3>#1 &#8220;Data Science from Scratch: First Principles with Python&#8221; by Joel&nbsp;Grus</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TT4C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TT4C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TT4C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg" width="381" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:381,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TT4C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TT4C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3546f69-fde3-4fd9-9d7f-bda59d63376b_381x499.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Book cover image from&nbsp;<a href="https://www.amazon.com/Joel-Grus/dp/149190142X">Amazon</a></figcaption></figure></div><p>This book aims to help you develop the hacking skills necessary to get started doing data science. After reading the book, you&#8217;d be comfortable with the maths and statistics that are at the core of data science. Although there&#8217;s a chapter in this book called &#8220;A Crash Course in Python,&#8221; the book&#8217;s goal is not to teach you Python from scratch, so, in case you have never written code in Python, you should supplement this book with <a href="https://artificialcorner.com/p/behind-ai-16-4-python-books-i-read">one of my recommended Python books for beginners</a>.</p><p>The book is packed with topics that every data scientist should be familiar with in the fields of statistics (probability, hypothesis, and inference), linear algebra (vectors and matrices), and machine learning (theory and concepts behind machine learning models).</p><p>Keep in mind that this first book mostly gives an overview of the topics mentioned before. To dive deeper into these topics, consider reading the books listed below in no particular order.</p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-27-books-i-read-to">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI & Python #26: A Super-Fast Way to Loop in Python]]></title><description><![CDATA[Do you think Python is slow? Here's a fast way to loop in Python]]></description><link>https://artificialcorner.com/p/ai-and-python-26-a-super-fast-way</link><guid isPermaLink="false">https://artificialcorner.com/p/ai-and-python-26-a-super-fast-way</guid><dc:creator><![CDATA[Frank Andrade]]></dc:creator><pubDate>Wed, 02 Oct 2024 12:43:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!MsTd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MsTd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MsTd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 424w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 848w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 1272w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MsTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png" width="800" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfddae5e-1293-49bc-a7de-46f704342730_800x640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MsTd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 424w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 848w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 1272w, https://substackcdn.com/image/fetch/$s_!MsTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfddae5e-1293-49bc-a7de-46f704342730_800x640.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image via Shutterstock</figcaption></figure></div><p>Python is known for being a slow programming language. Although it&#8217;s a fact that Python is slower than other languages, there are some ways to speed up our Python code.</p><p>How? Simple, optimize your code.</p><p>If we write code that consumes little memory and storage, we&#8217;ll not only get the job done but also make our Python code run faster.</p><p>Here&#8217;s a fast and also a super-fast way to loop in Python.</p><h3>The average&nbsp;loop</h3><p>Say we want to sum the numbers from 1 to 100000000 (we might never do that but that big number will help me make my point).</p><p>A typical approach would be to create a variable <code>total_sum=0</code>, loop through a range and increment the value of <code>total_sum</code> by <code>i</code> on every iteration.</p><pre><code><strong>import</strong> time

start = time.time()

total_sum = 0
for i in range(100000000):
    total_sum += i

print(f'Sum: {total_sum}')
print(f'For loop: {time.time() - start} seconds')</code></pre><p>This gets the job done, but it takes around 6.58<strong> </strong>seconds.</p><p>Although that doesn&#8217;t look so slow now, it&#8217;ll get slower as you add more 0s to the number inside the range.</p><p>Let&#8217;s speed this up!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://artificialcorner.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://artificialcorner.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://artificialcorner.com/p/ai-and-python-26-a-super-fast-way">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>