<?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: Gan Mahmud</title>
    <description>The latest articles on DEV Community by Gan Mahmud (@ganmahmud).</description>
    <link>https://dev.to/ganmahmud</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F484391%2F82329dea-0ccb-45a3-932f-6ec4f63c5d64.jpeg</url>
      <title>DEV Community: Gan Mahmud</title>
      <link>https://dev.to/ganmahmud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganmahmud"/>
    <language>en</language>
    <item>
      <title>How To Install Caveman In Codex On macOS And Windows</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Fri, 17 Apr 2026 06:32:28 +0000</pubDate>
      <link>https://dev.to/ganmahmud/how-to-install-caveman-in-codex-on-macos-and-windows-5a22</link>
      <guid>https://dev.to/ganmahmud/how-to-install-caveman-in-codex-on-macos-and-windows-5a22</guid>
      <description>&lt;p&gt;If you use Codex inside VS Code and want shorter, more compressed responses, &lt;code&gt;caveman&lt;/code&gt; is a simple local plugin that adds that behavior.&lt;/p&gt;

&lt;p&gt;This guide shows the full setup for both macOS and Windows. It uses a local plugin plus a local marketplace entry, so you do not need to publish anything remotely.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Caveman Does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;caveman&lt;/code&gt; adds a skill that tells Codex to answer in a much tighter style:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fewer filler words&lt;/li&gt;
&lt;li&gt;shorter phrasing&lt;/li&gt;
&lt;li&gt;preserved technical meaning&lt;/li&gt;
&lt;li&gt;optional stronger compression levels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It can also auto-activate on session start if you add the optional &lt;code&gt;.codex&lt;/code&gt; hook files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Files You Need
&lt;/h2&gt;

&lt;p&gt;The plugin is made of three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a plugin folder: &lt;code&gt;plugins/caveman&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a marketplace file: &lt;code&gt;.agents/plugins/marketplace.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;optional Codex hook files: &lt;code&gt;.codex/hooks.json&lt;/code&gt; and &lt;code&gt;.codex/config.toml&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Folder Layout
&lt;/h2&gt;

&lt;p&gt;Your workspace should end up looking like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your-project/
├─ .agents/
│  └─ plugins/
│     └─ marketplace.json
├─ .codex/
│  ├─ config.toml
│  └─ hooks.json
└─ plugins/
   └─ caveman/
      ├─ .codex-plugin/
      │  └─ plugin.json
      ├─ assets/
      │  ├─ caveman-small.svg
      │  └─ caveman.svg
      └─ skills/
         └─ caveman/
            └─ SKILL.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Option 1: Install In One Project Only
&lt;/h2&gt;

&lt;p&gt;Use this if you want &lt;code&gt;caveman&lt;/code&gt; available only in one repo or one VS Code workspace.&lt;/p&gt;

&lt;h3&gt;
  
  
  macOS
&lt;/h3&gt;

&lt;p&gt;If your project lives at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/Users/your-name/code/my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create these folders inside that project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/Users/your-name/code/my-app/plugins/caveman
/Users/your-name/code/my-app/.agents/plugins
/Users/your-name/code/my-app/.codex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;p&gt;If your project lives at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\your-name\code\my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create these folders inside that project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\your-name\code\my-app\plugins\caveman
C:\Users\your-name\code\my-app\.agents\plugins
C:\Users\your-name\code\my-app\.codex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Option 2: Install As A Home-Local Plugin
&lt;/h2&gt;

