repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
upsoft/redis
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
jingjidejuren/redis
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
mmihira/dotfiles
nvim/nvim/lua/plugins/configs/lspconfig.lua
1
1141
local present, lspconfig = pcall(require, "lspconfig") if not present then return end local present, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") if not present then return end local lsplib = require("plugins/configs/lspl") local goplsconfig = { on_attach = lsplib.mk_config().on_attach } lspconfig.gopls.setup(g...
gpl-3.0
meepdarknessmeep/gmod-csweapons
lua/weapons/weapon_csbasegun.lua
1
21688
AddCSLuaFile() local function FloatEquals(x,y) return math.abs(x-y) < 1.19209290E-07 end DEFINE_BASECLASS( "weapon_csbase" ) SWEP.Spawnable = false SWEP.UseHands = true SWEP.DrawAmmo = true function SWEP:Initialize() BaseClass.Initialize( self ) self:SetLastFire( CurTime() ) end function SWEP:SetupDataTables()...
unlicense
ahmedalobaidyshado/ahmed_98
plugins/msg_checks.lua
7
10645
--Begin msg_checks.lua --Begin pre_process function local function pre_process(msg) -- Begin 'RondoMsgChecks' text checks by @rondoozle if is_chat_msg(msg) or is_super_group(msg) then if msg and not is_momod(msg) and not is_whitelisted(msg.from.id) then --if regular user local data = load_data(_config.moderation.data...
gpl-2.0
tarantonio/OTHire
data/lib/calculator.lua
4
2506
--[[ Tibia Calculator Class 0.1.1 Nostradamus OBS: This is just a helpful library. If you feel that you need these functions, add the following line to global.lua: dofile(getDataDir() .. "game_classes/calculator.lua") --]] -- Global consts MAGES = 1 PALADINS = 2 KNIGHTS = 3 ROOKERS = 4 Calculator = {} Calculator.__i...
gpl-3.0
dani-sj/mahan04
plugins/help.lua
27
4675
do 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]] end end return iter end...
gpl-2.0
Abu0Ali/abu0alibot
plugins/ingroup.lua
1
60288
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.peer_id if member_id ~= our_id then -- Group configuration data[...
gpl-2.0
ashdnazg/Zero-K
LuaUI/Widgets/unit_cloaker_guard.lua
2
9383
-- $Id$ function widget:GetInfo() return { name = "Cloaker Guard", desc = "Replaces guarding cloakers with follow and hold fire. Cloakers move at speed of slowest unit following and wait for stragglers.", author = "Google Frog", date = "9 Mar, 2009", license = "GNU GPL, v2 or later", l...
gpl-2.0
ld-test/cassandra
spec/type_fixtures.lua
8
3178
local cassandra = require "cassandra" return { {name='ascii', value='string'}, {name='ascii', insert_value=cassandra.null, read_value=nil}, {name='bigint', insert_value=cassandra.bigint(42000000000), read_value=42000000000}, {name='bigint', insert_value=cassandra.bigint(-42000000000), read_value=-42000000000},...
mit
qweru/Dilan
plugins/welcome.lua
1
3533
local add_user_cfg = load_from_file('data/add_user_cfg.lua') --create by RoyalTeam ID CHANNEL : @RoyalTeamCh 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_nam...
gpl-2.0
ashdnazg/Zero-K
LuaUI/Widgets/unit_marker.lua
5
4118
function widget:GetInfo() return { name = "Unit Marker Zero-K", desc = "[v1.3.10] Marks spotted buildings of interest and commander corpse.", author = "Sprung", date = "2015-04-11", license = "GNU GPL v2", layer = -1, enabled = true, } end local knownUnits = {} local unitList = {} local markingActi...
gpl-2.0
superopen/openwrt-luci
applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua
85
3942
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.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 htt...
apache-2.0
GiuseppeGorgoglione/mame
scripts/target/mame/virtual.lua
2
2403
-- license:BSD-3-Clause -- copyright-holders:MAMEdev Team --------------------------------------------------------------------------- -- -- virtual.lua -- -- Virtual target makefile -- --------------------------------------------------------------------------- -------------------------------------------------- --...
gpl-2.0
LukaOo/Cervix2017
models/image224_segmenter_resnet.lua
1
11401
require 'nn' require 'dpnn' local MaxPooling = nn.SpatialMaxPooling local AvgPooling = nn.SpatialAveragePooling local UpSampling = nn.SpatialUpSamplingBilinear local Convolution = nn.SpatialConvolution local LeakyReLU = nn.LeakyReLU local ReLU = nn.ReLU local SBatchNorm = nn.SpatialBatchNormalization local baseWi...
gpl-3.0
163140/ethereal
extra.lua
1
7682
-- Vines minetest.register_node("ethereal:vine", { description = "Vine", drawtype = "signlike", tiles = {"vine.png"}, inventory_image = "vine.png", wield_image = "vine.png", paramtype = "light", paramtype2 = "wallmounted", walkable = false, climbable = true, is_ground_content = false, selection_box = { typ...
gpl-3.0
ashdnazg/Zero-K
LuaUI/Widgets/cmd_area_attack_tweak.lua
5
10499
local version = "v1.121" function widget:GetInfo() return { name = "Area Attack Tweak", desc = version .. " Tweak to area attack command:".. "\n• automatically filter out ground target for AA units.".. "\n• CTRL+Attack split targets among units.", author = "msafwan", date = ...
gpl-2.0
Evane-S-cencE/mrx
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-2.0
Abu0Ali/abu0alibot
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-2.0
RazielSun/juma-editor
editor/lib/lua/editor/render/RenderContextMgr.lua
2
3546
-------------------------------------------------------------------- -- RENDER CONTEXT MGR -------------------------------------------------------------------- local RenderContextMgr = {} RenderContextMgr.contexts = {} RenderContextMgr.current = nil RenderContextMgr.currentKey = nil -----------------------------...
mit
ashdnazg/Zero-K
LuaUI/Widgets/gui_command_indicator.lua
5
6804
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Command Indicator (beta)", desc = "Simple visual feedback of received commands", author = "Kin...
gpl-2.0
lynnard/cocos2d-hs
cbits/cocos/scripting/lua-bindings/auto/api/CameraBackgroundDepthBrush.lua
9
1759
-------------------------------- -- @module CameraBackgroundDepthBrush -- @extend CameraBackgroundBrush -- @parent_module cc -------------------------------- -- Set depth<br> -- param depth Depth used to clear depth buffer -- @function [parent=#CameraBackgroundDepthBrush] setDepth -- @param self -- @param #float dep...
bsd-3-clause
qweru/Dilan
plugins/silent-gp.lua
1
1271
do local function pre_process(msg) local hash = 'mate:'..msg.to.id if redis:get(hash) and msg.from.id and msg.to.type == 'channel' and not is_sudo(msg) then delete_msg(msg.id, ok_cb, false) return "silent all was locked" end return msg end local function run(...
gpl-2.0
halilkaya/minetest-mods
plantlife/ferns/settings.lua
3
2402
-- In case you don't wanna have errors: -- Only change what's behind a "=" (or "--"). -- Don't use caps (behind a "="). -- If there's a "false" (behind a "=") you can change it to "true" (and the other way around). -- Spelling is important. -- If "true" or "false" is necessary as setting, everything(!) which is not ...
gpl-3.0
ashdnazg/Zero-K
LuaRules/Utilities/tablefunctions.lua
5
4207
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- --deep not safe with circular tables! defaults To false function Spring.Utilities.CopyTable(tableToCopy, deep) local copy = {} for key, value in...
gpl-2.0
huailiang/GameEngineen
Assets/uLua/Lua_Backup/System/Wrap.lua
1
1925
import 'AnimationBlendMode' import 'AnimationClip' import 'AnimationState' import 'Animation' import 'AppConst' import 'Application' import 'AssetBundle' import 'AsyncOperation' import 'AudioClip' import 'AudioSource' import 'Behaviour' import 'BlendWeights' import 'BoxCollider' import 'CameraClearFlags' import 'Camera...
mit
Wohlhabend-Networks/LunaDLL
LuaScriptsLibExt/metaluna.lua
2
2071
--***************** --* metaluna.lua * --* v1.0 * --* * --***************** local metaluna = {} local sectionIds = {} if Animation.__tostring == nil then function Animation.__tostring(obj) return "Animation (id="..obj.id..", x="..obj.x..", y="..obj.y..")" end; end; if BGO.__tostring == nil...
gpl-3.0
TeleDALAD/n
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
lynnard/cocos2d-hs
cbits/cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua
11
14147
cc = cc or {} function cc.clampf(value, min_inclusive, max_inclusive) -- body local temp = 0 if min_inclusive > max_inclusive then temp = min_inclusive min_inclusive = max_inclusive max_inclusive = temp end if value < min_inclusive then return min_inclusive el...
bsd-3-clause
Wohlhabend-Networks/LunaDLL
LuaScriptsLibExt/inputs2.lua
3
8947
--*************************************************************************************** -- * -- inputs2.lua * -- v1.1 ...
gpl-3.0
ashdnazg/Zero-K
units/hoversonic.lua
2
3478
unitDef = { unitname = [[hoversonic]], name = [[Morningstar]], description = [[Antisub Hovercraft]], acceleration = 0.048, activateWhenBuilt = true, brakeRate = 0.043, buildCostMetal = 300, builder = false, buildPic = [[h...
gpl-2.0
AlexeySa/rspamd
contrib/torch/nn/SpatialFractionalMaxPooling.lua
9
5383
local SpatialFractionalMaxPooling, parent = torch.class('nn.SpatialFractionalMaxPooling', 'nn.Module') -- Usage: -- nn.SpatialFractionalMaxPooling(poolSizeW, poolSizeH, outW, outH) -- the output should be the exact size (outH x outW) -- nn.SpatialFractionalMaxPooling(poolSizeW, poolSizeH, ratioW, ratioH) -- the...
bsd-2-clause
napcode/ardour
share/scripts/midimon.lua
2
6474
ardour { ["type"] = "dsp", name = "ACE MIDI Monitor", category = "Visualization", license = "GPLv2", author = "Ardour Community", description = [[Display recent MIDI events inline in the mixer strip]] } local maxevents = 20 local ringsize = maxevents * 3 local evlen = 3 local hpadding, vpad...
gpl-2.0
ashdnazg/Zero-K
effects/gundam_kampferimpact.lua
25
7159
-- kampferimpact return { ["kampferimpact"] = { dirta = { air = true, class = [[CSimpleParticleSystem]], count = 1, properties = { airdrag = 0.7, alwaysvisible = true, colormap = [[0.1 0.1 0.1 1.0 0...
gpl-2.0
Phoib/truewar
mods/ra/maps/soviet-05/soviet05.lua
33
8124
CheckForBase = function() baseBuildings = Map.ActorsInBox(Map.TopLeft, CFBPoint.CenterPosition, function(actor) return actor.Type == "fact" or actor.Type == "powr" end) return #baseBuildings >= 2 end CheckForCYard = function() ConYard = Map.ActorsInBox(mcvGGLoadPoint.CenterPosition, ReinfEastPoint.CenterPositio...
gpl-3.0
lynnard/cocos2d-hs
cbits/cocos/scripting/lua-bindings/auto/api/PointLight.lua
11
1236
-------------------------------- -- @module PointLight -- @extend BaseLight -- @parent_module cc -------------------------------- -- get or set range -- @function [parent=#PointLight] getRange -- @param self -- @return float#float ret (return value: float) -------------------------------- -- -- @function...
bsd-3-clause
AlexeySa/rspamd
contrib/torch/nn/VolumetricMaxUnpooling.lua
17
1804
local VolumetricMaxUnpooling, parent = torch.class('nn.VolumetricMaxUnpooling', 'nn.Module') function VolumetricMaxUnpooling:__init(poolingModule) parent.__init(self) assert(torch.type(poolingModule)=='nn.VolumetricMaxPooling', 'Argument must be a nn.VolumetricMaxPooling module') assert(poolingModule.kT==pooling...
bsd-2-clause
ashdnazg/Zero-K
LuaUI/Widgets/cmd_missile_silo.lua
3
6096
function widget:GetInfo() return { name = "Missile Silo Commands", desc = "Okay, take a nap. THEN FIRE ZE MISSILES!", author = "Histidine", date = "2018-05-12", license = "GNU GPL, v2 or later", layer = 0, enabled = true, --alwaysStart = true, handler = true, } end -----...
gpl-2.0
AndroidOpenDevelopment/android_external_skia
tools/lua/skia.lua
207
1863
-- Experimental helpers for skia -- function string.startsWith(String,Start) return string.sub(String,1,string.len(Start))==Start end function string.endsWith(String,End) return End=='' or string.sub(String,-string.len(End))==End end Sk = {} function Sk.isFinite(x) return x * 0 == 0 end ----------------...
bsd-3-clause
ShortTailLab/ph-open
libs/scripting/lua/script/CCBReaderLoad.lua
14
5978
ccb = ccb or {} function CCBReaderLoad(strFilePath,proxy,bSetOwner,strOwnerName) if nil == proxy then return end local ccbReader = proxy:createCCBReader() local node = proxy:readCCBFromFile(strFilePath,ccbReader,bSetOwner) local owner = ccbReader:getOwner() local rootName = "...
mit
Abu0Ali/abu0alibot
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
sjznxd/luci-0.11.1
applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua
11
1146
--[[ LuCI hd-idle (c) 2008 Yanira <forum-2008@email.de> 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 $Id: hd_idle.lua 6063 2010-04-14 08:58:0...
apache-2.0
ashdnazg/Zero-K
LuaUI/Widgets/chili/Skins/Evolved/skin.lua
4
18614
--//============================================================================= --// Skin local skin = { info = { name = "Evolved", version = "0.3", author = "jK", } } --//============================================================================= --// skin.general = { focusColor = {0.94, ...
gpl-2.0
lumidify/Lord-of-the-Test
mods/lottmapgen/functions.lua
1
26129
--Plants function lottmapgen_grass(data, vi, p2data) local c_grass1 = minetest.get_content_id("default:grass_1") local c_grass2 = minetest.get_content_id("default:grass_2") local c_grass3 = minetest.get_content_id("default:grass_3") local c_grass4 = minetest.get_content_id("default:grass_4") local c_grass5 = mine...
lgpl-2.1
AlexeySa/rspamd
src/plugins/lua/asn.lua
1
3526
--[[ Copyright (c) 2011-2016, Vsevolod Stakhov <vsevolod@highsecure.ru> Copyright (c) 2016, Andrew Lewis <nerf@judo.za.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.org...
bsd-2-clause
telespead/telespeadgit
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
hfjgjfg/persianguard50
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
mabako/mta-paradise
resources/admin/spectate.lua
1
4065
--[[ Copyright (c) 2010 MTA: Paradise This program is free software; you can redistribute it and/or modify it 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 version. This program is distributed in the hope ...
gpl-3.0
minaka1412/Cocos3DEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua
11
1653
-------------------------------- -- @module TransitionFadeTR -- @extend TransitionScene,TransitionEaseScene -- @parent_module cc -------------------------------- -- -- @function [parent=#TransitionFadeTR] easeActionWithAction -- @param self -- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterva...
mit
xcjmine/skynet
service/launcher.lua
9
4124
local skynet = require "skynet" local core = require "skynet.core" require "skynet.manager" -- import manager apis local string = string local services = {} local command = {} local instance = {} -- for confirm (function command.LAUNCH / command.ERROR / command.LAUNCHOK) local launch_session = {} -- for command.QUERY,...
mit
ashdnazg/Zero-K
LuaRules/Gadgets/CAI/AssetTracker.lua
9
5782
--[[ Handles force composition and position * Should be used both for the enemies of a CAI and its allyTeam * Maintains heatmaps for static/mobile units which are anti land/AA. --]] local HeatmapUnitDefID, ListUnitDefID, CombatListUnitDefID, EconomyTargetUnitDefID = VFS.Include("LuaRules/Configs/CAI/assetTrackerConfi...
gpl-2.0
linuxmaniac/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
ashdnazg/Zero-K
LuaUI/Widgets/chili/Controls/button.lua
17
1147
--//============================================================================= Button = Control:Inherit{ classname= "button", caption = 'button', defaultWidth = 70, defaultHeight = 20, } local this = Button local inherited = this.inherited --//============================================================...
gpl-2.0
mohammad8/hu
plugins/chat.lua
2
1969
local function run(msg) if msg.text == "hi" then return "Hello bb" end if msg.text == "Hi" then return "Hello honey" end if msg.text == "Hello" then return "Hi bb" end if msg.text == "hello" then return "Hi honey" end if msg.text == "Salam" then return "Salam aleykom" end if msg.text == "salam" then return "va al...
gpl-2.0
ashdnazg/Zero-K
effects/nanobomb.lua
25
1716
-- nanobomb return { ["nanobomb"] = { usedefaultexplosions = false, groundflash = { alwaysvisible = false, circlealpha = 1, circlegrowth = 10, flashalpha = 0.5, flashsize = 100, ttl = 15, color = { [1] = 0, ...
gpl-2.0
errorscode/mmdead
plugins/invite.lua
4
1324
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then -- I...
gpl-2.0
ld-test/penlight
lua/pl/input.lua
28
5192
--- Iterators for extracting words or numbers from an input source. -- -- require 'pl' -- local total,n = seq.sum(input.numbers()) -- print('average',total/n) -- -- _source_ is defined as a string or a file-like object (i.e. has a read() method which returns the next line) -- -- See @{06-data.md.Reading_Unstru...
mit
ashdnazg/Zero-K
units/bomberstrike.lua
5
3644
unitDef = { unitname = [[bomberstrike]], name = [[Kestrel]], description = [[Tactical Strike Bomber]], brakerate = 0.4, buildCostMetal = 400, builder = false, buildPic = [[bomberstrike.png]], canFly = true, canGuard ...
gpl-2.0
WolfGaming/OpenRA
mods/ra/maps/allies-07/allies07-AI.lua
3
4597
--[[ Copyright 2007-2019 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
Chessnut/NutScript
gamemode/core/libs/sh_command.lua
2
6027
nut.command = nut.command or {} nut.command.list = nut.command.list or {} local COMMAND_PREFIX = "/" -- Adds a new command to the list of commands. function nut.command.add(command, data) -- For showing users the arguments of the command. data.syntax = data.syntax or "[none]" -- Why bother adding a command if it ...
mit
ashdnazg/Zero-K
lups/ParticleClasses/ShockWave.lua
5
6100
-- $Id: ShockWave.lua 3171 2008-11-06 09:06:29Z det $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local ShockWave = {} ShockWave.__inde...
gpl-2.0
Serabass/vice-players
Vendor/CEGUI/cegui/src/ScriptingModules/LuaScriptModule/support/tolua++bin/lua/function.lua
7
19280
-- tolua: function class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: function.lua 1597 2008-03-11 22:25:01Z ice-drezday $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to pr...
gpl-3.0
lumidify/Lord-of-the-Test
mods/lottmobs/animals.lua
2
6700
mobs:register_mob("lottmobs:chicken", { type = "animal", hp_min = 5, hp_max = 10, collisionbox = {-0.3,0,-0.3, 0.3,0.8,0.3}, textures = { {"lottmobs_chicken.png"}, }, sounds = { random = "mobs_chicken", }, visual = "mesh", mesh = "chicken_model.x", makes_footstep_sound = true, walk_velocity = 1, armor ...
lgpl-2.1
ashdnazg/Zero-K
units/shiptorpraider.lua
1
3893
unitDef = { unitname = [[shiptorpraider]], name = [[Hunter]], description = [[Torpedo-Boat (Raider)]], acceleration = 0.048, activateWhenBuilt = true, brakeRate = 0.043, buildCostMetal = 100, builder = false, buildPic = ...
gpl-2.0
KratosTeam/terminator
plugins/banhammer_fa.lua
1
19646
--[[ |-------------------------------------------------------------------------------------------------| | ######## ######## ######## ## ## #### ## ## ### ######## ####### ######## | | ## ## ## ## ### ### ## ### ## ## ## ## ## ## ## ## | | ## ##...
agpl-3.0
sjznxd/luci-0.11.1
applications/luci-wshaper/luasrc/model/cbi/wshaper.lua
53
2056
--[[ LuCI - Lua Configuration Interface Copyright 2011 Manuel Munz <freifunk at somakoma dot de> 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 ]]-- r...
apache-2.0
chukong/sdkbox-samples
src/cocos/framework/extends/UIScrollView.lua
55
2042
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, di...
mit
ashdnazg/Zero-K
units/staticheavyradar.lua
5
2238
unitDef = { unitname = [[staticheavyradar]], name = [[Advanced Radar]], description = [[Long-Range Radar]], activateWhenBuilt = true, buildCostMetal = 500, builder = false, buildingGroundDecalD...
gpl-2.0
halilkaya/minetest-mods
animals/mobf_settings/tab_mobs.lua
3
3558
-------------------------------------------------------------------------------- -- Mob Framework Settings Mod by Sapier -- -- You may copy, use, modify or do nearly anything except removing this -- copyright notice. -- And of course you are NOT allowed to pretend you have written it. -- --! @file tab_feature_config.lu...
gpl-3.0
linuxmaniac/luacheck
src/luacheck/linearize.lua
4
17692
local parser = require "luacheck.parser" local utils = require "luacheck.utils" local pseudo_labels = utils.array_to_set({"do", "else", "break", "end", "return"}) -- Who needs classes anyway. local function new_line(node, parent, value) return { accessed_upvalues = {}, -- Maps variables to arrays of accessin...
mit
halilkaya/minetest-mods
snow/src/sled.lua
1
5353
--[[ --================= --====================================== LazyJ's Fork of Splizard's "Snow" Mod by LazyJ version: Umpteen and 7/5ths something or another. 2014_04_12 --====================================== --================= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE LIST OF CHANGES I'VE MADE ~~~~~~~~~~~~~~~~~~...
gpl-3.0
vhpham80/luci
modules/rpc/luasrc/jsonrpcbind/uci.lua
81
1914
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 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 ht...
apache-2.0
DCPUTeam/DCPUToolchain
tests/drivers/testvm/modules/units.lua
1
2280
function prereq_handler(state, params) -- all of our arguments should be words for i, v in ipairs(params) do if (v.type ~= "WORD") then error("error: .PREREQ only accepts words as parameters.") end end if (#params == 0) then error("error: .PREREQ must have at least one argument.") end -- ...
mit
lumidify/Lord-of-the-Test
mods/lottplants/init.lua
3
3182
dofile(minetest.get_modpath("lottplants").."/nodes.lua") dofile(minetest.get_modpath("lottplants").."/wild_food.lua") dofile(minetest.get_modpath("lottplants").."/flowers.lua") dofile(minetest.get_modpath("lottplants").."/functions.lua") minetest.register_node("lottplants:brambles_of_mordor", { description = "B...
lgpl-2.1
mabako/mta-paradise
resources/world/custom_blip.lua
1
1737
--[[ Copyright (c) 2010 MTA: Paradise This program is free software; you can redistribute it and/or modify it 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 version. This program is distributed in the hope ...
gpl-3.0
ashdnazg/Zero-K
LuaUI/Widgets/chili_new/core.lua
9
1595
local includes = { --"headers/autolocalizer.lua", "headers/util.lua", "headers/links.lua", "headers/backwardcompability.lua", "headers/unicode.lua", "handlers/debughandler.lua", "handlers/taskhandler.lua", "handlers/skinhandler.lua", "handlers/themehandler.lua", "handlers/fonthandler.lua", "handl...
gpl-2.0
doyke/sipml5
asterisk/etc/extensions.lua
317
5827
CONSOLE = "Console/dsp" -- Console interface for demo --CONSOLE = "DAHDI/1" --CONSOLE = "Phone/phone0" IAXINFO = "guest" -- IAXtel username/password --IAXINFO = "myuser:mypass" TRUNK = "DAHDI/G2" TRUNKMSD = 1 -- TRUNK = "IAX2/user:pass@provider" -- -- Extensions are expected to be defined in a global table ...
bsd-3-clause
mitterdoo/wire
lua/entities/gmod_wire_sensor.lua
10
6626
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire Beacon Sensor" ENT.WireDebugName = "Beacon Sensor" if CLIENT then return end -- No more client local MODEL = Model( "models/props_lab/huladoll.mdl" ) function ENT:Initialize() self:SetModel( MODEL ) self:PhysicsInit( SOLID_VPHYSICS )...
apache-2.0
lynnard/cocos2d-hs
cbits/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua
9
1262
-------------------------------- -- @module EaseBounceOut -- @extend EaseBounce -- @parent_module cc -------------------------------- -- brief Create the action with the inner action.<br> -- param action The pointer of the inner action.<br> -- return A pointer of EaseBounceOut action. If creation failed, return nil. ...
bsd-3-clause
02N/mal
lua/core.lua
11
5196
local utils = require('utils') local types = require('types') local reader = require('reader') local printer = require('printer') local readline = require('readline') local Nil, List, _pr_str = types.Nil, types.List, printer._pr_str local M = {} -- string functions function pr_str(...) return table.concat( ...
mpl-2.0
minaka1412/Cocos3DEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua
11
1975
-------------------------------- -- @module EventAssetsManagerEx -- @extend EventCustom -- @parent_module cc -------------------------------- -- -- @function [parent=#EventAssetsManagerEx] getAssetsManagerEx -- @param self -- @return AssetsManagerEx#AssetsManagerEx ret (return value: cc.AssetsManagerEx) --...
mit
Bromvlieg/gm_bromsock
Lua_examples/irc.lua
1
1071
require("bromsock"); local socket = BromSock(); local function writeline(line) local packet = BromPacket(); packet:WriteLine(line); socket:Send(packet, true); print("IRC WROTE: " .. line); end local function socketConnect(sock, connected, ip, port) if (not connected) then print("Unable to connect to IRC serv...
mit
atlimit8/OpenRA
mods/cnc/maps/nod04b/nod04b.lua
6
8903
--[[ 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
ashdnazg/Zero-K
units/armcom1.lua
5
6140
unitDef = { unitname = [[armcom1]], name = [[Strike Commander]], description = [[Mobile Assault Commander, Builds at 10 m/s]], acceleration = 0.18, activateWhenBuilt = true, autoHeal = 5, brakeRate = 0.375, buildCostMet...
gpl-2.0
aaiijmrtt/nn
Sequential.lua
33
3921
local Sequential, _ = torch.class('nn.Sequential', 'nn.Container') function Sequential:__len() return #self.modules end function Sequential:add(module) if #self.modules == 0 then self.gradInput = module.gradInput end table.insert(self.modules, module) self.output = module.output return self en...
bsd-3-clause
iamii/MySSH
books/mysql/mysql.lua
1
2969
-- -- Created by IntelliJ IDEA. -- User: guang -- Date: 2016-12-17 -- Time: 21:35 -- require ("books/common") mysql = {} function mysql:new(o) o = o or { host="localhost", port=3306, root_user = "root", root_pass=[====[!@#$%^]====], } o.port = o.port or 3306 setmetatabl...
gpl-3.0
sjznxd/luci-0.11.1
libs/httpclient/luasrc/httpclient/receiver.lua
93
6049
--[[ LuCI - Lua Development Framework Copyright 2009 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.org/licenses/LICENSE-2.0 $Id$ ]]-- requ...
apache-2.0
amirchesme/amir
plugins/ingroup.lua
202
31524
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
mitterdoo/wire
lua/wire/stools/eyepod.lua
9
6494
WireToolSetup.setCategory( "Vehicle Control" ) WireToolSetup.open( "eyepod", "Eye Pod", "gmod_wire_eyepod", nil, "Eye Pods" ) if ( CLIENT ) then //tool hud lang language.Add( "Tool.wire_eyepod.name", "Eye Pod Tool (Wire)" ) language.Add( "Tool.wire_eyepod.desc", "Spawns an Eye Pod Mouse Controller." ) lan...
apache-2.0
ashdnazg/Zero-K
scripts/jumpcon.lua
5
19664
include "constants.lua" include "JumpRetreat.lua" local jump = piece 'jump' local torso = piece 'torso' local flare = piece 'flare' local pelvis = piece 'pelvis' local rcalf = piece 'rcalf' local lcalf = piece 'lcalf' local lthigh = piece 'lthigh' local rthigh = piece 'rthigh' local larm = piece 'larm' local ...
gpl-2.0
WolfGaming/OpenRA
mods/ra/maps/soviet-04a/soviet04a-AI.lua
4
3426
--[[ Copyright 2007-2019 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
ld-test/multipart-post
multipart-post.lua
1
1905
local ltn12 = require "ltn12" local fmt = function(p,...) if select('#',...) == 0 then return p else return string.format(p,...) end end local tprintf = function(t,p,...) t[#t+1] = fmt(p,...) end local append_data = function(r,k,data,extra) tprintf(r,"content-disposition: form-data; name=\"%s\"",k) if ...
mit
kbrock/FrameworkBenchmarks
frameworks/Lua/lapis/web.lua
72
5957
local lapis = require("lapis") local db = require("lapis.db") local Model do local _obj_0 = require("lapis.db.model") Model = _obj_0.Model end local config do local _obj_0 = require("lapis.config") config = _obj_0.config end local insert do local _obj_0 = table insert = _obj_0.insert end local sort do loc...
bsd-3-clause
disslove/DJ-BOT
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
zmallen/robin
files-pdns/lua/sinkhole.lua
3
2858
package.path = package.path .. ";/etc/powerdns/?.lua" pcall(require, "luarocks.require") redis = require 'redis' require "tester" require "syslog" require "redisconn" -- PDNS Functions -- function nxdomain( ip, domain, qtype ) if qtype == pdns.A or qtype == pdns.AAAA then sendsyslog(1004, {reques...
mit
enkol/wow-premade-groups-filter
Dialog/Help.lua
1
3920
------------------------------------------------------------------------------- -- Premade Groups Filter ------------------------------------------------------------------------------- -- Copyright (C) 2015 Elotheon-Arthas-EU -- -- This program is free software; you can redistribute it and/or modify -- it under the ter...
gpl-3.0
NicolBolas/New-Vulkan-XML-Format
LuaTools/XmlWriter.lua
1
11617
--[[-- An XML writing system. @module XmlWriter To create an @{xml_writer}, use the function @{XmlWriter.XmlWriter}, passing in a filename that you want written to. This function will open the file and automatically create the XML header. The function returns an xml_writer "class", which is why creation looks like a ...
mit
facebokiii/UHproject
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
facebokiii/UHproject
plugins/webshot.lua
919
1473
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
fegimanam/sg1
plugins/time.lua
771
2865
-- Implement a command !time [area] which uses -- 2 Google APIs to get the desired result: -- 1. Geocoding to get from area to a lat/long pair -- 2. Timezone to get the local time in that lat/long location -- Globals -- If you have a google api key for the geocoding/timezone api api_key = nil base_api = "https://m...
gpl-2.0