content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local M = {} function M.to_str(table, lvl, tbls_seen) lvl = lvl or 1 local indent = string.rep(' ', lvl) if type(table) ~= "table" then return tostring(table) end if tbls_seen == nil then tbls_seen = {} end local res = '{' for key, value in pairs(table) do if type(value) == "table" then ...
nilq/small-lua-stack
null
enemy = {} enemies_controller = {} enemies_controller.enemies = {} enemies_controller.image = love.graphics.newImage('enemy.png') function love.load() background_image = love.graphics.newImage('background.jpeg') love.window.setFullscreen(true, "desktop") player={} player.x=love.graphics.getWidth( )/2-...
nilq/small-lua-stack
null
// NE PAS TOUCHER AU "TEAM_MUSEUM =". L'addon ne marchera pas comme prévu. TEAM_MUSEUM = DarkRP.createJob("Museum Manager", { color = Color(225, 75, 75, 255), model = {"models/player/group03/male_04.mdl"}, description = [[You are the Museum Manager, you must manage your museum. Be careful about heisters !]...
nilq/small-lua-stack
null
options = {} options.resolutions = {} function options.load() options.applySettings() options.createPanel() end function options.applySettings() options.resolutions[#options.resolutions+1] = "1200x768" options.resolutions[#options.resolutions+1] = "1200x900" options.resolutions[#options.resolutions+1] = "128...
nilq/small-lua-stack
null
--[[ Global Persistence Shared Setup File Copyright 2020 Lex Robinson 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 applicab...
nilq/small-lua-stack
null
if (AAPClassic.Faction == "Alliance") then AAPClassic.PathA1 = { --------- test QHelper ["QuestHelper"] = { { ["Qpart"] = { }, ["Done"] = { }, }, { ["Qpart"] = { }, ["Done"] = { }, }, }, ["1-5Explorer-old"] = { { ["PickUp"] = { 783, -- [1] }, ["T...
nilq/small-lua-stack
null
local poses = { ['ergong'] = { ['normal'] = {'body', 'mouth_smile', 'eye_normal', 'eyebrow_normal', 'hair'}, }, ['gaotian'] = { ['normal'] = {'body', 'mouth_smile', 'eye_normal', 'eyebrow_normal', 'hair'}, ['cry'] = {'body', 'mouth_smile', 'eye_cry', 'eyebrow_normal', 'hair'}, },...
nilq/small-lua-stack
null
require "lizards" local rex = require "rex_pcre" if (#arg > 0) then local args = {} rx = rex.new('^--([A-Za-z0-9]+)=(.*)$') for i = 1, #arg,1 do local match, endmatch, subs = rx:tfind(arg[i]) if (match) then args[subs[1]] = subs[2] end end if (not args.layouts) then print("...
nilq/small-lua-stack
null
-- WORK LAYOUT --------------------------------------------------------------------------- function applyWorkLayout() -- local laptopScreen = hs.screen.allScreens()[1]:name() -- local thunder1 = hs.screen.allScreens()[2]:name() -- local thunder2 = hs.screen.allScreens()[3]:name() local primaryScreen = h...
nilq/small-lua-stack
null
local Instance = import("../Instance") describe("instances.BoolValue", function() it("should instantiate", function() local instance = Instance.new("BoolValue") assert.not_nil(instance) assert.equal("Value", instance.Name) assert.equal(false, instance.Value) end) end)
nilq/small-lua-stack
null
local No, parent = torch.class('fbnn.L2Normalize', 'nn.Module') --[[ This module normalizes it's input to unit euclidean norm Authors: Mark Tygert, Soumith Chintala ]]-- function No:__init() parent.__init(self) end function No:updateOutput(input) -- store the number of dimensions of the input lo...
nilq/small-lua-stack
null
if onServer() then Player():addScriptOnce("data/scripts/player/beginnersblessing.lua") end
nilq/small-lua-stack
null
local Convolve, parent = torch.class('nn.Convolve', 'nn.Module') function Convolve:__init(nInputPlane, kernel) parent.__init(self) -- get args self.nInputPlane = nInputPlane or 1 self.kernel = kernel or torch.Tensor(9,9):fill(1) local kdim = self.kernel:nDimension() -- check args if kdim ~= 2 an...
nilq/small-lua-stack
null
--定义log输出接口 local core = require "skynet.core" ---------------------------------------------------------------------------------------- local _TO_STRING = nil local _SESSION = 0 local function log_tostring(logLevel, tag, ...) if _TO_STRING == nil then _TO_STRING = require "util/pprint".pformat end local args = {....
nilq/small-lua-stack
null
local luaunit = require("luaunit") local mockagne = require("mockagne") local aws_sagemaker_handler = require("aws_sagemaker_handler") test_aws_sagemaker_handler = { job_name = 'autopilot_job_name', query = [[SELECT ::schema."SME_AUTOPILOT_TRAINING_UDF"( :job_name , :aws_s3_connection , ...
nilq/small-lua-stack
null
---@class ScriptItemInterface ScriptItemInterface = {} ScriptItemInterface.types = {weapon = "Weapon", item = "Normal", food = "Food"} ScriptItemInterface.newItemType = function(name, displayname, type, inventoryIcon) local item = createNewScriptItem("Base", name, displayname, type, inventoryIcon); return ite...
nilq/small-lua-stack
null
local sin, pi = math.sin, math.pi local function fft_bitreverse(v, n) local j = 0 for i=0,2*n-4,2 do if i < j then v[i+1], v[i+2], v[j+1], v[j+2] = v[j+1], v[j+2], v[i+1], v[i+2] end local k = n while k <= j do j = j - k; k = k / 2 end j = j + k end end ...
nilq/small-lua-stack
null
--[[ Copyright (C) 2011-2013 Eric Lasota 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, publis...
nilq/small-lua-stack
null
--[[ Code Author: kaasis/rivor2 Contact Info: http://steamcommunity.com/id/rivor2 ]]-- --local prefix = "#DF0101[MTAZ] #999976MISSION:#BBBB99"; -- chat prefix (can be any, doesn't matter much) local minimum_players = 1; -- how much players needed to start mission (def: 5 players) local mission_interval = 60000*60; ...
nilq/small-lua-stack
null
#!/usr/bin/env lua -- MoonFLTK example: menubar-add.lua -- -- Derived from the FLTK examples/menubar-add.cxx example (http://www.fltk.org) -- fl = require("moonfltk") --fl.trace_objects(true) -- This callback is invoked whenever the user clicks an item in the menu bar function MyMenuCallback(bar) local ipath = bar...
nilq/small-lua-stack
null
----------------------------------- -- Area: Sacrarium -- NPC: _0s9 (Wooden Gate) -- !pos 20.000 0.500 19.500 28 ----------------------------------- local ID = require("scripts/zones/Sacrarium/IDs") ----------------------------------- function onTrigger(player, npc) if (player:getZPos() > 20) then player...
nilq/small-lua-stack
null
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
nilq/small-lua-stack
null
GameObject = Object:extend() function GameObject:new(area) self.area = area self.id = Utils:UUID() self.timer = Timer end function GameObject:update(dt) if self.timer then self.timer.update(dt) end end function GameObject:destroy() if self.timer then self.timer.clear() end end
nilq/small-lua-stack
null
local function rock_autoplace_settings(multiplier, order_suffix, rectangle) local peak = { noise_layer = "rocks", noise_octaves_difference = -2, noise_persistence = 0.9 } if rectangle ~= nil then local aux_center = (rectangle[2][1] + rectangle[1][1]) / 2 local aux_ra...
nilq/small-lua-stack
null
class 'Tips' function Tips:__init() self.active = true self.tip = "СОВЕТ: " self.text = "Чат: T I Открыть меню сервера: B" Events:Subscribe( "Lang", self, self.Lang ) Events:Subscribe( "Render", self, self.Render ) end function Tips:Lang( args ) self.tip = "TIP: " self.text = "Chat: T I Open Se...
nilq/small-lua-stack
null
module("auto", package.seeall) local protobuf = require "protobuf" local protocol = require "protocol" local pokers = require('pokers') auto_packet_handlers = {} auto_game_action_handlers = {} function on_auto_packet_game_turn(player, packet, Return, is_resent) local room = player.room local seat = player....
nilq/small-lua-stack
null
local lgi = require("lgi") local Gtk = lgi.require("Gtk", "3.0") local app = Gtk.Application { application_id = "com.github.Miqueas.Lua-GTK3-Examples.GtkFlowBox" } function app:on_activate() self.active_window:present() end function app:on_startup() local win = Gtk.ApplicationWindow { application = self, ...
nilq/small-lua-stack
null
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'Limbo Roleplay Framework Core' files { 'lib/shared/events.lua', 'lib/shared/logging.lua', 'lib/shared/vectormath.lua', 'lib/shared/utilities.lua', 'lib/shared/strings.lua', 'lib/client/loop.lua', 'lib/client/ui.l...
nilq/small-lua-stack
null
-- 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") ExprIoEof = class.class(KaitaiStruct) function ExprIoEof:_init(io, parent...
nilq/small-lua-stack
null
token = "TOKEN" sudo_add = 1
nilq/small-lua-stack
null
-- Tests for writefile() local helpers = require('test.functional.helpers')(after_each) local clear, command, expect = helpers.clear, helpers.command, helpers.expect describe('writefile', function() setup(clear) it('is working', function() command('%delete _') command('let f = tempname()') command('c...
nilq/small-lua-stack
null
local train_util = require("__flib__.train") local on_tick_n = require("__flib__.on-tick-n") local constants = require("constants") local util = require("scripts.util") local actions = {} local function toggle_fab(elem, sprite, state) if state then elem.style = "flib_selected_frame_action_button" elem.spr...
nilq/small-lua-stack
null
--====================================================================-- -- dmc_widget/widget_navbar.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permission is hereby gran...
nilq/small-lua-stack
null
local questionnaireAnswers = {} questionnaireAnswers = {} return questionnaireAnswers
nilq/small-lua-stack
null
return function() local result = {} if not game.active_mods['SmartTrains'] then return nil end return { categories = { rail = { groups = { track = { items = { ['smart-train-stop'] = { or...
nilq/small-lua-stack
null
-- Game state assets Assets = { [0] = {type = "texture", id = "triforce", file = "./Assets/ItemSprites/triforcePieces.png"}, {type = "texture", id = "map", file = "./Assets/Backgrounds/entire_worldmap_single_image.png"}, {type = "texture", id = "level_1", file = "./Assets/Backgrounds/Level1.png"}...
nilq/small-lua-stack
null
require 'torch' -- construct an object to deal with the mapping local mapper = torch.class('Mapper') function mapper:__init(dictPath) assert(paths.filep(dictPath), dictPath ..' not found') self.alphabet2token = {} self.token2alphabet = {} -- make maps local cnt = 0 for line in io.lines(dictP...
nilq/small-lua-stack
null
// This is the ID given to any weapon item for all teams ITEM_WPN_COMMON = 11 function FUNC_DROPWEAPON( ply, id, client, icon ) if icon then return "icon16/arrow_down.png" end if client then return translate.Get( "rd_ui_shop_drop" ) end local tbl = item.GetByID( id ) local prop = ents.Create( "sent_droppedgu...
nilq/small-lua-stack
null
--- Module which is responsible for dispatching events with expectations -- -- *Dependencies:* `expectations`, `events` -- -- *Globals:* `config` -- @copyright [Ford Motor Company](https://smartdevicelink.com/partners/ford/) and [SmartDeviceLink Consortium](https://smartdevicelink.com/consortium/) -- @license <https://...
nilq/small-lua-stack
null
-- Load the test file. dofile("./mods/utils/test.lua") -- Now load the file for testing. dofile("./mods/terragenitor/terragenitor.lua") dofile("./mods/terragenitor/module.lua") dofile("./mods/utils/blockedcache.lua") dofile("./mods/utils/constants.lua") dofile("./mods/utils/list.lua") dofile("./mods/utils/noisemanag...
nilq/small-lua-stack
null
function ReadSpriteFromXML(xml) assert(xml, "ERROR: ReadSpriteFromXML(xml) - xml is nil") local name=xml.ReadStringByName("Name") if not(name) then name="unnamed" end local material=xml.ReadStringByName("Material") local scale=xml.TryReadVec3ByName("Scale") local pivot=xml.TryReadVec3ByName(...
nilq/small-lua-stack
null
-- Cow by sirrobzeroone, then Krupnov Pavel, then TenPlus1. Flower cow by DrPlamsa mobs:register_mob("flower_cow:flower_cow", { type = "animal", passive = false, attack_type = "dogfight", attack_npcs = false, reach = 2, damage = 4, hp_min = 5, hp_max = 20, armor = 200, collisionbox = {-0.4, -0.01, -0.4, 0....
nilq/small-lua-stack
null
if (SERVER) then AddCSLuaFile() end --mk2 sound.Add({ name="weapon_mk2.Explode", volume = 1.0, sound = "weapons/mk2/mk2_detonate_01.wav", level = 160, --how loud are grenades? channel = CHAN_STATIC }) sound.Add({ name="Weapon_mk2.Pin", volume = 1.0, sound = "weapons/mk2/handling/mk2_pullpin.wav", level = 65, ...
nilq/small-lua-stack
null
----------------------------------- -- Area: Yhoator Jungle -- NPC: Treasure Casket ----------------------------------- require("scripts/globals/caskets") ----------------------------------- function onTrigger(player, npc) tpz.caskets.onTrigger(player, npc) end function onTrade(player, npc, trade) tpz.casket...
nilq/small-lua-stack
null
GridBackground = class("GridBackground") function GridBackground:initialize() self.time = math.random(0, 10) self.columns = 32 self.rows = 32 self.width = 3000 self.height = 2000 self.hue = 0 self.saturation = 100 self.lightness = 40 end function GridBackground:update(dt) self.time = self.time ...
nilq/small-lua-stack
null
args = {...} if #args ~= 5 then print("Usage: <command> <sensor_position> <redstone_position> <accesslevel> <group> <url>") return end -- Vars set by command params local sensor_position = args[1] local redstone_position = args[2] local accesslevel = tonumber(args[3]) local group = args[4] -- Advanced settings lo...
nilq/small-lua-stack
null
local MQTT = require("mqtt_library") local lapp = require("pl.lapp") local random = require("random") local utility = require("utility") local lapp = require("pl.lapp") local msg = "" local msg_count = 0 local LOG_RATE = 5 local LOG_RATE_IN_MILLIS = LOG_RATE * 1000 local args = lapp [[ Publish a message to a spec...
nilq/small-lua-stack
null
require("moonsc").import_tags() -- Test that each onexit handler is a separate block. -- The <send> of event1 will cause an error but -- the increment to var1 should happen anyways return _scxml{ _datamodel{ _data{ id="var1", expr="1" }}, _state{ id="s0", _onexit{ _send{ target="", event="event1" }}, -- ...
nilq/small-lua-stack
null
local crypt = require "sys.crypt" local testaux = require "testaux" local P = require "print" return function() ---------------------test hamc local hmac_key = "test" local hmac_body = "helloworld" local res = crypt.hmac(hmac_key, hmac_body) print(string.format("hmac key:%s body:%s, res:", hmac_key, hmac_body)) ...
nilq/small-lua-stack
null
local string = require"luv.string" local type, pairs, ipairs = type, pairs, ipairs local Object = require"luv.oop".Object local fs = require"luv.fs" module(...) local Png = Object:extend{ __tag = .....".Png"; init = function (self, path) end; } local Gif = Object:extend{ __tag = .....".Gif"; init = function (se...
nilq/small-lua-stack
null
local helpers = require("test.functional.helpers")(after_each) local eq, execute, funcs = helpers.eq, helpers.execute, helpers.funcs local ok = helpers.ok local clear = helpers.clear describe(":edit", function() before_each(function() clear() end) it("without arguments does not restart :terminal buffer", fu...
nilq/small-lua-stack
null
local console = require("console") resource = arg[1] or "/data/ATL03/ATL03_20181017222812_02950102_003_01.h5" dataset = arg[2] or "/gt2l/heights/h_ph" col = tonumber(arg[3]) or 0 startrow = tonumber(arg[4]) or 13665185 numrows = tonumber(arg[5]) or 89624 dataset_file = arg[6] or dataset:sub(string.find(dataset, "/[^/]...
nilq/small-lua-stack
null
-- inspired by https://github.com/simov/slugify local gsub = require('string').gsub local gmatch = require('string').gmatch local trim = require('string-trim') local function slugify(string, replacement) if replacement == nil then replacement = '-' end local result = '' -- loop through each word or numbe...
nilq/small-lua-stack
null
-- Prosody IM -- Copyright (C) 2010 Matthew Wild -- Copyright (C) 2010 Paul Aurich -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- -- TODO: I feel a fair amount of this logic should be integrated into Luasec, -- so that everyone isn't re-inventing t...
nilq/small-lua-stack
null
require("isolater/widget/privateRoomCustomView/customParamSetViewBase"); local customParamSetView = require(ViewPath .. "isolater/privateRoomCustomView/customParamSetView"); local CustomParamSetView = class(CustomParamSetViewBase,false); local h_index = 0; local getIndex = function(self) h_index = h_index + 1...
nilq/small-lua-stack
null
local planes={ { 0.0,0.0,-1.0,1.0 }, { 0.0,0.0,1.0,1.0 }, { 1.0,0.0,0.0,10.0 }, { 0.0,-1.0,0.0,1.0 }, { -1.0,0.0,-0.0,10.0 }, { 0.0,1.0,0.0,1.0 }, } local points={ { 10.0, 1.0,-1.0 }, { 10.0,-1.0,-1.0 }, { -10.0,-1.0,-1.0 }, { -10.0, 1.0,-1.0 }, { 10.0, 1.0, 1.0 }, { 10.0,-1.0, ...
nilq/small-lua-stack
null
module("luci.controller.rebootschedule", package.seeall) function index() if not nixio.fs.access("/etc/config/rebootschedule") then return end entry({"admin", "system", "rebootschedule"}, cbi("rebootschedule"), _("计划重启")).dependent = true end
nilq/small-lua-stack
null
local _2afile_2a = "fnl/aniseed/setup.fnl" local _2amodule_name_2a = "conjure.aniseed.setup" local _2amodule_2a do package.loaded[_2amodule_name_2a] = {} _2amodule_2a = package.loaded[_2amodule_name_2a] end local _2amodule_locals_2a do _2amodule_2a["aniseed/locals"] = {} _2amodule_locals_2a = (_2amodule_2a)["an...
nilq/small-lua-stack
null
---@class Faction : zombie.characters.Faction ---@field private name String ---@field private owner String ---@field private tag String ---@field private tagColor ColorInfo ---@field private players ArrayList|Unknown ---@field public factions ArrayList|Unknown Faction = {} ---@public ---@param arg0 IsoPlayer ---@retur...
nilq/small-lua-stack
null
AddCSLuaFile("shared.lua") include('shared.lua') /*----------------------------------------------- *** Copyright (c) 2012-2018 by DrVrej, All rights reserved. *** No parts of this code or any of its contents may be reproduced, copied, modified or adapted, without the prior written consent of the author, unless other...
nilq/small-lua-stack
null
local mexico = require "mexico" -- -- Mexico wrapper for a corona circle. -- local Circle = mexico.class(mexico.DisplayObject) -- -- Magic new function, since corona creates the object -- and not we. -- Circle.new = function(styles) return display.newCircle(styles.x or 0, styles.y or 0, styles.radius) end -- -- ...
nilq/small-lua-stack
null
tat_small_win_s01_loot_deed = { minimumLevel = 0, maximumLevel = -1, customObjectName = "Small Tatooine House, Style 1 (Windowed) Blueprint", directObjectTemplate = "object/tangible/loot/loot_schematic/tat_sm_win_01_loot_schem.iff", craftingValues = { }, customizationStringNames = {}, customizationValues = {} }...
nilq/small-lua-stack
null
local tools = {} local conf = require('modules.tools.config') tools['editorconfig/editorconfig-vim'] = { ft = { 'go','typescript','javascript','vim','c','lua'} } tools['liuchengxu/vista.vim'] = { cmd = 'Vista', config = conf.vim_vista } return tools
nilq/small-lua-stack
null
local Button = hud.registry.Object:extend("Button") function Button:initialize(parent, x, y, w, h) hud.registry.Object.initialize(self, parent, x, y, w, h) self.height = h or 40 self.label = "Button" self.font = game.assets:getFont("Roboto-Bold")[19] end function Button:setLabel(label) self.l...
nilq/small-lua-stack
null
local deepcopy = require "deepcopy" local CHIP_ID = require "defs.chip_id_defs" local PA_DEFS = {} -- This simply maps the "consecutive" PAs from chip -> PA ID. Since they all require 3 chips in consecutive order, this mapping is sufficient. PA_DEFS[CHIP_ID.Cannon] = CHIP_ID.ZCanon1 PA_DEFS[CHIP_ID.HiCannon] = CHIP_I...
nilq/small-lua-stack
null
---@class EntityRef @ local EntityRef = {} -------------------- -- Constructors -------------------- -------------------- -- Variables -------------------- --- optional --- ---@type Entity @(member) EntityRef.Entity = nil ---@type boolean @(member) EntityRef.IsCharmed = nil ---@type boolean @(member) EntityRef.IsF...
nilq/small-lua-stack
null
local ffi = require 'ffi' local THNN = {} local generic_THNN_h = require 'nn.THNN_h' -- strip all lines starting with # -- to remove preprocessor directives originally present -- in THNN.h generic_THNN_h = generic_THNN_h:gsub("\n#[^\n]*", "") generic_THNN_h = generic_THNN_h:gsub("^#[^\n]*\n", "") -- THGenerator str...
nilq/small-lua-stack
null
slot0 = class("FleetSkill", import(".BaseVO")) slot0.SystemCommanderNeko = 1 slot0.TypeMoveSpeed = "move_speed" slot0.TypeHuntingLv = "hunt_lv" slot0.TypeAmbushDodge = "ambush_dodge" slot0.TypeAirStrikeDodge = "airfight_doge" slot0.TypeStrategy = "strategy" slot0.TypeBattleBuff = "battle_buff" slot0.TypeAttack = "attac...
nilq/small-lua-stack
null
VANISH_SKILL_POINT_MULTIPLIER = 3;
nilq/small-lua-stack
null
local composer = require( "composer" ) local scene = composer.newScene() -- ----------------------------------------------------------------------------------- -- Code outside of the scene event functions below will only be executed ONCE unless -- the scene is removed entirely (not recycled) via "composer.removeScen...
nilq/small-lua-stack
null
return function (str) return '\t' .. str end
nilq/small-lua-stack
null
modifier_strength = class(Modifier) LinkLuaModifier("modifier_strength", modifier_strength) function modifier_strength:OnCreated () self.GetModifierBonus = self.GetModifierBonus self:SetVisible(false) self:AttachVariableModifier("strength"); end function modifier_strength:GetModifierBonus_strength() return self:...
nilq/small-lua-stack
null
description = [[ Extracts and outputs HTML and JavaScript comments from HTTP responses. ]] --- -- @usage nmap -p80 --script http-comments-displayer.nse <host> -- -- This scripts uses patterns to extract HTML comments from HTTP -- responses and writes these to the command line. -- -- @args http-comments-displayer.singl...
nilq/small-lua-stack
null
--# selene: allow(unused_variable) ---@diagnostic disable: unused-local -- Watch for Pasteboard Changes. -- macOS doesn't offer any API for getting Pasteboard notifications, so this extension uses polling to check for Pasteboard changes at a chosen interval (defaults to 0.25). ---@class hs.pasteboard.watcher local M =...
nilq/small-lua-stack
null
dungeonBranches = {} --Stairs: {branch="branch",depth=1,min_depth=1,max_depth=1,replace_upstairs=false,replace_downstairs=false,exit_depth=1,oneway=false,chance=100} local main = { name = "Dungeon", max_depth=3, depthName="Depth", mapTypes = {'dungeon','caves','forest'}, creatureTags={'mainbranch'}, possi...
nilq/small-lua-stack
null
-- LJWM default bootscript -- Loads files and what not. local fname = table.remove(arg, 1) if not fname then print("Usage: ljwm file.lua [args..]") os.exit(1) end ljwm = require("ljwm") local f, err = loadfile(fname) if err then print("Compilation error: "..err) end local success, err = xpcall(f, STP.stacktrace,...
nilq/small-lua-stack
null
require("ts3init") function ScriptLog(logMSG) if channelJOIN.setting.debug == true then local tsCol = { 'Green', 'Black', 'Red', 'Blue' } local RANDCOL = ( tsCol[ math.random( #tsCol ) ] ) local scriptTimestamp = os.date("%x %X") ts3.printMessageToCurrentTab("[color=Black][[/color][color="..RANDCOL.."]"..scrip...
nilq/small-lua-stack
null
-- Here is where all of your shared hooks should go. -- Disable entity driving. function Schema:CanDrive(client, entity) return false end
nilq/small-lua-stack
null
local inspect = require 'inspect' local Queue = {} local cjson = require 'cjson' local resty_lock = require "resty.lock" local function encode(obj) return cjson.encode(obj) end local function decode(str) return cjson.decode(str) end function Queue:new(name) local obj = { name = name, dict = ngx.shared.queues }...
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
nilq/small-lua-stack
null
Hooks:PostHook(GameStateMachine, "init", "BeardLibEditorGameStateInit", function(self) local editor local editor_func local ingame_waiting_for_players local ingame_waiting_for_players_func local ingame_waiting_for_respawn for state in pairs(self._transitions) do if state._name == "ingame_waiting_for_respawn" th...
nilq/small-lua-stack
null
buffer = Procedural.TextureBuffer(128) Procedural.Cell(buffer):setDensity(4):setRegularity(234):process() Procedural.Vortex(buffer):process() tests:addTextureBuffer(buffer) dotfile = tests:getDotFile("texture_29", "Vortex_Demo") dotfile:set("Cell", "texture_cell_smooth", "Vortex", "texture_vortex")
nilq/small-lua-stack
null
------------------------------------------------------------------------------ -- -- This file is part of the Corona game engine. -- For overview and more information on licensing please refer to README.md -- Home page: https://github.com/coronalabs/corona -- Contact: support@coronalabs.com -- ------------------------...
nilq/small-lua-stack
null
-- mod_offline_hints -- -- Copyright (C) 2019 Marcos de Vera Piquero <marcos.devera@quobis.com> -- -- This file is MIT/X11 licensed. -- -- A module to discard hinted messages with no-store at mod_offline -- module:depends"offline"; local function handle_offline (event) local stanza = event.stanza; if (stanza:get_ch...
nilq/small-lua-stack
null
--[[ FastText - Code for training a new model ]]-- require 'torch' require 'io' require 'nn' require 'sys' require 'os' require 'xlua' require 'lfs' require 'pl.stringx' require 'pl.file' tds = require('tds') utils = require('utils') cmd = torch.CmdLine() cmd:option('-input', 'data/ag_news.train', 'training file pa...
nilq/small-lua-stack
null
seconds = 0.5 --must result in an integer when multiplied by 60
nilq/small-lua-stack
null
object_tangible_component_armor_shared_advanced_armor_layer_five = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/component/armor/shared_advanced_armor_layer_five.iff" } ObjectTemplates:addClientTemplate(object_tangible_component_armor_shared_advanced_armor_layer_five, "object/tangible/c...
nilq/small-lua-stack
null
local M = {} M.__index = M function M.create() local m = setmetatable({}, M) return m end function M:watch(obj, cb) local v = self._viewers if not v then v = {} self._viewers = v end v[obj] = cb end function M:unwatch(obj) local v = self._viewers if v then v[obj] = nil end end ...
nilq/small-lua-stack
null
local a = require "plenary.async.async" local Deque = require("plenary.async.structs").Deque local tbl = require "plenary.tbl" local M = {} local Condvar = {} Condvar.__index = Condvar ---@class Condvar ---@return Condvar function Condvar.new() return setmetatable({ handles = {} }, Condvar) end ---`blocks` the th...
nilq/small-lua-stack
null
local xml2lua = require("xml2lua") local handler = require("xmlhandler.tree") local simple_lua_with_attributes = { {age=42, name="Manoela", salary=42.1, city="Brasília-DF", _attr={ type="legal" }, music={_attr={like="true"}} }, {age=42, name="Manoel", salary=42.1, city="Palmas-TO", _attr={ type="natural" }, music=...
nilq/small-lua-stack
null
-- This useful to add to objects that need to have some kind of relationship with their parents. -- Call the appropriate function in the object's update function every frame. -- The game object must have a .parent attribute defined and pointing to another game object. Parent = Object:extend() -- Follows the parent's ...
nilq/small-lua-stack
null
g_Root = getRootElement() g_ResRoot = getResourceRootElement() local g_Game = false local function init() import("mapmgr") import("roommgr") end local function cleanup() for room, game in pairs(Game.roomToGame) do game:destroy(true) end end function startGamemodeInRoom(room) if(not Game.roomTo...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- Libraries.Strings = {} -------------------------------------------------------------------------------- -- Strings Library -------------------------------------------------------------------------------- -- Return first word string -- Stri...
nilq/small-lua-stack
null
require "UnLua" local M = Class() function M:Test1(Array) return Array:Length() end function M:Test2() local Array = UE.TArray(0) Array:Add(1) Array:Add(2) return Array end function M:SetResult(Key, Value) _G[Key] = Value end return M
nilq/small-lua-stack
null
object_ship_yt1300_tier7 = object_ship_shared_yt1300_tier7:new { } ObjectTemplates:addTemplate(object_ship_yt1300_tier7, "object/ship/yt1300_tier7.iff")
nilq/small-lua-stack
null
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
nilq/small-lua-stack
null
-- load the GPU UI plugin modules ae.modules.loadAll({ 'ui.gpu.string', 'ui.gpu.Image', 'ui.gpu.Label', 'ui.gpu.Button', 'ui.gpu.layout.builder.image', 'ui.gpu.layout.builder.label' })
nilq/small-lua-stack
null
require('indent_blankline').setup({ char = '|', buftype_exclude = { 'terminal' }, filetype_exclude = { 'dashboard' }, show_trailing_blankline_indent = false, use_treesitter = true, })
nilq/small-lua-stack
null
--- Connection. -- <br> -- <i>Note</i>: The fields listed below are only available to objects created via Connection:New unless otherwise specified -- <br> -- @class table -- @name Connection -- @field Event A list of functions to handle various IRC events, indexed via the event name. Events will not be handled i...
nilq/small-lua-stack
null
local createReducer = require(script.Parent.Parent.lib.Rodux).createReducer local Cryo = require(script.Parent.Parent.lib.Cryo) return createReducer({}, { ADD_TOAST = function(state, action) return Cryo.List.join(state, { id = action.id, body = action.body, isHovered = f...
nilq/small-lua-stack
null