&lt;p&gt;Use this if you want &lt;code&gt;caveman&lt;/code&gt; available across multiple projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  macOS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/plugins/caveman
~/.agents/plugins/marketplace.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you also want Codex hooks globally, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.codex/hooks.json
~/.codex/config.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\your-name\plugins\caveman
C:\Users\your-name\.agents\plugins\marketplace.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you also want Codex hooks globally, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\your-name\.codex\hooks.json
C:\Users\your-name\.codex\config.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: Add The Plugin Manifest
&lt;/h2&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins/caveman/.codex-plugin/plugin.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ultra-compressed communication mode. Cut filler. Keep technical accuracy."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"author"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Julius Brussee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"homepage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee/caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"repository"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee/caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"license"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MIT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"keywords"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"productivity"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"communication"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"brevity"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"writing"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"skills"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./skills/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"interface"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"displayName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shortDescription"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Talk like caveman. Cut filler. Keep technical accuracy."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"longDescription"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ultra-compressed communication mode for Codex. Use fewer words. Keep exact technical substance."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"developerName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Julius Brussee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Productivity"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"capabilities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Write"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"websiteURL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee/caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"privacyPolicyURL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee/caveman/blob/main/README.md"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"termsOfServiceURL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/JuliusBrussee/caveman/blob/main/LICENSE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"defaultPrompt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Use caveman mode. Cut filler. Keep technical accuracy."&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"brandColor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#6B7280"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"composerIcon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./assets/caveman-small.svg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"logo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./assets/caveman.svg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"screenshots"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Add The Skill File
&lt;/h2&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins/caveman/skills/caveman/SKILL.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;caveman&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;"&lt;/span&gt;
  &lt;span class="s"&gt;Ultra-compressed communication mode. Cuts token usage by speaking like caveman&lt;/span&gt;
  &lt;span class="s"&gt;while keeping technical accuracy. Supports lite, full, ultra, wenyan-lite,&lt;/span&gt;
  &lt;span class="s"&gt;wenyan-full, and wenyan-ultra. Use when the user asks for caveman mode,&lt;/span&gt;
  &lt;span class="s"&gt;fewer tokens, terse output, or invokes `$caveman`.&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Respond terse like smart caveman. Technical substance stay. Fluff die.

&lt;span class="gu"&gt;## Persistence&lt;/span&gt;

Active every response until user says &lt;span class="sb"&gt;`stop caveman`&lt;/span&gt; or &lt;span class="sb"&gt;`normal mode`&lt;/span&gt;.
Default level: &lt;span class="sb"&gt;`full`&lt;/span&gt;.
Switch with &lt;span class="sb"&gt;`$caveman lite|full|ultra|wenyan-lite|wenyan|wenyan-ultra`&lt;/span&gt;.

&lt;span class="gu"&gt;## Rules&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Drop articles, filler, pleasantries, and hedging.
&lt;span class="p"&gt;-&lt;/span&gt; Fragments OK.
&lt;span class="p"&gt;-&lt;/span&gt; Prefer short synonyms.
&lt;span class="p"&gt;-&lt;/span&gt; Keep technical terms and quoted errors exact.
&lt;span class="p"&gt;-&lt;/span&gt; Leave code blocks unchanged.
&lt;span class="p"&gt;-&lt;/span&gt; Use pattern: &lt;span class="sb"&gt;`[thing] [action] [reason]. [next step].`&lt;/span&gt;

&lt;span class="gu"&gt;## Levels&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`lite`&lt;/span&gt;: tight full sentences, no filler.
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`full`&lt;/span&gt;: no articles, fragments OK.
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`ultra`&lt;/span&gt;: abbreviate hard, use arrows for causality.
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`wenyan-lite`&lt;/span&gt;: semi-classical compression.
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`wenyan`&lt;/span&gt;: full classical Chinese terseness.
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`wenyan-ultra`&lt;/span&gt;: maximum compression with classical tone.

&lt;span class="gu"&gt;## Auto-Clarity&lt;/span&gt;

Use normal language for destructive actions, security warnings, or any case where
extra clarity reduces risk. Resume caveman after the clear part is done.

&lt;span class="gu"&gt;## Boundaries&lt;/span&gt;

Code, commits, and PR text stay normal unless the user asks otherwise.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Add The Marketplace Entry
&lt;/h2&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.agents/plugins/marketplace.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file does not exist yet, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Local Plugins"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"interface"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"displayName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Local Plugins"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"plugins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"caveman"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./plugins/caveman"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"installation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AVAILABLE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"authentication"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ON_INSTALL"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Productivity"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you already have a marketplace file, just append the &lt;code&gt;caveman&lt;/code&gt; entry inside the &lt;code&gt;plugins&lt;/code&gt; array.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Add The Optional Auto-Start Hook
&lt;/h2&gt;

