This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /* | |
// author: https://github.com/g023 | |
// license: BSD 3-Clause (https://opensource.org/license/BSD-3-clause) | |
An example to compress and decompress some text based on a given dictionary. | |
Makes a simpler array from the dictionary created from findTwoCharCombinations(text) and findThreeCharCombinations(text) | |
That should make compression even better. | |
TODO: compress the dictionary using the dictionary. | |
*/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node2D | |
# author: https://github.com/g023 | |
# Called when the node enters the scene tree for the first time. | |
func _ready(): | |
#var romfile = "thalos.are" | |
var romfile = "sewer.are" | |
var romcontents = get_contents(romfile) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN :: Multidimensional array with 2 keys and a value | |
# Multidimensional array with 2 keys and a value | |
# Godot version of my plist class that was made for my C++ mud | |
# encrypted file saving and loading | |
class TwoKeyArray: | |
var data = {} | |
# Initialize the array with default values | |
func _init(): | |
data = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func one_arg(command_str): | |
# strips out a single word before a space | |
# returns [0] -> command, [1] -> param | |
var split_str = [] | |
command_str = command_str.strip_edges() | |
command_str = self.processBackspace(command_str) | |
var command = "" | |
var params = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func processBackspace(input_string): | |
var result = "" | |
var stack := [] | |
if input_string.find("\b") == -1: | |
return input_string | |
for char in input_string: | |
if char == "\b": | |
if stack.size() > 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Box Jump - Simple 2d Platformer Barebones</title> | |
<style> | |
#gameCanvas { | |
background-color: #ccc; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
jQuery Infinite Horizontal Scroll | |
license: 3-clause BSD license (http://opensource.org/licenses/BSD-3-Clause) | |
author: https://github.com/g023 (gists: https://gist.github.com/g023 ) | |
version: 0.0.1a | |
notes: some parts configured in the CSS (speed, width, height ) and some parts in the JS (image URLs) | |
--> | |
<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# class: GPTClient Python Class for LM Studio API (Runs local LLM LLAMA style quantized models) | |
# author: https://github.com/g023 | |
# License: 3-clause BSD License - https://opensource.org/license/BSD-3-clause/ | |
# Note: Example usage attached at bottom of file | |
# Description: This class is a wrapper for the LM Studio API. It is designed to be used with the LLAMA style quantized models. | |
# Tags: API, LM Studio, LLAMA, LLAMA style quantized models, LLAMA style quantized model, LLM, LM, NLP, NLG, Chatbot, Chatbots, Conversational AI, Conversational Artificial Intelligence, Conversational AI Chatbot, Conversational Artificial Intelligence Chatbot, Conversational AI Chatbots, Conversational Artificial Intelligence Chatbots, Conversational AI Chatbots, Conversational Artificial Intelligence Chatbots, Conversational AI Chatbot, Conversational Artificial Intelligence Chatbot, Conversational AI Chatbot, Conversational Artificial Intelligence Chatbot | |
import requests | |
import json |