repo
stringclasses
341 values
file_path
stringlengths
29
173
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.66M
tokens
int64
2
598k
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Any.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) -- Varables local read = {} :: {[number]: (cursor: Cursor.Cursor) -> any} local write = {} :: {[string]: (cursor: Cursor.Cursor, value:any) -> ()} -- Nil read[0] = function(cursor: any) return nil end write["nil"] = fun...
2,520
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Binary.luau
luau
.luau
--!strict --!optimize 2 --!native -- Binary data type for handling raw binary data such as compressed data -- Optimized version -- Binary Type Handler (U3 Length Prefix for >64KB support) -- Author: Asta (@TheYusufGamer) -- Requires local CursorModule = require(script.Parent.Parent.Types.Cursor) type Cursor = Cursor...
217
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Boolean1.luau
luau
.luau
--!strict -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) local offset = cursor.Index * 8 local value1 = buffer.readbits(cursor.Buffer, offset + 0, 1) == 1 local value2 = buffer.readbits(cursor.Buffer, offset + 1, 1) == 1 local value3 = buffer.readbit...
511
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Boolean8.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadU1() == 1 end, Write = function(cursor: Cursor.Cursor, value: boolean) cursor:Allocate(1) cursor:WriteU1(if value then 1 else 0) end, }
89
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/BrickColor.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return BrickColor.new(cursor:ReadU3()) end, Write = function(cursor: Cursor.Cursor, value: BrickColor) cursor:Allocate(3) cursor:WriteU3(value.Number) end, }
80
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Buffer.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadBuffer(cursor:ReadU1()) end, Write = function(cursor: Cursor.Cursor, value: buffer) local length = buffer.len(value) cursor:Allocate(1 + length) cur...
96
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/CFrameF24U8.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return CFrame.fromEulerAnglesXYZ( cursor:ReadU1() / 40.58451048843331, cursor:ReadU1() / 40.58451048843331, cursor:ReadU1() / 40.58451048843331 ) + Vector3.new( ...
265
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/CFrameF32U16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return CFrame.fromEulerAnglesXYZ( cursor:ReadU2() / 10430.219195527361, cursor:ReadU2() / 10430.219195527361, cursor:ReadU2() / 10430.219195527361 ) + Vector3.new( ...
265
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/CFrameF32U8.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return CFrame.fromEulerAnglesXYZ( cursor:ReadU1() / 40.58451048843331, cursor:ReadU1() / 40.58451048843331, cursor:ReadU1() / 40.58451048843331 ) + Vector3.new( ...
265
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Characters.luau
luau
.luau
--!strict --!optimize 2 --!native -- Recommended character array lengths: 2, 4, 8, 16, 32, 64, 128, 256 -- Requires local Cursor = require(script.Parent.Cursor) -- Varables local indices = {} local characters = {[0] = " ", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "...
501
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Color3.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Color3.fromRGB(cursor:ReadU1(), cursor:ReadU1(), cursor:ReadU1()) end, Write = function(cursor: Cursor.Cursor, value: Color3) cursor:Allocate(3) cursor:WriteU1...
138
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/ColorSequence.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) local length = cursor:ReadU1() local keypoints = table.create(length) for index = 1, cursor:ReadU1() do table.insert(keypoints, ColorSequenceKeypoint.new( cursor:R...
273
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Cursor.luau
luau
.luau
--!strict --!optimize 2 --!native -- Types export type Cursor = { Type: "Cursor", Index: number, InstanceIndex: number, Length: number, Buffer: buffer, Instances: {Instance}, Allocate: (self: Cursor, amount: number) -> (), Clear: (self: Cursor) -> (), Truncate: (self: Cursor) -...
2,838
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/EfficientTable.luau
luau
.luau
--!strict --!optimize 2 --!native --[[ EfficientTable.lua Optimized table serialization for NetRay Provides specialized handling for different table structures - Dense arrays (consecutive numeric keys) - String key maps (tables with string keys) - Mixed tables (optimized format for tables ...
2,555
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/EnumItem.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) -- Varables local indices = {} local values = Enum:GetEnums() :: {any} -- fix type checking bug -- Initialize for index, value in values do indices[value] = index end return { Read = function(cursor: Cursor.Cursor) loca...
209
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Instance.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadInstance() end, Write = function(cursor: Cursor.Cursor, value: Instance) cursor:WriteInstance(value) end, }
66
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/JSON.luau
luau
.luau
--!strict --!optimize 2 --!native --[[ Serializes/Deserializes JSON-compatible Luau values using a Cursor. Supports: - strings - numbers (stored as F8/double) - booleans - nil - tables (arrays: sequential integer keys 1..n) - tables (objects: string keys) Does NOT support: - Luau-specific types (userdata, ...
1,289
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Nil.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return nil end, Write = function(cursor: Cursor.Cursor, value: nil) end, }
57
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberF16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadF2() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(2) cursor:WriteF2(value) end, }
78
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberF24.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadF3() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(3) cursor:WriteF3(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberF32.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadF4() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(4) cursor:WriteF4(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberF64.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadF8() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(8) cursor:WriteF8(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberRange.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return NumberRange.new(cursor:ReadF4(), cursor:ReadF4()) end, Write = function(cursor: Cursor.Cursor, value: NumberRange) cursor:Allocate(8) cursor:WriteF4(value.Min)...
98
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberS16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadS2() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(2) cursor:WriteS2(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberS32.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadS4() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(4) cursor:WriteS4(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberS8.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadS1() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(1) cursor:WriteS1(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberSequence.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) local length = cursor:ReadU1() local keypoints = table.create(length) for index = 1, cursor:ReadU1() do table.insert(keypoints, NumberSequenceKeypoint.new( cursor:...
252
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberU16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadU2() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(2) cursor:WriteU2(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberU24.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadU3() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(3) cursor:WriteU3(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberU32.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadU4() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(4) cursor:WriteU4(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberU4.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) local offset = cursor.Index * 8 local value1 = buffer.readbits(cursor.Buffer, offset + 0, 4) local value2 = buffer.readbits(cursor.Buffer, offset + 4, 4) cursor.Index +=...
179
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/NumberU8.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadU1() end, Write = function(cursor: Cursor.Cursor, value: number) cursor:Allocate(1) cursor:WriteU1(value) end, }
75
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Rect.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Rect.new(cursor:ReadF4(), cursor:ReadF4(), cursor:ReadF4(), cursor:ReadF4()) end, Write = function(cursor: Cursor.Cursor, value: Rect) cursor:Allocate(16) curs...
130
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Region3.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Region3.new( Vector3.new(cursor:ReadF4(), cursor:ReadF4(), cursor:ReadF4()), Vector3.new(cursor:ReadF4(), cursor:ReadF4(), cursor:ReadF4()) ) end, Write = ...
211
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Static.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) -- Varables local indices = {} local values: {[any]: any} = { "DataStore Failed To Load", "Another Static String", math.pi, 123456789, Vector3.new(1, 2, 3), "You can have upto 255 static values of any type" } -- Initia...
166
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/String.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return cursor:ReadString(cursor:ReadU1()) end, Write = function(cursor: Cursor.Cursor, value: string) cursor:Allocate(1 + #value) cursor:WriteU1(#value) cursor:WriteS...
90
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Types.luau
luau
.luau
--!strict --[[ S8 Minimum: -128 Maximum: 127 S16 Minimum: -32768 Maximum: 32767 S24 Minimum: -8388608 Maximum: 8388607 S32 Minimum: -2147483648 Maximum: 2147483647 U8 Minimum: 0 Maximum: 255 U16 Minimum: 0 Maximum: 65535 U24 Minimum: 0 Maximum: 16777215 U32 Minimum: 0 Maximum: 429496...
1,116
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/UDim.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return UDim.new(cursor:ReadS2() / 1000, cursor:ReadS2()) end, Write = function(cursor: Cursor.Cursor, value: UDim) cursor:Allocate(4) cursor:WriteS2(value.Scale * 100...
112
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/UDim2.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return UDim2.new(cursor:ReadS2() / 1000, cursor:ReadS2(), cursor:ReadS2() / 1000, cursor:ReadS2()) end, Write = function(cursor: Cursor.Cursor, value: UDim2) cursor:All...
162
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector2F24.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector2.new(cursor:ReadF3(), cursor:ReadF3()) end, Write = function(cursor: Cursor.Cursor, value: Vector2) cursor:Allocate(6) cursor:WriteF3(value.X) cursor:...
98
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector2F32.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector2.new(cursor:ReadF4(), cursor:ReadF4()) end, Write = function(cursor: Cursor.Cursor, value: Vector2) cursor:Allocate(8) cursor:WriteF4(value.X) cursor:...
98
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector2S16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector2.new(cursor:ReadS2(), cursor:ReadS2()) end, Write = function(cursor: Cursor.Cursor, value: Vector2) cursor:Allocate(4) cursor:WriteS2(value.X + 0.5) c...
108
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector3F24.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector3.new(cursor:ReadF3(), cursor:ReadF3(), cursor:ReadF3()) end, Write = function(cursor: Cursor.Cursor, value: Vector3) cursor:Allocate(9) cursor:WriteF3(v...
113
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector3F32.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector3.new(cursor:ReadF4(), cursor:ReadF4(), cursor:ReadF4()) end, Write = function(cursor: Cursor.Cursor, value: Vector3) cursor:Allocate(12) cursor:WriteF4(...
113
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/Types/Vector3S16.luau
luau
.luau
--!strict --!optimize 2 --!native -- Requires local Cursor = require(script.Parent.Cursor) return { Read = function(cursor: Cursor.Cursor) return Vector3.new(cursor:ReadS2(), cursor:ReadS2(), cursor:ReadS2()) end, Write = function(cursor: Cursor.Cursor, value: Vector3) cursor:Allocate(6) cursor:WriteS2(v...
128
AstaWasTaken/NetRay
AstaWasTaken-NetRay-a5e35f6/NetRay/init.luau
luau
.luau
--!optimize 2 --[[ NetRay - High Performance Roblox Networking Library (v1.1.2) Author: Asta (@TheYusufGamer) Created: 2025-03-22 ]] local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local PlayersService = game:GetService("Players") --=======...
2,365
littensy/nanoai
littensy-nanoai-56accb8/.lune/check.luau
luau
.luau
--> Runs checks on code quality local exec = require("util") exec("luau-lsp analyze --settings=.vscode/settings.json --sourcemap=sourcemap.json src") exec("selene src") exec("stylua --check src")
54
littensy/nanoai
littensy-nanoai-56accb8/.lune/dev.luau
luau
.luau
local exec = require("util") exec("rojo sourcemap dev.project.json --output sourcemap.json --watch & darklua process src/ rbx/ --watch")
37
littensy/nanoai
littensy-nanoai-56accb8/.lune/install.luau
luau
.luau
--> Installs dependencies and sets up the sourcemap local exec = require("util") exec("wally install") exec("lune setup") exec("rojo sourcemap dev.project.json --output sourcemap.json")
48
littensy/nanoai
littensy-nanoai-56accb8/.lune/util.luau
luau
.luau
--> Internal utility library depended upon by other scripts local process = require("@lune/process") local stdio = require("@lune/stdio") return function(command: string) local args = command:split(" ") local program = table.remove(args, 1) :: string local result = process.spawn(program, args, { stdio = "forwar...
149
littensy/nanoai
littensy-nanoai-56accb8/bin/spec.server.luau
luau
.luau
--!nocheck
5
littensy/nanoai
littensy-nanoai-56accb8/src/activation.luau
luau
.luau
export type Activation = "Sigmoid" | "TanH" | "ArcTan" | "SoftPlus" | "Linear" | "ReLU" | "LeakyReLU" | "ELU" local Activation = { Sigmoid = "Sigmoid", TanH = "TanH", ArcTan = "ArcTan", SoftPlus = "SoftPlus", Linear = "Linear", ReLU = "ReLU", LeakyReLU = "LeakyReLU", ELU = "ELU", } local functions = { [Activ...
563
littensy/nanoai
littensy-nanoai-56accb8/src/copy.luau
luau
.luau
--[=[ Creates a deep copy of the given object. Can be used to clone a neural network, since networks are JSON encodable. @param object The object to clone. @return A deep copy of the object. ]=] local function copy<T>(object: T): T if type(object) == "table" then local clone = table.clone(object) for key, va...
118
littensy/nanoai
littensy-nanoai-56accb8/src/create.luau
luau
.luau
local types = require("./types") type Network = types.Network --[=[ Creates a new neural network with the specified shape and activation functions. The shape is an array of numbers, where each element represents the amount of neurons in that layer. @param shape The shape of the network. @param activation The ac...
284
littensy/nanoai
littensy-nanoai-56accb8/src/evolution.luau
luau
.luau
local task = task or require("@lune/task") local init = require("./initializers") local types = require("./types") type Network = types.Network local copy = require("./copy") type Thenable = { andThen: (self: Thenable, resolved: ((...any) -> ())?, rejected: ((unknown) -> ())?) -> Thenable, } export type Agent = { ...
1,099
littensy/nanoai
littensy-nanoai-56accb8/src/init.luau
luau
.luau
local activation = require("./activation") local backpropagate = require("./backpropagate") local copy = require("./copy") local create = require("./create") local evolution = require("./evolution") local init = require("./initializers") local initialize = require("./initialize") local predict = require("./predict") lo...
136
littensy/nanoai
littensy-nanoai-56accb8/src/initialize.luau
luau
.luau
local types = require("./types") type Network = types.Network export type Filter = "weights" | "biases" | "all" --[=[ Calls the `initializer` for each weight and bias in the network. If the `initializer` returns `undefined`, the weight or bias will not be changed. The `initializer` receives the layer index and th...
329
littensy/nanoai
littensy-nanoai-56accb8/src/initializers.luau
luau
.luau
local Activation = require("./activation").Activation local initialize = require("./initialize") type Filter = initialize.Filter local types = require("./types") type Network = types.Network local DEFAULT_GAIN = { [Activation.TanH] = 5 / 3, [Activation.ReLU] = 2 ^ 0.5, [Activation.LeakyReLU] = (2 / 1.01) ^ 0.5, } ...
681
littensy/nanoai
littensy-nanoai-56accb8/src/predict.luau
luau
.luau
local activation = require("./activation") local types = require("./types") type Network = types.Network --[=[ Feeds the input signal through the network and returns the output signal. @param network The neural network. @param input The input signal. @return The output signal. ]=] local function predict(network:...
181
littensy/nanoai
littensy-nanoai-56accb8/src/types.luau
luau
.luau
--[=[ The neural network model, containing the neurons, weights, biases, and activation functions of the network. The network is JSON encodable, so it is safe to serialize and send over a remote event. ]=] export type Network = { --[=[ The total amount of layers in the network, excluding the input layer. ]=] si...
310
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Hitboxes/init.luau
luau
.luau
--[[ Hey reader! If you've seen this branch then you'll see that this is a new file and is empty! I'm currently working on documentation first and then going to this, however I am debating whether we should take an object-oriented approach to this or functional The api would look something similar to this for OOP: ...
179
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Lifecycles/init.luau
luau
.luau
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Logging = require(script.Parent.Logging) local FunctionLib = require(script.Parent.Util.FunctionLib) local Lifecycles = {} local CustomCycles = { Server = {}, Client = {}, } local LifecyclesEvents = { PlayerAdded = Pl...
728
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Logging/init.luau
luau
.luau
--[=[ @class Log Created by railworks2, used with written permission. ]=] local RunService = game:GetService("RunService") local Future = require(script.Parent.Packages.Future) local Log = {} --[=[ @type LogLevel "INFO" | "DEBUG" | "WARN" | "ERROR" | "FATAL" @within Log ]=] type LogLevel = "INFO" | "DEBUG" | "WAR...
1,422
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Packages/Future/init.luau
luau
.luau
local Spawn = require(script.Spawn) export type Future<T...> = { ValueList: { any }?, AfterList: { (T...) -> () }, YieldList: { thread }, IsComplete: (self: Future<T...>) -> boolean, IsPending: (self: Future<T...>) -> boolean, Expect: (self: Future<T...>, Message: string) -> T..., Unwrap: (self: Future<T...>...
753
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Packages/why.luau
luau
.luau
--[[ WHY THIS? - Packages from pesde itself aren't great. So we put stuff here. Also the datastore manager we use is ProfileStore (changed from lapis) which isnt on a package manager. ]] return {}
48
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Player/PlayerClass.luau
luau
.luau
--!strict local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Logging = require(script.Parent.Parent.Logging) local Future = require(script.Parent.Parent.Packages.Future) local ProfileStore local Store = nil :: any --// Table local PlayerClass = {} PlayerClass.__index =...
615
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Player/init.luau
luau
.luau
--!strict local DataStoreService = game:GetService("DataStoreService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Network if RunService:IsServer() then Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].server) :: any else Network = require(script.Pa...
1,241
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Sound/init.luau
luau
.luau
--!nocheck local RunService = game:GetService("RunService") local FunctionLib = require(script.Parent.Util.FunctionLib) local Logging = require(script.Parent.Logging) local Network if RunService:IsServer() then Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].server) :: any else Network = require(scrip...
804
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/Util/FunctionLib.luau
luau
.luau
--!strict local FunctionLib = {} local suffixes = { "K", "M", "B", "T", "Qd", "Qn", "Se", "Sp", "Oc", "No", "Dc", "Udc", "Ddc", "Tdc" } FunctionLib.None = newproxy(true) getmetatable(FunctionLib.None :: any).__tostring = function() return "FunctionLib.None" end function FunctionLib:ToSuffixString(Number: number, D...
915
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-a9f70c9/src/init.luau
luau
.luau
--!strict local RunService = game:GetService("RunService") --[[ Sophie B 2026 MIT ]] local Lifecycles = require(script.Lifecycles) local PossibleClientCycles = { "PlayerAdded", "PlayerRemoving", "Heartbeat", "CharacterAdded", "CharacterRemoving", "RenderStepped", "PostSimulation", } local PossibleServerCy...
784
TheNexusAvenger/Nexus-Data-Store
TheNexusAvenger-Nexus-Data-Store-5cafc7d/src/BulkMessagingService.luau
luau
.luau
--Sends messages in bulk through 1 topic to prevent too many topics being used. --!strict local NOT_CONNECTED_WARNING_DELAY_SECONDS = 10 local BulkMessagingService = {} BulkMessagingService.__index = BulkMessagingService local HttpService = game:GetService("HttpService") export type BulkMessagingService = { Top...
1,018
TheNexusAvenger/Nexus-Data-Store
TheNexusAvenger-Nexus-Data-Store-5cafc7d/src/LocalSaveData.luau
luau
.luau
--Implementation of SaveData that does not use external services. --This should only be used for testing or DataStores going offline. --!strict local LocalSaveData = {} LocalSaveData.__index = LocalSaveData export type LocalSaveData = { Data: {[string]: any}, OnUpdateEvents: {[string]: BindableEvent}, } & typ...
1,030
TheNexusAvenger/Nexus-Data-Store
TheNexusAvenger-Nexus-Data-Store-5cafc7d/src/SaveData.luau
luau
.luau
--Handles saving data for a DataStore key. --!strict local HttpService = game:GetService("HttpService") local BulkMessagingService = require(script.Parent:WaitForChild("BulkMessagingService")) local SaveData = {} SaveData.__index = SaveData export type SaveData = { DataStoreName: string, DataStoreKey: strin...
3,161
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/copyDeep.lua
luau
.lua
--!strict --[=[ @function copyDeep @within Array @param array {T} -- The array to copy. @return {T} -- The copied array. Copies an array, with deep copies of all nested arrays. ```lua local array = { 1, 2, 3, { 4, 5 } } local result = CopyDeep(array) -- { 1, 2, 3, { 4, 5 } } print(result == array) -- fals...
195
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/count.lua
luau
.lua
--!strict local Sift = script.Parent.Parent local Util = require(Sift.Util) --[=[ @function count @within Array @param array {T} -- The array to count the number of items in. @param predicate? (value: T, index: number, array: {T}) -> any -- The predicate to use to filter the array. @return number -- The number ...
255
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/difference.lua
luau
.lua
--!strict local T = require(script.Parent.Parent.Types) local toSet = require(script.Parent.toSet) local toArray = require(script.Parent.Parent.Set.toArray) local setDifference = require(script.Parent.Parent.Set.difference) --[=[ @function difference @within Array @param array Array<V> -- The array to compare....
271
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/differenceSymmetric.lua
luau
.lua
--!strict local T = require(script.Parent.Parent.Types) local toSet = require(script.Parent.toSet) local toArray = require(script.Parent.Parent.Set.toArray) local setDifferenceSymmetric = require(script.Parent.Parent.Set.differenceSymmetric) --[=[ @function differenceSymmetric @within Array @param array Array<...
296
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/every.lua
luau
.lua
--!strict --[=[ @function every @within Array @param array {T} -- The array to check. @param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array. @return boolean -- Whether every item in the array passes the predicate. Checks whether every item in the array passes t...
223
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/filter.lua
luau
.lua
--!strict local Sift = script.Parent.Parent local Util = require(Sift.Util) --[=[ @function filter @within Array @param array {T} -- The array to filter. @param filterer? (value: T, index: number, array: {T}) -> any -- The callback to use to filter the array. @return {T} -- The filtered array. Filters an arra...
273
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/init.lua
luau
.lua
--!strict --[=[ @class Array An array is a table consisting of index-value pairs. You don't need to manually specify the indices when you create an array. ```lua local array = { "hello", "world", } ``` <br><br> #### Aliases `List` ]=] local Array = { at = require(script.at), concat = require(script...
492
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/is.lua
luau
.lua
--!strict --[=[ @function is @within Array @param object any -- The object to check. @return boolean -- Whether the object is an array. Checks if the given object is an array. ```lua local array = { 1, 2, 3 } local dictionary = { hello = "world" } local mixed = { 1, 2, hello = "world" } Array.is...
162
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/push.lua
luau
.lua
--!strict --[=[ @function push @within Array @param array {T} -- The array to push an element to. @param ... ...T -- The elements to push. @return {T} -- The array with the pushed elements. Adds elements to the end of the array. #### Aliases `append` ```lua local array = { 1, 2, 3 } local new = Push(ar...
197
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/reduce.lua
luau
.lua
--!strict --[=[ @function reduce @within Array @param array {T} -- The array to reduce. @param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use. @param initialReduction? U = {T}[1] -- The initial accumulator value. @return U -- The final accumulator value. Reduces the ar...
318
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/reduceRight.lua
luau
.lua
--!strict --[=[ @function reduceRight @within Array @param array {T} -- The array to reduce. @param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use. @param initialReduction? U = {T}[#{T}] -- The initial accumulator value. @return U -- The final accumulator value. Reduce...
335
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/removeValue.lua
luau
.lua
--!strict --[=[ @function removeValue @within Array @param array {T} -- The array to remove the value from. @param value T -- The value to remove. @return {T} -- The array with the value removed. Removes a value from an array. ```lua local array = { 1, 2, 3 } local new = RemoveValue(array, 2) -- { 1, 3 } ...
166
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/some.lua
luau
.lua
--!strict --[=[ @function some @within Array @param array {T} -- The array to check. @param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array. @return boolean -- Whether some item in the array passes the predicate. Checks whether some item in the array passes the ...
222
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Array/update.lua
luau
.lua
--!strict local Sift = script.Parent.Parent local Util = require(Sift.Util) local Copy = require(script.Parent.copy) type Callback<T> = (index: number) -> T type Updater<T> = (currentValue: T, index: number) -> T local function call<T>(callback: Callback<T>, index: number) if type(callback) == "function" then ret...
435
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Dictionary/copyDeep.lua
luau
.lua
--!strict --[=[ @function copyDeep @within Dictionary @param dictionary T -- The dictionary to copy. @return T -- The copied dictionary. Copies a dictionary recursively. ```lua local dictionary = { hello = { world = "goodbye" } } local new = CopyDeep(dictionary) -- { hello = { world = "goodbye" } } ...
173
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Dictionary/init.lua
luau
.lua
--!strict --[=[ @class Dictionary Dictionaries are a type of data structure that can be used to store key-value pairs. ```lua local dictionary = { cats = 2, dogs = 1 } print(dictionary.cats) -- 2 ``` ]=] local Dictionary = { copy = require(script.copy), copyDeep = require(script.copyDeep), count = requ...
297
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Dictionary/some.lua
luau
.lua
--!strict --[=[ @function some @within Dictionary @param dictionary {[K]: V} -- The dictionary to check. @param predicate (value: V, key: K, dictionary: { [K]: V }) -> any -- The predicate to check against. @return boolean -- Whether or not the predicate returned true for any value. Checks whether or not ...
255
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Dictionary/withKeys.lua
luau
.lua
--!strict --[=[ @function withKeys @within Dictionary @param dictionary {[K]: V} -- The dictionary to select the keys from. @param keys ...K -- The keys to keep. @return {[K]: V} -- The dictionary with only the given keys. Returns a dictionary with the given keys. ```lua local dictionary = { hello =...
200
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Set/count.lua
luau
.lua
--!strict local Sift = script.Parent.Parent local Util = require(Sift.Util) --[=[ @function count @within Set @param set { [T]: boolean } -- The set to count. @param predicate? (item: T, set: { [T]: boolean }) -> boolean? -- The predicate to use to count. @return number -- The number of items in the set. ...
255
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Set/difference.lua
luau
.lua
--!strict local T = require(script.Parent.Parent.Types) --[=[ @function difference @within Set @param set Set<V> -- The set to compare. @param ... ...Set<V> -- The sets to compare against. @return Set<V> -- The difference between the sets. Returns a set of values that are in the first set, but not in the...
227
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Set/differenceSymmetric.lua
luau
.lua
--!strict local T = require(script.Parent.Parent.Types) --[=[ @function differenceSymmetric @within Set @param set Set<V> -- The set to compare. @param ... ...Set<V> -- The sets to compare against. @return Set<V> -- The symmetric difference between the sets. Returns a set of values that are in the first ...
281
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Set/filter.lua
luau
.lua
--!strict local Sift = script.Parent.Parent local Util = require(Sift.Util) --[=[ @function filter @within Set @param set { [T]: boolean } -- The set to filter. @param predicate? (item: T, set: { [T]: boolean }) -> any -- The function to filter the set with. @return { [T]: boolean } -- The filtered set. ...
259
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Set/init.lua
luau
.lua
--!strict --[=[ @class Set Sets are a collection of values. They are used to store unique values. They are essentially a dictionary, but each value is stored as a boolean. This means that a value can only be in a set once. ```lua local set = { hello = true } local newSet = Add(set, "world") -- { hello = true,...
235
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/csqrl_sift@0.0.8/sift/src/Types.lua
luau
.lua
--selene: allow(unused_variable) local None = require(script.Parent.None) --[=[ @type None None @within Sift ]=] export type None = typeof(None) export type Dictionary<K, V> = { [K]: V } export type Array<T> = Dictionary<number, T> export type Set<T> = Dictionary<T, boolean> export type Table = Dictionary<any, any...
98
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/roblox_testez@0.4.1/testez/src/Expectation.lua
luau
.lua
--[[ Allows creation of expectation statements designed for behavior-driven testing (BDD). See Chai (JS) or RSpec (Ruby) for examples of other BDD frameworks. The Expectation class is exposed to tests as a function called `expect`: expect(5).to.equal(5) expect(foo()).to.be.ok() Expectations can be negated u...
1,740
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/roblox_testez@0.4.1/testez/src/ExpectationContext.lua
luau
.lua
local Expectation = require(script.Parent.Expectation) local checkMatcherNameCollisions = Expectation.checkMatcherNameCollisions local function copy(t) local result = {} for key, value in pairs(t) do result[key] = value end return result end local ExpectationContext = {} ExpectationContext.__index = Expectati...
217
bohraz/Arch
bohraz-Arch-bdfc450/Packages/_Index/roblox_testez@0.4.1/testez/src/TestSession.lua
luau
.lua
--[[ Represents the state relevant while executing a test plan. Used by TestRunner to produce a TestResults object. Uses the same tree building structure as TestPlanBuilder; TestSession keeps track of a stack of nodes that represent the current path through the tree. ]] local TestEnum = require(script.Parent.Tes...
1,558