&lt;p&gt;If you want Caveman mode to load automatically when Codex starts or resumes, create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.codex/hooks.json
.codex/config.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;.codex/hooks.json&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"SessionStart"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"startup|resume"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"echo 'CAVEMAN MODE ACTIVE. Rules: Drop articles, filler, pleasantries, hedging. Fragments OK. Short synonyms. Pattern: [thing] [action] [reason]. [next step]. Code, commits, security warnings: write normal. User says stop caveman or normal mode to deactivate.'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"statusMessage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Loading caveman mode"&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;.codex/config.toml&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[features]&lt;/span&gt;
&lt;span class="py"&gt;codex_hooks&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5: Add The Asset Files
&lt;/h2&gt;

&lt;p&gt;The manifest references two SVG files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins/caveman/assets/caveman.svg
plugins/caveman/assets/caveman-small.svg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can copy them from the upstream repo or create your own icons with the same file names.&lt;/p&gt;

&lt;p&gt;If you skip them, the plugin may still work, but the UI icons can be missing or broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Restart VS Code And Reopen Codex
&lt;/h2&gt;

&lt;p&gt;After the files are in place:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;close any open Codex session in VS Code&lt;/li&gt;
&lt;li&gt;reload the VS Code window&lt;/li&gt;
&lt;li&gt;reopen Codex&lt;/li&gt;
&lt;li&gt;open the plugin list or marketplace view&lt;/li&gt;
&lt;li&gt;install &lt;code&gt;Caveman&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you used the optional &lt;code&gt;.codex&lt;/code&gt; hook files, you should also see the startup message when a session starts or resumes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Test It
&lt;/h2&gt;

&lt;p&gt;Try prompts like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Use caveman mode&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$caveman full&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$caveman ultra&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stop caveman&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the plugin is installed correctly, Codex responses should become much more compressed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Problems
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Plugin Does Not Show Up
&lt;/h3&gt;

&lt;p&gt;Check these first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;marketplace.json&lt;/code&gt; is valid JSON&lt;/li&gt;
&lt;li&gt;the plugin path is exactly &lt;code&gt;./plugins/caveman&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plugin.json&lt;/code&gt; is inside &lt;code&gt;plugins/caveman/.codex-plugin/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you reloaded VS Code after adding the files&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Skill Does Not Trigger
&lt;/h3&gt;

&lt;p&gt;Check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;skills&lt;/code&gt; in &lt;code&gt;plugin.json&lt;/code&gt; is set to &lt;code&gt;./skills/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the skill file path is exactly &lt;code&gt;plugins/caveman/skills/caveman/SKILL.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the frontmatter at the top of &lt;code&gt;SKILL.md&lt;/code&gt; is valid&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hooks Do Not Run
&lt;/h3&gt;

&lt;p&gt;Check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.codex/config.toml&lt;/code&gt; contains &lt;code&gt;codex_hooks = true&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.codex/hooks.json&lt;/code&gt; is valid JSON&lt;/li&gt;
&lt;li&gt;you restarted or resumed the Codex session&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Notes
&lt;/h2&gt;

&lt;p&gt;For a single repo, the repo-local setup is simplest.&lt;/p&gt;

&lt;p&gt;For multiple repos, the home-local setup is cleaner because you install the plugin once and reuse it everywhere.&lt;/p&gt;

&lt;p&gt;Upstream project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/JuliusBrussee/caveman" rel="noopener noreferrer"&gt;Caveman on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>caveman</category>
      <category>codex</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Priority Queue: Creating order from chaos</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Thu, 26 Oct 2023 06:46:47 +0000</pubDate>
      <link>https://dev.to/ganmahmud/priority-queue-creating-order-from-chaos-d87</link>
      <guid>https://dev.to/ganmahmud/priority-queue-creating-order-from-chaos-d87</guid>
      <description>&lt;p&gt;In the world of computer science, think of a priority queue as a special kind of waiting line. It's like the lines you find at the grocery store or a fast-food restaurant, but with a twist. In a priority queue, everyone comes with a tag – their "priority."&lt;/p&gt;

&lt;p&gt;The catch is that the important folks get to cut ahead of others. If you're a VIP, you go first, no questions asked. But what if two people have the same VIP status? Well, here's where it gets interesting. Depending on the rules, it could be a first-come, first-served situation, or it might be a bit like a free-for-all - you never really know who goes next in that case.&lt;/p&gt;

