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
litnimax/luci
modules/base/luasrc/ccache.lua
82
1863
--[[ 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
aadddjj/testbotantispam
plugins/banwiz.lua
18
11097
-- data saved to moderation.json do -- make sure to set with value that not higher than stats.lua local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function is_user_whitelisted(id) local hash = 'whitelist:user#id'..id local white = redis:get(hash) or false return...
gpl-2.0
ifoxhz/iFox
scripts/callbacks/second.lua
2
1358
-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path if (ntop.isPro()) then package.path = dirs.installdir .. "/pro/scripts/callbacks/?.lua;" .. package.path end require "lua_utils" require "graph_utils" -- Toggle debug local enable_...
gpl-3.0
gajop/Zero-K
LuaRules/Configs/MetalSpots/Quoth_v1.lua
17
1521
return { spots = { {x = 2808, z = 6056, metal = 2.0400002002716}, {x = 5384, z = 5800, metal = 2.0400002002716}, {x = 6056, z = 1640, metal = 2.0400002002716}, {x = 136, z = 3144, metal = 2.0400002002716}, {x = 856, z = 1688, metal = 2.0400002002716}, {x = 712, z = 5896, metal = 2.0400002002716}, {x = 2104, z =...
gpl-2.0
KennethD96/computercraft-scripts
mcauth-server.lua
1
1177
-- mcauth-server -- KennethD(C)2014 -- Config -- local AuthIRL = "" local AuthID = "" local modemio = "top" -- Users local localusers = { ken = "Aoe1234", cyb = "Aoe1234" } -- function clock() while true do localtime = os.time() sleep(.5) end end function log(string) local pref = "["..textutils...
mit
KayMD/Illarion-Content
lte/damagefield_poisoncloud.lua
4
2402
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
tvbeat/lua-rapidjson
spec/json_load_spec.lua
1
9520
--luacheck: ignore describe it local utf8 = require "dromozoa.utf8.pure" -- luarocks install utf8 describe('rapidjson.load()', function() local rapidjson = require('rapidjson') describe('report error', function() it('when load file not exist', function() assert.are.has_error(function() rapidjson.l...
mit
KayMD/Illarion-Content
craft/final/tailoring.lua
2
32557
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
gajop/Zero-K
units/tele_beacon.lua
3
2252
unitDef = { unitname = [[tele_beacon]], name = [[Lamp]], description = [[Teleport Bridge Entry Beacon, right click to teleport.]], acceleration = 0, brakeRate = 0, buildAngle = 4096, bui...
gpl-2.0
gajop/Zero-K
units/tacnuke.lua
2
4183
unitDef = { unitname = [[tacnuke]], name = [[Eos]], description = [[Tactical Nuke]], buildCostEnergy = 600, buildCostMetal = 600, builder = false, buildingGroundDecalDecaySpeed = 30, buildi...
gpl-2.0
jayman39tx/naev
dat/scripts/pilot/pirate.lua
2
8767
include("pilot/generic.lua") include("dat/factions/equip/helper.lua") include("dat/factions/equip/outfits.lua") --[[ -- @brief Creates a mighty pirate of epic proportions. -- -- @param pirate_create If nil or true actually creates a pirate with a -- random name and all, otherwise it'll give ship type and...
gpl-3.0
KayMD/Illarion-Content
quest/lilith_needlehand_73_runewick.lua
3
4503
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
davidBelanger/nn
Parallel.lua
39
3780
local Parallel, parent = torch.class('nn.Parallel', 'nn.Container') function Parallel:__init(inputDimension,outputDimension) parent.__init(self) self.modules = {} self.size = torch.LongStorage() self.inputDimension = inputDimension self.outputDimension = outputDimension end function Parallel:updateOut...
bsd-3-clause
CodeAnxiety/premake-core
src/base/global.lua
21
2163
--- -- global.lua -- The global container holds workspaces and rules. -- Copyright (c) 2014-2015 Jason Perkins and the Premake project --- local p = premake p.global = p.api.container("global") local global = p.global --- -- Create a new global container instance. --- function global.new(name) return p.contai...
bsd-3-clause
casseveritt/premake
tests/project/test_vpaths.lua
51
3834
-- -- tests/project/test_vpaths.lua -- Automated test suite for the project support functions. -- Copyright (c) 2011-2012 Jason Perkins and the Premake project -- T.project_vpaths = { } local suite = T.project_vpaths local project = premake.project -- -- Setup and teardown -- local sln function suite.setup() ...
bsd-3-clause
dhotson/prosody-modules
mod_sift/mod_sift.lua
32
6448
local st = require "util.stanza"; local jid_bare = require "util.jid".bare; -- advertise disco features module:add_feature("urn:xmpp:sift:1"); -- supported features module:add_feature("urn:xmpp:sift:stanzas:iq"); module:add_feature("urn:xmpp:sift:stanzas:message"); module:add_feature("urn:xmpp:sift:stanzas:presence"...
mit
CodeAnxiety/premake-core
tests/actions/vstudio/vc2010/test_rule_props.lua
5
1448
-- -- tests/actions/vstudio/vc2010/vstudio_vs2010_rule_props.lua -- Validate generation of custom rules -- Author Tom van Dijck -- Copyright (c) 2016 Jason Perkins and the Premake project -- local suite = test.declare("vstudio_vs2010_rule_props") local vc2010 = premake.vstudio.vc2010 local m = premake.vstudio.vs20...
bsd-3-clause
jzbontar/nn
View.lua
41
2232
local View, parent = torch.class('nn.View', 'nn.Module') function View:__init(...) parent.__init(self) if select('#', ...) == 1 and torch.typename(select(1, ...)) == 'torch.LongStorage' then self.size = select(1, ...) else self.size = torch.LongStorage({...}) end self.numElements = 1 loc...
bsd-3-clause
jayman39tx/naev
dat/missions/shadow/shadowrun.lua
1
22670
--[[ -- This is the main script for the Shadowrun mission. It's started from the spaceport bar and tries to emulate spaceport bar conversation as part of the mission. -- "shadowrun" stack variable: -- 1 = player has met Rebina, but hasn't accepted the mission -- 2 = player has accepted Rebina's mission, but has not tal...
gpl-3.0
wintonliuwen/free4530
feeds/xwrt/webif-iw-lua/files/usr/lib/lua/lua-xwrt/uhttpdproxy.lua
18
4408
require("lua-xwrt.addon.string") function handle_request(env) local debug = false local function split(str,sep) local t = {} local ini = 1 local seplen = string.len(sep) local len = string.len(str) local iend = string.find(str,sep,ini,true) if iend == nil then iend = len+1 end repeat t[#t+1] = string...
gpl-2.0
mehdisadeghi/mehdix.ir
src/assets/instead/fs/stead/stead2/proxymenu.lua
2
6166
stead.menu_prefix = '   ' local mpar = function(v, vv, rc) if stead.type(v) == 'string' or stead.type(vv) == 'string' then return stead.par(stead.space_delim, v, vv); elseif v == true or vv == true then return true end return rc end local call = function(o, m, ...) local rc = nil local v, r = stead.call(...
cc0-1.0
KayMD/Illarion-Content
item/id_964_keg.lua
3
4659
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
gajop/Zero-K
scripts/chickenflyerqueen.lua
11
7563
include "constants.lua" local spGetUnitHealth = Spring.GetUnitHealth --pieces local body, head, tail, leftWing1, rightWing1, leftWing2, rightWing2 = piece("body","head","tail","lwing1","rwing1","lwing2","rwing2") local leftThigh, leftKnee, leftShin, leftFoot, rightThigh, rightKnee, rightShin, rightFoot = piece("lthig...
gpl-2.0
INPStarfall/Starfall
lua/starfall/editor.lua
2
55172
------------------------------------------------------------------------------- -- SF Editor -- Originally created by Jazzelhawk -- -- To do: -- Find new icons ------------------------------------------------------------------------------- SF.Editor = {} local addon_path = nil do local tbl = debug.get...
bsd-3-clause
wangtianhang/UnityLuaTest
protoBufTest/UnityLuaTest2018/Assets/ToLua/Lua/UnityEngine/Mathf.lua
6
4889
-------------------------------------------------------------------------------- -- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com -- All rights reserved. -- Use, modification and distribution are subject to the "MIT License" -----------------------------------------------------------------...
mit
Flourish-Team/Flourish
Premake/source/tests/workspace/test_eachconfig.lua
32
1470
-- -- tests/workspace/test_eachconfig.lua -- Automated test suite for the workspace-level configuration iterator. -- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- local suite = test.declare("workspace_eachconfig") local p = premake -- -- Setup and teardown -- local wks function suite.setup(...
mit
Flourish-Team/Flourish
Premake/source/src/_manifest.lua
9
1390
-- -- _manifest.lua -- Manage the list of built-in Premake scripts. -- Copyright (c) 2002-2015 Jason Perkins and the Premake project -- -- The master list of built-in scripts. Order is important! If you want to -- build a new script into Premake, add it to this list. return { -- core files "base/_foundation.lua...
mit
KayMD/Illarion-Content
content/climbing.lua
4
3455
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
safavi1381/Mr_bot
vir/Get.lua
15
1052
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
Mutos/NAEV-StarsOfCall
dat/landing.lua
11
8991
--[[ Prototype function: Parameter: pnt - Planet to set landing stuff about. Return: 1) Boolean whether or not can land 2) Land message which should be denial if can't land or acceptance if can 3) (optional) Bribe price or message that can't be bribed or nil in the case of no...
gpl-3.0
wangtianhang/UnityLuaTest
protoBufTest/UnityLuaTest2018/Assets/ToLua/Lua/protobuf/type_checkers.lua
15
2366
-- -------------------------------------------------------------------------------- -- FILE: type_checkers.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.co...
mit
reloadlife/sprcpubot
Bot.lua
1
9420
---------------------------- --[[ Last Version, Last Update. # Farvardin 1396 # Reload Life # SprCpu Company ]] ------------------------ --Insert Redis Data Base :) function RedisDb() local Redis = require 'redis' local FakeRedis = require 'fakeredis' local params = { host = os.geten...
gpl-3.0
matinbot/botgram
plugins/banhammer.lua
13
11897
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
gajop/Zero-K
libs/chonsole/luaui/config/globals.lua
1
1269
-- constants local grey = { 0.7, 0.7, 0.7, 1 } local white = { 1, 1, 1, 1 } local blue = { 0, 0, 1, 1 } local teal = { 0, 1, 1, 1 } local red = { 1, 0, 0, 1 } local green = { 0, 1, 0, 1 } local yellow = { 1, 1, 0, 1 } -- General config = { console = { x = "50%", bottom = 0, width = "22%", height = 30, font...
gpl-2.0
dhotson/prosody-modules
mod_turncredentials/mod_turncredentials.lua
36
1415
-- XEP-0215 implementation for time-limited turn credentials -- Copyright (C) 2012-2013 Philipp Hancke -- This file is MIT/X11 licensed. local st = require "util.stanza"; local hmac_sha1 = require "util.hashes".hmac_sha1; local base64 = require "util.encodings".base64; local os_time = os.time; local secret = module:ge...
mit
gajop/Zero-K
LuaRules/Gadgets/typemap_options.lua
4
3596
function gadget:GetInfo() return { name = "Typemap Options", desc = "Edit's the map's typemap at the start of the game.", author = "Google Frog", date = "Feb, 2010", license = "GNU GPL, v2 or later", layer = 0, enabled = true -- loaded by default? } end loc...
gpl-2.0
mahdib77/bot
plugins/service.lua
1
5128
local function gsub_custom_welcome(msg, custom) local name = msg.added.first_name:mEscape() local id = msg.added.id local username local title = msg.chat.title:mEscape() if msg.added.username then username = '@'..msg.added.username:mEscape() else username = '(no username)' end custom = custom:gsub('$name', ...
gpl-2.0
wxguidesigner/wxGUIDesigner
build/premake/4.3/tests/actions/vstudio/test_vs2010_project_kinds.lua
3
7843
T.vs2010_project_kinds= { } local vs10_project_kinds = T.vs2010_project_kinds local sln, prj function vs10_project_kinds.setup() _ACTION = "vs2010" sln = solution "MySolution" configurations { "Debug" } platforms {} prj = project "MyProject" language "C++" end local function get_buffer() ...
gpl-3.0
gajop/Zero-K
scripts/hoverassault.lua
7
5241
local base = piece 'base' local shield = piece 'shield' local turret = piece 'turret' local gun = piece 'gun' local flare1 = piece 'flare1' local flare2 = piece 'flare2' local wakes = {} for i = 1, 8 do wakes[i] = piece ('wake' .. i) end local ground1 = piece 'ground1' local door1 = piece 'door1' local door2 ...
gpl-2.0
pixeltailgames/gm-mediaplayer
lua/mediaplayer/services/twitch/init.lua
1
1967
AddCSLuaFile "shared.lua" include "shared.lua" local urllib = url local APIKey = MediaPlayer.GetConfigValue('twitch.client_id') local MetadataUrl = "https://api.twitch.tv/kraken/videos/%s?client_id=%s" local function OnReceiveMetadata( self, callback, body ) local metadata = {} local response = util.JSONToTable(...
mit
duk3luk3/MoonGen
lua/include/proto/icmp.lua
5
9131
------------------------------------------------------------------------ --- @file icmp.lua --- @brief Internet control message protocol utility. --- Utility functions for the icmp_header struct --- defined in \ref headers.lua . \n --- Includes: --- - Icmp4 constants --- - Icmp6 constants --- - Icmp header utility --- ...
mit
mardraze/prosody-modules
mod_s2s_auth_monkeysphere/mod_s2s_auth_monkeysphere.lua
32
1870
module:set_global(); local http_request = require"socket.http".request; local ltn12 = require"ltn12"; local json = require"util.json"; local json_encode, json_decode = json.encode, json.decode; local gettime = require"socket".gettime; local serialize = require"util.serialization".serialize; local msva_url = assert(os...
mit
abasshacker/abbas3
bot/bot.lua
1
7778
package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua' ..';.luarocks/share/lua/5.2/?/init.lua' package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so' require("./bot/utils") VERSION = '0.14.6' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then r...
gpl-2.0
c0mb1ne/dota2-training-polygon
training_polygon/scripts/vscripts/libraries/physics.lua
10
101647
PHYSICS_VERSION = "1.01" PHYSICS_NAV_NOTHING = 0 PHYSICS_NAV_HALT = 1 PHYSICS_NAV_SLIDE = 2 PHYSICS_NAV_BOUNCE = 3 PHYSICS_NAV_GROUND = 4 PHYSICS_GROUND_NOTHING = 0 PHYSICS_GROUND_ABOVE = 1 PHYSICS_GROUND_LOCK = 2 COLLIDER_SPHERE = 0 COLLIDER_BOX = 1 COLLIDER_AABOX = 2 PHYSICS_THINK = 0.01 if Physics == nil then ...
mit
arya5123/tell
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
aadddjj/testbotantispam
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
torhve/ivar2
modules/casino.lua
2
32143
-- Ported from luabot cards.lua by xt. -- License: GPLv2 -- Copyright 2012-2014 Christopher E. Miller -- Copyright 2016 xt -- local commands = {} local _C = { ['PRIVMSG'] = commands } local function botExpectChannelBotCommand(pattern, handler) commands['^'..pattern] = handler end -- TODO persist this local alData =...
mit
CodeAnxiety/premake-core
tests/base/test_include.lua
16
1701
-- -- tests/base/test_include.lua -- Test the include() function, for including external scripts -- Copyright (c) 2011-2014 Jason Perkins and the Premake project -- local suite = test.declare("include") -- -- Setup and teardown -- function suite.teardown() -- clear the list of included files after each run i...
bsd-3-clause
wangtianhang/UnityLuaTest
UnityLuaTest/Assets/ToLua/Lua/misc/utf8.lua
15
8353
local utf8 = {} --byte index of the next char after the char at byte index i, followed by a valid flag for the char at byte index i. --nil if not found. invalid characters are iterated as 1-byte chars. function utf8.next_raw(s, i) if not i then if #s == 0 then return nil end return 1, true --fake flag (doesn't ma...
mit
adel8268adelad/Bot-thebest
plugins/info.lua
1
8352
do local SUDO = 111106355 --put your id here(BOT OWNER ID) local function setrank(msg, name, value) -- setrank function local hash = nil if msg.to.type == 'chat' then hash = 'rank:'..msg.to.id..':variables' end if hash then redis:hset(hash, name, value) return send_msg('chat#id'..msg.to.id, 'مقام کارب...
agpl-3.0
nobie/sesame_fw
feeds/luci/applications/luci-diag-devinfo/dist/usr/lib/lua/luci/controller/luci_diag/devinfo_common.lua
76
5638
--[[ Luci diag - Diagnostics controller module (c) 2009 Daniel Dickinson 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 ]]-- module("luci.cont...
gpl-2.0
nanobox-io/tag
deps/logger.lua
2
1775
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*- -- vim: ts=4 sw=4 ft=lua noet ---------------------------------------------------------------------- -- @author Daniel Barney <daniel@pagodabox.com> -- @copyright 2015, Pagoda Box, Inc. -- @doc -- -- @end -- Created : 15 May 2015 by Daniel Barne...
mit
dhotson/prosody-modules
mod_sms_clickatell/mod_sms_clickatell.lua
32
21145
-- mod_sms_clickatell -- -- A Prosody module for sending SMS text messages from XMPP using the -- Clickatell gateway's HTTP API -- -- Hacked from mod_twitter by Phil Stewart, March 2011. Anything from -- mod_twitter copyright The Guy Who Wrote mod_twitter. Everything else -- copyright 2011 Phil Stewart. Licensed under ...
mit
jzbontar/nn
SpatialConvolution.lua
27
4452
local SpatialConvolution, parent = torch.class('nn.SpatialConvolution', 'nn.Module') function SpatialConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.nOutputPlane = nOutputPlane self.kW = kW ...
bsd-3-clause
wxguidesigner/wxGUIDesigner
build/premake/4.3/src/base/cmdline.lua
6
1946
-- -- cmdline.lua -- Functions to define and handle command line actions and options. -- Copyright (c) 2002-2009 Jason Perkins and the Premake project -- -- -- Built-in command line options -- newoption { trigger = "cc", value = "VALUE", description = "Choose a C/C++ compiler set", allowed = { ...
gpl-3.0
MOSAVI17/videobot
plugins/lastfm.lua
9
2824
if not config.lastfm_api_key then print('Missing config value: lastfm_api_key.') print('lastfm.lua will not be enabled.') return end local command = 'lastfm' local doc = [[``` /np [username] Returns what you are or were last listening to. If you specify a username, info will be returned for that username. /fmset <...
gpl-2.0
gajop/Zero-K
LuaRules/Gadgets/unit_script.lua
7
24489
-- Author: Tobi Vollebregt --[[ Please, think twice before editing this file. Compared to most gadgets, there are some complex things going on. A good understanding of Lua's coroutines is required to make nontrivial modifications to this file. In other words, HERE BE DRAGONS =) Known issues: - {Query,AimFrom,Aim,Fi...
gpl-2.0
arya5123/tell
web.lua
1
1425
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
wangtianhang/UnityLuaTest
toluaSnapshotTest/toluaUnityProject/Luajit/jit/p.lua
55
9135
---------------------------------------------------------------------------- -- LuaJIT profiler. -- -- Copyright (C) 2005-2017 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This modul...
mit
wangtianhang/UnityLuaTest
protoBufTest/tolua_runtime_2019-09-08/luajit-2.1/src/jit/p.lua
55
9135
---------------------------------------------------------------------------- -- LuaJIT profiler. -- -- Copyright (C) 2005-2017 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This modul...
mit
nobie/sesame_fw
feeds/luci/applications/luci-vnstat/dist/usr/lib/lua/luci/model/cbi/vnstat.lua
90
2019
--[[ LuCI - Lua Configuration Interface Copyright 2010-2011 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 http://www.apache.org/licenses/LICENSE-2.0 ]]-- loc...
gpl-2.0
Bardia0021/IranCyber
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
shanesrasmussen/TReX-System
TReX_tgt.lua
1
5154
-- TReX.tgt -- Targeting local send = send local cc = TReX.config.cc or "##" --save tgt file TReX.tgt.save=function() if (string.char(getMudletHomeDir():byte()) == "/") then _sep = "/" else _sep = "\\" end -- if local savePath = getMudletH...
apache-2.0
gajop/Zero-K
scripts/gunshipcon.lua
2
3540
include "constants.lua" local base = piece 'base' local body = piece 'body' local engine1 = piece 'engine1' local engine2 = piece 'engine2' local nozzle = piece 'nozzle' local nano = piece 'nano' --New bits local centreClaw = piece 'CentreClaw' local centreClawBit = piece 'CentreClawBit' local CentreNano =...
gpl-2.0
ld-test/lua-nucleo
test/suite/0171-suite-full.lua
2
21470
-------------------------------------------------------------------------------- -- 0171-suite-full.lua: set of tests for suite test -- This file is a part of lua-nucleo library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) -------------------------------------------------------------------...
mit
KayMD/Illarion-Content
item/wands.lua
2
7379
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
KayMD/Illarion-Content
item/drinks.lua
3
5967
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
marco-we/bgfx
scripts/bgfx.lua
2
4096
-- -- Copyright 2010-2016 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- function bgfxProject(_name, _kind, _defines) project ("bgfx" .. _name) uuid (os.uuid("bgfx" .. _name)) kind (_kind) if _kind == "SharedLib" then defines { "BGFX_SHARED...
bsd-2-clause
DustinMorado/tomoauto
src/lib/tomoauto/settings/xfalign.lua
1
4188
--[[ Copyright (c) 2015 Dustin Reed Morado 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...
mit
CodeAnxiety/premake-core
tests/project/test_config_maps.lua
32
3971
-- -- tests/project/test_config_maps.lua -- Test mapping from workspace to project configurations. -- Copyright (c) 2012-2014 Jason Perkins and the Premake project -- local suite = test.declare("project_config_maps") -- -- Setup and teardown -- local wks, prj, cfg function suite.setup() wks = workspace("MyWor...
bsd-3-clause
amir32002/feedback-networks
lib/ConvLSTM_resnet5b.lua
1
13882
--[[ Convolutional LSTM for short term visual cell inputSize - number of input feature planes outputSize - number of output feature planes rho - recurrent sequence length stride - convolutional stride, used for the larger images input kc - convolutional filter size to convolve input km - convolutional f...
mit
nobie/sesame_fw
feeds/luci/applications/luci-statistics/luasrc/statistics/datatree.lua
77
4394
--[[ Luci statistics - rrd data tree builder (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.org/licenses/...
gpl-2.0
CodeAnxiety/premake-core
tests/actions/make/workspace/test_default_config.lua
18
1232
-- -- tests/actions/make/test_default_config.lua -- Validate generation of default configuration block for makefiles. -- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- local suite = test.declare("make_default_config") local p = premake -- -- Setup/teardown -- local wks, prj function suite.se...
bsd-3-clause
Flourish-Team/Flourish
Premake/source/modules/gmake2/tests/test_gmake2_perfile_flags.lua
8
2450
-- -- gmake2_perfile_flags.lua -- Tests compiler and linker flags for Makefiles. -- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project -- local suite = test.declare("gmake2_perfile_flags") local p = premake local gmake2 = p.modules.gmake2 local project = p.project -- -- Setup -- local...
mit
arya5123/tell
bane.lua
44
9652
local function is_user_whitelisted(id) local hash = 'whitelist:user#id'..id local white = redis:get(hash) or false return white end local function is_chat_whitelisted(id) local hash = 'whitelist:chat#id'..id local white = redis:get(hash) or false return white end local function kick_user(user_id, chat_id)...
gpl-2.0
AnsonSmith/kong
spec/plugins/mashape-analytics/buffer_spec.lua
5
2382
require "kong.tools.ngx_stub" local ALFBuffer = require "kong.plugins.mashape-analytics.buffer" local json = require "cjson" local ALF_STUB = {hello = "world"} local CONF_STUB = { batch_size = 100, delay = 2 } local str = json.encode(ALF_STUB) local STUB_LEN = string.len(str) describe("ALFBuffer", function() l...
apache-2.0
gajop/Zero-K
LuaUI/Widgets/api_preselection.lua
7
6551
function widget:GetInfo() return { name = "Pre-Selection Handler", desc = "Utility Functions for handling units in selection box and under selection cursor", author = "Shadowfury333", date = "Jan 6th, 2016", license = "GPLv2", version = "1", layer = 1000, enabled = true, --...
gpl-2.0
cshore/packages
net/smartsnmpd/files/mibs/interfaces.lua
158
4833
-- -- This file is part of SmartSNMP -- Copyright (C) 2014, Credo Semiconductor Inc. -- -- 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 2 of the License, or -- (at your optio...
gpl-2.0
kmfreeminer/km-freeminer-mods
mods/crafter/init.lua
2
4532
crafter = {} crafter.crafts = {} --{{{ local function check_craft local function check_craft(data, w, c) if c.type == data.method then -- Here we go.. for i=1,w-c._h+1 do for j=1,w-c._w+1 do local p=(i-1)*w+j minetest.log("verbose", "Checking data.items[" .. dump(i) .. "]["...
gpl-3.0
Mutos/NAEV-StarsOfCall
dat/ai/include/atk_util.lua
7
1471
--[[ -- Attack utilitiesGeneric attack functions --]] --[[ --Attempts to maintain a constant distance from nearby things --This modulates the distance between the current pilot and its nearest neighbor --]] function _atk_keep_distance() --anticipate this will be added to eliminate potentially silly behavior if ...
gpl-3.0
hussian1997/bot-of-iraq
plugins/sudolist.lua
3
2117
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY(@AHMED_ALOBIDE) ▀▄ ▄▀ ▀▄ ▄▀ BY(@hussian_9) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ملف الخاص بمساعدة المطو ▀▄ ▄▀...
agpl-3.0
arya5123/tell
stats.lua
43
4082
do -- Returns a table with `name` and `msgs` 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_prin...
gpl-2.0
nobie/sesame_fw
feeds/luci/libs/sys/dist/usr/lib/lua/luci/sys.lua
11
25788
--[[ LuCI - System library Description: Utilities for interaction with the Linux system FileId: $Id$ 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...
gpl-2.0
KayMD/Illarion-Content
item/keys.lua
2
13997
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 that it wi...
agpl-3.0
Mistranger/OpenRA
mods/ts/maps/fields-of-green/fields-of-green.lua
7
3413
--[[ Copyright 2007-2017 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
nobie/sesame_fw
feeds/luci/applications/luci-statistics/dist/usr/lib/lua/luci/model/cbi/luci_statistics/interface.lua
78
1325
--[[ Luci configuration model for statistics - collectd interface plugin configuration (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 Lic...
gpl-2.0
nobie/sesame_fw
feeds/luci/modules/admin-sesame/luasrc/model/cbi/mini/wifi.lua
73
11663
--[[ 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 h...
gpl-2.0
padrinoo1/telebak
plugins/all.lua
264
4202
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
MOSAVI17/videobot
plugins/commit.lua
15
13045
-- Commits from https://github.com/ngerakines/commitment. local command = 'commit' local doc = '`Returns a commit message from whatthecommit.com.`' local triggers = { '^/commit[@'..bot.username..']*' } local commits = { "One does not simply merge into master", "Merging the merge", "Another bug bites the dust", ...
gpl-2.0
gajop/Zero-K
units/hovershotgun.lua
6
5171
unitDef = { unitname = [[hovershotgun]], name = [[Punisher]], description = [[Shotgun Hover]], acceleration = 0.048, activateWhenBuilt = true, brakeRate = 0.043, buildCostEnergy = 300, buildCostMetal = 300, builder = false, bu...
gpl-2.0
davidBelanger/nn
SelectTable.lua
7
1367
local SelectTable, parent = torch.class('nn.SelectTable', 'nn.Module') function SelectTable:__init(index) parent.__init(self) self.index = index self.gradInput = {} end function SelectTable:updateOutput(input) assert(math.abs(self.index) <= #input, "arg 1 table idx out of range") if self.index < 0 then...
bsd-3-clause
INPStarfall/Starfall
lua/starfall/libs_sh/bit.lua
4
3358
--- Bitwise library --- Bitwise library -- @shared local bit_library, _ = SF.Libraries.Register( "bit" ) local bit = bit --- Arithmetic shift right -- @param value Value to be modified -- @param shiftCount Amounts of bits to shift -- @return Shifted value function bit_library.arshift ( value, shiftCount ) SF.CheckTy...
bsd-3-clause
jzbontar/nn
PairwiseDistance.lua
40
2674
local PairwiseDistance, parent = torch.class('nn.PairwiseDistance', 'nn.Module') function PairwiseDistance:__init(p) parent.__init(self) -- state self.gradInput = {torch.Tensor(), torch.Tensor()} self.output = torch.Tensor(1) self.diff = torch.Tensor() self.norm=p end function PairwiseDistance:u...
bsd-3-clause
iainmerrick/Urho3D
bin/Data/LuaScripts/27_Urho2DPhysics.lua
24
7973
-- Urho2D physics sample. -- This sample demonstrates: -- - Creating both static and moving 2D physics objects to a scene -- - Displaying physics debug geometry require "LuaScripts/Utilities/Sample" function Start() -- Execute the common startup for samples SampleStart() -- Create the scene conte...
mit
arya5123/tell
plugins/inpm.lua
1114
3008
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
tehran980/TeleSeed
plugins/inpm.lua
1114
3008
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
innodrivers/p4a-openwrt
feeds/xwrt/webif-iw-lua/files/usr/lib/lua/lua-xwrt/xwrt/page.lua
8
9949
-------------------------------------------------------------------------------- -- htmlpageClass.lua -- -- Author(s) [in order of work date]: -- Fabián Omar Franzotti -- -------------------------------------------------------------------------------- -- -- usage : page = xwrtpageClass.new(title_of_page) -- page ...
gpl-2.0
ifoxhz/iFox
scripts/lua/iface_flows_sankey.lua
1
5686
-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPHeader('application/json') tracked_host = _GET["host"] interface.select(ifname) peers = interface.getFlowPeers() max_num_links = 32 max_num_hosts = 8 l...
gpl-3.0
ebernerd/WaveLite
src/lib/text_editor.lua
1
2616
local util = require "src.lib.util" local libcursor = require "src.lib.cursor" local libformatting = require "src.lib.formatting" local text_editor = {} function text_editor.write( lines, formatting, cursors, cursor, text ) local min, max = libcursor.order( cursor ) -- min and max of position and selection local f...
mit
gajop/Zero-K
effects/gundam_vert_explosion.lua
26
3091
-- vert_explosion return { ["vert_explosion"] = { groundflash = { air = true, alwaysvisible = true, circlealpha = 0.9, circlegrowth = 25, flashalpha = 0.9, flashsize = 500, ground = true, ttl ...
gpl-2.0