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
IsaacHart/sbmod-grandarm-pre
items/buildscripts/buildrandthrown.lua
1
5864
require "/scripts/util.lua" require "/scripts/vec2.lua" require "/scripts/versioningutils.lua" require "/scripts/staticrandom.lua" function build(directory, config, parameters, level, seed) local configParameter = function(keyName, defaultValue) if parameters[keyName] ~= nil then return parameters[keyName]...
gpl-3.0
pinghe/nginx-openresty-windows
lua-resty-dns-0.14/t/lib/ljson.lua
76
1871
local ngx_null = ngx.null local tostring = tostring local byte = string.byte local gsub = string.gsub local sort = table.sort local pairs = pairs local ipairs = ipairs local concat = table.concat local ok, new_tab = pcall(require, "table.new") if not ok then new_tab = function (narr, nrec) return {} end end local...
bsd-2-clause
pinghe/nginx-openresty-windows
lua-resty-mysql-0.15/t/lib/ljson.lua
76
1871
local ngx_null = ngx.null local tostring = tostring local byte = string.byte local gsub = string.gsub local sort = table.sort local pairs = pairs local ipairs = ipairs local concat = table.concat local ok, new_tab = pcall(require, "table.new") if not ok then new_tab = function (narr, nrec) return {} end end local...
bsd-2-clause
pinghe/nginx-openresty-windows
ngx_lua_upstream-0.03/t/lib/ljson.lua
76
1871
local ngx_null = ngx.null local tostring = tostring local byte = string.byte local gsub = string.gsub local sort = table.sort local pairs = pairs local ipairs = ipairs local concat = table.concat local ok, new_tab = pcall(require, "table.new") if not ok then new_tab = function (narr, nrec) return {} end end local...
bsd-2-clause
reedscot/icml2016
main_txt_coco.lua
2
6961
--[[ Train a text encoder. --]] require 'torch' require 'nn' require 'nngraph' require 'optim' opt = { numCaption = 1, encoder = 'rnn', cnn_dim = 512, save_every = 100, print_every = 1, dataset = 'coco', img_dir = '', filenames = '', data_root = '/home/reedscot/data/cub_files6', checkpoint_dir =...
mit
xianjiec/nn
lib/THNN/doc/generate_reference.lua
16
3724
--[[ This script regenerates api_reference.md based on comments placed in THNN.h. ]]-- local header = [[ # API docs This document only describes a THNN API. For a thorough review of all modules present here please refer to [nn's docs](http://github.com/torch/nn/tree/master/doc). ### Note on function names Please ...
bsd-3-clause
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race/rankingboard_client.lua
4
9750
local sx,sy = guiGetScreenSize() RankingBoard = {} RankingBoard.__index = RankingBoard RankingBoard.instances = {} local screenWidth, screenHeight = guiGetScreenSize() local topDistance = 250 local bottomDistance = 0.26*screenHeight local posLeftDistance = 30 local nameLeftDistance = 60 local labelHeight = 16 local...
mit
mega9/GTW-RPG
[resources]/GTWgrouplogs/log.lua
1
2931
local sx, sy = guiGetScreenSize() function makeLogGUI() log = guiCreateWindow((sx / 2) - (694 / 2), (sy / 2) - (526 / 2), 694, 526, "Log", false) guiWindowSetSizable(log , false) guiSetAlpha(log , 1.00) guiSetVisible(log, false) nameEdit = guiCreateEdit(9, 22, 152, 30, "", false, log) searchEdit = guiCreateEdi...
gpl-3.0
gusew/cate
examples/rulesizes-fw1.lua
1
2619
algLinSearch = createAlgorithm("../algorithms/lib/LinearSearch5tpl.so", {10000}) algBitvector = createAlgorithm("../algorithms/lib/Bitvector5tpl.so", {10000}) algTuples = createAlgorithm("../algorithms/lib/TupleSpace5tpl.so", {10000, 107}) algHiCuts = createAlgorithm("../algorithms/lib/HiCuts5tpl.so", {10000, 36, 3.0})...
gpl-2.0
vikas17a/Algorithm-Implementations
Sieve_of_Eratosthenes/Lua/Yonaba/sieve_test.lua
27
1175
-- Tests for sieve.lua local sieve = require 'sieve' 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 statu...
mit
mamadtnt/um
plugins/pokedex.lua
626
1668
do local images_enabled = true; local function get_sprite(path) local url = "http://pokeapi.co/"..path print(url) local b,c = http.request(url) local data = json:decode(b) local image = data.image return image end local function callback(extra) send_msg(extra.receiver, extra.text, ok_cb, false) end lo...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/admin/client/gui/admin_maps.lua
4
8280
--[[********************************** * * Multi Theft Auto - Admin Panel * * gui\admin_maps.lua * * Original File by eXo|Flobu * **************************************]] aGamemodeMapTable = {} function createMapTab() aTabMap = {} aTabMap.Tab = guiCreateTab ( "Maps", aTabPanel, "maps" ) aTabMap.MapListSearch = gu...
mit
eaufavor/AwesomeWM-powerarrow-dark
blind/arrow/task.lua
1
7893
local capi = {timer=timer,client=client} local awful = require( "awful" ) local color = require( "gears.color" ) local cairo = require( "lgi" ).cairo local client = require( "awful.client" ) local themeutils = require( "blind.common.drawing" ) local radical = require( ...
apache-2.0
maikerumine/aftermath
mods/cottages/UNUSED/nodes_doorlike.lua
5
15838
----------------------------------------------------------------------------------------------------------- -- These nodes are all like doors in a way: -- * window shutters (they open on right-click and when it turns day; they close at night) -- * a half-door where the top part can be opened seperately from the bott...
lgpl-2.1
ntop/ntopng
scripts/lua/rest/v2/charts/time/data.lua
2
1238
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local rest_utils = require("rest_utils") local epoch_begin = tonumber(_GET["epoch_begin"]) local epoch_end = tonumber(_GET["epoch_end"]) local num_rec...
gpl-3.0
pinghe/nginx-openresty-windows
luajit-root/luajit/share/luajit-2.1.0-alpha/jit/dump.lua
17
19737
---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -...
bsd-2-clause
blr246/midi-machine
lua/test_util.lua
1
1368
--[ -- Testing function utils. -- -- (c) 2014 Brandon L. Reiss --] test_util = {} --- Simple equality assertion. Types must be comparable with ~=. function test_util.assert_equals(_msg, _expected, _actual) msg = _actual and _msg or nil expected = _actual and _expected or _msg actual = _actual or _expected...
bsd-3-clause
mamadtnt/um
plugins/LinkPv.lua
46
31163
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
mohammadclashclash/mehdi002
plugins/inrealm.lua
287
25005
-- 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
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race/_common.lua
4
10447
-- -- common.lua -- Common setting for server and client -- --_DEBUG_LOG = {'UNDEF','MISC','OPTIMIZATION','TOPTIMES','STATE','JOINER','TIMER','RANDMAP','CHECKPOINT','CP','SPECTATE'} -- More logging --_DEBUG_TIMING = true -- Introduce delays --_DEBUG_CHECKS = true -- Extra checks _TESTING = false ...
mit
huangleiBuaa/CenteredWN
models/googlenetbn.lua
1
4425
-- Batch normalized googlenet --this code is from: https://github.com/soumith/imagenet-multiGPU.torch local function inception(input_size, config) local concat = nn.Concat(2) if config[1][1] ~= 0 then local conv1 = nn.Sequential() conv1:add(nn.SpatialConvolution(input_size, config[1][1],1,1,1,1)):add(...
bsd-2-clause
RockySeven3161/Unknown8765
plugins/help.lua
337
5009
do 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
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race_traffic_sensor/trafficsensor_client.lua
4
7294
-- -- traffic_sensor_client.lua -- --------------------------------------------------------------------------- -- -- Handle events from Race -- --------------------------------------------------------------------------- addEventHandler('onClientResourceStart', g_ResRoot, function() -- Bigdar.setHotKey( 'F4' ) -- U...
mit
Element-Research/dataload
utils.lua
2
7156
local dl = require 'dataload._env' -- Temporarily changes the current working directory to call fn, -- returning its result. function dl.withcwd(path, fn) local curdir = lfs.currentdir() lfs.chdir(path) local res = fn() lfs.chdir(curdir) return res end -- Downloads srcurl into dstdir. -- If existfile ...
bsd-3-clause
alirezanile/last-slept
plugins/inrealm.lua
228
16974
-- 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_group_ch...
gpl-2.0
ntop/ntopng
scripts/lua/modules/lists_utils.lua
1
26119
-- -- (C) 2019-22 - ntop.org -- local lists_utils = {} local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path local os_utils = require("os_utils") local categories_utils = require("categories_utils") local json = require("dkjson") local alerts_api = require("alerts...
gpl-3.0
trompetin17/wxFormBuilder-Atlas
build/premake/4.3/src/actions/vstudio/vs2005_csproj.lua
7
7426
-- -- vs2005_csproj.lua -- Generate a Visual Studio 2005/2008 C# project. -- Copyright (c) 2009-2010 Jason Perkins and the Premake project -- -- -- Set up namespaces -- premake.vstudio.cs2005 = { } local vstudio = premake.vstudio local cs2005 = premake.vstudio.cs2005 -- -- Figure out what elements a particular ...
gpl-2.0
severak/mapstyles
colorize/colorize.lua
1
2502
package.path = '../lualibs/?.lua;' .. package.path require 'mapdef' local colorbook = require 'colorbook' local legend = require 'legend' local openmaptiles = require 'openmaptiles' -- možné prvky -- TODO: nehádat filtry v openmaptiles, ale mít je přímo napsané zde: local F_WATER = {waterway=ANY, landuse='reservoir...
mit
lizh06/premake-4.x
tests/actions/xcode/test_xcode4_workspace.lua
33
2157
T.xcode4_workspace = { } local suite = T.xcode4_workspace --[[suite.--]]local CONSTANT_PROJECT_NAME = "MyProject" local sln, prj function suite.teardown() sln = nil prj = nil end function suite.setup() _ACTION = "xcode4" sln = solution "MySolution" configurations { "Debug", "Release" } platfo...
bsd-3-clause
numo16/wesnoth
data/multiplayer/eras.lua
26
3479
local helper = wesnoth.require "lua/helper.lua" local T = helper.set_wml_tag_metatable {} local res = {} res.quick_4mp_leaders = function(args) local make_4mp_leaders_quick = wesnoth.get_variable("make_4mp_leaders_quick") if make_4mp_leaders_quick == nil then make_4mp_leaders_quick = wesnoth.game_config.mp_settin...
gpl-2.0
ildar-shaimordanov/tea-set
etc/Far3/Profile/Macros/scripts/Shell.CmdLine.CursorMovement.lua
1
1958
--[[ This macro is simplified and improved version of the macro Shell_CmdLine.lua having the same functionality and borrowed here: https://forum.farmanager.com/viewtopic.php?p=93265#p93265 ]] local function CursorMoveHome(SelectText) local SelStart, SelEnd = 0, 0 if SelectText then SelStart, SelEnd = panel.Get...
mit
numo16/wesnoth
data/ai/micro_ais/cas/ca_herding_herd_sheep.lua
26
3193
local H = wesnoth.require "lua/helper.lua" local AH = wesnoth.require "ai/lua/ai_helper.lua" local herding_area = wesnoth.require "ai/micro_ais/cas/ca_herding_f_herding_area.lua" local function get_dogs(cfg) local dogs = AH.get_units_with_moves { side = wesnoth.current.side, { "and", cfg.filter } ...
gpl-2.0
icetoggle/skynet
lualib/sproto.lua
31
5663
local core = require "sproto.core" local assert = assert local sproto = {} local host = {} local weak_mt = { __mode = "kv" } local sproto_mt = { __index = sproto } local sproto_nogc = { __index = sproto } local host_mt = { __index = host } function sproto_mt:__gc() core.deleteproto(self.__cobj) end function sproto...
mit
ac-minetest/smart_mobs
stonemonster.lua
1
1130
-- Stone Monster by PilzAdam mobs:register_mob("mobs:stone_monster", { type = "monster", passive = false, attack_type = "dogfight", reach = 2, damage = 3, hp_min = 12, hp_max = 35, armor = 80, collisionbox = {-0.4, -1, -0.4, 0.4, 0.9, 0.4}, visual = "mesh", mesh = "mobs_stone_monster.b3d", textures = { ...
mit
eaufavor/AwesomeWM-powerarrow-dark
extern/vicious/widgets/thermal.lua
1
1534
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> --------------------------------------------------- -- {{{ Grab environment local type = type local tonumber = tonumber local setmetatable = setmetatable local string =...
apache-2.0
lizh06/premake-4.x
tests/actions/vstudio/vc2010/test_config_props.lua
52
2040
-- -- tests/actions/vstudio/vc2010/test_config_props.lua -- Validate generation of the configuration property group. -- Copyright (c) 2011-2013 Jason Perkins and the Premake project -- T.vstudio_vs2010_config_props = { } local suite = T.vstudio_vs2010_config_props local vc2010 = premake.vstudio.vc2010 local projec...
bsd-3-clause
ckaotik/ckaosCraft
config.lua
1
2605
local addonName, addon, _ = ... local function GetProfessionLabel(key, value) local profession = select(key, GetProfessions()) local name, icon, rank, maxRank, numSpells, spelloffset, skillLine, rankModifier, specializationIndex, specializationOffset = GetProfessionInfo(profession) local label = '|T' .. icon .. ':0...
bsd-3-clause
vikas17a/Algorithm-Implementations
Symmetric_Difference/Lua/Yonaba/symdiff_test.lua
26
1051
-- Tests for symmdiff.lua local symdiff = require 'symdiff' 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 loca...
mit
Banderi/OpenTomb
scripts/gameflow/TR5.lua
2
4096
-- Gameflow Script for OpenTomb -- Game: Tomb Raider: V -- Version: 1.0 -- By: Gh0stBlade ---------------------------------------------------------------------------------------------------------------------------------------------- gameflow_paths[GAME_5].numlevels = 17; ---------------------------------------------...
lgpl-3.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/anti/ping.lua
4
3318
---------------------------------------------- -- Ping checker, sends a request to client, -- -- client checks if downloading, responds, -- -- server double-checks and kicks if needed -- -- Also does check for stuck 0-ping players -- ---------------------------------------------- local pingLimit1 = 250 local pingLimit...
mit
dangowrt/packages
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua
111
1535
-- ------ member configuration ------ -- ds = require "luci.dispatcher" m5 = Map("mwan3", translate("MWAN Member Configuration")) m5:append(Template("mwan/config_css")) mwan_member = m5:section(TypedSection, "member", translate("Members"), translate("Members are profiles attaching a metric and weight to an MWAN ...
gpl-2.0
jgrahamc/aho-corasick-lua
test.lua
2
2485
local AC = require 'aho-corasick' local count = 0 function error(e, t) print(count .. " " .. e) os.exit() end function test(s, d, r) count = count + 1 local t = AC.build(d) local f = AC.match(t, s) if #r ~= #f then error("Wrong number of results " .. #r .. ", " .. #f, t) end ...
bsd-3-clause
nsimplex/snailking
scripts/snailking/rc/defaults.lua
1
1416
------ ---- [Default configurations] ---- ---- Modify rc.lua instead. ------ return function() --- --- All measures of time are in seconds. --- STRINGS.NAMES.SNAILKING = "Snail King" STRINGS.CHARACTERS.GENERIC.DESCRIBE.SNAILKING = "It's a... thing. A big one." --[[ -- The builds in place are: -- "snailkin...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race/modes/manhunt.lua
3
13347
Manhunt = setmetatable({}, RaceMode) Manhunt.__index = Manhunt Manhunt:register('Manhunt') Manhunt.modeOptions = { duration = 5 * 60 * 1000, respawn = 'timelimit', respawntime = 5, autopimp = false, autopimp_map_can_override = false, } Manhunt.name = 'Manhunt' Manhunt.VictimTeamName = "Victim" Manhunt.VictimCol...
mit
nuvie/nuvie
data/scripts/md/intro.lua
1
58968
local lua_file = nil --load common functions lua_file = nuvie_load("common/intro_common.lua"); lua_file(); local FREUD_STATE_STARING = 0 local FREUD_STATE_WRITING = 1 local function origin_fx_sequence() local g_img_tbl = image_load_all("title.lzc") canvas_set_palette("strax.pal", 0) local stars =...
gpl-2.0
nuvie/nuvie
data/scripts/md/look.lua
1
9412
function look_pocketwatch(obj) printl("THE_TIME_IS") local am = true local hour = clock_get_hour() local minute = clock_get_minute() if hour >= 12 then am = false end if hour > 12 then hour = hour - 12 end local time = "TIME_AM" if am == false then time = "TIME_PM" end p...
gpl-2.0
mega9/GTW-RPG
[resources]/GTWfastfood/data.lua
1
6687
--[[ ******************************************************************************** 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
ac-minetest/smart_mobs
dirtmonster.lua
1
1081
-- Dirt Monster by PilzAdam mobs:register_mob("mobs:dirt_monster", { type = "monster", passive = false, attack_type = "dogfight", reach = 2, damage = 2, hp_min = 3, hp_max = 27, armor = 100, collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4}, visual = "mesh", mesh = "mobs_stone_monster.b3d", textures = { {"...
mit
icetoggle/skynet
service/cdummy.lua
94
1797
local skynet = require "skynet" require "skynet.manager" -- import skynet.launch, ... local globalname = {} local queryname = {} local harbor = {} local harbor_service skynet.register_protocol { name = "harbor", id = skynet.PTYPE_HARBOR, pack = function(...) return ... end, unpack = skynet.tostring, } skynet.reg...
mit
FelixMaxwell/ReDead
gamemode/vgui/vgui_categorybutton.lua
1
3402
local PANEL = {} PANEL.OnSound = Sound( "common/talk.wav" ) PANEL.OffSound = Sound( "weapons/sniper/sniper_zoomin.wav" ) surface.CreateFont ( "CategoryButton", { size = 16, weight = 500, antialias = true, additive = false, font = "Typenoksidi" } ) function PANEL:Init() //self:SetTitle( "" ) //self:ShowCloseButton...
mit
spark051/bt.bot
plugins/isX.lua
605
2031
local https = require "ssl.https" local ltn12 = require "ltn12" local function request(imageUrl) -- 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 api_key = mashape.api_key if ...
gpl-2.0
mohammad8/123456
plugins/isX.lua
605
2031
local https = require "ssl.https" local ltn12 = require "ltn12" local function request(imageUrl) -- 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 api_key = mashape.api_key if ...
gpl-2.0
focusworld/focus
plugins/isX.lua
605
2031
local https = require "ssl.https" local ltn12 = require "ltn12" local function request(imageUrl) -- 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 api_key = mashape.api_key if ...
gpl-2.0
mamadtnt/um
plugins/isX.lua
605
2031
local https = require "ssl.https" local ltn12 = require "ltn12" local function request(imageUrl) -- 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 api_key = mashape.api_key if ...
gpl-2.0
ntop/ntopng
scripts/lua/host_http_breakdown.lua
1
3550
-- -- (C) 2019-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPContentTypeHeader('text/html') interface.select(ifname) local host_info = url2hostinfo(_GET) local mode = _GET["http_mode"] local host = interface...
gpl-3.0
ntop/ntopng
scripts/lua/sprobe_host_process_data.lua
1
3097
-- -- (C) 2013-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPHeader('application/json') host_ip = _GET["host"] interface.select(ifname) flows_stats = interface.getFlowsInfo(host_ip) flows_stats = flows_stats["flows...
gpl-3.0
Altenius/cuberite
Server/Plugins/APIDump/Hooks/OnPlayerBrokenBlock.lua
44
1564
return { HOOK_PLAYER_BROKEN_BLOCK = { CalledWhen = "After a player has broken a block. Notification only.", DefaultFnName = "OnPlayerBrokenBlock", -- also used as pagename Desc = [[ This function is called after a {{cPlayer|player}} breaks a block. The block is already removed from the {{cWorld|world}} a...
apache-2.0
Mordenak/Minecraft_CC_Scripts
energy_monitor.lua
1
6050
--Device detection isError=0 function detectDevice(DeviceName) DeviceSide="none" for k,v in pairs(redstone.getSides()) do if peripheral.getType(v)==DeviceName then DeviceSide = v break end end return(DeviceSide) end function get_average(t) local sum = 0 local count = 0 for k,v in pairs(t) d...
mit
timm/sandbox
ranger/tests/abcd.lua
1
1112
#!/usr/bin/env lua -- vim: ts=2 sw=2 sts=2 expandtab:cindent:formatoptions+=cro --------- --------- --------- --------- --------- ---------~ package.path = '../src/?.lua;' .. package.path require "lib" require "ok" require "abcd" ok { abcd = function() end} -- === Confusion Matrix === -- a b c <-- ...
bsd-3-clause
vikas17a/Algorithm-Implementations
Minimax/Lua/Yonaba/handlers/tree_handler.lua
78
1131
-- Search tree class handler implementation local PATH = (...):gsub('handlers.tree_handler$','') local class = require (PATH .. '.utils.class') local tree = class () -- Tree initialization function tree:initialize() self.nodes = {} end -- Adds a node in the tree function tree:addNode(name, parent, value) asser...
mit
graydon/monotone
tests/db_check_and_non-serious_errors/__driver__.lua
1
1218
mtn_setup() -- Make sure that db check detects minor problems, but doesn't complain -- about them too loudly (and doesn't exit with error status). writefile("fileX", "blah blah") writefile("fileY", "stuff stuff") addfile("testfile", "more stuff") commit() rev = base_revision() check(mtn("cert", rev, "author", "ext...
gpl-2.0
vikas17a/Algorithm-Implementations
Fisher-Yates/Lua/Yonaba/fisher_yates_test.lua
27
1376
-- Tests for fisher_yates.lua local shuffle = require 'fisher_yates' 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 loc...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/acpanel/c_model_switcher.lua
4
1367
-- -- Anti-Cheat Control Panel -- -- c_model_switcher.lua -- modifiedPlayerModels = {} function receiveModifiedPlayerModels(list) modifiedPlayerModels = list setTimer(checkForModifiedPlayerModel, 1000, 0) end addEvent("acpanel.gotModifiedPlayerModelsList", true) addEventHandler("acpanel.gotModifiedPlayerModelsList"...
mit
shangjiyu/openwrt-extra
packages/luci-app-phddns/luasrc/model/cbi/admin_services/subversion.lua
4
1098
local sys = require "luci.sys" local datatypes = require "luci." local uci = require "luci.model.uci" local cur = uci.cursor(); local http = require "luci.http"; local _ = luci.i18n.translate m = Map("subversion", "Subversion Server", _("This page allows you to set Subversion Server.")) m.on_after_commit = funct...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[misc]/[discord]/discord/discord.lua
3
3620
addEvent("onDiscordPacket") local socket = false function createSocketFromConfig() local channel = get("channel") local passphrase = get("passphrase") local hostname = get("hostname") local port = tonumber(get("port")) if not channel or not passphrase or not hostname or not port then retu...
mit
lemones/dotfiles
home/.config/awesome/lain/widget/weather.lua
2
6726
--[[ Licensed under GNU General Public License v2 * (c) 2015, Luke Bonham --]] local helpers = require("lain.helpers") local json = require("lain.util").dkjson local focused = require("awful.screen").focused local naughty = require("naughty") local wibox = require("wibox") local math, os, strin...
gpl-3.0
noa/nn
DepthConcat.lua
43
4471
------------------------------------------------------------------------ --[[ DepthConcat ]]-- -- Concatenates the output of Convolutions along the depth dimension -- (nOutputFrame). This is used to implement the DepthConcat layer -- of the Going deeper with convolutions paper : -- http://arxiv.org/pdf/1409.4842v1.pdf ...
bsd-3-clause
xianjiec/nn
SpatialFullConvolutionMap.lua
19
2597
local SpatialFullConvolutionMap, parent = torch.class('nn.SpatialFullConvolutionMap', 'nn.Module') function SpatialFullConvolutionMap:__init(conMatrix, kW, kH, dW, dH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.kW = kW self.kH = kH self.dW = dW self.dH = dH self.connTable = conMatrix ...
bsd-3-clause
ntop/ntopng
scripts/lua/admin/edit_configset.lua
1
4436
-- -- (C) 2019-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local ts_utils = require("ts_utils") local info = ntop.getInfo() local page_utils = require("page_utils") local format_utils = require("format_utils") local ...
gpl-3.0
ophal/core
includes/mobile.lua
2
9941
local seawolf = require 'seawolf'.__build('text', 'text.preg', 'variable') local _SERVER, pairs, rawget = _SERVER, pairs, rawget local strpos, empty = seawolf.text.strpos, seawolf.variable.empty local substr = seawolf.text.substr local tconcat, tinsert = table.concat, table.insert local preg = require 'seawolf.text.pre...
agpl-3.0
corbinmunce/domoticz
dzVents/runtime/device-adapters/zwave_thermostat_mode_device.lua
7
1119
return { baseType = 'device', name = 'Z-Wave Thermostat mode device adapter', matches = function(device, adapterManager) local res = (device.deviceSubType == 'Thermostat Mode') if (not res) then adapterManager.addDummyMethod(device, 'updateMode') end return res end, process = function(device, data, ...
gpl-3.0
noa/nn
SpatialMaxPooling.lua
33
1531
local SpatialMaxPooling, parent = torch.class('nn.SpatialMaxPooling', 'nn.Module') function SpatialMaxPooling:__init(kW, kH, dW, dH, padW, padH) parent.__init(self) dW = dW or kW dH = dH or kH self.kW = kW self.kH = kH self.dW = dW self.dH = dH self.padW = padW or 0 self.padH = padH or...
bsd-3-clause
ntop/ntopng
scripts/lua/modules/alert_definitions/flow/alert_ndpi_clear_text_credentials.lua
1
1144
-- -- (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
spark051/bt.bot
plugins/exchange.lua
352
2076
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 function comma_value(n) -- credit http://richard.warburton.it local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race_ghost/record_client.lua
3
12483
GhostRecord = {} GhostRecord.__index = GhostRecord enableRecording = true addEvent"onClientMapStarting" addEvent"onClientPlayerOutOfTime" addEvent( "onClientPlayerPickUpRacePickup", true ) addEvent( "onClientPlayerRaceWasted", true ) addEvent( "onClientPlayerFinished", true ) local recordEnabled = true addCommandHan...
mit
maikerumine/aftermath
mods/farming/tomato.lua
3
4124
--= Tomato (Original textures from link below) -- http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9) minetest.register_craftitem("farming:tomato", { description = "Tomato", inventory_image = "farming_tomato.png", on_place = function(it...
lgpl-2.1
cere-bro/telegram-bot
plugins/yoda.lua
642
1199
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 request(text) local api = "https://yoda.p.mashape.com/yoda?" text = ...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race_sphud/camera.lua
4
3536
---------------------------------------------------------- -- Some old script I made, which spectates your vehicle -- -- exploding from a different camera point (SDK) -- ---------------------------------------------------------- local g_Me = getLocalPlayer() local g_MapRunning = true local g_MapOptions local g_Matrix...
mit
solid021/TeleBeyond
plugins/gm.lua
7
11384
-- 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 "This service is private for SUDO (@shayansoft)" end local group_creator = msg.from.print_name ...
gpl-2.0
FelixMaxwell/ReDead
entities/effects/headshot/init.lua
1
1544
function EFFECT:Init( data ) local pos = data:GetOrigin() local emitter = ParticleEmitter( pos ) local particle = emitter:Add( "effects/blood_core", pos ) particle:SetDieTime( 0.3 ) particle:SetStartAlpha( 255 ) particle:SetEndAlpha( 0 ) particle:SetStartSize( math.random( 5, 10 ) ) particle:SetEndSize( m...
mit
graydon/monotone
tests/(imp)_persistent_netsync_server_-_keys_2/__driver__.lua
1
1160
include("/common/netsync.lua") mtn_setup() netsync.setup() -- This tests a somewhat subtle version of how public keys are handled -- with netsync. The rule is, we serve a key if we're serving any cert -- signed by that key. The question is, if when we boot up the server -- we already have the key in question, but i...
gpl-2.0
strukturag/vlc-2.2
share/lua/playlist/break.lua
113
1995
--[[ $Id$ Copyright © 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 distribut...
gpl-2.0
FelixMaxwell/ReDead
entities/effects/c4_explosion/init.lua
1
5309
function EFFECT:Init( data ) local pos = data:GetOrigin() local emitter = ParticleEmitter( pos ) for i=1,math.random(10,15) do local particle = emitter:Add( "particles/smokey", pos ) particle:SetVelocity( Vector(math.random(-90, 90),math.random(-90, 90), math.random(-70, 70) ) ) particle:SetDieTime(...
mit
Miigon/luvit
deps/process.lua
2
4553
--[[ 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
caohongtao/quick-cocos-demo
src/framework/cc/ui/UIListViewItem.lua
9
4092
--[[ 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
spam2017/delete_tg
plugins/tools.lua
1
21462
--Begin Tools.lua :) local SUDO = 123456789 -- put Your ID here! <=== local function index_function(user_id) for k,v in pairs(_config.admins) do if user_id == v[1] then print(k) return k end end -- If not found return false end local function getindex(t,id) for i,v in pairs(t) do if v == i...
gpl-3.0
Miigon/luvit
tests/test-tls-connect-session-reuse.lua
9
2251
require('tap')(function (test) local fixture = require('./fixture-tls') local tls = require('tls') local timer = require('timer') local options = { cert = fixture.certPem, key = fixture.keyPem } local serverConnected = 0 local clientConnected = 0 local server local client1, client2 local ...
apache-2.0
ntop/ntopng
scripts/lua/modules/host_threshold_check_rules.lua
1
5241
-- -- (C) 2013-22 - ntop.org -- -- -- Module used to build threshold-based timeseries checks -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local ts_utils = require "ts_utils" local callback_utils = require "callback_utils" local json = re...
gpl-3.0
vikas17a/Algorithm-Implementations
Depth_Limited_Search/Lua/Yonaba/handlers/gridmap_handler.lua
182
2356
-- A grid map handler -- Supports 4-directions and 8-directions moves -- This handler is devised for 2d bounded grid where nodes are indexed -- with a pair of (x, y) coordinates. It features straight (4-directions) -- and diagonal (8-directions) moves. local PATH = (...):gsub('handlers.gridmap_handler$','') local Nod...
mit
gusew/cate
examples/rules/rls_5tpl-fw1-200.lua
1
40118
rls_5tpl_fw1_200 = createRuleset() addRuleToRuleset(rls_5tpl_fw1_200, {ruleAtomPrefix(ipv4Toi("55.42.61.160"), maskToi(30)), ruleAtomExact(ipv4Toi("67.210.251.193")), ruleAtomExact(750), ruleAtomExact(67), ruleAtomExact(17)}) addRuleToRuleset(rls_5tpl_fw1_200, {ruleAtomPrefix(ipv4Toi("55.42.61.168"), maskToi(29)), rule...
gpl-2.0
longmian/skynet
lualib/skynet/injectcode.lua
108
2610
local debug = debug local table = table local FUNC_TEMP=[[ local $ARGS return function(...) $SOURCE end, function() return {$LOCALS} end ]] local temp = {} local function wrap_locals(co, source, level, ext_funcs) if co == coroutine.running() then level = level + 3 end local f = debug.getinfo(co, level,"f").func ...
mit
zhtlancer/vicious
contrib/pop.lua
18
1422
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Boris Bolgradov <> -- -- This widget type depends on luasocket. -- -- Widget arguments are host, port, username and -- password, i.e.: -- {"mail.myhost.com", 110, "John", "132435"} ----------------...
gpl-2.0
ntop/ntopng
scripts/lua/modules/alert_definitions/other/alert_ids_ips_jail_add.lua
1
2008
-- -- (C) 2019-22 - ntop.org -- -- ############################################## local other_alert_keys = require "other_alert_keys" local format_utils = require "format_utils" -- Import the classes library. local classes = require "classes" -- Make sure to import the Superclass! local alert = require "alert" local...
gpl-3.0
graydon/monotone
tests/commit_update_multiple_heads_message/__driver__.lua
1
1905
mtn_setup() -- Create a single revision in branch1 -- -- root (branch1) -- -- branch1 heads: root revs = {} -- like the normal commit function, except it catches the output function local_ci(br) check(mtn("commit", "--message=blah-blan", "--branch", br), 0, true, true) end writefile("f", "base...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/ipb/ipbc.lua
7
4691
local resX, resY = guiGetScreenSize() local comboCategories = {"Server info", "Lua timing", "Lua time recordings", "Lua memory", "Packet usage", "Sqlite timing", "Bandwidth reduction", "Bandwidth usage", "Server timing", "Function stats", "Debug info", "Debug table", "Help", "Lib memory"} local optionsAndFilterTyping =...
mit
noa/nn
Container.lua
27
1769
-- This is code common to container modules, which are collections of -- smaller constituent modules like Parallel, Sequential, etc. local Container, parent = torch.class('nn.Container', 'nn.Module') function Container:__init(...) parent.__init(self, ...) self.modules = {} end function Container:add(module) ...
bsd-3-clause
dani-sj/extremenod
plugins/chatbot.lua
1
2525
local function run(msg) if msg.text == "hi" then return "Hello bb" end if msg.text == "Hi" then return "Hello honey" end if msg.text == "Hello" then return "Hi bb" end if msg.text == "hello" then return "Hi honey" end if msg.text == "Salam" then return "Salam aleykom" end if msg.text == "salam" then return "va a...
gpl-2.0
mohammadspemmer/mamad
bot/bot.lua
1
12073
-- #@mohammadbots -----my_name_is_ehsan*#@www_sik_ir -----@mohammadbots FOR UPDATE -----لطفا پیام بالا رو پاک نکنید tdcli = dofile('./tg/tdcli.lua') serpent = (loadfile "./libs/serpent.lua")() feedparser = (loadfile "./libs/feedparser.lua")() require('./bot/utils') require('./libs/lua-redis') URL = require "socket...
gpl-3.0
sparrow8332/CQUI_Community-Edition
Assets/UI/partialscreenhooks.lua
2
16585
-- =========================================================================== -- HUD Partial Screen Hooks -- =========================================================================== include("GameCapabilities"); -- =========================================================================== -- Action Hotkeys -- ==...
mit
palestar/medusa
ThirdParty/LuaJIT/jit/dumphints.lua
1
6939
---------------------------------------------------------------------------- -- LuaJIT hints dumper module. -- -- Copyright (C) 2005-2012 Mike Pall. All rights reserved. -- Released under the MIT/X license. See luajit.h for full copyright notice. -------------------------------------------------------------------------...
mit