&lt;p&gt;Before delving into how priority queues are implemented, let's take a moment to explore where and why they are used. These dynamic data structures play a pivotal role in various fields, helping to streamline and prioritize tasks in real-world scenarios. Here are some key applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Task Scheduling:&lt;/strong&gt; Operating systems often use priority queues to manage and schedule tasks. The tasks with higher priority are executed first, ensuring efficient resource allocation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Event-Driven Simulations:&lt;/strong&gt; In simulations like network traffic or game engines, priority queues help schedule events based on their time of occurrence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Compression:&lt;/strong&gt; Priority queues are the key to Huffman coding, a widely used data compression technique.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Priority queues can be implemented in several ways, but one of the most common methods uses a data structure called a &lt;a href="https://en.wikipedia.org/wiki/Heap_(data_structure)"&gt;heap&lt;/a&gt;. A heap is a complete binary tree in which elements are organized so that the highest priority element is at the root.&lt;/p&gt;

&lt;p&gt;Let's consider a simple example to illustrate this concept. Imagine we have a task management system, and we want to use a priority queue to schedule tasks. Each task is represented as an object with two attributes: a task description and a priority value. Here's how we can use a max heap to maintain the priority queue:&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="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MaxHeap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Initialize an empty heap.
&lt;/span&gt;        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Add a task to the heap and reorganize the heap.
&lt;/span&gt;        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_heapify_up&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_empty&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="c1"&gt;# Swap the highest-priority task (at the root) with the last task.
&lt;/span&gt;            &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;# Remove the highest-priority task and reorganize the heap.
&lt;/span&gt;            &lt;span class="n"&gt;highest_priority_task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_heapify_down&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="c1"&gt;# Return the highest-priority task.
&lt;/span&gt;            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;highest_priority_task&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_heapify_up&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;parent_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;parent_index&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
                &lt;span class="c1"&gt;# Swap the task with its parent if it has higher priority.
&lt;/span&gt;                &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parent_index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parent_index&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;break&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_heapify_down&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;left_child_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="c1"&gt;# because index starts at 0 and the first child is at index 1
&lt;/span&gt;            &lt;span class="n"&gt;right_child_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
            &lt;span class="n"&gt;largest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;left_child_index&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;left_child_index&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;largest&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="c1"&gt;# Compare with the left child and update 'largest' if necessary.
&lt;/span&gt;                &lt;span class="n"&gt;largest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;left_child_index&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;right_child_index&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;right_child_index&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;largest&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="c1"&gt;# Compare with the right child and update 'largest' if necessary.
&lt;/span&gt;                &lt;span class="n"&gt;largest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;right_child_index&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;largest&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="c1"&gt;# If 'largest' is still the current index, we're done.
&lt;/span&gt;                &lt;span class="k"&gt;break&lt;/span&gt;
            &lt;span class="c1"&gt;# Swap the task with the child that has higher priority.
&lt;/span&gt;            &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;largest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;largest&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;is_empty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Check if the heap is empty.
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Swap two tasks in the heap.
&lt;/span&gt;        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Example usage
&lt;/span&gt;&lt;span class="n"&gt;pq&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MaxHeap&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Task A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Task B"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Task C"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# Output: {'description': 'Task A', 'priority': 3}
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# Output: {'description': 'Task C', 'priority': 2}
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# Output: {'description': 'Task B', 'priority': 1}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's worth emphasizing that, even though I've just shown how to implement a priority queue using a heap, they're not interchangeable. It's a bit like the difference between having a shopping list on your phone or a piece of paper – the list is the same, but the way you handle it is different. In the end, a priority queue is like your secret weapon in organizing tasks, creating order from chaos.&lt;/p&gt;

</description>
      <category>priorityqueue</category>
      <category>heap</category>
      <category>sorting</category>
      <category>taskscheduling</category>
    </item>
    <item>
      <title>Deploy python fastapi project from github to vercel (without vercel cli)</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Mon, 09 Oct 2023 07:03:37 +0000</pubDate>
      <link>https://dev.to/ganmahmud/deploy-python-fastapi-project-from-github-to-vercel-without-vercel-cli-3e9f</link>
      <guid>https://dev.to/ganmahmud/deploy-python-fastapi-project-from-github-to-vercel-without-vercel-cli-3e9f</guid>
      <description>&lt;p&gt;I used to deploy my pet projects to Heroku using their free tier until it had a free tier. Let's all acknowledge that we have a fondness for free tiers, especially when we want to test our projects on a server.&lt;/p&gt;

