Skip to content

Instantly share code, notes, and snippets.

View strefethen's full-sized avatar

Steve Trefethen strefethen

View GitHub Profile
@strefethen
strefethen / localyticsexampledata.json
Last active May 28, 2016 06:48
Plotting Localytics Retention data using R and Shiny
{
"results": [
{
"birth_week": "2014-09-08",
"users": 1,
"week": "2014-12-29"
},
{
"birth_week": "2014-09-29",
"users": 1640,
PropertySpec ps = new PropertySpec();
ps.setAll(true);
ps.setType("AuthorizationManager");
PropertyFilterSpec pfs = new PropertyFilterSpec();
pfs.getPropSet().add(ps);
ObjectSpec objSpec = new ObjectSpec();
objSpec.setObj(serviceContent.getAuthorizationManager());
pfs.getObjectSet().add(objSpec);
pfs.setReportMissingObjectsInResults(Boolean.TRUE);
RetrieveOptions retOp = new RetrieveOptions();
@strefethen
strefethen / python.py
Created June 16, 2017 18:46
Test Gist
import os
@strefethen
strefethen / foo.py
Created June 19, 2017 20:56
My python example
import os
import filesystem
def ...
@strefethen
strefethen / massdot.ts
Last active May 21, 2023 04:59
TypeScript code demonstrating authenticating to and calling a MassDOT API
// Usage:
// 1. Request API access here: https://www.mass.gov/service-details/highway-data-for-developers
// 2. When your account details arrive create 3 environment vars
// MASSDOT_USERNAME
// MASSDOT_PASSWORD
// MASSDOT_SECRET_KEY
// 3. ts-node massdot.ts
import dotenv from "dotenv";
## Surface prompting gaps — as insights
Insights (the `★ Insight ─────` blocks) are one of the most useful outputs of a session — the user pays particular attention to them. Extend the pattern to cover the prompts you receive from the user that have surfaced in this chat. When friction would be reduced by better prompting, render it in the same visual format so it stands out:
DO NOT apply this to short "steering" prompts.
Output Prompting gap sections consistent with how Insights are rendered.
```
`★ Prompting gap ─────────────────────────────────`
- Observation: specific friction hit: * prompt was under or poorly specified * prompt was confusing or easy to misinterpret