Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 22:14 (UTC +10:00)
View GitHub Profile
@tomasen
tomasen / guide-to-reading-mathematical-expressions-aloud.md
Last active January 12, 2025 13:29
How to Read Mathematical Expressions Out Loud

Basic

Expression How to Read This
$$a + b$$ a plus b
$$a - b$$ a minus b
$$a \times b$$ a times b
$$a / b$$ a over b
$$a > b$$ a is greater than b
$$a < b$$ a is less than b
from txtai import Embeddings, LLM
# Data to index
data = [
"US tops 5 million confirmed virus cases",
"Canada's last fully intact ice shelf has suddenly collapsed, forming a Manhattan-sized iceberg",
"Beijing mobilises invasion craft along coast as Taiwan tensions escalate",
"The National Park Service warns against sacrificing slower friends in a bear attack",
"Maine man wins $1M from $25 lottery ticket",
"Make huge profits without work, earn up to $100,000 a day"
@Ladicle
Ladicle / README.org
Last active April 15, 2025 04:08
Emacs Configuration 2024

Emacs Configuration 2024

https://gist.github.com/assets/1159133/5f2b8f77-c11a-41e6-a5e8-5e799100dbb3.png

@lmmx
lmmx / custom-instruction.md
Last active April 28, 2025 14:48
Custom instruction to make Claude Artifacts use persistent file identifiers and names

Custom instruction to make Claude Artifacts use persistent and distinct file identifiers in Projects

  • The title attribute of the <AntArtifact> XML tag becomes the file_name attribute when 'Add to Project' is clicked.
  • Since Claude defaults to a human-readable title (e.g. "Modified Web Page With New Features"), this will tend to change the filename in the Project
  • It's easier to keep a single file copy in your Project docs ("Project Knowledge") when the file names are persistent in this way
Click to show earlier versions

0.0.1

@data2json
data2json / t.py
Last active January 12, 2025 14:00
T - The missing LLM Unix Token Tool
#!/usr/bin/env python
# t - The missing LLM token counting and splitting tool for UNIX
import argparse
import sys
from typing import Optional, List
import math
import os
import tiktoken
@gsans
gsans / gist:e40451bde73bf2d0fc3b1e74fb4ee8d8
Created June 27, 2024 22:49
Sonnet 3.5 system prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@marcellodesales
marcellodesales / Ollama-API-CLI-Docker-Models-in-10-minutes.md
Last active March 18, 2025 02:58
Ollama hacking with Docker + Shell + API Server + Models Storage
@disler
disler / README_MINIMAL_PROMPT_CHAINABLE.md
Last active April 30, 2025 07:30
Minimal Prompt Chainables - Zero LLM Library Sequential Prompt Chaining & Prompt Fusion

Minimal Prompt Chainables

Sequential prompt chaining in one method with context and output back-referencing.

Files

  • main.py - start here - full example using MinimalChainable from chain.py to build a sequential prompt chain
  • chain.py - contains zero library minimal prompt chain class
  • chain_test.py - tests for chain.py, you can ignore this
  • requirements.py - python requirements

Setup

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active April 28, 2025 22:45
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@yurihbm
yurihbm / init.lua
Last active January 12, 2025 13:44
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-- Toggle Nvim Tree with Ctrl+b
vim.api.nvim_set_keymap("n", "<C-b>", ":NvimTreeToggle<CR>", {noremap = true, silent = true})
-- Use telescope with Ctrl+p
vim.api.nvim_set_keymap("n", "<C-p>", ":Telescope find_files<CR>", {noremap = true, silent = true})
-- Toggle Copilot Chat with Ctrl+c
vim.api.nvim_set_keymap("n", "<C-c>", ":CopilotChatToggle<CR>", {noremap = true, silent = true})
-- Rename using LSP in normal mode