content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
#!/usr/bin/lua
require("power")
A = torch.FloatTensor():rand(5,3)
b = square(A)
print(b)
print(cube(5))
| nilq/small-lua-stack | null |
local PacketType = require "lumina.protocol.packet.packet_type"
local test_utils = require "spec.test_utils"
describe("PacketType", function()
it("round trip encoding", function()
for i=1,14 do
local value = assert(PacketType.from(i))
local bytes = value:encode()
local b... | nilq/small-lua-stack | null |
-- Generated by CSharp.lua Compiler
local System = System
System.namespace("Slipe.Client.Vehicles.Events", function (namespace)
namespace.class("OnNitroStateChangeEventArgs", function (namespace)
local __ctor__
__ctor__ = function (this, b)
this.State = System.cast(System.Boolean, b)
end
return ... | nilq/small-lua-stack | null |
shikamaru_meditation = shikamaru_meditation or class({})
LinkLuaModifier("modifier_meditation_negative", "abilities/heroes/shikamaru/shikamaru_meditation.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_meditation_positive", "abilities/heroes/shikamaru/shikamaru_meditation.lua", LUA_MODIFIER_MOTION_NONE)
fun... | nilq/small-lua-stack | null |
libHDiffPatch = {
source = path.join(dependencies.basePath, "HDiffPatch/libHDiffPatch"),
}
function libHDiffPatch.import()
links {
"libHDiffPatch"
}
libHDiffPatch.includes()
end
function libHDiffPatch.includes()
includedirs {
path.join(libHDiffPatch.source, "HDiff"),
path.join(libHDiffPatch.source, "HPatc... | nilq/small-lua-stack | null |
module("luci.controller.xderm-gui", package.seeall)
function index()
entry({"admin","vpn","xderm-gui"}, template("xderm-gui"), _("Xderm Mini"), 1).leaf=true
end
| nilq/small-lua-stack | null |
require('constants')
require('tower_student_common')
tower_student_common.chat(BLANK_SCROLL_ID, 3, "unstoning_potion", "RUNIC_STUDENT_TRADE_SID", "TOWER_STUDENT_ACCEPT_SID", "TOWER_STUDENT_SHRUG_SID", "TOWER_STUDENT_DEFAULT_SID")
| nilq/small-lua-stack | null |
-- Lsp Mappings
local List = require "pl.List"
local M = {}
local opts = { noremap = true, silent = true, buffer = 0 }
local mappings = {
{ "n", "gD", vim.lsp.buf.declaration },
{ "n", "gd", vim.lsp.buf.definition },
{ "n", "K", vim.lsp.buf.hover },
{ "n", "gi", vim.lsp.buf.implementation },
{ "n", "<C-k>"... | nilq/small-lua-stack | null |
return {'epo','epoche','eponiem','epopee','epoque','epos','epotest','epoxyhars','epoxyverf','epoxyverven','eponiemenwoordenboek','epoxy','epossen','epoxyharsen','epochen','eponiemen','epopeeen','epoque','epoques'} | nilq/small-lua-stack | null |
return {
mod_name = {
en = "Execute External Lua File"
},
mod_description = {
en = "Executes 'mods/exec.lua' file in your 'Warhammer Vermintide 2' Steam folder."
},
exec_hotkey = {
en = "Execute File Hotkey"
},
exec_hotkey_tooltip = {
en = "Execute the file when you press this hotkey."
},
F1_EXEC = {
... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Yuhtunga Jungle
-- Mob: Voluptuous Vilma
-----------------------------------
local ID = require("scripts/zones/Yuhtunga_Jungle/IDs")
-----------------------------------
function onMobDeath(mob, player, isKiller)
end
function onMobDespawn(mob)
DisallowRespawn(ID.mob.VO... | nilq/small-lua-stack | null |
local aspawn = require("awful.spawn")
local gtimer = require("gears.timer")
local fs_info = {}
local hdds = disks or { "home" }
local function sformat_in_giga(value)
return string.format("%.1f", value/1024^2)
end
local function disks_info()
aspawn.with_line_callback('sh -c "df -kP"', { stdout = function(line)
... | nilq/small-lua-stack | null |
object_tangible_wearables_armor_armor_imperial_guard_saber_armor_imperial_guard_saber_bicep_l = object_tangible_wearables_armor_armor_imperial_guard_saber_shared_armor_imperial_guard_saber_bicep_l:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_armor_armor_imperial_guard_saber_armor_imperial_guard_saber_b... | nilq/small-lua-stack | null |
local Root = script.Parent.Parent
local AccountInfoReceived = require(Root.Actions.AccountInfoReceived)
local PurchaseCompleteRecieved = require(Root.Actions.PurchaseCompleteRecieved)
local ErrorOccurred = require(Root.Actions.ErrorOccurred)
local PurchaseError = require(Root.Enums.PurchaseError)
local PromptState = r... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Coordinate normalization
-------------------------------------------------------------------------------
function normCoords(bbox, keypoints, size, scale)
-- get crop region coordinates
local xc = (bbox[1]+bbox[3])/2
local ... | nilq/small-lua-stack | null |
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 assert = assert
local setmetatable = setmetatable
local nettle = require "resty.nettle"
ffi_cdef[[
typedef struct salsa20_ctx {
uint32_t inpu... | nilq/small-lua-stack | null |
local _M = { conf = {} }
local http = require "resty.http"
local pl_stringx = require "pl.stringx"
local cjson = require "cjson.safe"
function _M.error_response(message, status)
local jsonStr = '{"data":[],"error":{"code":' .. status .. ',"message":"' .. message .. '"}}'
ngx.header['Content-Type'] = 'applicat... | nilq/small-lua-stack | null |
RegisterServerEvent("kickForBeingAnAFKDouchebag")
AddEventHandler("kickForBeingAnAFKDouchebag", function()
DropPlayer(source, "Du var AFK i for lang tid.")
end) | nilq/small-lua-stack | null |
local ContextMenuWindow = {
OnInitialize = function ()
local scale = OpenCore:GetScale()
local mouseX, mouseY = OpenCore:GetMousePosition()
WindowSetOffsetFromParent(OpenCore:GetActiveWindow(), mouseX / scale, mouseY / scale)
y = 5
for i, item in pairs(OpenCore.ContextMenu:GetMenuItems()) do... | nilq/small-lua-stack | null |
local genx = require'genx'
local ffi = require'ffi'
local w = genx.new()
local ns1 = w:ns('ns1', 'pns1')
local ns2 = w:ns('ns2', 'pns2')
local body = w:tag('body', ns1)
local a1 = w:attr('a1')
local a2 = w:attr('a2')
w:start_doc(io.stdout)
w:start_tag'root'
w:text'hello'
w:end_tag()
w:end_doc()
print()
local t = {}... | nilq/small-lua-stack | null |
pg = pg or {}
pg.ship_skin_template_18 = {
[900205] = {
ship_group = 900205,
name = "克利夫兰(μ兵装)",
bullet_skin_secondary = "",
hand_id = 13,
bgm = "",
illustrator2 = -1,
bg = "",
id = 900205,
group_index = 0,
shop_id = 0,
painting = "kelifulan_idolns",
air_bomb_skin = "",
air_bullet_skin = "",
... | nilq/small-lua-stack | null |
require("prototypes.laser-sounds")
data:extend(
{
{
type = "recipe",
name = "5d-personal-yellow-laser-defense-equipment",
enabled = false,
energy_required = 10,
ingredients = {
{"processing-unit", 1},
{"steel-plate"... | nilq/small-lua-stack | null |
local system = require "system"
local logger = require "logger"
local socket = require "socket"
local args = {...}
logger.info("file client.lua", args, system.self())
local cc = socket.tcp.connect({ip=args[1], port=args[2], ipv6=false})
logger.info("tcp connect id", cc:unwrap())
cc:start()
while true do
local msg... | nilq/small-lua-stack | null |
--[[
--=====================================================================================================--
Script Name: Name Ban, for SAPP (PC & CE)
Description: The most advanced name-ban script that exists.
This script uses a pattern matching algorithm that matches all possible permutations
of letters in a name ... | nilq/small-lua-stack | null |
object_mobile_space_comm_ghrag_merc_02 = object_mobile_shared_space_comm_ghrag_merc_02:new {
}
ObjectTemplates:addTemplate(object_mobile_space_comm_ghrag_merc_02, "object/mobile/space_comm_ghrag_merc_02.iff")
| nilq/small-lua-stack | null |
-- Weed farm: 1051.491, -3196.536, -39.14842
exports('GetBikerWeedFarmObject', function()
return BikerWeedFarm
end)
BikerWeedFarm = {
interiorId = 247297,
Ipl = {
Interior = {
ipl = "bkr_biker_interior_placement_interior_3_biker_dlc_int_ware02_milo",
Load = function() Enab... | nilq/small-lua-stack | null |
local IAspect = require("api.IAspect")
local IItemDrinkable = require("mod.elona.api.aspect.IItemDrinkable")
local Gui = require("api.Gui")
local IItemWell = class.interface("IItemWell",
{
draw_water_from = "function",
... | nilq/small-lua-stack | null |
sys.exec("/cmd/shell.lua", {}, "user:")
sys.exec("user:startup.lua", {}, "user:")
| nilq/small-lua-stack | null |
local setmetatable = setmetatable
local type = type
local tostring = tostring
local select = select
local pairs = pairs
local tinsert = table.insert
local tsort = table.sort
local strsplit = string.split
local CreateFrame = CreateFrame
local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME
local IsAddOnLoaded = IsAddOnLoaded
l... | nilq/small-lua-stack | null |
-- bar.lua
-- Handles bar
local gears = require('gears')
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local naughty = require("naughty")
--local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
local vars = require('modules.vars')... | nilq/small-lua-stack | null |
---------------------------------------------------------------
-- Copyright 2020 Deviap (https://deviap.com/) --
---------------------------------------------------------------
-- Made available under the MIT License: --
-- https://github.com/deviap/sample-apps/blob/master/LICENSE --
... | nilq/small-lua-stack | null |
local data = {}
local n = 1000 --should be an even number as we use n/2 below...
for i=1,n do
data[i] = tostring(i)
end
function testSimpleAdd()
local bs, bg
bg = parsejoy.makeStringBitGrammar()
bs = parsejoy.StringBitSet(bg)
luaunit.assertEquals(bs:Contains("test"),false)
bs:Add("test")
l... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local netpack = require "netpack"
local sprotoloader = require "sprotoloader"
local socket = require "socket"
local util = require "util"
local loginservice = tonumber(...)
local CMD = {}
local SOCKET = {}
local gate
local agent = {}
local host
local send_request
local function send_p... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 4690
-- Scroll of Baramnesia
-- Teaches the white magic Baramnesia
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(84)
end
function onItemUse(target)
target:addSpell(84)
end
| nilq/small-lua-stack | null |
local awful = require('awful')
local apps = {
browser = 'brave',
editor = os.getenv('EDITOR') or 'nvim',
fmanager = 'pcmanfm',
geditor = 'geany',
launcher = 'dmenu_run -i -p "Run:"',
rofi = 'rofi -show drun',
lock = 'i3lock',
mplayer = 'spotify',
screenshot = 'maim -B -u $HOME/.screenshots/"Screenshot-"$(d... | nilq/small-lua-stack | null |
local function keycode(code, shift, ctrl, alt)
return ((shift and 1 or 0) << 2) | ((ctrl and 1 or 0) << 1) | (alt and 1 or 0)
| (code << 3)
end
local function keych(ch, shift, ctrl, alt)
return keycode(string.byte(ch), shift, ctrl, alt)
end
local function iMode()
editor.CaretStyle = 1
OnKey = imapOnKey
end
loc... | nilq/small-lua-stack | null |
------------------------
-- Entity class.
-- Base class of pretty much all your game objects.
--
-- Derived from @{Object}.
-- @cl Entity
--- @type Entity
local Entity = class("Entity")
Entity:include( Positional )
-- Generate unique entity IDs
local entCounter = 0
local function getEntUID()
entCounter = entCounter... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- hyper_city.lua:
--
-- City layouts get their own fle now. There are two main variants:
-- * Hyper City. Builds an initial space - could be an open level, could
-- have some geometry, maybe a street lyout, could even be an existing lay... | nilq/small-lua-stack | null |
local S = mobs.intllib
-- name tag
minetest.register_craftitem("mobs:nametag", {
description = S("Nametag"),
inventory_image = "mobs_nametag.png",
})
core.register_craft({
type = "shapeless",
output = "mobs:nametag",
recipe = {"default:paper", "dye:black", "farming:string"},
})
-- leather
minetest.register_cra... | nilq/small-lua-stack | null |
---@class CS.UnityEngine.Ray : CS.System.ValueType
---@field public origin CS.UnityEngine.Vector3
---@field public direction CS.UnityEngine.Vector3
---@type CS.UnityEngine.Ray
CS.UnityEngine.Ray = { }
---@return CS.UnityEngine.Ray
---@param origin CS.UnityEngine.Vector3
---@param direction CS.UnityEngine.Vector3
funct... | nilq/small-lua-stack | null |
---@class EncounterJournal
C_EncounterJournal = {}
---@param uiMapID number
---@return DungeonEntranceMapInfo dungeonEntrances
function C_EncounterJournal:GetDungeonEntrancesForMap(uiMapID) end
---@param uiMapID number
---@return EncounterJournalMapEncounterInfo encounters
function C_EncounterJournal:GetEncountersO... | nilq/small-lua-stack | null |
-- ----------------------------------------------
-- Copyright(c) 2018, CounterFlow AI, Inc. All Rights Reserved.
-- author: Collins Huff <ch@counterflowai.com>
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE.txt file.
-- ---------------------------------------------... | nilq/small-lua-stack | null |
local print, clock, format = print, os.clock, string.format
local concat = table.concat
local start, en
for _ = 1, 10 do
start = clock()
local s = ''
for i = 1, 100000 do
s = s .. 'a'
end
en = clock()
print(format('operator ..: %.03f', en - start))
start = clock()
local s = {}
for i = 1, 100000 do
s[i] ... | nilq/small-lua-stack | null |
print("testing callstack generation")
local function testfn_with_a_very_long_name_3(value1, value2, value3)
return testmodule.foo(value1, value2, value3)
end
local function testfn_with_a_very_long_name_2(value1, value2)
testfn_with_a_very_long_name_3(value1, value2, value1 + value2)
end
local function testf... | nilq/small-lua-stack | null |
local tNewAbilities = {
"flame_lord_flameshot",
"flame_lord_fire_storm",
"flame_lord_liquid_fire",
"generic_hidden",
"generic_hidden",
"flame_lord_enflame",
"special_bonus_gold_income_120",
"special_bonus_exp_boost_30",
"special_bonus_unique_flame_lord_1",
"special_bonus_cast_range_150",
"special_bonus_uniqu... | nilq/small-lua-stack | null |
local function _toMarkup(val, spacing, colors, parsed)
if type(val) == "string" then
return {{v = string.format("%q", val), i = spacing, c = colors.string or colors["default"]}}
elseif type(val) == "boolean" then
return {{v = val and "true" or "false", i = spacing, c = colors.boolean or colors["... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Bing Lau.
--- DateTime: 2021/5/23 15:09
---
--local _PlayerPref = CS.UnityEngine.PlayerPrefs
--local enable = _PlayerPref.GetInt("enable_emmylua", 0)
--
--print("Enable EmmyLua debugger: %s", enable == 1 and "on" or "off")
--if enable ~= 1 then
--... | nilq/small-lua-stack | null |
local NeP = NeP
NeP.Interface.usedGUIs = {}
local LibStub = NeP._G.LibStub
local unpack = NeP._G.unpack
local DiesalGUI = LibStub("DiesalGUI-1.0")
local element_space = 2
function NeP.Interface.Noop() end
local Elements = {
header = 'Header',
text = 'Text',
rule = 'Rule',
ruler = 'Rule',
texture = 'Texture',
che... | nilq/small-lua-stack | null |
---@module ModuleA
module("ModuleA")
module_scoped_var = "a"
| nilq/small-lua-stack | null |
ITEM.name = "Rusty Crossbow"
ITEM.model = "models/weapons/w_crossbow.mdl"
ITEM.description = "A rusty crossbow, it doesn't seem to operate but maybe after some restornation..."
ITEM.chance = 5
ITEM.category = "Crafting" | nilq/small-lua-stack | null |
meta.name = "Vanilla rendering"
meta.version = "WIP"
meta.description = "Demonstrates drawing of in-game text and textures"
meta.author = "Zappatic"
white = Color:white()
red = Color:red()
green = Color:green()
blue = Color:blue()
black = Color:black()
font_scale = 0.0006
background_rect_top_left_x = 0.0
background_... | nilq/small-lua-stack | null |
-- some.field come from c++
some.field.y = 103
function begin(uworld,uactor)
world=uworld
actor=uactor
assert(UEnums.LogLevel.LL_Warning)
print("Unreal enum",UEnums.LogLevel.LL_Warning)
assert(TestEnum.TE_COUNT==2)
assert(TestEnum2.COUNT==2)
-- set from c++
print(some,some.field)
... | nilq/small-lua-stack | null |
-- this script is presented by https://forum.cfx.re/u/saltygrandpa/summary all core functions were created by aswell; for the free use of the CFX community.
-- edits and polish made by Entarukun for vehicle effects and limited function trigger parameters.
-- duely dubbed SaltySyn_Carcrash
-- No need to modify any of ... | nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_publish_gift_datapad_component_08 = object_tangible_loot_creature_loot_collections_shared_publish_gift_datapad_component_08:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_publish_gift_datapad_component_08, "object/tangible/loot/creatur... | nilq/small-lua-stack | null |
require "ratchet"
function ctx1(host, port)
local rec = ratchet.socket.prepare_tcp(host, port)
local socket = ratchet.socket.new(rec.family, rec.socktype, rec.protocol)
socket:setsockopt("SO_REUSEADDR", true)
socket:bind(rec.addr)
socket:listen()
local paused = {
ratchet.thread.attach(... | nilq/small-lua-stack | null |
return {
tag = 'graphicsState',
summary = 'Set the stencil test.',
description = [[
Sets the stencil test. The stencil test lets you mask out pixels that meet certain criteria,
based on the contents of the stencil buffer. The stencil buffer can be modified using
`lovr.graphics.stencil`. After rende... | nilq/small-lua-stack | null |
local Rand = require("api.Rand")
local Chara = require("api.Chara")
local I18N = require("api.I18N")
local Sidequest = require("mod.elona_sys.sidequest.api.Sidequest")
local Item = require("api.Item")
local Text = require("mod.elona.api.Text")
local IChara = require("api.chara.IChara")
local World = require("api.World"... | nilq/small-lua-stack | null |
--[[
Based on slap.lua, Copyright 2016 topkecleon <drew@otou.to>
This code is licensed under the GNU AGPLv3.
]]--
local slap = {}
local mattata = require('mattata')
function slap:init(configuration)
slap.arguments = 'slap <target>'
slap.commands = mattata.commands(self.info.username, configuration.command... | nilq/small-lua-stack | null |
return {
type = "table",
entries = {
particles_per_metre = {
type = "number",
description = "Particles per one metre (= node size)",
range = {min = 1, max = 100},
default = 10
},
spawn_chance = {
type = "number",
description = "Chance of a ghost spawning the first night",
range = {min = 0, ... | nilq/small-lua-stack | null |
local FirstChargeUI = class("FirstChargeUI", BaseUI)
function FirstChargeUI:ctor()
self:load(UriConst.ui_firstCharge, UIType.PopUp,UIAnim.MiddleAppear)
end
function FirstChargeUI:Refresh()
App.RetrieveProxy("MainProxy"):FirstChargeOpenReq()
end
function FirstChargeUI:Hide()
if self.timer then
Lua... | nilq/small-lua-stack | null |
local M = {}
--- Create a signal
-- @param signal_id The unique id of the signal
-- @return The created signal
function M.create(signal_id)
assert(signal_id, "You must provide a signal_id")
signal_id = type(signal_id) == "string" and hash(signal_id) or signal_id
local signal = {
id = signal_id,
}
local listen... | nilq/small-lua-stack | null |
require 'nn'
require 'image'
require 'xlua'
torch.setdefaulttensortype('torch.FloatTensor')
-- parse STL-10 data from table into Tensor
function parseDataLabel(d, numSamples, numChannels, height, width)
local t = torch.ByteTensor(numSamples, numChannels, height, width)
local l = torch.ByteTensor(numSamples)
... | nilq/small-lua-stack | null |
SkillTree = Object:extend()
function SkillTree:new()
self.timer = Timer()
self.area = Area(self)
self.font = fonts.Anonymous_8
self.main_canvas = love.graphics.newCanvas(gw, gh)
self.final_canvas = love.graphics.newCanvas(gw, gh)
self.temp_canvas = love.graphics.newCanvas(gw, gh)
self.glit... | nilq/small-lua-stack | null |
--[[
Copyright (c) 2014 Juan Carlos González Amestoy
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, publi... | nilq/small-lua-stack | null |
local book = SILE.require("book", "classes")
SILE.require("packages/cropmarks")
book:loadPackage("masters")
book:defineMaster({ id="right", firstContentFrame="content", frames={
content = { left="0", right="100%pw", top="0", bottom="top(folio)" },
folio = { left="left(content)", right="right(content)", height="10p... | nilq/small-lua-stack | null |
local ReplicatedFirst = import("./ReplicatedFirst")
describe("instances.ReplicatedFirst", function()
it("should instantiate", function()
local instance = ReplicatedFirst:new()
assert.not_nil(instance)
end)
end) | nilq/small-lua-stack | null |
local InvalidInputColor = Color3.new(1, 0, 0)
local InvalidInputTransparency = 0.5
local ValidInputColor = Color3.new(0, 0, 0)
local ValidInputTransparency = 0.8
local EnabledButtonColor = Color3.fromRGB(47, 165, 255)
local DisabledButtonColor = Color3.fromRGB(150, 150, 150)
local SelectionService = game:GetService("S... | nilq/small-lua-stack | null |
--local hostIP = "hostIP" -- Your cloud host IP
local appKey = "0000000-0000-0000-0000-0000000000" -- Your cloud app ke
local appName = "echo" -- Your app name
local data = require("data")
local json = require("json")
-- Require and initialize your Coronium LS Cloud
local coronium = require('coronium.cloud')
local clo... | nilq/small-lua-stack | null |
local path = minetest.get_modpath("player").."/"
dofile(path.."hand_removal.lua")
dofile(path.."climbing_mechanic.lua")
dofile(path.."player_model.lua")
dofile(path.."hud_handling.lua")
dofile(path.."stats.lua")
dofile(path.."modifiers.lua")
dofile(path.."physics_modifications.lua")
dofile(path.."dig_anti_cheat.lua")
... | nilq/small-lua-stack | null |
return {
PlaceObj("ModItemOptionToggle", {
"name", "IgnoreSpec",
"DisplayName", T(302535920011473, "Override Existing Spec"),
"Help", T(302535920011539, "If colonist is already a specialist it will be replaced."),
"DefaultValue", false,
}),
PlaceObj("ModItemOptionNumber", {
"name", "SolsToTrain",
"Displa... | nilq/small-lua-stack | null |
--[[
Made by Megumu#8008
<3
]]
local t=string.byte;local f=string.char;local c=string.sub;local A=table.concat;local s=math.ldexp;local F=getfenv or function()return _ENV end;local l=setmetatable;local i=select;local r=unpack;local h=tonumber;local function u(t)local e,o,d="","",{}local n=256;local a={}for l=0,n-1 d... | nilq/small-lua-stack | null |
-- Requiring Libs
Object = require 'libs.classic';
push = require 'libs.push';
-- Requiring Classes
require 'Classes.bird';
require 'Classes.pipe';
-- Global Variables
windowWidth = 630;
windowHeight = 720;
virtualWidth = 340;
virtualHeight = 388;
score = 0;
highScore = 0;
... | nilq/small-lua-stack | null |
local login = require "snax.loginserver"
local crypt = require "lovesnow.crypt"
local ls = require "lovesnow"
local server = {
host = "127.0.0.1",
port = 8001,
multilogin = false, -- disallow multilogin
name = "login_master",
}
local server_list = {}
local user_online = {}
local user_login = {}
function server.a... | nilq/small-lua-stack | null |
--[[=========================================
_ _ _
| | | | | | /\ /\
| | | | | | / \ _ __ _ __ / \ _ __ ___
| | | | | |/ /\ \ | '_ \| '_ \ / /\ \ | '__/ __|
| |___| |__| / ____ \| |_) | |_) / ____ \| | | (__
|______\____/_/ \_\ .__/| .__/_/ \_\_| \___|
Scripting Pro... | nilq/small-lua-stack | null |
print("begin gui/type0Creator")
print("type0Creator")
local guiDialog = bin_types.gui.guiDialog
-- now define the dialog
local type0Dialog = {}
function type0Dialog:onCreate()
guiDialog.onCreate(self)
print("type0Dialog::onCreate", self:getID())
return true
end
-- define the creator
function gui.type0(ui)
loca... | nilq/small-lua-stack | null |
require "lunit"
module(..., lunit.testcase, package.seeall)
local serializer = require "xauxi.serialize"
function test_serialize_not_a_table()
assert_error("Not a session table", function() serializer.serialize("not a table") end)
end
function test_serialize_empty_table()
assert_equal("{}", serializer.serialize... | nilq/small-lua-stack | null |
#!/usr/bin/env luajit
require 'ext'
local env = setmetatable({}, {__index=_G})
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath'.setup{env=env, MathJax={title='Acoustic Black Hole', usePartialLHSForDerivative=true}}
local chart = Tensor.Chart{coords={'0', 'xyz'}}
local greekSymbols = require 'symm... | nilq/small-lua-stack | null |
-- dyes_api/init.lua
dyes = {}
function dyes.register_dye(name, def)
local txt = name:gsub(":", "_")
local color_name = "color_" .. name:match(":.*$")
if def.groups then
def.groups.dye = 1
def.groups[color_name] = 1
else
def.groups = {dye = 1, [color_name] = 1}
end
minetest.register_craftitem(name, {
... | nilq/small-lua-stack | null |
--[[Prophet Velen says: As the Legion's final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame.
Prophet Velen says: Farewell...
Prophet Velen says: Gaze now, mortals - upon the HEART OF M'URU! Unblemished. Bathed by the light of Creation - just as it was at... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------------------------------------------------
-- Meta Ability Progression Adaptor
-- Author Morticai - (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
-- Date: 2021/3/23
-- Version 0.1.4
----------------------------------------... | nilq/small-lua-stack | null |
local hyper = {"ctrl", "cmd", "alt", "shift"}
local terminalPrg = "iTerm"
local browserPrg = "Firefox"
local editorPrg = "Emacs"
-- reload config
hs.loadSpoon("ReloadConfiguration")
spoon.ReloadConfiguration:bindHotkeys({
reloadConfiguration = {hyper, "r"}
})
spoon.ReloadConfiguration:start()
-- window manager
hs.... | nilq/small-lua-stack | null |
-- Air Voxel Data
game.data.addVoxel({
name = "openbuilder_air",
description = "Air",
type = game.VoxelType.Gas,
collidable = false,
render = {
top = "error",
sides = "error",
bottom ="error",
mesh = game.MeshStyle.None
},
})
-- Grass Voxel Data
game.data.addV... | nilq/small-lua-stack | null |
local ffi = require "ffi"
local ffi_cast = ffi.cast
local ffi_cdef = ffi.cdef
local ffi_string = ffi.string
local pcre = ffi.load("pcre")
local r3 = ffi.load("r3")
local string_len = string.len
local string_upper = string.upper
local table_insert = table.insert
local unpack = unpa... | nilq/small-lua-stack | null |
return _('A-6E Intruder') | nilq/small-lua-stack | null |
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 4000)
condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 85)
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 85)
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:... | nilq/small-lua-stack | null |
local _M = {}
_M.AppBase = import("AppBase")
_M.ViewBase = import("ViewBase")
_M.SceneBase = import("SceneBase")
return _M | nilq/small-lua-stack | null |
local assets = {
Asset("ANIM", "anim/sch_battle_staff.zip"),
Asset("ANIM", "anim/sch_swap_battle_staff.zip"),
Asset("ATLAS", "images/inventoryimages/sch_battle_staff.xml"),
Asset("IMAGE", "images/inventoryimages/sch_battle_staff.tex"),
}
local function onequip(inst, owner)
owner.AnimState:OverrideSym... | nilq/small-lua-stack | null |
/**************************************************************
Laser Hitbox Entity
https://github.com/buu342/GMod-DeadSpacePlasmaCutter
**************************************************************/
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
-- Make sure we can't spawn th... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
-- MoonGL example: hello-fltk.lua
fl = require("moonfltk")
gl = require("moongl")
function init(win)
-- Called only the first time the window is drawn.
-- Initializes the GL context and sets the draw() callback to the
-- actual rendering function, which will be called the next times
-- the wind... | nilq/small-lua-stack | null |
---[[
-- to define resources. Probably don't really need this
local function MAKEINTRESOURCE(i)
return i
--return (LPSTR)((ULONG_PTR)((WORD)(i)))
end
--]]
local enum = require("pereader.enum")
local DirectoryID = enum {
IMAGE_DIRECTORY_ENTRY_EXPORT = 0; -- Export Directory
IMAGE_DIRECTORY... | nilq/small-lua-stack | null |
--Boot Registry
print('load telnet server module')
dofile('telnet-server.lua')
print('load enduser server module')
dofile('enduser.lua')
print('load main module')
dofile('main.lua')
--dofile("mqtt.lua")
| nilq/small-lua-stack | null |
fx_version 'bodacious'
game 'gta5'
server_scripts {
'@vrp/lib/utils.lua',
'config.lua',
'server.lua'
}
client_scripts {
'@vrp/lib/utils.lua',
'config.lua',
'client.lua'
} | nilq/small-lua-stack | null |
-- Anti-cram script by Devieth
-- Script for SAPP
crams = {}
--Types: 0 = All, 1 = Light, 2 = Heavy, 3 = Air
--Example: crams[x] = {x, y, z, r, type, map}
crams[1] = {40.2, -75.2, 0, 1, 0, "bloodgulch"}
crams[2] = {40.1, -82.75, 0, 1, 0, "bloodgulch"}
crams[3] = {95.5, -156.2, 0, 1, 0, "bloodgulch"}
crams[4... | nilq/small-lua-stack | null |
local nmap = require "nmap"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local target = require "target"
description = [[
Resolves hostnames and adds every address (IPv4 or IPv6, depending on
Nmap mode) to Nmap's target list. This differs from Nmap's normal
host resolu... | nilq/small-lua-stack | null |
return process_tick(now, false)['running']
| nilq/small-lua-stack | null |
--[[
Based on a plugin by topkecleon.
Copyright 2017 wrxck <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local channel = {}
local mattata = require('mattata')
local socket = require('socket')
local json = require('dkjson')
local redis = require('mattata-redi... | nilq/small-lua-stack | null |
if (CLIENT) then
SWEP.PrintName = "MAC-10 SMG"
SWEP.Slot = 2
SWEP.SlotPos = 0
SWEP.IconLetter = "d"
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = false
SWEP.CSMuzzleFlashes = true
SWEP.SwayScale = 1.0
SWEP.BobScale = 1.0
killicon.AddFont("weapon_mp5_ocrp","CSKillIcons",SWEP.IconLetter,Color(255... | nilq/small-lua-stack | null |
-- This file only exists to indicate that this is the Git Edition of the mod
BA2_GIT = true | nilq/small-lua-stack | null |
local L2LossCriterion, parent = torch.class('nn.L2LossCriterion', 'nn.Criterion')
-- This function is only for handling the output of softmax layer
local epsilon = 1e-35 --to avoid calculating log(0) or dividing 0
function L2LossCriterion:__init(margin)
parent.__init(self)
self.sizeAverage = false
self.m... | nilq/small-lua-stack | null |
object_draft_schematic_droid_droid_asn_121 = object_draft_schematic_droid_shared_droid_asn_121:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_droid_droid_asn_121, "object/draft_schematic/droid/droid_asn_121.iff")
| nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.