Skip to content

Instantly share code, notes, and snippets.

View klazuka's full-sized avatar

Keith Lazuka klazuka

  • Microsoft
  • Cleveland
View GitHub Profile
@klazuka
klazuka / cua_request_store_false.json
Created April 1, 2025 21:39
store=false small example
{
"model": "computer-use-preview",
"input": [
{
"type": "message",
"role": "user",
"content": [{ "type": "input_text", "text": "top espn stories?" }]
},
{
"type": "computer_call",
@klazuka
klazuka / README.md
Last active April 11, 2025 15:45
Responses API CUA store=false example input

Steps to repro the bug:

export OPENAI_API_KEY=REPLACE_ME_WITH_SUITABLE_API_KEY
curl https://gist.githubusercontent.com/klazuka/fa1cbdf05295c3c449ee623cd3006bd3/raw/0b5fe2b78e16759f435f9b15c896eab2fa89cc58/request.json -o request.json
curl https://api.openai.com/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d @request.json

Then look at the output.

@klazuka
klazuka / operator-vampire-survivors-prompt.txt
Created January 28, 2025 20:13
Operator prompt to build a Vampire Survivors evolution lookup tool on jsbin
go to https://vampire-survivors.fandom.com/wiki/Evolution
and read about the evolution recipes in the game
then open jsbin.com in another tab
Write HTML in the left-side pane to make an interactive HTML tool to lookup Vampire Survivor evolutions for a given base weapon. Once the user picks a base weapon, show the passive item it requires and what item it turns into. Use the data from the wiki.
use the right-side frame to verify that the HTML program works correctly.
If it doesn't work, go back to the html and make the appropriate edits by completely replacing the old contents with the new HTML. Repeat until the HTML app you made works well.
@klazuka
klazuka / operator-prompt-recipes-app.txt
Created January 27, 2025 14:11
Prompt for ChatGPT Operator to create a new Python web app in Github
Create a new Github repository called recipes-html. In the new repository, write a Python web app using FastApi. Use github's built-in text editor to write code and commit it to the repository. The web app should be configured such that every api route handler takes www form data as the input, extracting the form based on the handler function's parameters. And the handler's return a string with content type "text/html". (by default FastApi uses JSON for both requests and responses but we are making an old school web app).
Use jinja2 to template the html. And the base HTML template should import htmx. Import htmx like this: <script src="https://unpkg.com/[email protected]" integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script>
The application should provide basic CRUD operations for a recipe management website. And the HTML should use htmx so that it can send data to the server and update parts of the DOM without doing a full-page reload.
@klazuka
klazuka / classifier.ipynb
Created January 25, 2025 13:27
ChatGpt Operator wrote this classifier in Jupyter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@klazuka
klazuka / notes.txt
Created March 1, 2019 00:17
Notes on the IntelliJ action system
WARNING: these are raw notes. I do not work for JetBrains. This is just meant to give a rough overview.
DataManager
- convert a Swing component into a DataContext (which can then be queried)
- handles the tree walk to find the focused Swing component
- you can call `registerDataProvider()` to register yourself as a data provider for the action system
DataContext

Keybase proof

I hereby claim:

  • I am klazuka on github.
  • I am klazuka (https://keybase.io/klazuka) on keybase.
  • I have a public key ASAIkME8bJygt-8l2YV-ONJPpL3Qx8cSwBHZhxipKX1bPQo

To claim this, I am signing this object:

@klazuka
klazuka / install-gpu-azure.sh
Last active January 11, 2018 17:57
Setup an Azure VM with GPU hardware based on Fast.AI configuration
# based on https://raw.githubusercontent.com/fastai/courses/master/setup/install-gpu-azure.sh
# modified January 2018 to fix various issues found in the original install script
# assumes that you installed your Azure VM using the Deep Learning Virtual Machine template
# TODO why did the original script install Anaconda? Maybe the Azure VM didn't used to come with it?
sudo apt-get update && sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install tmux build-essential gcc g++ make binutils
sudo apt-get --assume-yes install software-properties-common
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
@klazuka
klazuka / Client.elm
Created May 4, 2017 19:10 — forked from eriklott/Client.elm
Elm Backend Client
module YourAPIClient exposing (Config, otherFunctions)
import Http
import Json.Decode as Decode
import Json.Encode as Encode
-- Config
@klazuka
klazuka / keybase.md
Created December 7, 2016 21:02
keybase.md

Keybase proof

I hereby claim:

  • I am klazuka on github.
  • I am klazuka (https://keybase.io/klazuka) on keybase.
  • I have a public key whose fingerprint is A333 39C2 3C11 4D44 0160 AA2F 845C 70A7 DD1F A59C

To claim this, I am signing this object: