Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Author: T. Patrick Bailey
Whiteboarcoder.com
Returns the monthly cost/budget for Claude
Assumes an admin key is at ~/.claude-key-cost
and you have to hard code the BUDGET variable
"""
@patmandenver
patmandenver / claude-message.py
Created March 6, 2026 05:24
/usr/bin/claude-message
#!/usr/bin/env python3
"""
Simple script to generate a response using Anthropic's messages endpoint
and report input/output tokens.
Works both with piped input and command-line arguments.
"""
import sys
import json
import os
@patmandenver
patmandenver / token-count.py
Created March 6, 2026 05:02
/usr/bin/token-count
#!/usr/bin/env python3
"""
Simple script to count input tokens using Anthropic's count_tokens endpoint
Works both with piped input and command-line arguments
"""
import sys
import json
import os
import argparse
██
██░░██
██░░░░░░██
██░░░░░░██
██░░░░░░░░░░██
██░░██████░░██
██░░░░██████░░░░██
██░░░░██████░░░░██
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
moai_statue = "moai-small-no_overhang.stl";
magnet_dia = 32.2; //33 too big
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
moai_statue = "moai-small-no_overhang.stl";
moau_plug = "giant_moai_plug.stl";
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
thickness = 7;
bevel_thickness = 1;
bevel = 1.1;
=== Problem I am trying to solve ====
Currently, creators who freely share or sell their models for 3D printing have no simple license
That allows their customers to sell their creations for profit and share the proceeds with the creator.
I propose the following license idea
Note: There will not be versions this will be a DRAFT until finalized then it will never change
==== Give and it Shall be Given license (DRAFT) ===
==== (GSG for short) ===
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
base_thickness = 1;
base_width = 215;
base_height = 210;
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
stamp_knub = "stamp_knub.stl";
knub_height = 10;
knub_radius = 10;