content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild -- -- This file is compatible with Lua 5.3 local class = require("class") require("kaitaistruct") local stringstream = require("string_stream") ExprSizeofValueSized = class.class(KaitaiStruct) function ExprSizeofValue...
nilq/small-lua-stack
null
-- Copyright 2004-present Facebook. All Rights Reserved. require('fb.luaunit') require('math') require('fbtorch') require('nn') require('fbcunn.layers.cpu') require('fbcunn.layers.GroupKMaxPooling') function run_GroupKMaxPooling_updateOutput(n, d, k) -- n = number of words -- d = dimension of embeddings ...
nilq/small-lua-stack
null
slot0 = class("DragonExploreView", function () return cc.LayerColor:create(cc.c4b(0, 0, 0, 128)) end) slot0.ctor = function (slot0, slot1, slot2, slot3) slot0._score_reward = slot1 slot0.controller = slot2 slot0:initUI(slot3) end slot0.initUI = function (slot0, slot1) slot0:setPositionX(slot1) slot0._skeleton...
nilq/small-lua-stack
null
local networks = {} local net_members = {} local netname = 1 bitumen.mod_storage = minetest.get_mod_storage() local mod_storage = bitumen.mod_storage networks = minetest.deserialize(mod_storage:get_string("networks")) or {} net_members = minetest.deserialize(mod_storage:get_string("net_members")) or {} netname ...
nilq/small-lua-stack
null
cprogram { ins = { "third_party/emu2/src/cpu.c", "third_party/emu2/src/loader.c", "third_party/emu2/src/main.c", "third_party/emu2/src/codepage.c", "third_party/emu2/src/dosnames.c", "third_party/emu2/src/dis.c", "third_party/emu2/src/dos.c", "third_party/emu2/src/keyb.c", "third_party/emu2/src/dbg.c...
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_collections_bondar_crystal = object_tangible_loot_creature_loot_collections_shared_bondar_crystal:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_bondar_crystal, "object/tangible/loot/creature/loot/collections/bondar_crystal.iff")
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- User story: TBD -- Use case: TBD -- -- Requirement summary: -- [SDL_RC] TBD -- -- Description: -- In case: -- 1) RC app1 and RC app2 are registered -- 2) Module_1 is allocated by app1 -- 3) App2 allocates the allocate...
nilq/small-lua-stack
null
--proc/monitor: Multiple display monitors functions setfenv(1, require'winapi') require'winapi.window' --creation ffi.cdef [[ static const int CCHDEVICENAME = 32; typedef struct tagMONITORINFOEXW { DWORD cbSize; RECT rcMonitor; RECT rcWork; DWORD dwFlags; WCHAR szDevice[CCHDEVICENAME...
nilq/small-lua-stack
null
--- Class describes CryptoKey object -- -- The object could be created directly, use @{Crypto:Key} instead -- @classmod CryptoKey -- @pragma nostrip setfenv(1, require "sysapi-ns") local CryptoKey = SysapiMod("CryptoKey") local CryptoKey_MT = {__index = CryptoKey, __call = CryptoKey.new} local advapi32 = ffi.load("adv...
nilq/small-lua-stack
null
--[[ Seriál "Programovací jazyk Lua" Demonstrační příklad k článku: Lua Fun: knihovna pro zpracování konečných i nekonečných sekvencí v jazyce Lua ]] -- načtení knihovny Lua Fun a současně import symbolů do globálního jmenného prostoru require "fun"() -- pomocná funkce pro tisk několika prvků nekonečné...
nilq/small-lua-stack
null
object_mobile_vehicle_light_bending_barc = object_mobile_vehicle_shared_light_bending_barc:new { templateType = VEHICLE, decayRate = 15, -- Damage tick per decay cycle decayCycle = 600 -- Time in seconds per cycle } ObjectTemplates:addTemplate(object_mobile_vehicle_light_bending_barc, "object/mobile/vehicle/light_b...
nilq/small-lua-stack
null
-- Attack with Antiship Missiles -- -- This script will start a limited-munition-attack task -- for each missile that is to be launched. Each one -- is an instantaneous attack, and each is started -- as soon as the previous one is complete. Multiple-missile -- attacks are implemented as multiple limited-munition-attack...
nilq/small-lua-stack
null
local command = wincent.vim.command local nmap = wincent.vim.nmap -- -- Settings. -- vim.g.CommandTCancelMap = {'<ESC>', '<C-c>'} local term = vim.api.nvim_get_option('term') -- because `vim.o.term` goes 💥 if vim.regex('screen|tmux|xterm'):match_str(term) then vim.g.CommandTSelectNextMap = {'<C-j>', '<Down>', '<...
nilq/small-lua-stack
null
local mgn = mgn mgn.VOXList = { ["_comma"] = {Path = "sound/vox/_comma.wav", Duration = 0.248889}, ["_period"] = {Path = "sound/vox/_period.wav", Duration = 0.431202}, ["a"] = {Path = "sound/vox/a.wav", Duration = 0.372789}, ["accelerating"] = {Path = "sound/vox/accelerating.wav", Duration = 1.136871}, ["accelera...
nilq/small-lua-stack
null
--********************************************** object_tangible_wearables_cybernetic_shared_cybernetic_anakin_forearm = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/cybernetic/shared_cybernetic_anakin_forearm.iff" } ObjectTemplates:addClientTemplate(object_tangible_wearable...
nilq/small-lua-stack
null
-- vim.cmd([[ -- highlight Normal guibg=none ctermbg=none -- highlight NonText guibg=none ctermbg=none -- ]]) vim.cmd([[ autocmd! BufWinLeave * let b:winview = winsaveview() autocmd! BufWinEnter * if exists('b:winview') | call winrestview(b:winview) | unlet b:winview autocmd FileType css,javascript,json,scss setl iske...
nilq/small-lua-stack
null
local M = {} function Solution_1() term_cur = 2 term_last = 1 sum = 0 while term_cur < 4000000 do if term_cur % 2 == 0 then sum = sum + term_cur end temp = term_cur term_cur = term_cur + term_last term_last = temp end return sum end function ...
nilq/small-lua-stack
null
impulse.Ops.ST = impulse.Ops.ST or {} util.AddNetworkString("impulseOpsSTOpenTool") util.AddNetworkString("impulseOpsSTDoRefund") util.AddNetworkString("impulseOpsSTGetRefund") util.AddNetworkString("impulseOpsSTDoOOCEnabled") util.AddNetworkString("impulseOpsSTDoTeamLocked") util.AddNetworkString("impulseOpsSTDoGroup...
nilq/small-lua-stack
null
local tunnelStartTrigger = script.parent local tunnelEndTrigger = script:GetCustomProperty("TunnelEndTrigger"):WaitForObject() local speedKeyBinding = "ability_extra_17" local slowFallSpeed = 2500 local fallingWalkSpeed = 2000 local function IsPlayerFalling(player) return player.maxWalkSpeed == fallingWalkSpeed a...
nilq/small-lua-stack
null
---------------------- -- Define hyper key -- ---------------------- hyper = {"ctrl", "alt", "cmd"} meta = {"cmd", "shift"}
nilq/small-lua-stack
null
FROM("gcr.io/distroless/static", "traefik") UPLOAD("traefik.v2.4.8", "/traefik") ENTRYPOINT("/traefik", "--config", "/config/traefik.yaml") COMMIT("traefik:2.4.8")
nilq/small-lua-stack
null
------------------------------------------------------------------------------ -- Tabs class ------------------------------------------------------------------------------ local ctrl = { nick = "tabs", parent = WIDGET, creation = "v", callback = { tabchange_cb = "ii", }, funcname = "Tabsv", ...
nilq/small-lua-stack
null
-- Additions for Space Exploration mod. local util = require("__bztitanium__.data-util"); if data.raw.recipe["se-space-pipe"] then -- Space Exploration space stuff util.steel_to_titanium(data.raw.recipe["se-space-pipe"]) util.steel_to_titanium(data.raw.recipe["se-space-pipe"].normal) util.steel_to_titanium(dat...
nilq/small-lua-stack
null
return {'opeen','opeendringen','opeengeklemd','opeengepakt','opeengepropt','opeenhopen','opeenhoping','opeens','opeenstapelen','opeenstapeling','opeenvolgen','opeenvolgend','opeenvolging','opeisbaar','opeisbaarheid','opeisen','opeising','open','openbaar','openbaarheid','openbaarheidsbeginsel','openbaarmaking','openbaar...
nilq/small-lua-stack
null
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local world = require(ReplicatedStorage.tetris.shared.world) for _, system in pairs(ReplicatedStorage.tetris.client.systems:GetChildren()) do world:addSystem(system) end local board = Instance.new("Part")...
nilq/small-lua-stack
null
local M = {} local fn = vim.fn local shellescape = fn.shellescape local function range(from, to) local step = 1 return function(_, lastvalue) local nextvalue = lastvalue + step if step > 0 and nextvalue <= to or step < 0 and nextvalue >= to or step == 0 then return nextvalue end end,n...
nilq/small-lua-stack
null
do function run(msg, matches) return [[ > Alomina Bot Super GP > Anti spam bot in Lua SUDO : @AttackerTeleagent > with lots of COOL stuffs! ⚙ from now on you can have your own ANTI SPAM Group! just contact to our SUDO for buying GP!🎁 dont forget to visit our channel : @Alominateam Our Team: 👥 @spammer021 @A...
nilq/small-lua-stack
null
--inbetween.lua inbetween = {} require "states/game" local curSpecial = { {0, 255, 0, 255}, -- 1 {255, 255, 255, 255}, -- 2 {255, 255, 255, 255}, -- 3 {255, 255, 255, 255}, -- 4 {255, 255, 255, 255}, -- 5 {255, 255, 255, 255}, -- 6 } local states = { {"battle ", "level ", "special ", "help "}, {"vit...
nilq/small-lua-stack
null
data:extend({ { type = "technology", name = "orbital-ion-cannon", icon = "__Orbital Ion Cannon__/graphics/icon64.png", icon_size = 64, prerequisites = {"rocket-silo", "energy-weapons-damage-6"}, effects = { { type = "unlock-recipe", recipe = "orbital-ion-cannon" }, { ty...
nilq/small-lua-stack
null
--- Remote interface functions remote.add_interface("advanced-logistics-system", { showSettings = function(player) local index = player.index hideGUI(player, index) showSettings(player, index) end, activateSystem = function(player) loc...
nilq/small-lua-stack
null
E2Lib.RegisterExtension("glon", true) if not glon then pcall(require,"glon") end local last_glon_error = "" -- GLON output validation local DEFAULT = {n={},ntypes={},s={},stypes={},size=0,depth=0} --[[ wire_expression2_glon = {} wire_expression2_glon.history = {} wire_expression2_glon.players = {} local function l...
nilq/small-lua-stack
null
struct = { name = "messageStruct", fields = { {name = "term", type = "int"}, {name = "fromNode", type = "int"}, {name = "toNode", type = "int"}, {name = "type", type = "string"}, {name = "value", type = "string"} } } interface = { name = "minhaInt", methods = { ReceiveMessage = { ...
nilq/small-lua-stack
null
local menu = {} function menu.load( prev_state, ... ) music:play() end function menu.update( dt ) end function menu.draw() love.graphics.print("Menu gamestate. Press Enter to continue.", 280, 250) end function menu.keyreleased( key, code ) if key == "return" then gamestates.set_state( "game"...
nilq/small-lua-stack
null
-- //////////////////////////////////// -- // MYSQL // -- //////////////////////////////////// sqlUsername = exports.mysql:getMySQLUsername() sqlPassword = exports.mysql:getMySQLPassword() sqlDB = exports.mysql:getMySQLDBName() sqlHost = exports.mysql:getMySQLHost() sqlPort = exports.mysql:getMySQLPort()...
nilq/small-lua-stack
null
local route = {map = {}, instance = nil} function route:new() local cls = {} setmetatable(cls, self) self.__index = self return cls end function route:get_instance() if self.instance == nil then self.instance = self:new() end return self.instance end function route:free() if s...
nilq/small-lua-stack
null
require("freq") EventHandler.instance:on(Events.INIT, function(ev) FreqTraffic.instance = FreqTraffic() end) require("traffic") require("traffic_events") EventHandler.instance:on(Events.INIT, function(ev) Traffic.instance = Traffic() TrafficEvents.instance = TrafficEvents(Traffic.instance...
nilq/small-lua-stack
null
fprp.initDatabase = fprp.stub{ name = "initDatabase", description = "Initialize the fprp database.", parameters = { }, returns = { }, metatable = fprp } fprp.storeRPName = fprp.stub{ name = "storeRPName", description = "Store an RP name in the database.", parameters = { { name = "ply", description = ...
nilq/small-lua-stack
null
local TradeTicket = {} local BUY = 0 local SELL = 1 function TradeTicket:new(o) o = o or {} -- create object if user does not provide one setmetatable(o, self) self.__index = self local window = Apollo.LoadForm(TradeTicket.xmlDoc, "TradeTicket", nil, o) o.window = window Apollo.RegisterEventHandler("PostCo...
nilq/small-lua-stack
null
-- Copyright (c) 2018 Redfern, Trevor <trevorredfern@gmail.com> -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT local Queue = require "moonpie.collections.queue" local results = Queue:new() local oldrandom = math.random local function setreturnvalues(o) for _, v in ipai...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Spine Runtimes License Agreement -- Last updated January 1, 2020. Replaces all prior versions. -- -- Copyright (c) 2013-2020, Esoteric Software LLC -- -- Integration of the Spine Runtimes into software or otherwise creating -- derivative...
nilq/small-lua-stack
null
local util = require("util") vim.o.completeopt = "menuone,noselect" require("compe").setup({ enabled = true, autocomplete = true, debug = false, min_length = 1, preselect = "always", -- changed to "enable" to prevent auto select throttle_time = 80, source_timeout = 200, incomplete_delay = 400, max_a...
nilq/small-lua-stack
null
-- {{{ other files -- todo: too many things require too many other things, needs fix local config = require("celediel.NPCsGoHome.config").getConfig() local common = require("celediel.NPCsGoHome.common") local checks = require("celediel.NPCsGoHome.functions.checks") local processors = require("celediel.NPCsGoHome.functi...
nilq/small-lua-stack
null
--[[ _______ ______ ______ _____ _ _ _______ ______ ______ _____ _ _ | |______ |_____] |_____/ | |____/ |_____| |_____] |_____/ | | |____/ |_____ |______ |_____] | \_ __|__ | \_ | | |_____] | \_ |_____| | \_ ...
nilq/small-lua-stack
null
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- function hide() setVisible(false); window[trigger[1]].setVisible(true); end function onEnter() hide(); return true; end function onLoseFocus() hide(); end function onValueChanged() -- The ta...
nilq/small-lua-stack
null
local ObjectManager = require("managers.object.object_manager") kidnappedNobleConvoHandler = conv_handler:new {} function kidnappedNobleConvoHandler:runScreenHandlers(pConvTemplate, pPlayer, pNpc, selectedOption, pConvScreen) local screen = LuaConversationScreen(pConvScreen) local screenID = screen:getScreenID() ...
nilq/small-lua-stack
null
return { version = "1.5", luaversion = "5.1", tiledversion = "1.7.1", orientation = "orthogonal", renderorder = "right-down", width = 60, height = 32, tilewidth = 32, tileheight = 32, nextlayerid = 2, nextobjectid = 1, properties = {}, tilesets = { { name = "&Grass&", ...
nilq/small-lua-stack
null
local ffi = require("ffi") function getFPGATimestamp() return ffi.C.GetFPGATimestamp() end function getTimeSeconds() return ffi.C.GetFPGATimestamp() end
nilq/small-lua-stack
null
-- Copyright 2022 SmartThings -- -- 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 or agreed to in ...
nilq/small-lua-stack
null
vRPas = {} Tunnel.bindInterface("vrp_armorshop",vRPas) ASserver = Tunnel.getInterface("vrp_armorshop","vrp_armorshop") function vRPas.getArmour() return GetPedArmour(GetPlayerPed(-1)) end function vRPas.setArmour(armour,vest) local player = GetPlayerPed(-1) if vest then if(GetEntityModel(player) == GetHashKey...
nilq/small-lua-stack
null
local PerlinWorms = { } function PerlinWorms.new(Size, Seed, Resolution, TargetCFrame) local TargetCFrame = TargetCFrame or CFrame.new(math.random(5, 10), math.random(5, 10), math.random(5, 10)) local Resolution = (Resolution or 4) + .1 local Seed = Seed or tick() local Points = { } for _ = 1, Si...
nilq/small-lua-stack
null
local awful = require('awful') local beautiful = require('beautiful') local wibox = require('wibox') local apps = require('configuration.apps') local dpi = require('beautiful').xresources.apply_dpi local left_panel = function(screen) local action_bar_width = dpi(48) local panel_content_width = dpi(400) local pa...
nilq/small-lua-stack
null
local itemDatas = {} local names = {} -- local defaultItemData = API.ItemData'????????', '????????', 0.1) function API.getItemDataFromId(id) return itemDatas[id] end function API.getItemDataFromName(name) if names[name] ~= nil then return itemDatas[names[name]] end end Citizen.CreateThread( ...
nilq/small-lua-stack
null
//I will most likely coroutine this whole process later. local CD = CurTime() local min = math.min local PowerGridRange = 300^2 --Ill make a local range for each generator some time maybe. function UpdatePowerGrid() if (CD > CurTime()) then return end //local s = SysTime() --Reset everythings power consumption...
nilq/small-lua-stack
null
local _2afile_2a = "fnl/nvim-minimap/config.fnl" local _0_ do local name_0_ = "nvim-minimap.config" local module_0_ do local x_0_ = package.loaded[name_0_] if ("table" == type(x_0_)) then module_0_ = x_0_ else module_0_ = {} end end module_0_["aniseed/module"] = name_0_ module_0_...
nilq/small-lua-stack
null
if( SERVER ) then AddCSLuaFile( "shared.lua" ) resource.AddFile("materials/vgui/ttt/icon_bb_katana.vmt") resource.AddFile( "models/weapons/W_katana.dx80.vtx" ) resource.AddFile( "models/weapons/W_katana.dx90.vtx" ) resource.AddFile( "models/weapons/w_katana.mdl" ) resource.AddFile( "models/weapons/W_katana.phy" )...
nilq/small-lua-stack
null
#!/usr/bin/lua --[[ Copyright (c) 2007-2009 Mauro Iazzi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: huanghaojing -- Date: 16/1/5 -- Time: 上午9:49 -- To change this template use File | Settings | File Templates. -- local platform_ios = true if getOSType and getOSType()=="android" then platform_ios = false end local json = platform_ios and require('sz').json or require('cjs...
nilq/small-lua-stack
null
-- Clean warning on openresty 1.15.8.1, where some global variables are set -- using ngx.timer that triggers an invalid warning message. -- Code related: https://github.com/openresty/lua-nginx-module/blob/61e4d0aac8974b8fad1b5b93d0d3d694d257d328/src/ngx_http_lua_util.c#L795-L839 getmetatable(_G).__newindex = nil if ng...
nilq/small-lua-stack
null
ENT.Base = "base_entity" ENT.Type = "anim" ENT.PrintName = "Element Skill" ENT.isskill = true AccessorFunc( ENT, "maxlive", "MaxLive", FORCE_INT ) local function StageChange( ent, name, oldval, newval ) ent.stage = newval if (!oldval) then return end if (oldval == newval) then return end local sk...
nilq/small-lua-stack
null
function love.draw() love.graphics.rectangle("fill", 100, 200, 50, 80) love.graphics.print("Hello World", 400, 300) end
nilq/small-lua-stack
null
ghomrassen_cupa_cupa_neutral_medium_boss_01 = Lair:new { mobiles = {{"gr_cu_pa",1}}, bossMobiles = {{"gr_wonderous_cu_pa",1}}, spawnLimit = 15, buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_garbage_small.iff"}, buildingsEasy = {"object/tangible/lair/base/poi_all_lair_garbage_small.iff"}, buildingsM...
nilq/small-lua-stack
null
local IAspectModdable = require("api.IAspectModdable") local IAspect = class.interface("IAspect", { localize_action = "function" }, { IAspectModdable }) function IAspect:localize_action(obj, iface) return "???" end function IAspect.__on_require(t) -- HACK Require the aspect's default impl so its deserializer w...
nilq/small-lua-stack
null
-- require "/lib/stardust/color.lua" appearance = { } local wingFront = Prop.new(2) local wingBack = Prop.new(-2) local wingAlpha = 0 local wingEffDir = 1.0 local wingsVisible = false local wingEnergyColor local wingBaseRot = 0 local wingBaseOffset = 0 wingFront:scale({0, 0}) wingBack:scale({0, 0}) local fieldAlph...
nilq/small-lua-stack
null
slot0 = class_C("BulletVisual", ClassLoader:aquireClass("Visual")) slot0.onCreate = function (slot0, slot1, slot2) slot0.super.onCreate(slot0) slot0:addProperty("boneData", slot2) slot0:addProperty("isDead", slot2) slot0:addProperty("isRemoved", slot2) slot0._textureName = slot1.szResourceName slot0._texturePat...
nilq/small-lua-stack
null
require "cutorch" require "cunn" model = nn.Sequential() l1 = nn.Linear(1,20):cuda() l2 = nn.Linear(20, 20):cuda() l3 = nn.Linear(20, 1):cuda() model:add(l1) model:add(nn.Tanh():cuda()) model:add(l2) model:add(nn.Tanh():cuda()) model:add(l3) criterion = nn.MSECriterion():cuda() for i = 1,100000 do local x = t...
nilq/small-lua-stack
null
--- old junk --[[ -- This contact force pair is artificial, but prevents the sticking of objects due to constraints (during stacking. I do not fully understand this yet) -- Contact force pair, obj2 on obj1 if (obj2.fX*normal_x+obj2.fY*normal_y)<=0 then fContact_mag=(obj2.fX*normal_x+obj2.fY*no...
nilq/small-lua-stack
null
-- Author: Hua Liang[Stupid ET] <et@everet.org> require 'VisibleRect' require 'logger'
nilq/small-lua-stack
null
AddCSLuaFile("shared.lua") AddCSLuaFile("cl_init.lua") include("shared.lua") local ACF = ACF ACF.RegisterClassLink("acf_computer", "acf_rack", function(Computer, Target) if Computer.Weapons[Target] then return false, "This rack is already linked to this computer!" end if Target.Computer == Computer then return fa...
nilq/small-lua-stack
null
local doc = {} function doc.record() doc.__record = {} end function doc.stop() local md = table.concat(doc.__record) doc.__record = nil return md end function doc.doc(str) if doc.__record then table.insert(doc.__record, str) end end setmetatable(doc, {__call= function(s...
nilq/small-lua-stack
null
local Actor = require "actor" local Vector2 = require "vector" local Tiles = require "tiles" local Sqeeto = Actor:extend() Sqeeto.char = Tiles["sqeeto"] Sqeeto.name = "sqeeter" Sqeeto.color = {0.8, 0.7, 0.09} Sqeeto.components = { components.Sight{ range = 4, fov = true, explored = false }, components.Move{ spee...
nilq/small-lua-stack
null
X = {} local IBUtil = require(GetScriptDirectory() .. "/ItemBuildlogic"); local npcBot = GetBot(); local talents = IBUtil.FillTalenTable(npcBot); local skills = IBUtil.FillSkillTable(npcBot, IBUtil.GetSlotPattern(1)); X["items"] = { "item_poor_mans_shield", "item_boots", "item_magic_wand", "item_power_treads_ag...
nilq/small-lua-stack
null
local m = {} local string = string local concat = table.concat function string.pgsub(str, from, to, count) from = from:gsub('%p', '%%%0') -- lazy version return string.gsub(str, from, to, count) end --[[ Process the contents of a file with a function. ]] local sformat = string.format local functio...
nilq/small-lua-stack
null
return { { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach", "onRemove" }, arg_list = { attr = "antiAirPower", number = 500 } } } }, { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach", "onRemove...
nilq/small-lua-stack
null
terrain_low_poly_mat = { passes = { base = { queue='opaque', shader='terrain_low_poly' }, depthPrepass = { shader='depth_prepass', } }, resources = { heightmap = { resType='texture2D', uv='clamp', --texFormat='r16f', texFormat='red', storeData=true, useMipMaps=false, ...
nilq/small-lua-stack
null
states.win = {} function states.win:draw() cls() print("you win the game!",8,48) print(states.start.time.." seconds",8,64) spr(0,48,16,2,3) spr(208,64,16,2,3) end function states.win:update(dt) if btn(5) then switch_state("start") end end
nilq/small-lua-stack
null
return function(f) local ok, v = pcall(f) return ok and v or nil end
nilq/small-lua-stack
null
--This macro calculates the relative humidity of ice --from HIRLAM surface variables temperature, pressure and dew point. --Toni Amnell 26.10.2010 function rhice(p,t,dp) -- p = air pressure in hPa -- t = temperature in *C -- dp = dew point in *C --Saturated vapor pressure of pure ice or water local ei=6.112...
nilq/small-lua-stack
null
local radio = require('radio') if #arg < 1 then io.stderr:write("Usage: " .. arg[0] .. " <FM radio frequency>\n") os.exit(1) end local frequency = tonumber(arg[1]) local tune_offset = -250e3 -- Blocks local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) local tuner = radio.TunerBlock(tune_offs...
nilq/small-lua-stack
null
--Children folder includes includeFile("custom_content/tangible/powerup/weapon/serverobjects.lua")
nilq/small-lua-stack
null
-- programme pour faire un test depuis de le webide function a4() print("\n a4.lua zf190601.1304 \n") end
nilq/small-lua-stack
null
-- -- Raspberry Pi ARM target in Visual Studio for premake5 -- harry denholm 2020, ishani.org / github.com/ishani -- -- portions adapted from https://github.com/LORgames/premake-vslinux, Copyright (c) 2013-2015 Samuel Surtees local p = premake local raspberry = p.modules.raspberry local vstudio = p.vstudio local vc2...
nilq/small-lua-stack
null
module("luci.controller.dnsfilter",package.seeall) function index() if not nixio.fs.access("/etc/config/dnsfilter") then return end local page = entry({"admin","services","dnsfilter"},alias("admin","services","dnsfilter","base"),_("DNS Filter"),9) page.dependent = true page.acl_depends = { "luci-app-dnsfilter" }...
nilq/small-lua-stack
null
Config = {} -- Colour for action messages (/me) Config.ActionColor = {200, 0, 255} -- Default colour for local messages Config.DefaultLocalColor = {0, 153, 204} -- Default colour for global messages Config.DefaultGlobalColor = {212, 175, 55} -- Colour for private messages received from other players Config.WhisperC...
nilq/small-lua-stack
null
rednet.Open("Right") if rednet.isOpen("Right") then rednet.Host("CNC", "CNC_SVR") print("Wireless AP Is Active!") goto :NetworkHandler end :NetworkHandler senderID, msg, dist, proto = rednet.receive() print(msg) goto :NetworkHandler
nilq/small-lua-stack
null
-- Brine ele.helpers.register_liquid("brine", { description = "Brine", drawtype = "liquid", tiles = {"elenuclear_brine.png"}, special_tiles = {"elenuclear_brine.png", "elenuclear_brine.png"}, alpha = 240, liquid_viscosity = 7, post_effect_color = {a = 200, r = 215, g...
nilq/small-lua-stack
null
local class = require("lib/middleclass") local module = {} module.DecayingObject = class('components/decayingObject') function module.DecayingObject:initialize(parameters) parameters = parameters or {} self.lifetimeTotal = parameters.lifetime or 5 self.lifetimeLeft = self.lifetimeTotal end r...
nilq/small-lua-stack
null
modifier_imba_ward_deniable = modifier_imba_ward_deniable or class({}) function modifier_imba_ward_deniable:IsHidden() return true end function modifier_imba_ward_deniable:IsPurgable() return false end function modifier_imba_ward_deniable:GetEffectName() return "particles/msg_fx/msg_deniable.vpcf" end function modifie...
nilq/small-lua-stack
null
local gears = require("gears") local beautiful = require("beautiful") local op = beautiful.flash_focus_start_opacity or 0.6 local stp = beautiful.flash_focus_step or 0.01 local flashfocus = function(c) if c and #c.screen.clients > 1 then c.opacity = op local q = op local g = gears.timer({ ...
nilq/small-lua-stack
null
local ReplicatedStorage = game:GetService("ReplicatedStorage") local common = ReplicatedStorage.common local by = require(common.util.by) local compileSubmodulesToArray = require(common.util.compileSubmodulesToArray) local assets = compileSubmodulesToArray(script, true) return { all = assets, byType = by("npc...
nilq/small-lua-stack
null
local Workspace = game:GetService("Workspace") --- local root = script.Parent.Parent local PluginModules = root:FindFirstChild("PluginModules") local Util = require(PluginModules:FindFirstChild("Util")) local Terrain = Workspace.Terrain --- local copy = Util.copy local terrainMaterialColorProperties = {} local te...
nilq/small-lua-stack
null
-- Old VAE stuff, ended up not being used. -- Most of the code is adapted from https://github.com/y0ast/VAE-Torch . require 'torch' require 'nn' require 'nngraph' require 'layers.GaussianCriterion' require 'layers.KLDCriterion' require 'layers.Sampler' local VAE = {} VAE.continuous = false function VAE.createVAE() ...
nilq/small-lua-stack
null
-- 辅助打印table function print_r ( t ) local print_r_cache={} local function sub_print_r(t,indent) if (print_r_cache[tostring(t)]) then print(indent.."*"..tostring(t)) else print_r_cache[tostring(t)]=true if (type(t)=="table") then for pos,val in...
nilq/small-lua-stack
null
board = {} tArgs = { ... } generation = 0 sleeptime = 0.5 if(tArgs[1] == "left" or tArgs[1] == "right" or tArgs[1] == "top" or tArgs[1] == "bottom" or tArgs[1] == "front" or tArgs[1] == "back")then mon = peripheral.wrap(tArgs[1]) else mon = term end if(mon.isColor() or mon.isColor)then colored = true ...
nilq/small-lua-stack
null
local sass = require "resty.sass" local styles = require "resty.sass.styles" local tonumber = tonumber local pairs = pairs local ngx = ngx local print = ngx.print local exit = ngx.exit local var = ngx.var local notfound = ngx.HTTP_NOT_FOUND local error = ngx.HTTP_INTERNAL_SERVER_ERROR local...
nilq/small-lua-stack
null
-- Dialogue for NPC "npc_ingrid" loadDialogue = function(DL) DL:createChoiceNode(0) if (DL:isQuestState("meat_delivery", "started") and DL:isQuestComplete("meat_delivery")) then DL:addChoice(10, "DL_Choice_IGotMeat") -- I got some meat for you with the best regards from Edmond. end if (DL:isQuestState("roas...
nilq/small-lua-stack
null
---- -- Test cases for xlsxwriter.lua. -- -- Simple test case to test data writing. -- -- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org -- local Workbook = require "xlsxwriter.workbook" local workbook = Workbook:new("test_simple05.xlsx") local worksheet = workbook:add_worksheet() local format1 = workbook:a...
nilq/small-lua-stack
null
--[[ Minetest Mod Storage Drawers - A Mod adding storage drawers Copyright (C) 2017-2020 Linus Jahn <lnj@kaidan.im> Copyright (C) 2018 isaiah658 MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in th...
nilq/small-lua-stack
null
local player local prev_positions = {} local TRAIL_LEN = 20 function start(this_id) id = this_id local x = 10 + rand(get_battle_width()-20) local y = 10 + rand(get_battle_height()-20) set_entity_position(id, x, y) set_battle_entity_flying(id, true) local right = rand(2) if (right == 1) then set_entity_right(...
nilq/small-lua-stack
null
--[[ Breed either cows or sheep. Must be run on a mob with the same height. ]] local Array = require('opus.array') local Config = require('opus.config') local neural = require('neural.interface') local Sound = require('opus.sound') local Map = require('opus.map') local os = _G.os local config = Config.load('m...
nilq/small-lua-stack
null
createObject(966,617.08233642578,-1509.9791259766,13.887590408325,0,0,270) createObject(3550,610.09759521484,-1493.7347412109,14.039214134216,0,180,0) createObject(967,615.99676513672,-1511.2054443359,13.873171806335) createObject(3475,616.22961425781,-1514.8422851563,13.391963005066,0,0,180) createObject(3475,613....
nilq/small-lua-stack
null