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
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/RotateBy.lua
3
1053
-------------------------------- -- @module RotateBy -- @extend ActionInterval -------------------------------- -- overload function: create(float, float, float) -- -- overload function: create(float, float) -- -- overload function: create(float, cc.Vec3) -- -- @function [parent=#RotateB...
mit
Siapran/discord-biobot
deps/secure-socket/init.lua
6
1070
--[[ Copyright 2016 The Luvit Authors. All Rights Reserved. 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 Unless required by applicable law or agr...
mit
jokerdevv/Joker-Developer
plugins/admin.lua
4
9275
--[[ # For More Information ....! # Developer : Aziz < @devss_bot > #Dev # our channel: @help_tele ]] local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file...
gpl-2.0
piller187/LeadwerksComponentSystem
LcsSample/scripts/Objects/Sound/Noise.lua
1
1219
Script.soundfile=""--path "File" "All Supported Files:ogg,wav;Waveform Audio File Format (*.wav):wav;Ogg Vorbis (*.ogg):ogg|Sound" Script.playing=true--bool "Playing" Script.enabled=true--bool "Enabled" Script.range=50--float "Range" Script.volume=100--int "Volume" Script.pitch=1.0--float "Pitch" Script.loop=true...
gpl-3.0
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua
3
5632
-------------------------------- -- @module LabelTTF -- @extend Node,LabelProtocol,BlendProtocol -------------------------------- -- @function [parent=#LabelTTF] enableShadow -- @param self -- @param #size_table size -- @param #float float -- @param #float float -- @param #bool bool ------------------------...
mit
dromozoa/dromozoa-graph
test/test_find_dominators.lua
1
2639
-- Copyright (C) 2018 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-graph. -- -- dromozoa-graph 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...
gpl-3.0
ArchShaman/Zero-K
effects/unused_chloe.lua
25
1910
-- chloe return { ["chloe"] = { glow = { air = true, class = [[CSimpleParticleSystem]], count = 20, ground = true, water = true, properties = { airdrag = 1, colormap = [[1 0....
gpl-2.0
ArchShaman/Zero-K
effects/cannons_misc.lua
12
2473
return { ["heavy_cannon_muzzle"] = { muzzle = { air = true, class = [[CExpGenSpawner]], count = 1, ground = true, water = true, properties = { delay = 0, explosiongenerator = [[custom:RA...
gpl-2.0
brahmi2/prosody-modules
mod_register_web/mod_register_web.lua
27
5718
local captcha_options = module:get_option("captcha_options", {}); local nodeprep = require "util.encodings".stringprep.nodeprep; local usermanager = require "core.usermanager"; local http = require "net.http"; local path_sep = package.config:sub(1,1); module:depends"http"; local extra_fields = { nick = true; name = ...
mit
phi-psi/luci
contrib/luadoc/lua/luadoc/taglet/standard.lua
93
16319
------------------------------------------------------------------------------- -- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $ ------------------------------------------------------------------------------- local assert, pairs, tostring, type = assert, pairs, tostring, type local io = require "io...
apache-2.0
mixflowtech/logsensor
src/program/lgs/agent/agent.lua
1
2705
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local lib = require("core.lib") local stdin_app = require("apps.basic.stdin") local basic_app = require("apps.basic.basic_apps") local cli_engine_app = require("apps.cli.cli") local pcap = require("apps.pcap.pc...
apache-2.0
lev1976g/NoxicCore
src/scripts/lua/Stable Scripts/Outland/Zul'Aman/BOSS_HexLordMalacrass.lua
30
22440
--[[*************************** * .-. * * `-.. ..-. + + * * `-''-'' ' * * OpenSource Scripting * * Team * * http://sunplusplus.info * * * *************************** This software is provided as free and open source by the staff o...
agpl-3.0
ArchShaman/Zero-K
LuaUI/Utilities/engine_range_circles.lua
4
3082
-- emulates engine range circles. By very_bad_soldier and versus666 local max = math.max local abs = math.abs local cos = math.cos local sin = math.sin local sqrt = math.sqrt local pi = math.pi local spGetGroundHeight = Spring.GetGroundHeight local function GetRange2DWeapon(range, yDiff) local root1 = r...
gpl-2.0
ArchShaman/Zero-K
effects/riotball.lua
2
7317
return { ["riotball"] = { usedefaultexplosions = false, groundflash = { alwaysvisible = false, circlealpha = 0.2, circlegrowth = 13.2, flashalpha = 0.2, flashsize = 500, ttl = 24, color = { [1] = 0.3, ...
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/tipdispenser.lua
5
15986
local widgetName = "Automatic Tip Dispenser" local playerID = Spring.GetMyPlayerID() local rank = playerID and select(9, Spring.GetPlayerInfo(playerID)) function widget:GetInfo() return { name = widgetName, desc = "v0.4 Teach you to play the game, one tip at a time", author = "KingRaptor; original by zwzsg", ...
gpl-2.0
jchuang1977/my_luci
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
86
1449
--[[ Luci statistics - df plugin diagram definition (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....
apache-2.0
hacker44-h44/1456
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
d9magai/freeciv
dependencies/tolua-5.2/src/bin/lua/typedef.lua
14
1584
-- tolua: typedef class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: typedef.lua,v 1.3 2009/11/24 16:45:15 fabraham Exp $ -- 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 pro...
gpl-2.0
mk12/dotfiles
.config/hammerspoon/init.lua
1
21899
-- ========== Globals ========================================================== local log = hs.logger.new("init", "info") -- ========== Utilities ======================================================== -- Executes a command with the user profile (/etc/profile and ~/.profile) so -- that PATH and other environment v...
mit
liangjz92/deep_cqa
novel_model/sat4.lua
1
11306
--[[ 在bilstm上添加自我attention的参数 autor: liangjz 2016-1-24 --]] local Sat = torch.class('Sat4') function Sat:__init(useGPU) self.cfg = { vecs = nil, dict = nil, emd = nil, dim = deep_cqa.config.emd_dim, --词向量的维度 mem = 5, --Memory的维度 gpu = useGPU or false, --是否使用gpu模式 dp = 0.5, margin = 0.1, l2 = 0, -...
apache-2.0
PratikHackTR/BolStudio
PH-Katarina[TR].lua
1
22935
--[[ PH - Katarina Script Version : 3.6.0 --HeroName :Katarina Scripter : PratikHack ======================================================================== Ozellikler : * Ks atmak icin Profesyonel zamanlamada Otomatik skill kull...
gpl-3.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_simple_settings.lua
4
6542
function widget:GetInfo() return { name = "Simple Settings", desc = "Creates and manages the simple settings for simple settings mode.", author = "GoogleFrog", date = "1 June 2017", license = "GNU GPL, v2 or later", layer = 0, enabled = true, handler = true, } end local t...
gpl-2.0
koosemose/ProjectPorcupine
Assets/StreamingAssets/LUA/Overlay.lua
8
1991
-- Example of overlay function -- Input: tile, the current tile for which the -- overlay wants to display the data -- Input: world, world class -- Return: an integer (by default should be scaled between 0 and 255) function oxygenValueAt(tile) if tile == nil then return 0 end room = tile.room if ...
gpl-3.0
Siapran/discord-biobot
deps/discordia/extensions.lua
1
4256
local random = math.random local insert, remove, sort = table.insert, table.remove, table.sort local gmatch, match, byte = string.gmatch, string.match, string.byte local format, rep, find = string.format, string.rep, string.find local min, max = math.min, math.max local ceil, floor = math.ceil, math.floor -- gl...
mit
ArchShaman/Zero-K
LuaRules/Gadgets/weapon_projectile_retarget.lua
2
5435
function gadget:GetInfo() return { name = "Projectile Retarget", desc = "Retargets newly created projectiles and implements burnblow.", author = "Google Frog", date = "10 June 2014", license = "GNU GPL, v2 or later", layer = 0, enabled = true, } end -----------...
gpl-2.0
Iamgoofball/tcf-gmod
tcf_base/gamemode/client/cl_scoreboard.lua
4
7102
local x = ScrW() local y = ScrH() -- Scoreboard -- surface.CreateFont( "ScoreboardFont", { font = "Tehoma", size = 15, weight = 600, antialias = true, }) surface.CreateFont( "ScoreboardInfo", { font = "Roboto", size = 25, weight = 600, antialias = true, }) local alpha = 0 function GM:ScoreboardShow() self....
agpl-3.0
cantsin/lua-transducers
transformers.lua
1
1104
-- a transformer protocol must have: -- init (no arity) -- step (two arity) -- complete (one arity) local append = (function() return { init = function() return {} end, step = function(tbl, result) table.insert(tbl, result) return tbl end, complete = function(result) return result ...
mit
ArchShaman/Zero-K
LuaUI/Widgets/unit_transport_ai.lua
1
32841
-- $Id: unit_transport_ai.lua 4460 2009-04-20 20:36:16Z licho $ include("keysym.h.lua") function widget:GetInfo() return { name = "Transport AI", desc = "Automatically transports units going to factory waypoint.\n" .. "Adds embark=call for transport and disembark=unload from transport command", ...
gpl-2.0
alarouche/premake-core
tests/base/test_table.lua
18
1436
-- -- tests/base/test_table.lua -- Automated test suite for the new table functions. -- Copyright (c) 2008-2013 Jason Perkins and the Premake project -- local suite = test.declare("table") local t -- -- table.contains() tests -- function suite.contains_OnContained() t = { "one", "two", "three" } test.istru...
bsd-3-clause
focusworld/big
plugins/admin.lua
1
7289
local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) set_profile_photo(file, ok_cb, false) send_large_msg(rec...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/weapon_shield_merge.lua
2
11666
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
carvalhorafael/JogoDaVelha
tabuleiro-class.lua
1
3924
-- Jogo da Velha-OO -- Classe Tabuleiro -- @author Rafael Carvalho -- @version 3.0 -- @Images Logos Crystal Clear (http://commons.wikimedia.org/wiki/Crystal_Clear) -- Copyright (C) 2009 Peta5 - Telecomunicacoes e Software Livre (www.peta5.com.br) -- -- This Game is free software; you can redistribute it and/or -- modi...
gpl-2.0
dangersos/fffff
plugins/stats.lua
458
4098
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 5 local TIME_CHECK = 4 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name....
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/chili_new/controls/imagelistview.lua
10
6831
--//============================================================================= --- ImageListView module --- ImageListView fields. -- Inherits from LayoutPanel. -- @see layoutpanel.LayoutPanel -- @table ImageListView -- @string[opt=""] dir initial directory -- @tparam {func1,func2,...} OnDirChange table of function...
gpl-2.0
ralic/wireshark
test/lua/gregex.lua
29
8743
-- Tests for GLib Regex functions -- written by Hadriel Kaplan, based on Lrexlib's test suite -- This is a test script for tshark/wireshark. -- This script runs inside tshark/wireshark, so to run it do: -- tshark -r empty.cap -X lua_script:<path_to_testdir>/lua/gregex.lua -X lua_script1:glib -- -- if you have to give ...
gpl-2.0
celeron55/buildat
games/entitytest/main/client_lua/init.lua
1
2102
-- Buildat: entitytest/client_lua/init.lua -- http://www.apache.org/licenses/LICENSE-2.0 -- Copyright 2014 Perttu Ahola <celeron55@gmail.com> -- Copyright 2014 Břetislav Štec <valsiterb@gmail.com> local log = buildat.Logger("entitytest") local dump = buildat.dump local cereal = require("buildat/extension/cereal") local...
apache-2.0
ArchShaman/Zero-K
LuaRules/Configs/StartBoxes/Deserted Third v4.lua
11
4722
return { [0] = { boxes = { { {1758, 395}, {1748, 391}, {1737, 392}, {1727, 394}, {1716, 396}, {1688, 401}, {1637, 409}, {1614, 412}, {1590, 412}, {1554, 408}, {1527, 407}, {1499, 413}, {1454, 424}, {1415, 439}, {1350, 468}, {1321, 486}, {1305, 50...
gpl-2.0
fuhongxue/skybox
lib/app.lua
2
8985
------------------------------------------- -- Module table ------------------------------------------- local _M = {} ------------------------------------------- -- Define global shortcuts ------------------------------------------- _M.deviceID = system.getInfo('deviceID') if system.getInfo('environment') ~= 'simulat...
mit
mixflowtech/logsensor
src/lib/protocol/icmp/nd/options/tlv.lua
6
2178
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local ffi = require("ffi") local tlv = subClass(nil) ffi.cdef[[ typedef struct { uint8_t type; uint8_t length; } tlv_t __attribute__((packed)) ]] local tlv_t = ffi.typeof("tlv_t")...
apache-2.0
gevero/S4
examples/convergence/resonance_pos/ref.lua
7
2804
pcall(loadstring(S4.arg)) if not NG then NG = 10 end nset = 3 Svec = {} -- Bottom pane of Fig. 12 in -- Shanhui Fan and J. D. Joannopoulos, -- "Analysis of guided resonances in photonic crystal slabs", -- Phys. Rev. B, Vol. 65, 235112 --function make_sims() local S = S4.NewSimulation() S:SetLattice(...
gpl-2.0
ArchShaman/Zero-K
scripts/spideremp.lua
16
4422
include "constants.lua" include "spider_walking.lua" -------------------------------------------------------------------------------- -- pieces -------------------------------------------------------------------------------- local body = piece 'body' local turret = piece 'turret' local gun = piece 'gun' local flare...
gpl-2.0
linearregression/sysdig
userspace/sysdig/chisels/v_files.lua
8
3132
--[[ Copyright (C) 2013-2015 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
gpl-2.0
calmjm/esp8266
lua/init_jarvi_ds1820.lua
1
1928
ABORT_PIN = 5 -- gpio14 LED_PIN = 3 -- gpio0 function startup() led_state = 0 counter = 0 -- wifi.sta.setip({ip="192.168.2.14", netmask="255.255.255.0", gateway="192.168.2.1"}) uart.setup(0, 9600, 8, 0, 1, 1) gpio.mode(ABORT_PIN, gpio.INPUT, gpio.PULLUP) gpio.mode(LED_PIN, gpio.OUTPUT) gpio...
apache-2.0
LuckyGameCn/LHCocosGame
cocos2d/tests/lua-tests/src/ZwoptexTest/ZwoptexTest.lua
16
4398
local scheduler = cc.Director:getInstance():getScheduler() -------------------------------------------------------------------- -- -- ZwoptexGenericTest -- -------------------------------------------------------------------- local function ZwoptexGenericTest() local ret = createTestLayer("Zwoptex Tests", ...
mit
LinusU/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
ioiasff/poi
groupmanagerchat.lua
14
16269
-- data saved to data/moderation.json do local function gpadd(msg) -- because sudo are always has privilege if not is_sudo(msg) then return nil end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)] then return 'Group is already added.' end -- create data array in mode...
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_hide_interface_action.lua
5
2637
function widget:GetInfo() return { name = "Hide Interface and Mouse Cursor", desc = "Implements a hide interface action as well as mouse cursor sets.", author = "CarRepairer", date = "2012-01-11", license = "GNU GPL, v2 or later", layer = -100000, enabled = true, ...
gpl-2.0
HigorMenezes/Tank-vs-Rokets
cannon.lua
1
1413
require("bullet") Cannon = {} local cd = 0 function Cannon:load() self.imgCannon = love.graphics.newImage("_img/cannon.png") self.r = 0 self.ox = self.imgCannon:getWidth() / 2 self.oy = self.imgCannon:getHeight() * 0.62 self.dir = {x = love.mouse.getX() - Tank.x,...
unlicense
ArchShaman/Zero-K
LuaRules/Gadgets/unit_target_priority.lua
3
14767
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
erwincoumans/premake-dev-iphone-xcode4
tests/test_string.lua
84
1550
-- -- tests/test_string.lua -- Automated test suite for the new string functions. -- Copyright (c) 2008 Jason Perkins and the Premake project -- T.string = { } -- -- string.endswith() tests -- function T.string.endswith_ReturnsTrue_OnMatch() test.istrue(string.endswith("Abcdef", "def")) end function T.strin...
bsd-3-clause
RedCraneStudio/redcrane-engine
src/lua/redcrane.lua
1
6593
-- Copyright (c) 2015 Luke San Antonio -- All rights reserved. local ffi = require("ffi") local rc = {} function rc:init(config) self.engine = self.engine or ffi.gc(ffi.C.redc_init_engine(config), ffi.C.redc_uninit_engine) self.scene = require("scene") self.mesh ...
bsd-3-clause
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/TextField.lua
3
6057
-------------------------------- -- @module TextField -- @extend Widget -------------------------------- -- @function [parent=#TextField] setAttachWithIME -- @param self -- @param #bool bool -------------------------------- -- @function [parent=#TextField] getFontSize -- @param self -- @return int#int ret ...
mit
piller187/LeadwerksComponentSystem
LcsSample/scripts/LCS/Templates/ENTITY.lua
1
4247
---------------------------------------------- -- Leadwerks Component System -- http://leadwerks.com -- - - - - - - - - - - - - - - - - - - - - - - -- Free to use for all Leadwerks owners -- and as always we take no responsibility -- for anything that the usage of this can -- cause directly or indirectly. -- -...
gpl-3.0
LinusU/nn
SparseJacobian.lua
61
8618
nn.SparseJacobian = {} function nn.SparseJacobian.backward (module, input, param, dparam) local doparam = 0 if param then doparam = 1 end -- output deriv module:forward(input) local dout = module.output.new():resizeAs(module.output) -- 1D view local sdout = module.output.new(dout:stor...
bsd-3-clause
turingbot/BDReborn
plugins/msg-checks.lua
26
13860
--Begin msg_checks.lua By @SoLiD local function pre_process(msg) local data = load_data(_config.moderation.data) local chat = msg.to.id local user = msg.from.id local is_channel = msg.to.type == "channel" local is_chat = msg.to.type == "chat" local auto_leave = 'auto_leave_bot' local hash = "gp_lang:"..chat local lang ...
gpl-3.0
jchuang1977/my_luci
applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-codec.lua
80
2172
--[[ 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...
apache-2.0
mixflowtech/logsensor
src/program/snabbnfv/neutron2snabb/neutron2snabb_schema.lua
15
2033
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. -- neutron2snabb_schema: Scan mysqldump SQL files for schema informaion module(..., package.seeall) local lib = require("core.lib") function read (directory, tables) local schema = {} for _, t in ipairs(tables) do schema[t] = ...
apache-2.0
celeron55/buildat
client/init.lua
1
2316
-- Buildat: client/init.lua -- http://www.apache.org/licenses/LICENSE-2.0 -- Copyright 2014 Perttu Ahola <celeron55@gmail.com> buildat = {safe = {}} function buildat.bytes(data) local result = {} for i=1,#data do table.insert(result, string.byte(data, i)) end return result end buildat.safe.bytes = buildat.bytes ...
apache-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/unit_self_destruct.lua
4
2838
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
ktosiu/nodemcu-firmware
lua_examples/yet-another-ds18b20.lua
79
1924
------------------------------------------------------------------------------ -- DS18B20 query module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- -- Example: -- dofile("ds18b20.lua").read(4, function(r) for k, v in pairs(r) do print(k, v) end end) ------------------...
mit
cyborgize/love
src/scripts/nogame.lua
1
54395
--[[ Copyright (c) 2006-2015 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial ...
gpl-3.0
DBReinitialized/PigBot
Source/deps/discordia/containers/snowflakes/channels/TextChannel.lua
1
6323
local Channel = require('../Channel') local Message = require('../Message') local OrderedCache = require('../../../utils/OrderedCache') local fs = require('coro-fs') local http = require('coro-http') local pathjoin = require('pathjoin') local clamp = math.clamp local format = string.format local readFile = fs.readFil...
mit
mixflowtech/logsensor
src/program/packetblaster/replay/replay.lua
14
1568
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local config = require("core.config") local basic_apps = require("apps.basic.basic_apps") local main = require("core.main") local PcapReader = require("apps.pcap.pcap").PcapReader local lib = re...
apache-2.0
brahmi2/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
ArchShaman/Zero-K
LuaRules/Gadgets/weapon_hide_sniper.lua
5
1337
if gadgetHandler:IsSyncedCode() then return end function gadget:GetInfo() return { name = "Model projectiles only visible to own allyteam", layer = 0, enabled = false, } end local hideWeaponDefs = {} for i = 1, #WeaponDefs do local wd = WeaponDefs[i] if wd and wd.customParams and wd.customParams.hide_...
gpl-2.0
ryanplusplus/xlua
exercises/crypto-square/example.lua
3
1231
local function normalized_plaintext(plaintext) return plaintext:lower():gsub('%p*%s*', '') end local function size(plaintext) return math.ceil(math.sqrt(#normalized_plaintext(plaintext))) end local function segments(plaintext) local normalized_plaintext = normalized_plaintext(plaintext) local segment_size = s...
mit
Endres/lcd-nextstop
nodemcu/init.lua
1
4715
CONFIG = require("config") require("nettools") local wifiUp = false -- Debug printf if CONFIG.debug == "file" or CONFIG.debug == "serial" then function dprint(str, ...) if CONFIG.debug == "file" then -- TODO: Buffering? The flash has limited write cycles! Also, increase speed! file.open("debug.txt...
gpl-3.0
sinavafa/ERRORTG
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
ioiasff/poi
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
webbuddy/ifalcon
Data/Scripts/socket.lua
146
4061
----------------------------------------------------------------------------- -- LuaSocket helper module -- Author: Diego Nehab -- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $ ----------------------------------------------------------------------------- -----------------------------------------------...
gpl-3.0
Corvass/BorrowedTime
Libs/LibMagicUtil-1.0/Locales/Locale-zhTW.lua
1
1275
local L = LibStub("AceLocale-3.0"):NewLocale("LibMagicUtil-1.0", "zhTW") if not L then return end -- To help localize LibMagicUtil-1.0 please enter phrase translations on the -- following URL: -- http://www.wowace.com/projects/libmagicutil-10/localization/ -- This file should not be edited manually! L["Background Col...
gpl-3.0
thisverygoodhhhh/orange
orange/plugins/dynamic_ssl/redis.lua
1
1965
-- -- Created by IntelliJ IDEA. -- User: soul11201 <soul11201@gmail.com> -- Date: 2017/5/19 -- Time: 10:34 -- To change this template use File | Settings | File Templates. -- local redis = require "resty.redis" local log = require "orange.plugins.dynamic_ssl.logger" local errlog = log.errlog local config = context.co...
mit
mixflowtech/logsensor
src/program/packetblaster/packetblaster.lua
5
2357
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local engine = require("core.app") local timer = require("core.timer") local lib = require("core.lib") local pci = require("lib.hardware.pci") local LoadGen = require("apps.intel.loadgen").L...
apache-2.0
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/Follow.lua
6
1204
-------------------------------- -- @module Follow -- @extend Action -------------------------------- -- @function [parent=#Follow] setBoudarySet -- @param self -- @param #bool bool -------------------------------- -- @function [parent=#Follow] isBoundarySet -- @param self -- @return bool#bool ret (return ...
mit
phi-psi/luci
modules/admin-mini/luasrc/controller/mini/index.lua
79
1429
--[[ 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...
apache-2.0
xzzz9097/android_external_skia
tools/lua/bitmap_statistics.lua
207
1862
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 local canvas = nil local num_perspective_bitmaps = 0 local num_affine_bitmaps = 0 local num_scaled_bitmaps = 0 loc...
bsd-3-clause
androidarmv6/android_external_skia
tools/lua/bitmap_statistics.lua
207
1862
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 local canvas = nil local num_perspective_bitmaps = 0 local num_affine_bitmaps = 0 local num_scaled_bitmaps = 0 loc...
bsd-3-clause
ArchShaman/Zero-K
scripts/hoveraa.lua
11
1989
local base = piece 'base' local body = piece 'body' local turret = piece 'turret' local ground1 = piece 'ground1' local missile = piece 'missile' local firepoint = piece 'firepoint' local wakes = {} for i = 1, 8 do wakes[i] = piece ('wake' .. i) end include "constants.lua" local SIG_MOVE = 1 local SIG_AIM = 2...
gpl-2.0
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/Slider.lua
3
3873
-------------------------------- -- @module Slider -- @extend Widget -------------------------------- -- @function [parent=#Slider] setPercent -- @param self -- @param #int int -------------------------------- -- @function [parent=#Slider] loadSlidBallTextureDisabled -- @param self -- @param #string str --...
mit
Corvass/BorrowedTime
Libs/LibButtonFacade/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
65
4515
--[[----------------------------------------------------------------------------- DropdownGroup Container Container controlled by a dropdown on the top. -------------------------------------------------------------------------------]] local Type, Version = "DropdownGroup", 21 local AceGUI = LibStub and LibStub("AceGUI-...
gpl-3.0
amirquick/quick
plugins/welcome.lua
1
12752
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
jchuang1977/my_luci
applications/luci-vnstat/luasrc/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...
apache-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/unit_AA_overkill_control.lua
5
5818
local versionNumber = "v0.1" function gadget:GetInfo() return { name = "AA overkill control", desc = versionNumber .. " Managed Allowed Weapon Target for Defender, Hacksaw, Chainsaw and Artemis to prevent overkill", author = "Jseah", date = "03/05/13", license = "GNU GPL, v2 o...
gpl-2.0
piller187/LeadwerksComponentSystem
LcsSample/scripts/LCS/EventManager.lua
1
4680
---------------------------------------------- -- Leadwerks Component System -- http://leadwerks.com -- - - - - - - - - - - - - - - - - - - - - - - -- Free to use for all Leadwerks owners -- and as always we take no responsibility -- for anything that the usage of this can -- cause directly or indirectly. -- -...
gpl-3.0
ArchShaman/Zero-K
LuaUI/Widgets/map_draw_blocker.lua
17
9188
function widget:GetInfo() return { name = "Map Draw Blocker", desc = "blocks map draws from spamers", author = "SirMaverick", date = "2010", license = "GNU GPL, v2 or later", layer = 0, enabled = false, } end local GetPlayerList = Spring.GetPlayerList local GetPlayerInfo = S...
gpl-2.0
linearregression/sysdig
userspace/sysdig/chisels/v_io_by_type.lua
8
2486
--[[ Copyright (C) 2013-2015 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
gpl-2.0
phi-psi/luci
libs/web/luasrc/http/protocol.lua
55
18445
--[[ HTTP protocol implementation for LuCI (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/licen...
apache-2.0
ArchShaman/Zero-K
LuaUI/Widgets/unit_building_starter.lua
2
4101
-- $Id$ function widget:GetInfo() return { name = "Building Starter", desc = "v2 Hold Q to queue a building to be started and not continued.", author = "Google Frog", date = "Dec 13, 2008", license = "GNU GPL, v2 or later", layer = 5, enabled = true -- loaded by default? } e...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/CAI/UnitListHandler.lua
9
7357
--[[ Handles Lists of Units * Create as a list of unit with some local functions. * Can get total unit cost, a random unit, units in area etc.. * Elements can have custom data. == CreateUnitList(losCheckAllyTeamID) losCheckAllyTeamID is the point of view that the return functions should take regarding LOS. A non...
gpl-2.0
db260179/openwrt-bpi-r1-packages
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interfaceconfig.lua
74
7228
-- ------ extra functions ------ -- function interfaceCheck() metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. arg[1] .. ".metric")) if metricValue == "" then -- no metric errorNoMetric = 1 else -- if metric exists create list of interface metrics to compare against for duplicates uci.cursor()...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/unit_stockpile.lua
2
5356
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function gadget:GetInfo() return { name = "Stockpile", desc = "Partial reimplementation of stockpile system.", author = "Google Fr...
gpl-2.0
thisverygoodhhhh/orange
orange/utils/utils.lua
2
5833
-- general utility functions. -- some functions is from [kong](getkong.org) local require = require local uuid = require("orange.lib.jit-uuid") local date = require("orange.lib.date") local type = type local pcall = pcall local pairs = pairs local tostring = tostring local string_gsub = string.gsub local string_find = ...
mit
ArchShaman/Zero-K
LuaUI/Widgets/COFCtools/Interpolate.lua
9
11346
--a workaround for https://springrts.com/mantis/view.php?id=4650 local spGetCameraState = Spring.GetCameraState local spSetCameraState = Spring.SetCameraState local spGetTimer = Spring.GetTimer local spDiffTimers = Spring.DiffTimers local mathPi = math.pi local pow = math.pow lockMode = { xy = 1, free = 2, x...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Configs/StartBoxes/Comet Catcher Redux.lua
17
1056
return { [0] = { nameLong = "North", nameShort = "N", startpoints = { {3072,614}, {5120,614}, {1024,614}, }, boxes = { { {0,0}, {6144,0}, {6144,1229}, {0,1229}, }, }, }, [1] = { nameLong = "South", nameShort = "S", startpoints = { {3072,7578}, {1024,7578}, {5...
gpl-2.0
phi-psi/luci
applications/luci-coovachilli/luasrc/model/cbi/coovachilli_network.lua
79
1639
--[[ 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...
apache-2.0
ArchShaman/Zero-K
scripts/hoverskirm.lua
2
3939
include "constants.lua" include "rockPiece.lua" local base = piece 'base' local front = piece 'front' local turret = piece 'turret' local lbarrel = piece 'lbarrel' local rbarrel = piece 'rbarrel' local lflare = piece 'lflare' local rflare = piece 'rflare' local exhaust = piece 'exhaust' local wakes = {} for i =...
gpl-2.0
Corvass/BorrowedTime
Locales/enUS.lua
1
5529
-- Generated by Babelfish script, do not add strings manually, only translate existing strings. -- This is the base locale; values can be "true" so they default to their key, or any string to override that behaviour. local L = LibStub("AceLocale-3.0"):NewLocale("BorrowedTime", "enUS", true) L["Add a new bar"] = true ...
gpl-3.0
Phanx/oUF
elements/cpoints.lua
6
2549
--[[ Element: Combo Point Icons Toggles visibility of the player and vehicles combo points. Widget CPoints - An array consisting of five UI widgets. Notes The default combo point texture will be applied to textures within the CPoints array that don't have a texture or color defined. Examples local CPoin...
mit
ArchShaman/Zero-K
LuaRules/Gadgets/ceasefire2.lua
5
11134
function gadget:GetInfo() return { name = "Ceasefires2", desc = "Handles reciprocating ceasefires with a voting system.", author = "CarRepairer", date = "2011-06-25", license = "GNU GPL, v2 or later", layer = 1, enabled = false -- loaded by default? } end local...
gpl-2.0
remram44/bomberlua
bots/test.lua
1
1951
function can_go(direction, bomber, map) if direction == "right" and (map[(bomber.posx + 1) .. "," .. bomber.posy] == "empty") then return true elseif direction == "up" and (map[bomber.posx .. "," .. (bomber.posy - 1)] == "empty") then return true elseif direction == "left" ...
mit