Discover gists
| # =========================================== | |
| # ZSH Hacks - Dreams of Code | |
| # =========================================== | |
| # Add these to your .zshrc file | |
| # =========================================== | |
| # ------------------------------------------- | |
| # 1. Edit Command Buffer | |
| # ------------------------------------------- | |
| # Open the current command in your $EDITOR (e.g., neovim) |
| sepal.length | sepal.width | petal.length | petal.width | variety | |
|---|---|---|---|---|---|
| 5.1 | 3.5 | 1.4 | .2 | Setosa | |
| 4.9 | 3 | 1.4 | .2 | Setosa | |
| 4.7 | 3.2 | 1.3 | .2 | Setosa | |
| 4.6 | 3.1 | 1.5 | .2 | Setosa | |
| 5 | 3.6 | 1.4 | .2 | Setosa | |
| 5.4 | 3.9 | 1.7 | .4 | Setosa | |
| 4.6 | 3.4 | 1.4 | .3 | Setosa | |
| 5 | 3.4 | 1.5 | .2 | Setosa | |
| 4.4 | 2.9 | 1.4 | .2 | Setosa |
| { | |
| "categories": [ | |
| { | |
| "name": "Movies", | |
| "videos": [ | |
| { | |
| "description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources": [ | |
| "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" | |
| ], |
| #!/usr/bin/env python | |
| """ | |
| The Matched Filter implemenation in frequency domain | |
| """ | |
| __author__ = "Aleksei Rostov" | |
| __contact__ = "aleksei.rostov@protonmail.com" | |
| __date__ = "2023/03/23" | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
Resume claude after running out of usage limit. For Macos, it uses the automation scripts to resume usage.
For instance if your usage resets at 3pm
./resume_claude.sh "15:00"
| #!/bin/zsh | |
| # 1. Close all JetBrains applications | |
| echo "Closing running JetBrains instances..." | |
| jbs=(phpstorm pycharm intellij webstorm datagrip clion goland rider) | |
| for app in "${jbs[@]}"; do | |
| pkill -fi "$app" 2>/dev/null | |
| done | |
| # 2. Define Base Directories |
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |