Skip to content

Instantly share code, notes, and snippets.

View xyberviri's full-sized avatar

James Velasquez xyberviri

View GitHub Profile
@xyberviri
xyberviri / SpicyChat.AI_ChatGPTAssist
Created October 6, 2023 02:55
SpicyChat.AI_ChatGPTAssist
I'm creating a chat bot that uses chatgpt as the back end, and I need to troubleshoot why the behavior is not as expected.
There are two variables passed back to chatgpt which are {{user}} and {{char}}.
{{user}} represents me, the human user who will interact with the bot.
{{char}} represents the bot itself, and the bot is named "BOTNAMEHERE."
The following text is the personality sent to chatgpt. Please try to understand how the bot should function, explain that to me, and then await future instructions.
Here is the text:
PERSONALITYTEMPLATEHERE
@xyberviri
xyberviri / SpicyChatAI_Template.txt
Created October 4, 2023 12:24
Markdown template for spicy chat bots.
DESCRIPTION
`Name`
```
NAME
```
`Title`
```
TITLE
```
@xyberviri
xyberviri / node.js portable
Last active April 30, 2024 17:50
node.js portable
For windows download the latest `node-X.X.X-win-x64.7z` from the nodejs site https://nodejs.org/dist/latest/
go to the folder and run `nodevars.bat`
next run `npm install npm@latest`
and your done...
you now have a updated nodejs until you logout, then you just go back and run `nodevars.bat` the next time you need it.
--Cumulative Distribution Function
--Author: Xyberviri#5609
--License: GNU GPL v3
--Legal: https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)
local function GetRandomLoot(loottable)
local totalweights = 0 --Precompute this value for optimization
for Pick, Chance in pairs(loottable) do
totalweights = totalweights + Chance
end
/*
CC BY-SA 2.0 James Ray Velasquez Xyberviri/Dabnician
CSDPicker<String> chanceBucket = new CSDPicker<String>();
chanceBucket.AddChance("Epic", 0.005);
chanceBucket.AddChance("Legendary", 0.02);
chanceBucket.AddChance("Rare", 0.125);
chanceBucket.AddChance("UnCommon", 0.25);
chanceBucket.AddChance("Common", 0.6);
@xyberviri
xyberviri / OpenSimplexNoise.cs
Created July 5, 2020 23:09 — forked from digitalshadow/OpenSimplexNoise.cs
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@xyberviri
xyberviri / FlyCamera.cs
Created February 22, 2019 21:05 — forked from gunderson/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@xyberviri
xyberviri / FlyCamera.cs
Created February 22, 2019 21:04 — forked from Mahelita/FlyCamera.cs
New Script FlyCamera add to any camera obj: instant unity editor style wasd rightclick debug cam
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour
{
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Extended by Mahelita 08-01-18.