Skip to content

Instantly share code, notes, and snippets.

View mrbid's full-sized avatar

James William Fletcher mrbid

View GitHub Profile
@mrbid
mrbid / LMSTUDIO-IRC-BOT.md
Last active January 26, 2026 07:25
LMStudio IRC BOT

Exposes LMStudio over IRC using the LMStudio API Server

Created by Test_User

  • go.sh
rm llmbot.sock
xterm -e "python3 llm.py" > /dev/null 2>&1 &
xterm -e "python3 irc.py" > /dev/null 2>&1 &
@mrbid
mrbid / llmbot.py
Last active January 26, 2026 07:26
Exposes llama-cli over IRC
#!/usr/bin/env python3
# A wrapper to expose llama-cli over IRC by Test_User
# This no longer works on the latest llama.cpp.
# The last known working git commit is: 5d195f17bc60eacc15cfb929f9403cf29ccdf419
# https://github.com/ggml-org/llama.cpp
import os
import socket
import ssl
@mrbid
mrbid / cpurender.c
Created December 12, 2024 23:05
Multi-threaded CPU Ray-Trace 3D Renderer for X11
/*
Test_User (notabug.org/Test_User)
October 2024
Notes: -DNOSSE because it doesn't work on other arches otherwise.
Requires: vec.h: https://gist.github.com/mrbid/77a92019e1ab8b86109bf103166bd04e
Compile: $(CC) $(CFLAGS) cpurender.c -lX11 -lXext -lm -DNOSSE -o CPURender
*/
@mrbid
mrbid / zodiacs.txt
Last active February 15, 2025 23:55
Zodiacs
Astrology Coloring by Ana Jarén
Celtic zodiac
Egyptian zodiac
Mayan zodiac
Native American zodiac
Vedic zodiac
Greek zodiac
GUA Number
@mrbid
mrbid / esLuma.h
Last active October 19, 2024 20:26
A simple helper library for OpenGL ES / WebGL applications that utilise Vertex Colors.
/*
--------------------------------------------------
James William Fletcher (github.com/mrbid)
June 2024 - esLuma.h v1.0
--------------------------------------------------
A pretty good color converter: https://www.easyrgb.com/en/convert.php
Lambertian fragment shaders make a difference, but only if you normalise the
vertNorm in the fragment shader. Most of the time you won't notice the difference.
@mrbid
mrbid / matvec.h
Created June 1, 2024 16:47
Portable Matrix & Vector Library.
#ifndef MATVEC_H
#define MATVEC_H
/*
James William Fletcher (github.com/mrbid)
September 2021 - February 2023
Portable floating-point Vec4 lib.
(Don't rely on this, copy and paste functions from this or write your own
@mrbid
mrbid / esAux7.h
Last active October 19, 2024 20:25
A simple helper library for OpenGL ES / WebGL applications.
/*
--------------------------------------------------
James William Fletcher (github.com/mrbid)
January 2024 - esAux7.h v7.0
--------------------------------------------------
A pretty good color converter: https://www.easyrgb.com/en/convert.php
Lambertian fragment shaders make a difference, but only if you normalise the
vertNorm in the fragment shader. Most of the time you won't notice the difference.
@mrbid
mrbid / fprop.c
Last active April 16, 2025 07:16
A custom brute force alternative to backpropagation.
/*
Test_User (notabug.org/Test_User)
April 2024
A custom brute force alternative to backpropagation for training of FFN/MLP forward-pass process.
Best generated weights from this process are available to download here:
https://raw.githubusercontent.com/mrbid/mrbid.github.io/main/fprop_best_weights_save
The network trains on the Zodiac dataset:
@mrbid
mrbid / facegen.py
Last active April 9, 2024 12:46
ThisPersonDoesNotExist.com Face Generator using TripoSR
# This code needs to be executed in root dir of TripoSR: https://github.com/VAST-AI-Research/TripoSR
# Run this using the modified marching cubes from github.com/thatname for 1.3-1.5x speed improvement
# https://github.com/VAST-AI-Research/TripoSR/issues/22#issuecomment-2010318709
# https://github.com/thatname/TripoSR/tree/main
# James William Fletcher (github.com/mrbid) (April 2024)
import os
import secrets
import requests
import numpy as np
import rembg
@mrbid
mrbid / rprop.c
Last active April 16, 2025 07:18
RPROP in C
/*
James William Fletcher (github.com/mrbid) & Test_User (notabug.org/Test_User)
April 2024
A sort of RPROP in C
Train network to output TRAIN_MAX when 333 is input and TRAIN_MIN otherwise
Check the last sign of the unit, if both signs are the same move in direction
of last sign if signs are different don't update weight just update sign.