<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on JM's Site</title><link>/tags/python/</link><description>Recent content in Python on JM's Site</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 23 Apr 2026 23:43:10 +0000</lastBuildDate><atom:link href="/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Python Packaging with uv</title><link>/software/python-uv/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>/software/python-uv/</guid><description>&lt;p&gt;&lt;code&gt;uv&lt;/code&gt; is a fast Python package manager and project tool written in Rust.&lt;/p&gt;
&lt;h2 id="why-uv-over-pippoetrypipenv"&gt;Why uv over pip/poetry/pipenv?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;10–100x faster dependency resolution.&lt;/li&gt;
&lt;li&gt;Single tool: replaces pip, pip-tools, virtualenv, and pyenv.&lt;/li&gt;
&lt;li&gt;Lockfile support via &lt;code&gt;uv.lock&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="common-commands"&gt;Common commands&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv init myproject &lt;span class="c1"&gt;# scaffold a new project&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv add requests &lt;span class="c1"&gt;# add a dependency&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv sync &lt;span class="c1"&gt;# install from lockfile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv run pytest &lt;span class="c1"&gt;# run inside the managed venv&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="project-convention"&gt;Project convention&lt;/h2&gt;
&lt;p&gt;All Python projects in this workspace use &lt;code&gt;uv&lt;/code&gt; exclusively — no raw
&lt;code&gt;pip install&lt;/code&gt; or &lt;code&gt;python -m pytest&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Vector Search with ChromaDB</title><link>/software/chromadb/</link><pubDate>Thu, 02 Apr 2026 00:00:00 +0000</pubDate><guid>/software/chromadb/</guid><description>&lt;p&gt;ChromaDB is an embedding database for building search and retrieval systems.&lt;/p&gt;
&lt;h2 id="how-i-use-it"&gt;How I use it&lt;/h2&gt;
&lt;p&gt;I chunk documentation (VyOS, Hugo) into paragraphs, embed them with
&lt;code&gt;nomic-embed-text&lt;/code&gt; via Ollama, and store the vectors in ChromaDB for
semantic search.&lt;/p&gt;
&lt;h2 id="stack"&gt;Stack&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Documents → Chunker → Ollama embeddings → ChromaDB → Query API
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="key-concepts"&gt;Key concepts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Collection&lt;/strong&gt;: a named group of embeddings (like a table).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Document&lt;/strong&gt;: the raw text stored alongside the vector.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metadata&lt;/strong&gt;: key-value pairs for filtering results.&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>