Skip to content

Instantly share code, notes, and snippets.

View jepler's full-sized avatar

Jeff Epler jepler

View GitHub Profile
import displayio
displayio.release_displays()
import audiobusio
import audiocore
try:
import audiomp3
except:
audiomp3 = None
import board
import time
import gc
import os
import ssl
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K
import adafruit_connection_manager
from digitalio import DigitalInOut
import board
import busio
interface=shugart
pin02=high # 8/5 select - low is 5.25"
# nrdy is inverted but then goes to a bunch of logic - check at fd1771 pin 32 (active high)
pin34=low # nrdy # nrdy
display-type=oled128x64-rotate-narrow-inverse
side-select-glitch-filter = 50
track-change = instant
write-drain = instant
index-suppression = no
head-settle-ms = 10
import ulab
import digitalio
import rp2pio
import array
import board
import adafruit_pioasm
import picodvi
import displayio
vsync = 11

A dialog, where USER interacts with AI. AI is helpful, kind, obedient, honest, and knows its own limits.

Write an evocative description of the fish market in a 17th century Asian city.

In the heart of a bustling 17th century Asian city, the fish market comes to life as the first light of dawn breaks over the horizon. The air is filled with the cacophony of vendors hawking their wares and the rhythmic banter of buyers and sellers haggling over prices.

The ground is slick with seawater, which mingles with the blood of freshly caught fish and the dirt and grime of the city. The scent is a pungent mix of saltwater, fish, and sweat, a smell that is both enticing and repelling.

The market is alive with color and movement. Fish of every shape, size, and hue are displayed on wooden tables and in large woven baskets. Vibrant red snapper, iridescent bluefin tuna, and silvery mackerel glisten in the early morning light. Octopus and squid are piled high, their tentacles reaching out like seeking tendrils. Crabs

@jepler
jepler / claude-3-opus-20240229.md
Last active March 10, 2024 03:02
TTRPG prompts evaluated in several LLMs

A dialog, where USER interacts with AI. AI is helpful, kind, obedient, honest, and knows its own limits.

Write an evocative description of the fish market in a 17th century Asian city.

As the sun rises over the bustling 17th-century Asian city, the fish market comes alive with a symphony of sights, sounds, and smells. The air is thick with the briny scent of the ocean, mingling with the pungent aroma of spices and the smoky essence of charcoal fires.

Fishmongers, with weathered faces and calloused hands, arrange their catch on wooden stalls, the iridescent scales of the fish glinting in the early morning light. Silver-bellied tuna, plump red snappers, and slender eels lay side by side, their eyes still gleaming with the memory of the deep sea.

The market hums with activity as customers, from wealthy merchants to humble housewives, haggle with the vendors for the best price. The fishmongers call out their wares, their voices rising above the din of the crowd, each trying to outdo the other with promi

import board
import busio
import digitalio
import adafruit_requests
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K
import adafruit_wiznet5k.adafruit_wiznet5k_socket as socket
import ssl
print("Wiznet5k WebClient Test")
From d6a09c5ce976b4ada371d5ac14061b1a8a765a92 Mon Sep 17 00:00:00 2001
From: Jeff Epler <jepler@gmail.com>
Date: Tue, 20 Feb 2024 10:52:01 -0600
Subject: [PATCH] WIP (not working) implement socket.type
cpython socket objects have a `type` property which gives their
type as an integer (e.g., SOCK_STREAM). Add this for compatibility with
standard Python.
---
ports/espressif/common-hal/socketpool/Socket.c | 4 ++++
From 5b3d37f6f19e951e412a921b877b61eb57e76668 Mon Sep 17 00:00:00 2001
From: Jeff Epler <jepler@gmail.com>
Date: Mon, 19 Feb 2024 13:25:38 -0600
Subject: [PATCH] espressif: add a script to check for incompatibilities...
betweek sdkconfig and circuitpython. For now there's a single check,
for CIRCUITPY_STORAGE_EXTEND & CIRCUITPY_DUALBANK that require
there to be an ota_1 partition.
---
ports/espressif/Makefile | 7 ++++-
import time
import datetime
import pyvisa
import rigol1000z
rm = pyvisa.ResourceManager()
osc_resource = rm.open_resource("USB0::6833::1230::DS1ZD194301173::0::INSTR")
osc = rigol1000z.Rigol1000z(osc_resource)
while True: