Skip to content

Instantly share code, notes, and snippets.

View nathansutton's full-sized avatar

Nathan Sutton nathansutton

View GitHub Profile
@nathansutton
nathansutton / agents.csv
Last active September 13, 2026 21:08
how harnesses feel on your macbook pro
harness version tools tax: turn-1 prompt (tok) wait before 1st token, turn 1 wait / later turn (med · p90) cache reuse exp. tok/s pass (gate)
mini-swe-agent 2.4.6 1 1,171 12.2 s 3.6 s · 21 s 96% 8 11/24 (14 T)
pi 0.80.3 4 2,008 21.6 s 1.3 s · 22 s 99% 8.1 19/24 (7 T)
cline 3.0.60–61 26 5,876 64.1 s 9.9 s · 52 s 94% 7.3 17/24
codex 0.151.0 10 7,804 87.8 s 9.6 s · 28 s 94% 6.9 19/24 (5 T)
dsh 0.1.1-rc.2 25 8,052 94.4 s 2.2 s · 34 s 99% 7.2 18/24
goose 1.50.0 18 9,617 110.3 s 1.0 s · 22 s 100% 8 22/24 (3 T)
crush 0.92.0 26 16,263 199.8 s 1.8 s · 40 s 100% 5.8 18/24 (8 T)
opencode 1.17.12 10 18,046 225.7 s 4.6 s · 44 s 99% 5.7 15/24 (13 T)
chad (llama.cpp) 2.0.3 5 2,563 25.6 s 0.8 s · 19 s 99% 7.9 24/24
from PIL import Image
from transformers import BlipForConditionalGeneration, BlipProcessor
# read in the model
processor = BlipProcessor.from_pretrained("nathansutton/generate-cxr")
model = BlipForConditionalGeneration.from_pretrained("nathansutton/generate-cxr")
# your data
my_image = 'my-chest-x-ray.jpg'
my_indication = 'RLL crackles, eval for pneumonia'
flyway_1 | Database: jdbc:postgresql://postgres:5432/athena (PostgreSQL 12.4)
flyway_1 | Successfully validated 54 migrations (execution time 00:00.320s)
flyway_1 | Creating Schema History table "public"."flyway_schema_history" ...
flyway_1 | Current version of schema "public": << Empty Schema >>
flyway_1 | Migrating schema "public" to version 0000 - relationship
flyway_1 | Migrating schema "public" to version 0001 - vocabulary
flyway_1 | Migrating schema "public" to version 0002 - concept ancestor
flyway_1 | Migrating schema "public" to version 0003 - concept
flyway_1 | Migrating schema "public" to version 0004 - concept relationship
flyway_1 | Migrating schema "public" to version 0005 - concept class
docker-compose down
docker-compose up
{sql connection=connection}
create view vw_model as
select
visit_occurrence_id
,person_id
,1.0 - 1.0 / (1.0 + EXP((-2.95983732216539) + (readmit_030_flg * 0.477723271743372) + (readmit_360_flg * 0.531143494501182) + (icd_history_518 * 0.651130360976662))) as risk
from vw_baseline
@nathansutton
nathansutton / r_version
Last active September 15, 2021 23:56
translate an h2o model into sql
{r}
translate <- function(fit){
### return the sql translation of a h2o.glm model ###
# safety
stopifnot(class(fit) %in% c("H2OBinomialModel","H2ORegressionModel"))
stopifnot(.hasSlot(fit, "algorithm"))
stopifnot(.hasSlot(fit, "model"))
@nathansutton
nathansutton / python_version
Last active March 6, 2019 21:31
translate an h2o model in sql
{python}
def translate (fit) :
"""return the sql translation of a H2OGeneralizedLinearEstimator"""
# pandas dependency
try:
import pandas.DataFrame
except ImportError: