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
ntop/ntopng
scripts/lua/system_setup_ui/misc.lua
1
4031
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path local template = require "template_utils" local system_setup_ui_utils = require "system_setup_ui_utils" require "lua_utils" require "prefs_utils" prefsSkipRedis(true) local is_n...
gpl-3.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/mtatranslate/translater_s.lua
2
3606
local callT = {} -- {callID, player, from, original, target} local callID = 0 local cc = {} local chatbox = {} local chatID = 0 local chatboxMax = 50 local geo = getResourceFromName("geoloc") function translateGetTranslation(p, text, from, to, original, target) callID = callID + 1 table.insert(callT, {callID, p, fro...
mit
caohongtao/quick-cocos-demo
src/framework/luaj.lua
20
2620
--[[ 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
Miigon/luvit
tests/test-dgram.lua
11
1434
--[[ 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
drandell/btmn
main.lua
1
3106
--[[ -- Main lua file -- Created in a galaxy far, far away.. in 2014 -- Dan ]]-- -- Libraries require("./Libraries/stateManager"); require("./Libraries/lovelyMoon"); require("./Libraries/colors"); --require("./storyFader"); require("./mapObjects"); -- Advanced Tiled Loader Library --loader = require("./Libraries/A...
gpl-3.0
dalab/deep-ed
data_gen/indexes/yago_crosswikis_wiki.lua
1
3916
-- Loads the merged p(e|m) index. if not opt then cmd = torch.CmdLine() cmd:option('-root_data_dir', '', 'Root path of the data, $DATA_PATH.') cmd:text() opt = cmd:parse(arg or {}) assert(opt.root_data_dir ~= '', 'Specify a valid root_data_dir path argument.') end require 'torch' tds = tds or require 'tds...
apache-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[race]/race_voicepack/voicepack_server.lua
4
3488
local g_Root = getRootElement() local mapMode = "" function playAudio(player, filename) -- outputDebugString("play sound "..filename.." for "..getPlayerName(player)) triggerClientEvent(player, "playClientAudio", getRootElement(), filename) end addEvent("onMapStarting") addEventHandler('onMapStarting', g_Root, fu...
mit
Banderi/OpenTomb
scripts/gameflow/TR4.lua
2
7945
-- Gameflow Script for OpenTomb -- Game: Tomb Raider: IV -- Version: 1.0 -- By: Gh0stBlade --------------------------------------------------------------------------------------------------------------------------------------------------------- gameflow_paths[GAME_4].numlevels = 38; ---------------------------------...
lgpl-3.0
tacman-fp7/tactile-control
data/objectRecognition/lua/luaOld/massimo_interact_fsm_OLD.lua
1
7300
event_table_main = { See = "e_exit", Let = "e_let", Forget = "e_forget", } event_table_classify = { I = "e_i_will", Try = "e_try", Skip = "e_skip", Here = "e_here", } event_table_train = { Do = "e_again", Discard = "e_discard", F...
gpl-2.0
Altenius/cuberite
Server/Plugins/HookNotify/HookNotify.lua
22
2130
-- HookNotify.lua --[[ Implements the entire plugin NOTE: This plugin is not meant for production servers. It is used mainly by developers to verify that things are working properly when implementing Cuberite features. Do not enable this plugin on production servers! This plugin logs a notification for each hook th...
apache-2.0
v1993/cocos2d-x-lua-i18n
cocos2d-x-test/src/cocos/framework/extends/UISlider.lua
5
1402
--[[ 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, p...
mit
graydon/monotone
tests/vars/__driver__.lua
1
1199
mtn_setup() check(mtn("set", "domain1", "key1", "orig_value"), 0, false, false) check(mtn("set", "domain1", "key1", "overwritten_value"), 0, false, false) check(mtn("set", "domain1", "key2", "other_value"), 0, false, false) check(mtn("set", "domain2", "key1", "other_domain_value"), 0, false, false) check(mtn("set", "...
gpl-2.0
ntop/ntopng
scripts/lua/modules/alert_store/mac_alert_store.lua
1
4788
-- -- (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 format_utils = require "format_u...
gpl-3.0
Miigon/luvit
tests/test-require.lua
6
4035
--[[ Copyright 2012 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
trompetin17/wxFormBuilder-Atlas
build/premake/4.3/src/actions/vstudio/vs2003_solution.lua
7
1784
-- -- vs2003_solution.lua -- Generate a Visual Studio 2003 solution. -- Copyright (c) 2009 Jason Perkins and the Premake project -- function premake.vs2003_solution(sln) io.eol = '\r\n' -- Precompute Visual Studio configurations sln.vstudio_configs = premake.vstudio_buildconfigs(sln) _p('Microsoft Visual St...
gpl-2.0
mega9/GTW-RPG
[resources]/GTWtrain/train-s.lua
1
14696
--[[ ******************************************************************************** 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
vikas17a/Algorithm-Implementations
Lempel_Ziv_Welch/Lua/Yonaba/lzw.lua
24
1387
-- Lempel-Ziv Welch compression data algorithm implementation -- See : http://en.wikipedia.org/wiki/LZW local function lzw_encode(str) local w = '' local result = {} local dict_size = 256 -- Builds the dictionnary local dict = {} for i = 0, dict_size-1 do dict[string.char(i)] = i end local i = di...
mit
ntop/ntopng
attic/scripts/lua/sprobe_data.lua
2
4271
-- -- (C) 2013-18 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPHeader('application/json') interface.select(ifname) flows_stats = interface.getFlowsInfo() flows_stats = flows_stats["flows"] procs = {} hosts = {} names...
gpl-3.0
xianjiec/nn
SpatialDropout.lua
11
1576
local SpatialDropout, Parent = torch.class('nn.SpatialDropout', 'nn.Module') function SpatialDropout:__init(p) Parent.__init(self) self.p = p or 0.5 self.train = true self.noise = torch.Tensor() end function SpatialDropout:updateOutput(input) self.output:resizeAs(input):copy(input) if self.train the...
bsd-3-clause
ntop/ntopng
scripts/lua/alert_stats.lua
1
30830
-- -- (C) 2020 - 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 require "lua_utils" local page_utils = require "page_utils" local ui_utils = require "ui_u...
gpl-3.0
maikerumine/aftermath
mods/minetest-we/worldedit_limited/init.lua
26
3114
do return end do local MAX_VOLUME = 30 * 30 * 30 local we = worldedit local volume = we.volume local safewrap = function(func) return function(pos1, pos2, ...) if validbox(pos1, pos2) then return func(pos1, pos2, ...) end return 0, pos1, pos2 end end local validbox = function(pos1, pos2) tpos...
lgpl-2.1
mushuanli/wsue
config/nvim/exinit.lua
1
5968
local function setup_completions() local cmp = require('cmp') local kind_icons = { Class = '', Color = '', Constant = '', Constructor = '', Enum = '', EnumMember = '', Event = '', Field = '', File = '', Fol...
gpl-3.0
nuvie/nuvie
data/scripts/common/common.lua
1
9413
--note nuvie direction values aren't the same as the original it uses the following scheme --701 --6 2 --543 DIR_NORTH = 0 DIR_EAST = 1 DIR_SOUTH = 2 DIR_WEST = 3 DIR_NORTHEAST = 4 DIR_SOUTHEAST = 5 DIR_SOUTHWEST = 6 DIR_NORTHWEST = 7 DIR_NONE = 8 UI_STYLE_ORIG = 0 UI_STYLE_NEW = 1 UI_STYLE_...
gpl-2.0
lemones/dotfiles
home/.config/awesome/lain/widget/cpu.lua
2
2371
--[[ Licensed under GNU General Public License v2 * (c) 2013, Luke Bonham * (c) 2010-2012, Peter Hofmann --]] local helpers = require("lain.helpers") local wibox = require("wibox") local math = { ceil = math.ceil } local string = { format = string.format, gmatch =...
gpl-3.0
RockySeven3161/Unknown8765
bot/bot.lua
10
7114
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 = '0.14.6' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then r...
gpl-2.0
Planimeter/lgameframework
lua/framework/graphics/font.lua
1
4494
--=========== Copyright © 2020, Planimeter, All rights reserved. ===========-- -- -- Purpose: -- --==========================================================================-- require( "class" ) local FT = require( "freetype" ) local ffi = require( "ffi" ) local GL = require( "opengl" ) local ft = ffi.new( "FT_Libr...
mit
ntop/ntopng
scripts/lua/modules/alert_definitions/host/host_alert_tcp_syn_scan.lua
1
2831
-- -- (C) 2019-22 - ntop.org -- -- ############################################## local host_alert_keys = require "host_alert_keys" local json = require("dkjson") local alert_creators = require "alert_creators" -- Import the classes library. local classes = require "classes" -- Make sure to import the Superclass! lo...
gpl-3.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/mapstop100/mapstop100.lua
2
10537
handlerConnect = nil canScriptWork = true addEventHandler('onResourceStart', getResourceRootElement(), function() handlerConnect = dbConnect( 'mysql', 'host=' .. get"*gcshop.host" .. ';dbname=' .. get"*gcshop.dbname", get("*gcshop.user"), get("*gcshop.pass")) if handlerConnect then dbExec( handlerConnect, "CREATE T...
mit
caohongtao/quick-cocos-demo
runtime/ios/PrebuiltRuntimeLua.app/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
mega9/GTW-RPG
[resources]/GTWvehicleshop/shop_c.lua
1
10784
--[[ ******************************************************************************** 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
hashemmousavi/aaaaa
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
mega9/GTW-RPG
[misc]/cruisespeed/client.lua
5
7198
-- Author: __Vector__ local cruiseSpeedKey = "c"; local cruiseSpeedInfo = "Press \"" .. cruiseSpeedKey .. "\" key to enable/disable vehicle cruise speed"; local screenw, screenh = guiGetScreenSize (); local cruiseSpeedInfoLabel = guiCreateLabel (0.35 * screenw, screenh - 80, 0.5 * screenw, 30, cruiseSpeedInfo, false);...
gpl-3.0
tacman-fp7/tactile-control
data/objectRecognition/lua/luaOld/massimo_main_OLD.lua
1
1226
#!/usr/bin/lua require("yarp") require("rfsm") --require("iol_funcs") yarp.Network() ------- shouldExit = false -- initilization ispeak_port = yarp.BufferedPortBottle() speechRecog_port = yarp.Port() manager_port = yarp.Port() -- defining of objects objects = {"Soccerball", "New object", "Tacman object", "Final re...
gpl-2.0
Miigon/luvit
bench/http-cluster/worker.lua
14
2257
--[[ 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
ntop/ntopng
scripts/lua/inc/add_user_dialog.lua
1
2582
-- -- (C) 2022 - ntop.org -- require "lua_utils" local locales_utils = require "locales_utils" local template_utils = require "template_utils" local recording_utils = require "recording_utils" local messages = { ntopng = ternary(ntop.isnEdge(), i18n("nedge.add_system_user"), i18n("login.add_web_user")), username ...
gpl-3.0
caohongtao/quick-cocos-demo
runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/framework/cc/utils/ByteArrayVarint.lua
8
3032
--[[ Serialzation bytes stream use varint encoding of google protocol buffer, I implemented it in ActionScript. It depends on BitOp. A description: https://github.com/zrong/lua#ByteArrayVarint @see https://developers.google.com/protocol-buffers/docs/encoding @see https://github.com/zrong/as3/blob/master/src/org/zengr...
apache-2.0
phpgao/Atlas
lib/active-queries.lua
40
3780
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
mega9/GTW-RPG
[resources]/GTWaccounts/s_func.lua
1
8682
--[[ ******************************************************************************** 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-game...
gpl-3.0
ArashFaceBook/tg
test.lua
210
2571
started = 0 our_id = 0 function vardump(value, depth, key) local linePrefix = "" local spaces = "" if key ~= nil then linePrefix = "["..key.."] = " end if depth == nil then depth = 0 else depth = depth + 1 for i=1, depth do spaces = spaces .. " " end end if type(value) == 'tab...
gpl-2.0
mamadtnt/um
tg/test.lua
210
2571
started = 0 our_id = 0 function vardump(value, depth, key) local linePrefix = "" local spaces = "" if key ~= nil then linePrefix = "["..key.."] = " end if depth == nil then depth = 0 else depth = depth + 1 for i=1, depth do spaces = spaces .. " " end end if type(value) == 'tab...
gpl-2.0
windofthesky/thrift
lib/lua/TSocket.lua
113
2996
---- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may...
apache-2.0
Scoth42/rfkasm
fceux-2.2.2-win32/luaScripts/GUI-iup_example.lua
3
8108
-- iup example -- this shows a test window with all kinds of idle dialogs -- docs: http://www.tecgraf.puc-rio.br/iup/ -- include our generic script (TAKES CARE OF CLOSING DIALOGS and includes the two iup systems) require("auxlib"); -- Note that in the following example, parentheses are optional if you -- are specifyi...
gpl-2.0
ntop/ntopng
scripts/lua/monitor/redis_monitor.lua
1
6541
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path if((dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end require "lua_utils" local page_utils = requ...
gpl-3.0
gajop/chiliui
luaui/chili/gui_chili_docking.lua
3
12425
function widget:GetInfo() return { name = "Chili Docking", desc = "Provides docking and position saving for chili windows", author = "Licho, jK", date = "2010, 2013", license = "GNU GPL, v2 or later", layer = 50, experimental = false, enabled = true ...
gpl-2.0
ntop/ntopng
scripts/lua/rest/v1/import/pool/config.lua
2
2478
-- -- (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 snmp_import_export = require "snmp_import_export" local am_impor...
gpl-3.0
cere-bro/telegram-bot
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
Mortezarohandeh1/hack_shop2bot
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
jcrom/emp-debugger
templates/temp_app/basic/www/resource_dev/common/lua/elements_fun.lua
2
2526
--[[ @doc:控件操作共通方法 ]]-- elements_fun = {}; --[[ @doc:根据名称改变控件样式 @params: name:控件名称 style:样式名称,比如:"height" value:修改值,需要将控件样式修改的值 @attention:如果界面中有多个此名称控件则这些控件都会被修改。 ]]-- function elements_fun.changeStyle(name,style,value) local ctrl = document:getElementsByName(name); if ctrl and #ctrl > 0 ...
mit
Planimeter/lgameframework
lua/jit/dis_x86.lua
89
29330
---------------------------------------------------------------------------- -- LuaJIT x86/x64 disassembler module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h --------------------------------------------------------------------------...
mit
Miigon/luvit
tests/test-tls-remote.lua
4
1732
--[[ Copyright 2012-2015 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...
apache-2.0
mega9/GTW-RPG
[resources]/GTWjail/jail_s.lua
1
11943
--[[ ******************************************************************************** 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
mega9/GTW-RPG
[resources]/GTWmechanic/mechanic-s.lua
1
7264
--[[ ******************************************************************************** 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
safavi1381/Master-bot
bot/bot.lua
1
7081
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 = '0.14.6' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then r...
gpl-2.0
lizh06/premake-4.x
src/base/api.lua
6
16392
-- -- api.lua -- Implementation of the solution, project, and configuration APIs. -- Copyright (c) 2002-2011 Jason Perkins and the Premake project -- -- -- Here I define all of the getter/setter functions as metadata. The actual -- functions are built programmatically below. -- premake.fields = { basedir = { ...
bsd-3-clause
v1993/cocos2d-x-lua-i18n
cocos2d-x-test/src/cocos/cocos2d/Cocos2d.lua
5
13384
cc = cc or {} function cc.clampf(value, min_inclusive, max_inclusive) -- body local temp = 0 if min_inclusive > max_inclusive then temp = min_inclusive min_inclusive = max_inclusive max_inclusive = temp end if value < min_inclusive then return min_inclusive el...
mit
drandell/btmn
btmn.lua
1
40884
--[[ -- Btmn base class -- Handles all btmn actions, animations etc. -- Created 10th April 2014 -- Dan ]]-- local LEFT = -1; local RIGHT = 1; btmn = {}; -- Attributes btmn.height = 64; btmn.width = 32; btmn.x = 20; btmn.y = 60; btmn.speedX = 2; btmn.speedY = 0; btmn.oldDirection = RIGHT; btmn.direction = RIGHT; ...
gpl-3.0
mtyzaq/extra
luci/applications/luci-vsftpd/luasrc/model/cbi/vsftpd/item.lua
12
1777
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2014 HackPascal <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://ww...
gpl-2.0
Planimeter/lgameframework
lua/jit/bcsave.lua
87
18141
---------------------------------------------------------------------------- -- LuaJIT module to save/list bytecode. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
mit
sdeploy/discover
ext/discover.lua
1
12210
-- 初始化全局变量 _DISCOVER_HOLD_MAX = os.getenv("DISCOVER_HOLD_MAX")==nil and 102400 or os.getenv("DISCOVER_HOLD_MAX") _DISCOVER_AUTH_TOKEN = os.getenv("DISCOVER_AUTH_TOKEN")==nil and '' or os.getenv("DISCOVER_AUTH_TOKEN") _DISCOVER_DATA_PATH = os.getenv("DISCOVER_DATA_PATH")==nil and '/tmp' or os.getenv("DISCOVER_DATA_PATH...
mit
adib1380/BotiSmylife
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
noa/nn
Jacobian.lua
33
13475
nn.Jacobian = {} function nn.Jacobian.backward(module, input, param, dparam) local doparam = 0 if param then doparam = 1 end param = param or input -- output deriv module:forward(input) local dout = module.output.new():resizeAs(module.output) -- 1D view local sdout = module.output.new(...
bsd-3-clause
shironecko/LuaMaze
source/maze/love/tile.lua
1
1811
-- this is a tile-method of drawing a maze local LoveTileMaze = {} function LoveTileMaze:setup(maze, image) -- image is 5 tiles that are composited: N, S, W, E, floor local width, height = image:getDimensions() local tile_size = width / 5 local tiles = { N = love.graphics.newQuad(tile_size * 0, 0, til...
mit
phpgao/Atlas
lib/load-multi.lua
39
13282
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
ASantosVal/vlc-extension-trials
share/lua/modules/dkjson.lua
95
25741
--[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.1* This module writes no global values, not even the module table. Import it using json = require ("dkjson") Exported functions and values: `json.encode (object [, state])` -------------------------------- ...
gpl-2.0
gajop/chiliui
luaui/chili/chili/skins/Glass/skin.lua
1
5349
--// ============================================================================= --// GlassSkin local skin = { info = { name = "Glass", version = "0.2", author = "jK", } } --// ============================================================================= --// skin.general = { --font ...
gpl-2.0
delram/seed3
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
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/admin/client/colorpicker/colorpicker.lua
7
9602
sw, sh = guiGetScreenSize() pickerTable = {} colorPicker = {} colorPicker.__index = colorPicker function openPicker(id, start, title) if id and not pickerTable[id] then pickerTable[id] = colorPicker.create(id, start, title) pickerTable[id]:updateColor() return true end return false end function c...
mit
shikadilord/After_the_Storm
lua/segmented.lua
1
2284
-- -- Segmented scenario library -- -- After the Storm -- Copyright (C) 2012 - 2021 by Iris Morelle <shadowm@wesnoth.org> -- -- See COPYING for usage terms. -- local T = wml.tag local function human_controlled_sides() -- TODO: Make configurable in WML return "1" end local function current_floor() return wml.varia...
gpl-2.0
wsantas/gamecode4
Assets/Scripts/LevelPostInit.lua
4
1835
--======================================================================== -- ActorManager.lua : Executed after initializing the level -- -- 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 ...
lgpl-3.0
sparrow8332/CQUI_Community-Edition
Integrations/BTS/UI/tradesupport.lua
4
58587
include("civ6common") local BACKDROP_DARKER_OFFSET = -85 local BACKDROP_DARKER_OPACITY = 238 local BACKDROP_BRIGHTER_OFFSET = 90 local BACKDROP_BRIGHTER_OPACITY = 250 local Game = Game local Players = Players local Events = Events local ipairs = ipairs local pairs = pairs local L_Lookup = Locale.Lookup -- ========...
mit
LuaDist2/datafile
datafile/util.lua
1
1539
-- utilities for the implementation of datafile modules local util = {} -- cache separator local sep if (package.config and package.config:sub(1,1) == "\\") or package.path:match("\\") then sep = "\\" else sep = "/" end function util.try_dirs(dirs, file, mode, open_fn) local tried = {} for _, dir in ipai...
mit
baiwenlu/sailor
src/sailor/autogen.lua
3
7752
-------------------------------------------------------------------------------- -- autogen.lua, v0.2: has codes in strings for autogenerating CRUDS based on sailor models -- This file is a part of Sailor project -- Copyright (c) 2014 Etiene Dalcol <dalcol@etiene.net> -- License: MIT -- http://sailorproject.org -------...
mit
ntop/ntopng
attic/scripts/lua/hosts_comparison_bubble.lua
2
4653
-- -- (C) 2014-15-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" sendHTTPContentTypeHeader('text/html') local debug = false ------------------------ function setAggregationValue(p_type,p_flow,p_key) l_array = {} if (p_t...
gpl-3.0
shayanchabok007/antispam_ok_new
plugins/help.lua
1
2046
!kick [username|id] شخص مورد نظر از گروه اخراج میشود !ban [ username|id] شخص مورد نظر از گروه تحریم میشود !unban [id] شخص مورد نظر از تحریم خارج شود !who لیست اعضا !modlist لیست کمک مدیر ها !promote [username] اضافه کردن کمک مدیر !demote [username] حذف کردن کمک مدیر !kickme ترک گروه !about درباره گروه !setphoto عوض کرد...
gpl-2.0
avsm/oasis-old
bootstrap.lua
7
1049
local os = os local error = error local lfs = require("lfs") local package = package module("bootstrap") function init () local ci_url = os.getenv("CI_URL") if not ci_url then ci_url = "http://mini:8080/job/continuous-integration/label=debian-squeeze64/lastSuccessfulBuild/artifact/dist/ci.zip" end local...
lgpl-2.1
shangjiyu/openwrt-extra
luci/applications/luci-app-apfree_wifidog/luasrc/model/cbi/apfree_wifidog.lua
3
5149
-- Copyright (C) 2016 zhangzf@kunteng.org -- Licensed to the public under the GNU General Public License v3. local sys = require "luci.sys" local opkg = require "luci.model.ipkg" local packageName = "wifidog" local m, s, o local function get_status() if luci.sys.call("pidof %s >/dev/null" %{packageName}) == 0 then ...
gpl-2.0
peterbarker/ardupilot-solo
Tools/CHDK-Scripts/kap_uav.lua
183
28512
--[[ 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 @title KAP UAV 3.1 @param i Shot Interval (sec) @default i 15 @range i 2 120 @param s Total Shots (0=infinite) @default s 0 @range ...
gpl-3.0
Star2Billing/newfies-dialer
lua/playarea/regex_for_range.lua
4
6687
-- -- 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
caohongtao/quick-cocos-demo
src/app/layers/ReliveLayer.lua
1
3719
local DataManager = require("app.DataManager") local Relive = class("Relive", function() return display.newLayer("Relive") end) ----原地复活界面 function Relive:ctor(settlementInfo) self.settlementInfo = settlementInfo cc(self):addComponent("components.behavior.EventProtocol"):exportMethods() -- 开始游戏按键...
apache-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/admin/client/gui/admin_vehicle.lua
6
14070
--[[********************************** * * Multi Theft Auto - Admin Panel * * gui\admin_stats.lua * * Original File by lil_Toady * **************************************]] aVehicleForm = nil aVehicleCustomizePlayer = nil aVehicleCustomizeVehicle = nil aVehicleUpgrades = {} aUpgradeNames = {} function aVehicleCustomi...
mit
numo16/wesnoth
data/ai/micro_ais/cas/ca_recruit_random.lua
26
4781
local H = wesnoth.require "lua/helper.lua" local AH = wesnoth.require("ai/lua/ai_helper.lua") local LS = wesnoth.dofile "lua/location_set.lua" local recruit_type local ca_recruit_random = {} function ca_recruit_random:evaluation(ai, cfg) -- Random recruiting from all the units the side has -- Check if leade...
gpl-2.0
Planimeter/lgameframework
lua/framework/graphics/model.lua
1
8207
--=========== Copyright © 2020, Planimeter, All rights reserved. ===========-- -- -- Purpose: -- --==========================================================================-- require( "class" ) local assimp = require( "assimp" ) local ffi = require( "ffi" ) local bit = require( "bit" ) local GL = requir...
mit
b03605079/darkstar
scripts/globals/items/purple_polypore.lua
36
1156
----------------------------------------- -- ID: 5682 -- Item: Purple Polypore -- Food Effect: 5 Min, All Races ----------------------------------------- -- Strength -6 -- Mind +4 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck...
gpl-3.0
iskolbin/lfn
op.lua
1
1047
local floor = math.floor local operators = { identity = function(...) return ... end, truth = function() return true end, lie = function() return false end, neg = function(a) return -a end, add = function(a, b) return a + b end, sub = function(a, b) return a - b end, mul = function(a, b) return a * b end, div ...
mit
Aquanim/Zero-K
units/corcom1.lua
2
5575
return { corcom1 = { unitname = [[corcom1]], name = [[Battle Commander]], description = [[Heavy Combat Commander]], acceleration = 0.54, activateWhenBuilt = true, autoHeal = 5, brakeRate = 2.25, buildCostMetal = 1200, buildDistance ...
gpl-2.0
PicassoCT/Journeywar
gamedata/explosions/cTangleGunStrip.lua
1
2100
-- trail_ar2 return { ["ctanglegunstrip"] = { fakelight = { air = false, class = [[CSimpleGroundFlash]], count = 1, ground = true, water = false, properties = { ...
gpl-3.0
b03605079/darkstar
scripts/zones/Windurst_Woods/npcs/Kuoh_Rhel.lua
19
3722
----------------------------------- -- Area: Windurst Woods -- NPC: Kuoh Rhel -- Type: Standard NPC -- @zone: 241 -- @pos 131.437 -6 -102.723 -- Starts quests: Chocobilious, In a Stew -- Note: In a Stew should only repeat once per conquest tally. The tally is not implemented at time of -- writing this ques...
gpl-3.0
xpol/luarocks
src/luarocks/cfg.lua
4
24385
--- Configuration for LuaRocks. -- Tries to load the user's configuration file and -- defines defaults for unset values. See the -- <a href="http://luarocks.org/en/Config_file_format">config -- file format documentation</a> for details. -- -- End-users shouldn't edit this file. They can override any defaults -- set in ...
mit
b03605079/darkstar
scripts/zones/Windurst_Waters_[S]/npcs/Aystise.lua
38
1045
----------------------------------- -- Area: Windurst Waters (S) -- NPC: Aystise -- Type: Standard NPC -- @zone: 94 -- @pos -69.805 -4.5 68.078 -- -- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters_[S]/TextIDs"] = nil; ----...
gpl-3.0
runner-mei/hindsight
benchmarks/run_hsr/output/tcpoutput.lua
2
1474
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. local socket = require "socket" local address = read_config("address") or "127.0.0.1" local port = read_config("port...
mpl-2.0
b03605079/darkstar
scripts/globals/items/serving_of_yellow_curry.lua
35
2067
----------------------------------------- -- ID: 4517 -- Item: serving_of_yellow_curry -- Food Effect: 3hours, All Races ----------------------------------------- -- Health Points 20 -- Strength 5 -- Agility 2 -- Intelligence -4 -- HP Recovered While Healing 2 -- MP Recovered While Healing 1 -- Attack 20% (...
gpl-3.0
ld-test/lyaml
lib/lyaml/explicit.lua
1
3500
-- LYAML parse explicit token values. -- Written by Gary V. Vaughan, 2015 -- -- Copyright (c) 2015 Gary V. Vaughan -- -- 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, i...
mit
Sakura-Winkey/LuCI
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua
48
2480
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" m = Map("network", translate("Interfaces")) m.pageaction = false m:section(SimpleSection).template = "admin_network/iface_overvi...
apache-2.0
thesrinivas/rakshak
rakshak-probe/userspace/sysdig/chisels/spectrogram.lua
6
4133
--[[ Copyright (C) 2013-2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without e...
gpl-2.0
thesrinivas/rakshak
rakshak-probe.bkup/userspace/sysdig/chisels/spectrogram.lua
6
4133
--[[ Copyright (C) 2013-2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without e...
gpl-2.0
Aquanim/Zero-K
lups/ParticleClasses/UnitJitter.lua
8
8237
-- $Id: UnitJitter.lua 4454 2009-04-20 11:45:38Z jk $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local UnitJitter = {} UnitJitter.__in...
gpl-2.0
alirezahm/butlerfarsi
plugins/menu.lua
1
8124
local function changeWarnSettings(chat_id, action) local current = tonumber(db:hget('chat:'..chat_id..':warnsettings', 'max')) or 3 local new_val if action == 1 then if current > 12 then return _("The new value is too high ( > 12)") else new_val = db:hincrby('chat:'.....
gpl-2.0
b03605079/darkstar
scripts/globals/items/dish_of_spaghetti_peperoncino_+1.lua
35
1403
----------------------------------------- -- ID: 5197 -- Item: dish_of_spaghetti_peperoncino_+1 -- Food Effect: 60Min, All Races ----------------------------------------- -- Health % 30 -- Health Cap 75 -- Vitality 2 -- Store TP 6 ----------------------------------------- require("scripts/globals/status"); ...
gpl-3.0
stars2014/quick-ng
cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua
7
1207
-------------------------------- -- @module EaseCubicActionInOut -- @extend ActionEase -- @parent_module cc -------------------------------- -- brief Create the action with the inner action.<br> -- param action The pointer of the inner action.<br> -- return A pointer of EaseCubicActionInOut action. If creation failed...
mit
Anubhav652/GTW-RPG
[resources]/GTWjail/jail_s.lua
1
13099
--[[ ******************************************************************************** Project owner: RageQuit community Project name: GTW-RPG Developers: Mr_Moose Source code: https://github.com/GTWCode/GTW-RPG Bugtracker: https://forum.404rq.com/bug-reports Suggestions: https://forum.404rq.com/mta-se...
gpl-3.0