Skip to content

Instantly share code, notes, and snippets.

@zitterbewegung
zitterbewegung / deploy-inky-app-uv-py310.sh
Last active August 23, 2025 20:18
Psychic Paper Install
#!/usr/bin/env bash
set -euo pipefail
# ============================================
# Config
# ============================================
APP_USER="${APP_USER:-${SUDO_USER:-pi}}"
APP_GROUP="${APP_GROUP:-${APP_USER}}"
HOME_DIR="$(getent passwd "${APP_USER}" | cut -d: -f6)"
APP_DIR="${APP_DIR:-${HOME_DIR}/inky-app}"
@zitterbewegung
zitterbewegung / Guide
Last active August 23, 2025 16:45
Psychic Paper Quickstart.
# 1) Copy your files to the Pi (adjust path/host as needed)
# Put setup-inky-app.sh, main.py, requirements-2.txt in the same folder.
# From your local machine:
# scp setup-inky-app.sh main.py requirements-2.txt [email protected]:/home/pi/
# 2) SSH into the Pi:
# ssh [email protected]
# 3) Run the setup (as root):
sudo bash ./setup-inky-app.sh
from deepsearcher.configuration import Configuration, init_config
from deepsearcher.online_query import query
config = Configuration()
# Customize your config here,
# more configuration see the Configuration Details section below.
config.set_provider_config("llm", "OpenAI", {"model": "gpt-4o-mini"})
#config.set_provider_config("embedding", "OpenAIEmbedding", {"model", "text-embedding-ada-002"})
config.set_provider_config("embedding", "MilvusEmbedding", {"model": "jina-embeddings-v3"})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zitterbewegung
zitterbewegung / main_formatted.ts
Last active November 19, 2024 19:33
OpenAI Deno Vision Tutorial
import OpenAI from "npm:openai";
const openai = new OpenAI();
import { encode } from "https://deno.land/[email protected]/encoding/base64.ts";
async function main() {
// Ensure a file path argument is provided
if (Deno.args.length === 0) {
console.error("Usage: deno run --allow-read script.ts <image-file-path>");
Deno.exit(1);
}
#!/bin/bash
# Make the script executable
chmod +x install.sh
# Install Python dependencies
echo "Installing Python dependencies from requirements.txt..."
pip install -r requirements.txt
# Check and install Ghidra if needed
#!/bin/bash
sudo apt update
sudo apt install fuse libfuse3-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++
sudo snap install cmake --classic
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$(: !550 ) idle3.10
2023-04-24 14:24:52.856 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:24:53.243 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.062 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.076 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.168 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.179 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.184 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.195 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.201 Python[69630:507872] +[CATransaction synchronize] called within transaction
@zitterbewegung
zitterbewegung / gist:7c6f737bbfc41b09dbe714e9c078408d
Created March 24, 2023 23:01
Give me a recipe for Spanish american French toast pizza as it would be made in China
Spanish American French Toast Pizza with a Chinese Twist is an interesting fusion dish that combines elements from different cuisines. Here's a recipe to create this unique dish:
Ingredients:
6 slices of white bread or French baguette
3 eggs
1 cup milk
1/4 cup granulated sugar
1 teaspoon vanilla extract
1/2 teaspoon cinnamon