Skip to content

Instantly share code, notes, and snippets.

View richdrummer33's full-sized avatar

richdrummer33

  • GoodbyeWorld Games
  • Ottawa
View GitHub Profile
@richdrummer33
richdrummer33 / openai-bing-search-assistant.py
Created November 30, 2023 17:41
OpenAI Assistant 🤖 with Bing Search 🔎
import os
import asyncio
import requests
import time
import json
import openai
from urllib.parse import quote_plus
from openai import OpenAI
from dotenv import load_dotenv
@richdrummer33
richdrummer33 / mistral-rag-document-summary-llama_cpp.py
Created November 11, 2023 22:21
RAG using LlamaIndex's DocumentSummaryIndexLLMRetriever and mistral-7b-instruct LLM
# WORKS!!!
import winsound
import torch
import time
#####################################################################
# MISC CLASSES
#####################################################################
# Example Nodes as a knowledge base
@richdrummer33
richdrummer33 / gist:2951dbead589c28e83ec1335fd920f3d
Created November 7, 2023 22:21
Multi-height light probe generator for Unity
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.Collections;
using UnityEngine.AI;
/// <summary>
/// Richard Beare modified original code from:
/// https://github.com/gampixi/auto-light-probes/blob/master/Assets/Editor/LightProbes/LightProbePlacement.cs
/// Uses navmesh to place light probes
@richdrummer33
richdrummer33 / SendPlayerLogs
Created August 11, 2023 23:44
A Unity script that automatically emails player logs when the game is exited (build and editor compatible)
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Net.Mail;
using System.IO;
using UnityEngine;
using Sirenix.OdinInspector;
using System.Linq;
using System.Collections;
@richdrummer33
richdrummer33 / toggl_timer_automater.py
Last active September 15, 2023 21:32
Auto-Toggl Toggle Timer Script: Automatically starts/stops the Toggl timer based on user inactivity or based on keywords in a messenger app.
import time
import datetime
import requests
import threading
import os
from pytz import timezone
# Created by Richard Beare, as a balm for his forgetfulness
# Toggl Automation
@richdrummer33
richdrummer33 / FixMissingGUIDReferences
Created June 15, 2023 17:48
A Unity-Editor script that fixes broken/missing GUID references GUID references in scenes (i.e. game object "missing prefab with guid")
using System;
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
/// <summary>
/// Finds all gameobjects in the scene that say "Missing Prefab with GUID" and allows you
/// to update their .meta files to have the GUID to match the one in the gameobject in the scene