Skip to content

Instantly share code, notes, and snippets.

View CGamesPlay's full-sized avatar
:bowtie:

Ryan Patterson CGamesPlay

:bowtie:
View GitHub Profile
@CGamesPlay
CGamesPlay / ARCHITECTURE.md
Created April 4, 2024 10:31
Plandex LLM Usage

Based on analyzing the code, here is a high-level overview of the main prompts used in this project and how they fit into the overall flow:

The core prompts are defined in the model/prompts package:

  1. SysCreate (create.go) - This is the main system prompt that defines the AI's identity as Plandex, an AI programming assistant. It provides detailed instructions on how to collaboratively create a 'plan' with the user to complete a programming task. The prompt covers things like assessing if there is a clear task, breaking down large tasks into subtasks, generating code blocks, using open source libraries, and ending responses.

  2. ListReplacementsFn (build.go) - Used when building code files from a plan. It analyzes proposed code updates and produces a structured list of changes to make.

  3. SysDescribe (describe.go) - Used to generate a commit message summarizing the changes made in a plan.

@CGamesPlay
CGamesPlay / AHRS.ipynb
Last active February 6, 2024 23:34
AHRS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CGamesPlay
CGamesPlay / user-script.js
Created October 4, 2023 22:58
Convert em media queries to px
// ==UserScript==
// @name px-media-queries
// @description Convert all media queries to use px instead of em.
// @match *://*/*
// @exclude https://github.com/*
// @exclude https://developer.mozilla.org/*
// @exclude http://localhost:*/*
// ==/UserScript==
// Breaks Dark mode on Github for some reason.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { Methods, Context } from "./.hathora/methods";
import { Response } from "../api/base";
import {
UserId,
PlayerState,
IJoinGameRequest,
IChooseGestureRequest,
INextRoundRequest,
Gesture,
} from "../api/types";
import { z, UserId, Response, Engine } from "./util";
const Gesture = z.enum(["ROCK", "PAPER", "SCISSORS"]);
type Gesture = z.infer<typeof Gesture>;
const PlayerInfo = z.object({
id: UserId,
score: z.number(),
gesture: Gesture.nullable(),
});
const PlayerState = z.object({
@CGamesPlay
CGamesPlay / main.go
Created May 20, 2021 23:40
Capnp-go web sockets server
package main
import (
"fmt"
"io"
"net/http"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/spf13/afero"
import { Conn, Transport, Message, RPCMessage, Client } from "capnp-ts";
class AsyncQueue<T> {
waitingData: T[] = [];
waitingReaders: ((m: T) => void)[] = [];
push(val: T) {
if (this.waitingReaders.length > 0) {
this.waitingReaders.shift()!(val);
} else {
package search
import (
"math"
"time"
"github.com/blevesearch/bleve/index"
"github.com/blevesearch/bleve/mapping"
"github.com/blevesearch/bleve/numeric"
"github.com/blevesearch/bleve/search"
import React, { Component } from "react";
import nouislider from "nouislider";
import "nouislider/distribute/nouislider.min.css";
import "./Slider.css";
class Slider extends Component {
constructor(props) {
super(props);
this.root = React.createRef();