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
ntop/ntopng
scripts/lua/rest/v1/get/host/custom_data.lua
1
3840
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local json = require ("dkjson") local tracker = require("tracker") local rest_utils = require("rest_utils") -- -- Read information about a host and maps host...
gpl-3.0
gajop/chiliui
luaui/chili/chili/controls/treeviewnode.lua
1
8454
--// ============================================================================= TreeViewNode = Control:Inherit{ classname = "treeviewnode", padding = {16, 0, 0, 0}, labelFontsize = 14, autosize = true, caption = "node", expanded = true, clickTextToToggle = false, root = false, leaf...
gpl-2.0
mega9/GTW-RPG
[resources]/GTWcivilians/civ-s.lua
1
4065
--[[ ******************************************************************************** Project owner: GTWGames Project name: GTW-RPG Developers: GTWCode Source code: https://github.com/GTWCode/GTW-RPG/ Bugtracker: http://forum.albonius.com/bug-reports/ Suggestions: http://forum.albonius.com...
gpl-3.0
jprjr/luadbi-async
DBIasync.lua
1
1851
local _M = {} _M._NAME = "DBIasync" -- Driver to module mapping local name_to_module = { MySQL = 'dbdmysqlasync', PostgreSQL = 'dbdpostgresqlasync', SQLite3 = 'dbdsqlite3async', } local string = require('string') -- Returns a list of available drivers -- based on run time loading local function available...
mit
ntop/ntopng
scripts/lua/rest/v1/acknowledge/flow/alerts.lua
1
1078
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path local alert_utils = require "alert_utils" local alert_consts = require "alert_consts" ...
gpl-3.0
Miigon/luvit
deps/stream/stream_passthrough.lua
5
1105
--[[ Copyright 2014 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...
apache-2.0
spark051/bt.bot
plugins/bugzilla.lua
611
3983
do local BASE_URL = "https://bugzilla.mozilla.org/rest/" local function bugzilla_login() local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password print("accessing " .. url) local res,code = https.request( url ) local data = json:decode(res) return data ...
gpl-2.0
eaufavor/AwesomeWM-powerarrow-dark
drawer/cpuInfo.lua
1
8298
local setmetatable = setmetatable local io = io local ipairs = ipairs local loadstring = loadstring local print = print local tonumber = tonumber local beautiful = require( "beautiful" ) local button = require( "awful.button" ) local widget2 = require( "aw...
apache-2.0
ntop/ntopng
scripts/lua/iface_hosts_list.lua
1
2310
-- -- (C) 2013-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPContentTypeHeader('text/html') interface.select(ifname) hosts_stats = interface.getHostsInfo(false, "column_traffic") hosts_stats = hosts_stats["hosts"] ...
gpl-3.0
ntop/ntopng
scripts/lua/modules/alert_store/flow_alert_store.lua
1
38077
-- -- (C) 2021-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path -- Import the classes library. local classes = require "classes" require "lua_utils" local alert_store = require "alert_store" local flow_risk_utils = require "flow_...
gpl-3.0
corbinmunce/domoticz
dzVents/runtime/persistence.lua
19
5741
-- Internal persistence library --[[ Provides ]] -- persistence.store(path, ...): Stores arbitrary items to the file at the given path -- persistence.load(path): Loads files that were previously stored with store and returns them --[[ Limitations ]] -- Does not export userdata, threads or most function values -- Func...
gpl-3.0
shangjiyu/openwrt-extra
luci/applications/luci-app-vsftpd/luasrc/model/cbi/vsftpd/item.lua
8
1728
--[[ LuCI - Lua Configuration Interface Copyright 2016 Weijie Gao <hackpascal@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- loc...
gpl-2.0
ASantosVal/vlc-extension-trials
share/lua/playlist/canalplus.lua
8
3507
--[[ $Id: $ Copyright (c) 2007 the VideoLAN team 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 option) any later version. This program is distr...
gpl-2.0
Banderi/OpenTomb
scripts/strings/english/generic.lua
5
3151
-- OPENTOMB GENERIC STRINGS - ENGLISH LANGUAGE -- by Lwmte, Jan 2015 -------------------------------------------------------------------------------- -- This set of strings is used globally in all engine versions for various -- menu entries, notify pop-ups, inventory entries etc. --------------------------------------...
lgpl-3.0
vikas17a/Algorithm-Implementations
Caesar_Cipher/Lua/Yonaba/caesar_cipher_test.lua
26
1202
-- Tests for caesar_cipher.lua local caesar = require 'caesar_cipher' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 ...
mit
shadowmourne/vicious
widgets/mem.lua
15
1850
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> -- * (c) 2009, Lucas de Vries <lucas@glacicle.com> --------------------------------------------------- -- {{{ Grab environment local io = { lines = io.lines } local se...
gpl-2.0
Altenius/cuberite
Server/Plugins/APIDump/Classes/Projectiles.lua
1
8520
return { cArrowEntity = { Desc = [[ Represents the arrow when it is shot from the bow. A subclass of the {{cProjectileEntity}}. ]], Functions = { CanPickup = { Params = { { Name = "Player", Type = "cPlayer", }, }, Returns = { { Type = "boolean", ...
apache-2.0
graydon/monotone
tests/_MTN_case-folding_security_patch/__driver__.lua
1
2294
mtn_setup() -- The patch for this security issue is to treat all case-folded -- versions of _MTN as being bookkeeping files (and thus illegal -- file_paths). Make sure it's working. names = {"_mtn", "_mtN", "_mTn", "_Mtn", "_MTn", "_MtN", "_mTN", "_MTN"} -- bookkeeping files are an error for add for _,i in pairs(n...
gpl-2.0
wsantas/gamecode4
Assets/Scripts/ActorManager.lua
4
10265
--======================================================================== -- ActorManager.lua : Defines the ActorManager class -- -- Part of the GameCode4 Application -- -- GameCode4 is the sample application that encapsulates much of the source code -- discussed in "Game Coding Complete - 4th Edition" by Mike McShaff...
lgpl-3.0
Noneatme/MTA-NFS
client/CRenderCursor.lua
1
1340
-- ############################### -- ## Project: MTA:Speedrace ## -- ## Name: RenderCursor ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ############################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local cSetting = {}; -- Local Settin...
mit
dalab/deep-ed
ed/minibatch/data_loader.lua
1
2965
-- Data loader for training of ED models. train_file = opt.root_data_dir .. 'generated/test_train_data/aida_train.csv' it_train, _ = io.open(train_file) print('==> Loading training data with option ' .. opt.store_train_data) local function one_doc_to_minibatch(doc_lines) -- Create empty mini batch: local num_ment...
apache-2.0
xianjiec/nn
MultiMarginCriterion.lua
11
1615
local THNN = require 'nn.THNN' local MultiMarginCriterion, parent = torch.class('nn.MultiMarginCriterion', 'nn.Criterion') function MultiMarginCriterion:__init(p, weights, margin) assert(p == nil or p == 1 or p == 2, 'only p=1 and p=2 supported') self.p = p or 1 self.margin = margin or 1.0 parent.__init(se...
bsd-3-clause
takahashim/h2o
deps/klib/lua/klib.lua
42
20155
--[[ The MIT License Copyright (c) 2011, Attractive Chaos <attractor@live.co.uk> 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 th...
mit
corbinmunce/domoticz
dzVents/runtime/device-adapters/scene_device.lua
6
1104
local TimedCommand = require('TimedCommand') return { baseType = 'scene', name = 'Scene device adapter', matches = function(device, adapterManager) local res = (device.baseType == 'scene') if (not res) then adapterManager.addDummyMethod(device, 'switchOn') adapterManager.addDummyMethod(device, 'switchO...
gpl-3.0
zhrtz/vicious
contrib/ati.lua
12
2694
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2013, NormalRa <normalrawr gmail com> --------------------------------------------------- -- {{{ Grab environment local tonumber = tonumber local io = { open = io.open } local setmetatable = setmetatable l...
gpl-2.0
shayanchabok007/antispam_ok_new
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
ghoghnousteamHT/ghoghnous_bot
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
matinbot/telebot
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
caohongtao/quick-cocos-demo
runtime/ios/PrebuiltRuntimeLua.app/src/framework/cocos2dx.lua
18
1999
--[[ 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...
apache-2.0
vikas17a/Algorithm-Implementations
Average/Lua/Yonaba/average_test.lua
26
1557
-- Tests for average.lua local mean = require 'average' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 end local st...
mit
solid021/TeleBeyond
plugins/media.lua
376
1679
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
ntop/ntopng
scripts/lua/modules/alert_definitions/other/alert_device_connection_disconnection.lua
1
2172
-- -- (C) 2019-22 - ntop.org -- -- ############################################## local other_alert_keys = require "other_alert_keys" local alert_creators = require "alert_creators" -- Import the classes library. local classes = require "classes" -- Make sure to import the Superclass! local alert = require "alert" lo...
gpl-3.0
caohongtao/quick-cocos-demo
runtime/ios/PrebuiltRuntimeLua.app/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
148
11934
-- This is the DeprecatedEnum DeprecatedClass = {} or DeprecatedClass _G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT _G.GL_LINE_WIDTH = gl.LINE_WIDTH _G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA _G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA _G.GL_GREEN_BITS = gl.GREEN_BITS _G.GL_STENCIL_REF = gl.STENCI...
apache-2.0
ntop/ntopng
attic/scripts/lua/show_alerts.lua
2
2041
-- -- (C) 2013-21 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local alert_utils = require "alert_utils" local page_utils = require("page_utils") local alerts_api = require("alerts_api") local recording_utils = require ...
gpl-3.0
martial69320/mlvuzkgq
src/server/scripts/Custom/GoMove/GOMove/GOMoveFunctions.lua
8
9890
GOMove = {Frames = {}, Inputs = {}} function GOMove:Update() for k, Frame in ipairs(GOMove.Frames) do if(Frame.Update) then Frame:Update() end end end function GOMove:Tonumber(val) -- returns nil if the value is not a number or 0x starting hex if(type(val) == "string") then ...
gpl-2.0
cis542/VR_Wall
PongGame2/glsdk/glload/codegen/_util.lua
5
2771
--Works like the regular pairs, but returns the key/value pairs in a key-sorted order. --sortFunc is the function used to compare them. function sortPairs(theTable, sortFunc) local keyTable = {}; for key, value in pairs(theTable) do table.insert(keyTable, key); end table.sort(keyTable, sortFunc); local cu...
epl-1.0
icetoggle/skynet
test/testrediscluster.lua
19
3400
local skynet = require "skynet" local rediscluster = require "skynet.db.redis.cluster" local test_more = ... -- subscribe mode's callback local function onmessage(data,channel,pchannel) print("onmessage",data,channel,pchannel) end skynet.start(function () local db = rediscluster.new({ {host="127.0.0.1",port=7000...
mit
graydon/monotone
tests/update_to_off-branch_rev/__driver__.lua
1
1797
mtn_setup() revs = {} addfile("testfile", "blah blah") commit() revs.t = base_revision() writefile("testfile", "other other") commit("otherbranch") revs.o = base_revision() writefile("testfile", "third third") commit("somebranch") revs.s = base_revision() check(mtn("cert", revs.s, "branch", "otherbranch"), 0, false...
gpl-2.0
Star2Billing/newfies-dialer
lua/libs/fsm_callflow.lua
2
37408
-- -- Newfies-Dialer License -- http://www.newfies-dialer.org -- -- 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/. -- -- Copyright (C) 2011-2015 Star2Billing S.L. -- --...
mpl-2.0
pgl/prat
modules/OriginalButtons.lua
2
16648
--------------------------------------------------------------------------------- -- -- Prat - A framework for World of Warcraft chat mods -- -- Copyright (C) 2006-2007 Prat Development Team -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public Lice...
gpl-3.0
mespinozas/si
t7/xapian/xapian-bindings/lua/docs/examples/simpleexpand.lua
2
2939
#!/usr/bin/env lua -- -- Simple example script demonstrating query expansion. -- -- Copyright (C) 2011 Xiaona Han -- -- 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 --...
gpl-2.0
FelixMaxwell/ReDead
entities/weapons/rad_base/shared.lua
1
21107
if SERVER then AddCSLuaFile( "shared.lua" ) SWEP.Weight = 1 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false end if CLIENT then SWEP.DrawAmmo = true SWEP.DrawCrosshair = false SWEP.CSMuzzleFlashes = true SWEP.ViewModelFOV = 75 SWEP.ViewModelFlip = true SWEP.PrintName = "BASE WEAPON" ...
mit
turbogus/fluideMP
fluide/init.lua
1
10465
-- Sève -- -- code licence gpl v2 ou superieur -- graphisme sous licence CC-BY-NC-SA -- -- Par Jat et Turbogus -- --********************* -- --Génère de la sève pour la creation d'arbres géants --La sève regénère la vie quand on se place en dessous --Elle à les mêmes propriétés que l'eau -- --Disponible uniquement pou...
gpl-2.0
maikerumine/aftermath
mods/fire/init.lua
6
8613
-- Global namespace for functions fire = {} -- -- Items -- -- Flame nodes minetest.register_node("fire:basic_flame", { drawtype = "firelike", tiles = { { name = "fire_basic_flame_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1 }, }, },...
lgpl-2.1
Planimeter/lgameframework
lib/opengl.lua
1
89662
--=========== Copyright © 2020, Planimeter, All rights reserved. ===========-- -- -- Purpose: -- --==========================================================================-- local ffi = require( "ffi" ) local SDL = require( "sdl" ) io.input( framework.execdir .. "include/glcorearb.h" ) ffi.cdef( io.read( "*all" ) ) ...
mit
tcmug/kello
misc/configuration.lua
1
1185
local json = require("json") module = {} function module:get(key, default) if not self.configuration then local base = system.pathForFile("kello-config.json", system.DocumentsDirectory) local configuration = {} local file = io.open( base, "r" ) if file then local json...
gpl-3.0
dalab/deep-ed
ed/args.lua
1
5119
-- We add params abbreviations to the abbv map if they are important hyperparameters -- used to differentiate between different methods. abbv = {} cmd = torch.CmdLine() cmd:text() cmd:text('Deep Joint Entity Disambiguation w/ Local Neural Attention') cmd:text('Command line options:') ---------------- runtime options:...
apache-2.0
Altenius/cuberite
Server/Plugins/APIDump/Hooks/OnBlockToPickups.lua
36
2438
return { HOOK_BLOCK_TO_PICKUPS = { CalledWhen = "A block is about to be dug ({{cPlayer|player}}, {{cEntity|entity}} or natural reason), plugins may override what pickups that will produce.", DefaultFnName = "OnBlockToPickups", -- also used as pagename Desc = [[ This callback gets called whenever a block is ...
apache-2.0
gajop/chiliui
luaui/chili/chili/controls/image.lua
1
3956
--// ============================================================================= --- Image module --- Image fields. -- Inherits from Control. -- @see button.Button -- @table Image -- @tparam {r, g, b, a} color color, (default {1, 1, 1, 1}) -- @string[opt = nil] file path -- @bool[opt = true] keepAspect as...
gpl-2.0
lizh06/premake-4.x
src/actions/vstudio/vs200x_vcproj.lua
4
21224
-- -- vs200x_vcproj.lua -- Generate a Visual Studio 2002-2008 C/C++ project. -- Copyright (c) 2009-2013 Jason Perkins and the Premake project -- -- -- Set up a namespace for this file -- premake.vstudio.vc200x = { } local vc200x = premake.vstudio.vc200x local tree = premake.tree -- -- Return the version-specifi...
bsd-3-clause
LuaDist2/lunamark
lunamark.lua
7
3477
-- (c) 2009-2011 John MacFarlane. Released under MIT license. -- See the file LICENSE in the source for details. --- Copyright &copy; 2009-2011 John MacFarlane. -- -- Released under the MIT license (see LICENSE in the source for details). -- -- ## Description -- -- Lunamark is a lua library for conversion of markdown...
mit
dani-sj/extremenod
plugins/inpm.lua
14
3149
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
caohongtao/quick-cocos-demo
src/framework/luaoc.lua
20
2593
--[[ 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...
apache-2.0
cere-bro/telegram-bot
bot/utils.lua
239
13499
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() http.TIMEOUT = 10 funct...
gpl-2.0
ASantosVal/vlc-extension-trials
share/lua/playlist/bbc_co_uk.lua
11
1514
--[[ $Id$ Copyright © 2008 the VideoLAN team Authors: Dominique Leuenberger <dominique-vlc.suse@leuenberger.net> 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 Licens...
gpl-2.0
mohammadclashclash/mehdi002
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
WeiNSteiN-Dev/The_New_Satan
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
mtyzaq/extra
packages/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan3/mwan3_ruleconfig.lua
9
3337
-- ------ extra functions ------ -- function rule_check() -- determine if rule needs a protocol specified local sport = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".src_port")) local dport = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".dest_port")) if sport ~= "" or dport ~= "" t...
gpl-2.0
caohongtao/quick-cocos-demo
runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/framework/cc/ui/UIButton.lua
9
15243
--[[ Copyright (c) 2011-2014 chukong-inc.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
apache-2.0
vikas17a/Algorithm-Implementations
Ranrot-B-Pseudo_Random_Number_Generator/Lua/Yonaba/numberlua.lua
115
13399
--[[ LUA MODULE bit.numberlua - Bitwise operations implemented in pure Lua as numbers, with Lua 5.2 'bit32' and (LuaJIT) LuaBitOp 'bit' compatibility interfaces. SYNOPSIS local bit = require 'bit.numberlua' print(bit.band(0xff00ff00, 0x00ff00ff)) --> 0xffffffff -- Interface providing strong Lua 5.2 '...
mit
lemones/dotfiles
home/.config/awesome/lain/layout/centerworkd.lua
4
3976
--[[ Licensed under GNU General Public License v2 * (c) 2016, Henrik Antonsson * (c) 2014, projektile * (c) 2013, Luke Bonham * (c) 2010-2012, Peter Hofmann Based on centerwork.lua --]] local awful = require("awful") local beautiful = require("beautiful") local t...
gpl-3.0
JosephBywater/ProjectPorcupine
Assets/StreamingAssets/LUA/Furniture.lua
2
25565
------------------------------------------------------- -- Project Porcupine Copyright(C) 2016 Team Porcupine -- This program comes with ABSOLUTELY NO WARRANTY; This is free software, -- and you are welcome to redistribute it under certain conditions; See -- file LICENSE, which is part of this source code package, for ...
gpl-3.0
lizh06/premake-4.x
tests/base/test_api.lua
54
11362
-- -- tests/base/test_api.lua -- Automated test suite for the project API support functions. -- Copyright (c) 2008-2011 Jason Perkins and the Premake project -- T.api = { } local suite = T.api local sln function suite.setup() sln = solution "MySolution" end -- -- premake.getobject() tests -- function suite...
bsd-3-clause
graydon/monotone
tests/annotate_accidental_clean_merge/__driver__.lua
1
1305
-- -*-lua-*- -- -- We are testing annotate on this graph: -- -- a -- /|\ -- / | \ -- b* c* d* -- | | | -- e* e* e* -- \ \/ -- \ e -- \ / -- e -- | -- f* -- -- The current annotate code will arbitrarily select one of the marked -- e-revisions for lines comi...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race/race_server.lua
3
56451
g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) allowRPC('setElementPosition') g_MotorBikeIDs = table.create({ 448, 461, 462, 463, 468, 471, 521, 522, 523, 581, 586 }, true) g_ArmedVehicleIDs = table.create({ 425, 447, 520, 430, 464, 432 }, true) g_AircraftIDs = table.create({ 592, 577, ...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/admin/server/admin_ACL.lua
7
2730
--[[********************************** * * Multi Theft Auto - Admin Panel * * admin_ACL.lua * * Original File by lil_Toady * **************************************]] function aSetupACL () local temp_acl_nodes = {} local node = xmlLoadFile ( "conf\\ACL.xml" ) if ( node ) then --Get ACLs local acls = 0 while (...
mit
ntop/ntopng
scripts/lua/rest/v2/acknowledge/mac/alerts.lua
1
1072
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path local alert_utils = require "alert_utils" local alert_consts = require "alert_consts" ...
gpl-3.0
FelixMaxwell/ReDead
entities/weapons/rad_g3/shared.lua
1
1580
if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.ViewModelFlip = true SWEP.PrintName = "G3 SG1" SWEP.IconLetter = "i" SWEP.Slot = 4 SWEP.Slotpos = 3 end SWEP.HoldType = "ar2" SWEP.Base = "rad_base" SWEP.ViewModel = "models/weapons/v_snip_g3sg1.mdl" SWEP.WorldModel = "models/weapons/w...
mit
ntop/ntopng
scripts/lua/rest/v1/acknowledge/host/alerts.lua
1
1077
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path local alert_utils = require "alert_utils" local alert_consts = require "alert_consts" ...
gpl-3.0
Star2Billing/newfies-dialer
lua/scheduled_event.lua
5
7846
-- Version: MPL 1.1 -- -- The contents of this file are subject to the Mozilla Public License Version -- 1.1 (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.mozilla.org/MPL -- -- Software distributed under the License is distribu...
mpl-2.0
pinghe/nginx-openresty-windows
lua-resty-string-0.09/lib/resty/md5.lua
13
1209
-- Copyright (C) by Yichun Zhang (agentzh) local ffi = require "ffi" local ffi_new = ffi.new local ffi_str = ffi.string local C = ffi.C local setmetatable = setmetatable local error = error local _M = { _VERSION = '0.09' } local mt = { __index = _M } ffi.cdef[[ typedef unsigned long MD5_LONG ; enum { MD5_CB...
bsd-2-clause
mohammad8/123456
plugins/btc.lua
289
1375
-- See https://bitcoinaverage.com/api local function getBTCX(amount,currency) local base_url = 'https://api.bitcoinaverage.com/ticker/global/' -- Do request on bitcoinaverage, the final / is critical! local res,code = https.request(base_url..currency.."/") if code ~= 200 then return nil end local data = j...
gpl-2.0
maikerumine/aftermath
mods/mobs_fallout/nssm_api.lua
2
9781
-- set content id's local c_air = minetest.get_content_id("air") local c_ignore = minetest.get_content_id("ignore") local c_obsidian = minetest.get_content_id("default:obsidian") local c_brick = minetest.get_content_id("default:obsidianbrick") local c_chest = minetest.get_content_id("default:chest_locked") -- get node...
lgpl-2.1
Noneatme/MTA-NFS
client/CVehicleControls.lua
1
2054
-- ############################### -- ## Project: MTA:Speedrace ## -- ## Name: VehicleControls ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ############################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local cSetting = {}; -- Local Set...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race/modes/nts.lua
3
5316
NTS = setmetatable({}, RaceMode) NTS.__index = NTS NTS:register('nts') function NTS:isMapValid() if self.getNumberOfCheckpoints() < 1 then outputRace('Error starting NTS map: At least 1 CP needed') return false end for _, checkpoint in ipairs(self.getCheckpoints()) do if not self:isValidCheckpoint(checkp...
mit
huangleiBuaa/CenteredWN
module/Linear_ForDebug.lua
1
8950
local Linear_ForDebug, parent = torch.class('nn.Linear_ForDebug', 'nn.Module') function Linear_ForDebug:__init(inputSize, outputSize,orth_flag,isBias) parent.__init(self) if isBias ~= nil then assert(type(isBias) == 'boolean', 'isBias has to be true/false') self.isBias = isBias else self...
bsd-2-clause
DiscoverySpaces/roman-numeral-game
TestRomanNumeralAddition.lua
1
5084
require "RomanNumeralAddition" local lunatest = require "lunatest" --lunatest.suite("basic-roman-numerals") function test_sort() lunatest.assert_equal(SortLargerToSmallerSymbols("LXXIXXDCCCXCCCMCCXXDXVIIIIIIID"),'MDDDCCCCCCCCLXXXXXXXXVIIIIIIII') end function test_UpConvert() lunatest.assert_equal(UpConvert(...
apache-2.0
Fawk/CleanUI
modules/units/targettarget.lua
1
2474
local A, L = unpack(select(2, ...)) local E, T, U, Units, media = A.enum, A.Tools, A.Utils, A.Units, LibStub("LibSharedMedia-3.0") local GetSpecializationInfo, GetSpecialization = GetSpecializationInfo, GetSpecialization local InCombatLockdown = InCombatLockdown local TargetTarget = {} local frameName = "Target of Tar...
gpl-3.0
Jar-Chi/JarChi
libs/fakeredis.lua
650
40405
local unpack = table.unpack or unpack --- Bit operations local ok,bit if _VERSION == "Lua 5.3" then bit = (load [[ return { band = function(x, y) return x & y end, bor = function(x, y) return x | y end, bxor = function(x, y) return x ~ y end, bnot = function(x) return ~x end, rshift = function(x...
gpl-3.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/maptools/mm.lua
3
20903
local maxuploaded_maps = 3 ------------- -- newMap -- ------------- local uploadedfolder = "[maps]\\[uploadedmaps]" function newMap(map, forumid, mta_name) local mapname = tostring(map) .. '_newupload' outputDebugString('newMap ' .. mapname) refreshResources() setTimer(refreshResources, 2000, 1) local mapres = ...
mit
ckaotik/ckaosCraft
libs/AceAddon-3.0/AceAddon-3.0.lua
66
25788
--- **AceAddon-3.0** provides a template for creating addon objects. -- It'll provide you with a set of callback functions that allow you to simplify the loading -- process of your addon.\\ -- Callbacks provided are:\\ -- * **OnInitialize**, which is called directly after the addon is fully loaded. -- * **OnEnable** wh...
bsd-3-clause
LuaDist2/lunamark
standalone/src/cosmo/grammar.lua
9
4696
local lpeg = require "lpeg" local re = require "re" module(..., package.seeall) local function parse_selector(selector, env) env = env or "env" selector = string.sub(selector, 2, #selector) local parts = {} for w in string.gmatch(selector, "[^|]+") do local n = tonumber(w) if n then table.inser...
mit
strukturag/vlc-2.2
share/lua/playlist/koreus.lua
57
4037
--[[ Copyright © 2009 the VideoLAN team 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 option) any later version. This program is distributed in ...
gpl-2.0
eaufavor/AwesomeWM-powerarrow-dark
extern/vicious/widgets/net.lua
1
2709
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> -- * (c) 2009, Lucas de Vries <lucas@glacicle.com> --------------------------------------------------- -- {{{ Grab environment local tonumber = tonumber local os = { t...
apache-2.0
focusworld/focus
plugins/media.lua
297
1590
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
Mortezarohandeh1/hack_shop2bot
plugins/media.lua
297
1590
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
disslove3/MAX3-BOT
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
mbmahdiiii/m
plugins/weather.lua
274
1531
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' url = url..'&appid=bd82977b86bf27fb59a04b61b6...
gpl-2.0
mamadtnt/um
plugins/weather.lua
274
1531
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' url = url..'&appid=bd82977b86bf27fb59a04b61b6...
gpl-2.0
mohammadclashclash/mehdi002
plugins/ingroup.lua
527
44020
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
sevenbot/seventmbot
plugins/ingroup.lua
527
44020
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
safavi1381/Master-bot
plugins/groupmanager.lua
136
11323
-- 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 not is_admin(msg) then return "You're not admin!" end local group_creator = msg.from.print_name create_group_chat (group_cr...
gpl-2.0
pbrazdil/deepmask
trainMeters.lua
3
3828
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
bsd-3-clause
adib1380/BotiSmylife
plugins/anti-spam6.lua
13
2433
local NUM_MSG_MAX = 6 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 6 local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, function (data, success, result) if success ~= 1 then local text = 'I can\'t k...
gpl-2.0
mandla99/the_king98
plugins/owners.lua
55
23720
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['settings'...
gpl-2.0
tcmug/kello
objects/clock.lua
1
3109
-- The clock face. local hand = require( "objects.hand" ) module = {} -- Compute the difference in seconds between local time and UTC. function get_timezone() local now = os.time() return os.difftime(now, os.time(os.date("!*t", now))) end function module:create(clock_size) local clock = display.newGroup(...
gpl-3.0
nuvie/nuvie
data/scripts/md/usecode.lua
2
63722
local USE_EVENT_USE = 0x01 local USE_EVENT_MOVE = 0x40 local USE_EVENT_READY = 0x0100 function search_container(obj) local child for child in container_objs(obj) do Obj.moveToMap(child, obj.x, obj.y, obj.z) end end function use_door(obj, actor) if bit32.btest(obj.quality, 0x80) then printl("IT_IS_LOCKED") ...
gpl-2.0
maikerumine/aftermath
mods/default/crafting.lua
2
29837
-- mods/default/crafting.lua minetest.register_craft({ output = 'default:wood 4', recipe = { {'default:tree'}, } }) minetest.register_craft({ output = 'default:junglewood 4', recipe = { {'default:jungletree'}, } }) minetest.register_craft({ output = 'default:pine_wood 4', recipe = { {'default:pine_tree...
lgpl-2.1
delram/seed3
bot/seedbot.lua
2
10658
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
mrbangi/mr-bangi
plugins/welcome.lua
1
3485
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