repo_name
stringlengths
6
69
path
stringlengths
6
178
copies
stringclasses
278 values
size
stringlengths
4
7
content
stringlengths
671
917k
license
stringclasses
15 values
logzero/ValyriaTear
dat/maps/layna_village/layna_village_bronanns_home_script.lua
3
26353
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_bronanns_home_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "" map_image_filename = "" map_subname = "Bronann's home" -- The music file used as default background music ...
gpl-2.0
peq/WurstScript
Wurstpack/findpath.lua
3
1033
print "Grimoire 1.5 5/4/2008" grimregpath = "Software\\Grimoire" key = grimregpath val = "War3InstallPath" path = grim.getregpair(key,val) -- uncomment to force path --path = "C:\\Warcraft III" if not grim.exists(path.."\\worldedit.exe") then val = "InstallPathX" path = grim.getregpair(key,val) end if not grim.ex...
apache-2.0
cntkillme/MattyDavy
Lua/disassembler.lua
1
1777
-- Disassembler -- -- THIS IS THE OLD DISASSEMBLER, WILL UPDATE TO THE NEW ONE WHEN I GET IT local instructionLegend = { ["0"] = {"MOV",3}, -- instructionName,totalSize ["1"] = {"MOVimm",3}, ["2"] = {"LOAD",3}, ["3"] = {"LOADimm",3}, ["4"] = {"STO",2}, ["5"] = {"PUSH",2}, ["6"] = {"POP",2}, ["7"] = {"ADD",3}, ...
mit
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/3d_armor/3d_armor/api.lua
1
19810
-- support for i18n local S = minetest.get_translator(minetest.get_current_modname()) local skin_previews = {} local use_player_monoids = minetest.global_exists("player_monoids") local use_armor_monoid = minetest.global_exists("armor_monoid") local use_pova_mod = minetest.get_modpath("pova") local armor_def = setmetat...
gpl-3.0
T3hArco/skeyler-gamemodes
Sassilization/entities/entities/resource_base/init.lua
1
2326
-------------------- -- Sassilization -- By Sassafrass / Spacetech / LuaPineapple -------------------- AddCSLuaFile("shared.lua") AddCSLuaFile("cl_init.lua") include("shared.lua") AccessorFunc( ENT, "m_Empire", "Empire" ) function ENT:Setup(ResourceModel) self:SetModel(ResourceModel) self:SetMoveTy...
bsd-3-clause
sxx1314/openwrt-test
feeds/xwrt/webif-iw-lua/files/usr/lib/lua/lua-xwrt/xwrt/init.lua
18
1593
old_require = require function exists(file) local f = io.open( file, "r" ) if f then io.close( f ) return true else return false end end function require (str) local fstr = string.gsub(str,"[.]","/") for path in string.gmatch(package.path,"[^;]+") do local path = string.gsu...
gpl-2.0
zturtleman/quakeconstruct
code/debug/lua/accention.lua
2
3590
--Remove Some Of The Items From The Map local function RemoveStuff() local tab = table.Copy(GetAllEntities()) for k,v in pairs(tab) do local class = v:Classname() if(string.find(class,"weapon") or string.find(class,"ammo") or string.find(class,"item")) then if not (string.find(class,"item_health")) the...
gpl-2.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/3d_armor/3d_armor/init.lua
1
14578
local modname = minetest.get_current_modname() local modpath = minetest.get_modpath(modname) local worldpath = minetest.get_worldpath() local last_punch_time = {} local pending_players = {} local timer = 0 dofile(modpath.."/api.lua") -- local functions local F = minetest.formspec_escape local S = armor.get_translator...
gpl-3.0
rbavishi/vlc-2.2.1
share/lua/intf/cli.lua
35
31833
--[==========================================================================[ cli.lua: CLI module for VLC --[==========================================================================[ Copyright (C) 2007-2011 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> Pierre Ynard ...
lgpl-2.1
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/wiki/wikilib.lua
2
6398
local private = ... local WP = minetest.get_worldpath().."/wiki" wikilib.paths = { } wikilib.paths.root = WP wikilib.paths.pages = WP.."/pages" wikilib.paths.plugins = WP.."/plugins" wikilib.paths.users = WP.."/users" local WIKI_FORMNAME = "wiki:wiki" private.mkdir(WP) private.mkdir(wikilib.paths.pages) private.mk...
gpl-3.0
salorium/awesome
lib/menubar/utils.lua
3
11022
--------------------------------------------------------------------------- --- Utility module for menubar -- -- @author Antonio Terceiro -- @copyright 2009, 2011-2012 Antonio Terceiro, Alexander Yakushev -- @release @AWESOME_VERSION@ -- @module menubar.utils ------------------------------------------------------------...
gpl-2.0
payday-restoration/restoration-mod
lua/sc/managers/gameplaycentralmanager.lua
1
3487
local mvec3_dist = mvector3.distance function GamePlayCentralManager:do_shotgun_push(unit, hit_pos, dir, distance, attacker) if self:get_shotgun_push_range() < distance or tweak_data.disable_shotgun_push then return end if unit:id() > 0 then managers.network:session():send_to_peers_synched("sync_shotgun_push",...
agpl-3.0
ShiniXi/dogslol
gamemode/base/libraries/sh_rounds.lua
1
2053
-- Declare a new library in our gamemode global table henc.round = henc.round or {} henc.round.waiting = true henc.round.started = false henc.round.breaking = false henc.round.roundNum = 0 if (SERVER) then function henc.round:start() self.startTime = CurTime() self.roundNum = self.roundNum + 1 self...
mit
parsa13881/serverbot
plugins/me.lua
1
1475
do function run(msg, matches) if matches[1]:lower() == 'me' and is_sudo(msg) then return "Sudo☑\n⭕️Your id⭕️\n"..msg.from.id.."\n⭕️Your name⭕️\n"..msg.from.print_name.."\n⭕️Group name⭕️\n"..msg.to.title.."\n⭕️Group id⭕️\n"..msg.to.id end if matches[1]:lower() == 'me' and is_admin(msg) then r...
gpl-2.0
dmccuskey/dmc-gestures
dmc_corona/dmc_gestures/pan_gesture.lua
10
10250
--====================================================================-- -- dmc_corona/dmc_gesture/pan_gesture.lua -- -- Documentation: http://docs.davidmccuskey.com/dmc-gestures --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Per...
mit
dmccuskey/dmc-gestures
examples/gesture-pinch-basic/dmc_corona/dmc_gestures/pan_gesture.lua
10
10250
--====================================================================-- -- dmc_corona/dmc_gesture/pan_gesture.lua -- -- Documentation: http://docs.davidmccuskey.com/dmc-gestures --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Per...
mit
dmccuskey/dmc-gestures
examples/gesture-multigesture-basic/dmc_corona/dmc_gestures/pan_gesture.lua
10
10250
--====================================================================-- -- dmc_corona/dmc_gesture/pan_gesture.lua -- -- Documentation: http://docs.davidmccuskey.com/dmc-gestures --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Per...
mit
liwentao0705/openwrt-extra
package/webshell-luci/files/usr/lib/lua/luci/controller/webshell.lua
7
1453
module("luci.controller.webshell", package.seeall) function index() luci.i18n.loadc("webshell") local i18n = luci.i18n.translate page = entry({"admin", "system", "cmd_run"}, call("cmd_run"), nil) page.leaf = true page = node("admin", "system", "WebShell") page.target = template("webshell") page.title = i18n("We...
gpl-2.0
m2fan/ss
plugins/inpm.lua
243
3007
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
khanasbot/Avatar_Bot
plugins/invite.lua
299
1025
-- Invite other user to the chat group. -- Use !invite name User_name or !invite id id_number -- The User_name is the print_name (there are no spaces but _) do local function callback(extra, success, result) vardump(success) vardump(result) end local function run(msg, matches) local user = matches[2] -- Use...
gpl-2.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Controller.lua
2
3135
-------------------------------- -- @module Controller -- @parent_module cc -------------------------------- -- Activate receives key event from external key. e.g. back,menu.<br> -- Controller receives only standard key which contained within enum Key by default.<br> -- warning The API only work on the android platfo...
gpl-3.0
dmccuskey/dmc-gestures
dmc_corona/dmc_gestures.lua
10
11188
--===================================================================-- -- dmc_corona/dmc_gestures.lua -- -- Documentation: http://docs.davidmccuskey.com/dmc-gestures --===================================================================-- --[[ The MIT License (MIT) Copyright (C) 2012-2015 David McCuskey. All Rights ...
mit
dmccuskey/dmc-gestures
examples/gesture-multigesture-simultaneous/dmc_corona/dmc_gestures.lua
10
11188
--===================================================================-- -- dmc_corona/dmc_gestures.lua -- -- Documentation: http://docs.davidmccuskey.com/dmc-gestures --===================================================================-- --[[ The MIT License (MIT) Copyright (C) 2012-2015 David McCuskey. All Rights ...
mit
team-parasol/parasol
src/fluid/luajit-2.0.5/dynasm/dasm_ppc.lua
11
37064
------------------------------------------------------------------------------ -- DynASM PPC module. -- -- Copyright (C) 2005-2017 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _in...
lgpl-2.1
bildzeitung/hind
lua/profiler.lua
1
1095
--[[ profiler.lua Created JUL-12-2012 ]] local Object = (require 'object').Object local love, pairs, collectgarbage = love, pairs, collectgarbage module('objects') Profiler = Object{} -- -- Actor constructor -- function Profiler:_clone(values) local o = Object._clone(self,values) o._profiles = {} retur...
gpl-3.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/mobs_animal/panda.lua
1
1881
local S = mobs.intllib -- Panda by AspireMint (CC BY-SA 3.0) mobs:register_mob("mobs_animal:panda", { stepheight = 0.6, type = "animal", passive = false, attack_type = "dogfight", group_attack = false, owner_loyal = true, attack_npcs = false, reach = 2, damage = 3, hp_min = 10, hp_max = 24, armor = 200, ...
gpl-3.0
githubtelebot/Telebot
plugins/plugmanager.lua
22
3691
do local function run(msg, matches) if not is_sudo(msg) then return "you have not accsess to filemanager" end local receiver = get_receiver(msg) if matches[1] == 'بفرس' then local file = matches[3] if matches[2] == 'sticker' and not matches[4] then send_document(receiver, "./media/"...
gpl-2.0
oUF-wow/oUF
elements/castbar.lua
1
16828
--[[ # Element: Castbar Handles the visibility and updating of spell castbars. ## Widget Castbar - A `StatusBar` to represent spell cast/channel progress. ## Sub-Widgets .Icon - A `Texture` to represent spell icon. .SafeZone - A `Texture` to represent latency. .Shield - A `Texture` to represent if it's possi...
mit
sxx1314/openwrt-test
feeds/xwrt/webif-iw-lua-openssl/files/usr/lib/lua/lua-xwrt/openssl.lua
26
38586
require("lua-xwrt.addon.string") require("lua-xwrt.addon.uci") require("lua-xwrt.html.form") require("lua-xwrt.xwrt.translator") require("lua-xwrt.addon.io") --io.stderr = io.stdout function upload(dir,file) print(dir,file) local algo = util.file_load("/etc/openssl/"..dir.."/"..file) print([[Pragma: public Expires: 0...
gpl-2.0
Billiam/love-rollbar
love-rollbar.lua
1
7015
local foreground, current_folder, work_channel, response_channel = unpack({...}) if foreground == false then require('love.filesystem') local request = require(current_folder .. 'luajit-request') local post_request = function(url, data) return request.send(url, { method = "POST", data = data ...
mit
haider1984/-1
plugins/en-lock-fwd.lua
5
1574
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ BY SAJAD NOORI (@SAJJADNOORI) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ lock fwd : منع اعاده توجيه ▀▄ ▄▀ ▀▄▀...
gpl-2.0
Hello23-Ygopro/ygopro-kaijudo
expansions/script/c25008002.lua
2
1032
--Bottle of Wishes local ka=require "expansions.utility_ktcg" local scard,sid=ka.GetID() function scard.initial_effect(c) ka.EnableSpellAttribute(c) --shield blast ka.EnableShieldBlast(c) --confirm ka.AddSpellCastAbility(c,0,nil,scard.confop) ka.AddShieldBlastCastAbility(c,0,nil,scard.confop) end scard.kaijudo_ca...
gpl-3.0
Hello23-Ygopro/ygopro-kaijudo
expansions/script/c25006012.lua
2
1032
--Bottle of Wishes local ka=require "expansions.utility_ktcg" local scard,sid=ka.GetID() function scard.initial_effect(c) ka.EnableSpellAttribute(c) --shield blast ka.EnableShieldBlast(c) --confirm ka.AddSpellCastAbility(c,0,nil,scard.confop) ka.AddShieldBlastCastAbility(c,0,nil,scard.confop) end scard.kaijudo_ca...
gpl-3.0
neg-serg/notion
example_cfg/look_new_light.lua
1
3918
-- look_greyviolet.lua drawing engine configuration file for Ion. FONT_STATUS="-hell-monobook-bold-r-normal--16-160-72-72-m-80-iso10646-1" FONT="-elite-laptop-bold-r-normal--28-280-72-72-c-140-koi8-r" if not gr.select_engine("de") then return end de.reset() de.defstyle("*", { shadow_colour = "#777777", high...
lgpl-2.1
Hello23-Ygopro/ygopro-kaijudo
expansions/script/c25007073.lua
1
1189
--Elevan the Seeker local ka=require "expansions.utility_ktcg" local scard,sid=ka.GetID() function scard.initial_effect(c) ka.EnableCreatureAttribute(c) --tap & give ability ka.AddSingleComeIntoPlayAbility(c,0,nil,scard.postg,scard.posop,EFFECT_FLAG_CARD_TARGET) end scard.kaijudo_card=true function scard.postg(e,tp,...
gpl-3.0
xingshuo/frame_sync_model
skynet/service/cmaster.lua
78
3256
local skynet = require "skynet" local socket = require "socket" --[[ master manage data : 1. all the slaves address : id -> ipaddr:port 2. all the global names : name -> address master hold connections from slaves . protocol slave->master : package size 1 byte type 1 byte : 'H' : HANDSHAKE, report slav...
mit
kjoenth/naev
dat/events/start.lua
11
4841
include "dat/events/tutorial/tutorial-common.lua" -- localization stuff, translators would work here lang = naev.lang() if lang == "es" then else -- default english title = {} text = {} title[1] = "Flying License Acquired!" text[1] = [["Congratulations, %s," your flying instructor says through the radio...
gpl-3.0
edvb/ratium
packs/default/data/blds.lua
2
1243
blds = { { rarity = .15, spawntype = 14, map = { {0,7,7,7,7,7,0,0}, {7,7,7,7,7,7,7,0}, {7,7,7,7,7,7,7,7}, {0,0,7,7,7,7,7,7}, {0,0,0,7,7,7,7,0}, {0,0,0,0,7,7,0,0} }}, { rarity = .15, spawntype = 14, map = { {0,0,0,7,7,7,0}, {0,0,7,7,7,7,7}, {0,7,7,7,7,7,7}, {7,7,7,7,7,7,0}, {7,7,7,7,7,7,0}, {0,7,7,0,0,0,0} }}, { rarity ...
gpl-3.0
judos/robotMiningSite
source/prototypes/robot-chests.lua
1
2194
data:extend({ { type = "container", name = "robot-chest", max_health = 100, open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume=0.65 }, close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 }, collision_box = {{-0.35, -0.35}, {0.35, 0.35}}, sele...
gpl-3.0
BrunoMine/hardtorch
features/node.lua
1
7289
--[[ Mod HardTorch for Minetest Copyright (C) 2017-2022 BrunoMine (https://github.com/BrunoMine) You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Nodes ]] -- Registered nodes -- Nodes registrados hardtorch.registered_nod...
lgpl-3.0
dreadmullet/JC2-MP-Racing
client/cRaceGUIUtility.lua
1
1213
-- Normalized coords to pixels. From -1 to 1. NormVector2 = function(arg1 , arg2) local x , y if arg2 then x = arg1 y = arg2 else x = arg1.x y = arg1.y end return Vector2( (x * 0.5 + 0.5) * Render.Width , (y * 0.5 + 0.5) * Render.Height ) end -- Draws shadowed, aligned text. DrawText = function(pos...
mit
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Layout.lua
2
13005
-------------------------------- -- @module Layout -- @extend Widget,LayoutProtocol -- @parent_module ccui -------------------------------- -- Sets background color vector for layout.<br> -- This setting only take effect when layout's color type is BackGroundColorType::GRADIENT<br> -- param vector The color vector in...
gpl-3.0
MethodicalAcceleratorDesign/MAD
src/madl_strict.lua
1
1824
-- The detecting of undeclared vars is discussed on: -- http://www.lua.org/pil/14.2.html -- http://lua-users.org/wiki/DetectingUndefinedVariables local IGNORED_EXTRAS local IGNORED_WRITES = {} local IGNORED_READS = { _PROMPT =true, _PROMPT2=true, } local MT = { __index = function (table, key) if IGNORED_RE...
gpl-3.0
liwentao0705/openwrt-extra
package/aria2-luci/files/usr/lib/lua/luci/model/cbi/aria2.lua
1
6093
--[[ LuCI - Lua Configuration Interface - Aria2 support Copyright 2014 nanpuyue <nanpuyue@gmail.com> 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 ]]-...
gpl-2.0
gilbertwang1981/redis_3.2.5_plus
deps/lua/test/sort.lua
889
1494
-- two implementations of a sort function -- this is an example only. Lua has now a built-in function "sort" -- extracted from Programming Pearls, page 110 function qsort(x,l,u,f) if l<u then local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u x[l],x[m]=x[m],x[l] -- swap pivot to first posit...
bsd-3-clause
payday-restoration/restoration-mod
lua/sc/units/weapons/incendiarygrenade.lua
1
1543
--Lets mollies use the "mass_look_up_modifier" stat function IncendiaryGrenade:_setup_from_tweak_data() local grenade_entry = self._tweak_projectile_entry or "molotov" local tweak_entry = tweak_data.projectiles[grenade_entry] self._mass_look_up_modifier = tweak_entry.mass_look_up_modifier --No reason to set anyt...
agpl-3.0
ominux/nn
HingeEmbeddingCriterion.lua
50
1290
local HingeEmbeddingCriterion, parent = torch.class('nn.HingeEmbeddingCriterion', 'nn.Criterion') function HingeEmbeddingCriterion:__init(margin) parent.__init(self) self.margin = margin or 1 self.sizeAverage = true end function HingeEmbeddingCriterion:updateOutput(input,y) self.buffer = self.buffer or ...
bsd-3-clause
cyberbobjr/pz-lockpicking-mod
RMLockpickingMod/media/lua/client/TimedActions/TAPickDoorLock.lua
1
4645
require('TimedActions/ISBaseTimedAction'); require('luautils'); -- ------------------------------------------------ -- Global Variables -- ------------------------------------------------ TAPickDoorLock = ISBaseTimedAction:derive("TAPickDoorLock"); -- ------------------------------------------------ -- Constants -- ...
mit
kjoenth/naev
dat/events/neutral/derelict.lua
11
12202
--[[ -- Derelict Event -- -- Creates a derelict ship that spawns random events. --]] lang = naev.lang() if lang == "es" then -- not translated atm else -- default english -- Text goes here. Please keep the section as organized as possible. --=== NEUTRAL EVENTS ===-- ntitle = "Empty derelict" ntex...
gpl-3.0
QuiQiJingFeng/skynet
lualib/skynet/db/redis.lua
11
6208
local skynet = require "skynet" local socket = require "skynet.socket" local socketchannel = require "skynet.socketchannel" local table = table local string = string local assert = assert local redis = {} local command = {} local meta = { __index = command, -- DO NOT close channel in __gc } ---------- redis respon...
mit
xing634325131/Luci-0.11.1
applications/luci-statistics/luasrc/statistics/rrdtool/colors.lua
12
1583
--[[ Luci statistics - diagram color helper class (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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.or...
apache-2.0
heysion/prosody-modules
mod_support_contact/mod_support_contact.lua
32
1757
-- mod_support_contact.lua -- -- Config options: -- support_contact = "support@hostname"; -- a JID -- support_contact_nick = "Support!"; -- roster nick -- support_contact_group = "Users being supported!"; -- the roster group in the support contact's roster local host = module:get_host(); local support_contact =...
mit
drdownload/prosody-modules
mod_support_contact/mod_support_contact.lua
32
1757
-- mod_support_contact.lua -- -- Config options: -- support_contact = "support@hostname"; -- a JID -- support_contact_nick = "Support!"; -- roster nick -- support_contact_group = "Users being supported!"; -- the roster group in the support contact's roster local host = module:get_host(); local support_contact =...
mit
ahuraa/trinityadmin
Frames/MangFrames_SectionLog.lua
2
2793
------------------------------------------------------------------------------------------------------------- -- -- TrinityAdmin Version 3.x -- TrinityAdmin is a derivative of MangAdmin. -- -- Copyright (C) 2007 Free Software Foundation, Inc. -- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.h...
gpl-2.0
dsarrut/RTK
utilities/SimpleRTK/Utilities/ExpandTemplate.lua
4
23429
----------------------------------------------------------------------------- -- JSON4Lua: JSON encoding / decoding support for the Lua language. -- json Module. -- Author: Craig Mason-Jones -- Homepage: http://json.luaforge.net/ -- Version: 0.9.40 -- This module is released under the MIT License (MIT). -- Please see L...
apache-2.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/SplitRows.lua
8
1888
-------------------------------- -- @module SplitRows -- @extend TiledGrid3DAction -- @parent_module cc -------------------------------- -- brief Initializes the action with the number rows and the duration.<br> -- param duration Specify the duration of the SplitRows action. It's a value in seconds.<br> -- param rows...
gpl-3.0
Jozef12/newzaza
libs/serpent.lua
656
7877
local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = true, cdata = true} lo...
gpl-3.0
mathiasbynens/otclient
modules/corelib/config.lua
10
1533
-- @docclass local function convertSettingValue(value) if type(value) == 'table' then if value.x and value.width then return recttostring(value) elseif value.x then return pointtostring(value) elseif value.width then return sizetostring(value) elseif value.r then return colort...
mit
McGlaspie/mvm
lua/mvm/bots/PlayerBrain.lua
1
2622
//---------------------------------------- // Base class for bot brains //---------------------------------------- Script.Load("lua/mvm/bots/BotUtils.lua") Script.Load("lua/bots/BotDebug.lua") gBotDebug:AddBoolean("debugall", false) //---------------------------------------- // Globals //-------------------------...
gpl-3.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/FadeTo.lua
11
1678
-------------------------------- -- @module FadeTo -- @extend ActionInterval -- @parent_module cc -------------------------------- -- initializes the action with duration and opacity <br> -- param duration in seconds -- @function [parent=#FadeTo] initWithDuration -- @param self -- @param #float duration -- @param #u...
gpl-3.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/ethereal/crystal.lua
1
7722
local S = ethereal.intllib -- Crystal Spike (Hurts if you touch it - thanks to ZonerDarkRevention for his DokuCraft DeviantArt crystal texture) minetest.register_node("ethereal:crystal_spike", { description = S("Crystal Spike"), drawtype = "plantlike", tiles = { "crystal_spike.png" }, inventory_image = "crystal_s...
gpl-3.0
Djabbz/nn
SpatialSubSampling.lua
44
1412
local SpatialSubSampling, parent = torch.class('nn.SpatialSubSampling', 'nn.Module') function SpatialSubSampling:__init(nInputPlane, kW, kH, dW, dH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.kW = kW self.kH = kH self.dW = dW self.dH = dH self.weight...
bsd-3-clause
badboyam/crazy_bot
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
logzero/ValyriaTear
dat/objects/torso_armor.lua
4
4242
------------------------------------------------------------------------------[[ -- Filename: torso_armor.lua -- -- Description: This file contains the definitions of all torso armor. -- Each armor has a unique integer identifier that is used -- as its key in the armor table below. Armor IDs are unique not only among -...
gpl-2.0
OpenRA/OpenRA
mods/d2k/maps/harkonnen-03b/harkonnen03b-AI.lua
7
1857
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
mohammad24/oktinx
plugins/welcome.lua
190
3526
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
crazyboy11/bot122
plugins/welcome.lua
190
3526
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
rgujju/NexIDE
firmware/lua_examples/email/send_email_smtp.lua
82
4640
--- -- Working Example: https://www.youtube.com/watch?v=CcRbFIJ8aeU -- @description a basic SMTP email example. You must use an account which can provide unencrypted authenticated access. -- This example was tested with an AOL and Time Warner email accounts. GMail does not offer unecrypted authenticated access. -- To o...
gpl-3.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/GLProgram.lua
2
4678
-------------------------------- -- @module GLProgram -- @extend Ref -- @parent_module cc -------------------------------- -- returns the fragmentShader error log -- @function [parent=#GLProgram] getFragmentShaderLog -- @param self -- @return string#string ret (return value: string) ----------------------...
gpl-3.0
drdownload/prosody-modules
mod_message_logging/mod_message_logging.lua
32
3943
module:set_global(); local jid_bare = require "util.jid".bare; local jid_split = require "util.jid".split; local stat, mkdir = require "lfs".attributes, require "lfs".mkdir; -- Get a filesystem-safe string local function fsencode_char(c) return ("%%%02x"):format(c:byte()); end local function fsencode(s) return (s:...
mit
logzero/ValyriaTear
dat/tilesets/harrvah_house_exterior.lua
4
11980
tileset = {} tileset.image = "img/tilesets/harrvah_house_exterior.png" tileset.num_tile_cols = 16 tileset.num_tile_rows = 16 -- The general walkability of the tiles in the tileset. Zero indicates walkable. One tile has four walkable quadrants listed as: NW corner, NE corner, SW corner, SE corner. tileset.walkability ...
gpl-2.0
xing634325131/Luci-0.11.1
libs/core/luasrc/util.lua
81
21858
--[[ LuCI - Utility library Description: Several common useful Lua functions License: Copyright 2008 Steven Barth <steven@midlink.org> 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-2.0
logzero/ValyriaTear
dat/maps/layna_village/layna_village_center_at_night_script.lua
3
27726
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_center_at_night_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "Mountain Village of Layna" map_image_filename = "img/menus/locations/mountain_village.png" map_subname = "V...
gpl-2.0
AgentVi/DIGITS
digits/standard-networks/torch/ImageNet-Training/googlenet.lua
2
5831
-- source: https://github.com/soumith/imagenet-multiGPU.torch/blob/master/models/alexnet_cudnn.lua require 'nn' if pcall(function() require('cudnn') end) then print('Using CuDNN backend') backend = cudnn convLayer = cudnn.SpatialConvolution else print('Failed to load cudnn backend (is libcudnn.so in your l...
bsd-3-clause
OpenRA/OpenRA
mods/cnc/maps/gdi09/gdi09-AI.lua
5
6273
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
haider1984/-1
libs/dateparser.lua
114
6213
local difftime, time, date = os.difftime, os.time, os.date local format = string.format local tremove, tinsert = table.remove, table.insert local pcall, pairs, ipairs, tostring, tonumber, type, setmetatable = pcall, pairs, ipairs, tostring, tonumber, type, setmetatable local dateparser={} --we shall use the host OS's...
gpl-2.0
upsoft/nginx-openresty-windows
lua-resty-websocket-0.05/lib/resty/websocket/server.lua
12
4881
-- Copyright (C) Yichun Zhang (agentzh) local bit = require "bit" local wbproto = require "resty.websocket.protocol" local new_tab = wbproto.new_tab local _recv_frame = wbproto.recv_frame local _send_frame = wbproto.send_frame local http_ver = ngx.req.http_version local req_sock = ngx.req.socket local ngx_header = n...
bsd-2-clause
5620j/taylor-bot
libs/lua-redis.lua
580
35599
local redis = { _VERSION = 'redis-lua 2.0.4', _DESCRIPTION = 'A Lua client library for the redis key value storage system.', _COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri', } -- The following line is used for backwards compatibility in order to keep the `Redis` -- global module name. Using...
gpl-2.0
jafar-hasoon/demon
libs/lua-redis.lua
580
35599
local redis = { _VERSION = 'redis-lua 2.0.4', _DESCRIPTION = 'A Lua client library for the redis key value storage system.', _COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri', } -- The following line is used for backwards compatibility in order to keep the `Redis` -- global module name. Using...
gpl-2.0
ld-test/harpseal
lib/Distributed.lua
3
21500
--------------------------------------------------------------------------------------------------------- -- Distributed processing module in lua v1.0.4 -- Author: aimingoo@wandoujia.com -- Copyright (c) 2015.12 -- -- The distributed processing module from NGX_4C architecture -- 1) N4C is programming framework. -- 2) N...
apache-2.0
stevevance/Project-OSRM
profiles/car.lua
1
8037
-- Begin of globals --require("lib/access") --function temporarily inlined barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["entrance"] = true } access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_v...
bsd-2-clause
SLAPaper/MCGC
MCGC/c84130836.lua
3
1703
-- MC群的智者 二鱼 function c84130836.initial_effect(c) -- spsummon local e1 = Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(84130836, 0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_...
mit
spixi/wesnoth
data/ai/lua/ca_spread_poison.lua
1
4416
------- Spread Poison CA -------------- local AH = wesnoth.require "ai/lua/ai_helper.lua" local LS = wesnoth.require "location_set" local SP_attack local ca_spread_poison = {} function ca_spread_poison:evaluation(cfg, data) local start_time, ca_name = wesnoth.get_time_stamp() / 1000., 'spread_poison' if AH....
gpl-2.0
kjoenth/naev
dat/factions/equip/nasin.lua
13
5011
--more of a dummy file to avoid errors. -- Generic equipping routines, helper functions and outfit definitions. include("dat/factions/equip/generic.lua") --[[ -- @brief Does sirius pilot equipping -- -- @param p Pilot to equip --]] function equip( p ) -- Start with an empty ship p:rmOutfit("all") p:rmOutf...
gpl-3.0
T3hArco/skeyler-gamemodes
ssbase/gamemode/sh_fakename.lua
1
2160
---------------------------- -- SSBase -- -- Created by Skeyler.com -- ---------------------------- function PLAYER_META:CheckFake() if self:IsBot() then return end timer.Simple(0.5, function() if self and self:IsValid() and self:IsAdmin() then self.fakename = util.JSONToTable(self.profile....
bsd-3-clause
mahdiam1221/viper-FA
plugins/anti_ads.lua
61
1032
local function run(msg) local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['antilink'] == 'yes' then if not is_momod(msg) then chat_del_user('chat#id'..msg.to.id, 'user#id'..msg.from.id, ok_cb, true) local msgads = 'ForbiddenAdText' ...
gpl-2.0
heysion/prosody-modules
mod_captcha_registration/modules/mod_register.lua
32
13867
-- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain -- Modifications copyright (C) 2014 mrDoctorWho -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- local st = require "util.stanza"; local dataform_new = r...
mit
pirate/snabbswitch
src/apps/packet_filter/pcap_filter.lua
13
4219
module(...,package.seeall) local app = require("core.app") local link = require("core.link") local lib = require("core.lib") local packet = require("core.packet") local config = require("core.config") local conntrack = require("apps.packet_filter.conntrack") local pf = require("pf") -- pflua PcapFilter = {} ...
apache-2.0
zturtleman/quakeconstruct
code/debug/lua/includes/sequence.lua
2
1037
local SequenceT = {} function SequenceT:Init() self.lerp = 0 end function SequenceT:SetLerp(lerp) if(lerp < 0) then lerp = 0 end if(lerp > 1) then lerp = 1 end if(self.ref == nil) then return end local frames = (self.endf - self.start) local lf = (math.ceil(lerp*frames) + self.start) local lf2 = (l...
gpl-2.0
parsa13881/serverbot
plugins/webshot.lua
110
1424
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/mesecons/mesecons/init.lua
1
4060
-- |\ /| ____ ____ ____ _____ ____ _____ -- | \ / | | | | | | | |\ | | -- | \/ | |___ ____ |___ | | | | \ | |____ -- | | | | | | | | | \ | | -- | | |___ ____| |___ |____ |____| | \| ____| -- by Jeija, Uberi (Temperest), sfan5, VanessaE, ...
gpl-3.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/plantlife_modpack/molehills/init.lua
1
3102
----------------------------------------------------------------------------------------------- local title = "Mole Hills" local version = "0.0.3" local mname = "molehills" ----------------------------------------------------------------------------------------------- -- Idea by Sokomine -- Code & textures by Mossman...
gpl-3.0
LuaDist2/luacheck
src/luacheck/config.lua
4
9112
local options = require "luacheck.options" local builtin_standards = require "luacheck.builtin_standards" local fs = require "luacheck.fs" local globbing = require "luacheck.globbing" local utils = require "luacheck.utils" local config = {} -- Config must support special metatables for some keys: -- autovivification ...
mit
SLAPaper/MCGC
MCGC/c84130860.lua
3
1877
-- MC群2-植吧之里 function c84130860.initial_effect(c) -- Activate local e1 = Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) -- SendtoHand local e2 = Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(84130860, 1)) e2:SetCate...
mit
rgujju/NexIDE
firmware/lua_examples/send_text_message.lua
75
3151
--[[ 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, distribute, sublicense, and/or sell copies...
gpl-3.0
mathiasbynens/otclient
modules/gamelib/player.lua
10
3598
-- @docclass Player PlayerStates = { None = 0, Poison = 1, Burn = 2, Energy = 4, Drunk = 8, ManaShield = 16, Paralyze = 32, Haste = 64, Swords = 128, Drowning = 256, Freezing = 512, Dazzled = 1024, Cursed = 2048, PartyBuff = 4096, PzBlock = 8192, Pz = 16384, Bleeding = 32768, Hungry...
mit
payday-restoration/restoration-mod
lua/sc/units/player/playerbase.lua
1
2500
function PlayerBase:set_suspicion_multiplier(reason, multiplier) self._suspicion_settings.multipliers[reason] = multiplier local buildup_mul = self._suspicion_settings.init_buildup_mul local range_mul = self._suspicion_settings.init_range_mul for reason, mul in pairs(self._suspicion_settings.multipliers) do buil...
agpl-3.0
cod3hulk/dotfiles
nvim/lua/user/lsp/lsp-installer.lua
1
1159
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer") if not status_ok then return end -- Register a handler that will be called for all installed servers. -- Alternatively, you may also register handlers on specific server instances instead (see example below). lsp_installer.on_server_ready(function...
gpl-2.0
duk3luk3/MoonGen
lua/include/lib/Serpent/init.lua
7
8540
local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = true} local keyword, g...
mit
KennethD96/computercraft-scripts
kdAPI.lua
1
1047
function kd.frameLift(outputSide, direction, ) if direction == "up" then for i = 1,distance do rs.setBundledOutput(outputSide, output1) sleep(.4) rs.setBundledOutput(outputSide, 0) sleep(.4) end elseif direction == "down" then for i = 1,distance do rs.setBundledOutput(outpu...
mit