content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
#!/usr/bin/env th require 'hdf5' require 'postprocess' ---------------------------------------------------------------- -- parse arguments ---------------------------------------------------------------- cmd = torch.CmdLine() cmd:text() cmd:text('DNA ConvNet testing') cmd:text() cmd:text('Arguments') cmd:argument('m...
nilq/small-lua-stack
null
-- Nnw.lua -- common functions for the Nearest Neighbor package require 'affirm' require 'makeVerbose' require 'verify' -- API overview if false then -- simple average ok, estimate = Nnw.estimateAvg(xs, ys, nearestIndices, visible, weights, k) -- kernel-weighted average ok, estimate = Nnw.estimateKwavg(x...
nilq/small-lua-stack
null
object_building_mustafar_structures_must_bandit_generator = object_building_mustafar_structures_shared_must_bandit_generator:new { } ObjectTemplates:addTemplate(object_building_mustafar_structures_must_bandit_generator, "object/building/mustafar/structures/must_bandit_generator.iff")
nilq/small-lua-stack
null
--- -- Unit testing support for NSE libraries. -- -- This library will import all NSE libraries looking for a global variable -- <code>test_suite</code>. This must be a callable that returns true or false -- and the number of tests that failed. For convenience, the -- <code>unittest.TestSuite</code> class has this prop...
nilq/small-lua-stack
null
x = esp.random(1, led.width(0) - 2) y = esp.random(1, led.height(0) - 2) xdir = esp.random(5,30) / 100 ydir = esp.random(5,30) / 100 rgb = color.palette(2) fade = 0 function frame() x = x + xdir y = y + ydir if x >= led.width(0) then x = led.width(0) - 1 xdir = esp.random(-30,-5) / 100 rgb = color.palet...
nilq/small-lua-stack
null
function model.getPartToDrop(distributionExtent,partDistribution,shiftDistribution,rotationDistribution,massDistribution,scalingDistribution,partsData) local errString=nil local dropName=model.getDistributionValue(partDistribution) local thePartD=partsData[dropName] local partToDrop=nil if thePartD ...
nilq/small-lua-stack
null
WidgetUnitSayCommand = Command:extends{} WidgetUnitSayCommand.className = "WidgetUnitSayCommand" function WidgetUnitSayCommand:init(unit, text) self.unit = unit self.text = text end function WidgetUnitSayCommand:execute() SB.displayUtil:unitSay(self.unit, self.text) -- SB.model.areaManager:addArea(self...
nilq/small-lua-stack
null
if SERVER then util.AddNetworkString("magic_BroadcastMagicTrail") CreateConVar("magic_broadcast_trail", "1") local broadcastParticle = GetConVar("magic_broadcast_trail") net.Receive("magic_BroadcastMagicTrail", function(_, ply) if !broadcastParticle:GetBool() then return end local pos = ...
nilq/small-lua-stack
null
--- The concommand library is used to create console commands which can be used to network (basic) information & events between the client and the server. _G.concommand = {} --- Creates a console command that runs a function in lua with optional autocompletion function and help text. --- 🦟 **BUG**: [This will fail...
nilq/small-lua-stack
null
local wk = require('which-key') wk.register( { vd = { '<Cmd>Dirbuf<Cr>', 'dirbuf' }, vD = { '<Cmd>Dirbuf %<Cr>', 'dirbuf in current directory' }, }, { prefix = '<Leader>', } )
nilq/small-lua-stack
null
--define the class ACF_defineGunClass("ARTY", { type = "missile", spread = 1, name = "Artillery Rockets", desc = "Artillery rockets provide massive HE delivery over a broad area, with arcing ballistic trajectories and limited guidance. Best equipped with a seeker head, fire...
nilq/small-lua-stack
null
Weapon = require "Weapon" -- Ship object local Ship = {} Ship.__index = Ship function Ship:create(world, player) local obj = Entity:create({ name = "Ship", player = player, density = 10, integrity = 5000, integrity_max = 8000, integrity_cur...
nilq/small-lua-stack
null
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' 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
-- Combat settings -- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced" worldType = "no-pvp" hotkeyAimbotEnabled = false protectionLevel = 1 killsToRedSkull = 3 killsToBlackSkull = 6 pzLocked = 30000 removeChargesFromRunes = true timeToDecreaseFrags = 24 * 60 * 60 * 1000 whiteSkullTime = 15 * 60 ...
nilq/small-lua-stack
null
--[[ Author: Ractidous Date: 12.02.2015. Store the target location. If the caster has tethered ally, refresh the tether duration. The hard-coded one won't take care of the tethered ally's tether duration. We refresh even the ally's duration. ]] function CastRelocate( event ) local caster = event.caster local...
nilq/small-lua-stack
null
nym_destroyer = Creature:new { objectName = "@mob/creature_names:nym_destroyer", randomNameType = NAME_GENERIC, randomNameTag = true, socialGroup = "nym", faction = "nym", level = 40, chanceHit = 0.43, damageMin = 355, damageMax = 420, baseXp = 4006, baseHAM = 9100, baseHAMmax = 11100, armor = 1, resists ...
nilq/small-lua-stack
null
up = false down = false left = false right = false movementSpeed = 250 jumpSpeed = 200 kickVerticleSpeed = 100 kickHorizontalSpeed = 50 kickHorizontalPower = 300 kickVerticlePower = 200 function leftHandle(pressed) if pressed then left = true else left = false end end function rightHandle(...
nilq/small-lua-stack
null
local bytes_per_pixel = {4, 8, 12, 16, 32} function num_of_pixels(w, h) return w * (h/2) end function num_of_bytes(nop, bpp) return bpp * nop end function resolution(bpp, memused) local side = math.sqrt(memused * 1000000 * 2 / bpp / (4*3))+ 1; local w = side * 4; local h = side * 3; return w, h end loca...
nilq/small-lua-stack
null
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local delete = {} local mattata = require('mattata') function delete:init() delete.commands = mattata.commands(self.info.username):command('delete').table delete.help = '/d...
nilq/small-lua-stack
null
local uv = require('luv') if #arg==0 then print(string.format("Usage: %s <command> <file1> [file2 ...]",arg[0])); return end for i=1,#arg do local fse = uv.new_fs_event() assert(uv.fs_event_start(fse,arg[i],{ --"watch_entry"=true,"stat"=true, recursive=true },function (err,fname,st...
nilq/small-lua-stack
null
local Crossing = require("ak.road.Crossing") local Lane = require("ak.road.Lane") local TrafficLight = require("ak.road.TrafficLight") local TrafficLightModel = require("ak.road.TrafficLightModel") -- Einfache Kreuzung mit zwei Fahrspuren und drei Ampeln local K1 = TrafficLight:new("K1", 13, TrafficLightModel.JS2_3er_...
nilq/small-lua-stack
null
--[[ Copyright 2018 American Megatrends Inc. 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 a...
nilq/small-lua-stack
null
function isVehicleArmed(vehicle) assertArgumentType(vehicle, "vehicle") return ARMED_VEHICLES[getElementModel(vehicle)] == true end
nilq/small-lua-stack
null
-- this is minified, take a look at https://github.com/wyozi/gmod-medialib/releases/download/1.0.2/medialib.lua for readable code local a;do local b="git@871fb36d"local c=true;a={}a.VERSION=b;a.DISTRIBUTABLE=c;a.INSTANCE=a.VERSION.."_"..tostring(10000+math.random(90000))a.Modules={}local d=CreateConVar("medialib_debug"...
nilq/small-lua-stack
null
Locales['fi'] = { ['show_active_character'] = 'Näytä nykyinen hahmosi', ['active_character'] = 'Nykyinen hahmosi: ~b~%s~s~', ['error_active_character'] = "Hahmosi hakemisessa ilmeni ongelma. Ota yhteyttä ylläpitoon.", ['delete_character'] = 'Poista hahmosi ja luo uusi.', ['deleted_character'] = 'Hahmosi on po...
nilq/small-lua-stack
null
local gcc = require("gcc") local cdecl = require("gcc.cdecl") local fficdecl = require("ffi-cdecl") -- send assembler output to /dev/null gcc.set_asm_file_name(gcc.HOST_BIT_BUCKET) -- Captured C declarations. local decls = {} -- Type declaration identifiers. local types = {} -- Parse C declaration from capture macro...
nilq/small-lua-stack
null
--- -- The internal __striter module. -- It allows creating striter objects, which can be used to iterate through a -- string. -- @classmod striter --- local m = {} m.__index = m --- Create a new striter object. -- @function __striter.new -- @tparam string|file arg the source of data for the striter -- @treturn strit...
nilq/small-lua-stack
null
vim.o.shell = '/usr/bin/bash' vim.o.showmatch = true vim.o.hidden = true vim.o.errorbells = false vim.o.tabstop = 2 vim.o.softtabstop = 2 vim.o.shiftwidth = 2 vim.o.expandtab = true vim.o.smartindent = true vim.o.smarttab = true vim.o.wrap = false vim.o.swapfile = false vim.o.backup = false vim.o.updatetime = 50 vim.o....
nilq/small-lua-stack
null
object_draft_schematic_weapon_rifle_bowcaster_master = object_draft_schematic_weapon_shared_rifle_bowcaster_master:new { } ObjectTemplates:addTemplate(object_draft_schematic_weapon_rifle_bowcaster_master, "object/draft_schematic/weapon/rifle_bowcaster_master.iff")
nilq/small-lua-stack
null
HashMap = require("com.blacksheepherd.util.HashMap") return { { selectorStack = { { class = "Red" } }, properties = HashMap({ BrickColor = "255, 0, 0" }) } }
nilq/small-lua-stack
null
return function(l) local version = "0.1" -- Add version info l:addOp('version') -- Get version info to client when it requests it l:addProcessOnServer('version',function(self,peer,arg,storage) return version end) -- Process version information on client side l:addProcessOnClient('version',function...
nilq/small-lua-stack
null
-- This generated buttons for the camera switcher guis, put it in a separete -- module because both Static and Moving cameras use it local utils = require(script.Parent.Utils) local button = require(script.Parent.Parent.GuiComponents.RoundedButton) local smoothGrid = require(script.Parent.SmoothGrid) local other = {} ...
nilq/small-lua-stack
null
Pipe= Class{} local pipe_image=love.graphics.newImage('pipe.png') local pipe_scroll=-60 pipe_height=288 pipe_width=70 function Pipe:init(y) self.scored=false self.x=virtual_width self.y=y self.width=pipe_image:getWidth() self.height=pipe_image:getWidth() end function Pipe:update(dt) self.x=self.x+pipe_scro...
nilq/small-lua-stack
null
-- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! -- -- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! -- -- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! -- -- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! -- -- Global variables Users = {} commands = {} settings = {} settings.defaultSettings = { ['...
nilq/small-lua-stack
null
local _, L = ...; if GetLocale() ~= "esES" then return end L["Actions"] = "Acciones" L["Alive"] = "Vivo" L["Any"] = "Cualquiera" L["Are you sure you want to delete filter set?"] = "¿Seguro que quieres borrar este conjunto de filtros?" L["At least one word"] = "Por lo menos una palabra" --Translation missing -- L...
nilq/small-lua-stack
null
function Client_PresentSettingsUI(rootParent) UI.CreateLabel(rootParent) .SetText('Commanderplayer StartArmies: ' .. Mod.Settings.StartArmies); end
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_collections_space_capacitor_mark_05_moncal = object_tangible_loot_creature_loot_collections_space_shared_capacitor_mark_05_moncal:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_capacitor_mark_05_moncal, "object/tangible/loot/creature/loot/co...
nilq/small-lua-stack
null
FPP = FPP or {} surface.CreateFont("TabLarge", { size = 17, weight = 700, antialias = true, shadow = false, font = "Trebuchet MS"}) hook.Add("CanTool", "FPP_CL_CanTool", function(ply, trace, tool) -- Prevent client from SEEING his toolgun shoot while it doesn't shoot serverside. if IsValid(tra...
nilq/small-lua-stack
null
--========================================================================= -- -- Copyright Insight Software Consortium -- -- 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 -- -- ...
nilq/small-lua-stack
null
-- Event: ChatSendFilter local _,_,msg = ... local cmdArgs = {} for i in string.gmatch(msg, "%S+") do table.insert(cmdArgs, i) end local switch switch = { ["//help"] = { ["desc"] = "help command", ["fun"] = function() for k,v in pairs(switch) do log(k..": "..v.desc)...
nilq/small-lua-stack
null
Locales ['en'] = { ['blip_name'] = 'Prison de bolingbroke', ['judge'] = 'Juge', ['escape_attempt'] = 'Vous ne pouvez pas vous échapper', ['remaining_msg'] = 'Encore ~b~%s~s~ secondes avant la liberté', ['jailed_msg'] = '%s est maintenant en prison pour %s minutes', ['unjailed'] = '%s a été relaché de prison...
nilq/small-lua-stack
null
return { GCS_WGS_1984 = "+proj=latlong +ellps=WGS84 +degrees", NZGD_2000_New_Zealand_Transverse_Mercator = "+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs", }
nilq/small-lua-stack
null
-- -- Author: SunLightJuly -- Date: 2014-07-29 16:56:47 -- local ArmatureTestLayer = require("layers.ArmatureTestLayer") local TestFrameEvent = class("TestFrameEvent", ArmatureTestLayer) local scheduler = require("framework.scheduler") local frameEventActionTag = 10000 function TestFrameEvent:ctor(index) TestFrameEv...
nilq/small-lua-stack
null
--- Physics body component class. -- Physical representation of an Object. -- @classmod PhysicsBodyComponent --- Computes Axis-Aligned Bounding Box over the objects's physical representation. -- @tparam transform t Also apply this transform -- @treturn vec2 lower bound -- @treturn vec2 upper bound function PhysicsBody...
nilq/small-lua-stack
null
require "user.options" require "user.keymaps" require "user.plugins" require "user.colorscheme" require "user.completion" require "user.treesitter" require "user.telescope" require "user.autopairs" require "user.lsp" require "user.comments" require "user.nvim-tree" require "user.lualine"
nilq/small-lua-stack
null
-------------------------------------------------------------------- --Task -------------------------------------------------------------------- require 'mock.core.task.ThreadTask' -------------------------------------------------------------------- require 'mock.core.task.ThreadDataTask' require 'mock.core.task.Thre...
nilq/small-lua-stack
null
{{/* This command manages the leaderboard. Usage is -leaderboard [page] where page is optional. Recommended trigger: Regex trigger with trigger `\A(-|<@!?204255221017214977>\s*)(leaderboard|lb|top)(\s+|\z)`. */}} {{ $page := 1 }} {{/* Default page to start at */}} {{ with reFind `\d+` (joinStr " " .CmdArgs) }} {{ $p...
nilq/small-lua-stack
null
-- This is the fake Entity used to Deploy the Mobile Factory -- -- Entity -- local mfDE = {} mfDE.type = "simple-entity-with-owner" mfDE.name = "MFDeploy" mfDE.icone = "__Mobile_Factory_Graphics__/graphics/icons/MFDeployI.png" mfDE.icon_size = 32 mfDE.minable = {mining_time=1} mfDE.collision_mask = {} -- mask copied f...
nilq/small-lua-stack
null
local _CUR = ... local _M = { LoopTimer = cc.import(".LoopTimer", _CUR), GateSocketTimer = cc.import(".GateSocketTimer", _CUR), } return _M
nilq/small-lua-stack
null
local memoize = require("../memoize") print("Run tests for `memoize`") function fib(n) if n < 2 then return n else return fib(n - 1) + fib(n - 2) end end local fibnitro = memoize(fib) print("a memoized version of fibonacci produces identical results") assert(fib(10) == 55) assert(fibnitro(10) == 55) ...
nilq/small-lua-stack
null
local GameSettings = require('GameSettings') registerHotkey('ExportSettings', 'Export all settings', function() GameSettings.ExportTo('settings.lua') end) registerHotkey('SwitchFOV', 'Switch FOV', function() local fov = GameSettings.Var('/graphics/basic/FieldOfView') fov.value = fov.value + fov.step if fov.valu...
nilq/small-lua-stack
null
function serialize (o) if type(o) == "number" then io.write(o) elseif type(o) == "string" then io.write(string.format("%q", o)) elseif type(o) == "table" then io.write("{\n") for k,v in pairs(o) do io.write(" ", k, " = ") serialize(v) io.write(",\n") end io.write("}\n") ...
nilq/small-lua-stack
null
return { widget = { clock = { -- Clock widget format military_mode = false }}, module = { auto_start = { -- Will create notification if true debug_mode = false }, } }
nilq/small-lua-stack
null
--[[ Copyright (c) 2012 Zeliarden & Roland Yonaba 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, publish,...
nilq/small-lua-stack
null
local http = require "net.http"; local json = require "util.json"; local parse_timestamp = require "util.datetime".parse; module:set_global(); local current_credentials = module:shared("/*/aws_profile/credentials"); local function get_role_credentials(role_name, cb) http.request("http://169.254.169.254/latest/meta-...
nilq/small-lua-stack
null
local a = {FRUIT.BANANA, FRUIT.APPLE, FRUIT.PLUM, FRUIT.PEACH} local b = seq.fruitQ(a) local c = seq.fruitQA(a) assert(#b == #a) assert(#c == #a) for i=1, #b do assert(b[i] == a[i]) assert(c[i] == a[i]) end local a = {DNA.GUANINE, DNA.THYMINE, DNA.ADENINE, DNA.CYTOSINE} local b = seq.geneQ(a) local c = seq.geneQA(...
nilq/small-lua-stack
null
--!A cross-platform build utility based on Lua -- -- 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...
nilq/small-lua-stack
null
object_tangible_item_beast_converted_kai_tok_decoration = object_tangible_item_beast_shared_converted_kai_tok_decoration:new { } ObjectTemplates:addTemplate(object_tangible_item_beast_converted_kai_tok_decoration, "object/tangible/item/beast/converted_kai_tok_decoration.iff")
nilq/small-lua-stack
null
--- @module fimbul.v35.rules local rules = {} local stacked_value = require("fimbul.stacked_value") rules.types = { BASE = "base", DODGE = "dodge", CIRCUMSTANCE = "circumstance", NEGATIVE_LEVEL = "negative_level", } rules.damage_types = { POSITIVE = "positive", NEGATIVE = "negative", } rules.stac...
nilq/small-lua-stack
null
----------------------------------- -- Ability: Nightingale -- Game Description: Halves the casting and recast times of songs -- Obtained: Bard Level 75 Group 2 Meriting -- Recast Time: 0:10:00 -- Duration: 0:01:00 ----------------------------------- require("scripts/globals/settings") require("scripts/globals/status...
nilq/small-lua-stack
null
local vdom = require('vdom') return function(props) return vdom.create_element( 'label', { halign='right', valign='top', top=0, height = 24, text = props.version, color = '#f0f' } ) end
nilq/small-lua-stack
null
local playsession = { {"dorpdorp", {251871}}, {"Achskelmos", {1673}}, {"gearmach1ne", {250807}}, {"WiredMesh", {176987}}, {"Nate66873", {238489}}, {"Roeno1997", {236815}}, {"Qwicks", {211158}}, {"NappingYG", {10492}}, {"glukuzzz", {130126}}, {"Lucidityvt", {3824}}, {"GuidoCram", {97836}}, {"CmonMate497", {8...
nilq/small-lua-stack
null
-- Bengineering Pokemon overlay script package.path = _G.script_path() .. [[../lib/lua/?.lua;]] .. package.path package.cpath = _G.script_path() .. [[../lib/?.dll;]] .. package.cpath local obs = _G.obslua function _G.script_description() return "Automates Ben's Pokémon overlay by connecting with Google Docs.\n\nWr...
nilq/small-lua-stack
null
local lib = require "resty.nettle.library" local ffi = require "ffi" local ffi_new = ffi.new local ffi_typeof = ffi.typeof local ffi_cdef = ffi.cdef local ffi_str = ffi.string local setmetatable = setmetatable ffi_cdef[[ typedef struct knuth_lfib_ctx { uint32_t x[100]; unsigned in...
nilq/small-lua-stack
null
local default_scale = 3 config = { window = { width = 128 * default_scale, height = 128 * default_scale, min_width = 128, min_height = 128, title = "tsab_pico" } }
nilq/small-lua-stack
null
local quote_info = new_struct() -- id: int -- quote_type: quote_types -- level: int -- localized_string_id: int function quote_info:init(id, quote_type, level, localized_string_id) self.id = id self.type = quote_type self.level = level self.localized_string_id = localized_string_id end --#if log function quot...
nilq/small-lua-stack
null
return { --------------------- -- Herbalist --------------------- [201789]=2, [201801]=8, [201815]=48, [200339]=288, [200368]=1728, -- Bitterleaf [201786]=2, [201800]=8, [201814]=48, [200337]=288, [200367]=1728, -- Beetroot [201785]=2, [201799]=8, [201813]=48, [200336]=288, [200366]=1728, -- Mountain Demon Grass [20...
nilq/small-lua-stack
null
enum { PGM_ERROR_DOMAIN_IF, PGM_ERROR_DOMAIN_PACKET, PGM_ERROR_DOMAIN_RECV, PGM_ERROR_DOMAIN_TIME, PGM_ERROR_DOMAIN_SOCKET, PGM_ERROR_DOMAIN_ENGINE, PGM_ERROR_DOMAIN_HTTP, PGM_ERROR_DOMAIN_SNMP }; enum { PGM_ERROR_ADDRFAMILY, PGM_ERROR_AFNOSUPPORT, PGM_ERROR_AGAIN, ...
nilq/small-lua-stack
null
local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local feed= helpers.feed local source = helpers.source local clear = helpers.clear local feed_command = helpers.feed_command describe('prompt buffer', function() local screen before_each(function() ...
nilq/small-lua-stack
null
--[[ The look of the buttons/numbers/arrow can be altered by adding this addon to the OptionalDeps of an external addon which then overrides the functions under the "Overridables" header. ]] local _, addon = ... BossesKilled = addon function addon:PLAYER_LOGIN() -- Hook raid finder frame's onshow and onhide if Ra...
nilq/small-lua-stack
null
local M = {} M.post = function() local which_key = require 'which-key' local nnoremap = vim.keymap.nnoremap vim.g.dashboard_default_executive = 'telescope' vim.g.dashboard_custom_header = { [[ ___..._ _...___]], [[/'--.._ `'-="""=-'` _..--'\]], [[| ~. ) _ _ ( .~ |]], [[ \ ...
nilq/small-lua-stack
null
--This script runs a graphical user interface (GUI) in order to built up a documentation tree of the current repository and a documentation of related files and repositories. It displays the tree saved in documentation_tree.lua --1. basic data --1.1 libraries and clipboard --1.1.1 libraries require("iuplua") ...
nilq/small-lua-stack
null
local get_user = require('get_user') describe('get_user', function() local GITTER_TOKEN = os.getenv('GITTER_TOKEN') it('returns a table when required', function() local module_type = type(get_user) local expected = 'table' assert.are.equal(module_type, expected) end) it('returns user as...
nilq/small-lua-stack
null
require ("lib.lclass.init") class "MouseButtonDown" function MouseButtonDown:MouseButtonDown (x, y, button) self.position = { x = x, y = y } self.button = button end
nilq/small-lua-stack
null
hook.Add("InitPostEntity", "AttachmentVendorReady", function() timer.Simple(5, function() net.Start("attvend_ready"); net.SendToServer(); end); end);
nilq/small-lua-stack
null
local M = {} local snippy = require('snippy') local shared = require('snippy.shared') local api = vim.api local function feedkey(key) if key then api.nvim_feedkeys(api.nvim_replace_termcodes(key, true, true, true), 'n', true) end end local fallback = {} M.expand = function(idx) if snippy.can_ex...
nilq/small-lua-stack
null
local colors = require "term".colors local function fileToString(filename) local file, _ = io.open(filename, "r") if not file then return nil end local str = file:read("*all") file:close() return str end local dump dump = function(t, inc, seen) if type(t) == "table" and (inc or...
nilq/small-lua-stack
null
object_building_content_rebel_theme_park_military_base_command_post = object_building_content_rebel_theme_park_shared_military_base_command_post:new { } ObjectTemplates:addTemplate(object_building_content_rebel_theme_park_military_base_command_post, "object/building/content/rebel_theme_park/military_base_command_post.i...
nilq/small-lua-stack
null
-- Handler for isometric grid astar local const = require("eva.const") local basic_handler = require("eva.libs.astar.basic_handler") local M = {} function M.new_handler(get_node_fn, options) local data = basic_handler.get_handler(get_node_fn) data.neighbors = const.ASTAR.ISO.NEIGHBORS if options and options.dia...
nilq/small-lua-stack
null
return { version = "1.1", luaversion = "5.1", tiledversion = "1.1.6", orientation = "orthogonal", renderorder = "right-down", width = 25, height = 19, tilewidth = 32, tileheight = 32, nextobjectid = 3, properties = {}, tilesets = { { name = "001-Grassland01", firstgid = 1, ...
nilq/small-lua-stack
null
vim.wo.number = false vim.wo.relativenumber = false vim.wo.signcolumn = 'no'
nilq/small-lua-stack
null
--[[ MIT License Copyright (c) 2022 Ilyas TAOUAOU (CodesOtaku) 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, m...
nilq/small-lua-stack
null
--[[============================================================================= Initialization Functions Copyright 2015 Control4 Corporation. All Rights Reserved. ===============================================================================]] require "thermostat.thermostat_proxy_class" require "therm...
nilq/small-lua-stack
null
local aceDBOptions = LibStub("AceDBOptions-3.0") function Rekt:GetRektOptions() local db = self.db.profile; local options = { type = "group", name = "Rekt", childGroups = "tab", args = { enabled = { type = "toggle", name = "Enabled", desc = "Enable/Disable the addon", order = 0, get = function() retu...
nilq/small-lua-stack
null
local sha2 = require 'sha2' local t = require 'testhelper' t( sha2( "Hello world!" ), "C0535E4BE2B79FFD93291305436BF889314E4A3FAEC05ECFFCBB7DF31AD9E51A", t.hexsame ) t( sha2( '' ), "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855", t.hexsame ) t( sha2(( "a" ):rep( 1 )), "CA978112CA1BBDCAFAC231B39A2...
nilq/small-lua-stack
null
-- Automatically generated from limoDrive.xml { {x = 0, y = 0, width = 2048, height = 646, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 1: Limo stage0000 {x = 0, y = 656, width = 2048, height = 646, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 2: Limo stage0001 {x = 0...
nilq/small-lua-stack
null
--- Copyright (c) 2020 Sammy James local ADDON_NAME = ... local CC = LibStub("AceAddon-3.0"):GetAddon(ADDON_NAME) assert(CC, ADDON_NAME .. "not found") local FL = CC:NewModule("FogLight") local LOC = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME) function FL:OnInitialize() CC:AppendLocale("enUS", funct...
nilq/small-lua-stack
null
local playsession = { {"MeggalBozale", {142041}}, {"PogomanD", {69134}}, {"rocifier", {129203}}, {"aceofshovels", {4047}}, {"15944831778", {35933}}, {"sadler1321", {86480}}, {"Menander", {85931}}, {"realDonaldTrump", {58813}} } return playsession
nilq/small-lua-stack
null
local LIST = require 'Core.Modules.interface-list' local listeners = {} listeners.pos = function(e) local list = LOCAL.pos_top_ads and {STR['settings.topads'], STR['settings.bottomads']} or {STR['settings.bottomads'], STR['settings.topads']} LIST.new(list, e.target.x, e.target.y - e.target.height / 2, '...
nilq/small-lua-stack
null
local ngx = ngx local ngx_ERR = ngx.ERR local ngx_log = ngx.log local ngx_time = ngx.time local ngx_var = ngx.var local md5 = ngx.md5 local lua_cache_data = ngx.shared.lua_cache_data local init_config = require "cache_proxy.config.config" local op_time_version = require "cache_proxy.lua_script.op...
nilq/small-lua-stack
null
mysterious_merchant = { on_healed = function(mob, healer) mob_ai_basic.on_healed(mob, healer) end, on_attacked = function(mob, attacker) --mob.target = 0 mob.newMove = 500 mob.state = MOB_ESCAPE if (attacker.damage >= mob.health) then if math.random(1, 1) == 1 then attacker:msg( 0, mob....
nilq/small-lua-stack
null
--Copyright (c) 2013, Byrthnoth --All rights reserved. --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and t...
nilq/small-lua-stack
null
-- -- LEW-19710-1, CCSDS SOIS Electronic Data Sheet Implementation -- -- Copyright (c) 2020 United States Government as represented by -- the Administrator of the National Aeronautics and Space Administration. -- All Rights Reserved. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not...
nilq/small-lua-stack
null
local button = modules.class.get("button") local allowed_characters = { ["."] = true } local text_entry = modules.class("text_entry", "button") function text_entry:init() button.init(self) self.time_since_last_keypressed = os.clock() self.time_since_last_keydown = os.clock() self....
nilq/small-lua-stack
null
local zthreads = require "lzmq.threads" -- If we run as thread we get global context -- If we run as process we create new context local ctx = zthreads.context() -- Create new REQ socket and connect to the server local skt, err = ctx:socket{"REQ", connect = "tcp://127.0.0.1:5555" } if not skt then prin...
nilq/small-lua-stack
null
local skynet = require "skynet" local netpack = require "netpack" local socket = require "socket" local protobufload = require "protobufload" local logstat = require "base.logstat" local p_core = require "p.core" local battle_send = require "battle.battle_send" local cards = require "data.carddata" cards = cards.inst()...
nilq/small-lua-stack
null
require 'torch' torch.setdefaulttensortype('torch.FloatTensor') local ffi = require 'ffi' local class = require('pl.class') local dir = require 'pl.dir' local tablex = require 'pl.tablex' local argcheck = require 'argcheck' require 'sys' require 'xlua' require 'image' local dataset = torch.class('dataLoader') local ...
nilq/small-lua-stack
null
local foo = {} function foo.bar(x) return x*x + 1 end print(foo.bar(4))
nilq/small-lua-stack
null
local isadmin = require("util.isadmin") local send = require("util.send") return function(client, line, subargs) if line.prefix.host and isadmin(line.prefix.host) then if #subargs > 0 then for _, channel in pairs(subargs) do if channel:sub(1,1) == "#" then se...
nilq/small-lua-stack
null
modifier_attribute_bonus modifier_healing_campfire_aura modifier_healing_campfire_heal modifier_lesser_nightcrawler_pounce modifier_zombie_berserk modifier_corpselord_revive modifier_greater_clarity modifier_upgraded_mortar modifier_upgraded_barricade modifier_creature_hybrid_flyer modifier_creature_full_avoidance mod...
nilq/small-lua-stack
null