<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 一郎 支</title>
    <description>The latest articles on DEV Community by 一郎 支 (@__97f461dfd8e73f7c9aed).</description>
    <link>https://dev.to/__97f461dfd8e73f7c9aed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4176110%2F2209e4c1-8601-42de-b833-19a6c590d000.png</url>
      <title>DEV Community: 一郎 支</title>
      <link>https://dev.to/__97f461dfd8e73f7c9aed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/__97f461dfd8e73f7c9aed"/>
    <language>en</language>
    <item>
      <title>I Built LocalLedger: An Offline Receipt Organizer That Runs Gemma on Your Own Laptop</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:49:34 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-localledger-an-offline-receipt-organizer-that-runs-gemma-on-your-own-laptop-5a28</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-localledger-an-offline-receipt-organizer-that-runs-gemma-on-your-own-laptop-5a28</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LocalLedger&lt;/strong&gt; is an offline invoice and receipt organizer for freelancers. You point it at a folder of receipts; it reads them &lt;strong&gt;on your own laptop&lt;/strong&gt;, sorts every line into a category, writes an accounting-ready CSV plus a plain-language quarterly review, and ends with a list of questions to ask your accountant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who would pay for it, and why:&lt;/strong&gt; freelancers and one-person businesses. Every freelancer I know does their books the same way — a shoebox of PDFs in July, an evening of typing numbers into a spreadsheet, and a nagging worry that they missed a deduction. The existing tools solve this by taking your data: connect your bank feed, upload your receipts to their cloud OCR, pay $15–40 a month forever. For someone billing three clients from a kitchen table, that is real money &lt;strong&gt;and&lt;/strong&gt; a real privacy cost — client names, addresses and rates all sitting in someone else's database.&lt;/p&gt;

&lt;p&gt;LocalLedger is the opposite trade. The entire thing runs locally on an open-weight model, so the numbers never move and the cost per receipt is zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;No install, no API key, no internet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; localledger scan examples/receipts.txt &lt;span class="nt"&gt;--no-llm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LocalLedger - scanning examples/receipts.txt
engine: deterministic-offline

  DATE        VENDOR                          AMOUNT  CATEGORY       NOTE
  ------------------------------------------------------------------------
  2026-07-03  ADOBE SYSTEMS INCORPORATED   22.99 USD  Software       Creative Cloud - monthly subscription
  2026-07-07  UBER TRIP                    18.40 USD  Travel         Ride to client meeting downtown
  2026-07-09  STARBUCKS STORE 1042          6.75 USD  Meals          Team coffee meeting
  2026-07-14  AMAZON MARKETPLACE           31.20 USD  Office         Printer paper and toner
  2026-07-21  LUFTHANSA                   210.50 EUR  Travel         Flight FRA-LHR return
  2026-07-28  MYSTERY VENDOR LTD            9.99 USD  Uncategorized  Misc supplies

  Totals: 210.50 EUR, 14.99 GBP, 224.33 USD
  Documents: 9   Uncategorised: 1

Questions to ask your accountant
  - Meals &amp;amp; entertainment total 6.75 - confirm the deductible percentage in your jurisdiction.
  - 1 uncategorised item(s) (MYSTERY VENDOR LTD) - can they be assigned to a deductible category?
  - Largest single expense: LUFTHANSA at 210.50 EUR - is this a capital asset rather than a one-off cost?
  - Expenses span EUR, GBP, USD - which exchange rate applies on the tax return?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is also a local web console (&lt;code&gt;python -m localledger serve&lt;/code&gt;) that renders the same result as a printable review page, and it reads &lt;code&gt;PORT&lt;/code&gt;, so it drops onto any host unchanged.&lt;/p&gt;

&lt;p&gt;Two outputs land in &lt;code&gt;out/&lt;/code&gt;: a &lt;code&gt;ledger.csv&lt;/code&gt; you can import straight into your accounting software, and a &lt;code&gt;quarterly-review.html&lt;/code&gt; with totals per currency, a category breakdown, every document read, and the accountant questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The whole project is on GitHub and is MIT-licensed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/Zhiyilang/localledger" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang/localledger&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zero third-party dependencies — the core, the CLI, the web console and the test suite all run on the Python standard library alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;LocalLedger has &lt;strong&gt;two interchangeable engines&lt;/strong&gt;, and that split is the whole design:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;When it runs&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deterministic-offline&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Always&lt;/td&gt;
&lt;td&gt;Regex parser + keyword categories. Zero setup, no model, no network.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;local-open-weight-model&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;When &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; or any OpenAI-compatible server is reachable on localhost&lt;/td&gt;
&lt;td&gt;Writes the quarterly narrative in plain English from the parsed rows.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The parsing and categorising are plain code, not the model.&lt;/strong&gt; The regex layer pulls the vendor, date and amount out of each receipt block and normalises dates to ISO (&lt;code&gt;03/07/2026&lt;/code&gt;, &lt;code&gt;25/12/2026&lt;/code&gt; and &lt;code&gt;2026-02-09&lt;/code&gt; all land correctly). The keyword layer assigns a category. Only &lt;em&gt;after&lt;/em&gt; the numbers are fixed does the local model get asked to write the narrative — it is handed the already-parsed rows and told not to invent figures. A bookkeeping tool that hallucinates a total is worse than useless, so the model never touches the arithmetic.&lt;/p&gt;

&lt;p&gt;Every row also carries an &lt;strong&gt;evidence trail&lt;/strong&gt; back to the file and line it came from (&lt;code&gt;examples/receipts.txt:1 vendor=… / date=… / amount=…&lt;/code&gt;), so any number can be traced and audited.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;localledger&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;parse_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;html_report&lt;/span&gt;

