Skip to content

Instantly share code, notes, and snippets.

View unabridgedxcrpt's full-sized avatar

Jonathan Bird unabridgedxcrpt

View GitHub Profile
@chriscarrollsmith
chriscarrollsmith / llm-hackathon.md
Created July 5, 2025 13:56
Coders' Colaboratory mini-hackathon on `llm` by simonw

Let's hack on llm!

If you have uv installed (and you should!), you can install llm globally in a uv-managed tool environment with:

uv tool install llm

If you want to use models other than OpenAI models, you'll need some extensions:

@ttscoff
ttscoff / ripple.rb
Last active September 2, 2025 14:16
A command line tool (and library) for creating a ripple effect on text, for progress animation
#!/usr/bin/env ruby
# frozen_string_literal: true
# ripple - A simple Ruby script to create a text ripple effect in the terminal.
## From the command line, you can run:
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional
## Run a command during the animation:
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional --command "sleep 5"
# This will animate the text "Your Text Here" with the specified options, and run the command in the background.
@awni
awni / mlx_lm_open_webui.md
Created April 25, 2025 15:41
Open WebUI with MLX LM

Setup

Install packages:

pip install open-webui mlx-lm

Start Open WebUI server:

@kristopherjohnson
kristopherjohnson / generate_cpp_project.py
Last active March 11, 2025 02:31
Script for generating a new CMake-based C++ project
#!/usr/bin/env python3
"""
generate_cpp_project.py
This script generates a standard C++ project structure with CMake build system.
The generated project includes:
- A main executable
- A library with header files
- Unit tests using Doctest
- CMake configuration with CPack support
@ldavidh
ldavidh / moreFinderTerminal.sh
Last active July 4, 2025 11:34
alternate sel script
#cd into directory in Finder's front window
function cdf() {
finderPath=`osascript -e 'try
tell application "Finder" to set the source_folder to (folder of the front window) as alias
on error
tell application "Finder" to set source_folder to insertion location as alias
end try
return POSIX path of source_folder as string'`
cd "$finderPath"
// Update 2025-05-22 — ported to rand v0.9, using a struct with Display impl rather than returning a string
struct MarineLine;
impl std::fmt::Display for MarineLine {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use rand::{Rng, seq::IndexedRandom};
let marine_life = ["🐳", "🐠", "🦈", "🐙", "🐡", "🐬", "🐟", "🦀", "🐋"];
let water = [
@kalomaze
kalomaze / llm_samplers_explained.md
Last active November 13, 2025 17:49
LLM Samplers Explained

LLM Samplers Explained

Everytime a large language model makes predictions, all of the thousands of tokens in the vocabulary are assigned some degree of probability, from almost 0%, to almost 100%. There are different ways you can decide to choose from those predictions. This process is known as "sampling", and there are various strategies you can use which I will cover here.

OpenAI Samplers

Temperature

  • Temperature is a way to control the overall confidence of the model's scores (the logits). What this means is that, if you use a lower value than 1.0, the relative distance between the tokens will become larger (more deterministic), and if you use a larger value than 1.0, the relative distance between the tokens becomes smaller (less deterministic).
  • 1.0 Temperature is the original distribution that the model was trained to optimize for, since the scores remain the same.
  • Graph demonstration with voiceover: https://files.catbox.moe/6ht56x.mp4
@ole
ole / set-photos-keyboard-shortcuts.sh
Last active May 4, 2024 02:10
Assign a keyboard shortcut to the Export Unmodified Originals menu command in Photos.app on macOS
#!/bin/bash
# Assigns a keyboard shortcut to the Export Unmodified Originals
# menu command in Photos.app on macOS.
# @ = Command
# ^ = Control
# ~ = Option
# $ = Shift
shortcut='@~^e'
@chockenberry
chockenberry / README
Created April 6, 2022 17:32
A simple AppleScript to start up a web server in the folder where the script is located.
1) Add this code to a new file in Script Editor
2) Export the script as "Application" and make sure it's code signed
3) Put "Startup.app" in the root folder of the test website (e.g. where index.html is located)
4) Make sure that "Startup.app" has Full Disk Access in System Preferences > Security & Privacy > Privacy
@aculich
aculich / zdl.py
Created March 29, 2021 17:48 — forked from danaspiegel/zdl.py
Zoom Recording Downloader
#!/usr/bin/env python3
import os
import requests
import itertools
from dateutil.parser import parse
API_KEY = ''
API_SECRET = ''