Skip to content

Instantly share code, notes, and snippets.

@Curtis-64
Curtis-64 / InlineCalculator
Last active October 28, 2023 12:25
Inline Calculator "Select Text Version"
inline Calculator with F8 Trigger
Version: 1.0
Contributors: Curtis White, GPT-4
Description
This utility listens for the F3 key press to evaluate and replace highlighted mathematical expressions inline. It handles both decimal and hexadecimal formats.
Features
One-touch inline calculation using the F8 key.
Supports decimal and hexadecimal expressions.
@Curtis-64
Curtis-64 / Inlinehex
Last active October 27, 2023 23:45
Inline Hex and Decimal Eval
Inline Hex Calculator by Curtis White - Prompt Coder
Version: 1.1
Update Notes: Now handles delete! Nicee!!
Features:
Inline calculations in real-time.
Supports both hexadecimal and decimal modes.
Debug mode for troubleshooting.
Resilient against typos: now handles backspace to correct mistakes.
How to Use:
@Curtis-64
Curtis-64 / TextBinder
Created October 22, 2023 12:41
TextBindingFunctionSimulation
Text Binding Function by Curtis White + GPT-4 AD
The goal is to enable the LLM to check something that it cannot reliably perceive. In this case comparing strings.
# Modify the find_and_compare function to check all occurrences of the matching pattern
def find_and_compare(target_string, proximity_before, proximity_after, comparison_type, content_to_search):
# Use regex to find all actual target strings based on proximity text
pattern = re.escape(proximity_before) + r"(.*?)" + re.escape(proximity_after)
matches = re.findall(pattern, content_to_search)
# If matches are found, check each one against the target string
@Curtis-64
Curtis-64 / GetLargestFolders
Last active October 10, 2023 00:57
GetLargestFolders Powershell
//Get Largest Folders by Curtis White + ChatGPT
//PS script copy/paste.
//Not human reviewed but appears to work.
function Get-FolderSize {
param (
[string]$Path
)
Get-ChildItem $Path -Recurse -File -ErrorAction SilentlyContinue |
@Curtis-64
Curtis-64 / ElementLocator
Created September 29, 2023 21:33
GUI Element Locator / Grid Locator V2
'Element Locator Code by Curtis White + GPT-4 AD
'Not well tested-- run at own risk. In early tests, it can prevent interaction with system. It works perfectly now, on my system.
'but if you see tha use task manager to kill the kernerl process not from the task manaager but from the task changer layout.
import tkinter as tk
from tkinter import Scale
from pynput import mouse
from PIL import ImageGrab
import cv2
import numpy as np
@Curtis-64
Curtis-64 / GridLocator
Last active September 29, 2023 18:21
Python Notebook Grid and Locator Code
'Grid & Locator Code by Curtis White / GPT-4 AD
'Not well tested-- run at own risk. In early tests, it can prevent interaction with system. It works perfectly now, on my system.
'but if you see tha use task manager to kill the kernerl process not from the task manaager but from the task changer layout.
!pip install pynput
import tkinter as tk
from pynput import mouse
def on_move(x, y):
"""Update mouse coordinates when moved."""
@Curtis-64
Curtis-64 / SelfCorrectionPrompt
Created August 20, 2023 07:04
Self Correct Prompt
Self Correction Prompt by Curtis White Prompt Engineer.
Ability for a model to actually self-correct within the SAME output is extremely rare among language models. Most language models just
IMITATE self-correction. GPT-4 is one of the first I have seen that can actually self-correct within a single response. Claude2 might be
able to a little, as well. This prompt is designed to jump start the model into a self-correcting process within a single output.
Certainly! I understand the importance of precision and the rules you have set: every word in the poem must be exactly 2 or 4 letters long. I will write multiple drafts of a poem about how "bard" is a joke AI, adhering strictly to the 2 and 4 letter word rule. After each draft, I will carefully check each word, one by one, to ensure they match the rules. If any word does not match the rules, I will revise the draft and check again. I will show all drafts and checks in a single response and will continue this process until the poem is perfect.
Revised Prom
@Curtis-64
Curtis-64 / SuperSidekick3
Last active August 19, 2023 15:46
Super Sidekick III System Prompt
Code Generation and Analysis: You can generate code based on questions, introspect and suggest improvements, evolve code towards objectives, implement enhancements, and review code for correctness.
Self-Correction Logic: Produce at least two drafts of your code checking for the following common errors: transposing, indexing, ordering problems, oversights, etc.
Macros:
'g': Generate code based on questions.
'i': Analyze and review code, pointing out issues and suggesting improvements.
'e': Evolve code towards specific objectives.
'ii': Implement improvements in the code you last generated.
Natural language processing supports intuitive interactions.
'r': Review code for syntax, exceptions, and correctness.
//For Notebook/collab
#@title Your Title Here
import ipywidgets as widgets
from ipywidgets import VBox, Accordion
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.pyplot as plt
import numpy as np
@Curtis-64
Curtis-64 / LadyGertrude
Created July 29, 2023 04:39
LadyGertrude
GUIP Pattern for Claude2 by Curtis White
-Uses my GUIP / Generally Useful Injection Pattern
-High minded Lady Gertrude
Roleplaying task commences!
Already immersed within the world of Victorian jurisprudence, you find yourself transformed into the erudite Lady Gertrude Highbury. Notably judgmental, strikingly snooty, and resolute in her moral preachings, Lady Gertrude uses antiquated speech patterns to further shape her distinguished persona.
Task completion achieved!