<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on David Chan - Today I Learned (TIL)</title>
    <link>/posts/</link>
    <description>Recent content in Posts on David Chan - Today I Learned (TIL)</description>
    <generator>Hugo -- 0.147.5</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 22 Jan 2026 09:43:11 -0800</lastBuildDate>
    <atom:link href="/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>January 22, 2026 - Using .casefold() for Case-Insensitive String Comparison in Python</title>
      <link>/posts/01-22-2026/</link>
      <pubDate>Thu, 22 Jan 2026 09:43:11 -0800</pubDate>
      <guid>/posts/01-22-2026/</guid>
      <description>&lt;p&gt;When you need to compare string in Python, a lot of us reach for &lt;code&gt;.strip().lower()&lt;/code&gt; by default to pre-normalize the strings. But it turns out that .lower() doesn&amp;rsquo;t really work when you start thinking about non-ASCII characters. For example, the German letter &amp;ldquo;ß&amp;rdquo; (Eszett) should probably be equivalent to &amp;ldquo;ss&amp;rdquo; in a case-insensitive comparison, but &lt;code&gt;.lower()&lt;/code&gt; doesn&amp;rsquo;t handle that correctly. So how can we do better? Python has a method &lt;code&gt;.casefold()&lt;/code&gt; that is specifically designed for caseless matching of strings. It takes .lower() a step further by handling more complex cases, including those involving special characters and different alphabets:&lt;/p&gt;</description>
    </item>
    <item>
      <title>July 29, 2024 - Running CRON Jobs on Modal</title>
      <link>/posts/07-29-2024/</link>
      <pubDate>Mon, 29 Jul 2024 11:31:22 -0700</pubDate>
      <guid>/posts/07-29-2024/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve been working to migrate my own personal infrastructure off of Kubernetes, given that it has become quite
expensive to run for just a single hosted website. For example, on Linode, the smallest cluster (3 nodes), along with a
load balancer, and several disks, was approaching 50$ a month. Indeed, what did I actually use my cluster for? I used it
for hosting one-off websites for a couple of days, and then tearing them down, I used it for my own personal website,
and I used it for a host of CRON jobs that have to run every hour or every couple of days. The one-off websites I could
easily migrate to vercel, and my personal website I migrated to Cloudflare Pages + static site generation (11ty), but
the CRON jobs were a bit trickier. Luckily, I found &lt;a href=&#34;https://modal.com/&#34;&gt;Modal&lt;/a&gt;, a service for serverless compute which
allows running compute on a schedule (with a bit of configuration).&lt;/p&gt;</description>
    </item>
    <item>
      <title>June 11, 2024 - Using K9s to Manage Kubernetes Clusters</title>
      <link>/posts/06-11-2024/</link>
      <pubDate>Tue, 11 Jun 2024 08:48:43 -0700</pubDate>
      <guid>/posts/06-11-2024/</guid>
      <description>&lt;p&gt;I use Kubernetes (K8s) to manage both my personal website, and some client-facing projects. Recently, however, I&amp;rsquo;ve discovered something that is making my life a whole lot easier: &lt;a href=&#34;https://k9scli.io/&#34;&gt;K9s&lt;/a&gt; - a terminal-based UI (think htop) for managing Kubernetes clusters.&lt;/p&gt;
&lt;p&gt;Some of the awesome features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I can actually see all of my pods running at once, their CPU/memory usage, and what their internal IPs are&lt;/li&gt;
&lt;li&gt;I can tail logs using a UI, and I don&amp;rsquo;t have to remember all of the kubectl commands to do so&lt;/li&gt;
&lt;li&gt;I can see if things are dead, or died, at a glance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you use Kubernetes, I highly recommend checking out K9s. It&amp;rsquo;s made my life a lot easier.&lt;/p&gt;</description>
    </item>
    <item>
      <title>March 18, 2024 - Adding a tag to an older commit</title>
      <link>/posts/03-18-2024/</link>
      <pubDate>Mon, 18 Mar 2024 11:02:34 -0700</pubDate>
      <guid>/posts/03-18-2024/</guid>
      <description>&lt;p&gt;To add a tag to an older commit, you can use the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git tag -a &lt;span style=&#34;color:#f92672&#34;&gt;{{&lt;/span&gt; Tag Name &lt;span style=&#34;color:#f92672&#34;&gt;}}&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{{&lt;/span&gt; Commit Hash &lt;span style=&#34;color:#f92672&#34;&gt;}}&lt;/span&gt; -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Message here&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For example, if you wanted to add a tag to the commit with the hash &lt;code&gt;a1b2c3d4&lt;/code&gt;, you would use the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git tag -a v1.0 a1b2c3d4 -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Version 1.0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will add a tag called &lt;code&gt;v1.0&lt;/code&gt; to the commit with the hash &lt;code&gt;a1b2c3d4&lt;/code&gt;, and the message &amp;ldquo;Version 1.0&amp;rdquo; will be associated with the tag.&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 29, 2024 - Appending content to a database using Notion&#39;s API</title>
      <link>/posts/01-29-2024/</link>
      <pubDate>Mon, 29 Jan 2024 15:32:04 -0800</pubDate>
      <guid>/posts/01-29-2024/</guid>
      <description>&lt;p&gt;Sometimes, I want to visualize some of my experimental results, or share them with others. One of the easiest ways to do
this is using notion: which is capable of handling a variety of data types, and can be published to a relatively nice
looking website, with minimal effort.&lt;/p&gt;
&lt;h1 id=&#34;step-1-creating-a-notion-integration&#34;&gt;Step 1: Creating a notion integration&lt;/h1&gt;
&lt;p&gt;To do this, you first have to create a notion integration, which you can do &lt;a href=&#34;https://www.notion.so/my-integrations&#34;&gt;here&lt;/a&gt;.
Creating an integration will give you access to an API token, which we can use in the python script to interact with
our notion database.&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 24, 2024 - Using UUID for Unique Identifiers in Python</title>
      <link>/posts/01-24-2024/</link>
      <pubDate>Wed, 24 Jan 2024 15:21:20 -0800</pubDate>
      <guid>/posts/01-24-2024/</guid>
      <description>&lt;p&gt;In lots of situations, we may need a unique identifier for an object, for example, when running a database transformation,
