Skip to content

Instantly share code, notes, and snippets.

@dcondrey
dcondrey / selfmeasure.py
Created June 28, 2026 19:59
self-measurement irreducibility test (CPU/GPU/SSD)
"""Make-or-break: is self-measurement perturbation REDUCIBLE or IRREDUCIBLE?
A system reads its own temperature. Reading is computation; computation heats the substrate; the heat
changes the temperature read. We ramp self-measurement intensity UP then DOWN and measure:
delta_min : temperature rise from the MINIMUM possible self-observation. >0 => you can never
sample your own unperturbed state.
hysteresis : temp(intensity) up-ramp vs down-ramp. A nonzero loop => the reading depends on
measurement HISTORY (thermal mass), so the true idle state is unrecoverable from any
single reading => IRREDUCIBLE. ~Zero loop => memoryless removable offset => reducible.
@dcondrey
dcondrey / phone.py
Created June 27, 2026 06:00
phone self-introspection benchmark (robust)
"""Self-contained phone/constrained-device build of the self-introspection benchmark.
Standalone (no imports from benchmark.py) so it runs from a single downloaded file on a-shell / iOS
/ any minimal Python. Robust by design: every modality probe catches ALL exceptions and records why
(constrained platforms raise platform-specific errors), and the whole run is wrapped so any fatal
error is reported as ONE line (+ uploaded) instead of a wall of tracebacks. Prints a REPORT-BACK
block at the very bottom: a short paste URL if upload works, and always a compact one-line summary.
"""
import json
import os
@dcondrey
dcondrey / phone.py
Created June 27, 2026 01:10
phone self-introspection benchmark
"""Portable cross-substrate benchmark: the real cost of self-introspection.
Runs on any machine (macOS / Linux / Windows / iOS a-shell; CI, Modal, Colab, Kaggle, laptop, phone)
and measures, in the machine's own CPU-seconds, two SUBSTRATE-INVARIANT raw facts:
1. cost_per_look (seconds) for self-observation at three modalities:
shallow_inproc : a cheap in-process self-read (load average) -> expected ~free
proc_inproc : richer in-process self-read (/proc, thermal files) -> Linux; middle
deep_subprocess : rich self-telemetry via a spawned tool (the body) -> expected expensive
2. cost_per_work (seconds) across a SWEEP of work-unit sizes.
@dcondrey
dcondrey / phone.py
Created June 27, 2026 01:10
phone self-introspection benchmark (compact + upload)
"""Portable cross-substrate benchmark: the real cost of self-introspection.
Runs on any machine (macOS / Linux / Windows / iOS a-shell; CI, Modal, Colab, Kaggle, laptop, phone)
and measures, in the machine's own CPU-seconds, two SUBSTRATE-INVARIANT raw facts:
1. cost_per_look (seconds) for self-observation at three modalities:
shallow_inproc : a cheap in-process self-read (load average) -> expected ~free
proc_inproc : richer in-process self-read (/proc, thermal files) -> Linux; middle
deep_subprocess : rich self-telemetry via a spawned tool (the body) -> expected expensive
2. cost_per_work (seconds) across a SWEEP of work-unit sizes.
@dcondrey
dcondrey / benchmark.py
Created June 27, 2026 00:44
self-introspection cost benchmark (cost-of-self-knowledge paper)
"""Portable cross-substrate benchmark: the real cost of self-introspection.
Runs on any machine (macOS / Linux / Windows / iOS a-shell; CI, Modal, Colab, Kaggle, laptop, phone)
and measures, in the machine's own CPU-seconds, two SUBSTRATE-INVARIANT raw facts:
1. cost_per_look (seconds) for self-observation at three modalities:
shallow_inproc : a cheap in-process self-read (load average) -> expected ~free
proc_inproc : richer in-process self-read (/proc, thermal files) -> Linux; middle
deep_subprocess : rich self-telemetry via a spawned tool (the body) -> expected expensive
2. cost_per_work (seconds) across a SWEEP of work-unit sizes.
#!/bin/bash
set -e
lscpu 2>/dev/null | grep -E 'Model name|L3' || true
echo Arch: $(uname -m)
echo Cores: $(nproc)
free -h | grep Mem || true
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>/dev/null || echo GPU: none
apt-get update -qq >/dev/null 2>&1
apt-get install -y -qq gcc >/dev/null 2>&1
curl -sSf https://sh.rustup.rs | sh -s -- -y --quiet >/dev/null 2>&1
@dcondrey
dcondrey / bypass-proof-of-humanity.js
Created March 19, 2026 00:58
Universal bypass for client-side "proof of human authorship" writing verification systems (purelyhuman.world, roundtable.ai, validdraft.com, and others). Demonstrates that any system where behavioral capture and proof generation both run in the browser is architecturally defeatable. Three modes: realistic human typing simulation with Gaussian ke…
/**
* Proof-of-Humanity Bypass — v1.0.0
* ==================================
* Demonstrates that ANY client-side "proof of human authorship" system
* can be defeated because the attacker controls the execution environment.
*
* Author: David Condrey · WritersLogic · writerslogic.com
* License: MIT
*
* ┌──────────────────────────────────────────────────────────────────┐
@dcondrey
dcondrey / .zshrc
Last active September 18, 2025 08:41
ZSH writers utilities
repetitivephrases() {
recurse=0; minw=3; maxw=20; limit=500; incl_csv=""; excl_csv=""; allfiles=0; mincount=2; single_file=""; internal_check=0
OPTIND=1
while getopts "rm:M:n:E:X:Ac:f:h" opt; do
case "$opt" in
r) recurse=1 ;;
m) minw=$OPTARG ;;
M) maxw=$OPTARG ;;
n) limit=$OPTARG ;;
E) incl_csv=$OPTARG ;;
@dcondrey
dcondrey / datpatterns.py
Created March 23, 2024 23:57
Identify repeating patterns in .dat file
import struct
import re
from collections import Counter
class DatPatterns:
def __init__(self, filepath):
self.filepath = filepath
self.content = None
def read_file(self):