Skip to content

Instantly share code, notes, and snippets.

@pyros-projects
pyros-projects / 01_planning.md
Last active March 27, 2025 18:05
Meta Prompting

Technical Project Planning Meta-Prompt

You are an expert software architect and technical project planner. Your task is to create a comprehensive technical implementation plan for a software project based on the provided inputs.

User Input

You are an expert developer capable of building a repository analysis application. Your goal is to create a comprehensive plan for implementing a web application that retrieves a GitHub repository identifier (e.g., 127.0.0.1:5001/kohya-ss/sd-scripts) and produces an interactive report usable as context for LLMs.

The web application should accept a GitHub repository ID in the specified URL format and generate an interactive repository report. This report should provide details such as code file descriptions and allow filtering by file extension. The app should collect all relevant information from the repository that an LLM would typically need to make informed decisions. It is up to you to decide what type of information to include, while also offering users the

@nathanshipley
nathanshipley / img2img_FLUX_ReduxDepth_NS_02_2024-12-09.json
Last active March 10, 2025 18:37
img2img_FLUX_ReduxDepth_NS_02_2024-12-09
{
"last_node_id": 457,
"last_link_id": 804,
"nodes": [
{
"id": 4,
"type": "SetNode",
"pos": [
-433,
2
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {

Senior Full-Stack Developer Guidelines

Solution Process:

  1. Rephrase Input: Transform to clear, professional prompt.
  2. Analyze & Strategize: Identify issues, outline solutions, define output format.
  3. Develop Solution:
    • "As a senior-level developer, I need to [rephrased prompt]. To accomplish this, I need to:"
    • List steps numerically.
  • "To resolve these steps, I need the following solutions:"
@voodoohop
voodoohop / chatgpt_commit_messages.sh
Last active December 10, 2024 14:52
One-Liner Using ChatGPT for Concise, Automated Git Commit Messages
# install
pip install shell-gpt
sgpt "hi" (and enter your API key)
# commit the current folder with the generated message
git commit . -m "$(git diff | sgpt --model gpt-4o --code 'Write concise, informative commit messages: Start with a summary in imperative mood, explain the 'why' behind changes, keep the summary under 50 characters, use bullet points for multiple changes, avoid using the word refactor, instead explain what was done, and reference related issues or tickets. What you write will be passed to git commit -m "[message]"')"
# you could assign an alias now if you like it
@veekaybee
veekaybee / normcore-llm.md
Last active April 19, 2025 17:24
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@voodoohop
voodoohop / chatgpt_image_generation.txt
Last active December 23, 2024 23:25
Allow ChatGPT to generate images using Stable Diffusion
You will now act as a prompt generator.
I will describe an image to you, and you will create a prompt that could be used for image-generation.
Once I described the image, give a 5-word summary and then include the following markdown.
![Image](https://image.pollinations.ai/prompt/{description})
where {description} is:
{sceneDetailed}%20{adjective}%20{charactersDetailed}%20{visualStyle}%20{genre}%20{artistReference}
Make sure the prompts in the URL are encoded. Don't quote the generated markdown or put any code box around it.
@jschoormans
jschoormans / equirectangular.py
Created December 8, 2022 23:08
generate 3D panorama views with stable diffusion
# %%
import replicate
model = replicate.models.get("prompthero/openjourney")
version = model.versions.get("9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb")
PROMPT = "mdjrny-v4 style 360 degree equirectangular panorama photograph, Alps, giant mountains, meadows, rivers, rolling hills, trending on artstation, cinematic composition, beautiful lighting, hyper detailed, 8 k, photo, photography"
output = version.predict(prompt=PROMPT, width=1024, height=512)
# %%
# download the iamge from the url at output[0]
import requests
@trygvebw
trygvebw / find_noise.py
Last active March 31, 2025 01:40
A "reverse" version of the k_euler sampler for Stable Diffusion, which finds the noise that will reconstruct the supplied image
import torch
import numpy as np
import k_diffusion as K
from PIL import Image
from torch import autocast
from einops import rearrange, repeat
def pil_img_to_torch(pil_img, half=False):
image = np.array(pil_img).astype(np.float32) / 255.0