<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Python - Tag - Vindrin</title><link>https://vindrin.top/tags/python/</link><description>Python - Tag - Vindrin</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>vindrin@outlook.com (Vindrin)</managingEditor><webMaster>vindrin@outlook.com (Vindrin)</webMaster><lastBuildDate>Fri, 10 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://vindrin.top/tags/python/" rel="self" type="application/rss+xml"/><item><title>RSS Reader Bot</title><link>https://vindrin.top/project/rss-reader-bot/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/project/rss-reader-bot/</guid><description><![CDATA[<h1 id="rss-reader-bot">RSS Reader Bot</h1>
<p>A Telegram bot that pulls from your RSS subscriptions and sends you a daily digest.</p>
<h2 id="problem">Problem</h2>
<p>I follow 15+ blogs and news sources. I got tired of checking each site manually. One bot, one message per day.</p>
<h2 id="architecture">Architecture</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">RSS feeds → Parser → Deduplication → Digest formatter → Telegram Bot API</span></span></code></pre></div></div>
<h2 id="key-features">Key features</h2>
<ul>
<li>Add/remove feeds via bot commands (<code>/add</code>, <code>/remove</code>, <code>/list</code>)</li>
<li>Daily digest at a configured time</li>
<li>Mark articles as read</li>
<li>Filter by keyword</li>
</ul>
<h2 id="setup">Setup</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install feedparser python-telegram-bot apscheduler
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">TELEGRAM_TOKEN</span><span class="o">=</span>your_token_here
</span></span><span class="line"><span class="cl">python bot.py</span></span></code></pre></div></div>
<h2 id="status">Status</h2>
<p><code>v1.0.0</code> — Running in production for 2 months. No issues.</p>]]></description></item><item><title>Terminal Dashboard</title><link>https://vindrin.top/project/terminal-dashboard/</link><pubDate>Sat, 28 Mar 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/project/terminal-dashboard/</guid><description><![CDATA[<h1 id="terminal-dashboard">Terminal Dashboard</h1>
<p>A real-time system monitor that runs entirely in the terminal.</p>
<h2 id="why-terminal">Why terminal?</h2>
<p>Sometimes you&rsquo;re SSHed into a machine with no GUI. A terminal dashboard gives you CPU, memory, disk, and network stats without installing any heavy monitoring tools.</p>
<h2 id="built-with">Built with</h2>
<ul>
<li><strong>Textual</strong> — TUI framework</li>
<li><strong>psutil</strong> — system metrics</li>
<li><strong>rich</strong> — pretty tables and charts</li>
</ul>
<h2 id="screenshot-ascii">Screenshot (ASCII)</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">┌── CPU ──────────────────┐  ┌── Memory ────────────────┐
</span></span><span class="line"><span class="cl">│ Core 0  ████░░░░  42%   │  │ Used   6.2GB / 16GB  38% │
</span></span><span class="line"><span class="cl">│ Core 1  ██░░░░░░  21%   │  │ Swap   0.1GB / 4GB    2% │
</span></span><span class="line"><span class="cl">└─────────────────────────┘  └──────────────────────────┘
</span></span><span class="line"><span class="cl">┌── Disk ─────────────────────────────────────────────────┐
</span></span><span class="line"><span class="cl">│ /        80GB / 250GB  32%  ██████░░░░░░░░░░░░░░░░░░░░ │
</span></span><span class="line"><span class="cl">│ D:\     167GB / 250GB  67%  ██████████████░░░░░░░░░░░░ │
</span></span><span class="line"><span class="cl">└─────────────────────────────────────────────────────────┘</span></span></code></pre></div></div>
<h2 id="status">Status</h2>
<p><code>v0.1.0</code> — functional but unstyled. Polishing in progress.</p>]]></description></item><item><title>Markdown Note Sync CLI</title><link>https://vindrin.top/project/markdown-note-sync/</link><pubDate>Thu, 05 Mar 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/project/markdown-note-sync/</guid><description><![CDATA[<h1 id="markdown-note-sync-cli">Markdown Note Sync CLI</h1>
<p>Keep your notes in Markdown. Sync them anywhere. No proprietary formats.</p>
<h2 id="problem">Problem</h2>
<p>I take notes in Markdown across multiple machines. I wanted something simpler than Obsidian Sync — just a CLI that diffs and pushes changes.</p>
<h2 id="commands">Commands</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Initialize sync config</span>
</span></span><span class="line"><span class="cl">mnotes init --remote user@server:/notes
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Sync (two-way)</span>
</span></span><span class="line"><span class="cl">mnotes sync
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Show diff before syncing</span>
</span></span><span class="line"><span class="cl">mnotes diff</span></span></code></pre></div></div>
<h2 id="how-it-works">How it works</h2>
<ol>
<li>Hash every local <code>.md</code> file</li>
<li>Compare with remote hash index</li>
<li>Push new/changed files, pull remote-only files</li>
<li>Conflict = keep both with timestamp suffix</li>
</ol>
<h2 id="dependencies">Dependencies</h2>
<ul>
<li><code>paramiko</code> — SSH</li>
<li><code>watchdog</code> — optional auto-sync on file change</li>
</ul>
<h2 id="status">Status</h2>
<p><code>v0.2.1</code> — stable for two machines. Three-way sync is future work.</p>]]></description></item><item><title>Local AI Image Classifier</title><link>https://vindrin.top/project/ai-image-classifier/</link><pubDate>Wed, 18 Feb 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/project/ai-image-classifier/</guid><description><![CDATA[<h1 id="local-ai-image-classifier">Local AI Image Classifier</h1>
<p>Classify images by description — no cloud API needed, everything runs locally.</p>
<h2 id="how-it-works">How it works</h2>
<p>Uses <strong>OpenAI CLIP</strong> to compute similarity between an image and a list of text labels. The highest-scoring label wins.</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-python">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">clip</span><span class="o">,</span> <span class="nn">torch</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">model</span><span class="p">,</span> <span class="n">preprocess</span> <span class="o">=</span> <span class="n">clip</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s2">&#34;ViT-B/32&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">image</span> <span class="o">=</span> <span class="n">preprocess</span><span class="p">(</span><span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s2">&#34;photo.jpg&#34;</span><span class="p">))</span><span class="o">.</span><span class="n">unsqueeze</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">labels</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&#34;a cat&#34;</span><span class="p">,</span> <span class="s2">&#34;a dog&#34;</span><span class="p">,</span> <span class="s2">&#34;a car&#34;</span><span class="p">,</span> <span class="s2">&#34;a tree&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="n">text</span> <span class="o">=</span> <span class="n">clip</span><span class="o">.</span><span class="n">tokenize</span><span class="p">(</span><span class="n">labels</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">torch</span><span class="o">.</span><span class="n">no_grad</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="n">logits</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">model</span><span class="p">(</span><span class="n">image</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">probs</span> <span class="o">=</span> <span class="n">logits</span><span class="o">.</span><span class="n">softmax</span><span class="p">(</span><span class="n">dim</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">best</span> <span class="o">=</span> <span class="n">labels</span><span class="p">[</span><span class="n">probs</span><span class="o">.</span><span class="n">argmax</span><span class="p">()]</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&#34;Predicted: </span><span class="si">{</span><span class="n">best</span><span class="si">}</span><span class="s2">&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<h2 id="interface">Interface</h2>
<p>Flask-based web UI. Drop an image, enter labels, get a classification.</p>]]></description></item><item><title>Python Virtual Environments Explained</title><link>https://vindrin.top/posts/python-venv-guide/</link><pubDate>Tue, 03 Feb 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/posts/python-venv-guide/</guid><description><![CDATA[<h1 id="python-virtual-environments-explained">Python Virtual Environments Explained</h1>
<p>If you&rsquo;ve ever broken a project by upgrading a package globally, you need venvs.</p>
<h2 id="what-is-a-venv">What is a venv?</h2>
<p>A virtual environment is an isolated Python installation — it has its own <code>pip</code> and packages, completely separate from your system Python.</p>
<h2 id="creating-one">Creating one</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python -m venv .venv
</span></span><span class="line"><span class="cl"><span class="nb">source</span> .venv/bin/activate    <span class="c1"># Linux/macOS</span>
</span></span><span class="line"><span class="cl">.venv<span class="se">\S</span>cripts<span class="se">\a</span>ctivate       <span class="c1"># Windows</span></span></span></code></pre></div></div>
<h2 id="installing-packages">Installing packages</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install requests numpy pandas
</span></span><span class="line"><span class="cl">pip freeze &gt; requirements.txt</span></span></code></pre></div></div>
<h2 id="restoring-later">Restoring later</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python -m venv .venv
</span></span><span class="line"><span class="cl">pip install -r requirements.txt</span></span></code></pre></div></div>
<h2 id="using-with-conda">Using with conda</h2>
<p>If you use conda, each <code>conda create -n myenv python=3.11</code> works the same way — isolated by default.</p>]]></description></item><item><title>Conda Environment Cheatsheet</title><link>https://vindrin.top/docs/conda-cheatsheet/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/docs/conda-cheatsheet/</guid><description><![CDATA[<h1 id="conda-environment-cheatsheet">Conda Environment Cheatsheet</h1>
<p>Everything you need to manage conda envs day-to-day.</p>
<h2 id="create--activate">Create &amp; activate</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">conda create -n myenv <span class="nv">python</span><span class="o">=</span>3.11
</span></span><span class="line"><span class="cl">conda activate myenv
</span></span><span class="line"><span class="cl">conda deactivate</span></span></code></pre></div></div>
<h2 id="install-packages">Install packages</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">conda install numpy pandas matplotlib
</span></span><span class="line"><span class="cl">conda install -c conda-forge some-package
</span></span><span class="line"><span class="cl">pip install package-not-in-conda        <span class="c1"># fallback</span></span></span></code></pre></div></div>
<h2 id="manage-environments">Manage environments</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">conda env list                          <span class="c1"># list all envs</span>
</span></span><span class="line"><span class="cl">conda info --envs                       <span class="c1"># same, more detail</span>
</span></span><span class="line"><span class="cl">conda remove -n myenv --all             <span class="c1"># delete env</span>
</span></span><span class="line"><span class="cl">conda rename -n oldname newname         <span class="c1"># rename (conda 23.x+)</span></span></span></code></pre></div></div>
<h2 id="export--reproduce">Export &amp; reproduce</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Export (conda + pip)</span>
</span></span><span class="line"><span class="cl">conda env <span class="nb">export</span> &gt; environment.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Reproduce on another machine</span>
</span></span><span class="line"><span class="cl">conda env create -f environment.yml</span></span></code></pre></div></div>
<h2 id="update">Update</h2>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">conda update conda                      <span class="c1"># update conda itself</span>
</span></span><span class="line"><span class="cl">conda update --all                      <span class="c1"># update all packages</span></span></span></code></pre></div></div>
<h2 id="quick-tip">Quick tip</h2>
<p>Use <code>conda-forge</code> as default channel for better package coverage:</p>]]></description></item><item><title>GitPush Manager</title><link>https://vindrin.top/project/gitpush-manager/</link><pubDate>Wed, 10 Sep 2025 00:00:00 +0000</pubDate><author>vindrin@outlook.com (Vindrin)</author><guid>https://vindrin.top/project/gitpush-manager/</guid><description><![CDATA[<h1 id="gitpush-manager">GitPush Manager</h1>
<p>A lightweight desktop application built with <strong>pywebview + Flask</strong> that wraps common Git operations into a clean visual interface.</p>
<h2 id="motivation">Motivation</h2>
<p>I found myself running the same three Git commands dozens of times a day. This tool turns those into a single click.</p>
<h2 id="features">Features</h2>
<ul>
<li>Stage, commit, and push in one view</li>
<li>Multi-repo management</li>
<li>Commit message templates</li>
<li>Push history log</li>
</ul>
<h2 id="tech-stack">Tech Stack</h2>
<ul>
<li><strong>Backend</strong>: Python + Flask</li>
<li><strong>Frontend</strong>: HTML/CSS/JS via pywebview</li>
<li><strong>Packaging</strong>: PyInstaller</li>
</ul>
<h2 id="status">Status</h2>
<p><code>v0.3.0</code> — stable for personal use. Multi-repo support in progress.</p>]]></description></item></channel></rss>