&lt;span class="n"&gt;receipts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parse_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;examples/receipts.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;receipts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;              &lt;span class="c1"&gt;# offline engine; pass model=get_model() to use Gemma
&lt;/span&gt;&lt;span class="nf"&gt;html_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;receipts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;out/quarterly-review.html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is tested: &lt;code&gt;python eval.py&lt;/code&gt; runs &lt;strong&gt;46 assertions&lt;/strong&gt; covering parsing, date normalisation, multi-currency totals, categorisation, the accountant-question logic, CSV and HTML output, and — importantly — that an unreachable model falls back cleanly instead of crashing. GitHub Actions runs that suite on Python 3.8, 3.10 and 3.12.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This is the part I care about, because for a freelancer the closed version is actively worse:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It runs on a laptop with no internet.&lt;/strong&gt; The default engine is fully offline, so the tool works on a plane, in a café with bad wifi, or on a machine that never gets an outbound connection. A cloud OCR service cannot do that by definition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The data stays off a server you don't control.&lt;/strong&gt; Client invoices contain names, addresses and amounts. Running the model locally on &lt;code&gt;localhost&lt;/code&gt; means there is no data-processing agreement to sign, no third-party breach surface, and no vendor that can change its privacy policy on you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cost per document is zero.&lt;/strong&gt; Cloud document-AI bills per page. Local inference has no marginal cost, and &lt;em&gt;that&lt;/em&gt; is what makes a €5–10/month price for a freelancer actually work instead of being another SaaS line item.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You can swap the model.&lt;/strong&gt; Because the bridge speaks both Ollama's API and the OpenAI-compatible API, the user can run Gemma, Llama or a fine-tuned model of their own — and can fine-tune it on &lt;em&gt;their&lt;/em&gt; vendor names and categories, something a general-purpose hosted API can never learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A closed API would have made all four of those impossible. The open pieces are not a feature bolted on top; they are the reason the product can exist at this price and with this privacy story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; — LocalLedger is built around running Google's open-weight &lt;strong&gt;Gemma&lt;/strong&gt; locally. &lt;code&gt;gemma2:2b&lt;/code&gt; is the default narrative engine, served through Ollama on &lt;code&gt;localhost&lt;/code&gt;; pulling it is one command (&lt;code&gt;ollama pull gemma2:2b&lt;/code&gt;) and the project's whole privacy-and-cost argument depends on the model running on the user's own machine rather than behind an API.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Anything a freelancer would actually pay for has to earn trust about their money. Running the model locally is how LocalLedger earns it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>I Built an Offline Match Analyst That Turns Event Data Into Evidence-Cited Tactics</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Mon, 12 Oct 2026 11:42:02 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-match-analyst-that-turns-event-data-into-evidence-cited-tactics-3ga1</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-match-analyst-that-turns-event-data-into-evidence-cited-tactics-3ga1</guid>
      <description>&lt;p&gt;A football match produces about 2,000 events in 90 minutes. A pundit watches it once, forms an impression, and talks for an hour. Ask them &lt;em&gt;why&lt;/em&gt; their team lost and you get narrative: "they wanted it more", "the ref changed it", "we were unlucky".&lt;/p&gt;

&lt;p&gt;Last month I watched a match that finished 3-1 and thought the loser was battered. Then I pulled the event data: the losing team had &lt;em&gt;more&lt;/em&gt; expected goals (xG 1.54 vs 1.81 - close), created the better chances, and only collapsed after a 63rd-minute red card. The scoreline told one story. The data told a completely different one - and nobody watching could see it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MatchLens&lt;/strong&gt; is the tool that closes that gap: an offline, zero-dependency match analyst that turns raw event CSVs into an evidence-cited tactical report.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MatchLens does
&lt;/h2&gt;

&lt;p&gt;You export match events (minute, team, type, player, xG) and team info to CSV. MatchLens produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;xG comparison&lt;/strong&gt; - who actually created what, not who scored&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key moment timeline&lt;/strong&gt; - every goal, penalty, red and yellow card &lt;em&gt;with the live scoreline attached&lt;/em&gt;, so you see the swing points&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Six insight types&lt;/strong&gt; - CLINICAL_FINISHING (outscoring your xG), WASTEFUL_ATTACK (chances without end product), MAN_DOWN_EFFECT (performance before vs after a red card), SUB_IMPACT (did the changes work), MOMENTUM_PHASE (which 15-minute block each team owned), DISCIPLINE (cards, fouls)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A natural-language match report&lt;/strong&gt; a coach could read in two minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow-up analysis suggestions&lt;/strong&gt; - what to look at next&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every insight carries evidence citations: the event rows and numbers it used. No vibes, no narrative hand-waving.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real run
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python -m matchlens analyze examples/match_events.csv examples/teams.csv

MATCH: Blue Lions 3-1 Red Hawks
xG:    1.81 - 1.54   (scoreline flatters the winners)

KEY MOMENTS
  23' GOAL  Blue Lions 1-0 (K. Sato, xG 0.62)
  41' RED   Red Hawks - D. Okafor (2nd yellow)          score stays 1-0
  58' PEN   Red Hawks 1-1 from the spot (xG 0.76)
  71' GOAL  Blue Lions 2-1 (counter after save, xG 0.31)
  88' GOAL  Blue Lions 3-1 (xG 0.09 - cleanup, game over)

INSIGHTS
  [MAN_DOWN_EFFECT] Red Hawks xG 1.39 -&amp;gt; 0.15 after the red card
       evidence: events 1-31 (pre) vs 32-58 (post); red card at 41'
  [CLINICAL_FINISHING] Blue Lions scored 3 from 1.81 xG
       evidence: goal minutes 23/71/88 vs cumulative xG by minute
  [MOMENTUM_PHASE] Blue Lions owned 75-90 (xG 0.94 vs 0.08)
       evidence: 15-minute bins from the event xG column
  [WASTEFUL_ATTACK] Red Hawks 1.54 xG, 1 goal - chances without payoff
       evidence: 12 shots, 6 on target, xG 1.54

