<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by void_sam on Medium]]></title>
        <description><![CDATA[Stories by void_sam on Medium]]></description>
        <link>https://medium.com/@void_sam?source=rss-ad6ca8dcb364------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*K4VCAiM5lmpkbAM0xP7Ldg.jpeg</url>
            <title>Stories by void_sam on Medium</title>
            <link>https://medium.com/@void_sam?source=rss-ad6ca8dcb364------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:47:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@void_sam/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The 4 Best Datasets to Learn Tableau as beginner (And Where to Find Them)]]></title>
            <link>https://medium.com/@void_sam/the-4-best-datasets-to-learn-tableau-as-beginner-and-where-to-find-them-a4631cfa495b?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4631cfa495b</guid>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[dataset]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 19:59:29 GMT</pubDate>
            <atom:updated>2026-09-26T20:15:44.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xvu70b93ZHg9QAp_DgX7g.jpeg" /></figure><p><strong>01. The “Global Superstore” Dataset (The Gold Standard)</strong></p><p>If there is a holy grail of Tableau practice data, this is it. It’s a massive spreadsheet of a fictional retail store’s sales, profits, customers, and locations.</p><p>- What it teaches you: Everything. It teaches you how to make line charts over time, how to track profit by category, and how to connect different tables of data together. <br>- Where to find it: Just search “Sample Superstore xls” on Google, or grab it on Kaggle.<br>- Pro Tip: Use this dataset to build your very first “Executive Dashboard.” Make a map of sales by state, a bar chart of profit by category, and put them on one screen.</p><p><strong>02. The Netflix Movies &amp; TV Shows Dataset</strong></p><p>This one contains every movie and show available on Netflix, along with the release year, duration, and genre. It is super fun to explore because you actually know the titles.</p><p>- What it teaches you: How to work with text (string) data and how to build interactive filters so users can click on “Horror” and see only horror movies.<br>- Where to find it: Kaggle — Netflix Shows.<br>- Pro Tip: The “genre” column in this file is messy (it lists multiple genres separated by commas in one cell). Right-click that column in Tableau and select “Split.” Boom Tableau automatically separates the genres into clean columns.</p><p>03. The NYC Airbnb Dataset</p><p>This dataset has thousands of Airbnb listings in New York City, complete with prices, neighborhoods, and exact latitude/longitude coordinates.</p><p>- What it teaches you: Maps Tableau has incredible built-in mapping capabilities. This dataset teaches you how to plot dots on a map and use “heatmaps” to show where things are the most expensive.<br>- Where to find it: Kaggle — NYC Airbnb Data.<br>- Pro Tip: Double-click “Latitude” and “Longitude” in your data pane. Tableau instantly builds a map of NYC. Drag the “Price” column to the “Color” box. Darker colors will instantly show you the priciest neighborhoods.</p><p><strong>04. World Bank GDP &amp; Population Data</strong></p><p>A simple, clean dataset containing every country in the world, their population, and their GDP (economic output) over the last few decades.</p><p>- What it teaches you: It teaches you “Filled Maps” (coloring whole countries instead of plotting dots) and how to build side-by-side comparisons. <br>- Where to find it: Search “World Bank GDP dataset Kaggle” or grab it from the Maven Analytics Data Playground.<br>- Pro Tip: Double-click the “Country” field. Tableau automatically recognizes them as geographic locations and generates a world map. Drag “GDP” to the color mark.</p><p><strong>Where to Find More Datasets</strong></p><p>If you don’t want to use Kaggle,here other two great options:</p><p>1. Maven Analytics Data Playground: The best data playground specifically built for Tableau/Power BI learners. They have clean datasets about Pizza sales, World Cup history, and Video Game sales. <br>2. Data.gov: The US government’s open data portal. Great for massive, real-world CSVs on agriculture, climate, and economics.</p><p><em>Thanks for stopping by</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4631cfa495b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable GitHub 2FA with KeePass: A Privacy Focused Alternative]]></title>
            <link>https://medium.com/@void_sam/enable-github-2fa-with-keepass-a-privacy-focused-alternative-079729788d85?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/079729788d85</guid>
            <category><![CDATA[2fa-authentication]]></category>
            <category><![CDATA[keepassxc]]></category>
            <category><![CDATA[foss]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 09:01:46 GMT</pubDate>
            <atom:updated>2026-09-22T09:01:46.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k__bFgFKow1JosHSVnVcwg.jpeg" /></figure><h3>Why KeePass Instead of Authy, Bitwarden, or Microsoft Authenticator?</h3><p>GitHub pushes you toward Authy, Microsoft Authenticator, and Bitwarden when setting up two-factor authentication (2FA). But the problem is :</p><ul><li><strong>Authy : </strong>Cloud-synced codes, Twillio collects your data</li><li><strong>Microsoft Authenticator</strong> : Tied to Microsoft’s ecosystem, tracks your activity</li><li><strong>Bitwarden</strong> : Requires premium just for TOTP codes</li></ul><p><strong>KeePass is different:</strong></p><ul><li>Open-source and auditable</li><li>Completely offline (no cloud, but you can also setup sycthing for syncing to your local laptop, phone or any server)</li><li>Free forever</li><li>Your data stays on your computer</li><li>Works without internet</li><li>No third-party dependency</li></ul><p>If you already use KeePass for passwords, use it for 2FA too. It’s that simple.</p><h3>Step 1 : Get GitHub’s Secret Key</h3><ol><li>Go to GitHub’s 2FA setup page (where you see the QR code)</li><li>Look for <strong>“Can’t scan?”</strong> or <strong>“enter setup key manually”</strong> link</li><li>Click it</li><li><strong>Copy the long text string</strong> (this is your secret key)</li></ol><p>Example: JBSWY3DPEBLW64TMMQ...</p><h3>Step 4: Add the Secret Key to KeePass</h3><ol><li>Open KeePass</li><li>Find or create an entry for GitHub (if you already have one, edit it)</li><li>Right-click the entry <strong>Edit Entry</strong></li><li>Look for the <strong>TOTP</strong> field or button in the dialog</li><li><strong>Paste your secret key</strong> into this field</li><li>Click <strong>OK</strong> and save</li></ol><h3>Step 5: Get Your Verification Code</h3><ol><li>Back on GitHub’s 2FA page</li><li>Open your GitHub entry in KeePass</li><li>Look at the TOTP field — you’ll see a <strong>6-digit code</strong> that changes every 30 seconds</li><li><strong>Copy this code</strong></li><li>Paste it into GitHub’s verification field (where it says “XXXXXX”)</li><li>Click <strong>Continue</strong></li></ol><h3>Step 6: Save Your Backup Codes</h3><p>GitHub will give you <strong>recovery codes</strong>. These are critical.</p><ol><li>Copy all the recovery codes</li><li>Create a new KeePass entry called “GitHub Backup Codes”</li><li>Paste them in the notes field</li><li>Save</li></ol><p>If you ever lose KeePass or your computer breaks, these codes let you regain access to your GitHub account. <strong>Don’t lose them.</strong></p><h3>Verify It Works</h3><ol><li>Log out of GitHub</li><li>Log back in with your username and password</li><li>GitHub asks for a 2FA code</li><li>Open KeePass, look at your GitHub entry’s TOTP field</li><li>Copy the 6-digit code and enter it</li><li>You’re in.</li></ol><p>That’s it. Your GitHub account is now protected with 2FA using only using KeePass.</p><h3>Why This Matters</h3><p>By using KeePass instead of cloud-based authenticators:</p><ul><li><strong>You own your security.</strong> No company controls your 2FA codes.</li><li><strong>No data harvesting.</strong> Your authentication attempts aren’t logged or analyzed.</li><li><strong>Works offline.</strong> Even without internet, your codes work.</li><li><strong>One tool, one password.</strong> Everything stays in one place you control.</li><li><strong>Free forever.</strong> No premium tiers, no surprise paywalls.</li></ul><p>GitHub doesn’t advertise this option because they prefer you use services they can track or that generate network traffic. But it works perfectly, and it’s more private.</p><h3>Conclusion</h3><p>GitHub’s default suggestions prioritize convenience and data collection over privacy. KeePass is the privacy-focused, ownership focused alternative. It’s free, it’s simple, and it keeps your security in your hands.</p><p>Use it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=079729788d85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Messy CSV to Boardroom Insights: A Complete E-Commerce Analytics Case Study]]></title>
            <link>https://medium.com/@void_sam/from-messy-csv-to-boardroom-insights-a-complete-e-commerce-analytics-case-study-71162d06ac40?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/71162d06ac40</guid>
            <category><![CDATA[data-analyst-project]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[csv-file]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 13:20:48 GMT</pubDate>
            <atom:updated>2026-09-21T13:20:48.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TYtcQtbVPLQaIzqHaOa4Q.jpeg" /></figure><p><em>This article documents the complete journey of analyzing over one million transactions for ShopSmart, an online retailer. This will cover not just the insights but the specific technical obstacles that encountered and how to solved them.</em></p><h4>The Business Questions :</h4><p>We were given a raw transaction dataset (Online Retail II) and asked to answer three critical questions for Sarah(Boss) the marketing lead:</p><p><strong>1. Did the Summer Glow marketing campaign actually generate incremental revenue, or was it just seasonal noise?</strong><br><strong>2. Who are our most valuable customers, and who is at risk of churning?</strong><br><strong>3. What products do our best customers buy together, and how can we leverage this for cross-selling?</strong></p><p>These are not academic exercises. The answers directly impact budget allocation, retention strategy, and merchandising decisions.</p><h4>Phase 1: Data Cleaning and Validation :</h4><p>The dataset contained 1,067,371 rows across eight columns. Before any analysis could begin, we had to establish trust in the data.</p><p><strong><em>Handling Missing Values and Type Conversion :</em></strong><br>The `Customer ID` column had 243,007 missing values. In e-commerce, missing IDs typically represent guest checkout users. Rather than dropping these rows (which would bias our customer analysis), we explicitly labeled them as “GUEST”. This allowed us to include their transactional revenue while excluding them from longitudinal customer segmentation where persistent identity is required.</p><p>The `InvoiceDate` column arrived as strings. Converting to datetime objects was essential for time-series grouping. We also filtered out cancellation invoices (those starting with “C”) before calculating revenue, ensuring our metrics reflected actual sales rather than administrative reversals.</p><p><strong><em>Segmenting Sales vs. Adjustments :</em></strong><br>Five transactions had negative revenue values. Instead of treating these as outliers to be deleted, we created a `Transaction_Type` flag. These five adjustments represented $158,676 in post-sale corrections. While small relative to the $20.9M total revenue, isolating them prevented distortion of product-level profitability analysis. This taught us an important lesson: never silently drop anomalies; categorize them first.</p><h4>Phase 2: Campaign Evaluation with Seasonality Controls :</h4><p>Sarah(Boss) wanted to know if Summer Glow worked. The naive approach would be to compare June-August 2011 revenue against the overall average. This would be wrong because retail is highly seasonal. November revenue ($1.5M) is naturally double February revenue ($553K). Comparing summer performance against an annual average that includes holiday peaks would make any summer campaign look like a failure.</p><p><strong><em>The Correct Baseline :</em></strong><br>We compared Summer 2011 (campaign period) against Summer 2010 (historical baseline). This same-month year-over-year comparison controls for seasonality. The result was a +6.7% revenue lift, representing $46,614 in incremental monthly revenue.</p><p><strong><em>Diagnosing the Mechanism :</em></strong><br>A 6.7% lift tells us that it worked, but not why. We analyzed product concentration during the campaign period. After removing non-product entries like shipping fees and internal test transactions, the top 10 SKUs accounted for only 10.9% of campaign revenue.</p><p>This was a critical finding. If the top 10 products had driven 60% of revenue, the recommendation would be to double down on those specific items next year. But broad-based engagement meant the campaign messaging resonated across the entire assortment. The actionable insight was to maintain broad creative strategy rather than concentrating budget on hero products.</p><h4>Phase 3: Customer Segmentation and the Skewed Data Problem :</h4><p>We implemented RFM (Recency, Frequency, Monetary) segmentation to identify high-value customers. This is standard practice, but our data presented a classic e-commerce challenge: extreme skew.</p><p><strong><em>When Quintiles Break :</em></strong><br>Standard RFM scoring uses `pd.qcut(q=5)` to split customers into five equal groups. This assumes the data can be evenly distributed. In our dataset, 44% of registered customers had purchased exactly once. When nearly half your data shares the same value, quintile boundaries collapse. Pandas throws a `ValueError: Bin edges must be unique` because it cannot create five distinct bins when 44% of observations are identical.</p><p><strong><em>The Dynamic Scoring Solution :</em></strong><br>Rather than forcing artificial splits or arbitrarily changing the number of segments, we implemented dynamic label generation. We used `retbins=True` to capture the actual bin edges after duplicate removal, calculated the true number of segments (`n_bins = len(bins) — 1`), and sliced our label array to match. For Frequency, this meant accepting four tiers instead of five. For Recency and Monetary, which were more evenly distributed, we retained five tiers.</p><p>This produced accurate, data-driven segments rather than mathematically convenient but meaningless ones. The output revealed that true “champions” were not perfect 5–5–5 scorers but 5–4–5 customers (high recency, medium frequency, high monetary). This reflected ShopSmart’s wholesale-heavy base where high-spend customers buy in bulk less frequently. Redefining success around this reality was more valuable than chasing an idealized segment that did not exist.</p><p><strong><em>Phase 4: Product Affinity Among High-Value Customers :</em></strong></p><p>General market basket analysis reveals what everyone buys. But general popularity does not drive margin. We needed to know what valuable customers buy together.</p><p>We filtered transactions to only include champion-equivalent customers (RFM scores 54x+) and computed co-purchase frequencies. The top bundle was Red and White Heart T-Light Holders appearing together 604 times. Other top pairs included color variants of lunch bags and matching home decor frames.</p><p>The pattern was clear: customers buy the same design in multiple colors, or complementary items within a theme. This is fundamentally different from buying unrelated products. The business implication is specific: create “Complete the Set” bundles at checkout and test thematic collection pricing. Generic “frequently bought together” recommendations would miss this nuance.</p><h4>Phase 5: Visualization as Communication :</h4><p>Created four charts designed for presentation.</p><ol><li>Monthly Revenue Trend — with the campaign period highlighted and the +6.7% lift annotated directly on the chart. No separate legend needed; the insight is embedded in the visual.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bFpY8BOboTG7sv07tjdWw.png" /></figure><p>2. RFM Segment Distribution — showing the 44% one-time buyer problem as the dominant bar. Numbers are displayed on each bar so the magnitude is immediately apparent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onRORLEZoIh17q6_RDiEiw.png" /></figure><p>3. Product Bundle Horizontal Bar Chart — focused exclusively on champion customers. Truncated product names prevent label overflow while preserving readability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saR7rCa6IDg4HbPncVrqZw.png" /></figure><p>4. Campaign Summary Card — serving as a single-slide executive takeaway with baseline, performance, lift percentage, and verdict.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2D5xfeYa-c3d8TAzY1jZKQ.png" /></figure><p><em>Each chart answers “so what?” without requiring verbal explanation.</em></p><h4>Key Takeaways :</h4><ol><li>Seasonality controls are non-negotiable. — Never evaluate campaigns against overall averages. Same-period year-over-year comparison is the minimum standard.<br>2. Skewed data requires adaptive methods. — Standard statistical functions assume distributions that real-world data rarely satisfies. Build flexibility into your scoring logic.<br>3. Segmentation should drive action, not taxonomy. — If you cannot design a distinct intervention for a segment, merge it. Actionability matters more than granularity.<br>4. Documentation determines impact. — Analysis without reproduction instructions and business context sits unused. Write for the reader who will never run your code.<br>5. Infrastructure friction is part of the job. — Version control conflicts, shell quirks, and environment issues consume real time. Budget for them. Knowing when to pause automation and focus on insights is a professional skill.<br>6. Visualizations must embed the insight. — A chart without annotations is decoration. The conclusion should be visible within three seconds of viewing.</li></ol><p>Please consider giving a star on github if you like this project — <a href="https://github.com/sam-k99/ShopSmart">github</a></p><p><em>All charts are saved as PNGs and can be used directly in presentations without re-running code. The `Data/` folder is excluded from Git tracking via sparse checkout to protect sensitive information and maintain repository performance.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71162d06ac40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an Autonomous Anomaly Detection Engine]]></title>
            <link>https://medium.com/@void_sam/build-an-autonomous-anomaly-detection-engine-28139ad02636?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/28139ad02636</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anomaly-engine]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 07:56:07 GMT</pubDate>
            <atom:updated>2026-09-13T07:56:07.520Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vdRSNihtFOccutn7rh4oFg.png" /></figure><p>Fraud detection is broken. Most companies rely on batch processing, meaning they analyze yesterday’s data today. By the time a fraudulent transaction or a bot attack is detected, the money is already gone. The alternative is static rules, like blocking a user if they make five requests a minute. Hackers easily bypass static rules by setting their bots to four requests a minute.</p><p>The solution is a real-time streaming pipeline paired with an autonomous agent. This system ingests live user events, scores them using unsupervised machine learning in milliseconds, and triggers an AI investigator to analyze the threat.</p><p><em>Here is exactly how to build this using Apache Kafka, scikit-learn, LangGraph, and FastAPI.</em></p><h4>Step 01: The Streaming Backbone</h4><p>The system starts with data ingestion. Instead of sending user events directly to a database, which would crash under high traffic, the events are sent to Apache Kafka. Kafka acts as a massive shock absorber. It holds thousands of events in a queue so the downstream systems are not overwhelmed.</p><p>A Python script acts as a data simulator. It generates realistic user clickstream events, such as logins, page views, and cart additions. To ensure the machine learning model actually has anomalies to catch, the simulator is programmed to occasionally inject bot behavior. A bot event is characterized by an impossibly fast processing time, like five milliseconds, and a burst of twenty requests in one second.</p><p><strong>These events are published to a Kafka topic named raw-user-events. At this stage, the data is just sitting in the queue waiting to be processed.</strong></p><h4>Step 02: The Machine Learning Detection Engine</h4><p>The next component is a Kafka consumer. Its job is to pull events from the queue and score them.</p><p>For the machine learning model, an Isolation Forest is the industry standard for real-time anomaly detection. Unlike traditional models that try to learn what normal data looks like, an Isolation Forest isolates anomalies. It builds random decision trees. Anomalies, being rare and different, get isolated very close to the root of the tree. This makes the mathematical computation incredibly fast, taking less than a millisecond per event.</p><p><strong>The model cannot run on raw text. The consumer must first extract numerical features from the event. It calculates the processing time, the time since the user’s last action, and a numerical code for the action type.</strong></p><p>Crucially, the model requires a warmup phase. Unsupervised models do not know what an anomaly is until they learn what normal looks like. The system buffers the first two hundred events it receives. It uses these to train the Isolation Forest. Once trained, it switches to scoring mode. Every new event is scored. If the model returns a negative one, the event is an anomaly. The consumer immediately pushes this flagged event to a second Kafka topic named flagged-anomalies.</p><h4>Step 03: The Autonomous AI Investigator</h4><p>The machine learning model is fast, but it is dumb. It only looks at numbers. It might flag a human user who took three seconds to type their password as an anomaly, simply because three seconds is slower than the baseline. This creates false positives.</p><p>To solve this, a second Kafka consumer listens to the flagged-anomalies topic. When an anomaly arrives, it triggers an agent. This agent acts as a virtual Security Operations Center analyst.</p><p>The agent is built using LangGraph. LangGraph allows the creation of a state machine, meaning the AI operates in a continuous loop of reasoning rather than just generating text. When the agent receives an anomaly, it analyzes the context. It looks at the processing time and the action type.</p><p>The agent then categorizes the threat. If it sees a processing time of five milliseconds, it knows this is a machine and labels it a high threat, recommending an immediate IP block. If it sees a processing time of three seconds on a login page, it recognizes this is just a slow human typing on a phone, labels it a low threat, and recommends monitoring only. The agent outputs this analysis as a structured JSON report.</p><h4>Step 04: The Live Dashboard and Observability</h4><p>For an engineering team to trust an autonomous system, they need to see it working. A FastAPI backend is used to create a live dashboard.</p><p>The FastAPI server exposes a WebSocket endpoint. As the AI agent reasons through the threat analysis, it streams its thoughts and decisions to the frontend via WebSockets. The dashboard displays a live console showing the AI categorizing the threats in real-time.</p><p>This observability layer is critical. It proves the system is actually processing data and provides visibility into the AI decision-making process.</p><h3>Conclusion</h3><p>Building an anomaly engine is not just about training a model. It requires orchestrating streaming data, real-time machine learning inference, and autonomous AI agents. By combining Kafka for ingestion, an Isolation Forest for detection, and LangGraph for investigation, the system achieves true AIOps. It catches bots in milliseconds and filters out false positives automatically, saving human engineers from hours of manual triage.</p><p><em>If you want more technical and detailed documentation read documentation on GitHub </em><a href="https://github.com/sam-k99/Anomaly-engine"><strong>here</strong></a></p><p>Please consider giving a star if you find it useful</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28139ad02636" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BUILDING A SELF-HEALING DATA PIPELINE]]></title>
            <link>https://medium.com/@void_sam/building-a-self-healing-data-pipeline-9f9593a65f34?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f9593a65f34</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 21:29:03 GMT</pubDate>
            <atom:updated>2026-09-03T19:44:17.524Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9nr16Bx9uQLrwbp5Mtd7Q.jpeg" /></figure><p>Data pipelines break all the time. It is a known pain point in the industry. An upstream API changes a column name from user_dob to date_of_birth, and the entire analytics pipeline crashes. A data engineer has to stop what they are doing, find the error, rewrite the SQL, and open a pull request. This manual toil takes hours. Automating this entire process is the goal.</p><blockquote>This project implements an agent that detects broken pipelines, diagnoses the schema mismatch, rewrites the SQL code, runs data quality tests, and automatically opens a GitHub pull request for human review. Here is exactly how to build it, the challenges involved, and how to solve them.</blockquote><h4><strong>THE PROBLEM WITH MODERN DATA STACKS -</strong></h4><p>Modern data engineering relies on tools like dbt to transform raw data. dbt relies on hardcoded SQL. If the database schema changes unexpectedly, dbt models fail. This is called schema drift. Dashboards break, executives panic, and engineers spend their afternoons reading error logs. A system that handles this without human intervention is needed.</p><h4>00. THE TECH STACK :</h4><p>The tech stack includes Python, PostgreSQL, dbt, Docker, LangGraph, and a large language model. Docker keeps the infrastructure isolated and reproducible. dbt provides clean, predictable error logs, which are perfect for an AI to read. LangGraph allows for cyclical logic, meaning the AI can try to fix something, fail, and loop back to try again.</p><h4>01. BUILDING THE INFRASTRUCTURE :</h4><p>Setting up the environment is the first step. A Docker Compose file spins up a PostgreSQL database. A custom Dockerfile builds an Airflow image that already has dbt and Python dependencies installed. This ensures the project runs identically on any machine without polluting the host operating system.</p><blockquote>Generating mock e-commerce data is done via a Python script using the Faker library, inserting records into a raw table in PostgreSQL. Next come the dbt models. A staging model selects raw data, and a mart model aggregates daily revenue. Standard dbt tests ensure order IDs are unique and not null. At this point, a healthy data pipeline exists.</blockquote><h4>02. SIMULATING THE PROBLEM :</h4><p>To build a self-healing system, something needs to break. A Python script called the schema breaker connects to PostgreSQL and randomly alters the schema. It might rename a column, change a data type, or drop a column entirely. When this script runs, the dbt models immediately crash because the SQL expects the old schema.</p><h4>03. GIVING THE AGENT HANDS :</h4><p>Large language models are just brains. They output text. They cannot magically interact with a database or files. To make an AI an agent, tools must be provided. A Python module is written with five specific functions.</p><p>The first tool inspects the live database schema, querying the information schema to return current column names. The second tool reads the broken dbt SQL file from the local file system. The third tool overwrites that SQL file with new code. The fourth tool runs dbt tests from the command line and returns the output. the fith tool deploy to github using GitOps. Every tool returns a string, because the AI can only read strings.</p><h4>04. BUILDING THE AGENT BRAIN :</h4><p>LangGraph is used to build a ReAct agent. ReAct stands for reasoning and acting. The agent is given a system prompt explaining it is an elite data engineer, instructed to inspect the database, read the broken file, rewrite the SQL, and run the tests.</p><p>LangGraph handles the execution loop. The agent reads the error log, decides to call the inspect tool, reads the result, decides to call the write tool, and then calls the test tool. If the tests fail, it reads the new error and loops back to fix it again.</p><h4>05. THE ENGINEER FINISH :</h4><p>Having an AI rewrite local files is cool, but it is not enterprise ready. In a real company, no code goes straight to production. A fifth tool is added to handle Git operations. When the AI successfully passes the dbt tests, it calls this tool. The tool creates a new Git branch, stages the fixed SQL file, commits it, and pushes it to GitHub. This creates a pull request for a human to review, adding the necessary human in the loop safety net.</p><h3># CHALLENGES FACED AND HOW TO SOLVE THEM -</h3><p>Building this is not smooth. Several major roadblocks will appear.</p><p><strong>(i). </strong>The first is Python versioning. Some database drivers fail to compile from source on this version. Solving this involves using pyenv to install Python 3.12 locally for the project without touching the system Python.</p><p><strong>(ii). </strong>The second is Docker permissions. Airflow runs as a specific user ID inside the container, but local files are owned by the host user ID. The Airflow container cannot read or write the dbt files. Solving this requires setting the AIRFLOW_UID environment variable to match the host user ID.</p><p><strong>(iii).</strong> The third is silent dbt crashes. When running dbt inside the Airflow Docker container, it sometimes crashes without printing any error due to shared library conflicts. Running dbt locally instead of inside the container, pointing it to the Docker database via localhost, fixes this.</p><p><strong>(iv).</strong> The fourth is state management. Running the demo multiple times leaves the database and SQL files in a broken state. The schema breaker fails because columns are already renamed. Solving this involves writing a one click Python demo script. This script wipes the Docker volumes, recreates the database, resets the SQL file, runs the pipeline, breaks it, and triggers the agent, guaranteeing a clean slate every single time.</p><p><strong>(v). </strong>The fifth is API rate limits. Using large models on free API tiers often hits token limits. Switching to a slightly smaller model with higher rate limits, and limiting the amount of text returned by the dbt test tool to save tokens, solves this.</p><h4>CONCLUSION :</h4><blockquote>This project proves that AI can be used for infrastructure engineering, not just chatbots. By combining dbt, LangGraph, and GitOps, a system is built that saves data engineers hours of manual work. It understands enterprise safety rails by pushing fixes to a pull request instead of directly to production. To stand out in the job market, stop building basic chat apps. Build systems that solve real engineering bottlenecks.</blockquote><p><a href="https://github.com/sam-k99/Self-healing-pipeline"><strong>Project repo</strong></a> : <a href="https://github.com/sam-k99/Self-healing-pipeline">Self-healing-pipeline</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f9593a65f34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an Enterprise LLM Gateway from Scratch]]></title>
            <link>https://medium.com/@void_sam/build-an-enterprise-llm-gateway-from-scratch-fc74480d5037?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc74480d5037</guid>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[llm-agent]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 13:51:05 GMT</pubDate>
            <atom:updated>2026-08-16T13:57:48.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-_OPALhpfLV6p-CyspsWg.png" /></figure><p>Every company is building AI apps right now, but they are bleeding money on API costs and risking data leaks. When you send a prompt to a large language model provider, you pay per token. If a user asks a simple question like what is two plus two, you still pay the full price. Worse, a user might type their social security number into the prompt, sending private data to a third party server.</p><p>The solution is an LLM Gateway. It is a middleman API that sits between your application and the LLM provider. It intercepts every prompt, secures it, caches it, and routes it to the cheapest possible model.</p><p>HOW TO BUILD IT ?</p><p>Step 1: The Core API Setup</p><p>First, create a folder for your project and set up a Python virtual environment. Install FastAPI, Uvicorn, and the OpenAI Python library. We will use the OpenAI library but point it to Mistral AI. Mistral has a generous free tier and is fully compatible with the OpenAI code format.</p><p>Create a file named main.py. you need to create a FastAPI application with a chat completions endpoint. This endpoint must accept the exact same JSON format that OpenAI uses. This way, any application built for OpenAI can just change its URL and use your gateway instead.</p><p>Inside your code, initialize the OpenAI client but set the base URL to the Mistral API. Load your Mistral API key from an environment file so it stays secret. When the endpoint receives a request, pass it directly to the Mistral client and return the response.</p><p>Step 2: Dynamic Model Routing</p><p>Right now, every prompt goes to the same model. To save money, you need to classify the prompt. If it is a simple greeting, route it to a cheap fast model. If it is a complex coding request, route it to an expensive smart model.</p><p>Create a function that looks at the user prompt. Convert the prompt to lowercase. Check if it contains keywords like code, write, build, or explain. If it does, return the name of the expensive model. If the prompt is short and has no keywords, return the name of the cheap model. Before sending the request to Mistral, run the prompt through this function to decide which model to use.</p><p>Step 3: Security and Guardrails</p><p>You must protect against data leaks. A user might type their email or social security number. You also need to block hackers from using prompt injection, which is when someone types ignore previous instructions to hijack the AI.</p><p>Create a security module. Use Python regular expressions to find patterns that look like emails or social security numbers. If found, replace them with the word REDACTED. Next, check the prompt for known injection phrases. If an injection is detected, block the request and return an error message. Run every prompt through this security check before routing it.</p><p>Step 4: Semantic Caching</p><p>This is where you save the most money. If 100 people ask what is the capital of France, you should only pay the LLM for the first question. The other 99 should get a cached answer instantly.</p><p>you will use Redis to store the prompts and answers. But you cannot just do a basic text match. you need semantic matching. If someone asks tell me the capital city of France, that means the same thing, and we should still return the cached answer.</p><p>To do this, you use Mistral to generate an embedding for the prompt. An embedding is a list of numbers that represents the meaning of the text. you store that list of numbers in Redis. When a new prompt comes in, you generate its embedding and compare it to the ones in Redis using NumPy. We use a math formula called cosine similarity to check how similar they are. If the similarity is over 85 percent, we return the cached answer and bypass the LLM completely. If it is under 85 percent, we send it to the LLM and save the new prompt and answer to Redis.</p><p>Step 5: Observability with Prometheus</p><p>Companies need to know how much money you are saving them. We will use Prometheus to track metrics. Install the Prometheus FastAPI instrumentator. It will automatically track the number of HTTP requests. We also need custom metrics. Create counters for cache hits and cache misses. Every time your code returns a cached answer, increment the hit counter. Create a histogram to track how many tokens the LLM is using. Expose these metrics at a slash metrics endpoint.</p><p>Step 6: Dockerization</p><p>The last step is to package everything so it can be run by just one single command. Create a Dockerfile. Use the official Python slim image. Copy your requirements file and install dependencies. Then copy your source code.</p><p>Create a docker-compose file. Define three services. The first is your gateway application built from your Dockerfile. Map it to port 8000. The second is Redis, using the official Redis image. The third is Prometheus, using the official Prometheus image. Add a dependency so the gateway waits for Redis to start before booting.</p><p>Run docker compose up. You now have a fully containerized enterprise LLM Gateway.</p><p>Project repo :</p><p><a href="https://github.com/sam-k99/Llm-gateway">https://github.com/sam-k99/Llm-gateway</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc74480d5037" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Lightweight Way: Setting Up ProtonVPN on Arch Linux with WireGuard (No Bloat)]]></title>
            <link>https://medium.com/@void_sam/the-lightweight-way-setting-up-protonvpn-on-arch-linux-with-wireguard-no-bloat-97c7b91826ca?source=rss-ad6ca8dcb364------2</link>
            <guid isPermaLink="false">https://medium.com/p/97c7b91826ca</guid>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[archlinuxvpn]]></category>
            <category><![CDATA[arch-linux]]></category>
            <dc:creator><![CDATA[void_sam]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 15:05:48 GMT</pubDate>
            <atom:updated>2026-08-16T18:25:21.664Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TKp5Gfz9poUU3-DPwpZEZQ.jpeg" /></figure><p>If you use Arch Linux, you know the philosophy: keep it simple, keep it minimal. But when it comes to VPNs, most providers force you to install heavy GUI clients packed with dependencies you don’t need. They eat RAM, run background services, and often break on rolling-release distros.</p><p><strong>There is a better way.</strong></p><p>In this guide, I’ll show you how to set up <em>ProtonVPN</em> Free on Arch Linux using <em>WireGuard</em> and raw configuration files. No heavy apps. No openresolv conflicts. Just a clean, lightweight tunnel that respects your system.</p><p>Why WireGuard?It’s faster than OpenVPN, built directly into the Linux kernel, and uses significantly fewer resources. For a manual setup, it is the gold standard.</p><p>Step 1: Install the Essentials</p><p>You only need one package. WireGuard tools are lightweight and available in the official Arch repositories.</p><p>sudo pacman -S wireguard-tools</p><p>That’s it. No AUR helpers, no Python dependencies, no GUI frameworks.</p><p>Step 2: Get Your Configuration File</p><p>1. Log in to your [ProtonVPN Account](<a href="https://account.protonvpn.com/">https://account.protonvpn.com</a>) in your browser.<br>2. Go to Downloads &gt; Linux<br>3. Scroll to WireGuard configuration files and download the .zip<br>4. Extract the zip. You will see files like `US-Free#1.conf`, NL-Free#1.conf`, etc.</p><p>Pick the server you want (e.g., US-Free) and move it to the WireGuard directory with a simple name:</p><p>sudo mv ~/Downloads/US-Free#1.conf /etc/wireguard/proton.conf</p><p>“Naming it `proton.conf` instead of `US-Free#1.conf` makes typing commands much easier later. You can repeat this step for other servers (e.g., `proton-nl.conf`) if you want multiple options.”</p><p>Step 3: The Critical Edit</p><p>If you try to connect now, you will likely get a `resolvconf: command not found` error or a “signature mismatch.”</p><p>Arch doesn’t include `resolvconf` by default, and installing it often causes conflicts with NetworkManager. Instead, we will handle DNS manually using `PostUp` and `PostDown` hooks.</p><p>Open your config file:</p><p>sudo nvim /etc/wireguard/proton.conf</p><p>Find the `[Interface]` section. You will see a line starting with `DNS =`. Comment it out by adding a `#` at the start. Then, add the two lines below it.</p><p>Why did we do this?</p><ul><li>Commenting out `DNS =`: When `wg-quick` sees an active `DNS` line, it tries to call `resolvconf` automatically. On Arch, this fails. By commenting it out, we tell WireGuard: *”Don’t touch DNS. I’ve got this.”*<br>- PostUp: This runs after the tunnel connects. It forces your system to use Proton’s private DNS (`10.2.0.1`) instead of your ISP’s. This prevents DNS leaks.</li><li>PostDown: This runs after you disconnect. Instead of deleting `/etc/resolv.conf` (which can leave you without internet until NetworkManager notices), we simply tell NetworkManager to reload its settings. This restores your normal DNS instantly and safely.</li></ul><p>Save and exit (`:wq`).</p><p>Step 4: Connect and Verify</p><p>Now for the moment of truth. Run:</p><p>sudo wg-quick up proton</p><p>If successful, you will see ”Peer added” at the end of the output. No errors. No missing commands.</p><p>Verify your IP has changed:</p><p>curl ifconfig.me</p><p>You should see a ProtonVPN IP address (not your real ISP IP).</p><p>Verify your DNS is correct:</p><p>cat /etc/resolv.conf</p><p>It should show only:<br><br>nameserver 10.2.0.1</p><p>If you see your router’s IP or ISP’s DNS here, something went wrong. Double-check Step 3.</p><p>Step 5: Disconnect Safely</p><p>When you’re done, disconnect with: sudo wg-quick down proton<br>Immediately verify your internet is back to normal:</p><p>cat /etc/resolv.conf<br>curl ifconfig.me<br>You should see your original DNS servers restored and your real IP address.</p><p>Confirming Zero Leaks<br>Use [dnsleaktest.com](<a href="https://dnsleaktest.com/">https://dnsleaktest.com</a>) and run the Extended Test. All listed DNS servers should belong to ProtonVPN or their hosting partners (like i3D.net). If you see your ISP’s name, you have a leak.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97c7b91826ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>