Skip to content

Instantly share code, notes, and snippets.

View simonw's full-sized avatar

Simon Willison simonw

View GitHub Profile

Explaining mathematical expressions with GPT-3

I wanted to see if GPT-3 could explain a mathematical expression for me, as a follow-on from Using GPT-3 to explain how code works. I grabbed an example from this page of the GitHub documentation.

Here's my conversation with GPT-3 as plain text - except I added > to the lines that I entered to differentiate them from the GPT-3 output:

> Explain this:
>
> $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
@simonw
simonw / Breakfast-Tacos.md
Last active June 23, 2022 14:32
Breakfast tacos with avocado sauce and veggie sausages

Breakfast tacos with avocado sauce and veggie sausages

Ingredients (serves 2)

  • 4 corn tortillas (small-ish size)

For the sausages and eggs:

  • 2 vegetarian sausages - I like field roast spicy Mexican chipotle, Natalie prefers field smoked apple and sage - or LOVEs the field roast apple and maple little sausages, where we use 4 instead of 2
  • 4 eggs
#!/usr/local/bin/perl
##############################################################################
# Counter Version 1.1.1 #
# Copyright 1996 Matt Wright mattw@scriptarchive.com #
# Created 10/27/95 Last Modified 4/25/96 #
# Scripts Archive at: http://www.scriptarchive.com/ #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1996 Matthew M. Wright All Rights Reserved. #
# #

Datasette tutorial written by GPT3

Prompt: a step by step tutorial for getting started with Datasette

This is a guide for getting started with Datasette. Datasette is a tool for creating and publishing data-driven websites. It is designed to make it easy to publish structured data, such as the results of a database query, in a way that is highly visible and interactive.

Datasette can be used to create websites that allow users to explore and visualize data, or to build applications that expose data via APIs. It can also be used as a static site generator, creating a completely static HTML website that can be deployed anywhere.

This guide will cover the basics of how to install and use Datasette. It will also show you how to create a simple data-driven website using Datasette.

@simonw
simonw / enron-to-sqlite.ipynb
Created May 31, 2022 14:29
Jupyter notebook creating a SQLite database from the Enron mbox file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simonw
simonw / README.md
Created May 3, 2022 18:11
Simple declarative schema migration for SQLite
from datasette import hookimpl
from datasette.utils.asgi import Response
import os
REDACT = {"GPG_KEY"}
async def env(request):
output = []
for key, value in os.environ.items():
[
{
"name": "datasette-leaflet",
"static": true,
"templates": false,
"version": "0.2.2",
"hooks": [
"extra_body_script",
"extra_template_vars"
]