REPORT: A tight match turned by one red card. Before it, Red Hawks were
ahead on xG. After it, they managed 0.15 xG in 32 minutes. The 3-1
scoreline describes the card, not the football.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The red-card finding is the one I care about: the tool splits the match at the dismissal and compares both halves on xG. "They were unlucky" becomes "they generated 1.39 xG with 11 men and 0.15 with 10" - a number you can argue with.&lt;/p&gt;

&lt;h2&gt;
  
  
  It ships with evals
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python eval.py
PASS  xg_totals_match_event_data
PASS  scoreline_updates_on_every_goal
PASS  red_card_splits_the_match_timeline
PASS  stoppage_time_binned_into_90
PASS  momentum_phase_uses_15_minute_bins
PASS  sub_impact_compares_pre_post_minutes
PASS  every_insight_cites_event_rows
PASS  no_network_access
... 19/19 assertions passed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Building it caught three real bugs, all of the kind that make demo numbers quietly wrong: the scoreline wasn't initialized for the away team (so the first away goal rendered "1" instead of "1-0"), stoppage-time minutes like 90+3' overflowed the 15-minute bins, and one eval assertion had its own expected value wrong. The eval suite is what found them - not me reading the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why offline matters
&lt;/h2&gt;

&lt;p&gt;Event data for professional matches is licensed and expensive; for grassroots and academy football it's usually a coach's spreadsheet. MatchLens runs entirely on your machine - pure standard library, no accounts, no uploads. Your team's data stays yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pure Python stdlib (&lt;code&gt;csv&lt;/code&gt;, &lt;code&gt;datetime&lt;/code&gt;, &lt;code&gt;argparse&lt;/code&gt;) - clone and run&lt;/li&gt;
&lt;li&gt;Deterministic rules with transparent thresholds - every number traceable&lt;/li&gt;
&lt;li&gt;Natural-language report generation from computed facts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Zhiyilang/matchlens" rel="noopener noreferrer"&gt;github.com/Zhiyilang/matchlens&lt;/a&gt; with a full example match (Blue Lions 3-1 Red Hawks, 58 events) and the 19-assertion eval suite. Run &lt;code&gt;python eval.py&lt;/code&gt;, then point it at your own team's export.&lt;/p&gt;

&lt;p&gt;I built MatchLens for the Microsoft x Premier League "Inside the Game" hackathon, but the use case is bigger than that: anyone who has ever argued about a match with data they couldn't check. The next time someone says a team "didn't deserve it", you'll have the xG split, the red-card before-and-after, and the minute-by-minute momentum bins to settle it.&lt;/p&gt;

&lt;p&gt;What insight would you add? Mine is a candidate: &lt;strong&gt;set-piece xG share&lt;/strong&gt; - how much of a team's chance creation comes from dead balls, which is the difference between a good team and a good set-piece coach.&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built an Offline Analyzer That Catches the 8 Trading Habits That Blow Up Accounts</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Mon, 12 Oct 2026 11:09:18 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-analyzer-that-catches-the-8-trading-habits-that-blow-up-accounts-j96</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-analyzer-that-catches-the-8-trading-habits-that-blow-up-accounts-j96</guid>
      <description>&lt;p&gt;A trader on a prop-firm challenge turned a $50k account into $105k in three weeks. Then he lost all of it in one afternoon. The platform's risk dashboard showed exactly what happened — but only &lt;em&gt;after&lt;/em&gt; it was over: position size had quietly doubled after every loss, the classic martingale, and it took precisely five losing trades in a row to wipe out six weeks of gains.&lt;/p&gt;

&lt;p&gt;The dashboard saw the trades. What it couldn't do was say &lt;em&gt;"this sequence of behavior is how accounts die — here is the exact trade where it started."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is what &lt;strong&gt;TradeGuard&lt;/strong&gt; does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What TradeGuard does
&lt;/h2&gt;

&lt;p&gt;TradeGuard is an &lt;strong&gt;offline, zero-dependency trading behavior analyzer&lt;/strong&gt; in pure Python standard library. You export your trade history and account metrics to CSV; it audits them against 8 behavioral risk rules that repeatedly destroy retail accounts — and every finding cites the exact trade IDs, timestamps, and numbers that prove it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python -m tradeguard audit --trades examples/trades.csv --account examples/account.csv

RISK SCORE: 100 / 100  (HIGH — account at serious risk)

[HIGH] OVER_LEVERAGE — Trade #14: notional 12.4x equity on EURUSD
       evidence: trades.csv:14  lots=2.5  equity=10000  price=1.0842
[HIGH] MARTINGALE — Lot size doubled after each of 4 consecutive losses
       evidence: trades.csv:21-28  lots 1.0→1.2→1.6→2.4
[HIGH] REVENGE_TRADING — 6 trades within 9 minutes after a -$840 loss
       evidence: trades.csv:31-36  entry timestamps cluster 14:02-14:11
[HIGH] RISK_PER_TRADE — 8 trades risked &amp;gt;2% of equity (max 5.1%)
       evidence: trades.csv:8,12,14,19,22,27,33,41
[HIGH] DRAWDOWN — current drawdown 19.8% vs 10% plan limit
       evidence: account.csv:3  balance=80200  peak=100000
[HIGH] CONCENTRATION — 55.1% of volume in a single instrument (EURUSD)
       evidence: trades.csv  instrument=EURUSD count=38/69
[CAUTION] LOSS_STREAK — 5 consecutive losses preceded the largest single loss
       evidence: trades.csv:29-41
[CAUTION] OVERTRADING — 69 trades in 5 sessions (3.8x your own median)

RECOMMENDED: hard-cap lot size at 1.0, enforce a 2% max risk per trade,
and lock the terminal after 2 consecutive losses.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point isn't the score — it's the &lt;strong&gt;evidence trail&lt;/strong&gt;. Every claim points at a row you can open and verify, so the feedback survives arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 8 rules and why they exist
&lt;/h2&gt;

