<?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[Everything Python: Everything LLMs]]></title><description><![CDATA[LLMs, demystified with Python. From transformers to production-ready AI apps - practical guides, code, and concepts for developers at every level.]]></description><link>https://everythingpython.substack.com/s/everything-llms</link><image><url>https://substackcdn.com/image/fetch/$s_!XFIK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8b7d669-c5bb-4d0b-8f88-ad71c22aabbb_1024x1024.png</url><title>Everything Python: Everything LLMs</title><link>https://everythingpython.substack.com/s/everything-llms</link></image><generator>Substack</generator><lastBuildDate>Sat, 06 Jun 2026 07:41:40 GMT</lastBuildDate><atom:link href="https://everythingpython.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Abhiram]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[everythingpython@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[everythingpython@substack.com]]></itunes:email><itunes:name><![CDATA[Abhiram]]></itunes:name></itunes:owner><itunes:author><![CDATA[Abhiram]]></itunes:author><googleplay:owner><![CDATA[everythingpython@substack.com]]></googleplay:owner><googleplay:email><![CDATA[everythingpython@substack.com]]></googleplay:email><googleplay:author><![CDATA[Abhiram]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Where did my day go? ]]></title><description><![CDATA[Vibe Coding an Activity monitor]]></description><link>https://everythingpython.substack.com/p/where-did-my-day-go</link><guid isPermaLink="false">https://everythingpython.substack.com/p/where-did-my-day-go</guid><dc:creator><![CDATA[Abhiram]]></dc:creator><pubDate>Fri, 29 May 2026 09:40:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Qu_h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>  We live in distracting times. An <a href="https://hbr.org/2022/08/how-much-time-and-energy-do-we-waste-toggling-between-applications">article from the Harvard Business Review</a> says:</p><div class="pullquote"><blockquote><p><em>To execute a single supply-chain transaction, each person involved switched about 350 times between 22 different applications and unique websites. Over the course of an average day, that meant a single employee would toggle between apps and windows more than 3,600 times. That&#8217;s &#8230; a lot. This kind of toggling is often dismissed as simply &#8220;how we work now,&#8221; even though it&#8217;s also taxing for people and a waste of time, effort, and focus. Yet these trends are likely to continue or get worse in an increasingly digital and remote work world. This should give companies pause.</em></p></blockquote></div><p> Now I&#8217;m not proposing a cure for this cancer. I don&#8217;t have one.</p><p> But I <strong>have</strong> always been a big fan of knowing how productive I am in a work day vs not. How many times do I switch contexts? How many websites do I visit in the course of an hour?</p><p>The earliest instance of a solution I can remember is when I found <a href="https://www.manictime.com/">ManicTime</a> in 2017. I immediately installed it on my laptop. I Loved it. It gave me all the information I needed about what I was doing during work, where my time was going, how long I was away and more. It looked 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_!yj0k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yj0k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 424w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 848w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 1272w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yj0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png" width="1186" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:1186,&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_!yj0k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 424w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 848w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.png 1272w, https://substackcdn.com/image/fetch/$s_!yj0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761c1bf2-9bae-48d1-b98a-d257a2018ff9_1186x621.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>Then I heard about <strong>Rize</strong> last year . It looked much better than ManicTime. Understandable since it was actually built for a consumer rather than for a service based company. But it cost way too much for a personal tracking software.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WUak!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WUak!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 424w, https://substackcdn.com/image/fetch/$s_!WUak!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 848w, https://substackcdn.com/image/fetch/$s_!WUak!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 1272w, https://substackcdn.com/image/fetch/$s_!WUak!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WUak!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png" width="1456" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1456,&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_!WUak!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 424w, https://substackcdn.com/image/fetch/$s_!WUak!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 848w, https://substackcdn.com/image/fetch/$s_!WUak!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.png 1272w, https://substackcdn.com/image/fetch/$s_!WUak!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004a71d8-bf07-4501-b303-a3c7ba4dd854_1920x886.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></figure></div><p>In the pursuit of finding a better Manictime and a cheaper Rize, I landed last year on <a href="https://activitywatch.net/">Activity Watch</a>. It came close to the best activity monitor I had ever used. It was opensource, configurable and I could add my own watchers. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vMWn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vMWn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 424w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 848w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 1272w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vMWn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png" width="1456" height="1502" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1502,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;image-3.png (9513&#215;9813)&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="image-3.png (9513&#215;9813)" title="image-3.png (9513&#215;9813)" srcset="https://substackcdn.com/image/fetch/$s_!vMWn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 424w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 848w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.png 1272w, https://substackcdn.com/image/fetch/$s_!vMWn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8c01d04-c48d-439e-a489-0497f5b312e9_9513x9813.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>I think even now it might be something I could configure for my Mac.</p><p>But the lure of vibecoding something for myself was too strong. Why, even Bilbo struggled with the dilemma -</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gfsq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gfsq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 424w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 848w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 1272w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gfsq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png" width="1154" height="1168" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1168,&quot;width&quot;:1154,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;image-4.png (1154&#215;1168)&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="image-4.png (1154&#215;1168)" title="image-4.png (1154&#215;1168)" srcset="https://substackcdn.com/image/fetch/$s_!Gfsq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 424w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 848w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.png 1272w, https://substackcdn.com/image/fetch/$s_!Gfsq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5bd945a-bc3c-46a9-8989-4da7b514022c_1154x1168.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>That&#8217;s how I ended up creating the configurable, highly imaginatively named - &#8220;<strong>Where Did My Day Go</strong>&#8221;. The caveat is that this is built only for the Mac as of this writing. I plan to extend it to Windows and Linux as well.</p><p>It runs completely locally and tracks all my activities - which applications were used, which websites were accessed, how long I was away from my desk, how long I was active on certain applications I care about (Chrome, VS Code, Terminal etc. )</p><p>Now, I have never built anything for the Mac OS before. Even now, this is a Webapp. But the tricky parts were understanding how the monitoring and collection of metrics For the Mac OS was possible. Something that Claude taught me quite a bit about.</p><div><hr></div><h3>The Build</h3><blockquote><p><strong>Note -</strong> Claude Code stores conversation history locally as JSONL files under <code>~/.claude/projects</code> &#8212; I used this to retrieve my actual prompts.</p></blockquote><p>Here was my initial prompt -</p><blockquote><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G0mi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G0mi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 424w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 848w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 1272w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G0mi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png" width="737" height="154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:154,&quot;width&quot;:737,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28129,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.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_!G0mi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 424w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 848w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 1272w, https://substackcdn.com/image/fetch/$s_!G0mi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e4ffb57-25ac-4c3b-b3a9-479a14b04457_737x154.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div></blockquote><p>The next set of exchanges were about the choice of tech stack and the tracking mechanism. It asked me to pick from a set of stacks that it seemed to find apt for the task and on the basis of my preferences from other applications &#8220;vibe-built&#8221; -</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_!9DOM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9DOM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 424w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 848w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 1272w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9DOM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png" width="723" height="250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:250,&quot;width&quot;:723,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:50061,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.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_!9DOM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 424w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 848w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.png 1272w, https://substackcdn.com/image/fetch/$s_!9DOM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13212450-ec8b-472e-bb78-271ba0f233c0_723x250.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><blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7XNG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7XNG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 424w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 848w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 1272w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7XNG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png" width="720" height="285" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91b3140f-c262-40f3-9ca5-904f35993844_720x285.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:285,&quot;width&quot;:720,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59812,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.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_!7XNG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 424w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 848w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.png 1272w, https://substackcdn.com/image/fetch/$s_!7XNG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91b3140f-c262-40f3-9ca5-904f35993844_720x285.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>While it helped me sort out 95% of the job, it still needed a few nudges. I captured the parts where I had to probe it - parts where it seemed extremely confident.</p><div><hr></div><h3>The Debugging</h3><blockquote><p><strong>Bug 1: Chrome not showing up</strong></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_!jSOt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jSOt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 424w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 848w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 1272w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jSOt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png" width="724" height="286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:286,&quot;width&quot;:724,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44661,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.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_!jSOt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 424w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 848w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.png 1272w, https://substackcdn.com/image/fetch/$s_!jSOt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F68a4c358-43bf-4b94-aa12-f5b5ae4c2dfa_724x286.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k_WG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k_WG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 424w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 848w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 1272w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k_WG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png" width="727" height="483" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/694d783f-c7f2-4971-b410-95209a1af092_727x483.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:483,&quot;width&quot;:727,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56431,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.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_!k_WG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 424w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 848w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.png 1272w, https://substackcdn.com/image/fetch/$s_!k_WG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F694d783f-c7f2-4971-b410-95209a1af092_727x483.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uPv5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uPv5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 424w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 848w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 1272w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uPv5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png" width="729" height="293" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:293,&quot;width&quot;:729,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:47000,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.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_!uPv5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 424w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 848w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.png 1272w, https://substackcdn.com/image/fetch/$s_!uPv5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7b53b2-1b3d-403d-9c45-b308af6092b3_729x293.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 took four rounds before Claude found the actual issue : a stale run-loop in the long-running process. Then came the time inconsistencies.</p><blockquote><p><strong>Bug 2: An hour with more than 60 minutes</strong></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_!kb08!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kb08!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 424w, https://substackcdn.com/image/fetch/$s_!kb08!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 848w, https://substackcdn.com/image/fetch/$s_!kb08!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 1272w, https://substackcdn.com/image/fetch/$s_!kb08!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kb08!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png" width="738" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:738,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91869,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.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_!kb08!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 424w, https://substackcdn.com/image/fetch/$s_!kb08!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 848w, https://substackcdn.com/image/fetch/$s_!kb08!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.png 1272w, https://substackcdn.com/image/fetch/$s_!kb08!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3ef9200-16e7-41a3-be10-35d2d81a5dea_738x592.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>My callout of &#8220;max 60 mins&#8221; seems to have caught a genuine timezone bug Claude had initially explained away as legitimate.</p><blockquote><p> <strong>Bug 3:</strong> Applications not getting tracked as expected.</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_!8wJM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8wJM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 424w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 848w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 1272w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8wJM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png" width="730" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:730,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91038,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.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_!8wJM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 424w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 848w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.png 1272w, https://substackcdn.com/image/fetch/$s_!8wJM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4c366df-88dd-4ab5-994b-c58638cbf26c_730x592.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><strong>Bug 4: Missing minutes</strong></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_!qHPa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qHPa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 424w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 848w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 1272w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qHPa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png" width="734" height="290" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:290,&quot;width&quot;:734,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51721,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.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_!qHPa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 424w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 848w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.png 1272w, https://substackcdn.com/image/fetch/$s_!qHPa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2e866e-9f73-4459-81ce-5988fb1b39c2_734x290.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>Claude was confident most of the time. But the bugs came from pressing it anyway. Goes to show that HITL is still relevant and will be for some time. But after all the battling, it finally it came up with a decent UI and correct metrics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Qu_h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Qu_h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 424w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 848w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Qu_h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png" width="1456" height="901" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:901,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;image-6.png (2846&#215;1762)&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="image-6.png (2846&#215;1762)" title="image-6.png (2846&#215;1762)" srcset="https://substackcdn.com/image/fetch/$s_!Qu_h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 424w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 848w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!Qu_h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4ba119-4d13-49d1-af61-cd0244855c55_2846x1762.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><strong>&#9889;Mid-article Moral -</strong> Never blindly trust an LLM agent. Question it. </p></blockquote><div><hr></div><h3>The Stack</h3><p>Two long-running processes, one SQLite file.</p><p><strong>Collector</strong> (<code>collector.py</code>) : runs forever, samples every 5 seconds:</p><ul><li><p><strong>Python 3.12</strong> with <code>pyobjc</code> for the macOS bindings (Cocoa + Quartz frameworks)</p></li><li><p><code>lsappinfo front</code> (subprocess to the macOS LaunchServices CLI) : the focused app</p></li><li><p><strong>AppleScript</strong> via <code>osascript</code> : the active Chrome tab URL</p></li><li><p><code>Quartz.CGEventSourceSecondsSinceLastEventType</code> : idle time (seconds since last keyboard/mouse event)</p></li><li><p><code>launchd</code> : auto-start at login via a <code>.plist</code> user agent in <code>~/Library/LaunchAgents/</code></p></li></ul><p><strong>Storage</strong> (<code>db.py</code>):</p><ul><li><p><strong>SQLite</strong> : single file, <code>WAL</code> mode + <code>synchronous=NORMAL</code> so the collector and the dashboard can hit it concurrently</p></li><li><p><strong>Schema: intervals, not samples.</strong> One row per consecutive run of identical <code>(category, app, bundle, url, is_idle)</code>. The collector extends <code>end_ts</code> while the key matches, opens a new row when it changes. Months of data fits in ~40K rows.</p></li></ul><p><strong>Dashboard</strong> (<code>server.py</code>, frontend):</p><ul><li><p><strong>Flask</strong> : three JSON endpoints and one HTML template, bound to <code>127.0.0.1</code> only</p></li><li><p><strong>Plain HTML / CSS / vanilla JS</strong> : no build step, no framework, no <code>node_modules</code></p></li><li><p><strong>Chart.js 4</strong> from a CDN : the only outbound network request the app makes; vendor it if you care</p></li><li><p><strong>CSS custom properties as design tokens</strong> : color variables like <code>--c-claude_desktop</code> live in <code>styles.css</code> and are read from JS via <code>getComputedStyle</code>, so chart colors and KPI border colors stay in sync from one source of truth</p></li></ul><p><strong>Project tooling:</strong></p><ul><li><p><code>uv</code> + <code>pyproject.toml</code> + <code>.python-version</code> : no <code>pip</code>, no manual venv.</p></li><li><p><code>uv sync</code> is the entire bootstrap;</p></li><li><p><code>uv run python collector.py</code> is how you run it.</p></li></ul><p>The collector is the fun part . It is a single Python process supervised by launchd. Every 5 seconds it asks macOS four questions: and writes the answer to SQLite. To get the &#8220;focused app&#8221; right means using <code>lsappinfo</code> (LaunchServices) rather than AppKit or window-stacking order.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4jxQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4jxQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 424w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 848w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 1272w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4jxQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png" width="1456" height="304" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:304,&quot;width&quot;:1456,&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_!4jxQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 424w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 848w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 1272w, https://substackcdn.com/image/fetch/$s_!4jxQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db8d289-a2a5-4c62-8854-b6d14588ca65_2134x446.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I tried to understand from Claude why <code>lsappinfo front</code> is better than AppKit or window-stacking order. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LclU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LclU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 424w, https://substackcdn.com/image/fetch/$s_!LclU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 848w, https://substackcdn.com/image/fetch/$s_!LclU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 1272w, https://substackcdn.com/image/fetch/$s_!LclU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LclU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png" width="733" height="661" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:661,&quot;width&quot;:733,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:174123,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/199709087?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.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_!LclU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 424w, https://substackcdn.com/image/fetch/$s_!LclU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 848w, https://substackcdn.com/image/fetch/$s_!LclU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.png 1272w, https://substackcdn.com/image/fetch/$s_!LclU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F235785d8-4f15-4b68-8fd6-ef1bfe924be2_733x661.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>I also found an excellent follow-up read for <a href="https://eclecticlight.co/2020/03/04/learn-almost-everything-about-an-app-with-lsappinfo/">lsappinfo</a>.</p><h3>So Where Did my day go?</h3><p>Let&#8217;s take today as a usecase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hR9A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hR9A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 424w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 848w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 1272w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hR9A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png" width="1456" height="799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:799,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;example-today.png (1769&#215;971)&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="example-today.png (1769&#215;971)" title="example-today.png (1769&#215;971)" srcset="https://substackcdn.com/image/fetch/$s_!hR9A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 424w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 848w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.png 1272w, https://substackcdn.com/image/fetch/$s_!hR9A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70346394-a0bd-4987-a770-7bb30d97cc17_1769x971.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>At the time of this screenshot, I seem to have spent ~52 minutes using VSCode and 45 minutes on Chrome. I was away from my desk for 9 hours and 59 minutes. </p><p>This is understandable since I&#8217;m tracking a 12 AM to 11.59 PM day and a large chunk of that time was spent sleeping. This is a great side benefit I&#8217;ve found to understand when I&#8217;m turning off for the day and an approximate time of when I&#8217;m back at my desk. For today, that seems to be from 12.45 AM to 8 AM. Not too bad I&#8217;d say!</p><div><hr></div><h2>How can you set this up?</h2><p>Just follow the Quick Start section from the Readme file. There&#8217;s a simple bootstrap file you can use at <code>install_launchd.sh</code>. If you have doubts, DM me or raise an issue on the <a href="https://github.com/abhiramr/where-did-my-day-go">Github repo</a>.</p><div><hr></div><h2>Future work (for me)</h2><ul><li><p>I want to try and get more insights out of this. For example, can I sync my phone activity to this dashboard on a LAN? That way I can get proper , bifurcated sleep tracking as well since as a troubling consequence of the times, the phone <strong>is</strong> the last and first device I use before sleeping and after I rise.</p></li><li><p>I also want to try and see if I can capture the time for which the mac was shut down explicitly.</p></li><li><p>Thirdly I want to be able to add applications to be tracked a little more easy to configure. Right now, adding a new app to the dashboard is a spectrum. &#8220;Just track the time&#8221; needs zero config; every focused app gets logged regardless. &#8220;Give it its own category in the API&#8221; is one line in <code>collector.py</code>. &#8220;Give it a colored donut slice and a legend label&#8221; is a few edits across three files. &#8220;Give it a top-level KPI card&#8221; is two more. The data and the visuals aren&#8217;t yet driven by a single config today.</p><div><hr></div></li></ul><p><em>Thanks for reading this edition of Everything Python! Subscribe for free to receive new posts and support my work.</em></p><p><em>Also check out my <a href="https://www.youtube.com/watch?v=zfBMx3Tx2_A">Youtube channel </a>and Subscribe. I hope to create more videos on all things Engineering - From coding in Python to Databases and GenAI !</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://everythingpython.substack.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://everythingpython.substack.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA["Vibe-coding" a status dashboard]]></title><description><![CDATA[I work in the engineering division of a supply chain company and our development process, as most companies do, involves the setting up of our SaaS platform locally.]]></description><link>https://everythingpython.substack.com/p/vibe-coding-a-status-dashboard</link><guid isPermaLink="false">https://everythingpython.substack.com/p/vibe-coding-a-status-dashboard</guid><dc:creator><![CDATA[Abhiram]]></dc:creator><pubDate>Sat, 10 May 2025 08:45:39 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%2Fb8b7d669-c5bb-4d0b-8f88-ad71c22aabbb_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I work in the engineering division of  a supply chain company and our development process, as most companies do, involves the setting up of our SaaS platform locally. </p><p>This means that there are a lot of dependent services that need to be run first that support the overall execution of the platform. </p><p>For e.g. - </p><p>Our platform's stack requires SQL Server, Solr, Redis, Postgres, RabbitMQ, MongoDB as core services to be running first. </p><p>Once these are all running and available, a service called WebAPI can be run that makes use of some of the above to run as well. </p><p>Following this, there are a few more microservices that need to run, but that need not be part of this article since the underlying concept will already come through with the above being demonstrated. </p><p>It all started when in practice on a day-to-day basis, whenever I spun up these services, every now and then, at least ONE of them would go down and at best, the error trace was clear enough from the dependent services as to what the issue was. </p><p>But at worst, it's a rabbit hole of errors to wade through before I would land on the root cause and if one of the service's unavailability was the cause, I would feel really sad about having lost all that time. </p><p>So having gone through this time and time again, I thought I could do something about this. </p><p><strong>ITERATION 1 - The first result of this thought was simply - a checklist.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jrR-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jrR-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 424w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 848w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 1272w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jrR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png" width="465" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e67e736-51ca-4013-a81f-033f5084d014_465x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:465,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69028,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/163261457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.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_!jrR-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 424w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 848w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.png 1272w, https://substackcdn.com/image/fetch/$s_!jrR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e67e736-51ca-4013-a81f-033f5084d014_465x315.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>While it got the bare minimum accomplished, in that, I now had a ready reckoner of all the services that needed to be up each time, I had no way of tracking when something went Down during operations. Additionally, if any of the services were not started , either at startup or by me, the service would simply be neglected till such time as an error would alert me. </p><blockquote><p><em><strong>Rejected coz</strong> :</em> Tick-boxes fixed my <em>initial</em> <em>forgetfulness</em> but still left me blind to mid-session crashes.</p></blockquote><div><hr></div><p>This was not working out. </p><p>Over time, I tried/considered a few more things - </p><p>a) <strong>writing a script</strong> to start them all at once at startup - this failed miserably more often than not since there were some interfering services running because of other ongoing experiments.</p><p>b) <strong>Creating batch scripts</strong> since aliases were missing in Windows and this is predominantly a Windows based platform</p><p>c) <strong>Docker-izing All the services</strong>. But the amount of RAM that was consumed when I ran all the services (except SQL Server and company-specific-services) was a bit more than I liked - speaks to my lack of knowledge in optimizing Docker, I'm sure.</p><p>d) I was also suggested a Prometheus dashboard that I summarily rejected because of the unnecessary level of complexity I was inviting for myself for a personal setup. (Although, I Will set something up with Prometheus eventually - just for masochism's sake.)</p><p>So after months of this sort of juggling, a few weeks ago, I thought - </p><div class="pullquote"><p><strong>FACT :</strong> I've enjoyed using <a href="https://textual.textualize.io/">Textual</a> for other projects. <br><strong>FACT :</strong> Many of these services can be polled for their status from their ports / Win processes.<br> <strong>INFERENCE :</strong> Why not write a Textual app combining these two facts?</p><p><strong>What is it?</strong> <a href="https://textual.textualize.io/">Textual </a>is a <em>Rapid Application Development</em> framework for Python, built by <strong>Will McGugan </strong>and the team at textualize.io. One can build sleek GUI applications Inside the terminal using Python.</p></div><h4>Actually let's back up - Iteration 2. </h4><p>I did <strong>not</strong> think of Textual right from the start. Because initially all I knew was, I wanted a dashboard that would monitor all the services I have running and I could look at for when something went down. </p><p>So the second iteration&#8217;s end result was something like this -</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jEVt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jEVt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 424w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 848w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 1272w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jEVt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png" width="988" height="172" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:172,&quot;width&quot;:988,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:17399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/163261457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.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_!jEVt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 424w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 848w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 1272w, https://substackcdn.com/image/fetch/$s_!jEVt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F720b80f1-42bb-4f33-a859-fb16610b9d97_988x172.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><blockquote><p> <em><strong>Rejected coz</strong> :</em> Curling ports gave me machine-readable <strong>streaming</strong> truth, but looking at raw JSONs is still annoying.</p></blockquote><div><hr></div><h4> Iteration 3 - </h4><p>The improvement on the above was a CLI based table with ASCII &#10004; and &#10006; . <br>Like so -</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!viYR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!viYR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 424w, https://substackcdn.com/image/fetch/$s_!viYR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 848w, https://substackcdn.com/image/fetch/$s_!viYR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 1272w, https://substackcdn.com/image/fetch/$s_!viYR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!viYR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png" width="280" height="140" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05974e76-55c9-48fc-ab07-275798c002ab_280x140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:140,&quot;width&quot;:280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4361,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/163261457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.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_!viYR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 424w, https://substackcdn.com/image/fetch/$s_!viYR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 848w, https://substackcdn.com/image/fetch/$s_!viYR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 1272w, https://substackcdn.com/image/fetch/$s_!viYR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05974e76-55c9-48fc-ab07-275798c002ab_280x140.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><blockquote><p><em><strong>Rejected coz</strong> :</em> A CLI table with &#10004;/&#10006; cut my scan-time, yet wasn&#8217;t appealing enough. It&#8217;s all about the looks now.</p></blockquote><div><hr></div><h4> Iteration 4 - </h4><p><strong>Here</strong> is where I thought of Textual. And I asked for a service monitoring dashboard which did not look as plain as the JSON response above nor the Ascii checks . The result was a little error-ridden but this is where <strong>Knowing</strong> programming <em>while</em> 'vibe-coding' helps. </p><p>The changes I had to make were around providing the right command to obtain the statuses of different services, modifying the ports, fixing the styles etc. </p><p>After the  manual fixes, which admittedly took lesser time than if I'd had to hand-code the whole script, the result was something 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_!Jyae!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jyae!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 424w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 848w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 1272w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jyae!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png" width="438" height="386" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:386,&quot;width&quot;:438,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:7129,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/163261457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.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_!Jyae!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 424w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 848w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.png 1272w, https://substackcdn.com/image/fetch/$s_!Jyae!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe034b0b3-7c9e-414e-8348-6e0834b25a5b_438x386.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><em><strong>NOT Rejected</strong> :</em> PROGRESS. Now for the final lap!</p></blockquote><div><hr></div><h4>Final set of iterations and the end result - </h4><p>From here on, it was mostly smooth sailing. </p><p>I got ChatGPT to fix the universal status symbols to be indicators of Success and Failure - green and red dots, tweak the borders etc. </p><p>There were again, obvious AI-slop-ish errors in the code, which again, was fixable trivially.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KWB9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KWB9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 424w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 848w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 1272w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KWB9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png" width="1070" height="931" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70ad0441-a052-4143-967a-f43050677383_1070x931.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:931,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57786,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/163261457?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.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_!KWB9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 424w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 848w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.png 1272w, https://substackcdn.com/image/fetch/$s_!KWB9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70ad0441-a052-4143-967a-f43050677383_1070x931.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>All in all, the exercise took me less than an hour and I was very happy with it!</p><h4>Next steps </h4><p>- I'd like to make this an installer so that it can be easily installed without the dependency installation hassle. </p><p>- Want to implement an exponential retry and backoff when a service goes down</p><p>- ON/OFF controls for the services</p><div><hr></div><h4><strong>References :</strong> </h4><ul><li><p>ChatGippity (to hear Primeagen say it)</p></li><li><p> https://textual.textualize.io/</p></li><li><p>The Internet</p></li></ul><h4><strong>Codebase -</strong></h4><p>All the code for this project, if you&#8217;d like to set it up, can be found <a href="https://github.com/everythingpython/status-dash">here</a>.</p><div><hr></div><p><em>Thanks for reading Everything Python! Subscribe for free to receive new posts and support my work.</em></p><p><em><strong><a href="https://github.com/everythingpython/status-dash">PS - At the time of this article, we&#8217;d just hit 600 readers! Thank you for being one of them!!</a></strong></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://everythingpython.substack.com/p/vibe-coding-a-status-dashboard?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://everythingpython.substack.com/p/vibe-coding-a-status-dashboard?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>]]></content:encoded></item><item><title><![CDATA[Streaming Real-Time AI Inference Results into MongoDB]]></title><description><![CDATA[Hello Change Streams!]]></description><link>https://everythingpython.substack.com/p/streaming-real-time-ai-inference</link><guid isPermaLink="false">https://everythingpython.substack.com/p/streaming-real-time-ai-inference</guid><dc:creator><![CDATA[Abhiram]]></dc:creator><pubDate>Sat, 01 Mar 2025 02:32:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mB92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp" 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_!mB92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mB92!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!mB92!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!mB92!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!mB92!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mB92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp&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;:289878,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/158145295?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mB92!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!mB92!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!mB92!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!mB92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c362b-f5a5-44a3-bd5e-b1bd2c1c3c5d_1024x1024.webp 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>I'm going to be presenting a talk at a <a href="https://www.mongodb.com/community/events/form/t/311109">Mongo DB User group meetup</a> later today and I thought I'd write about it so that it would -</p><ul><li><p>serve as reading material for meetup attendees wanting to go through the content of my talk later</p></li><li><p>let everyone else know what this is all about.</p></li></ul><p>Let me pre-emptively say, I don't know why I chose this to be the "TITLE" of the talk. It is extremely dry. But the topic is actually a lot of fun!</p><p>Effectively, there is this concept called Change Streams in Mongo DB and this talk is an attempt to understand and illustrate its usage.</p><h2>So first off, what is Mongo DB and where is it used?</h2><p>MongoDB is a database that follows a document model to store data. This means that, in comparison to normal relational databases where data is stored using fixed schemas in rows and columns, Mongo DB and its other Document DB brethren store data in a more flexible format - in JSON-like documents.</p><p>Example of a dataset that can be stored in Mongo :</p><pre><code><code>{
  "_id" : ObjectId(),
  "title" : "Anna Karenina",
  "author" : "Leo Tolstoy",
  "content" : "It's a classic of world literature, exploring themes of love, loyalty, family, and social class in 19th-century Russia.",
  "tags" : [ "Russian" , "Serious" ],
  "publishedDate" : ISODate()
},
{
  "_id" : ObjectId(),
  "title" : "War and Peace",
  "author" : "Leo Tolstoy",
  "content" : "Set during the Napoleonic Wars and focusing on several aristocratic families in Russia.",
  "tags" : [ "Russian", "Serious" ],
  "publishedDate" : ISODate()
}</code></code></pre><p>MongoDB can be used where the data to be stored doesn't particularly benefit from being modelled into strict tables. It can be used when the data schema needs to be more flexible.</p><p>For example, the same data above could have potentially been stored in a Relational DB. But as the number of fields increases and as there end up being more and more complicated JOINS, the Relational DB model might suffer from slowdown.</p><div><hr></div><h2>What are <strong><a href="https://www.mongodb.com/resources/products/capabilities/change-streams#:~:text=A%20change%20stream%20is%20a%20real%2Dtime%20stream%2C%20flowing%20from%20your%20MongoDB%20database%20to%20your%20application%2C%20of%20all%20database%20changes.">Change Streams</a></strong>?</h2><p>This is a feature that has been around for a long time now. We're currently on Mongo DB 8.0.4 as of December 2024 but this feature was introduced in <strong>MongoDB 3.6</strong> in 2017.</p><blockquote><p><strong>It is used to let applications access real-time data changes in Mongo DB. Without having to keep polling for it.</strong></p></blockquote><p>Now other DBs also have this in some shape or form but they all vary in difficulty levels of configuration -</p><ul><li><p>Postgres apparently has support for a Debezium connector that can be used for Change Data Capture (CDC). Never tried it but I think I will after this!</p></li><li><p>Amazon's DocumentDB also has Change Streams but it might need additional configuration compared to Mongo DB.</p></li><li><p>Relational DBs can be configured to use Triggers or <a href="https://medium.com/mercedes-benz-techinnovation-blog/change-data-capture-lessons-learnt-7976391cf78d">Log based CDC</a> but it can impact performance or needs some non-trivial know-how.</p></li></ul><p>In that aspect Change Streams are very easy to configure.</p><p><strong>How do Change Streams work?</strong></p><ul><li><p>This whole mechanism hinges on the fact that Mongo DB relies on "op-log" or operations-log based replication. An op-log is basically a record of all operations performed on data in any collection/database in MongoDB.</p></li><li><p>What this means is that <strong>if</strong> Mongo DB is configured to use a replica set, any changes that are made to the DB are written to the op-log by the primary node. Secondary nodes read /tail the oplog and apply changes in the same order.</p></li><li><p>Change Streams can be used by using a "watch" method on a collection, a database or a whole cluster.</p></li><li><p>So now, whenever there's a certain operation-based change on the "system" under watch, the change stream captures it from the corresponding oplog entry.</p></li><li><p>The operations supported are : insert, update, delete, replace , invalidate</p></li></ul><div><hr></div><h2>How can I enable Change Streams?</h2><blockquote><p>This post assumes you have a working MongoDb setup - I'll write a separate post for this.</p></blockquote><ul><li><p>Go to the Mongo Shell and execute <code>rs.status()</code></p></li></ul><p>If there's a replica set configuration like so -</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VI9U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VI9U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 424w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 848w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 1272w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VI9U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png" width="1087" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&quot;width&quot;:1087,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Alt Text&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="Alt Text" title="Alt Text" srcset="https://substackcdn.com/image/fetch/$s_!VI9U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 424w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 848w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.png 1272w, https://substackcdn.com/image/fetch/$s_!VI9U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65081e2c-d183-470a-ad43-1e3349d182b1_1087x574.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>you're all good. If not, you need to do the following :</p><ul><li><p>Stop the mongo service - Either from Task Manager if you're on Windows. Or using <code>sudo systemctl stop mongod</code> if on Linux.</p></li><li><p>Find the mongod.cfg (Windows) or mongod.conf (Linux) file and add the following line</p></li></ul><pre><code><code>replication:
&#9;  replSetName: "&lt;Whatever name you want&gt;"
</code></code></pre><p>So it looks like -</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Kh7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Kh7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 424w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 848w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 1272w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Kh7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png" width="529" height="101" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:101,&quot;width&quot;:529,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Alt Text&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="Alt Text" title="Alt Text" srcset="https://substackcdn.com/image/fetch/$s_!5Kh7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 424w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 848w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 1272w, https://substackcdn.com/image/fetch/$s_!5Kh7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97bec62e-349c-48df-85bc-fa2f8f2d1655_529x101.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p>Restart the Mongo service.</p></li><li><p>Reopen the Mongo shell and run <code>rs.initiate()</code></p></li></ul><p>Boom! Change Streams are now enabled!</p><div><hr></div><h2>Great. Now how do I use them?</h2><p>I thought about this a lot as well. My initial thought was to mimic the functioning of an oxymeter in a hospital that keeps reporting the oxygen level of a patient.</p><p>But I thought I'd keep it a little lighter.</p><p>So, my simulated use case is one of segregating News Items into 1 of 4 categories as they keep getting pulled from News Sources.</p><p><strong>Here's a broad architecture diagram -</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mdT_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mdT_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 424w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 848w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 1272w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mdT_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png" width="1456" height="432" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:432,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Alt Text&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="Alt Text" title="Alt Text" srcset="https://substackcdn.com/image/fetch/$s_!mdT_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 424w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 848w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.png 1272w, https://substackcdn.com/image/fetch/$s_!mdT_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0155fb15-0abb-4d2c-a95f-5641de10ebc6_1694x503.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>Let's consider this piece by piece :</p><h3>News Generator :</h3><ul><li><p>Here we have 5 "news sources", producing news items every, say 10 seconds.</p></li><li><p>The item , which here is a string is sent to an Azure OpenAI LLM instance with a prompt designed to return the "Category" of News it belongs to. We have a preset expectation of news items to fall under 5 categories : "Sports", "Politics", "Entertainment", "Tech", "Misc". </p><blockquote><p>You don&#8217;t have to use Azure OpenAI. You can use any model you have access to!</p></blockquote></li><li><p>I'm using gpt-4o for this example but it's such a trivial activity that most older or any Small Local Model should also suffice for this task.</p></li><li><p>What is not shown in the diagram is that I'm using <a href="https://github.com/comet-ml/opik">Opik</a> (launched locally) to track my LLM calls.</p></li><li><p>Now as soon as this categorization is obtained, the data is pushed into a collection called "articles" under a DB called "newsDB".</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x9Yp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x9Yp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 424w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 848w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 1272w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x9Yp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png" width="1361" height="631" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:631,&quot;width&quot;:1361,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Alt Text&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="Alt Text" title="Alt Text" srcset="https://substackcdn.com/image/fetch/$s_!x9Yp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 424w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 848w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.png 1272w, https://substackcdn.com/image/fetch/$s_!x9Yp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6a3219-2886-4629-96ff-15eb22213e7e_1361x631.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><h3>The Flask App</h3><ul><li><p>This doesn't necessarily have to be a Flask app. Pick your web server of choice - FastAPI, Django, Bottle, whatever you want. But yes, in this example, it is a flask app.</p></li><li><p>Here, I do a few things : </p><ul><li><p> Make sure the Mongo DB is connected to on port 27017 (default) and that the UI reflects the number of pre-existing records for each category in the DB. For a fresh start, that number is 0 for all categories. </p></li><li><p> Set up a <code>collection.watch()</code> on the <code>articles</code> collection so that the change stream can be captured. </p></li><li><p>Start the flask server using websockets (via flask-socketio) so that a steady, bidirectional connection is established between server and client. This way, the browser is always watching for any changes that the DB is ready to communicate back without needing a refresh of the screen.</p></li></ul></li></ul><h3>The Client/ UI/ Browser</h3><ul><li><p>If the server is started on say, port 5002, I navigate to http://localhost:5002</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hPn9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hPn9!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hPn9!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif&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;:null,&quot;alt&quot;:&quot;Alt Text&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="Alt Text" title="Alt Text" srcset="https://substackcdn.com/image/fetch/$s_!hPn9!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!hPn9!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dc7853b-4ca9-446e-88cc-36d3469964d2_1920x1080.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>This changes automatically every 20 seconds (since that&#8217;s what I&#8217;ve configured underneath. You can set your own value.)</p><p>Because of Change Streams, with each article being produced and categorized, the DB&#8217;s state is Almost Immediately informed to the application. </p><p>This is something we'd have had to poll the DB regularly for, if this feature weren't there. And because we use websockets, the updated state of the DB can directly go from server to client I.e UI/the browser as well. </p><p>Now, are there any disadvantages to using Change streams? Absolutely. Since the op log is continuously, automatically being watched and tailed, there is a bit of a compute impact. But if the application demands near-realtime updates, that additional compute is the price to pay for the feature! </p><p>Hopefully this gave you an idea of how Change Streams can be used!</p><div><hr></div><h3>Codebase -</h3><p>All the code for this project can be found <a href="https://github.com/everythingpython/everythingpython.github.io/tree/main/_notes/Public/Talks/MongoDB/real-time-inference-change-streams/src/NewsMon">here</a>.</p><p></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://everythingpython.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><em>Thanks for reading Everything Python! Subscribe for free to receive new posts and support my work.</em></p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[I want to run LLM Models locally. What do I do?]]></title><description><![CDATA[One of the most sought after things to learn right now is about how to set up your own local LLM server and how to use LLM models locally.]]></description><link>https://everythingpython.substack.com/p/i-want-to-run-llm-models-locally</link><guid isPermaLink="false">https://everythingpython.substack.com/p/i-want-to-run-llm-models-locally</guid><dc:creator><![CDATA[Abhiram]]></dc:creator><pubDate>Mon, 06 Jan 2025 08:55:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04b8ebf6-a585-44a0-b365-1b0b0e822739_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>One of the most sought after things to learn right now is about how to set up your own local LLM server and how to use LLM models locally. With the arrival of some things like Ollama and LM Studio etc, it has become very easy. Ollama is an orchestrator that lets you serve up models locally, models like Llama 3.1, Qwen-2.5, Phi, whatever models you have on HuggingFace. These are available to be served up and many more.</p><h3>Why would I want to do this?</h3><p>Fair question to ask in the face of so many ubiquitous LLM offerings present like ChatGPT, Claude, Gemini etc. Why do I even want to set up an LLM locally? I asked ChatGPT this and it told me a lot of what I was thinking along the lines of - like privacy, to prevent reliance on possibly unreliable internet and it kept going for a while, so I asked it to -</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PJlo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PJlo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 424w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 848w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 1272w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PJlo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png" width="1061" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:1061,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;image&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="image" title="image" srcset="https://substackcdn.com/image/fetch/$s_!PJlo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 424w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 848w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.png 1272w, https://substackcdn.com/image/fetch/$s_!PJlo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a10de64-64a5-4327-980b-d50e89b10fd0_1061x315.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><div><hr></div><h3>Setting up Ollama -</h3><ul><li><p>Depending on your operating system, download the corresponding Ollama executable from the official <a href="https://ollama.com/download">website</a>.</p></li><li><p>Once you download and run it, it should be running as a small service in the background of your operating system. For example, if you're on Windows, you should be able to see it running on the tray on your screen's bottom right corner.</p><p>If you&#8217;re on a Mac, it should show up on your Menu bar like so - </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LemJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LemJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 424w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 848w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 1272w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LemJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png" width="932" height="388" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:388,&quot;width&quot;:932,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46718,&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;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/154254870?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.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_!LemJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 424w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 848w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.png 1272w, https://substackcdn.com/image/fetch/$s_!LemJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e398e5c-da38-4d6e-ba98-c92a0086e0c8_932x388.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></figure></div><ul><li><p>To test that it&#8217;s working, open up a CMD or a Terminal instance and type : </p><ul><li><p><code>ollama -h</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FEri!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FEri!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 424w, https://substackcdn.com/image/fetch/$s_!FEri!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 848w, https://substackcdn.com/image/fetch/$s_!FEri!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 1272w, https://substackcdn.com/image/fetch/$s_!FEri!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FEri!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png" width="863" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:863,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66598,&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;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/154254870?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.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_!FEri!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 424w, https://substackcdn.com/image/fetch/$s_!FEri!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 848w, https://substackcdn.com/image/fetch/$s_!FEri!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.png 1272w, https://substackcdn.com/image/fetch/$s_!FEri!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bca9fd9-c6fb-4211-98b3-afe35a01e056_863x672.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></figure></div></li></ul></li></ul></li><li><p>To download any existing models, fetch them from the <a href="https://ollama.com/search">Ollama Models page</a> and pull them locally using <code>ollama run</code></p></li><li><p>For example, I want to run one of the latest models - olmo2</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;463fa592-fd91-4591-b5e9-4cbcba245bbb&quot;,&quot;duration&quot;:null}"></div><p>Once that model is pulled, the prompt looks a little 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_!nPZh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nPZh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 424w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 848w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 1272w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nPZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png" width="775" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:775,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:11800,&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;:false,&quot;internalRedirect&quot;:&quot;https://everythingpython.substack.com/i/154254870?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.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_!nPZh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 424w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 848w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.png 1272w, https://substackcdn.com/image/fetch/$s_!nPZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3745523-5b41-4ffa-9830-e577b2a88caa_775x300.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></figure></div><p></p></li><li><p>Smaller models are better for lower config laptops/desktops.</p></li></ul><p></p><div><hr></div><blockquote><p>This section is optional. </p></blockquote><p>The next thing to do to mimic a local Chat-GPT-ish experience is to hook this backend Ollama server to a front-end web interface. This is where <a href="https://openwebui.com/">https://openwebui.com/</a> comes in.</p><div><hr></div><h3>Setting up OpenWebUI -</h3><p>The Github README for OpenWebUI is extremely helpful. A few months ago when I tried it out, they only had the Docker based offering but now it seems that all that is to be done to set it up is -</p><ul><li><p><a href="https://everythingpython.substack.com/p/virtual-environments-using-uv">Create and activate a virtual environment</a></p></li><li><p><code>uv pip install open-webui</code></p></li><li><p><code>open-webui serve</code></p></li></ul><p>So when you visit localhost:8000 on your browser you should be able to see a chatgpt-ish interface and the list of models you downloaded on Ollama on a top-left corner dropdown.</p><div><hr></div><h3>Performance</h3><ul><li><p>"How fast is it?", a friend asked. It's not going to be comparable to OpenAI/Claude/Gemini server speeds given that it is limited by your local laptop's CPU/GPU. But on a Mac M1 or a Windows i5 with 32 GB RAM, it's able to run and engage in processing and conversations at fairly decent, tolerable speeds.</p></li></ul><p></p><div><hr></div><h3>What are my other options?</h3><p>There's a couple of other options like LMStudio and Msty, but those are "left as an exercise to the reader" to try out. :D</p><p>Happy local chatting!</p><div><hr></div><p>If you found this useful, please share it with your friends and ask them to subscribe to EverythingPython as well!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://everythingpython.substack.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://everythingpython.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item></channel></rss>