Skip to content

Instantly share code, notes, and snippets.

View garyblankenship's full-sized avatar
🎩
I may be slow to respond.

Gary Blankenship garyblankenship

🎩
I may be slow to respond.
View GitHub Profile
@garyblankenship
garyblankenship / LaravelZeroTinkerwellDriver.php
Created October 28, 2024 20:38 — forked from owenvoke/LaravelZeroTinkerwellDriver.php
A Tinkerwell driver for Laravel Zero.
<?php
use LaravelZero\Framework\Application;
use Tinkerwell\ContextMenu\Label;
use Tinkerwell\ContextMenu\Submenu;
use Tinkerwell\ContextMenu\SetCode;
use Tinkerwell\ContextMenu\OpenURL;
class LaravelZeroTinkerwellDriver extends TinkerwellDriver
{

Step #1: Install Laravel

Install the latest Laravel version i.e. Laravel 5.8. To do so go to the project directory and run the command:

composer create-project --prefer-dist laravel/laravel

Step #2: Create Package Directory

create folder from laravel root directory with this structure:

@garyblankenship
garyblankenship / aider.sh
Created October 6, 2024 01:39
Aider shell script for convenience
#!/bin/bash
# Pull the latest version of the image (optional, uncomment if needed)
# docker pull paulgauthier/aider-full
# Run the Docker container
docker run -it --rm --user $(id -u):$(id -g) --volume "$(pwd):/app" paulgauthier/aider-full "$@"
# Remove all stopped containers to free up resources
docker container prune -f
Name Purpose Author (Publication Date) Category
Andy - an artificial human A slang term for "android" - an artificially created humanoid being. Philip K. Dick (1968) ai
Autobutle An automated servant. Frank Herbert (1972) ai
Automaton Chessplayer - the first chess-playing computer The first chess-playing computer. Ambrose Bierce (1910) ai
Automonk A robot with an AI trained on an individual monk. Ray Naylor (2022) ai
Ava - she wants to be taught A piece of learning software. Amitav Ghosh (1995) ai
Bard A machine that invents randomized stories and can read them out loud or animate them for viewing. Isaac Asimov (1956) ai
Bendix Anxiety Reducer Machine-based psychotherapy. Robert Sheckley (1956) ai
Big Computer - wide-screen Jehovah Just like it says; this computer knows it all. John Varley (1983) ai
Big Noodle A vast artificial intelligence system used to process all of Earth's information. Philip K. Dick (1981) ai

How to make an LLM clone of yourself

Wanna create and play with an AI clone of yourself or someone else (my lawyer says please don't) like this one? You're in luck because it's super easy!

Step one: get you some datas

This step really varies depending on your data sources, but the end goal is to turn some of real-you's conversations (from your platforms of choice) into a ShareGPT format dataset with you as the gpt. Here's what your (json) file should end up looking like:

{"conversations": [{"from": "human", "value": "Hi"}, {"from": "gpt", "value": "Hello"}]} 
{"conversations": [{"from": "human", "value": "What's up "}, {"from": "gpt", "value": "not much, you?"}, {"from": "human", "value": "Just thinking, what if you're a robot and I don't realize it?"}, {"from": "gpt", "value": "hahaha don't be crazy"}]}
...

NOTE: Make sure every line starts with a message from the other person ("human")

@garyblankenship
garyblankenship / Deployer.md
Created July 18, 2024 13:21
Deployer.php - simple deployer with check, push and pull

Deployer.php

Meet Deployer: Your Effortless Sync Solution

Imagine having a personal assistant that seamlessly syncs your local files with remote servers. That's Deployer, making your development workflow easier and more efficient.

Configuration File: deployer.yaml

local_root: /Users/vampire/www/project1
@garyblankenship
garyblankenship / LoraConfig.json
Created June 12, 2024 12:44 — forked from vizsumit/LoraConfig.json
settings for Kohya_ss LoRA Training
{
"LoRA_type": "Standard",
"adaptive_noise_scale": 0,
"additional_parameters": "",
"block_alphas": "",
"block_dims": "",
"block_lr_zero_threshold": "",
"bucket_no_upscale": true,
"bucket_reso_steps": 64,
"cache_latents": true,
@garyblankenship
garyblankenship / helpers.md
Created June 4, 2024 23:54
helpers.php readme file

PHP Helper Functions

This repository contains a collection of helpful PHP functions designed to be highly reusable and flexible, especially for Laravel developers who need to work with non-Laravel, plain PHP code.

Table of Contents

@garyblankenship
garyblankenship / helpers.php
Last active June 4, 2024 23:53
helpers.php inspired by laravel for non-laravel php
<?php
if (!function_exists('request')) {
/**
* Get the value of a request variable from $_REQUEST.
*
* @param mixed $key
* @param mixed $default
*
* @return mixed
@garyblankenship
garyblankenship / runner.sh
Created May 6, 2024 03:12
Ollama LLM Models Testing from a prompts.txt file and a list of models
#!/bin/bash
# Set default prompt or use the provided command line argument
PROMPT="${1:-You are an extremely helpful assistant going above and beyond to provide the highest quality response.}"
# Inform if default prompt is used
[ "$#" -eq 0 ] && echo "Prompt not provided, using default: $PROMPT"
# Check for the prompts file, one prompt per line
if [ ! -f "prompts.txt" ]; then