content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local utils = require "mp.utils" local msg = require "mp.msg" local subs_for = {} local accmd = assert(mp.get_opt("re-anitomy-cli-cmd"), "re-anitomy-cli-cmd not passed") local args = { "/bin/sh", "-c", [[ { printf '%s\0' "$@" printf '\0' find -type f -regextype posix-extended -iregex '.*\.(ass|srt)' -p...
nilq/small-lua-stack
null
-- This software is copyright Kong Inc. and its licensors. -- Use of the software is subject to the agreement between your organization -- and Kong Inc. If there is no such agreement, use is governed by and -- subject to the terms of the Kong Master Software License Agreement found -- at https://konghq.com/enterpriseso...
nilq/small-lua-stack
null
local MemoryObject = {} MemoryObject.__index = MemoryObject -- This setup seems stupid. -- I feel like I should instead delegate the signed/unsigned-ness -- to other functions, probably in memoryR. -- blah MemoryObject.functions = { byte = { read = m.rbs, write = memory.writebyte }, ...
nilq/small-lua-stack
null
-- ===== ===== ===== ===== ===== -- Copyright (c) 2017 Lukas Grünwald -- License MIT License -- ===== ===== ===== ===== ===== -- Import new functions: require( "libErrorFunctions" ) require( "libDebugFunctions" ) -- Import new classes: require( "cEvent" ) require( "cPlanet" ) cEvent_Type_DIPLUpdateAllianceRatin...
nilq/small-lua-stack
null
AddCSLuaFile("autorun/acf_missile/fuse/fuse_contact.lua") include("autorun/acf_missile/fuse/fuse_contact.lua") AddCSLuaFile("autorun/acf_missile/fuse/fuse_radio.lua") include("autorun/acf_missile/fuse/fuse_radio.lua") AddCSLuaFile("autorun/acf_missile/fuse/fuse_optical.lua") include("autorun/acf_missile/fuse/fuse_opt...
nilq/small-lua-stack
null
local Class = require "Base.Class" local Chain = require "Chain" local ScopeView = require "Chain.ScopeView" local PinView = require "PinView" local Root = Class {} Root:include(Chain) function Root:init(args) Chain.init(self, args) self:setClassName("Chain.Root") self.isRoot = true self.scopeView = ScopeView...
nilq/small-lua-stack
null
local vec_metatable = { __add = function(a, b) if type(b) == "number" then return NewVector(a.x + b, a.x + b) elseif type(a) == "number" then return NewVector(a + b.x, a + b.y) else return NewVector(a.x + b.x, a.y + b.y) end end, __sub = fu...
nilq/small-lua-stack
null
local Root = script.parent --:GetCustomProperty("Root"):WaitForObject() local FX_Template = script:GetCustomProperty("FX_Template") local Geo = script:GetCustomProperty("Geo"):WaitForObject() local Rock = Geo:GetChildren()[1] Rock:RotateContinuous(Vector3.New(0, 10, 0), true) Geo.parent = nil Geo:SetWorldRotation(Root...
nilq/small-lua-stack
null
local LifeForm = {}; LifeForm.__index = LifeForm function LifeForm:new(total) return setmetatable({ totalLife = total, currentLife = total }, LifeForm) end function LifeForm:takeDamage(amount) self.currentLife = self.currentLife - amount return self.currentLife <= 0 end function LifeF...
nilq/small-lua-stack
null
local byte, bit, ldexp = string.byte, bit or require("bit"), math.ldexp; local bor, blshift, brshift, band = bit.bor, bit.lshift, bit.rshift, bit.band; local function gBit(Bit, Start, End) -- credits to https://github.com/Rerumu/Rerubi/blob/master/Source.lua for this function if End then -- Thanks to cntkill...
nilq/small-lua-stack
null
-- a vector pointing parallel with rotation axis rot_vec = rw.Vector3D(0,0,1) -- a point on the rotation axis rot_pos = rw.Vector3D(0,0,0) -- the angle increments in degree angle = 5 video_name = "MyRWVideo" tmpdir = "tmp" .. os.clock() os.execute("mkdir " .. tmpdir) cview = rwstudio:getViewTransform() count = 0 rot ...
nilq/small-lua-stack
null
----------------------------------------------------------------------------------------------------------------------- -- RedFlat dotcount widget -- --------------------------------------------------------------------------------...
nilq/small-lua-stack
null
local heart = require("heart") local M = heart.class.newClass() function M:init(game, config) self.game = assert(game) self.playerEntities = assert(self.game.componentEntitySets.player) self.cameraEntities = assert(self.game.componentEntitySets.camera) self.boneComponents = assert(self.game.componentManager...
nilq/small-lua-stack
null
--- --- --- File: lua_putFile.lua --- --- --- --- put_file_report = {} function put_file_report.execute( resultList) put_file_report.doTitle( resultList ) put_file_report.doBadStores(resultList) put_file_report.doGoodStores(resultList) end function put_file_report.doTitle( resultList ) local temp local count ...
nilq/small-lua-stack
null
local server = require "nvim-lsp-installer.server" local go = require "nvim-lsp-installer.installers.go" local root_dir = server.get_server_root_path "go" return server.Server:new { name = "gopls", root_dir = root_dir, installer = go.packages { "golang.org/x/tools/gopls@latest" }, default_options = { ...
nilq/small-lua-stack
null
local mod_name = (...) local misc = require ( mod_name .. ".misc" ) local assert , pcall = assert , pcall local ipairs , pairs = ipairs , pairs local unpack = unpack local setmetatable = setmetatable local floor = math.floor local strbyte , strchar = string.byte , string.char local strsub = string.sub local t_insert ...
nilq/small-lua-stack
null
local tablepool = require("tablepool") local get_var = require("resty.ngxvar").fetch local get_request = require("resty.ngxvar").request local setmetatable = setmetatable local _M = {version = 0.1} do local var_methods = { ["method"] = ngx.req.get_method } local mt = { __index = functio...
nilq/small-lua-stack
null
package.path = package.path..";../?.lua" local ffi = require("ffi") local bit = require("bit") local band = bit.band local pixman = require("pixman")() local pixlib = pixman.Lib_pixman; local ENUM = ffi.C local utils = require("utils") local save_image = utils.save_image; local libc = require("libc") local function...
nilq/small-lua-stack
null
local function MarkParty(skipInstanceCheck) local function MaybeMarkUnit(unitType, iconIndex) local name = GetUnitName(unitType) -- First check if the unit is already marked local unitRaidTargetIcon = GetRaidTargetIndex(unitType) if unitRaidTargetIcon == nil then S...
nilq/small-lua-stack
null
-- Called OnSpellStart function Diffusal_Purge_Start(event) local target = event.target local caster = event.caster local ability = event.ability local ability_level = ability:GetLevel() - 1 local damageType = ability:GetAbilityDamageType() local duration = ability:GetLevelSpecialValueFor("purge_slow_duration", a...
nilq/small-lua-stack
null
--[[ Copyright 2018 vurtual VurtualRuler98@gmail.com vurtual.org Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law o...
nilq/small-lua-stack
null
package("libiconv") set_homepage("https://www.gnu.org/software/libiconv") set_description("Character set conversion library.") set_urls("https://ftp.gnu.org/gnu/libiconv/libiconv-$(version).tar.gz", "https://ftpmirror.gnu.org/libiconv/libiconv-$(version).tar.gz") add_versions("1.16", "e6a...
nilq/small-lua-stack
null
local global = require('global') vim.cmd("command! -nargs=0 LspClearLineDiagnostics lua require('mode-diagnostic')()") vim.cmd('command! -nargs=0 LspLog call v:lua.open_lsp_log()') vim.cmd('command! -nargs=0 LspRestart call v:lua.reload_lsp()') -- since we lazy load packer.nvim, we need to load it when we run packer-...
nilq/small-lua-stack
null
--[[ ä Name: Advanced Questbook By: Crypton ]] if (AdvQuestBook_MapID == nil) then AdvQuestBook_MapID = { [1] = AQB_MAP_NAMES[1], [2] = AQB_MAP_NAMES[2], [3] = AQB_MAP_NAMES[3], [4] = AQB_MAP_NAMES[4], [5] = AQB_MAP_NAMES[5], [6] = AQB_MAP_NAMES[6], [7] = AQB_MAP_NAMES[7], [8] = AQB_MAP_NAMES[8], ...
nilq/small-lua-stack
null
SetupProject("Tut08GimbalLock", "GimbalLock.cpp", "data/ColorMultUniform.frag", "data/PosColorLocalTransform.vert") SetupProject("Tut08QuaternionYPR", "QuaternionYPR.cpp", "data/ColorMultUniform.frag", "data/PosColorLocalTransform.vert") SetupProject("Tut08CameraRelative", "CameraRelative.cpp", "data/Colo...
nilq/small-lua-stack
null
module(..., package.seeall) local counter = require("core.counter") local schema = require('lib.yang.schema') local data = require('lib.yang.data') local state = require('lib.yang.state') local S = require('syscall') function counter_names () local names = {} local schema = schema.load_schema_by_name('snabb-sof...
nilq/small-lua-stack
null
Options:Default "trace" plugins { { type = "file", include = { "*.lua" }, exclude = { "Howlfile.lua" } }, } Tasks:busted "busted" { } Tasks:ldoc "ldoc" { }
nilq/small-lua-stack
null
-- current selling value depending on amount of people selling. local value = 0.4 -- amount of weed4g's needed to start. local weedcost = 1000 -- are we already running a looperino? local ActiveRun = false -- Current step of procedure, 0 nothing, 1 moving to location local CurrentStep = 0 -- 1 in X chance of gettin...
nilq/small-lua-stack
null
data:extend({ { type = "technology", name = "space-station-assembly", icon_size = 128, order = "y-a", icon = "__expanded-rocket-payloads__/graphic/space-lab-128.png", effects = { { type = "laboratory-productivity", modifier = 1 ...
nilq/small-lua-stack
null
-- -- callng:callfunc.lua -- -- The Initial Developer of the Original Code is -- Minh Minh <hnimminh at[@] outlook dot[.] com> -- Portions created by the Initial Developer are Copyright (C) the Initial Developer. -- All Rights Reserved. -- require("callng.utilities") ---------------------******************************...
nilq/small-lua-stack
null
pcall(include, "autorun/translation.lua") local L = translation and translation.L or function(s) return s end local ceil = math.ceil local clamp = math.Clamp local FormatSeconds = MediaPlayerUtils.FormatSeconds --[[-------------------------------------------- Sidebar fonts ------------------------------------------...
nilq/small-lua-stack
null
local state = {} state._NAME = ... require'hcm' local vector = require'vector' local util = require'util' local movearm = require'movearm' local libArmPlan = require 'libArmPlan' local arm_planner = libArmPlan.new_planner() local T = require'Transform' --Initial hand angle local lhand_rpy0 = Config.armfsm.dooro...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- User story: https://github.com/smartdevicelink/sdl_requirements/issues/2 -- Use case: https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/RC/current_module_status_data.md -- Item: Use Case 1:...
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_collections_trader_eng_left_leg = object_tangible_loot_creature_loot_collections_shared_trader_eng_left_leg:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_trader_eng_left_leg, "object/tangible/loot/creature/loot/collections/trader_eng_left_leg.iff...
nilq/small-lua-stack
null
slot0 = class("SaratogaSkinPage", import(".TemplatePage.PreviewTemplatePage")) slot0.OnInit = function (slot0) slot0.super.OnInit(slot0) slot0.shopBtn = slot0:findTF("btn_list/shop", slot0.bg) slot0.fightBtn = slot0:findTF("btn_list/fight", slot0.bg) end slot0.OnFirstFlush = function (slot0) slot0.super.OnFirstF...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Module declaration -- local mod, CL = BigWigs:NewBoss("Mindbender Ghur'sha", 643, 103) if not mod then return end mod:RegisterEnableMob(40788, 40825) mod.engageId = 1046 mod.respawnTime = 30 ------------------------------------------...
nilq/small-lua-stack
null
MenuUIManager = MenuUIManager or class() local Manager = MenuUIManager function Manager:init() self._menus = {} end function Manager:add_menu(menu) table.insert(self._menus, menu) end function Manager:remove_menu(menu) table.delete(self._menus, menu) end function Manager:get_active_menu()...
nilq/small-lua-stack
null
-- For use with Tup: <http://gittup.org/tup/> local sources = { "LNVL.lua", "src/*.lua", "src/settings.lua.example", "src/rgb.txt", "examples/*.lua", "main.lua", } tup.rule( {"LNVL.lua", "./src/*.lua", "./src/settings.lua.example"}, "^ Running luacheck on LNVL^ luacheck %f --std=luajit...
nilq/small-lua-stack
null
fx_version 'cerulean' games { 'gta5' } version '1.4.8' description 'https://github.com/thelindat/nui_doorlock' server_scripts { '@es_extended/locale.lua', 'config.lua', 'server/main.lua' } client_scripts { '@es_extended/locale.lua', 'config.lua', 'client/main.lua' } dependency 'es_extended' ui_page { 'ht...
nilq/small-lua-stack
null
object_tangible_collection_flower_16 = object_tangible_collection_shared_flower_16:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_flower_16, "object/tangible/collection/flower_16.iff")
nilq/small-lua-stack
null
-- Net for message sending util.AddNetworkString( "lags_sendmsg" ) util.AddNetworkString( "lags_sendnotify" ) -- Vars local lags = {} -- Table vars lags.interval = 1 / engine.TickInterval() lags.maxLag = lags.interval * .2 lags.prevTime = SysTime() lags.maxDiff = lags.interval * 3 lags.lags = 0 lags.lastMsgTime = 0 lag...
nilq/small-lua-stack
null
local randomfunctions = {} function randomfunctions.AddScreen(strNewScreen) table.insert(garrCurrentScreen, strNewScreen) end function randomfunctions.RemoveScreen() table.remove(garrCurrentScreen) if #garrCurrentScreen < 1 then print(inspect(tree)) success, message = love.filesystem.write( "tree....
nilq/small-lua-stack
null
local state = {} state._NAME = ... local Body = require'Body' local util = require'util' local vector = require'vector' local USE_ADJUSTMENT = false local t_entry, t_update, t_exit local wp_thread local dist_threshold = 0.05 local angle_threshold = 5 * DEG_TO_RAD local maxStep = 0.08 local maxTurn = 0.15 local ...
nilq/small-lua-stack
null
-- Submodule for handling all networking operations between nodes. module('concurrent._distributed._network', package.seeall) require 'socket' require 'copas' require 'mime' require 'cltime' nodename = nil -- The node's unique name. connections = {} -- Active connections to other node...
nilq/small-lua-stack
null
--MAXIME local hotlinesGUI = {} function drawPhoneHotlines(xoffset, yoffset) if not isPhoneGUICreated() then return false end if not xoffset then xoffset = 0 end if not yoffset then yoffset = 0 end if wHotlines and isElement(wHotlines) then return false --destroyElement(wHotlines) end wHotlines = guiCre...
nilq/small-lua-stack
null
--[[ 策略 解阵计 ]] -- 显示延时 local C_SHOW_DELAY = 0.8 -- 策略命中 local C_TEAMSTY_HIT = "TEAMSTY_HIT" local DissolveFormation = class("DissolveFormation", import("._StrategyBase")) -- 构造函数 function DissolveFormation:ctor(config) if config then table.merge(self,config) end end -- 执行函数 function DissolveFormation:execute(...
nilq/small-lua-stack
null
Config = {} Config.Debug = false Config.OnlyRegisteredCars = false -- If true only cars in owned_vehicles table could be searched for key Config.UseProgressBar = true Config.Locale = 'en'
nilq/small-lua-stack
null
local Teams = { Id = 0, Score = 0, Milestones = 0, Players = { All = {}, Alive = {}, Dead = {}, }, IncludeBots = false, RespawnCost = 1000, Display = { ScoreMessage = false, ScoreMilestone = true, ObjectiveMessage = true, ObjectiveP...
nilq/small-lua-stack
null
--whitelist for productivity module effect for _, mod in pairs(data.raw.module) do if mod.effect ~= nil then for _, effect in pairs(mod.effect) do if effect[1] == productivity then if mod.limitation ~= nil then local limitation = mod.limitation --new stuff table.insert(limitation, "17-military-...
nilq/small-lua-stack
null
local function setTooltip(text) return { type = 'setTooltip', text = text, } end return setTooltip
nilq/small-lua-stack
null
CmdMgr.register{ name = 'respawn', aliases = {'rs'}, desc = "Checks if map supports respawn", args = { {'mapName', type = 'str', defVal = false}, }, func = function(ctx, mapName) local map if(mapName) then map = findMap(mapName) else local room = ctx.player.room map = getCurrentMap(r...
nilq/small-lua-stack
null
local cjson = require("cjson") local _M = {} function _M.make_error () ngx.status = ngx.HTTP_INTERNAL_SERVER_ERROR ngx.header.content_type = "application/json; charset=utf-8" ngx.say(cjson.encode({ timestamp = os.time(os.date("!*t")), status = ngx.HTTP_INTERNAL_SERVER_ERROR, error = "Internal Server Error...
nilq/small-lua-stack
null
--- -- disguiser @{ITEM} -- @module DISGUISE -- @see ITEM DISGUISE = CLIENT and {} if SERVER then AddCSLuaFile() end ITEM.hud = Material("vgui/ttt/perks/hud_disguiser.png") ITEM.EquipMenuData = { type = "item_active", name = "item_disg", desc = "item_disg_desc" } ITEM.material = "vgui/ttt/icon_disguise" ITEM.Can...
nilq/small-lua-stack
null
project "lame" uuid "b545694a-ce2a-44f8-ba88-147c36369308" language "C" location ( "../../build/" .. mpt_projectpathname .. "/ext" ) mpt_projectname = "lame" dofile "../../build/premake/premake-defaults-DLL.lua" dofile "../../build/premake/premake-defaults.lua" targetname "openmpt-lame" includedirs {...
nilq/small-lua-stack
null
local CAT = "hundo" -- prkd, hundo local last_state = {} -- holds all state that has been changed up untill last save local preset_output = "" local last_step = nil local MEMTRACK = { -- {{{ { 0x07C3, 0x6, 'GFX Pointers' }, { 0x07F3, 0x2, 'Music Bank' }, { 0x07F5, 0x2, 'Music Track' }, { 0x078B, 0x2,...
nilq/small-lua-stack
null
object_tangible_scout_trap_trap_ap_tr_remote = object_tangible_scout_trap_shared_trap_ap_tr_remote:new { } ObjectTemplates:addTemplate(object_tangible_scout_trap_trap_ap_tr_remote, "object/tangible/scout/trap/trap_ap_tr_remote.iff")
nilq/small-lua-stack
null
function damage(keys) local caster = keys.caster local target = keys.target local ability = keys.ability local ability_level = ability:GetLevel() - 1 --处理冷却减少 local cd_reduction = caster:GetCooldownReduction() local ability_cooldown = ability:GetCooldown(ability_level) * cd_reduction loc...
nilq/small-lua-stack
null
local g = vim.g g.dashboard_disable_statusline = 1 g.dashboard_default_executive = "telescope" g.dashboard_custom_header = { "", "⡿⠋⠄⣀⣀⣤⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣌⠻⣿⣿", "⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠹⣿", "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠹", "⣿⣿⡟⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡛⢿⣿⣿⣿⣮⠛⣿⣿⣿⣿⣿⣿⡆", "⡟⢻⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣣⠄⡀⢬⣭⣻⣷⡌⢿⣿⣿⣿...
nilq/small-lua-stack
null
--[[ Introduction and details : Copyright Conor McKnight https://github.com/C0nw0nk/Nginx-Lua-Anti-DDoS Information : My name is Conor McKnight I am a developer of Lua, PHP, HTML, Javascript, MySQL, Visual Basics and various other languages over the years. This script was my soloution to check web traffic comming i...
nilq/small-lua-stack
null
--[[ This script contains the initial weapon configuration for the client. Addtional configuration on the server is necessary. ]]-- AddEvent("OnPackageStart", function() local Weapon = GetWeaponIdentifier():NewWeapon(1) Weapon:SetWeaponType(0) Weapon:SetWeaponSubType(0) Weapon:SetWeaponModel(nil) Weapon:SetSta...
nilq/small-lua-stack
null
require 'nn' net = nn.Linear(10, 10) params, grad_params = net:getParameters() n = net:clone() p, g = n:getParameters() p = params net:share(n, 'weight', 'bias') inp = torch.randn(10) n:forward(inp) grad = torch.randn(10) n:backward(inp, grad) n:updateParameters(1e-3) print(p:sum()) print(params:sum()) ...
nilq/small-lua-stack
null
Tackle = { Speed = 1200, Power = 0, CooldownMS = 500, DurationMS = 250, StunTimeMS = 1000, StunSpeedMod = 0.1, DisableMagnetOnHit = true, -- apply to the tackler }
nilq/small-lua-stack
null
-- © 2021 Emmanuel Lajeunesse -- Module local GizmoBool = {} -- Modules local GizmoBase = require(script.Parent.GizmoBase) local Utility = require(script.Parent.Parent.Parent.Utility) -- Constants local COLOR_DARK = Color3.fromRGB(43, 43, 43) ---------------- -- Public API -- ---------------- function GizmoBool.new...
nilq/small-lua-stack
null
----------------------------------- -- Area: Windurst_Waters -- NPC: Otete -- Only sells when Windurst controlls Li'Telor Region -- Confirmed shop stock, August 2013 ----------------------------------- local ID = require("scripts/zones/Windurst_Waters/IDs"); require("scripts/globals/conquest"); require("scripts/global...
nilq/small-lua-stack
null
local transform; local gameObject; TestPanel = {}; local this = TestPanel; --启动事件-- function TestPanel.Awake(obj) gameObject = obj; transform = obj.transform; this.InitPanel(); logWarn("Awake lua--->>"..gameObject.name); end --初始化面板-- function TestPanel.InitPanel() UpdateBeat.Add(TestPanel.Update, this) end f...
nilq/small-lua-stack
null
local media = LibStub("LibSharedMedia-3.0", true) local L = Grid2Options.L Grid2Options:RegisterIndicatorOptions("icons", true, function(self, indicator) local statuses, options = {}, {} self:MakeIndicatorTypeLevelOptions(indicator,options) self:MakeIndicatorAuraIconsLocationOptions(indicator, options) self:MakeI...
nilq/small-lua-stack
null
-- Point Utils -- ------------ -- This module provides utility methods that pertain to a specific point/coordinate on the screen. It -- should be used with an `hs.geometry` object with x and y values. local Point = {} Point.isAtMap = { top = function(point, parent, margin) return (point.y - parent.y <= margin)...
nilq/small-lua-stack
null
local BasePlugin = require "kong.plugins.base_plugin" local jwt_decoder = require "kong.plugins.jwt.jwt_parser" local JWT_PLUGIN_PRIORITY = (require "kong.plugins.jwt.handler").PRIORITY local CLAIM_HEADERS = require "kong.plugins.jwt-claim-headers.claim_headers" local ngx_set_header = ngx.req.set_header local ngx_re_g...
nilq/small-lua-stack
null
local function fn() local inst = CreateEntity() local trans = inst.entity:AddTransform() inst.entity:AddGroundCreepEntity() inst.GroundCreepEntity:SetRadius( 3 ) inst:DoTaskInTime(5, function() inst:Remove() end) inst.persists = false return inst end return Prefab("common/spider_web_spit_creep", fn)
nilq/small-lua-stack
null
require("commons") -- Constants/settings local oreSettings = getOreSettings() local uraniumGlowSetting = settings.startup[uraniumGlowSettingName].value -- Utils local function getNewTexturePath(oldTexturePath) local newTexturePath,changes = string.gsub(oldTexturePath, "^__SimpleCompress__/graphics/", modRoot .. "/gr...
nilq/small-lua-stack
null
-- engine stats -- needs patch: https://github.com/pandorabox-io/minetest_docker/blob/master/patches/lua_profiler.patch -- <engine-metric-name> -> metric local engine_metrics = {} engine_metrics["Server::AsyncRunStep() [ms]"] = monitoring.gauge( "engine_async_run_step", "async run step time average in milliseconds"...
nilq/small-lua-stack
null
ItemModule = {} ItemModule["basic_items"] = { "item_aegis"; "item_courier"; "item_boots_of_elves"; "item_belt_of_strength"; "item_blade_of_alacrity"; "item_blades_of_attack"; "item_blight_stone"; "item_blink"; "item_boots"; "item_bottle"; "item_broadsword"; "item_chainmail"; "item_cheese"; "item_circ...
nilq/small-lua-stack
null
local switch = require("switch") local identify = require("identify") local multistream = require("multistream") local ythr = require("ythr") local ping = require("ping") local sw = switch:new() sw:setProtocolHandler(identify.protocolID, identify.handle) ythr.go(function () local mp, err = sw:dial("127.0.0.1", 4001...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: macbookair -- Date: 30/03/17 -- Time: 19:07 -- To change this template use File | Settings | File Templates. -- local textField = { } function textField:newTextField(options) local newTextField = {} setmetatable(newTextField, {__index=textField}) newTextField._nat...
nilq/small-lua-stack
null
local ffi = require("ffi") local C = ffi.C local errors = require("levee.errors") local HashRingNode_mt = {} HashRingNode_mt.__index = HashRingNode_mt function HashRingNode_mt:__tostring() return string.format("levee.HashRingNode: name=%s, avail=%d", self:key(), self.avail) end function HashRingNode_mt:key() ...
nilq/small-lua-stack
null
---@class lookForward local m = {} --- 是否是空白符 ---@param inline boolean # 必须在同一行中(排除换行符) function m.isSpace(char, inline) if inline then if char == ' ' or char == '\t' then return true end else if char == ' ' or char == '\n' or char == '\r' or ...
nilq/small-lua-stack
null
local test = require 'regress' local ipc = require 'libipc' local Tree = require 'ipc.Tree' local function testAllReduce(njobs, base, makeValue, reduce) local server, port = ipc.server('127.0.0.1') local m = ipc.map(njobs - 1, function(njobs, base, port, makeValue, reduce, mapid) local ipc = require 'libip...
nilq/small-lua-stack
null
-- ======== -- IS VALID -- ======== Test = TestSuite:New({['Name'] = 'IsValid'}) Test:It({ ['description'] = 'Should return false for nil', ['fun'] = IsValid, ['params'] = {nil}, ['expectation'] = {false} }) Test:It({ ['description'] = 'Should return false for 0', ['fun'] = IsValid, ['...
nilq/small-lua-stack
null
--@sec: Sync --@ord: -1 --@doc: Sync provides primitives for working with threads and events. local Sync = {} --@sec: Sync.resume --@def: Sync.resume(thread: thread, ...any) --@doc: resume resumes *thread* with the remaining arguments, returning no -- values. If the thread returns an error, then the error is printed a...
nilq/small-lua-stack
null
local M = {} M.filename = function(bufnr) local file = vim.fn.bufname(bufnr) local buftype = vim.fn.getbufvar(bufnr, '&buftype') local filetype = vim.fn.getbufvar(bufnr, '&filetype') if buftype == 'help' then return 'help:' .. vim.fn.fnamemodify(file, ':t:r') elseif buftype == 'quickfix' then return ...
nilq/small-lua-stack
null
--委托 local SetAge1Rst local function SetAge1(i) SetAge1Rst = i end local delegate = Delegate.New(nil, SetAge1) --使用Invoke调用 delegate:Invoke(2) assert(SetAge1Rst == 2) --实例委托 local SetNumberRst local TestObject = class.extends("Test.TestObject", Object) function TestObject:SetNumber(i) SetNumberRst = i end ...
nilq/small-lua-stack
null
----------------------------------- -- Area: Northern San d'Oria -- NPC: Jufaue -- Type: Past Event Watcher -- !pos 13.221 -1.199 -19.231 231 -- -- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) ...
nilq/small-lua-stack
null
local USERDATA_TAG = "hs._asm.guitk.menubar" local module = {} local statusitem = require(USERDATA_TAG .. ".statusitem") local menu = require(USERDATA_TAG .. ".menu") local menuitem = require(USERDATA_TAG .. ".menuItem") local styledtext = require("hs.styledtext") local eventtap = require("hs.eventtap"...
nilq/small-lua-stack
null
--[[ Sem Klauke, 2019 Random Kill List, Gary's Mod, TTT Main file, starting point ]]-- local config = include("rkl_config.lua") -- globals -- local PLAYERS = {} -- All players in the round local TRAITORS = {} -- All traitors in the round local VOTES = {} local VOTE_COUNTS = {} local TRAITOR_KILLERS = {} ...
nilq/small-lua-stack
null
-- sudo luarocks install lunajson require "globals" local Player = require "Player" local Game = require "Game" local Menu = require "Menu" local SFX = require "SFX" math.randomseed(os.time()) -- randomize game function love.load() love.mouse.setVisible(false) local save_data = readJSON("save") sfx ...
nilq/small-lua-stack
null
local L = BigWigs:NewBossLocale("The MOTHERLODE!! Trash", "deDE") if not L then return end if L then L.tester = "Waffentester" L.assassin = "Auftragsmörder" L.jockey = "Mechjockey" L.earthshaper = "Erdformer der Venture Co." L.stonefury = "Steinzorn" L.assistant = "Nichtsnutziger Assistent" L.technician = "Techn...
nilq/small-lua-stack
null
object_static_structure_content_exar_kun_worklamp = object_static_structure_content_shared_exar_kun_worklamp:new { } ObjectTemplates:addTemplate(object_static_structure_content_exar_kun_worklamp, "object/static/structure/content/exar_kun_worklamp.iff")
nilq/small-lua-stack
null
Game.ImportLibrary("gui/scripts/cinematics_items.lua") cinematics = cinematics ~= nil and cinematics or {} function cinematics.OnCutsceneStarted(_ARG_0_, _ARG_1_) if not _ARG_1_ then local cinematic = cinematics.GetCinematicDefFromPath(_ARG_0_) if cinematic ~= nil then cinematics.SetCinemati...
nilq/small-lua-stack
null
return PlaceObj("ModDef", { "title", "Change Lightmodel", "id", "ChoGGi_ChangeLightmodel", "lua_revision", 1007000, -- Picard "steam_id", "2374255691", "pops_any_uuid", "da3534ae-2882-4b77-a628-5ff66fbc8027", "version", 1, "version_major", 0, "version_minor", 1, "image", "Preview.jpg", "author", "ChoGGi", "c...
nilq/small-lua-stack
null
local nn = require 'nn' local Model = {} function Model:createAutoencoder(X) local featureSize = X:size(2) -- Create encoder self.encoder = nn.Sequential() self.encoder:add(nn.Linear(featureSize, 2000)) self.encoder:add(nn.ReLU(true)) self.encoder:add(nn.Linear(2000, 1000)) self.encoder:add(nn.ReLU(tru...
nilq/small-lua-stack
null
-- Zone: Outer Horutoto Ruins (194) -- Desc: this file contains functions that are shared by multiple luas in this zone's directory ----------------------------------- local ID = require("scripts/zones/Outer_Horutoto_Ruins/IDs") require("scripts/globals/keyitems") require("scripts/globals/missions") -------------------...
nilq/small-lua-stack
null
-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. -- Smalltalk LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'smalltalk'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. loca...
nilq/small-lua-stack
null
RegisterServerEvent('ND_hospital:server:AttemptHiddenRevive') AddEventHandler('ND_hospital:server:AttemptHiddenRevive', function() local src = source math.randomseed(os.time()) local luck = math.random(100) < Config.HiddenRevChance local totalBill = CalculateBill(GetCharsInjuries(src), Config.HiddenInj...
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------------- -- -- File: UTGame.Ui.Basics.lua -- Copyright (c) Ubisoft Entertainment. All rights reserved. -- -- Project: Ubitoys.Tag -- Date: September 2, 2010 -- ---------------------------------...
nilq/small-lua-stack
null
ITEM.Name = "Bowie knife" .. " | " .. "Fade" ITEM.Price = 20000 ITEM.Model = "models/weapons/w_csgo_bowie.mdl" ITEM.Skin = 10 ITEM.WeaponClass = "csgo_bowie_fade" function ITEM:OnEquip(ply) ply:Give(self.WeaponClass) end function ITEM:OnBuy(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end fu...
nilq/small-lua-stack
null
-------- BEGIN keys --------- local queue = KEYS[1] local schedule_set = KEYS[2] local retry_set = KEYS[3] -------- END keys --------- -------- BEGIN Arguments --------- local digest = ARGV[1] -------- END Arguments --------- -------- BEGIN injected arguments -------- local current_time = tonumbe...
nilq/small-lua-stack
null
local Driver = {} Driver.__index = Driver local ReplicatedStorage = game:GetService("ReplicatedStorage") local Shared, RemotesFolder = nil, nil function Driver:_Initialize() print(self._Name, "initialized") end function Driver:_Start() print(self._Name, "started") end function Driver:_Remote(event, func) end f...
nilq/small-lua-stack
null
local skynet = require "skynet" local service_address local function start_service(max_threads) service_address = skynet.uniqueservice("blocking", max_threads) end local function fetch_blocking_service(cb, timeout) if not service_address then start_service(4) end local addr, err = skynet.call(service_address,...
nilq/small-lua-stack
null
local a = {1, 2, 3} local b = {a, a} local c = {x = b, y = b} return c
nilq/small-lua-stack
null
hook.Add("HUDPaint", "GoldenHudV1.lockdown", function() if GoldenHUDV1.EnableLockdown then if GetGlobalBool("DarkRP_LockDown") then local shouldDraw = hook.Call("HUDShouldDraw", GAMEMODE, "DarkRP_LockdownHUD") if shouldDraw == false or !DarkRP then return end local y = 75 ...
nilq/small-lua-stack
null