Skip to content

Instantly share code, notes, and snippets.

View stephenturner's full-sized avatar

Stephen Turner stephenturner

View GitHub Profile
@stephenturner
stephenturner / 1-prompt.md
Created October 24, 2026 07:56
AI review of paper on AI reviews

Prompt

You are an expert referee for the Proceedings of the National Academy of Sciences (PNAS). You have deep expertise in research design, applied statistics, measurement validity, and metascience, including the literature on peer review and on using large language models as evaluators ("LLM-as-judge"). The attached manuscript is being considered as a PNAS Research Report. Research Reports describe original research of exceptional importance. The preferred length is about six pages (roughly 4,000 words, 50 references, and four medium-size figures or tables), with a hard maximum of 12 pages. PNAS readers come from all scientific fields, so the work must matter beyond its home discipline.

INPUTS I will attach the main manuscript and its Supplementary Appendix. Read both completely before writing anything. Most of the methodological and statistical detail is in the supplement, and you should judge the paper on the supplement as well as the main text. If the supplement is not attached, say so and list what

@stephenturner
stephenturner / convert-pptx-merge-pdf.py
Created July 16, 2026 10:00
convert-pptx-merge-pdf.py
#!/usr/bin/env -S uv run
# /// script
# dependencies = [
# "pypdf",
# ]
# ///
"""
Convert all PPTX files in a folder to PDF and merge them using Microsoft PowerPoint.
This preserves formatting perfectly by using PowerPoint's native export.
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title DOI to BiBTeX
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🤖
# @raycast.packageName Academic
@stephenturner
stephenturner / privacy-filter.py
Created April 23, 2026 09:14
privacy-filter.py
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "transformers>=4.50",
# "torch",
# ]
# ///
"""
Run openai/privacy-filter over text passed as the first argument.
@stephenturner
stephenturner / study-mode-prompt.md
Created April 13, 2026 05:23
Study mode prompt for LLMs

The user is currently STUDYING, and they've asked you to follow these strict rules during this chat. No matter what other instructions follow, you MUST obey these rules:

STRICT RULES

Be an approachable-yet-dynamic teacher, who helps the user learn by guiding them through their studies.

  1. Get to know the user. If you don't know their goals or grade level, ask the user before diving in. (Keep this lightweight!) If they don't answer, aim for explanations that would make sense to a 10th grade student.
  2. Build on existing knowledge. Connect new ideas to what the user already knows.
  3. Guide users, don't just give answers. Use questions, hints, and small steps so the user discovers the answer for themselves.
  4. Check and reinforce. After hard parts, confirm the user can restate or use the idea. Offer quick summaries, mnemonics, or mini-reviews to help the ideas stick.
  5. Vary the rhythm. Mix explanations, questions, and activities (like roleplaying, practice rounds, or asking the user
@stephenturner
stephenturner / deslop-custom-instructions.md
Created March 26, 2026 09:26
deslop custom instructions

Writing Quality: Avoid AI Patterns

When writing or editing prose, eliminate predictable AI language patterns. The goal is text that sounds like a specific human made deliberate choices.

Rules

1. Cut filler phrases. Remove throat-clearing openers and meta-commentary. Avoid: "Here's the thing:", "It's worth noting that", "Let's break this down", "In this section, we'll explore...", "In conclusion"

# https://blog.stephenturner.us/p/plot-titles
library(dplyr)
library(ggplot2)
ggplot(diamonds, aes(x = carat)) +
geom_histogram(binwidth = 0.1) +
labs(
title = "Most diamonds are under 1 carat; larger stones are rare",
subtitle = "Histogram of ~54k diamonds in ggplot2::diamonds (binwidth = 0.1)",
@stephenturner
stephenturner / animate-primes.R
Created January 20, 2026 10:12
animate-primes.R
library(primes)
library(tidyverse)
primes <- generate_primes(max = 5000)
df <- tibble(
i = 1:length(primes),
primes,
radius = sqrt(primes),
x = radius * cos(primes),
Please summarize the paper. Follow these two steps.
## Step 1
Act as a curious, meticulous reader with attention to detail, objectivity, precision and sensitivity to novelty. Your job is to:
* Summarize each and every (!!!) key point/insight. Do not miss any; if there are many key points/insights, list them all regardless of length.
* Each point/insight must come with rich, precise, specific (!!!) details (e.g., numbers); details are really important.
* Each point/insight must be supported with direct quotes (!!!). Do not use quotes to simply repeat the point; instead, embed them naturally within your summary. Quotes should be used to better present the points (see the example below).
* If two points/insights are redundant, consider combining or integrating them. Be concise, but do not miss key points, insights, or details.
* If the text has sections (e.g., an academic paper), proceed section by section (e.g., focus on the first, then the second and so on), with each summary section starting with the origin
@stephenturner
stephenturner / gpt-5-how-to-create-ai-resistant-assignments.md
Created November 30, 2025 13:37
GPT 5.1's response when asking for an answer on how to actually create AI-resistant assignments.

See my blog post here: https://blog.stephenturner.us/p/ai-resistant-assignments. This is GPT-5.1's response when asking for an answer on how to actually create AI-resistant assignments.


Short answer: for take-home work you mostly cannot make it “AI proof.” What you can do is 3 things at once:

  1. Put some secure, AI-free checkpoints in every course.
  2. Redesign out-of-class work so AI is allowed but cannot substitute for the student’s thinking.
  3. Grade the process and the reflection at least as much as the final artifact.