Datasets:
repo stringclasses 350
values | file_path stringlengths 29 200 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.01M | tokens int64 2 598k |
|---|---|---|---|---|---|
imezx/JPSPlus | imezx-JPSPlus-127f489/benchmark.luau | luau | .luau | --!native
--!optimize 2
local RunService = game:GetService("RunService")
local JPSPlus = require("./JPSPlus")
local WIDTH, HEIGHT = 384, 384
local OBSTACLE_DENSITY = 0.25
local SEED = 12345
local NUM_QUERIES = 5000
local WARMUP = 200
local DIAG_POLICY = JPSPlus.grid.DiagonalPolicy.NoSqueeze
local YIELD_EVERY = 100... | 1,686 |
imezx/JPSPlus | imezx-JPSPlus-127f489/playground/WorldGrid.luau | luau | .luau | local WorldGrid = {}
WorldGrid.__index = WorldGrid
function WorldGrid.new(origin: Vector3, cellSize: number, width: number, height: number)
return setmetatable({
Origin = origin,
CellSize = cellSize,
Width = width,
Height = height,
}, WorldGrid)
end
function WorldGrid:worldToCell(pos: Vector3)
local p = po... | 218 |
imezx/JPSPlus | imezx-JPSPlus-127f489/playground/test.server.luau | luau | .luau | --!optimize 2
--!native
local PhysicsService = game:GetService("PhysicsService")
local CollectionService = game:GetService("CollectionService")
local Players = game:GetService("Players")
local JPSPlus = require("./JPSPlus")
local WorldGrid = require("./WorldGrid")
local npcModel1 = workspace:WaitForChild("Agent 1")
l... | 1,832 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/dirs.luau | luau | .luau | --!optimize 2
local Dirs = {}
@native
local function bit(d) return bit32.lshift(1, d-1) end
Dirs.E = 1
Dirs.W = 2
Dirs.N = 3
Dirs.S = 4
Dirs.NE = 5
Dirs.NW = 6
Dirs.SE = 7
Dirs.SW = 8
Dirs.dx = { [1]= 1, [2]=-1, [3]= 0, [4]= 0, [5]= 1, [6]=-1, [7]= 1, [8]=-1 }
Dirs.dy = { [1]= 0, [2]= 0, [3]=-1, [4]= 1, [5]=-1, [6]=... | 648 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/grid.luau | luau | .luau | --!optimize 2
local Grid = {}
Grid.__index = Grid
Grid.DiagonalPolicy = {
Always = "Always", -- diagonal allowed if destination is free
NoSqueeze = "NoSqueeze", -- (default) diagonal allowed if dest free AND (at least one orthogonal adjacent is free)
NoCorner = "NoCorner", -- diagonal allowed if dest free AND (both... | 485 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/init.luau | luau | .luau | --@EternityDev
-- Jump Point Search Plus (JPS+)
local JPSPlus = {}
JPSPlus.dirs = require("@self/dirs")
JPSPlus.grid = require("@self/grid")
JPSPlus.preprocess = require("@self/preprocess")
JPSPlus.planner = require("@self/planner")
JPSPlus.smoothing = require("@self/smoothing")
return JPSPlus
| 86 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/planner.luau | luau | .luau | --!native
--!optimize 2
local Dirs = require("./dirs")
local PQ = require("./priorityqueue")
local Planner = {}
Planner.__index = Planner
local function octile(ix, iy, gx, gy, D, D2)
local dx = math.abs(ix - gx)
local dy = math.abs(iy - gy)
local mn = (dx < dy) and dx or dy
local mx = (dx > dy) and dx or dy
retu... | 2,695 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/preprocess.luau | luau | .luau | --!native
--!optimize 2
local Dirs = require("./dirs")
local Grid = require("./grid")
local Preprocess = {}
local function makeOffsets(total)
local off = table.create(8)
local offB = table.create(8)
for d = 1, 8 do
local o = (d - 1) * total
off[d] = o
offB[d] = o * 2 -- bytes for u16
end
return off, offB
e... | 2,556 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/priorityqueue.luau | luau | .luau | --!native
--!optimize 2
local PQ = {}
PQ.__index = PQ
function PQ.new(capacity)
capacity = capacity or 256
return setmetatable({
n = 0,
id = table.create(capacity),
f = table.create(capacity),
g = table.create(capacity),
}, PQ)
end
function PQ:push(nodeId, fScore, gScore)
local n = self.n + 1
self.n = ... | 557 |
imezx/JPSPlus | imezx-JPSPlus-127f489/src/smoothing.luau | luau | .luau | --!native
--!optimize 2
local Smoothing = {}
local function hasLOS(blocked, stride, x0, y0, x1, y1)
local dx = x1 - x0
local dy = y1 - y0
local adx = math.abs(dx)
local ady = math.abs(dy)
local sx = (dx > 0 and 1) or (dx < 0 and -1) or 0
local sy = (dy > 0 and 1) or (dy < 0 and -1) or 0
local ix, iy = x0 + 1,... | 573 |
imezx/MultiRaycast | imezx-MultiRaycast-c45dd4d/src/init.luau | luau | .luau | --@EternityDev
--!strict
--!native
--!optimize 2
local Raycast = {}
Raycast.__index = Raycast
local RunService = game:GetService("RunService")
local Signal = require(script.Signal)
local PreSimulation = RunService.PreSimulation
local sampleActor = script:WaitForChild("Actor")
function Raycast.new(header: string, dir... | 710 |
imezx/InfiniteMath | imezx-InfiniteMath-7a846ef/src/InfiniteMath/Int.luau | luau | .luau | --!native
local Int = {}
Int.__index = Int
export type Int = typeof(setmetatable({
sign = 0 :: number, -- -1, 0, +1
limbs = {} :: { number }, -- little-endian uint32 limbs (base 2^32)
}, Int))
local function trimLimbs(limbs: { number })
while #limbs > 0 and limbs[#limbs] == 0 do
table.remove(limbs)
end
end
loc... | 2,047 |
imezx/InfiniteMath | imezx-InfiniteMath-7a846ef/src/InfiniteMath/Values/FullNames.luau | luau | .luau | return {'Thousand','Million','Billion','Trillion','Quadrillion','Quintillion','Sextillion','Septillion','Octillion','Nonillion','Decillion','Undecillion','Duodecillion','Tredecillion','Quattuordecillion','Quindecillion','Sedecillion','Septendecillion','Octodecillion','Novendecillion','Vigintillion','Unvigintillion','Du... | 40,396 |
Last collected: 2026-09-05 23:33
Luau Stack HQ
Luau Stack HQ is a highly curated & deduplicated Luau source code with Type-script included from github repository with linter (stylua), it contains ~18.11M tokens (17903 unique files, 16313 luau files & 1590 ts files). It is built strictly for the training stages, providing a pristine density of type-safe, functional architecture without the noise of standard web scrapes.
# Filtering Pipeline
To ensure the highest quality data for pretraining, the dataset was built using a rigorous, multi-step extraction and filtering pipeline:
- Repository Selection:
- Target Terms: Searches focus on
rbx,rbxl,rblx,roblox,luau,roblox-ts,rbxts,robloxtsandroblox typescript. - Quality: Minimum of 5 stars.
- Relevance: Because Luau is updated frequently, only repositories active or pushed within the last 2.5 years are included.
- Repo Deduplication: Forks are strictly excluded.
- Target Terms: Searches focus on
- Auto-Formatting (
StyLua): Every raw.luauand.luafile is piped throughStyLuato ensure consistent syntax. Unparseable files are dropped. - Cheat & Exploit Removal:
- Repositories with cheat-related keywords in their name, description, or topics (e.g.,
aimbot,executor,synapse,krnl) are blacklisted. - Code containing Roblox exploit globals (e.g.,
getfenv,setfenv,hookfunction,loadstring,getrawmetatable) is entirely discarded.
- Repositories with cheat-related keywords in their name, description, or topics (e.g.,
- Noise Reduction: Test files, mocks,
.spec.files, and compiled/dist/directories are ignored. Files smaller than 100 bytes or larger than 1MB are also excluded.
# Repo Docs
Please visit khtsly/luau-repo-docs-text for the repo docs
# Licensing
The source code contained within this dataset belongs to their respective original authors. All data was sourced from public GitHub repositories under open-source licenses, with forks explicitly excluded. Please respect the original repository licenses when utilizing this dataset for commercial model training.
- Downloads last month
- 180