Your zshrc on one computer is different than the next. Don’t do that. Create a repo called “dotfiles” and put your zshrc, vimrc, and other quality of life dot files into a version controlled home. Now when you make improvements, you can pull down and iterate on every computer.
All posts in Uncategorized
quick openai call from the terminal
Summary How do create “ai” executable You use vim. How do create “aiv” executable. Same steps as above.
Claude Code First Impressions
Claude is my main AI coding tool now. Its terminal based and writes code one file at a time so I can review changes. Tips Note: How to download claude code (link)
Docker Beginner Tutorial
Let’s assume you are sold on Docker – you need and love Docker. How is it used? On your computer:– install docker (docker desktop is most popular, podman is gaining ground) – develop an application adjusting your Dockerfile– use Dockerfile to build a “image” – a portable package of your app– test locally by running…
Why Docker? Most servers run Linux
Imagine a world where most servers run Linux. A little bit of chaos In this same world (the real world), developers build software on personal computers that run many different operating systems – Mac, Windows, wacky new forks of Linux. For developers to deploy their software, someone must SSH into a server, install dependencies, run…
scripts folder
You should write scripts for your computer. They could be your favorite language. Put aliases in zshrc to call them Here is “lsp.py”
Data Ownership
Who owns data on you? Google Maps has tracked nearly every location you’ve been in the last decade. But you cannot query it in any way. Have you ever wanted to know: “How many times have I been to the gym this week?” or “How many days did I spend in California this year?” You…
python reference sheet
[list] -> [list] [list] -> num
How to avoid overwriting files in python
Strategy 1: increment a suffix so like “file.pdf(1)” Version: Simple Version: Guards against race conditions The above is safe if there is only one process writing to the location but it can include a race condition. This is the safer version that “opens” the file. Strategy 2: attach a timestamp
How to use the python rank-bm25 library
Note: this library is called rank-bm25 on pypi (pypi) and NOT bm25 Official docs (github) say: However, you often want to clean the corpus (lowercase, remove punctuation) before indexing the corpus. Once you do that you must keep the original corpus around that index into the original unedited strings. This works for most cases! Note,…