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
mqmaker/witi-openwrt
package/ramips/ui/luci-mtk/src/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-format.lua
80
3636
--[[ 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
stanfordhpccenter/soleil-x
testcases/legacy/taylor_with_particles/taylor_green_vortex_1024_1024_512.lua
1
4179
-- This is a Lua config file for the Soleil code. return { xnum = 1024, -- number of cells in the x-direction ynum = 1024, -- number of cells in the y-direction znum = 512, -- number of cells in the z-direction -- if you increase the cell number and the calculation diverges -- right away, decrease the time...
gpl-2.0
bigdogmat/wire
lua/entities/gmod_wire_egp/lib/init.lua
18
1289
EGP = {} -------------------------------------------------------- -- Include all other files -------------------------------------------------------- function EGP:Initialize() local Folder = "entities/gmod_wire_egp/lib/egplib/" local entries = file.Find( Folder .. "*.lua", "LUA") for _, entry in ipairs( entries ) ...
apache-2.0
FrisKAY/MineOS_Server
Installer/Installer.lua
1
13345
local component = require("component") local computer = require("computer") local term = require("term") local unicode = require("unicode") local event = require("event") local fs = require("filesystem") local internet = require("internet") local seri = require("serialization") local gpu = component.gpu --------------...
gpl-3.0
czlc/skynet
lualib/skynet/cluster.lua
1
1702
local skynet = require "skynet" local clusterd local cluster = {} function cluster.call(node, address, ...) -- skynet.pack(...) will free by cluster.core.packrequest return skynet.call(clusterd, "lua", "req", node, address, skynet.pack(...)) end function cluster.send(node, address, ...) -- push is the same with r...
mit
mahdikord/baran
plugins/gnuplot.lua
622
1813
--[[ * Gnuplot plugin by psykomantis * dependencies: * - gnuplot 5.00 * - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html * ]] -- Gnuplot needs absolute path for the plot, so i run some commands to find where we are local outputFile = io.popen("pwd","r") io.input(outputFile...
gpl-2.0
LuaDist2/lrexlib-tre
test/emacs_sets.lua
9
1481
-- See Copyright Notice in the file LICENSE local luatest = require "luatest" local N = luatest.NT local unpack = unpack or table.unpack local function norm(a) return a==nil and N or a end local function set_f_gmatch (lib, flg) -- gmatch (s, p, [cf], [ef]) local function test_gmatch (subj, patt) local out, g...
mit
mahdikord/baran
plugins/quotes.lua
651
1630
local quotes_file = './data/quotes.lua' local quotes_table function read_quotes_file() local f = io.open(quotes_file, "r+") if f == nil then print ('Created a new quotes file on '..quotes_file) serialize_to_file({}, quotes_file) else print ('Quotes loaded: '..quotes_file) f...
gpl-2.0
MonkeyFirst/DisabledBoneSlerpWithShadowedAnimation
bin/Data/LuaScripts/39_CrowdNavigation.lua
3
24869
-- CrowdNavigation example. -- This sample demonstrates: -- - Generating a dynamic navigation mesh into the scene -- - Performing path queries to the navigation mesh -- - Adding and removing obstacles/agents at runtime -- - Raycasting drawable components -- - Crowd movement management -- - Acces...
mit
4w/xtend
xfurniture/init.lua
1
1820
_xtend.init() -- Load modpath for multiple uses local modpath = _xtend.mods.xfurniture.modpath..DIR_DELIM -- Load options _xtend.mods.xfurniture.crafting_addition = { id = 'xfurniture:crafting_addition', amount = 2, recipe = {'default:cobble', 'default:dirt', 'default:dirt'}, name = _xtend.translate(...
gpl-3.0
bigdogmat/wire
lua/effects/thruster_ring.lua
10
1604
EFFECT.Mat = Material( "effects/select_ring" ) /*--------------------------------------------------------- Initializes the effect. The data is a table of data which was passed from the server. ---------------------------------------------------------*/ function EFFECT:Init( data ) local size = 16 self:SetCo...
apache-2.0
cpascal/skynet
lualib/mysql.lua
31
15725
-- Copyright (C) 2012 Yichun Zhang (agentzh) -- Copyright (C) 2014 Chang Feng -- This file is modified version from https://github.com/openresty/lua-resty-mysql -- The license is under the BSD license. -- Modified by Cloud Wu (remove bit32 for lua 5.3) local socketchannel = require "socketchannel" local mysqlaux = req...
mit
mqmaker/witi-openwrt
package/ramips/ui/luci-mtk/src/applications/luci-statistics/luasrc/statistics/rrdtool.lua
69
15320
--[[ Luci statistics - rrdtool interface library / diagram model interpreter (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 ...
gpl-2.0
tianxiawuzhei/cocos-quick-lua
quick/framework/shortcodes.lua
19
13473
--[[ 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, dis...
mit
czlc/skynet
examples/login/logind.lua
1
2435
local login = require "snax.loginserver" local crypt = require "skynet.crypt" local skynet = require "skynet" local server = { host = "127.0.0.1", port = 8001, multilogin = false, -- disallow multilogin name = "login_master", -- ²»ÒªºÍ skynet ÆäËü·þÎñÖØÃû } local server_list = {} local user_online = {} local user...
mit
robert00s/koreader
frontend/ui/gesturerange.lua
7
2083
local TimeVal = require("ui/timeval") local GestureRange = { -- gesture matching type ges = nil, -- spatial range limits the gesture emitting position range = nil, -- temproal range limits the gesture emitting rate rate = nil, -- scale limits of this gesture scale = nil, } function Ges...
agpl-3.0
Movimento5StelleLazio/WebMCP
framework/env/ui/form_element.lua
3
2498
--[[-- ui.form_element( args, -- external arguments { -- options for this function call fetch_value = fetch_value_flag, -- true causes automatic determination of args.value, if nil fetch_reco...
mit
bigdogmat/wire
lua/wire/stools/turret.lua
1
4086
WireToolSetup.setCategory( "Other" ) WireToolSetup.open( "turret", "Turret", "gmod_wire_turret", nil, "Turrets" ) -- Precache these sounds.. Sound( "ambient.electrical_zap_3" ) Sound( "NPC_FloorTurret.Shoot" ) -- Add Default Language translation (saves adding it to the txt files) if CLIENT then language.Add( "tool.w...
apache-2.0
Weol/WUMA
lua/wuma/hooks.lua
1
7842
WUMA = WUMA or {} --Hooks WUMA.USERRESTRICTIONADDED = "WUMAUserRestrictionAdded" WUMA.USERRESTRICTIONREMOVED = "WUMAUserRestrictionRemoved" function WUMA.PlayerSpawnSENT(ply, sent) --WUMADebug("WUMA.PlayerSpawnSENT(%s, %s)", tostring(ply) or "NIL", tostring(sent) or "NIL") if not ply or not sent then retu...
apache-2.0
dicebox/minetest-france
mods/moreblocks/crafting.lua
1
10671
--[[ More Blocks: crafting recipes Copyright (c) 2011-2015 Calinou and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] minetest.register_craft({ output = "default:stick", recipe = {{"default:dry_shrub"},} }) minetest.register_craft({ output = "default:stick", recipe = {{"...
gpl-3.0
silverhammermba/awesome
spec/awful/keyboardlayout_spec.lua
11
3466
--------------------------------------------------------------------------- -- @author Uli Schlachter -- @copyright 2015 Uli Schlachter and Kazunobu Kuriyama --------------------------------------------------------------------------- local kb = require("awful.widget.keyboardlayout") describe("awful.widget.keyboardlay...
gpl-2.0
tianxiawuzhei/cocos-quick-lua
quick/samples/anysdk/src/cocos/extension/DeprecatedExtensionFunc.lua
39
1309
--tip local function deprecatedTip(old_name,new_name) print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") end --functions of CCControl will be deprecated end local CCControlDeprecated = { } function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEve...
mit
cshore/luci
applications/luci-app-privoxy/luasrc/controller/privoxy.lua
23
8560
-- Copyright 2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com> -- Licensed under the Apache License, Version 2.0 module("luci.controller.privoxy", package.seeall) local NX = require "nixio" local NXFS = require "nixio.fs" local DISP = require "luci.dispatcher" local HTTP = require "luci.h...
apache-2.0
jintiao/some-mmorpg
server/lualib/map/quadtree.lua
6
1951
local quadtree = {} local mt = { __index = quadtree } function quadtree.new (l, t, r, b) return setmetatable ({ left = l, top = t, right = r, bottom = b, object = {}, }, mt) end function quadtree:insert (id, x, y) if x < self.left or x > self.right or y < self.top or y > self.bottom then return end if ...
mit
tianxiawuzhei/cocos-quick-lua
quick/samples/luajavabridge/src/scenes/MainScene.lua
2
2040
local MainScene = class("MainScene", function() return display.newScene("MainScene") end) function MainScene:ctor() local btn btn = cc.ui.UIPushButton.new() :setButtonLabel(cc.ui.UILabel.new({text = "call Java - showAlertDialog()", size = 64})) :onButtonClicked(function() ...
mit
mrbangi/mbangi
plugins/spammer.lua
14
75190
local function run(msg) if msg.text == "[!/]spam" and is_sudo(msg) then return "".. [[ ...
gpl-2.0
jonmaur/draggin-framework
samples/8-box2d-rube/main/main.lua
1
1433
-- make sure the draggin framework is found package.path = package.path .. ';' .. os.getenv("DRAGGIN_FRAMEWORK") .. '/src/?.lua' -- makes output work better on most hosts, or when running through Sublime Text. io.stdout:setvbuf("no") local Draggin = require "draggin/draggin" local Display = require "draggin/display" ...
mit
abasshacker/abab
plugins/quran.lua
20
1243
do umbrella = "http://umbrella.shayan-soft.ir/quran/" -- database -- get sound of sura local function read_sura(chat_id, target) local readq = http.request(umbrella.."Sura"..target..".mp3") local url = umbrella.."Sura"..target..".mp3" local file = download_to_file(url) local cb_extra = {file_path=file} return sen...
gpl-2.0
cshore/luci
modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/system.lua
17
5674
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local sys = require "luci.sys" local zones = require "luci.sys.zoneinfo" local fs = require "nixio.fs" local conf = require "luci.config" local m, s, o ...
apache-2.0
guard163/tarantool
test/wal_off/itr_lt_gt.test.lua
6
1034
-- test for https://github.com/tarantool/tarantool/issues/769 s = box.schema.create_space('test') i = s:create_index('primary', { type = 'TREE', parts = {1, 'num', 2, 'num'} }) s:insert{0, 0} s:insert{2, 0} for i=1,10000 do s:insert{1, i} end test_itrs = {'EQ', 'REQ', 'GT', 'LT', 'GE', 'LE'} test_res = {} too_longs = ...
bsd-2-clause
AlexArendsen/computercraft
monitor-wrapper.lua
1
1987
-- Computercraft Monitor Wrapper, written by Alex Arendsen MonitorWrapper = { selector = "top" } function MonitorWrapper:new(o) o = o or {} setmetatable(o, self) self.__index = self o.mon = peripheral.wrap(o.selector) return o end function MonitorWrapper:write (str) self.mon.write(str) end function Mo...
gpl-3.0
Relintai/Relintais-Enemy-Kooldown-Tracker-WotLK
lib/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
68
2216
--[[----------------------------------------------------------------------------- Heading Widget -------------------------------------------------------------------------------]] local Type, Version = "Heading", 20 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or...
mit
cshore/luci
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua
11
15480
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local ut = require "luci.util" local pt = require "luci.tools.proto" local nw = require "luci.model.network" local fw = requ...
apache-2.0
ariakabiryan/tnt_aria_bot
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
jonmaur/draggin-framework
samples/3-text/main/textstate.lua
1
3551
local Draggin = require "draggin/draggin" local Display = require "draggin/display" local TextBox = require "draggin/textbox" local viewport = Display.viewport local virtualWidth = Display.virtualWidth local virtualHeight = Display.virtualHeight local textstate = {} function textstate.new() -- Uncomment this to se...
mit
ShieldTeams/oldsdp
plugins/admin.lua
1
10316
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(receiver, '...
agpl-3.0
abbasgh12345/abbas
plugins/welcome.lua
190
3526
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
bigdogmat/wire
lua/entities/gmod_wire_hologrid.lua
1
1780
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire Holo Grid" ENT.Author = "Chad 'Jinto'" ENT.WireDebugName = "Holo Grid" if CLIENT then return end -- No more client function ENT:Initialize( ) self:PhysicsInit( SOLID_VPHYSICS ); self:SetMoveType( MOVETYPE_VPHYSICS ); self:Se...
apache-2.0
ld-test/oil
lua/oil/corba/services/event/ProxyPushConsumer.lua
7
3053
local oil = require "oil" local oo = require "oil.oo" local assert = require "oil.assert" module("oil.corba.services.event.ProxyPushConsumer", oo.class) -- Proxies are in one of three states: disconnected, connected, or destroyed. -- Push/pull operations are only valid in the...
mit
iceman1001/proxmark3
client/scripts/Legic_clone.lua
1
17251
--[[ script to create a clone-dump with new crc Author: mosci my Fork: https://github.com/icsom/proxmark3.git Upstream: https://github.com/Proxmark/proxmark3.git 1. read tag-dump, xor byte 22..end with byte 0x05 of the inputfile 2. write to outfile 3. set byte 0x05 to newcrc 4. until byte 0x21 plain like i...
gpl-2.0
wrxck/mattata
plugins/administration/allowlist.lua
2
4984
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local allowlist = {} local mattata = require('mattata') local redis = require('libs.redis') function allowlist:init() allowlist.commands = mattata.commands(self.info.username):...
mit
FrisKAY/MineOS_Server
lib/bigLetters.lua
1
10633
local unicode = require("unicode") local buffer = require("doubleBuffering") local bigLetters = {} local pixelHeight = 5 local lettersInterval = 2 local unknownSymbol = "*" local spaceWidth = 2 local letters = { ["0"] = { { 1, 1, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 1, 1 }, }, [...
gpl-3.0
ikekonglp/DiscoParser
torch/tdnn.lua
1
2515
require 'nn' require 'cunn' require 'nngraph' require 'sys' tdnn = {} function tdnn.config(cmd) cmd:option('-vocabSize', 0, 'size of vocabulary') -- Used defaults from Yoon's paper. cmd:option('-embedSize', 300, 'size of embedding vec') cmd:option('-hiddenSize', 100, 'size of hidden layers') cmd:opti...
gpl-2.0
MeGaReborn/megareborn
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-3.0
arventwei/WioEngine
Tools/jamplus/src/luaplus/Src/Modules/socket/test/httptest.lua
19
11480
-- needs Alias from /home/c/diego/tec/luasocket/test to -- "/luasocket-test" and "/luasocket-test/" -- needs ScriptAlias from /home/c/diego/tec/luasocket/test/cgi -- to "/luasocket-test-cgi" and "/luasocket-test-cgi/" -- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth local socket = require("...
mit
parhamhp/supersp
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
dicebox/minetest-france
mods/unified_inventory/register.lua
3
19785
local S = unified_inventory.gettext local F = unified_inventory.fgettext minetest.register_privilege("creative", { description = S("Can use the creative inventory"), give_to_singleplayer = false, }) minetest.register_privilege("ui_full", { description = S("Forces Unified Inventory to be displayed in Full mode if L...
gpl-3.0
skylitedcpp/skylitedcpp
data/luascripts/quiet_login.lua
7
3439
--// quiet_login.lua -- stop spamming logfiles with MOTDs if not dcpp._chat_ready then math.randomseed( os.time() ) dcpp._chat_ready = {} end dcpp._chat_ready.func = function(hub, user, msg, me_msg) if string.find(msg, dcpp._chat_ready[hub]._cookie) then dcpp._chat_ready[hub]._ready = 1 DC():Pr...
gpl-3.0
4w/xtend
xtend_default/init.lua
1
7019
--- Global table definitions. -- -- All functions, variables, and tables are held in a single global table -- prefixed `_xtend` for uniqueness. _xtend = { mods = {} } -- Initiate an xTend based mod. -- -- For loading and parsing the configuration, and setting other stuff, all -- xTend based mods need to initiate ...
gpl-3.0
nielsutrecht/computercraft
hydraapi.lua
1
4253
-- Returns a table with the sides and peripheral types function getPeripheralList() local sides = peripheral.getNames() local pTable = {} for k,side in pairs(sides) do pTable[side] = peripheral.getType(side) end return pTable end -- finds the first peripheral of type 'peripheralType' and wraps i...
mit
jbking/python-stdnet
stdnet/backends/redisb/lua/columnts/reduce.lua
2
1442
local command = ARGV[1] local start = ARGV[2] local stop = ARGV[3] local points = math.max(ARGV[4] + 0, 2) local method = ARGV[5] -- One of 'mean', 'geometric', 'ma' local alpha = ARGV[6] + 0 -- paramether for moving avaerage reduction local num_fields = ARGV[7] local fields = tabletools.slice(ARGV, 8, -1) lo...
bsd-3-clause
pouria346/self2
bot/bot.lua
1
7300
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") require("./bot/permissions") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:...
gpl-2.0
cshore/luci
applications/luci-app-wshaper/luasrc/model/cbi/wshaper.lua
56
1848
-- Copyright 2011 Manuel Munz <freifunk at somakoma dot de> -- Licensed to the public under the Apache License 2.0. require("luci.tools.webadmin") m = Map("wshaper", translate("Wondershaper"), translate("Wondershaper shapes traffic to ensure low latencies for interactive traffic even when your " .. "internet connec...
apache-2.0
adamel/sysdig
userspace/sysdig/chisels/spectrogram.lua
12
4048
--[[ Copyright (C) 2013-2014 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 e...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/modules/admin-full/luasrc/model/cbi/admin_network/wireless.lua
4
4146
--[[ 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
David1Socha/number-nibbler
hump/signal.lua
27
2769
--[[ Copyright (c) 2012-2013 Matthias Richter 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, dis...
mit
cochrane/OpenTomb
scripts/strings/italian/generic.lua
7
3453
-- OPENTOMB GENERIC STRINGS - ENGLISH LANGUAGE -- by Lwmte, Jan 2015 -- Italian Translation by: Nickotte. -------------------------------------------------------------------------------- -- This set of strings is used globally in all engine versions for various -- menu entries, notify pop-ups, inventory entries etc. -...
lgpl-3.0
loringmoore/The-Forgotten-Server
data/migrations/8.lua
57
3350
function onUpdateDatabase() print("> Updating database to version 9 (global inbox)") db.query("CREATE TABLE IF NOT EXISTS `player_inboxitems` (`player_id` int(11) NOT NULL, `sid` int(11) NOT NULL, `pid` int(11) NOT NULL DEFAULT '0', `itemtype` smallint(6) NOT NULL, `count` smallint(5) NOT NULL DEFAULT '0', `attribute...
gpl-2.0
iamliqiang/prosody-modules
mod_swedishchef/mod_swedishchef.lua
32
1690
-- Copyright (C) 2009 Florian Zeitz -- Copyright (C) 2009 Matthew Wild -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- local trigger_string = module:get_option_string("swedishchef_trigger"); trigger_string = (trigger_string and trigger_string .. " "...
mit
m-creations/openwrt
feeds/luci/modules/luci-base/luasrc/tools/webadmin.lua
59
2301
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.tools.webadmin", package.seeall) local util = require "luci.util" local uci = require "luci.model.uci" local ip = require "luci.ip" func...
gpl-2.0
lcheylus/haka
modules/protocol/tcp/tcp_connection.lua
3
16655
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. local class = require("class") local check = require("check") local raw = require("protocol/raw") local ipv4 = requi...
mpl-2.0
sealgair/Jolly-Xanthar
menu/splash.lua
1
1834
class = require 'lib/30log/30log' require "controller" require "direction" require "save" require "utils" Splash = class("Splash") function canContinue() return #Ship.shipNames() > 0 end function Splash:init(fsm) self.fsm = fsm self.background = love.graphics.newImage('assets/Splash.png') self.items = { ...
gpl-3.0
cochrane/OpenTomb
scripts/level/tr4/KARNAK1.lua
2
2776
-- OPENTOMB LEVEL SCRIPT -- FOR TOMB RAIDER 4, KARNAK1 print("Level script loaded (KARNAK1.lua)"); -- STATIC COLLISION FLAGS ------------------------------------------------------ -------------------------------------------------------------------------------- -- PLANT statics (as listed in OBJECTS.H from TRLE) sta...
lgpl-3.0
sajjad94/ASD_KARBALA
plugins/en-me.lua
6
1496
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ BY SAJAD NOORI (@SAJJADNOORI) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ ME BOT : شنو اني ▀▄ ▄▀ ▀▄▀...
gpl-2.0
emptyrivers/WeakAuras2
WeakAurasOptions/SubRegionOptions/SubText.lua
1
16141
if not WeakAuras.IsCorrectVersion() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0") local L = WeakAuras.L local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20 local self_point_types = { BOTTOMLEFT = L...
gpl-2.0
SkyRzn/esp8266_sht10
init.lua
1
1232
server_ip = "192.168.0.66" server_port = 8266 deep_sleep_time = 600 max_connection_attempts = 20 run_cnt = 0 new_settings = nil battery = dofile("battery.lua") collectgarbage() data = dofile("sht1x_v3.lua") temp = (data[1]) hum = (data[2]) data = nil collectgarbage() print(temp, hum) btemp = dofile("ds18b20_v3.lua")...
gpl-2.0
osgcc/ryzom
ryzom/client/data/gamedev/interfaces_v3/taskbar.lua
3
1058
------------------------------------------------------------------------------------------------------------ -- create the game namespace without reseting if already created in an other file. if (game==nil) then game= {}; end -------------------------------------------------------------------------------------------...
agpl-3.0
mofax/cardpeek
dot_cardpeek_dir/scripts/lib/compatibility-with-0.7.lua
17
1952
local DEPRECATED_FUNCS = {} function DEPRECATED_FOR(fname) local func = debug.getinfo(2, "n") local orig = debug.getinfo(3, "lS") if DEPRECATED_FUNCS[func.name]==nil then log.print(log.WARNING,orig.short_src .. "[" .. orig.currentline .. "]: " .. func.name .. "() is deprecated, please use " .. fn...
gpl-3.0
werpat/MoonGen
rfc2544/utils/ssh-freebsd.lua
9
3443
local conf = require "config" local ssh = require "utils.ffi.ssh" local mod = {} mod.__index = mod local session = nil function mod.addInterfaceIP(interface, ip, pfx) return mod.exec("ifconfig " .. interface .. " inet " .. ip .. "/" .. pfx .. " add") end function mod.delInterfaceIP(interface, ip, pfx) r...
mit
iskolbin/luasdl2-bunnymark
bunny.lua
1
2593
local SDL local SDLImage local SDLTtf local window local renderer local bunnyImage local bunnyTexture local bunnyWidth local bunnyHeight local bunnies = {} local running = true local font local textbox local DELTA_TIME = math.floor( 1000 / 60 ) local ticks local dTicks local function addBunny() local w, h = window:g...
mit
cochrane/OpenTomb
scripts/config/control_constants.lua
2
7176
-- OPENTOMB CONTROL CONSTANTS LIST -- by Lwmte, Aug 2013 -------------------------------------------------------------------------------- -- Defines key and action names used with key bindings. -------------------------------------------------------------------------------- KEY_BACKSPACE = 0x08; KEY_TAB = 0x09; KEY_R...
lgpl-3.0
pavel-odintsov/snabbswitch
src/core/link.lua
13
3092
module(...,package.seeall) local debug = _G.developer_debug local shm = require("core.shm") local ffi = require("ffi") local C = ffi.C local packet = require("core.packet") require("core.packet_h") local counter = require("core.counter") require("core.counter_h") require("core.link_h") local band = require("bit")...
apache-2.0
loringmoore/The-Forgotten-Server
data/talkactions/scripts/deathlist.lua
12
2178
local function getArticle(str) return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a" end local function getMonthDayEnding(day) if day == "01" or day == "21" or day == "31" then return "st" elseif day == "02" or day == "22" then return "nd" elseif day == "03" or day == "23" then return "rd" else return "t...
gpl-2.0
Murfalo/game-off-2016
xl/Scene.lua
1
1780
local skiplist = require("libs.skiplist") local __NULL__ = function () end local counter = util.counter() local lessThan = function(a,b) if a.z < b.z then return true elseif a.z==b.z and a.id < b.id then return true else return false end end local MakeNode = function (obj) -- the id field is necessary because, o...
mit
alexd2580/igjam2016
src/lib/push/examples/1/init.lua
1
1344
examples[1] = function () --default example love.graphics.setDefaultFilter("linear", "linear") --default filter local gameWidth, gameHeight = 1080, 720 local windowWidth, windowHeight = love.window.getDesktopDimensions() windowWidth, windowHeight = windowWidth*.5, windowHeight*.5 push:setupScreen(game...
mit
Oxygem/Oxycore
app/object.lua
1
6475
-- Oxypanel Core -- File: app/object.lua -- Desc: generic object handler (mapped to <module>_<object-type> in db) --Localize local ngx = ngx local database, user, request = luawa.database, luawa.user, luawa.request -- Oxy.object local object = {} -- Oxy setup function object:setup() ngx.ctx.objects = {} end --...
mit
oitofelix/mininim
data/sblast/sblast.lua
2
1257
--[[ sblast.lua -- Sound Blaster audio mode; Copyright (C) 2015, 2016, 2017 Bruno Félix Rezende Ribeiro <oitofelix@gnu.org> 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 v...
gpl-3.0
mamaddeveloper/uzz
plugins/quotes.lua
651
1630
local quotes_file = './data/quotes.lua' local quotes_table function read_quotes_file() local f = io.open(quotes_file, "r+") if f == nil then print ('Created a new quotes file on '..quotes_file) serialize_to_file({}, quotes_file) else print ('Quotes loaded: '..quotes_file) f...
gpl-2.0
lcheylus/haka
lib/haka/lua/lua/state_machine.lua
3
6734
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. local state = require("state") -- Hide internals local state_machine = haka.state_machine local state_machine_state ...
mpl-2.0
emptyrivers/WeakAuras2
WeakAurasOptions/BuffTrigger.lua
1
33106
if not WeakAuras.IsCorrectVersion() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; local function getAuraMatchesLabel(name) local ids = WeakAuras.spellCache.GetSpellsMatching(name) if(ids) then local descText = ""; local numMatches = 0; for id, _ in pairs(ids) do nu...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/libs/lucid-rpc/luasrc/lucid/rpc/server.lua
52
8197
--[[ 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$ ]] local ip...
gpl-2.0
spacebuild/sbep
lua/entities/livable_module/init.lua
2
22756
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) util.PrecacheSound( "apc_engine_start" ) util.PrecacheSound( "apc_engine_stop" ) util.PrecacheSound( "common/warning.wav" ) include('shared.lua') function ENT:Initialize() self.BaseClass.Initialize(self) self.Active = 0 self.damaged = 0 self:CreateEnviro...
apache-2.0
deepak78/new-luci
applications/luci-app-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua
68
1039
-- Copyright 2012 Manuel Munz <freifunk at somakoma dot de> -- Licensed to the public under the Apache License 2.0. local uci = require "luci.model.uci".cursor() local dsp = require "luci.dispatcher" local utl = require "luci.util" local widget = uci:get("freifunk-widgets", arg[1], "template") local title = uci:get("f...
apache-2.0
machicao2013/redis-source-annotated
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
iamliqiang/prosody-modules
mod_munin/mod_munin.lua
20
3500
module:set_global(); local s_format = string.format; local array = require"util.array"; local it = require"util.iterators"; local mt = require"util.multitable"; local meta = mt.new(); meta.data = module:shared"meta"; local data = mt.new(); data.data = module:shared"data"; local munin_listener = {}; local munin_comma...
mit
Murfalo/game-off-2016
xl/Text.lua
1
1193
local Transformable = require "xl.Transformable" local Scene = require "xl.Scene" -- function which creates a default font local MakeFont = function (size) return love.graphics.newFont(size) end local DEFAULT_FONT = MakeFont(12) local WHITE = {255,255,255} local Text = Class.create("Text", Transformable, { __lt =...
mit
alirezanile/Newsha
plugins/time.lua
94
3004
-- 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
werpat/MoonGen
rfc2544/utils/ssh.lua
9
3315
local conf = require "config" local ssh = require "utils.ffi.ssh" local mod = {} mod.__index = mod local session = nil function mod.addInterfaceIP(interface, ip, pfx) return mod.exec("ip addr add " .. ip .. "/" .. pfx .. " dev " .. interface) end function mod.delInterfaceIP(interface, ip, pfx) return mo...
mit
xinjuncoding/skynet
test/testsocket.lua
80
1078
local skynet = require "skynet" local socket = require "socket" local mode , id = ... local function echo(id) socket.start(id) while true do local str = socket.read(id) if str then socket.write(id, str) else socket.close(id) return end end end if mode == "agent" then id = tonumber(id) skynet....
mit
otland/forgottenserver
data/talkactions/scripts/ip_ban.lua
6
1155
local ipBanDays = 7 function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local resultId = db.storeQuery("SELECT `name`, `lastip` FROM `players` WHERE `name` = " .. db.escapeString(param)) if not resultId then return false end local targetName = result.getString(res...
gpl-2.0
cjshmyr/OpenRA
mods/d2k/maps/atreides-02b/atreides02b-AI.lua
4
1137
--[[ 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
sajjad94/ASD_KARBALA
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
ferstar/openwrt-dreambox
feeds/luci/luci/luci/modules/admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua
3
3275
--[[ LuCI - Lua Configuration Interface Copyright 2010 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 $Id: mount.lu...
gpl-2.0
maanuair/dotfiles_tmp
home/.hammerspoon/init.lua
1
3485
-- Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Emmanuel Roubion -- -- Author: Emmanuel Roubion -- URL: https://github.com/maanuair/dotfiles -- This file is part of Emmanuel's Roubion dot files, released under -- the MIT License as published by the Massachusetts Institute of Technology -- -- These dotfiles are distr...
mit
vorbi123/larnog
bot/seedbot.lua
24
10036
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 = '1.0' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then retu...
gpl-2.0
GraphicGame/quick-ejoy2d
examples/test_flash_parser/asset/stand.lua
2
3313
return{ { id = 0, name = "stand9.png", { tex = 1, src = {221, 4, 304, 4, 304, 182, 221, 182, }, screen = {896, 192, 2224, 192, 2224, 3040, 896, 3040, } }, type = "picture", }, { id = 1, name = "stand8.png", { tex = 1, src = {310, 4, 392, 4, 392, 181, 310, 181, }, screen = {912, 192, 2224, 19...
mit
rollokb/tsdemuxer
xupnpd/src/plugins/xupnpd_youtube.lua
4
7798
-- Copyright (C) 2011-2013 Anton Burdinuk -- clark15b@gmail.com -- https://tsdemuxer.googlecode.com/svn/trunk/xupnpd -- 18 - 360p (MP4,h.264/AVC) -- 22 - 720p (MP4,h.264/AVC) hd -- 37 - 1080p (MP4,h.264/AVC) hd -- 82 - 360p (MP4,h.264/AVC) stereo3d -- 83 - 480p (MP4,h.264/AVC) hq stereo3d -- 84 - 720p (MP4,h.2...
mit
jp9000/obs-studio
UI/frontend-plugins/frontend-tools/data/scripts/instant-replay.lua
23
5385
obs = obslua source_name = "" hotkey_id = obs.OBS_INVALID_HOTKEY_ID attempts = 0 last_replay = "" ---------------------------------------------------------- function try_play() local replay_buffer = obs.obs_frontend_get_replay_buffer_output() if replay_buffer == nil then obs.remove_current_callback()...
gpl-2.0
iamliqiang/prosody-modules
mod_message_logging/mod_message_logging.lua
32
3943
module:set_global(); local jid_bare = require "util.jid".bare; local jid_split = require "util.jid".split; local stat, mkdir = require "lfs".attributes, require "lfs".mkdir; -- Get a filesystem-safe string local function fsencode_char(c) return ("%%%02x"):format(c:byte()); end local function fsencode(s) return (s:...
mit
jiankers/Atlas
examples/tutorial-basic.lua
37
1739
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0