Skip to content

Instantly share code, notes, and snippets.

@ernanhughes
ernanhughes / gist:5a85c57f56fbe29d8f8d562570b2465d
Created July 7, 2026 19:14
PreferenceFutures — NewsEdits mechanism-ablation probe.
#!/usr/bin/env python3
r"""
PreferenceFutures — NewsEdits mechanism-ablation probe.
Research question
-----------------
Does a real human revision event contain incremental information about the
future of the revised sentence?
@ernanhughes
ernanhughes / gist:d217e299c5450f172205c332b7800290
Created July 7, 2026 17:54
PreferenceFutures — NewsEdits revision-lineage probe
#!/usr/bin/env python3
r"""
PreferenceFutures — NewsEdits revision-lineage probe.
Research question
-----------------
Does a real human revision event contain incremental information about the
future of the revised sentence?
#!/usr/bin/env python3
"""
PreferenceFutures probe, v2.
This script tests the claim:
Preferences can contain incremental information about future outcomes.
For a future target F, history/candidate features H,A, and preference Y:
class ScoreComparisonAgent(BaseAgent):
"""
Agent to aggregate and compare scores from multiple sources (SICQL, MRQ, SVM, EBT, LLM)
across specified pipeline runs. Handles asynchronous LLM scoring by fetching latest
LLM scores for targets evaluated by pipeline-run-linked scorers.
This is Step 1: Comprehensive Score Aggregation and Comparison.
"""
def __init__(self, cfg, memory=None, logger=None):
super().__init__(cfg, memory, logger)
import os
import tiktoken
def read_files(directory):
"""
Reads all .txt files from the specified directory and returns their content as a list of strings.
"""
texts = []
for filename in os.listdir(directory):
if filename.endswith(".txt"):
@ernanhughes
ernanhughes / rename_files.vbs
Created April 30, 2024 14:41
VBScript to rename files in a directory
Option Explicit
Dim fso, folder, file, tmFile
Dim folderName
folderName = "\\pcc\Int\PC\Inbox\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(folderName)