repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
wbaosheng/AndroidP7zip
P7zip/app/src/main/jni/p7zip/p7zip_9.38.1/CPP/7zip/PREMAKE/premake4.lua
4
12248
-- WARNING : automatically generated by utils/generate.py solution "p7zip" configurations { "Debug", "Release" } -- includes for all projects includedirs { "../../../myWindows", "../../../", "../../../include_windows", } configuration "Debug" defines { "DEBUG", "...
apache-2.0
akornatskyy/lua-libmemcached
spec/libmemcached_spec.lua
1
15537
local libmemcached = require 'libmemcached' local json = require 'dkjson' local assert, describe, it = assert, describe, it local function count_refs() local m = 0 local n = 0 local r = debug.getregistry() local i = r[0] for k, v in pairs(r) do if type(k) == 'number' then m = m...
mit
tcmug/kello
objects/bottom.lua
1
2003
-- The bottom part of the clock scene. bottom = {} function bottom:create(clock) local group = display.newGroup() local clock_size = 150 local offset = 0 group.clock = clock group.digital = display.newText(os.date("%H : %M : %S"), 0, -20, "Roboto-Regular.ttf", 17) group:insert(group.digital...
gpl-3.0
icetoggle/skynet
examples/login/gated.lua
29
2208
local msgserver = require "snax.msgserver" local crypt = require "skynet.crypt" local skynet = require "skynet" local loginservice = tonumber(...) local server = {} local users = {} local username_map = {} local internal_id = 0 -- login server disallow multi login, so login_handler never be reentry -- call by login ...
mit
lizh06/premake-4.x
src/actions/vstudio/vs2002_csproj_user.lua
19
1483
-- -- vs2002_csproj_user.lua -- Generate a Visual Studio 2002/2003 C# .user file. -- Copyright (c) 2009 Jason Perkins and the Premake project -- local cs2002 = premake.vstudio.cs2002 function cs2002.generate_user(prj) io.eol = "\r\n" _p('<VisualStudioProject>') _p(1,'<CSHARP>') _p(2,'<Build>') -- Visu...
bsd-3-clause
1yvT0s/wrk
deps/luajit/dynasm/dasm_mips.lua
120
28080
------------------------------------------------------------------------------ -- DynASM MIPS module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _i...
apache-2.0
xianjiec/nn
Sequential.lua
20
4163
local Sequential, _ = torch.class('nn.Sequential', 'nn.Container') function Sequential:__len() return #self.modules end function Sequential:add(module) if #self.modules == 0 then self.gradInput = module.gradInput end table.insert(self.modules, module) self.output = module.output return self en...
bsd-3-clause
baiwenlu/sailor
src/web_utils/lp.lua
10
5103
---------------------------------------------------------------------------- -- Lua Pages Template Preprocessor. -- -- @release $Id: lp.lua,v 1.15 2008/12/11 17:40:24 mascarenhas Exp $ ---------------------------------------------------------------------------- local assert, error, loadstring = assert, error, loadstri...
mit
numo16/wesnoth
data/ai/micro_ais/cas/ca_return_guardian.lua
26
1081
local AH = wesnoth.require "ai/lua/ai_helper.lua" local function get_guardian(cfg) local filter = cfg.filter or { id = cfg.id } local guardian = AH.get_units_with_moves { side = wesnoth.current.side, { "and", filter } }[1] return guardian end local ca_return_guardian = {} function ca...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/snow/snow.lua
3
14322
addCommandHandler('snow', function() toggleSnow() end ) bindKey("f12","down",function() executeCommandHandler("snow") end) local snowflakes = {} local snowing = false local box_width, box_depth, box_height, box_width_doubled, box_depth_doubled = 4,4,4,8,8 local position = {0,0,0} local flake_removal = nil local ...
mit
maikerumine/aftermath
mods/mg_villages/fill_chest.lua
2
15193
--[[-- TODO: refill chest after some time? -- TODO: alert NPC that something was taken mg_villages.random_chest_content = {}; -- add random chest content local ADD_RCC = function( data ) if( data and #data>3 and ( minetest.registered_nodes[ data[1] ] or minetest.registered_items[ data[1] ]) ) then table.insert( mg...
lgpl-2.1
roger-zhao/ardupilot-3.5-dev
Tools/CHDK-Scripts/Cannon SX260/3DR_EAI_SX260.lua
96
29666
--[[ KAP UAV Exposure Control Script v3.1 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script 3DR EAI 1.0 is a fork of KAP 3.1 with settings specific to Canon cameras triggered off the Pixhawk autopilot. Changelog: -Modified Tv, Av, and...
gpl-3.0
RoO9214/FuckSpaM
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-3.0
mohammadspemmer/mamad
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-3.0
deveNovar/DEveNovar
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
caohongtao/quick-cocos-demo
runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/framework/cc/ui/UICheckBoxButton.lua
9
7255
--[[ 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
mbmahdiiii/m
plugins/map.lua
11
1529
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
solid021/TeleBeyond
plugins/Id.lua
7
2972
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..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, resu...
gpl-2.0
merlight/eso-merTorchbug
libs/LibStub.lua
8
1567
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke -- LibStub developed for World of Warcraft by above members of the WowAce commu...
unlicense
mega9/GTW-RPG
[resources]/GTWpolicechief/head_officer.lua
1
7318
--[[ ******************************************************************************** Project owner: GTWGames Project name: GTW-RPG Developers: GTWCode Source code: https://github.com/GTWCode/GTW-RPG/ Bugtracker: http://forum.gtw-games.org/bug-reports/ Suggestions: http://forum.gtw-games.org...
gpl-3.0
cere-bro/telegram-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
ntop/ntopng
scripts/lua/modules/alert_creators.lua
1
1634
-- -- (C) 2020-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/pools/?.lua;" .. package.path -- ############################################## local alert_creators = {} -- ############################################## -- @brief Prepare an alert table used to ge...
gpl-3.0
Miigon/luvit
examples/broken/speed-http.lua
9
2487
-- A simple keepalive benchmark to see how fast we can make http -- test with one of the following tools: -- luvit examples/http-bench.lua -- ab -t 10 -n 500000 -c 100 -k http://127.0.0.1:8080/ -- httperf --hog 127.0.0.1 --port 8080 --num-conns=100 --num-calls=1000 -- local net = require('net') local table = req...
apache-2.0
ntop/ntopng
attic/scripts/plugins/alerts/network/threshold_cross/user_scripts/interface/idle.lua
2
1245
-- -- (C) 2019-21 - ntop.org -- local alerts_api = require("alerts_api") local alert_consts = require("alert_consts") local user_scripts = require("user_scripts") local alert_severities = require "alert_severities" local script = { -- Script category category = user_scripts.script_categories.network, default_e...
gpl-3.0
ntop/ntopng
scripts/lua/rest/v2/enable/check.lua
1
1415
-- -- (C) 2019-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local json = require "dkjson" local rest_utils = require "rest_utils" local checks = require("checks") local auth = require "auth" -- -- Enable User Script -- Exam...
gpl-3.0
trompetin17/wxFormBuilder-Atlas
build/premake/4.3/tests/actions/xcode/test_xcode_common.lua
7
1583
-- -- tests/actions/xcode/test_xcode_common.lua -- Automated test suite for functions shared between Xcode projects and solutions -- Copyright (c) 2009 Jason Perkins and the Premake project -- T.xcode3common = { } local suite = T.xcode3common local xcode = premake.xcode -- -- Replacement for xcode.newid(). Creat...
gpl-2.0
lemones/dotfiles
home/.config/awesome/lain/widget/alsa.lua
2
1545
--[[ Licensed under GNU General Public License v2 * (c) 2013, Luke Bonham * (c) 2010, Adrian C. <anrxc@sysphere.org> --]] local helpers = require("lain.helpers") local shell = require("awful.util").shell local wibox = require("wibox") local string = { match = string.match, fo...
gpl-3.0
numo16/wesnoth
data/ai/micro_ais/cas/ca_herding_sheep_runs_enemy.lua
26
1557
local H = wesnoth.require "lua/helper.lua" local AH = wesnoth.require "ai/lua/ai_helper.lua" local function get_next_sheep(cfg) local sheep = AH.get_units_with_moves { side = wesnoth.current.side, { "and", cfg.filter_second }, { "filter_location", { { "filter", {...
gpl-2.0
mohammadclashclash/mehdi002
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
solid021/TeleBeyond
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
MRAHS/seed
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
SF-TEAM/SF
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...
agpl-3.0
telematin/telematinweb
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
wubenqi/zengine
bin/scripts2/zengine/zcached/zcached.lua
2
1531
-- Copyright (C) 2012 by wubenqi -- Distributable under the terms of either the Apache License (Version 2.0) or -- the GNU Lesser General Public License, as specified in the COPYING file. -- -- By: wubenqi<wubenqi@gmail.com> -- ------------------------------------------------------------------------------------------...
apache-2.0
trompetin17/wxFormBuilder-Atlas
build/premake/4.3/src/base/path.lua
7
6234
-- -- path.lua -- Path manipulation functions. -- Copyright (c) 2002-2010 Jason Perkins and the Premake project -- -- -- Get the absolute file path from a relative path. The requested -- file path doesn't actually need to exist. -- function path.getabsolute(p) -- normalize the target path p = path.translate(p,...
gpl-2.0
adib1380/BotiSmylife
plugins/spammerr.lua
19
271988
do function run(msg, matches) return " UltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDefending📛\nUltraKingIsDef...
gpl-2.0
ntop/ntopng
scripts/lua/modules/pools/pools_rest_utils.lua
1
9095
-- -- (C) 2017-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/pools/?.lua;" .. package.path require "lua_utils" local json = require "dkjson" local rest_utils = require "rest_utils" local pools = require "pools" local pools_lua_utils = require "pools_lua_utils" loc...
gpl-3.0
jeffreykegler/kollos
components/main/kollos/matrix.lua
2
4026
--[[ 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, distribute, sublicense, and/or sell copies o...
mit
Altenius/cuberite
Server/Plugins/APIDump/Hooks/OnKilled.lua
38
1204
return { HOOK_KILLED = { CalledWhen = "A player or a mob died.", DefaultFnName = "OnKilled", Desc = [[ This hook is called whenever player or a mob dies. It can be used to change the death message. ]], Params = { { Name = "Victim", Type = "{{cEntity}}", Notes = "The player or mob that died" }, ...
apache-2.0
pbrazdil/deepmask
evalPerImage.lua
3
6570
--[[---------------------------------------------------------------------------- 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
rigeirani/a
plugins/webshot.lua
110
1424
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
vikas17a/Algorithm-Implementations
Monty_Hall_Problem/Lua/Yonaba/monty_hall_test.lua
26
1603
-- Tests for monty_hall.lua local monty_hall = require 'monty_hall' 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 en...
mit
graydon/monotone
tests/revert_file_to_base_revision/__driver__.lua
1
3701
mtn_setup() addfile("testfile0", "version 0 of first test file\n") v1 = sha1("testfile0") commit() -- check reverting a single file by name writefile("testfile0", "squirrils monkeys dingos\n") check(qgrep("squirrils", "testfile0")) check(mtn("revert", "testfile0"), 0, false, false) check(not qgrep("squirrils", "te...
gpl-2.0
Banderi/OpenTomb
scripts/strings/french/generic.lua
2
3875
-- OPENTOMB GENERIC STRINGS - ENGLISH LANGUAGE -- by Lwmte, Jan 2015 -- French Translation by: Joey79100. -- Translation Version: 1.0.0.0 (January 11th, 2015) -------------------------------------------------------------------------------- -- This set of strings is used globally in all engine versions for various -- m...
lgpl-3.0
v1993/cocos2d-x-lua-i18n
cocos2d-x-test/src/cocos/framework/package_support.lua
5
4015
--[[ Copyright (c) 2014-2017 Chukong Technologies Inc. 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, pu...
mit
FelixMaxwell/ReDead
entities/entities/sent_barrel_biohazard/init.lua
1
2628
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) ENT.HitSound = Sound( "Metal_Barrel.ImpactSoft" ) ENT.DieSound = Sound( "Breakable.Metal" ) ENT.Model = Model( "models/props/de_train/barrel.mdl" ) ENT.Damage = 60 ENT.Radius = 300 ENT.Skins = {2,4,5,6} function ENT:Initialize() lo...
mit
James226/track-master
TrackMaster/Tests/BustedAPITests.lua
1
3357
local LuaMock = {} LuaMock.__index = LuaMock local MockObject = {} MockObject.__index = MockObject local MockedFunction = {} MockedFunction.__index = MockedFunction function LuaMock.new() local self = setmetatable({}, LuaMock) self.mocked = {} return self end function LuaMock:Mock(obj, func, mockFunc) self:Mock...
gpl-2.0
noa/nn
NarrowTable.lua
38
1151
local NarrowTable, parent = torch.class('nn.NarrowTable', 'nn.Module') function NarrowTable:__init(offset, length) parent.__init(self) self.offset = offset self.length = length or 1 if not offset then error('nn.NarrowTable(offset, length)') end self.output = {} self.gradInput = {} end f...
bsd-3-clause
ntop/ntopng
scripts/lua/modules/alert_definitions/other/alert_dhcp_storm.lua
1
1824
-- -- (C) 2019-22 - ntop.org -- -- ############################################## local other_alert_keys = require "other_alert_keys" -- Import the classes library. local classes = require "classes" -- Make sure to import the Superclass! local alert = require "alert" local alert_entities = require "alert_entities" ...
gpl-3.0
icetoggle/skynet
test/testpipeline.lua
30
1265
local skynet = require "skynet" local redis = require "skynet.db.redis" local conf = { host = "127.0.0.1", port = 6379, db = 0 } local function read_table(t) local result = { } for i = 1, #t, 2 do result[t[i]] = t[i + 1] end return result end skynet.start(function() local db = redis.connect(conf) d...
mit
mandla99/the_king98
plugins/plugins.lua
1
7123
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY abo_shosho98 ▀▄ ▄▀ ▀▄ ▄▀ BY Th3_BOOS (@abo_shosho98 ) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY abo_shosho98 ▀▄ ▄▀ ▀▄ ▄▀ plugins : تفعيل الملفات ▀▄ ▄▀ ...
gpl-2.0
ntop/ntopng
third-party/i18n.lua-master/i18n/interpolate.lua
2
1830
local unpack = unpack or table.unpack -- lua 5.2 compat local FORMAT_CHARS = { c=1, d=1, E=1, e=1, f=1, g=1, G=1, i=1, o=1, u=1, X=1, x=1, s=1, q=1, ['%']=1 } -- matches a string of type %{age} local function interpolateValue(string, variables) return string:gsub("(.?)%%{%s*(.-)%s*}", function (previous, key) ...
gpl-3.0
Banderi/OpenTomb
scripts/strings/english/sys_notify.lua
3
3785
-- OPENTOMB SYSTEM CONSOLE NOTIFICATIONS -- by Lwmte, Apr 2015 -------------------------------------------------------------------------------- -- Here you have some global system console warnings which will frequently show. -------------------------------------------------------------------------------- sys_notify[0...
lgpl-3.0
strukturag/vlc-2.2
share/lua/modules/sandbox.lua
96
4375
--[==========================================================================[ sandbox.lua: Lua sandboxing facilities --[==========================================================================[ Copyright (C) 2007 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> This program is f...
gpl-2.0
ntop/ntopng
scripts/lua/rest/v2/import/active_monitoring/config.lua
2
1222
-- -- (C) 2019-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path package.path = dirs.installdir .. "/scripts/lua/modules/import_export/?.lua;" .. package.path require "lua_utils" local am_import_export = require "am_import_export" local rest_utils =...
gpl-3.0
ntop/ntopng
scripts/lua/rest/v1/import/active_monitoring/config.lua
2
1222
-- -- (C) 2019-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path package.path = dirs.installdir .. "/scripts/lua/modules/import_export/?.lua;" .. package.path require "lua_utils" local am_import_export = require "am_import_export" local rest_utils =...
gpl-3.0
pinghe/nginx-openresty-windows
LuaJIT-2.1-20150622/src/jit/p.lua
65
9092
---------------------------------------------------------------------------- -- LuaJIT profiler. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This modul...
bsd-2-clause
ophal/core
lighttpd.ophal.lua
2
12536
-- $Id$ --[[ develCuy's Ultimate Lua Script for running Ophal on Lighty! Thanks to Garret Albright's script for Drupal. This script handles URL rewriting, "www." addition/removal, and Boost support for Ophal installations running on the lighttpd web server daemon. These are tasks which would be handled by ".htacces...
agpl-3.0
Noneatme/MTA-NFS
client/CPlayer.lua
1
5962
-- ############################### -- ## Project: MTA:Speedrace ## -- ## Name: CPlayer ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ############################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local cSetting = {}; -- Local Settings ...
mit
mehrpouya81/gamerv2
plugins/ingroup.lua
3
32289
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
ASantosVal/vlc-extension-trials
share/lua/intf/modules/host.lua
7
12413
--[==========================================================================[ host.lua: VLC Lua interface command line host module --[==========================================================================[ Copyright (C) 2007-2012 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> ...
gpl-2.0
boundary/meter-plugin-docker
modules/_json.lua
7
34767
-- -*- 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...
apache-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/-shaders-palette/c_rtpool.lua
4
2366
-- -- c_rtpool.lua -- scx, scy = guiGetScreenSize () ----------------------------------------------------------------------------------- -- Pool of render targets ----------------------------------------------------------------------------------- RTPool = {} RTPool.list = {} function RTPool.frameStart() for rt,info...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[web]/performancebrowser/targetManager.lua
5
2578
-- -- targetmanager.lua -- --------------------------------------------------------------------------- -- -- Target manager -- -- -- --------------------------------------------------------------------------- targetList = {} addEvent('onNotifyTargetEnabled', true) addEventHandler('onNotifyTargetEnabled', resourceRoo...
mit
ntop/ntopng
scripts/lua/modules/alert_definitions/flow/alert_ndpi_http_suspicious_header.lua
1
1227
-- -- (C) 2019-22 - ntop.org -- -- ############################################## local flow_alert_keys = require "flow_alert_keys" -- Import the classes library. local classes = require "classes" -- Make sure to import the Superclass! local alert = require "alert" -- ############################################## ...
gpl-3.0
ntop/ntopng
scripts/lua/get_host_pools.lua
1
4799
-- -- (C) 2017-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local host_pools_nedge = require "host_pools_nedge" local discover = require "discover_utils" local json = require "dkjson" sendHTTPContentTypeHeader('text/html') ...
gpl-3.0
caohongtao/quick-cocos-demo
src/cocos/network/DeprecatedNetworkFunc.lua
39
1074
--tip local function deprecatedTip(old_name,new_name) print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") end --functions of WebSocket will be deprecated begin local targetPlatform = CCApplication:getInstance():getTargetPlatform() if (kTargetIphone == targetPlatf...
apache-2.0
Miigon/luvit
deps/pathjoin.lua
20
2808
--[[lit-meta name = "creationix/pathjoin" description = "The path utilities that used to be part of luvi" version = "2.0.0" tags = {"path"} license = "MIT" author = { name = "Tim Caswell" } ]] local getPrefix, splitPath, joinParts local isWindows if _G.jit then isWindows = _G.jit.os == "Windows" else ...
apache-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race_progress/script.lua
4
1577
--- -- Main server file that sends player times to the clients. -- -- @author driver2 -- @copyright 2009-2010 driver2 -- -- Changes: local g_times = {} local g_playersReady = {} addEventHandler("onGamemodeMapStart",getRootElement(), function(startedMap) g_times = {} end ) addEventHandler("onPlayerReachCheckpoi...
mit
vitaliy-orlov/nginx-lua-monitor
monitor.lua
1
1272
local requests = ngx.shared.requests_limit; local function monitor() local key = ngx.var.server_name; local status = ngx.var.status; local list = ngx.shared.requests_counter; local banned_statuses = { ['444'] = true, ['408'] = true, ['449'] = true, ['400'] = true }; local keys = { ["a"] = ...
mit
gusew/cate
examples/rules/rls_5tpl-fw1-2000.lua
1
406311
rls_5tpl_fw1_2000 = createRuleset() addRuleToRuleset(rls_5tpl_fw1_2000, {ruleAtomExact(ipv4Toi("67.192.9.36")), ruleAtomPrefix(ipv4Toi("72.212.231.160"), maskToi(29)), ruleAtomExact(750), ruleAtomExact(25), ruleAtomExact(17)}) addRuleToRuleset(rls_5tpl_fw1_2000, {ruleAtomExact(ipv4Toi("67.192.9.36")), ruleAtomPrefix(ip...
gpl-2.0
facebokiii/ghost
plugins/invite.lua
63
1107
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) or is_gbanned(result.id) then -- Ignore bans and globall bans send_large_msg(chat, 'User is banned.') else ...
gpl-2.0
maikerumine/aftermath
mods/handle_schematics/worldedit_file.lua
4
5437
------------------------------------------------------------------------------------------ -- This is the file -- https://github.com/Uberi/Minetest-WorldEdit/blob/master/worldedit/serialization.lua -- Changes: -- * worldedit namespace renamed to worldeit_file -- * eliminiated functions that are not needed -- * mad...
lgpl-2.1
Scoth42/rfkasm
fceux-2.2.2-win32/luaScripts/shapedefs.lua
3
1134
--shapedefs --A Lua script with defined functions for shapes such as hearts. --Needed for SM-Lives&HPDisplay-4Matsy.lua local function box(x1,y1,x2,y2,color) if (x1 > 0 and x1 < 255 and x2 > 0 and x2 < 255 and y1 > 0 and y1 < 241 and y2 > 0 and y2 < 241) then gui.drawbox(x1,y1,x2,y2,color); end; end; local functio...
gpl-2.0
RockySeven3161/Unknown8765
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[editor]/msgbox/script.lua
3
5455
--[[-----------DOCUMENTATION--------------- SYNTAX: guibutton,guibutton,guibutton = guiShowMessageBox ( string message, string boxType, string title [, string button1, string button2, stringbutton3] ) REQUIRED ARGUMENTS * message - The message you want in the message box * boxType - Either "warning","question","error"...
mit
longmian/skynet
lualib/mysql.lua
16
15685
-- 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
erorus/newsstand
addon/libs/LibExtraTip/Support/LibRevision.lua
1
2315
--[[ -- LibRevision.lua -- Finds the revisions of a given addon and works out the version. -- Written by Ken Allan <ken@norganna.org> -- This code is hereby released into the Public Domain without warranty. -- -- Usage: -- local libRevision = LibStub("LibRevi...
apache-2.0
ntop/ntopng
scripts/lua/host_details_ndpi_categories.lua
1
1857
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local graph_utils = require "graph_utils" local categories_utils = require "categories_utils" sendHTTPContentTypeHeader('text/html') local ifid = _GET["ifid...
gpl-3.0
James226/track-master
TrackMaster/Tests/APITests.lua
1
4866
--local LuaUnit = require('luaunit') local LuaMock = {} LuaMock.__index = LuaMock local MockObject = {} MockObject.__index = MockObject local MockedFunction = {} MockedFunction.__index = MockedFunction function LuaMock.new() local self = setmetatable({}, LuaMock) self.mocked = {} return self end function LuaMock...
gpl-2.0
1yvT0s/wrk
deps/luajit/src/jit/dump.lua
84
19509
---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -...
apache-2.0
ntop/ntopng
scripts/lua/pods_stats.lua
1
1682
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local page_utils = require("page_utils") sendHTTPContentTypeHeader('text/html') page_utils.set_active_menu_entry(page_utils.menu_entries.pods) dofile(dirs...
gpl-3.0
mohammadspemmer/mamad
plugins/delall.lua
1
1483
-----my_name_is_ehsan*#@www_sik_ir -----@mohammadbots FOR UPDATE -----لطفا پیام بالا رو پاک نکنید local function getChatId(chat_id) local chat = {} local chat_id = tostring(chat_id) if chat_id:match('^-100') then local channel_id = chat_id:gsub('-100', '') chat = {ID = channel_id, type = 'channel'} ...
gpl-3.0
ntop/ntopng
scripts/lua/modules/check_definitions/flow/iec_invalid_command_transition.lua
1
1071
-- -- (C) 2019-22 - ntop.org -- local checks = require("checks") local flow_alert_keys = require "flow_alert_keys" local IEC_INVALID_TRANSITION_KEY = "ntopng.checks.iec104_invalid_command_transition_enable" -- ################################################################# local script = { -- Script category ...
gpl-3.0
RobLoach/love
src/modules/math/wrap_Math.lua
2
3455
R"luastring"--( -- DO NOT REMOVE THE ABOVE LINE. It is used to load this file as a C++ string. -- There is a matching delimiter at the bottom of the file. --[[ Copyright (c) 2006-2016 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be hel...
gpl-3.0
RobLoach/love
src/libraries/luasocket/libluasocket/tp.lua
146
3608
----------------------------------------------------------------------------- -- Unified SMTP/FTP subsystem -- LuaSocket toolkit. -- Author: Diego Nehab -- RCS ID: $Id: tp.lua,v 1.22 2006/03/14 09:04:15 diego Exp $ ----------------------------------------------------------------------------- --------------------------...
gpl-3.0
corbinmunce/domoticz
scripts/dzVents/examples/simple room heating with hysteresis control.lua
19
3118
-- assumptions: -- the setpoint is set by a selector dummy device where the values are numeric temperatures -- but you can easily change it to a setpoint device local BOILER_DEVICE = 'Boiler' -- switch device local SETPOINT_DEVICE = 'Setpoint' -- selector dummy device local TEMPERATURE_SENSOR = 'Temperature' local HYS...
gpl-3.0
spark051/bt.bot
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
adib1380/BotiSmylife
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
maikerumine/aftermath
mods/carts/cart_entity.lua
4
10676
local cart_entity = { physical = false, -- otherwise going uphill breaks collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, visual = "mesh", mesh = "carts_cart.b3d", visual_size = {x=1, y=1}, textures = {"carts_cart.png"}, driver = nil, punched = false, -- used to re-send velocity and position velocity = {x=0,...
lgpl-2.1
caohongtao/quick-cocos-demo
runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/framework/device.lua
17
10490
--[[ 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
mtyzaq/extra
packages/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan3/mwan3_adv_hotplug.lua
9
2003
-- ------ hotplug script configuration ------ -- fs = require "nixio.fs" sys = require "luci.sys" ut = require "luci.util" script = "/etc/hotplug.d/iface/16-mwan3custom" scriptbak = "/etc/hotplug.d/iface/16-mwan3custombak" if luci.http.formvalue("cbid.luci.1._restorebak") then -- restore button has been clicked luc...
gpl-2.0
rigeirani/a
plugins/time.lua
771
2865
-- Implement a command !time [area] which uses -- 2 Google APIs to get the desired result: -- 1. Geocoding to get from area to a lat/long pair -- 2. Timezone to get the local time in that lat/long location -- Globals -- If you have a google api key for the geocoding/timezone api api_key = nil base_api = "https://m...
gpl-2.0
gabstv/pzomboid_GTV_Thieves
media/lua/client/GThieves/G_OnDismantleTimedAction.lua
1
4769
require "TimedActions/ISBaseTimedAction" G_OnDismantleTimedAction = ISBaseTimedAction:derive("G_OnDismantleTimedAction"); function G_OnDismantleTimedAction:isValid() return self.character:getInventory():contains("Screwdriver") end function G_OnDismantleTimedAction:start() if self.maxTime < 201 then getSoundMana...
mit
maikerumine/aftermath
mods/pathogen/gosirea/init.lua
2
1390
pathogen.register_pathogen("gosirea", { description = "Symptons include gas. Carrier contaminates surfaces nearby. Not deadly for those that have good health", symptoms = 10, latent_period = 120, infection_period = 420, on_infect = function( infection ) local _player = minetest.get_player_by_name( infecti...
lgpl-2.1
cere-bro/telegram-bot
plugins/rae.lua
616
1312
do function getDulcinea( text ) -- Powered by https://github.com/javierhonduco/dulcinea local api = "http://dulcinea.herokuapp.com/api/?query=" local query_url = api..text local b, code = http.request(query_url) if code ~= 200 then return "Error: HTTP Connection" end dulcinea = json:decode(b) ...
gpl-2.0
OmegaExtern/gmod-login-system
lua/convars.lua
1
7946
--[[ -- convars.lua -- License: The MIT License (MIT) < http://opensource.org/licenses/MIT > -- Author: OmegaExtern < https://github.com/OmegaExtern > < omegaextern@live.com > --]] if not CLIENT then return end require("login_system") -- require includes/modules/login_system module. --require("switch_statement") -...
mit
v1993/cocos2d-x-lua-i18n
cocos2d-x-test/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua
61
3456
if nil == ccs then return end --tip local function deprecatedTip(old_name,new_name) print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") end --functions of GUIReader will be deprecated begin local GUIReaderDeprecated = { } function GUIReaderDeprecated.shareRe...
mit
xianjiec/nn
Parallel.lua
10
3920
local Parallel, parent = torch.class('nn.Parallel', 'nn.Container') function Parallel:__init(inputDimension,outputDimension) parent.__init(self) self.modules = {} self.inputDimension = inputDimension self.outputDimension = outputDimension end function Parallel:updateOutput(input) local nModule=input:si...
bsd-3-clause
atsushieno/jenoa
jni/dyncall/test/call_suite/mk-cases.lua
2
1570
require"math" local max = math.max local maxargs = 0 function trim(l) return l:gsub("^%s+",""):gsub("%s+$","") end function mkcase(id,sig) local sig = trim(sig) local h = { "/* ",id,":",sig," */ ",sig:sub(1,1), " f", id,"(",""} local t = { "fid=",id,";" } local pos = 0 maxargs = max(maxargs, #sig-1) for i ...
mit