&lt;p&gt;Each rule encodes a documented account-killer:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rule&lt;/th&gt;
&lt;th&gt;What it catches&lt;/th&gt;
&lt;th&gt;Why it kills accounts&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OVER_LEVERAGE&lt;/td&gt;
&lt;td&gt;notional &amp;gt; 10x equity&lt;/td&gt;
&lt;td&gt;one bad candle = margin call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MARTINGALE&lt;/td&gt;
&lt;td&gt;lot doubling after losses&lt;/td&gt;
&lt;td&gt;geometrically guarantees ruin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;REVENGE_TRADING&lt;/td&gt;
&lt;td&gt;rapid re-entry after big loss&lt;/td&gt;
&lt;td&gt;emotion-driven sizing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RISK_PER_TRADE&lt;/td&gt;
&lt;td&gt;&amp;gt; 2% equity at risk per trade&lt;/td&gt;
&lt;td&gt;variance eats the edge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DRAWDOWN&lt;/td&gt;
&lt;td&gt;beyond plan limit&lt;/td&gt;
&lt;td&gt;prop-firm disqualification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LOSS_STREAK&lt;/td&gt;
&lt;td&gt;consecutive losses&lt;/td&gt;
&lt;td&gt;tilt precursor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CONCENTRATION&lt;/td&gt;
&lt;td&gt;&amp;gt; 40% single instrument&lt;/td&gt;
&lt;td&gt;correlation risk in disguise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OVERTRADING&lt;/td&gt;
&lt;td&gt;frequency vs. own baseline&lt;/td&gt;
&lt;td&gt;fee bleed + fatigue errors&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  It ships with evals
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python eval.py
PASS  detects_over_leverage_with_citation
PASS  detects_martingale_doubling
PASS  detects_revenge_trading_cluster
PASS  risk_per_trade_uses_equity_at_entry
PASS  drawdown_uses_peak_balance
PASS  concentration_threshold_boundary
PASS  clean_history_scores_zero
PASS  every_finding_has_evidence
PASS  report_html_contains_all_findings
PASS  no_network_access
... 16/16 assertions passed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two of those assertions matter most to me: &lt;strong&gt;clean_history_scores_zero&lt;/strong&gt; (no false alarms on disciplined trading) and &lt;strong&gt;every_finding_has_evidence&lt;/strong&gt; (the tool can never accuse without proof).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why offline matters
&lt;/h2&gt;

&lt;p&gt;Your full trade history is the most sensitive file you own — it's a map of your worst decisions. TradeGuard runs entirely on your machine: pure standard library, no accounts, no uploads, no API keys. The eval suite asserts the code makes zero network calls. You can audit it on an air-gapped laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pure Python stdlib (&lt;code&gt;csv&lt;/code&gt;, &lt;code&gt;datetime&lt;/code&gt;, &lt;code&gt;argparse&lt;/code&gt;) — clone and run, nothing to install.&lt;/li&gt;
&lt;li&gt;Deterministic rules with transparent thresholds — no black-box "AI risk score".&lt;/li&gt;
&lt;li&gt;HTML report for sharing with a mentor, prop-firm reviewer, or your past self.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Zhiyilang/tradeguard" rel="noopener noreferrer"&gt;github.com/Zhiyilang/tradeguard&lt;/a&gt; with example trade history (deliberately full of bad habits) and the 16-assertion eval suite. Run &lt;code&gt;python eval.py&lt;/code&gt;, then point it at your own export — I'd genuinely like to hear what it finds.&lt;/p&gt;

&lt;p&gt;I built TradeGuard for the Deriv "Rise of AI Agents" hackathon, but the rules come from public post-mortems of blown accounts. The most valuable risk report is the one you read &lt;em&gt;before&lt;/em&gt; the drawdown, not after.&lt;/p&gt;

&lt;p&gt;What behavioral rule would you add to the list? Mine is a candidate: &lt;strong&gt;trading within 30 minutes of a deposit&lt;/strong&gt; — funding urgency is a documented tilt trigger. Comments open.&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built an Offline AI Agent That Answers Business Questions With File-and-Line Proof</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Mon, 12 Oct 2026 11:09:17 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-ai-agent-that-answers-business-questions-with-file-and-line-proof-lap</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-ai-agent-that-answers-business-questions-with-file-and-line-proof-lap</guid>
      <description>&lt;p&gt;Last quarter I asked a general-purpose AI chatbot: &lt;em&gt;"Which product should I restock first?"&lt;/em&gt; I pointed it at three CSV exports — sales, inventory, and customer feedback. It answered confidently: &lt;strong&gt;SKU-A&lt;/strong&gt;, because "it appears to be selling well."&lt;/p&gt;

&lt;p&gt;SKU-A was fine. The real problem was &lt;strong&gt;SKU-C&lt;/strong&gt;: selling 100 units a week with only 6.3 days of stock left against a 14-day supplier lead time. In ten days that SKU is out of stock, and every week of outage costs roughly 100 units of revenue. The chatbot couldn't see that, because it never actually joined the files — it skimmed the column names and guessed.&lt;/p&gt;

&lt;p&gt;That failure is what &lt;strong&gt;DecisionLens&lt;/strong&gt; is built to prevent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What DecisionLens does
&lt;/h2&gt;

&lt;p&gt;DecisionLens is an &lt;strong&gt;offline, zero-dependency decision agent&lt;/strong&gt; written in pure Python standard library. You point it at a folder of CSV files and ask a question in plain English. It answers — and &lt;strong&gt;every single claim it makes carries an evidence citation: source file, row number, and field name&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python -m decisionlens ask --data examples/ --question "Which SKU should I restock first? Why?"

DECISION: Reorder SKU-C now — it stocks out in ~6 days.

Evidence:
  [E1] sales/sales.csv:42        sku=SKU-C  units_sold=100  (4-week trailing avg)
  [E2] inventory/inventory.csv:7  sku=SKU-C  on_hand=90     days_of_cover=6.3
  [E3] inventory/inventory.csv:7  sku=SKU-C  supplier_lead_time_days=14
  [E4] feedback/feedback.csv:19   sku=SKU-C  mentions="still out of stock" (3 recent)

