content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
module("luci.controller.wifidog", package.seeall) function index() local fs = require "nixio.fs" if fs.access("/usr/bin/wifidog") then entry({"admin", "services", "wifidog"}, cbi("wifidog"), "Wifidog", 4) end end
nilq/small-lua-stack
null
deathspeaker_xunra_rune_of_haste_modifier = class({}) function deathspeaker_xunra_rune_of_haste_modifier:OnCreated( kv ) self.move_speed_percentage = self:GetAbility():GetSpecialValueFor("move_speed_percentage") self.roots_duration = self:GetAbility():GetSpecialValueFor("roots_duration") end fu...
nilq/small-lua-stack
null
local prototype = require('prototype') local func = require('func') local ffi = require('ffi') local delimiter = '/' local newline = '\n' local executableSuffix = '' if ffi.os == 'Windows' then delimiter = '\\' newline = '\r\n' executableSuffix = '.exe' end local bind = func.bind local Program = prototype {} ...
nilq/small-lua-stack
null
local function is_table(variable) return type(variable) == 'table' end local function is_number(variable) return type(variable) == 'number' end local function split_to_words(s) return s:gmatch('%S+') end local function trim_lines(s) return (s:gsub("\n%s*", "\n"):gsub("%s*\n", "\n")) end local f...
nilq/small-lua-stack
null
local R = require "rigel" local RM = require "generators.modules" local types = require("types") local harness = require "generators.harness" local harris = require "harris_core" W = 256 H = 256 T = 8 ITYPE = types.array2d(types.uint(8),T) local inpraw = R.input(R.Handshake(ITYPE)) local inp = R.apply("reducerate", ...
nilq/small-lua-stack
null
local tl = require("tl") describe("local", function() describe("declaration", function() it("basic inference sets types", function() -- fail local tokens = tl.lex([[ local x = 1 local y = 2 local z: table z = x + y ]]) local _...
nilq/small-lua-stack
null
module(..., package.seeall) function gen_bindings(n_bindings, ports_per_host) local bt = {} local i4 = 0x11223344 local ipv6_prefix = "0102:0304:0406:0708:090a:0b0c:" local start_port = 1024 local port_step = math.floor((0xffff - start_port) / ports_per_host) for i = 1, n_bindings/ports_per_host do ...
nilq/small-lua-stack
null
fx_version 'cerulean' game 'gta5' author 'MasiBall' description 'Simple standalone teleport resource. Works with and without vehicle' server_scripts { 'server/server.lua', } client_scripts { 'client/client.lua', 'client/config.lua' }
nilq/small-lua-stack
null
mealCost = 10.25 tipPercent = 17 taxPercent = 5 tip = mealCost * (tipPercent / 100); tax = mealCost * (taxPercent / 100); total = mealCost + tip + tax; rounded = math.floor(total+0.5) print(rounded) print(string.format("The total meal cost is %i dollars.", total))
nilq/small-lua-stack
null
local HomeRun = {} local function prepareDatabase() SQL.createdatabase('db/home_run.db') SQL.opendatabase('db/home_run.db') SQL.writecommand('CREATE TABLE seed_frame_result (' .. 'id int PRIMARY KEY,' .. 'seed int,' .. 'numberShoot int,' .. 'frame int,' .. 'result in...
nilq/small-lua-stack
null
local game = {} function game.setName(name) game.name = name end return game
nilq/small-lua-stack
null
local texture = "fx/snow.tex" local shader = "shaders/particle.ksh" local colour_envelope_name = "pollencolourenvelope" local scale_envelope_name = "pollenscaleenvelope" local assets = { Asset( "IMAGE", texture ), Asset( "SHADER", shader ), } local function IntColour( r, g, b, a ) return { r / 255.0, g / 255.0, b ...
nilq/small-lua-stack
null
--[[ File handler. ]] local files = {} _libs = _libs or {} _libs.filehelper = files _libs.stringhelper = _libs.stringhelper or require('stringhelper') local createfile = false -- Create a new file object. Accepts a variable number of paths, which it will function files.new(path, create) create = true and (creat...
nilq/small-lua-stack
null
-- TaskQueue -- Stephen Leitnick -- November 20, 2021 --[=[ @class TaskQueue A queue that flushes all objects at the end of the current execution step. This works by scheduling all tasks with `task.defer`. A possible use-case is to batch all requests being sent through a RemoteEvent to help prevent calling it t...
nilq/small-lua-stack
null
local function addNode(self, node, nextNode, ed) if not self._pathDB[node] then self._pathDB[node] = {} end self._pathDB[node][ed] = (nextNode == ed and node or nextNode) end -- Path lookupTable local lookupTable = {} lookupTable.__index = lookupTable function lookupTable:new() local lut = {_pathDB = {}}...
nilq/small-lua-stack
null
-- Copyright 2013 Arman Darini local class = {} class.new = function(o) local CameraClass = display.newGroup() CameraClass.layer = nil CameraClass.viewable = {} CameraClass.x = 0 CameraClass.y = 0 CameraClass.frozen = false CameraClass.timers = {} CameraClass.transitions = {} CameraClass.state = "ready" ---...
nilq/small-lua-stack
null
-- https://phanx.net/addons/tutorials/localize local _, namespace = ... local L = setmetatable({}, { __index = function(t, k) local v = tostring(k) rawset(t, k, v) return v end }) namespace.L = L local LOCALE = GetLocale() if LOCALE == "enUS" then -- The EU English game client al...
nilq/small-lua-stack
null
return { { effect_list = { { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNil", targetAniEffect = "", arg_list = { weapon_id = 65551 } } } }, { effect_list = { { type = "BattleSkillFire", casterAniEffect = "", target_choise = "TargetNi...
nilq/small-lua-stack
null
include("shared.lua") language.Add("nature_planet", "Plant") function ENT:DoNormalDraw(bDontDrawModel) local mode = self:GetNWInt("overlaymode") if not bDontDrawModel then self:DrawModel() end local trace = LocalPlayer():GetEyeTrace() if not (trace.Entity == self and EyePos():Distance(self:GetPos(...
nilq/small-lua-stack
null
local gameCode = '' local target = '$HOSTNAME' function encodeURI(str) if (str) then str = string.gsub (str, "\n", "\r\n") str = string.gsub (str, "([^%w ])", function (c) return string.format ("%%%02X", string.byte(c)) end) str = string.gsub (str, " ", "+") end return str e...
nilq/small-lua-stack
null
-- * Metronome IM * -- -- This file is part of the Metronome XMPP server and is released under the -- ISC License, please see the LICENSE file in this source package for more -- information about copyright and licensing. module:depends("s2s") module:set_global() local hosts = hosts local incoming_s2s = metronome.inco...
nilq/small-lua-stack
null
adult_pygmy_torton = Creature:new { objectName = "@mob/creature_names:torton_pygmy_adult", socialGroup = "torton", faction = "", level = 20, chanceHit = 0.31, damageMin = 190, damageMax = 200, baseXp = 1609, baseHAM = 2000, baseHAMmax = 2400, armor = 0, resists = {120,120,5,5,5,-1,-1,200,-1}, meatType = "m...
nilq/small-lua-stack
null
function safe_string(value) if type(value) == "string" then local v = string.gsub(value, "([\\\10\13%c%z\"])([0-9]?)", function(chr, digit) local b = string.byte(chr) if #digit == 1 then if string.len(b) == 1 then return "\\00"..b..digit end if string.len(b) == 2 then return "\\0"..b..digit end end...
nilq/small-lua-stack
null
local class = require 'ext.class' local table = require 'ext.table' local symmath = require 'symmath' local template = require 'template' local CoordinateSystem = require 'hydro.coord.coord' local sin, cos = symmath.sin, symmath.cos local Tensor = symmath.Tensor local Sphere = class(CoordinateSystem) Sphere.name = 's...
nilq/small-lua-stack
null
local Label = {}; Label.__index = Label function Label:new(x, y, w, h, text, color, align) local this = setmetatable({ position = {x = x or 0, y = y or 0}, w = w, h = h, text = text or "", align = align or "center", color = color or {1, 1, 1, 1} }, Label) return this end function L...
nilq/small-lua-stack
null
DxLabel = {} DxLabel.__mt = {__index = DxLabel} DxLabel.list = {} function DxLabel:render() if(not self.visible) then return end if(self.buffered) then self:renderBuffer() else self:renderInternal(self.left, self.top, self.right, self.bottom, self.alignX, self.alignY) end end function DxLabel:...
nilq/small-lua-stack
null
local objects = { --Maxime createObject(18024,877.2999878,164.6000061,1011.5000000,0.0000000,0.0000000,0.0000000,41), --object(int_clothe_ship,41), (1,41), createObject(1967,854.2999878,154.1000061,1009.5999756,0.0000000,0.0000000,90.0000000,41), --object(imcmptrkdrr_las,41), (1,41), createObject(18024,857.3994141...
nilq/small-lua-stack
null
return function(source_module_inventory, target_entity, player, interact_with_player, create_logistic_request) -- prepare commonly used variables local target_inventory = target_entity.get_module_inventory() if not target_inventory then return end local player_inventory = player.get_main_inventory() --...
nilq/small-lua-stack
null
local ReplicatedStorage = game:GetService('ReplicatedStorage') local Modules = ReplicatedStorage:WaitForChild('Modules') -- local logger = require(Modules.src.utils.Logger) local clientSrc = game:GetService('StarterPlayer'):WaitForChild('StarterPlayerScripts').clientSrc local M = require(Modules.M) local Roact = requi...
nilq/small-lua-stack
null
--- -- @module Armor -- -- ------------------------------------------------ -- Required Modules -- ------------------------------------------------ local Item = require( 'src.items.Item' ) -- ------------------------------------------------ -- Module -- ------------------------------------------------ local Armor =...
nilq/small-lua-stack
null
local __exports = LibStub:NewLibrary("ovale/Warlock", 80300) if not __exports then return end local __class = LibStub:GetLibrary("tslib").newClass local aceEvent = LibStub:GetLibrary("AceEvent-3.0", true) local tonumber = tonumber local pairs = pairs local GetTime = GetTime local CombatLogGetCurrentEventInfo = CombatLo...
nilq/small-lua-stack
null
ITEM.Name = 'Sawblade' ITEM.Price = 1000 ITEM.Model = 'models/props_junk/sawblade001a.mdl' ITEM.Follower = 'sawblade' function ITEM:OnEquip(ply, modifications) ply:Fo_CreateFollower( self.Follower ) end function ITEM:OnHolster(ply) ply:Fo_RemoveFollower( self.Follower ) end
nilq/small-lua-stack
null
local K = unpack(select(2, ...)) -- Lua API local _G = _G local table_wipe = _G.table.wipe -- GLOBALS: SkinnerDB local SkinnerDB = _G.SkinnerDB function K.LoadSkinnerProfile() if SkinnerDB then table_wipe(SkinnerDB) end _G.SkinnerDB["profiles"]["Default"] = { -- General ["Warnings"] = false, ["Errors"] ...
nilq/small-lua-stack
null
local mysql = require("core.driver.mysql") local cjson = require "cjson" local arg = ngx.req.get_uri_args() local res = mysql:query("select ID as id , NAME as name from DISTRICT order by CREATE_TIME") mysql:closeClient() ngx.say(cjson.encode(res))
nilq/small-lua-stack
null
-- verify_globals.lua -- ignore things that change on different machines or every release -- the following items still have to exist, but their values don't have to match local filter = { -- differences by machine "DATA_DIR", "USER_DIR", "package.cpath", "package.path", "package.loaded", "r...
nilq/small-lua-stack
null
Locales['fr'] = { -- DialogBox Name ['dialogbox_playerid'] = 'ID du Joueur (8 Caractères Maximum):', ['dialogbox_amount'] = 'Montant (8 Caractères Maximum):', ['dialogbox_amount_ammo'] = 'Montant de Munitions (8 Caractères Maximum):', ['dialogbox_vehiclespawner'] = 'Nom du Véhicule (50 Caractères Maximum):', ...
nilq/small-lua-stack
null
local json = require "json" local parse = require "parse" local property = require "property" local localization = require "localization" local database = require "database" local exit = require "exit" local exception = require "exception" local exceptionHandler = require "exceptionHandler" local util = require...
nilq/small-lua-stack
null
local ScaleDimension = {} ScaleDimension.__index = ScaleDimension function ScaleDimension:new() local this = { scaleItems = {}, graphicsDimensions = {width = love.graphics.getWidth(), height = love.graphics.getHeight()}, gameScreenScale = {width = 800, height = 600} } return setme...
nilq/small-lua-stack
null
includes("GraphicsInterface")
nilq/small-lua-stack
null
return {--点赞 check = function (data) return (data.msg=="点赞" or data.msg=="赞我") end, run = function (data,sendMessage) if not checkCoolDownTime(data, "like", sendMessage) then return true end --CD时间 local time = os.date("*t",os.time()+3600*24) time.hour = 0 time.min = 0 time.sec =...
nilq/small-lua-stack
null
require 'torch' --object declaration local annsp = {} --inits function annsp.init(data, labels) if annsp.verify_dimensions(data) then annsp.x = data annsp.y = labels annsp.eta = 0.01 --annsp.weights = torch.randn(#annsp.x[1]+1) annsp.weights = torch.Tensor({-0.1839, 0.4486, -0.133...
nilq/small-lua-stack
null
for n in pairs(_G) do print(n) end
nilq/small-lua-stack
null
MATSAVPRC_STRINGS = { ["SI_MATSAVPRC_SAVING"] = "Saving materials prices …", }
nilq/small-lua-stack
null
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- hoodwink_acorn_sho...
nilq/small-lua-stack
null
function on_msg_receive (msg) status_online(ok_cb, false); -- Uncomment, if debugging, to see all properties of objects -- print ("Message From data...") -- getAllData(msg.from,nil) -- print ("Message To data...") -- getAllData(msg.to,nil) -- print ("Message data...") -- getAllData(msg,nil) -- if (msg.media...
nilq/small-lua-stack
null
stringx = require('pl.stringx') require 'io' opt = { task = "evaluate", model = "queryable_word_model", version = "best_train", device = 1 } require "main" function readline() local line = io.read("*line") if line == nil then error({code="EOF"}) end line = stringx.split(line) if tonumber(line[1]) == nil then ...
nilq/small-lua-stack
null
-- Functions for nvim 0.4 compatibility. -- This module will be removed once nvim 0.5 becomes stable. local vfn = vim.api.nvim_call_function local compat = {} function tbl_map(func, t) if vfn('has', {'nvim-0.5'}) == 1 then return vim.tbl_map(func, t) end local rettab = {} for k, v in pairs(t)...
nilq/small-lua-stack
null
require 'resources.data_stages' _LIFECYCLE = _STAGE.control local GameGui = require 'features.snake.gui' local Game = require 'features.snake.game' local Public = {} --- Starts snake game. -- Note when players join the game they will lose thier character. -- @param surface <LuaSurface> Surface that the board is plac...
nilq/small-lua-stack
null
local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") if not (present1 or present2) then return end autopairs.setup() local cmp = require("cmp") cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
nilq/small-lua-stack
null
include "wac/base.lua" wac.input = wac.input or { registerSeat = function(seat) seat.wac = seat.wac or {} --seat.wac.addInput end, }
nilq/small-lua-stack
null
local t = ... local delay = 0.15 local animframes6 = { {Frame = 0, Delay = delay*2}, {Frame = 1, Delay = delay*2}, {Frame = 2, Delay = delay*2}, {Frame = 3, Delay = delay*2}, {Frame = 4, Delay = delay*2}, {Frame = 5, Delay = delay*2} } local animframes12= { {Frame = 0, Delay = delay}, {Frame = 1, Delay = delay...
nilq/small-lua-stack
null
local M = {} function M.collect(self, opts) local lines = vim.api.nvim_buf_get_lines(self.bufnr, 0, -1, false) local pattern = opts.pattern if pattern == nil or pattern == "" then local items = vim.tbl_map(function(line) return {value = line} end, lines) if opts.interactive then self:app...
nilq/small-lua-stack
null
--- Downward facing proximity sensor. -- This modeule is used to detect when the robot is picked up. -- @module proximity -- @alias M local M = {} local apds9960r = assert(require('apds9960')) assert(apds9960r.init()) assert(apds9960r.enable_power()) --- The native C firmware module. -- This can be used to access lo...
nilq/small-lua-stack
null
-- Copyright (C) Miracle -- Copyright (C) OpenWAF local _M = { _VERSION = "0.0.1" } function _M.transforms(self, options, values) local func = { base64_decode = function(value) if not value then return nil end local t_val = ngx.decode_base64(tostring(value)) ...
nilq/small-lua-stack
null
local function printUsage() print( "Usages:" ) print( "gps host" ) print( "gps host <x> <y> <z>" ) print( "gps locate" ) end local tArgs = { ... } if #tArgs < 1 then printUsage() return end local sCommand = tArgs[1] if sCommand == "locate" then -- "gps locate" -- Just locate this...
nilq/small-lua-stack
null
Locales['sv'] = { ['you_paid'] = 'du betalade ~r~%s SEK~s~ till körskolan', ['go_next_point'] = 'åk till nästa punkt!', ['in_town_speed'] = 'du åker ni i stan, var uppmärksam på din hastighet! hastighetsgräns: ~y~', ['next_point_speed'] = 'åk till nästa punkt! hastighetsgräns: ~y~%s~s~ km/h', ['stop_for_ped']...
nilq/small-lua-stack
null
-- A bit different from cl_plugins, here we set the default value instead. Clockwork.config:Add("jammer_range", 1024, true)
nilq/small-lua-stack
null
local full_date_formats = { "(%d%d%d%d)%-(1[012])%-([012]%d)", "(%d%d%d%d)%-(1[012])%-(3[01])", "(%d%d%d%d)%-(0%d)%-([012]%d)", "(%d%d%d%d)%-(0%d)%-(3[01])", "(%d%d%d%d)(1[012])([012]%d)", "(%d%d%d%d)(1[012])(3[01])", "(%d%d%d%d)(0%d)([012]%d)", "(%d%d%d%d)(0%d)(3[01])", } local partial_date_formats = ...
nilq/small-lua-stack
null
-- example reporting script which demonstrates a custom -- done() function that prints latency percentiles as CSV done = function(summary, latency, requests, connect_time) io.write("------------------------------\n") for _, p in pairs({ 50, 90, 99, 99.999 }) do n = latency:percentile(p) io.write(stri...
nilq/small-lua-stack
null
local rpc_mgr = require "rpc.rpc_mgr" local cnetwork = require "cerberus.network" -- wrap most core api into cerberus local cerberus = {} function cerberus.start(...) return rpc_mgr:run(...) end function cerberus:connect(ip, port) return rpc_mgr:sync(cnetwork.connect, ip, port) end function cerberus:listen(ip, p...
nilq/small-lua-stack
null
jam = {} jam.globals = {} setmetatable(jam.globals, { __index = function(t, key) return jam_getvar(key) end, __newindex = function(t, key, value) jam_setvar(key, value) end, }) setmetatable(jam, { __index = function(t, key) --print('Generating ' .. key) if jam_evalua...
nilq/small-lua-stack
null
require('telescope').setup{ defaults = { file_ignore_patterns = {".git/", "node_modules/"}, mappings = { n = { ["q"] = "close", ["<C-d>"] = "delete_buffer", } }, vimgrep_arguments = { "rg", "--hidden", "--color=never", "--no-heading", "--with-f...
nilq/small-lua-stack
null
local Class = require("lib.class") local Lovox = require("lib.lovox") local Vec3 = require("lib.vec3") local Entity = require("src.entity") local World = require("src.world") local Enemy = Class("Enemy", Entity) Enemy.isEnemy = true Enemy.batch = require("src.skeletonbatch") Enemy.animations = { idle = {0}, ...
nilq/small-lua-stack
null
local lVector = require 'Q/RUNTIME/VCTR/lua/lVector' local json = require 'Q/UTILS/lua/json' local T = {} local function view_meta () local V = {} for k,v in pairs(_G) do if ( type(v) == "lVector" ) then local x = v:meta() for k2, v2 in pairs(x) do assert( ( ( k2 == "base" ) or ( k2 == ...
nilq/small-lua-stack
null
local a=module('_core','libs/Tunnel')local b=module('_core','libs/Proxy')local c=a.getInterface("hpp_craftammo")API=b.getInterface('API')cAPI=a.getInterface('cAPI')local d=module("hpp_craftammo","config/cfg")animApi=module("_core","client/functions/_Anims")local e={"mureta","mafia"}Citizen.CreateThread(function()while ...
nilq/small-lua-stack
null
local Behavior = CreateAIBehavior("HeliFireRockets", { Constructor = function (self, entity) entity:SelectPrimaryWeapon() entity:SelectPipe(0, "do_nothing") local postures = { { name = "StandAim", type = POSTURE_AIM, stance = STANCE_STAND, priority = 8.0, { name = "StandAim...
nilq/small-lua-stack
null
padawan_pannaqa_01_convo_template = ConvoTemplate:new { initialScreen = "", templateType = "Lua", luaClassHandler = "padawan_pannaqa_01_conv_handler", screens = {} } intro = ConvoScreen:new { id = "intro", leftDialog = "@conversation/padawan_pannaqa_01:s_41aab3ed", -- I'm sure someone of your ability will be abl...
nilq/small-lua-stack
null
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] local CHAR = ix.meta.character function CHAR:GetKevlar() for k, v in pairs(self:GetCharPanel():GetItems()) do if(v.outfitCategory == "kevlar") then return v end end return nil ...
nilq/small-lua-stack
null
--[[ ?)]] -- ################################################## FLY MOD ACTIVE ################################################## -- Charge: 1 room. -- While held, a robotic fly will orbit Isaac, dealing light contact damage and blocking enemy shots. -- After activating the item, Fly Mod will leave the orbit and dash f...
nilq/small-lua-stack
null
local _type = type local string = string local _ipairs = ipairs local _osdate = os.date local _ostime = os.time local _osdifftime = os.difftime local _mathceil = math.ceil local _mathfloor = math.floor local socket = require("socket") local json = require("json") local composer = require("composer") local clientVersion...
nilq/small-lua-stack
null
--Pre-made areas --Waves AREA_SHORTWAVE3 = { {1, 1, 1}, {1, 1, 1}, {0, 3, 0} } AREA_WAVE4 = { {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 3, 0, 0} } AREA_WAVE6 = { {0, 0, 0, 0, 0}, {0, 1, 3, 1, 0}, {0, 0, 0, 0, 0} } AREA_SQUAREWAVE5 = { {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {0, 1, 0}, {0, 3, 0} } AREA_SQU...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- func: getmobaction -- desc: Prints mob's current action to the command user. --------------------------------------------------------------------------------------------------- cmdprops = { permission = 1, pa...
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BceUserRoleList_pb', package.seeall) local BCEUSERROLELIST = protobuf.Descriptor(); local BCEUSERROLELIST_SERVERID_FIELD = protobuf.FieldDescriptor(); BCEUSERROLELIST_SERVERID_FIELD.name = "serverid" BCEUSERROLELIST_SERVERID_FIELD...
nilq/small-lua-stack
null
-- Copyright (C) Izio, Inc - All Rights Reserved -- Unauthorized copying of this file, via any medium is strictly prohibited -- Proprietary and confidential -- Written by Romain Billot <romainbillot3009@gmail.com>, Jully 2017 local Records = {} RegisterServerEvent("print:serverArray") RegisterServerEvent("police:armu...
nilq/small-lua-stack
null
mlp = nn.Sequential() mlp:add(nn.Convert('bchw', 'bf')) -- collapse 3D to 1D mlp:add(nn.Linear(1*28*28, 200)) mlp:add(nn.Tanh()) mlp:add(nn.Linear(200, 200)) mlp:add(nn.Tanh()) mlp:add(nn.Linear(200, 10)) mlp:add(nn.LogSoftMax()) -- for classification problems
nilq/small-lua-stack
null
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ return function(loveframes) ---------- module start ---------- -- panel object local newobject = loveframes.newObject("pane...
nilq/small-lua-stack
null
--[=====[ script to cycle commands with a keybind, accomplished through script messages available at: https://github.com/CogentRedTester/mpv-scripts syntax: script-message cycle-commands "command1" "command2" "command3" The syntax of each command is identical to the standard input.conf syntax,...
nilq/small-lua-stack
null
AI = require(PATH_GAME .. "ai") dofile(PATH_CONFIGS .. "animation_config.lua") dofile(PATH_CONFIGS .. "bestiar_config.lua") dofile(PATH_CONFIGS .. "npc_config.lua") dofile(PATH_GAME .. "game_machine.lua") dofile(PATH_GAME .. "hero.lua") dofile(PATH_GAME .. "gui_game_config.lua") dofile(PATH_GAME .. "inventory.lua") dof...
nilq/small-lua-stack
null
local Prop = {} Prop.Name = "Arcadia Apartments 2c" Prop.Cat = "Apartments" Prop.Price = 900 Prop.Doors = { Vector( 4069, -68, 502 ), Vector( 4156, -133, 502 ), } GM.Property:Register( Prop )
nilq/small-lua-stack
null
local Prop = {} Prop.Name = "Subs Market 203" Prop.Cat = "Stores" Prop.Price = 500 Prop.Doors = { Vector( 10628, -12058, -1664.75 ), Vector( 10492, -11586, -1664.75 ), } GM.Property:Register( Prop )
nilq/small-lua-stack
null
local Surfaces = require('script.surfaces') local Portal = require('script.portal') local portal_spec_example = { type = "entity", -- Types: entity, energy, item type_params = {}, -- Parameters depending on the type, used to add restrictions relative_target = -1, -- Interger, defines how many layers we sho...
nilq/small-lua-stack
null
data:extend({ { type = 'autoplace-control', name = 'nm-pre-spice-mass-ore', localised_name = {"", "[entity=nm-pre-spice-mass-ore] ", {"entity-name.nm-pre-spice-mass-ore"}}, richness = true, order = 'b-a', category = 'resource' }, { type = 'autoplace-control'...
nilq/small-lua-stack
null
-- config storage.shovel = 9596 storage.rope = 9596 storage.machete = 9596 storage.scythe = 9596 local useId = {6264, 5282, 20453, 20454, 20474, 11708, 11705, 6257, 6256, 2772, 27260, 2773, 1632, 1633, 1948, 435, 6252, 6253, 5007, 4911, 1629, 1630, 5108, 5107, 5281, 1968, 435, 1948, 5542, 31116, 31120, 30742, 31115, ...
nilq/small-lua-stack
null
local Linear, parent = torch.class('nn.Linear', 'nn.Module') function Linear:__init(inputSize, outputSize) parent.__init(self) self.weight = torch.Tensor(outputSize, inputSize) self.bias = torch.Tensor(outputSize) self.gradWeight = torch.Tensor(outputSize, inputSize) self.gradBias = torch.Tensor(output...
nilq/small-lua-stack
null
phy={} player.weight=6 player.jumpspeed=1 player.jumpairtime=10 player.jumpairtimeC=0 player.airtime=10 player.inair=0 player.gravity=0 local LoseHp = 0 local fallen = 0 phy.world = bump.newWorld(128) phy.blocks = {} phy.player = {type='player'} phy.nocollosion = {5,8} function phy.player...
nilq/small-lua-stack
null
--- Common functions that are needed by almost any good strategy. local util = require 'lib.util' local isin = util.isin local slice = util.slice local simulation = require 'simulation' local T = simulation.T local calcDrivingDistance = simulation.calcDrivingDistance local compareCodes = simulation.compareCodes local...
nilq/small-lua-stack
null
--[[ Tube-enabled frames (API) Omikhleia 2020. MIT-lisenced. --]] tubeframe = { version = 1.0, } -- Node registration local nodeparts = { tube = { insert_object = function(pos, node, stack, direction, owner) local meta = minetest.get_meta(pos) local s = stack:take_item(1) meta:set_str...
nilq/small-lua-stack
null
local mod_storage = minetest.get_mod_storage() local channels = minetest.parse_json(mod_storage:get_string("channels")) -- -- Mod settings -- Change these to your liking -- local main_channel_name = "main" -- The main channel is the one you send messages to when no channel is specified local main_channel_owner = "Ga...
nilq/small-lua-stack
null
local pairs = pairs local ogetenv = os.getenv local utils = require 'bin.scaffold.utils' local app_run_env = ogetenv("FW_ENV") or 'dev' local ngx_conf = {} ngx_conf.common = { -- directives FW_ENV = app_run_env, -- INIT_BY_LUA_FILE = './app/nginx/init.lua', -- LUA_PACKAGE_PATH = '', -- LUA_PACKAGE_CPATH = '', CON...
nilq/small-lua-stack
null
local Native = require('lib.stdlib.native') ---@class Hashtable : Agent local Hashtable = class('Hashtable', require('lib.stdlib.oop.agent')) ---<static> create ---@return Hashtable function Hashtable:create() return Hashtable:fromUd(Native.InitHashtable()) end ---saveInteger ---@param parentKey integer ---@para...
nilq/small-lua-stack
null
local Class = require 'class' local Window = require 'window.window' local Menubar = Class({ __includes = Window}) function Menubar:draw() Window.draw(self) local x = 1 for _,v in pairs(self.items) do self:printat(x,0,v.name) x = x + #v.name + 3 end end function Menubar:mouseDown(mx,my) local x =...
nilq/small-lua-stack
null
require("neogen").setup({ enabled = true, languages = { python = { template = { annotation_convention = "numpydoc", }, }, }, })
nilq/small-lua-stack
null
local FS = require("fs") local Json = require("json") local Path = require("path") local Logger = require("Logger") local FetchPackage = require("LIT/FetchPackage") return function(PackagePath, Log, IsMain) local FilePos = PackagePath -- Path.normalize(PackagePath) local FileBase = Path.basename(FilePos) ...
nilq/small-lua-stack
null
-- https://wiki.navercorp.com/display/LFS/AnimationKit -- Update Date : 210401 -- Writer : June Kim --[[ Reference - https://wiki.navercorp.com/display/LFS/Property+Animation - https://wiki.navercorp.com/display/LFS/Kuru+Features#KuruFeatures-KuruScene.getSnapshotNodeOfScene,StickerConfig::getFirstScene(),Multili...
nilq/small-lua-stack
null
--[[ SAVE GAME local data = { _fileName = "test.txt", players } success = jupiter.save( data ) print( success ) --]] --[[ I DON'T KNOW players = {} -- load players from file -- so this looks horrible but it works so I'll change it later file ,error= io.open( "files/players.txt" ) local n = file:read() for i ...
nilq/small-lua-stack
null
local countryName = { O1 = "Other Country", AD = "Andorra", AE = "United Arab Emirates", AF = "Afghanistan", AG = "Antigua and Barbuda", AI = "Anguilla", AL = "Albania", AM = "Armenia", AO = "Angola", AP = "Asia/Pacific Region", AQ = "Antarctica", AR = "Argentina", AS = "American Samoa", AT = "Austria", ...
nilq/small-lua-stack
null
local create_gui = require 'gui' renoise.tool():add_menu_entry { name = 'Main Menu:Tools:Partial Quantize...', invoke = function() create_gui(true, 'all_tracks') end, } renoise.tool():add_menu_entry { name = 'Pattern Editor:Pattern:Partial Quantize...', invoke = function() create_gui(false, 'all_tracks') end, } ...
nilq/small-lua-stack
null
function on_activate(parent, ability) local targets = parent:targets():friendly():touchable() local targeter = parent:create_targeter(ability) targeter:set_selection_touchable() targeter:add_all_selectable(targets) targeter:add_all_effectable(targets) targeter:activate() end function on_target...
nilq/small-lua-stack
null
local t = { who={ f = function(player, parts) local s = "Online:"..NEWL for k, client in pairs(clients) do if (not client.state:match("^login")) and client.name then s = s..tostring(client.name)..NEWL end end player:send(s, "") end }, quit = { f = func...
nilq/small-lua-stack
null
--- 模块功能:串口功能测试(非TASK版,串口帧有自定义的结构) -- @author openLuat -- @module uart.testUartTask -- @license MIT -- @copyright openLuat -- @release 2018.05.24 module(...,package.seeall) require"utils" require"pm" --[[ 功能定义: uart接收数据,如果100毫秒没有收到新数据,则打印出来所有已收到的数据,清空数据缓冲区,回复received x frame给对端,然后等待下次数据接收 注意: 串口帧没有定义结构,仅靠软件延时,无法保证帧的...
nilq/small-lua-stack
null