we may want to create a unique key for each record, or when creating a database, we might want a unique key for each
object in the database. In these situations, I&amp;rsquo;ve seen a lot of people use some variant of the following code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; random
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; string
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;generate_random_unique_identifier&lt;/span&gt;(length&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;join(random&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;choice(string&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;ascii_letters) &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; _ &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; range(length))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve certainly been guilty of this myself. However, there are a few problems with this approach:&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 23, 2024 - Detecting COCO Objects with Detectron2 API</title>
      <link>/posts/01-23-2024/</link>
      <pubDate>Tue, 23 Jan 2024 15:57:00 -0800</pubDate>
      <guid>/posts/01-23-2024/</guid>
      <description>&lt;p&gt;Sometimes you need to run an object detector as part of a larger system. One of the best tools for bringing in a
pre-trained detector may be the &lt;a href=&#34;https://github.com/facebookresearch/detectron2&#34;&gt;detectron2&lt;/a&gt; framework from Meta.&lt;/p&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;To install detectron2, it&amp;rsquo;s as easy as a pip install:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python -m pip install git+https://github.com/facebookresearch/detectron2.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;detectron2-api&#34;&gt;Detectron2 API&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s amazingly easy to being to extract objects from images using their pre-trained models. First, you get a model from
the model zoo:&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 22, 2024 - Handling basePath in next.js client components</title>
      <link>/posts/01-22-2024/</link>
      <pubDate>Mon, 22 Jan 2024 13:32:16 -0800</pubDate>
      <guid>/posts/01-22-2024/</guid>
      <description>&lt;p&gt;It turns out that hosting a next.js application in a subdirectory isn&amp;rsquo;t as easy as it should be. There are two major
issues that I&amp;rsquo;ve run into when doing this: (1) Handling links to local pages and (2) Handling links to static assets.&lt;/p&gt;
&lt;p&gt;The right way to handle this is to set the basePath in the next.config.js file. This will cause the next.js router to
prepend the basePath to all links:&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 19, 2024 - Cloudfront Egress is pretty cheap!</title>
      <link>/posts/01-19-2024/</link>
      <pubDate>Fri, 19 Jan 2024 12:53:46 -0800</pubDate>
      <guid>/posts/01-19-2024/</guid>
      <description>&lt;p&gt;This isn&amp;rsquo;t really a TIL, but it turns out that Amazon provides 1TB of free egress from S3 buckets with a CloudFront CDN
front-end (instead of the standard 100GB available for free with S3 alone). To get started, I followed &lt;a href=&#34;https://aws.amazon.com/cloudfront/getting-started/S3/&#34;&gt;this tutorial&lt;/a&gt; &amp;ndash; but it assumes a pretty high level of prior understanding of AWS, so if you&amp;rsquo;ve never used CloudFront, AWS, or S3
before, it might be best to google around for another tutorial.&lt;/p&gt;</description>
    </item>
    <item>
      <title>January 11, 2024 - Configuring AWS CLI Endpoint URL</title>
      <link>/posts/01-11-2024/</link>
      <pubDate>Thu, 11 Jan 2024 10:09:38 -0800</pubDate>
      <guid>/posts/01-11-2024/</guid>
      <description>&lt;p&gt;So, for a long time, it wasn&amp;rsquo;t possible to configure the AWS CLI to use a custom endpoint url by default. Since I usually
use Wasabi for my S3 storage, I had to use the &lt;code&gt;--endpoint-url&lt;/code&gt; flag every time I wanted to use the CLI, pretty annoying, right? Well,
turns out at some point Amazon added a set of useful configs to their CLI. To configure the CLI to use a custom endpoint url, you can
add the following to your &lt;code&gt;~/.aws/config&lt;/code&gt; file:&lt;/p&gt;</description>
    </item>
    <item>
      <title>May 12, 2023 - Testing for Multivariate Normality with a Henze-Zirkler Test (In Python)</title>
      <link>/posts/05-12-2023/</link>
      <pubDate>Fri, 12 May 2023 11:31:55 -0700</pubDate>
      <guid>/posts/05-12-2023/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re just interested in the code, it&amp;rsquo;s super easy to use pingouin to do this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pingouin &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pg
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;data &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;random&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;normal(size&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;output &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pg&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;multivariate_normality(data, alpha&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;.05&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(output&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;hz, output&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;pval, output&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;normal)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Sometimes, it&amp;rsquo;s useful to know when a sample looks a lot like a normal distribution. In a single dimension, we can use
the function from scipy &lt;code&gt;scipy.stats.normaltest&lt;/code&gt; to test whether a sample is normal. This test combines tests from
D&amp;rsquo;Agostino and Pearson which measure the skew and kurtosis of the sample, and report when those differ from a similar
normal population. Unfortunately, this test isn&amp;rsquo;t immediately generalizable to multiple dimensions, which makes a new
test necessary. One example is a Henze-Zirkler test, which is based on a non-negative functional \(D\) which measures the
distance between two distribution functions, and has the property that \(D(N_d(0, I_d), Q) = 0\) if and only if \(Q\) is a
multivariate normal distribution with identity covariance matrix. In practice, the Henze-zirkler test computes a
weighted integral of the difference between the empirical characteristic function (ECF) and it&amp;rsquo;s pointwise normal
approximation (in the limit).&lt;/p&gt;</description>
    </item>
    <item>
      <title>December 07, 2022 - How to make a tree with a parent pointer in Rust</title>
      <link>/posts/12-07-2022/</link>
      <pubDate>Wed, 07 Dec 2022 10:49:03 -0800</pubDate>
      <guid>/posts/12-07-2022/</guid>
      <description>&lt;p&gt;I was working on the Advent of Code (day 7) today, which I&amp;rsquo;m using to learn a bit more about Rust, and while I was able
to quickly solve the problem with python (thanks to the fact that python allows references to everything everywhere), I
had a hard time solving the problem with Rust, thanks to the inability to keep around references to a &amp;ldquo;parent&amp;rdquo; in the
tree. This inconvenience is by design: Rust tries to ensure memory safety by forbidding you from doing things that might
potentially be unsafe.&lt;/p&gt;</description>
    </item>
    <item>
      <title>December 02, 2022 (2) - Encoding secrets for Kubernetes</title>
      <link>/posts/12-02-2022-0/</link>
      <pubDate>Fri, 02 Dec 2022 11:18:25 -0800</pubDate>
      <guid>/posts/12-02-2022-0/</guid>
      <description>&lt;p&gt;Kubernetes uses base64 encoded secrets, but it&amp;rsquo;s important to make sure that when encoding the secrets, you don&amp;rsquo;t
include any extra newlines - tldr; &lt;strong&gt;use echo -n instead of echo&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Works&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; echo -n &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;my secret&amp;#34;&lt;/span&gt; | base64
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bXkgc2VjcmV0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Doesn&amp;#39;t work&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;my secret&amp;#34;&lt;/span&gt; | base64
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bXkgc2VjcmV0Cg&lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Otherwise, you could be in for a world of pain :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>December 02, 2022 - How to use python-dotenv to easily manage env vars</title>
      <link>/posts/12-02-2022/</link>
      <pubDate>Fri, 02 Dec 2022 10:21:41 -0800</pubDate>
      <guid>/posts/12-02-2022/</guid>
      <description>&lt;p&gt;So, I had a project recently where I have a bunch of API keys, but I didn&amp;rsquo;t want to accidentally commit them to a repo
(since that would be bad&amp;hellip;). But I also wanted the convencience of just in-lining the code, and not have to worry about
sourcing environment variables every time I ran the code (since this would inevitably cause annoyances). To solve this,
I found a handy tool - &lt;strong&gt;python-dotenv&lt;/strong&gt;, a package which handles all of the complicated bits.&lt;/p&gt;</description>
    </item>
    <item>
      <title>November 29, 2022 - PyPI Doesn&#39;t Allow Git Repo Dependencies</title>
      <link>/posts/11-29-2022/</link>
      <pubDate>Tue, 29 Nov 2022 09:09:11 -0800</pubDate>
      <guid>/posts/11-29-2022/</guid>
      <description>&lt;p&gt;So, we have a package, &lt;a href=&#34;https://github.com/CannyLab/vdtk&#34;&gt;VDTK&lt;/a&gt; which we&amp;rsquo;re planning to release in a new major version -
there&amp;rsquo;s only one problem&amp;hellip; We depend on several packages which do not publish builds to the PyPi repository. In our
&lt;code&gt;pyproject.toml&lt;/code&gt; file, they are specified as:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;dependencies&lt;/span&gt; = [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;...&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;clip @ git+https://github.com/openai/CLIP.git&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;mauve-text @ git+https://github.com/krishnap25/mauve.git&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;en_core_web_lg @ https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.4.1/en_core_web_lg-3.4.1-py3-none-any.whl&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unfortunately, when you upload a package built with dependencies like this, you get the error:&lt;/p&gt;</description>
    </item>
    <item>
      <title>November 18, 2022 - Creating the perfect archetype in Hugo</title>
      <link>/posts/11-18-2022/</link>
      <pubDate>Fri, 18 Nov 2022 16:17:02 -0800</pubDate>
      <guid>/posts/11-18-2022/</guid>
      <description>&lt;p&gt;This TIL site is powered by Hugo, but it&amp;rsquo;s currently a lot of effort to create the title and name for one of these
posts&amp;hellip; It would be great if we could have a single command line tool which does this! Each post right now has the
following header:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# post-header.yaml&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;title&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;November 18, 2022 - Creating the perfect archetype in Hugo&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;date&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;2022-11-18T16:17:02&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;-08&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;00&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;showToc&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;TocOpen&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;draft&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;hidemeta&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;comments&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;disableShare&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;disableHLJS&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;hideSummary&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;searchHidden&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;ShowReadingTime&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;ShowBreadCrumbs&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;ShowPostNavLinks&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;ShowWordCount&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;ShowRssButtonInSectionTermList&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;UseHugoToc&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Most of this information is super easy to deal with - everything after showToc is static, so our template can just
write those directly. This means we have only to deal with the title and the date.&lt;/p&gt;</description>
    </item>
    <item>
      <title>November 17, 2022 - Running Single-Server MySQL on Kubernetes</title>
      <link>/posts/11-17-2022/</link>
      <pubDate>Thu, 17 Nov 2022 16:41:25 -0800</pubDate>
      <guid>/posts/11-17-2022/</guid>
      <description>&lt;p&gt;Getting anything running on Kubernetes is a bit of a challenge, but today I was working on deploying MySQL so I could
migrate my Ghost blog from v4.x to v5.x. This means creating a mysql instance, a user (for ghost) and any other data
that we need to run the deployment. The first thing that we need to do is add a secret which will define the root user
password and the password for ghost user:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