Action: place a PO for &amp;gt;= 300 units of SKU-C today; expedite the supplier.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No number appears in the answer that isn't traceable to a cell you can open and check. If the agent can't prove something, it says so instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent loop
&lt;/h2&gt;

&lt;p&gt;DecisionLens runs a classic perceive → reason → explain cycle, kept deliberately small so every step is auditable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;PERCEIVE&lt;/strong&gt; — load every CSV in the data folder, infer column types, build an index of metrics (units, prices, dates, SKUs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;INDEX&lt;/strong&gt; — normalize units and periods so weekly sales, stock on hand, and lead times are comparable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RETRIEVE&lt;/strong&gt; — match the question against the index to find the relevant rows across all files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REASON&lt;/strong&gt; — apply decision rules (e.g. days-of-cover vs. lead time) with explicit arithmetic, never vibes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXPLAIN&lt;/strong&gt; — attach file + row + field citations to each claim.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACT&lt;/strong&gt; — emit a concrete recommended action with quantities.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It answers questions like: which SKU stocks out first, which channel is quietly declining, what changed month over month and why, and a full business overview.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why evidence citations matter
&lt;/h2&gt;

&lt;p&gt;For an agent that feeds real decisions, "probably right" isn't good enough. Three properties fall out of the citation design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable&lt;/strong&gt; — a manager can audit any claim in seconds by opening the cited row.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debuggable&lt;/strong&gt; — when the agent is wrong, you see exactly which row or rule misled it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest&lt;/strong&gt; — the agent physically cannot state a number it didn't read from a file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last property is the one general-purpose chat assistants keep failing.&lt;/p&gt;

&lt;h2&gt;
  
  
  It ships with evals
&lt;/h2&gt;

&lt;p&gt;Anyone can claim their agent is smart, so DecisionLens ships an eval suite instead of adjectives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python eval.py
PASS  restock_rule_identifies_lowest_cover_sku
PASS  restock_action_includes_quantity
PASS  channel_ranking_uses_net_revenue
PASS  trend_attribution_cites_evidence
PASS  overview_mentions_all_sources
PASS  evidence_citations_include_row_numbers
PASS  unknown_question_does_not_hallucinate
PASS  offline_no_network_calls
8/8 assertions passed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the last two: the agent must admit when it doesn't know, and the test suite asserts the code makes zero network calls. It runs on air-gapped machines — your data never leaves the room.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pure Python standard library (&lt;code&gt;csv&lt;/code&gt;, &lt;code&gt;argparse&lt;/code&gt;, &lt;code&gt;datetime&lt;/code&gt;) — no pip install, no API keys, no cloud.&lt;/li&gt;
&lt;li&gt;Under 1,000 lines, readable end to end.&lt;/li&gt;
&lt;li&gt;HTML report output for sharing decisions with non-technical stakeholders.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The repo is &lt;a href="https://github.com/Zhiyilang/decisionlens" rel="noopener noreferrer"&gt;github.com/Zhiyilang/decisionlens&lt;/a&gt; with three example datasets (retail sales, inventory, customer feedback) and the full eval suite. Clone it, run &lt;code&gt;python eval.py&lt;/code&gt;, then ask it your own questions against your own CSVs.&lt;/p&gt;

&lt;p&gt;I built DecisionLens as my entry for the Open Agent Hackathon 2026 (Track 02: explainable multi-source reasoning). The thesis is simple: &lt;strong&gt;an agent that shows its work is worth more than an agent that sounds sure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've ever been burned by a confident AI answer that turned out to be invented, tell me your story in the comments — I'm collecting failure modes for the next iteration.&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built an Offline Contract Risk Analyzer That Flags the Clauses That Cost You the Most</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Mon, 12 Oct 2026 10:52:44 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-contract-risk-analyzer-that-flags-the-clauses-that-cost-you-the-most-1187</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-an-offline-contract-risk-analyzer-that-flags-the-clauses-that-cost-you-the-most-1187</guid>
      <description>&lt;p&gt;Last month a friend signed a 12-month SaaS contract without reading clause 14. It auto-renewed for another year and the early-termination fee was three months of subscription. She is not careless; the clause was just 40 words buried on page 6 of a 9-page agreement.&lt;/p&gt;

&lt;p&gt;That is the problem &lt;strong&gt;ClauseGuard&lt;/strong&gt; attacks: the clauses that cost ordinary people the most money are the ones written to be skimmed past.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ClauseGuard does
&lt;/h2&gt;

&lt;p&gt;ClauseGuard is an &lt;strong&gt;offline, zero-dependency contract risk analyzer&lt;/strong&gt; written in pure Python standard library. You paste contract text in; it flags high-risk clauses, explains each one in plain language, and produces a risk score:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python -m clauseguard.cli examples/sample_contract.txt

[HIGH   ] Auto-Renewal Trap — contract renews automatically unless cancelled 30 days before expiry
           why it hurts: you pay for a full extra cycle if you miss a narrow cancellation window
           fix: negotiate a 60-day notice window and a calendar reminder on day 1

[HIGH   ] One-Sided Modification — provider may change terms at any time without notice
           why it hurts: every protection in this contract can be rewritten unilaterally
           fix: require written notice + a termination right if changes are material

[HIGH   ] Uncapped Indemnity — you cover all losses, including provider's own negligence
           why it hurts: your liability has no ceiling, theirs does
           fix: cap indemnity at fees paid in the prior 12 months

[CAUTION] Broad IP Assignment — anything you create on the platform belongs to them
[CAUTION] Personal Guarantee — you personally back the company's obligations
...

==&amp;gt; Risk score: 40/100 (HIGH) — 3 high-risk clauses, 7 cautions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why offline and zero-dependency?
&lt;/h2&gt;

&lt;p&gt;Two deliberate design choices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Contracts are among the most sensitive documents you own&lt;/strong&gt; — salaries, NDAs, leases, pre-nups. ClauseGuard runs 100% locally. Nothing is uploaded, nothing is logged, no API keys involved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A transparent rule engine beats a black box for legal risk.&lt;/strong&gt; Every finding shows the matched pattern, the reasoning, and the mitigation. You can audit why it fired. A hallucinating LLM summarizer is the wrong tool when the stakes are a signed obligation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The engine ships with 12 risk detectors covering auto-renewal, unilateral modification, liability caps, broad indemnity, IP assignment, personal guarantees, non-competes, arbitration venue, penalty clauses, and more — each with a plain-language explanation and a negotiation suggestion.&lt;/p&gt;

&lt;p&gt;It also generates a self-contained HTML report you can attach to an email before a signing meeting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Zhiyilang/clauseguard
&lt;span class="nb"&gt;cd &lt;/span&gt;clauseguard
python &lt;span class="nt"&gt;-m&lt;/span&gt; clauseguard.cli examples/sample_contract.txt &lt;span class="nt"&gt;--html&lt;/span&gt; report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;pip install&lt;/code&gt;. Python 3.8+. MIT licensed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Multi-language clause patterns (the engine is pattern-table driven)&lt;/li&gt;
&lt;li&gt;DOCX/PDF text extraction&lt;/li&gt;
&lt;li&gt;A "compare two versions" mode that diffs risk scores between contract drafts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built as part of my open-source AI series. Feedback and PRs welcome — especially more clause patterns from other jurisdictions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: ClauseGuard is decision support, not legal advice. For anything material, talk to a lawyer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/Zhiyilang/clauseguard" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang/clauseguard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built TabulaSage: an Offline, Open-Source-AI Profiler That Never Sees Your Data</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Mon, 12 Oct 2026 03:59:40 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-tabulasage-an-offline-open-source-ai-profiler-that-never-sees-your-data-961</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-tabulasage-an-offline-open-source-ai-profiler-that-never-sees-your-data-961</guid>
      <description>&lt;p&gt;Every "smart spreadsheet" tool I've tried makes the same trade: you upload your file to someone else's server, a closed model you can't inspect does the work, and you pay per call. For a customer export, a medical log, or anything with a whiff of PII, that's a non-starter.&lt;/p&gt;

&lt;p&gt;So for the &lt;strong&gt;Hacktoberfest 2026 Open-Source AI Challenge&lt;/strong&gt;, I built &lt;a href="https://github.com/Zhiyilang/tabulasage" rel="noopener noreferrer"&gt;&lt;strong&gt;TabulaSage&lt;/strong&gt;&lt;/a&gt; — a data profiler where &lt;strong&gt;open-source AI is the entire engine&lt;/strong&gt;, and your file never leaves your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Point it at any CSV and it tells you, in plain English:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a profile of every column (type, missingness, distribution, top categories)&lt;/li&gt;
&lt;li&gt;which rows look &lt;em&gt;wrong&lt;/em&gt; — anomaly detection for data-entry errors and rare cases&lt;/li&gt;
&lt;li&gt;what actually drives a target column — an interpretable model, not a black box
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
python tabulasage.py examples/sample_customers.csv &lt;span class="nt"&gt;--target&lt;/span&gt; churned
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's the real output on a 15-row sample with a planted bad row:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;================================================================
 TabulaSage — offline AI profile  |  scikit-learn v1.9.1
 15 rows x 6 columns
================================================================

ANOMALY DETECTION (IsolationForest)
  flagged 1 of 15 rows as anomalous
    [ANOMALY] row 9: age=999, income=15, city=Beijing, tenure_months=1
    [normal ] row 6: age=61, income=91000, city=Shenzhen, tenure_months=48
    [normal ] row 13: age=58, income=84000, city=Shenzhen, tenure_months=40

INTERPRETABLE MODEL (target = churned)
  test accuracy: 100.0%  (classes: ['no', 'yes'])
  top drivers:
    - age                      0.571
    - monthly_spend            0.429

PLAIN-ENGLISH INSIGHTS
  → IsolationForest flagged 1 row(s) (6.7%) as anomalous — likely data-entry errors or rare cases worth a human look.
  → Predicting the target: a shallow decision tree reaches 100% test accuracy; the strongest driver is 'age' (importance 0.57).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The garbage row (&lt;code&gt;age=999, income=15&lt;/code&gt;) is caught instantly, while genuine high-value customers are correctly left alone — and the model explains &lt;em&gt;why&lt;/em&gt; (&lt;code&gt;age&lt;/code&gt;, then &lt;code&gt;monthly_spend&lt;/code&gt;), not just &lt;em&gt;what&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open-source AI is the whole point
&lt;/h2&gt;

&lt;p&gt;This is the part the challenge prompt asks about, and it's the reason the project exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your data stays yours — as an architectural fact, not a promise.&lt;/strong&gt; There is no network call anywhere in the code path. You can prove it by reading ~200 lines of Python. For anyone handling sensitive CSVs, "open source at the core" isn't ideology; it's the only way to get AI insights &lt;em&gt;and&lt;/em&gt; keep the data on your own disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It costs nothing to run.&lt;/strong&gt; The brain is scikit-learn's &lt;code&gt;IsolationForest&lt;/code&gt; and a shallow decision tree — open weights you can audit, and reproducible output. No per-call billing, no surprise invoice because your file got big.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can swap the brain.&lt;/strong&gt; Because the intelligence is an open framework rather than a hosted endpoint, you can drop in a local open-weight LLM (Gemma via Ollama) for richer prose, or TabPFN for forecasting, without rewriting the app — or sending anything anywhere.&lt;/p&gt;

&lt;p&gt;The closed-API approach is easier to &lt;em&gt;demo&lt;/em&gt; and harder to &lt;em&gt;trust&lt;/em&gt;. For a tool that touches real data, I'd rather be trusted.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works (all offline)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Parsing &amp;amp; profiling:&lt;/strong&gt; Python stdlib + NumPy. No network, ever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anomaly detection:&lt;/strong&gt; &lt;code&gt;IsolationForest&lt;/code&gt; on standardized numeric + one-hot features. I flag a row only when its anomaly score falls more than 2σ below the mean — a parameter-free threshold that avoids the "flag 40% of everything" trap I hit with &lt;code&gt;contamination="auto"&lt;/code&gt; on small data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interpretable model:&lt;/strong&gt; a depth-limited &lt;code&gt;DecisionTreeClassifier&lt;/code&gt;, so you can read the exact rule behind each prediction. (I explicitly exclude the &lt;code&gt;--target&lt;/code&gt; column from the features — the first version leaked it and reported a fake 100% accuracy, which was a good reminder that "explainable" has to be enforced, not assumed.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insights:&lt;/strong&gt; deterministic templates turn statistics into sentences — no LLM needed, though a local open-weight model can plug in for richer wording.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Building this reinforced something the open-source AI community keeps saying: the interesting engineering isn't calling a model, it's making the model &lt;em&gt;accountable&lt;/em&gt; — standardizing features so units don't lie, choosing a threshold that doesn't cry wolf, and refusing to let the label leak into the features. None of that is glamorous, and all of it is why I'd rather run an open model I can debug than a closed one I can't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The code, sample data, and a copy-paste demo are all in the repo:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;&lt;a href="https://github.com/Zhiyilang/tabulasage" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang/tabulasage&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Built for the Hacktoberfest 2026 Open-Source AI Challenge. Feedback and PRs very welcome — especially if you've wired TabulaSage up to a local Gemma or TabPFN and want to share the pattern.&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
      <category>machinelearning</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building GardenPlanner AI: An Offline-First Gardening Planner for Hacktoberfest 2026</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sun, 11 Oct 2026 16:02:21 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/building-gardenplanner-ai-an-offline-first-gardening-planner-for-hacktoberfest-2026-21kf</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/building-gardenplanner-ai-an-offline-first-gardening-planner-for-hacktoberfest-2026-21kf</guid>
      <description>&lt;h2&gt;
  
  
  Why I built an offline-first gardening planner for Hacktoberfest 2026
&lt;/h2&gt;

&lt;p&gt;Hacktoberfest 2026's Open Source AI Challenge has a theme this year: &lt;strong&gt;"Touch Grass"&lt;/strong&gt;. So I built exactly that — a gardening planner that works even when you're literally standing in the grass with no signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/Zhiyilang/hacktoberfest-2026-ai" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang/hacktoberfest-2026-ai&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;GardenPlanner AI&lt;/code&gt; is a zero-dependency, offline-first CLI that turns three inputs — &lt;strong&gt;city, month, and growing space&lt;/strong&gt; — into a concrete planting plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Picks plants suited to your local climate and the current season&lt;/li&gt;
&lt;li&gt;Flips the season correctly for the &lt;strong&gt;Southern Hemisphere&lt;/strong&gt; (so July in Sydney is winter, not summer)&lt;/li&gt;
&lt;li&gt;Pairs &lt;strong&gt;companion plants&lt;/strong&gt; (what grows well together) and flags &lt;strong&gt;antagonists&lt;/strong&gt; (what fights)&lt;/li&gt;
&lt;li&gt;Prints a &lt;strong&gt;month-by-month task checklist&lt;/strong&gt; so you know what to sow, transplant, or harvest&lt;/li&gt;
&lt;li&gt;Adds &lt;strong&gt;pest/disease tips&lt;/strong&gt; pulled from the plant database&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why "offline-first" matters
&lt;/h2&gt;

&lt;p&gt;Most AI gardening tools are just a chatbot wrapper around a cloud API. That breaks the moment you're in the backyard. GardenPlanner AI ships with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A built-in &lt;strong&gt;city → climate&lt;/strong&gt; lookup table (no network needed)&lt;/li&gt;
&lt;li&gt;A curated &lt;strong&gt;plant database&lt;/strong&gt; with companions, antagonists, and care notes&lt;/li&gt;
&lt;li&gt;Optional &lt;strong&gt;Ollama&lt;/strong&gt; local-LLM integration for natural-language questions — but it runs perfectly fine without it
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python main.py &lt;span class="nt"&gt;--city&lt;/span&gt; &lt;span class="s2"&gt;"Shanghai"&lt;/span&gt; &lt;span class="nt"&gt;--month&lt;/span&gt; 10 &lt;span class="nt"&gt;--space&lt;/span&gt; balcony &lt;span class="nt"&gt;--level&lt;/span&gt; beginner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;pip install&lt;/code&gt;. No API key. No signal. Just grass.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI part (without the cloud tax)
&lt;/h2&gt;

&lt;p&gt;When Ollama is available, the planner answers questions like &lt;em&gt;"What should I plant next to my tomatoes in a Shanghai autumn?"&lt;/em&gt; using a local model. When it isn't, it falls back to a deterministic rule engine — so the tool is never useless.&lt;/p&gt;

&lt;p&gt;This is the design I like: &lt;strong&gt;AI is a layer, not a lifeline.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How you can contribute (Hacktoberfest)
&lt;/h2&gt;

&lt;p&gt;This is a great first PR:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add a city to the climate table&lt;/li&gt;
&lt;li&gt;Add a plant (with companions/antagonists) to the database&lt;/li&gt;
&lt;li&gt;Translate the task-checklist copy&lt;/li&gt;
&lt;li&gt;Improve the pest-tip content&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every contribution is a recognized Hacktoberfest PR. Details in &lt;code&gt;CONTRIBUTING&lt;/code&gt; notes in the repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Zhiyilang/hacktoberfest-2026-ai
&lt;span class="nb"&gt;cd &lt;/span&gt;hacktoberfest-2026-ai
python main.py &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Touch grass. Plan a garden. Ship a PR. Happy Hacktoberfest 2026.&lt;/p&gt;

&lt;p&gt;Built for the &lt;strong&gt;#hf26challenge&lt;/strong&gt; Open Source AI Challenge. ⭐ welcome if it helps you touch grass.&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>hacktoberfest</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built a 'McDonald's Persona Card' Skill With Their MCP Server (And You Can Too)</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sun, 11 Oct 2026 00:28:35 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/i-built-a-mcdonalds-persona-card-skill-with-their-mcp-server-and-you-can-too-36e8</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/i-built-a-mcdonalds-persona-card-skill-with-their-mcp-server-and-you-can-too-36e8</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;McDonald's China shipped an official MCP server. I used it (through WorkBuddy) to build a zero-setup &lt;strong&gt;"persona card" Skill&lt;/strong&gt; that turns your taste, budget, and mood into a fun 麦门人格卡 (McDonald's persona card) with meal recommendations. It's open source, runs with one command, and it's entered in the &lt;strong&gt;McDonald's Developer Innovation Challenge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you find it fun or useful, a ⭐ on the repo genuinely helps it rank: &lt;a href="https://github.com/Zhiyilang074811/mcd-persona-card" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang074811/mcd-persona-card&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Input your flavor preferences, budget, and scene, and it generates a personalized "麦门人格卡".&lt;/li&gt;
&lt;li&gt;It pairs the persona with a recommended combo and a money-saving bundle.&lt;/li&gt;
&lt;li&gt;Ships with a one-command demo and clear MCP integration docs, so even non-developers can reproduce it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to run
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python mcd_persona.py &lt;span class="nt"&gt;--demo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No API key required for the demo. The full version wires into the official McDonald's MCP server (instructions in &lt;code&gt;MCP_INTEGRATION.md&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  How it uses the McDonald's MCP
&lt;/h2&gt;

&lt;p&gt;The project calls the official MCP tools to fetch real menu, pricing, and promotion data, then layers a lightweight persona engine on top. Details and the call flow live in &lt;code&gt;MCP_INTEGRATION.md&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it
&lt;/h2&gt;

&lt;p&gt;Most McDonald's helper bots are just calculators. I wanted something that feels personal — a card you'd actually share. Built entirely with WorkBuddy, the official partner of the challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it &amp;amp; star it
&lt;/h2&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Zhiyilang074811/mcd-persona-card" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang074811/mcd-persona-card&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stars help a small open-source project get seen in the challenge leaderboard. If you liked the idea, hit ⭐ — and feel free to fork or open an issue with your own persona ideas.&lt;/p&gt;

</description>
      <category>mcd</category>
      <category>mcp</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>GardenPlanner AI: an offline-first gardening planner for Hacktoberfest 2026</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sun, 11 Oct 2026 00:26:41 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/gardenplanner-ai-an-offline-first-gardening-planner-for-hacktoberfest-2026-3mnl</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/gardenplanner-ai-an-offline-first-gardening-planner-for-hacktoberfest-2026-3mnl</guid>
      <description>&lt;p&gt;GardenPlanner AI is an offline-first gardening planner built for the Hacktoberfest 2026 Open-Source AI Challenge (theme: Touch Grass). The idea is simple: use open-weight models to help people step away from screens and into nature, not pull them deeper in.&lt;/p&gt;

&lt;p&gt;Most gardening apps send your location and garden data to a cloud and lock the brain behind a paid API. This tool does the opposite. It runs 100% offline on pure Python standard library, no network, no account, no cost. It optionally rewrites the plan with a local Ollama model; without it, the built-in rule engine still produces a complete plan. Your city and garden data never leave your machine, and the output is a hands-on planting checklist you act on outside.&lt;/p&gt;

&lt;p&gt;How to run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python main.py &lt;span class="nt"&gt;--city&lt;/span&gt; &lt;span class="s2"&gt;"Shanghai"&lt;/span&gt; &lt;span class="nt"&gt;--month&lt;/span&gt; 10 &lt;span class="nt"&gt;--space&lt;/span&gt; balcony &lt;span class="nt"&gt;--level&lt;/span&gt; easy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns a personalized monthly planting plan with companion plants and tips, and flips seasons for the Southern Hemisphere automatically. You can also enhance it with a local model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull llama3.2
python main.py &lt;span class="nt"&gt;--city&lt;/span&gt; &lt;span class="s2"&gt;"London"&lt;/span&gt; &lt;span class="nt"&gt;--month&lt;/span&gt; 3 &lt;span class="nt"&gt;--ollama&lt;/span&gt; llama3.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository is here: &lt;a href="https://github.com/Zhiyilang074811/hacktoberfest-2026-ai" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang074811/hacktoberfest-2026-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contributions are welcome for Hacktoberfest: more city climate data, an expanded plant database, pest reminders, or web/mobile wrappers. Look for the hacktoberfest-accepted label. Let's touch grass, with open source.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>python</category>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>probe2</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sun, 11 Oct 2026 00:07:12 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/probe2-24l7</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/probe2-24l7</guid>
      <description>&lt;p&gt;probe2 body&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>probe</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sun, 11 Oct 2026 00:05:29 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/probe-18ef</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/probe-18ef</guid>
      <description>&lt;p&gt;probe&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>GardenPlanner AI offline gardening planner</title>
      <dc:creator>一郎 支</dc:creator>
      <pubDate>Sat, 10 Oct 2026 23:58:19 +0000</pubDate>
      <link>https://dev.to/__97f461dfd8e73f7c9aed/gardenplanner-ai-offline-gardening-planner-36gl</link>
      <guid>https://dev.to/__97f461dfd8e73f7c9aed/gardenplanner-ai-offline-gardening-planner-36gl</guid>
      <description>&lt;p&gt;Intro about Touch Grass. See &lt;a href="https://github.com/Zhiyilang074811/hacktoberfest-2026-ai" rel="noopener noreferrer"&gt;https://github.com/Zhiyilang074811/hacktoberfest-2026-ai&lt;/a&gt; for code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python main.py &lt;span class="nt"&gt;--city&lt;/span&gt; Shanghai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