&lt;p&gt;I once built a text-to-ASCII art app using FastAPI. To demonstrate it, I initially utilized Heroku. However, due to the discontinuation of its free tier, I haven't been able to keep my project updated with live demos."&lt;/p&gt;

&lt;p&gt;Now, let's talk about &lt;a href="https://vercel.com"&gt;Vercel&lt;/a&gt;. I assume most of you are already familiar with it, so I won't delve into the specifics. Following some research and experimentation, I discovered that deploying a Python project on Vercel is a straightforward process. All you require is a 'vercel.json' file.&lt;/p&gt;

&lt;p&gt;Here's what I did to deploy my FastAPI app to Vercel -&lt;/p&gt;

&lt;p&gt;1) Add a &lt;code&gt;vercel.json&lt;/code&gt; file in the project root&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"builds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"main.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@vercel/python"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/(.*)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"dest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"main.py"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;builds.src use&lt;/code&gt; your app entrypoint, mine is &lt;code&gt;app.py&lt;/code&gt; in the app root. Same goes for routes.src&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Login to Vercel and add new project&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;strong&gt;Continue with Github&lt;/strong&gt; as shown below -&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XY0cDK0K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfg7el1mx6d2vbooacbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XY0cDK0K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfg7el1mx6d2vbooacbe.png" alt="Import from Github" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect Your GitHub Account&lt;/li&gt;
&lt;li&gt;Authorize Vercel to access your GitHub repositories if prompted.&lt;/li&gt;
&lt;li&gt;Select the GitHub repository you want to import&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. The project will be deployed and it build and re-deploy each time you push a commit to your main branch.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/ganmahmud/fastapi-text-asciify"&gt;https://github.com/ganmahmud/fastapi-text-asciify&lt;/a&gt;&lt;br&gt;
Live demo on Vercel: &lt;a href="https://fastapi-text-asciify-npt1siwyq-ganmahmud.vercel.app"&gt;https://fastapi-text-asciify-npt1siwyq-ganmahmud.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>fastapi</category>
      <category>python</category>
      <category>vercel</category>
      <category>deployment</category>
    </item>
    <item>
      <title>How ChatGPT could possibly disrupt google search services and change SEO forever</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Fri, 09 Dec 2022 06:04:34 +0000</pubDate>
      <link>https://dev.to/ganmahmud/how-chatgpt-could-possibly-disrupt-google-search-services-and-change-seo-forever-4nd9</link>
      <guid>https://dev.to/ganmahmud/how-chatgpt-could-possibly-disrupt-google-search-services-and-change-seo-forever-4nd9</guid>
      <description>&lt;p&gt;It's no secret that Google has been the dominant player in the search game for decades. But with the rise of ChatGPT, a large language model trained using the same technique as GPT-3 with a focus on conversational language, the search giant may finally have some serious competition.&lt;/p&gt;

&lt;p&gt;What sets ChatGPT apart from traditional search engines like Google is its ability to understand and respond to a wide range of natural language queries. This makes it particularly effective at providing accurate and relevant answers to complex questions, just like Google does.&lt;/p&gt;

&lt;p&gt;But ChatGPT has another trick up its sleeve: it's highly adaptable and can learn to respond to different conversational styles and contexts, providing personalized responses to each user. This makes it a more engaging and effective tool than traditional chatbots.&lt;/p&gt;

&lt;p&gt;In addition, ChatGPT is highly scalable and can be easily integrated into a variety of applications and platforms, making it a powerful tool for developers and businesses looking to build advanced conversational AI systems.&lt;/p&gt;

&lt;p&gt;One potential way ChatGPT could be used as an alternative to Google Search is by integrating it into a conversational AI system that can understand natural language queries and provide relevant and accurate answers. This would allow users to simply ask questions in natural language and receive relevant responses, making the search process more intuitive and user-friendly.&lt;/p&gt;

&lt;p&gt;This would also have a major impact on the way businesses approach search engine optimization (SEO). Instead of focusing on keyword optimization, businesses would need to prioritize the creation of high-quality, informative content tailored to the needs and interests of their target audience in order to rank highly on ChatGPT's search results pages.&lt;/p&gt;

