by Glenn Matlin / glennmatlin
on all socials
- Download and copy all files in this gist to
~/.claude/
- Move the
.py
files to~/.claude/hooks
- Restart Claude Code.
import os | |
from google import genai | |
from google.genai import types | |
client = genai.Client(api_key=os.getenv("GEMINI_API_KEY","xxx")) | |
# Repalce with the youtube url you want to analyze | |
youtube_url = "https://www.youtube.com/watch?v=RDOMKIw1aF4" | |
# Prompt to analyze and summarize the Youtube Video |
This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.
Examples:
""" | |
A micro event loop library implementation from scratch. | |
This library provides a minimal but feature-complete asynchronous event loop | |
implementation for educational purposes. It demonstrates the core concepts of | |
asynchronous programming including: | |
- Task scheduling and management | |
- I/O multiplexing with non-blocking sockets | |
- Timeouts and sleep functionality |
######################### Preamble ########################################### | |
SHELL := bash | |
.ONESHELL: | |
.SHELLFLAGS := -eu -o pipefail -c | |
.DELETE_ON_ERROR: | |
.SECONDEXPANSION: | |
MAKEFLAGS += --warn-undefined-variables | |
MAKEFLAGS += --no-builtin-rules | |
MAKEFLAGS += -j$(shell nproc) |
pip install miniogre
miniogre run
brew install charmbracelet/tap/freeze
freeze --execute "ls -ltra"
A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.
node --version
npm --version
while true; do | |
osascript -e ' | |
tell application "System Events" | |
if exists process "Claude" then | |
tell process "Claude" | |
if exists button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude" then | |
click button "Allow for This Chat" of group 2 of group 1 of group 1 of group 1 of UI element 2 of group 1 of group 1 of group 1 of group 1 of window "Claude" | |
log "clicked allow button" | |
end if | |
end tell |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
cmake_minimum_required(VERSION 3.27) | |
project(_ext LANGUAGES CXX) | |
# ----------------------------- Setup ----------------------------- | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | |
option(BUILD_SHARED_LIBS "Build as a shared library" ON) |