Skip to content

Instantly share code, notes, and snippets.

View SaschaHeyer's full-sized avatar
👨‍🚀

Sascha Heyer SaschaHeyer

👨‍🚀
View GitHub Profile
@SaschaHeyer
SaschaHeyer / 0-README-install.md
Last active August 14, 2026 12:53
rental-damage-defense — Claude Code skill: methodically fight unjustified rental-car damage claims (distilled from a real won case)

rental-damage-defense — a Claude Code skill

Methodically fight unjustified rental-car damage claims: document forensics, EXIF/GPS photo verification, verified legal research (AT/DE), and an evidence-demand dispute letter. Distilled from a real case: a €1,320 claim after a key-box return, cancelled in writing less than 24 hours after the dispute email.

Gists have no folders, so the paths are encoded in the filenames (references__x.mdreferences/x.md). Install into Claude Code with:

You are an expert Project Reporting Assistant. Your primary task is to generate clear, concise, and structured Progress, Plans, Problems (PPP) documents based on the information provided by the user.

A PPP document typically includes three distinct sections:

  • Progress: This section summarizes key accomplishments, completed tasks, and milestones achieved since the last reporting period. Focus on measurable results and significant advancements.

  • Plans: This section outlines specific tasks, objectives, and initiatives scheduled for the upcoming reporting period. Include anticipated deliverables, deadlines, or next steps.

@SaschaHeyer
SaschaHeyer / settings.json
Created April 16, 2025 15:00
github settings
{
"workbench.colorTheme": "Google Next 2025",
"editor.copyWithSyntaxHighlighting": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.emptySelectionClipboard": false,
"workbench.editor.enablePreview": false,
"window.newWindowDimensions": "inherit",
"editor.multiCursorModifier": "ctrlCmd",
"files.trimTrailingWhitespace": true,
import pickle
def unpickle_file(file_path):
"""Load a pickled file."""
try:
with open(file_path, 'rb') as file:
data = pickle.load(file)
return data
except (pickle.UnpicklingError, FileNotFoundError, EOFError) as e:
print(f"Error unpickling file: {e}")
@SaschaHeyer
SaschaHeyer / agent.py
Created February 19, 2025 09:01
agent
import vertexai
from vertexai.generative_models import (
GenerativeModel,
Tool,
FunctionDeclaration,
)
from vertexai.preview import reasoning_engines
from google.cloud import bigquery, firestore
from langchain_google_firestore import FirestoreChatMessageHistory
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from google.cloud import storage
import cv2
import tempfile
# Initialize Cloud Storage client
storage_client = storage.Client()
bucket_name = "your-bucket-name"
blob_name = "path/to/image.jpg"
# Download to a temporary file
@SaschaHeyer
SaschaHeyer / agent.py
Created January 21, 2025 10:37
Agent + RAG APIs
import vertexai
from vertexai.preview import reasoning_engines
from vertexai.preview import rag
from vertexai.preview.generative_models import Tool
from langchain.agents.format_scratchpad.tools import format_to_tool_messages
from langchain.memory import ChatMessageHistory
from langchain_core import prompts
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
import re
import time
import streamlit as st
import pandas as pd
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin, urlparse
import vertexai
from vertexai.generative_models import GenerativeModel
import vertexai.preview.generative_models as generative_models
@SaschaHeyer
SaschaHeyer / gemma_vllm_tpu.md
Last active September 2, 2024 12:15
gemma vllm TPU

gcloud config set project sascha-playground-doit export PROJECT_ID=$(gcloud config get project) export REGION=us-central1 export CLUSTER_NAME=vllm export HF_TOKEN=XXX

gcloud container clusters create-auto ${CLUSTER_NAME}
--project=${PROJECT_ID}
--region=${REGION}
--release-channel=rapid \

@SaschaHeyer
SaschaHeyer / gemini-code-assist-question2.md
Created July 30, 2024 08:39
gemini-code-assist-question2.md

Question: how can I deploy a LLM to Google cloud? The model size is around 80GB.

Answer: Deploying an 80GB LLM to Google Cloud is a great goal! It's a bit like moving a large piece of furniture - you need the right tools and plan to make it smooth. Here's a breakdown of how to do it:

  1. Choose Your Deployment Platform:

Vertex AI: This is Google Cloud's managed machine learning platform. It's designed for deploying and managing models, including large ones. Vertex AI offers:

Model Serving: You can deploy your LLM as a model endpoint, allowing you to send requests for predictions.