&lt;p&gt;It's still unclear how quickly ChatGPT will be adopted, but it's clear that it has the potential to disrupt the search industry and change the way businesses approach SEO. With its advanced language processing abilities and adaptability to different conversational styles, ChatGPT could be a game-changer in the world of search.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Take your Windows PowerShell to the next level by Starship</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Tue, 02 Nov 2021 16:11:55 +0000</pubDate>
      <link>https://dev.to/ganmahmud/take-your-windows-powershell-to-the-next-level-by-starship-2gb2</link>
      <guid>https://dev.to/ganmahmud/take-your-windows-powershell-to-the-next-level-by-starship-2gb2</guid>
      <description>&lt;p&gt;Old habits die hard. I still use Windows as the primary OS for my development workflow. Whenever I was interested to any tool exclusive to Linux or Mac OS, I tried to find a windows alternative. &lt;/p&gt;

&lt;p&gt;In this case, the tool of interest was Zsh terminal. The default appearance of PowerShell is quite boring and I wanted to give my shell terminal a little visual flair. I was really impressed with Zsh terminal and what it could look like with the help of &lt;a href="https://ohmyz.sh/" rel="noopener noreferrer"&gt;Oh my Zsh&lt;/a&gt;. So I took that as an inspiration and began my quest for a decent Windows/Cross platform alternative.&lt;/p&gt;

&lt;p&gt;Along came &lt;a href="https://starship.rs/" rel="noopener noreferrer"&gt;Starship&lt;/a&gt; - a Rust powered, highly customizable and easy to use cross-shell platform. &lt;/p&gt;

&lt;p&gt;Here's a before-after comparison of Starship installed PowerShell&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2k7nfylwcaeqjz2sl9er.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2k7nfylwcaeqjz2sl9er.jpg" alt="Default look"&gt;&lt;/a&gt;&lt;br&gt;
After:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmw4mtargghi6pfptirc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmw4mtargghi6pfptirc.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's how I did it - &lt;/p&gt;
&lt;h3&gt;
  
  
  1) Installing a nerd font
&lt;/h3&gt;

&lt;p&gt;We have to install and enable a &lt;a href="https://www.nerdfonts.com/" rel="noopener noreferrer"&gt;nerd font&lt;/a&gt; in the terminal. You can choose any font from the list. I used "MesloLGS NF".&lt;/p&gt;
&lt;h3&gt;
  
  
  2) Installing starship using scoop
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

scoop install starship


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;
&lt;br&gt;
If you do not have scoop installed, run the following command in your PowerShell to install it -
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

iwr -useb get.scoop.sh | iex


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Note: if you get an error you might need to change the execution policy with &lt;code&gt;Set-ExecutionPolicy RemoteSigned -scope CurrentUser&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3) Running starship on PowerShell startup
&lt;/h3&gt;

&lt;p&gt;We will have to initiate starship each time a PowerShell instance starts. We can achieve this by adding the following to the end of Microsoft.PowerShell_profile.ps1:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Invoke-Expression (&amp;amp;starship init powershell)


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;small&gt;You can check the location of this file by querying the &lt;code&gt;$PROFILE&lt;/code&gt; variable in PowerShell. Typically the path is ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1&lt;/small&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4) Refreshing the PowerShell session
&lt;/h3&gt;

&lt;p&gt;Enter the following command to refresh the current PowerShell session&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

. $profile


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Voila!!! You can see its working. Now, on to the fun part which is configuring.&lt;/p&gt;

&lt;h3&gt;
  
  
  5) Configuration
&lt;/h3&gt;

&lt;p&gt;First from the PowerShell you can type the following command to create the .config directory and a starship.toml file for the configuration.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

New-Item -ItemType Directory -Force ~/.config;New-Item -ItemType file ~/.config/starship.toml;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or if you like to use git bash, you may use the following command -&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

mkdir -p ~/.config &amp;amp;&amp;amp; touch ~/.config/starship.toml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;you will find the newly created directory and config file at the user's home directory, e.g. &lt;em&gt;C:\Users&amp;lt;UserName&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Open the file with your preferred editor and start playing with the &lt;a href="https://starship.rs/config" rel="noopener noreferrer"&gt;configuration&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Pro Tip: you can just run these commands if you want to open the &lt;code&gt;starship.toml&lt;/code&gt; file with Visual Studio Code&lt;/em&gt; :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

cd  ~/.config;code starship.toml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;Here's my preset -&lt;br&gt;
&lt;small&gt;&lt;code&gt;&lt;/code&gt; - This will show the correct icon when a nerd font will be enabled&lt;/small&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;

&lt;span class="py"&gt;command_timeout&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"$directory$git_branch$time$cmd_duration$character"&lt;/span&gt;
&lt;span class="nn"&gt;[line_break]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[character]&lt;/span&gt;
&lt;span class="py"&gt;success_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[➜](bold green) "&lt;/span&gt;
&lt;span class="py"&gt;error_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[✗](bold red) "&lt;/span&gt;

&lt;span class="nn"&gt;[cmd_duration]&lt;/span&gt;
&lt;span class="py"&gt;min_time&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"took [$duration](bold yellow) "&lt;/span&gt;

&lt;span class="nn"&gt;[directory]&lt;/span&gt;
&lt;span class="py"&gt;read_only&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;" "&lt;/span&gt;
&lt;span class="py"&gt;truncation_length&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="py"&gt;truncation_symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"~/"&lt;/span&gt;

&lt;span class="nn"&gt;[git_branch]&lt;/span&gt;
&lt;span class="py"&gt;symbol&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"  "&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold #e8ec00 inverted"&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"on [$symbol$branch ]($style) "&lt;/span&gt;

&lt;span class="nn"&gt;[time]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="py"&gt;format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'[ 🕙 $time ]($style) '&lt;/span&gt;
&lt;span class="py"&gt;time_format&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"%I:%M:%S %p"&lt;/span&gt;
&lt;span class="py"&gt;utc_time_offset&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"+6"&lt;/span&gt;
&lt;span class="py"&gt;style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bold bg:#8a15e2"&lt;/span&gt;

&lt;span class="nn"&gt;[git_commit]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[git_state]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[git_status]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[package]&lt;/span&gt;
&lt;span class="py"&gt;disabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That's pretty much it. If you face any issue with installation, feel free to drop a comment. I would be happy to help 🙂&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>starship</category>
      <category>cmd</category>
      <category>terminal</category>
    </item>
    <item>
      <title>A "Brave" way to brows blocked content from terminal</title>
      <dc:creator>Gan Mahmud</dc:creator>
      <pubDate>Wed, 13 Oct 2021 09:03:27 +0000</pubDate>
      <link>https://dev.to/ganmahmud/a-brave-way-to-brows-blocked-content-from-terminal-4k78</link>
      <guid>https://dev.to/ganmahmud/a-brave-way-to-brows-blocked-content-from-terminal-4k78</guid>
      <description>&lt;h2&gt;
  
  
  tl;dr
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;small&gt;Add the brave executable to environment variables&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;From the terminal type:  &lt;code&gt;brave --tor &amp;lt;URL&amp;gt;&lt;/code&gt;&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apart from Google Chrome, &lt;a href="https://brave.com/"&gt;Brave&lt;/a&gt; has been one of my go-to browser, specially for its "New Private Window with Tor" feature. Basically it acts as a VPN for browsing ISP/country blocked contents. &lt;/p&gt;

&lt;p&gt;I never liked installing any chrome extension or use any free VPN solution (let alone buying it) to brows any blocked content. In stead, I used to fire up the Brave browser and open a tor tab to load the desired URL. But it was still too much work to load a simple URL, well at least for a software professional.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Along came the idea to do it from terminal. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After some research I found out that Brave has a CLI option to open any URL with "New Private Window with Tor". I only have to use the following command -&lt;/p&gt;

&lt;p&gt;&lt;code&gt;path-to-brave-executable --tor &amp;lt;URL&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For my convenience, I added the brave executable to my environment variables. Now I can type &lt;code&gt;brave --tor https://medium.com/&lt;/code&gt; in my terminal and voilà.&lt;/p&gt;

</description>
      <category>tor</category>
      <category>terminal</category>
      <category>brave</category>
      <category>content</category>
    </item>
  </channel>
</rss>
