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
Hobadee/grandMA2_LUA_ldoc
gma.network.lua
1
1987
---Network related GMA LUA functions --@module gma.network ---Get the MA-NET type of device. -- --@treturn string Type of device --@usage -- gma.network.gethosttype(); -- "Console" function gma.network.gethosttype() end ---Get the MA-NET sub-type of device. -- --@treturn string Subtype of device --@usage -- gma.n...
gpl-3.0
ahmadname12/animus1999
plugins/iq_abs.lua
1
15244
-- made by { @Mouamle } do ws = {} rs = {} -- some examples of how to use this :3 ws[1] = "هلاو" rs[1] = "هـﮩـڵآوآت 🦀❤" ws[2] = "هلو" -- msg rs[2] = "هـﮩـڵآوآت 🦀❤️" -- reply ws[3] = "شلونكم" -- msg rs[3] = "تـمـآم وأنتـہ 🌝💙" -- reply ws[4] = "دووم" -- msg rs[4] = "يدوم نبضك 🌝💙" -- reply ws[5] =...
gpl-2.0
asamy45/forgottenmapeditor
modules/mapeditor_terminal/commands.lua
1
2388
function dumpWidgets(widget, level) widget = widget or rootWidget level = level or 0 for i=1,widget:getChildCount() do local child = widget:getChildByIndex(i) if child:isVisible() then local name = child:getId() if name:match('widget%d+') == nil then g_logger.debug(string.rep(' ', leve...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua
18
1991
-------------------------------- -- @module TileMapAtlas -- @extend AtlasNode -- @parent_module cc -------------------------------- -- initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.<br> -- The file will be loaded using the TextureMgr. -- @function [par...
mit
hfjgjfg/creed3
plugins/anti_spam.lua
923
3750
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
wordsforthewise/ESP-8266_network-connect
makeChooseAPHTML.lua
1
2328
-- opens saved list of nearby networks and puts into SSIDs table local SSIDs = {} file.open('networkList','r') local counter = 0 local line = "" while true do line = file.readline() if line == nil then break end counter = counter + 1 SSIDs[counter] = line end -- writes html file up to part with network...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
2
8768
-------------------------------- -- @module Texture2D -- @extend Ref -- @parent_module cc -------------------------------- -- Gets max T. -- @function [parent=#Texture2D] getMaxT -- @param self -- @return float#float ret (return value: float) -------------------------------- -- -- @function [parent=#Text...
mit
ScegfOd/wesnoth
data/ai/micro_ais/cas/ca_wolves_move.lua
4
3452
local H = wesnoth.require "lua/helper.lua" local AH = wesnoth.require "ai/lua/ai_helper.lua" local BC = wesnoth.require "ai/lua/battle_calcs.lua" local function get_wolves(cfg) local wolves = AH.get_units_with_moves { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter") } } retu...
gpl-2.0
EvilHero90/otclient
modules/game_cooldown/cooldown.lua
1
4907
local ProgressCallback = { update = 1, finish = 2 } cooldownWindow = nil cooldownButton = nil contentsPanel = nil cooldownPanel = nil lastPlayer = nil function init() connect(g_game, { onGameStart = online, onSpellGroupCooldown = onSpellGroupCooldown, onSpellCooldown = on...
mit
XR-s/Do-an-Sar-
sf/share/locale/turkey/quest/bar_sistem.lua
1
1445
quest bar_sistem begin state start begin when 80007.use begin if pc . count_item ( 80007 ) < 1 then say_title("Hey ".. pc.get_name() ..".") say ( "Envanterinde bar bulunamadý. " ) end say_title("Hey ".. pc.get_name() ..".") say ( "400.000....
apache-2.0
maikerumine/nuclear_holocaust
mods/doors/init.lua
3
23660
-- our API object doors = {} -- private data local _doors = {} _doors.registered_doors = {} _doors.registered_trapdoors = {} -- returns an object to a door object or nil function doors.get(pos) local node_name = minetest.get_node(pos).name if _doors.registered_doors[node_name] then -- A normal upright door retu...
lgpl-2.1
ahmadname12/animus1999
plugins/lk_emoji.lua
2
2347
--[[ $ :) -- - ( #ANIMUS ) - -- $ :) -- - ( @ahmadnamed ) - -- $ :) --Channel-( @ahmadnameddd )-- $ :) ]]-- local function run(msg) local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['emoji'] == 'yes' then if not is_momod(msg) then delete_msg(msg.id, ok_cb, t...
gpl-2.0
hizel/dotfiles
awesome/vicious/cpuinf.lua
1
1414
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2009, Adrian C. <anrxc.sysphere.org> --------------------------------------------------- -- {{{ Grab environment local tonumber = tonumber local io = { open = io.open } local setmetatable = setmetatable lo...
bsd-2-clause
lvshiling/U3DTerrainEditor
Bin/TerrainEditorData/LuaScripts/terraineditUISpeckle.lua
2
22058
-- Terrain Editor UI TerrainEditUI=ScriptObject() uiStyle = cache:GetResource("XMLFile", "UI/DefaultStyle.xml") ui.root.defaultStyle = uiStyle; iconStyle = cache:GetResource("XMLFile", "UI/EditorIcons.xml"); function CreateCursor() local cursor = Cursor:new() cursor.defaultStyle=uiStyle cursor.style=AUTO_ST...
mit
deplinenoise/tundra
scripts/tundra/depgraph.lua
28
4095
module(..., package.seeall) local boot = require "tundra.boot" local util = require "tundra.util" local path = require "tundra.path" local native = require "tundra.native" local environment = require "tundra.environment" local default_pass = { Name = "Default", BuildOrder = 100000 } local a...
mit
micahmumper/naev
dat/missions/trader/anxiousmerchant.lua
6
13429
--[[ Anxious Merchant Author: PhoenixRiver (from an idea on the wiki) A merchant with a slow ship suddenly realizes he can't make the delivery and implores the player to do it for him. Since he has to look good with his employers he'll pay the player a bonus if he does it. Note: Variant of the Drun...
gpl-3.0
joeyhng/nn
Threshold.lua
11
1375
local Threshold, parent = torch.class('nn.Threshold','nn.Module') function Threshold:__init(th,v,ip) parent.__init(self) self.threshold = th or 1e-6 self.val = v or 0 if (th and type(th) ~= 'number') or (v and type(v) ~= 'number') then error('nn.Threshold(threshold, value)') end -- default for ...
bsd-3-clause
Whit3Tig3R/z1z1z1z1
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
aqasaeed/sparta2
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
hfjgjfg/creed3
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
peterayeni/kong
kong/vendor/lapp.lua
25
9906
-- lapp.lua -- Simple command-line parsing using human-readable specification ----------------------------- --~ -- args.lua --~ local args = require ('lapp') [[ --~ Testing parameter handling --~ -p Plain flag (defaults to false) --~ -q,--quiet Plain flag with GNU-style optional long ...
apache-2.0
EvilHero90/otclient
modules/client_locales/neededtranslations.lua
10
8907
-- generated by ./tools/gen_needed_translations.sh neededTranslations = { "1a) Offensive Name", "1b) Invalid Name Format", "1c) Unsuitable Name", "1d) Name Inciting Rule Violation", "2a) Offensive Statement", "2b) Spamming", "2c) Illegal Advertising", "2d) Off-Topic Public Statement", "2e) Non-English...
mit
saikken/BolScripts
JinxMechanics.lua
3
52471
--[[ _____ _____ __ .__ / \_______ / _ \________/ |_|__| ____ __ __ ____ ____ / \ / \_ __ \ / /_\ \_ __ \ __\ |/ ___\| | \/ \ / _ \ / Y \ | \/ / | \ | \/| | | \ \___| | / | ( <_> ) \____|__ /__| \___...
gpl-2.0
FreeBlues/neko8
libs/moonscript/spec/outputs/return.lua
2
1552
local _ _ = function() local _list_0 = things for _index_0 = 1, #_list_0 do local x = _list_0[_index_0] _ = x end end _ = function() local _accum_0 = { } local _len_0 = 1 local _list_0 = things for _index_0 = 1, #_list_0 do local x = _list_0[_index_0] _accum_0[_len_0] = x _len_0 = _len...
mit
mohammads15/super-window
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
samiiiiiiiiiiiiiiiiiiiiiiiiii/sam
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
ABIZBOT/5
system/libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
EvilHero90/otclient
modules/game_modaldialog/modaldialog.lua
2
1815
function init() g_ui.importStyle('modaldialog') connect(g_game, { onModalDialog = onModalDialog, onGameEnd = destroy }) end function terminate() disconnect(g_game, { onModalDialog = onModalDialog, onGameEnd = destroy }) destroy() end function destroy() if modalDi...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/Director.lua
2
20603
-------------------------------- -- @module Director -- @parent_module cc -------------------------------- -- Pauses the running scene.<br> -- The running scene will be _drawed_ but all scheduled timers will be paused.<br> -- While paused, the draw rate will be 4 FPS to reduce CPU consumption. -- @function [parent=#...
mit
qj739/BadRotations
Rotations/cBuilder.lua
1
28484
br.loader = {} function br.loader:new(spec,specName) br.loader.rotations = {} for k, v in pairs(br.rotations) do if spec == k then for i = 1, #v do tinsert(br.loader.rotations, v[i]) end end end local self = cCharacter:new(tostring(select(1,UnitCla...
gpl-3.0
deplinenoise/tundra
scripts/tundra/ide/xcode3.lua
28
22220
-- Xcode 3 (works in 4 as well) Workspace/Project file generation module(..., package.seeall) local path = require "tundra.path" local nodegen = require "tundra.nodegen" local util = require "tundra.util" local native = require "tundra.native" local xcode_generator = {} local xcode_generator = {} xcode_generator.__i...
mit
maikerumine/nuclear_holocaust
mods/boats/init.lua
4
6648
-- -- Helper functions -- local function is_water(pos) local nn = minetest.get_node(pos).name return minetest.get_item_group(nn, "water") ~= 0 end local function get_sign(i) if i == 0 then return 0 else return i / math.abs(i) end end local function get_velocity(v, yaw, y) local x = -math.sin(yaw) * v lo...
lgpl-2.1
FreeBlues/neko8
libs/moonscript/spec/outputs/syntax.lua
1
4164
local a = 1 + 2 * 3 / 6 local bunch, go, here a, bunch, go, here = another, world func(arg1, arg2, another, arg3) local we here, we = function() end, yeah local the, different the, different = function() return approach end, yeah dad() dad(lord) hello(one, two)(); (5 + 5)(world) fun(a)(b) fun(a)(b) fun(a)(b, bad(hell...
mit
FreeBlues/neko8
libs/moonscript/moonscript/cmd/coverage.lua
1
3698
local log log = function(str) if str == nil then str = "" end return io.stderr:write(str .. "\n") end local create_counter create_counter = function() return setmetatable({ }, { __index = function(self, name) do local tbl = setmetatable({ }, { __index = function(self) ...
mit
PavlosMelissinos/densecap
densecap/optim_updates.lua
4
2208
function sgd(x, dx, lr) x:add(-lr, dx) end function sgdm(x, dx, lr, alpha, state) -- sgd with momentum, standard update if not state.v then state.v = x.new(#x):zero() end state.v:mul(alpha) state.v:add(lr, dx) x:add(-1, state.v) end function sgdmom(x, dx, lr, alpha, state) -- sgd momentum, uses...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua
11
1340
-------------------------------- -- @module ParticleSnow -- @extend ParticleSystemQuad -- @parent_module cc -------------------------------- -- -- @function [parent=#ParticleSnow] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- -- @function [parent=#Pa...
mit
qj739/BadRotations
Custom/Functions.lua
2
23919
-- Functions from coders for public use --[[ ]] --[[ ragnar ]] --[[ ...
gpl-3.0
micahmumper/naev
dat/ai/tpl/generic.lua
2
13303
include("dat/ai/include/basic.lua") include("dat/ai/include/attack.lua") --[[ -- Variables to adjust AI -- -- These variables can be used to adjust the generic AI to suit other roles. --]] mem.enemyclose = nil -- Distance at which an enemy is considered close mem.armour_run = 0 -- At which damage to run at mem...
gpl-3.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua
11
3069
-------------------------------- -- @module Physics3DComponent -- @extend Component -- @parent_module cc -------------------------------- -- synchronize node transformation to physics -- @function [parent=#Physics3DComponent] syncNodeToPhysics -- @param self -- @return Physics3DComponent#Physics3DComponent self (ret...
mit
coderstudy/luarocks
test/testing.lua
12
24081
local variables = {} -- Expand variables in the format $foo or ${foo} according -- to the variables table. local function expand_variables(str) return str:gsub("%$({?)([A-Za-z0-9_]+)(}?)", function(o, v, c) return #o <= #c and (variables[v] or "") .. (#o < #c and c or "") end) end -- @param cmd command t...
mit
zh423328/NFServer
_Out/Server/NFDataCfg/ScriptModule/TestModule.lua
1
4856
TestModule = {} register_module(TestModule,"TestModule"); function TestModule.Init() io.write("TestModule Init!\n"); io.write("Addr of pPluginManager " .. tostring(pPluginManager) .. "\n"); local pKernelModule = pPluginManager:FindKernelModule("NFCKernelModule"); io.write("Addr of NFCKernelModule " .. t...
apache-2.0
eku/nodemcu-firmware
lua_modules/http/http-example.lua
7
1377
------------------------------------------------------------------------------ -- HTTP server Hello world example -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> ------------------------------------------------------------------------------ require("httpserver").createServe...
mit
coronalabs/plugins-source-openssl
Corona/General/main.lua
1
7224
-------------------------------------------------------------------------------- -- Sample code is MIT licensed, see http://www.coronalabs.com/links/code/license -- Copyright (C) 2012 Corona Labs Inc. All Rights Reserved. -------------------------------------------------------------------------------- print( "OpenSSL ...
mit
peterayeni/kong
kong/vendor/resty_http.lua
21
6248
local pairs = pairs local type = type local tonumber = tonumber local tostring = tostring local setmetatable = setmetatable local encode_args = ngx.encode_args local tcp = ngx.socket.tcp local concat = table.concat local insert = table.insert local upper = string.upper local lower = string.lower local sub ...
apache-2.0
cch123/codis
extern/redis-2.8.21/deps/lua/test/life.lua
888
2635
-- life.lua -- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l -- modified to use ANSI terminal escape sequences -- modified to use for instead of while local write=io.write ALIVE="¥" DEAD="þ" ALIVE="O" DEAD="-" function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary for i=1,10000 do...
mit
EagleTeam/EST-GP
plugins/links.lua
1
2069
local config = require 'config' local misc = require 'utilities'.misc local roles = require 'utilities'.roles local api = require 'methods' local plugin = {} function plugin.onTextMessage(msg, blocks) if msg.chat.type == 'private' then return end if not roles.is_admin_cached(msg) then return end local hash = ...
gpl-2.0
cmsj/hammerspoon
extensions/menubar/init.lua
1
1538
--- === hs.menubar === --- --- Create and manage menubar icons local menubar = require "hs.menubar.internal" local imagemod = require("hs.image") local geometry = require "hs.geometry" local screen = require "hs.screen" require("hs.styledtext") -- protects tables of constants menubar.priorities = ls.makeConstantsTa...
mit
joeyhng/nn
PartialLinear.lua
8
3886
local PartialLinear, Module = torch.class('nn.PartialLinear', 'nn.Module') --[[ PartialLinear is a Linear layer that allows the user to a set a collection of column indices. When the column indices are set, the layer will behave like a Linear layer that only has those columns. Meanwhile, all parameters are preserved,...
bsd-3-clause
alpha-team/smart_gourd_final
plugins/groupmanager.lua
166
11272
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if not is_admin(msg) then return "You're not admin!" end local group_creator = msg.from.print_name create_group_chat (group_cr...
gpl-2.0
fhgwright/SCSI2SD
software/scsi2sd-util/wxWidgets/samples/ribbon/fix_xpm.lua
8
7205
#!/usr/bin/lua ------------------------------------------------------------------------------- -- Name: fix_xpm.lua -- Purpose: Fix XPM files for use in Ribbon sample -- Author: Peter Cawley -- Modified by: -- Created: 2009-07-06 -- Copyright: (C) Copyright 2009, Peter Cawley -- Licence: wxWin...
gpl-3.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua
11
1360
-------------------------------- -- @module ParticleSmoke -- @extend ParticleSystemQuad -- @parent_module cc -------------------------------- -- -- @function [parent=#ParticleSmoke] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- -- @function [parent=#...
mit
mabotech/mabo.task
py/jobs0527/jobs/lua/heartbeat0527.lua
2
2227
--[[ -- ARGV[1] -- ARGV[2] ]] local heartbeat = redis.call("HGET", KEYS[1], "heartbeat") local contain_lsn = redis.call("HEXISTS", KEYS[1], "heartbeat_lsn") local contain_count = redis.call("HEXISTS", KEYS[1], "heartbeat_count") --local heartbeat_lsn = redis.call("HGET", KEYS[1], "heartbeat_lsn") if contain_ls...
mit
aliasadi126/test
tabchi.lua
1
15349
local sudomsg = 282958812 -- put your id here local function reload_plugins( ) plugins = {} load_plugins() end function save_config( ) serialize_to_file(_config, './data/config.lua') print ('saved config into ./data/config.lua') end local function parsed_url(link) local parsed_link = URL.parse(l...
unlicense
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua
18
1219
-------------------------------- -- @module TextureFrame -- @extend Frame -- @parent_module ccs -------------------------------- -- -- @function [parent=#TextureFrame] getTextureName -- @param self -- @return string#string ret (return value: string) -------------------------------- -- -- @function [parent...
mit
cmsj/hammerspoon
extensions/notify/init.lua
1
15740
--- === hs.notify === --- --- This module allows you to create on screen notifications in the User Notification Center located at the right of the users screen. --- --- Notifications can be sent immediately or scheduled for delivery at a later time, even if that scheduled time occurs when Hammerspoon is not currently ...
mit
SPARKsaeedieckta/spark-cli
libs/feedparser.lua
543
11955
local LOM = assert(require("lxp.lom"), "LuaExpat doesn't seem to be installed. feedparser kind of needs it to work...") local XMLElement = (loadfile "./libs/XMLElement.lua")() local dateparser = (loadfile "./libs/dateparser.lua")() local URL = (loadfile "./libs/url.lua")() local tinsert, tremove, tconcat = table.insert...
agpl-3.0
xXX-mRx-XXx/xxXxx
libs/feedparser.lua
543
11955
local LOM = assert(require("lxp.lom"), "LuaExpat doesn't seem to be installed. feedparser kind of needs it to work...") local XMLElement = (loadfile "./libs/XMLElement.lua")() local dateparser = (loadfile "./libs/dateparser.lua")() local URL = (loadfile "./libs/url.lua")() local tinsert, tremove, tconcat = table.insert...
gpl-2.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/script/extension/ExtensionConstants.lua
62
2000
if nil == cc.Control then return end cc.CONTROL_STATE_NORMAL = 1 cc.CONTROL_STATE_HIGH_LIGHTED = 2 cc.CONTROL_STATE_DISABLED = 4 cc.CONTROL_STATE_SELECTED = 8 cc.CONTROL_STEPPER_PART_MINUS = 0 cc.CONTROL_STEPPER_PART_PLUS = 1 cc.CONTROL_STEPPER_PART_NONE = 2 cc.TABLEVIEW_FILL_TOPDOWN = 0 cc.TABLEVIEW_FILL_BOTTOM...
mit
m2fan/dd
plugins/info1.lua
1
1949
do local function action_by_reply(extra, success, result) local user_info = {} local uhash = 'user:'..result.from.id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..result.from.id..':'..result.to.id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print_name(use...
gpl-2.0
Whit3Tig3R/z1z1z1z1
plugins/owners.lua
1467
12478
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
saikken/BolScripts
Rivelina.lua
24
17592
--[[ Rivelina [Riven] By _____ _____ __ .__ ____ .____ .__.__ .__ .__ .__ / \_______ / _ \________/ |_|__| ____ __ __ ____ ____ / _ \ | | |__| | | | ____ _________ | | |__| ____ / \ /...
gpl-2.0
samael65535/skynet
service/debug_console.lua
25
6303
local skynet = require "skynet" local codecache = require "skynet.codecache" local core = require "skynet.core" local socket = require "socket" local snax = require "snax" local memory = require "memory" local port = tonumber(...) local COMMAND = {} local function format_table(t) local index = {} for k in pairs(t) ...
mit
eku/nodemcu-firmware
tests/NTest/NTest_NTest.lua
5
15562
local N = require('NTest')("selftest") local orig_node = node local metatest local async local expected = {} local failed, passed = 0,0 local load_tests2 local function load_tests() -- -- Basic tests -- metatest('simple assert passes', function() ok(2 == 2, '2==2') end, {'2==2'}, {}) metatest('simple n...
mit
cmsj/hammerspoon
extensions/doc/hsdocs/init.lua
2
30802
--- === hs.doc.hsdocs === --- --- Manage the internal documentation web server. --- --- This module provides functions for managing the Hammerspoon built-in documentation web server. Currently, this is the same documentation available in the Dash docset for Hammerspoon, but does not require third party software for v...
mit
PavlosMelissinos/densecap
train.lua
4
7070
--[[ Main entry point for training a DenseCap model ]]-- ------------------------------------------------------------------------------- -- Includes ------------------------------------------------------------------------------- require 'torch' require 'nngraph' require 'optim' require 'image' require 'lfs' require 'n...
mit
joerg-krause/luv
tests/test-work.lua
6
1474
return require('lib/tap')(function (test) test("test threadpool", function(print,p,expect,_uv) p('Please be patient, the test cost a lots of time') local count = 1000 --for memleaks dected local step = 0 local ctx ctx = _uv.new_work( function(n,s) --work,in threadpool local uv ...
apache-2.0
samael65535/skynet
lualib/md5.lua
62
1054
---------------------------------------------------------------------------- -- Modify version from https://github.com/keplerproject/md5 ---------------------------------------------------------------------------- local core = require "md5.core" ------------------------------------------------------------------------...
mit
taestone/opennmt_merge
onmt/modules/GlobalAttention.lua
8
2847
require('nngraph') --[[ Global attention takes a matrix and a query vector. It then computes a parameterized convex combination of the matrix based on the input query. H_1 H_2 H_3 ... H_n q q q q | | | | \ | | / ..... \ | / a Constru...
mit
FreeBlues/neko8
libs/openal.lua
1
16383
--[[ love-micrphone openal.lua LuaJIT FFI binding for OpenAL-soft ]] local ffi = require("ffi") -- Load OpenAL32.dll on Windows (from LOVE) or use ffi.C local openal = (ffi.os == "Windows") and ffi.load("openal32") or ffi.C --alc.h ffi.cdef([[ enum { ALC_INVALID = 0, //Deprecated ALC_VERSION_0_1 = 1, ALC_FAL...
mit
PavlosMelissinos/densecap
test/BoxSamplerHelper_test.lua
4
3083
require 'torch' require 'nn' require 'cutorch' require 'cunn' require 'densecap.modules.BoxSamplerHelper' local tests = {} local tester = torch.Tester() -- Check that a tensor has a specific size (list of ints) function tester:assertTensorSizeEq(tensor, size) self:asserteq(tensor:nDimension(), #size) for i = 1,...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua
18
1514
-------------------------------- -- @module ScaleFrame -- @extend Frame -- @parent_module ccs -------------------------------- -- -- @function [parent=#ScaleFrame] setScaleY -- @param self -- @param #float scaleY -- @return ScaleFrame#ScaleFrame self (return value: ccs.ScaleFrame) -------------------------...
mit
coderstudy/luarocks
src/luarocks/upload.lua
19
2898
local upload = {} local util = require("luarocks.util") local fetch = require("luarocks.fetch") local pack = require("luarocks.pack") local cfg = require("luarocks.cfg") local Api = require("luarocks.upload.api") upload.help_summary = "Upload a rockspec to the public rocks repository." upload.help_arguments = "[--sk...
mit
creationix/rye
libs/web-app.lua
1
5941
--[[ Web App Framework Middleware Contract: function middleware(req, res, go) req.method req.path req.params req.headers req.version req.keepAlive req.body res.code res.headers res.body go() - Run next in chain, can tail call or wait for return and do more headers is a table/list with numeric...
isc
AltTab00/UnRealistic
prototypes/item/item.lua
1
3607
data:extend({ {type = "item", name = "ai-unit", icon = "__UnRealistic__/graphics/icons/AI_unit.png", icon_size = 64, icon_mipmaps = 4, subgroup = "intermediate-product", order = "g[ai-unit]", stack_size = 10 }, { type="item", name = "plank", icon = "__UnRealistic__/graphic...
mit
ahmadname12/animus1999
DevProx/utils.lua
27
31597
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = (loadfile "./libs/serpent.lua")() feedparser = (loadfile "./libs/feedparser.lua")() json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.l...
gpl-2.0
somaen/scummvm
devtools/create_ultima/files/ultima6/scripts/md/ending.lua
18
5338
local lua_file = nil --load common functions lua_file = nuvie_load("common/intro_common.lua"); lua_file(); function play() local gender = player_get_gender() local g_img_tbl = image_load_all("endgame.lzc") local text_tbl = text_load("scenetxt.lzc", 3) local text = sprite_new(nil, 0, 160, true) text.tex...
gpl-3.0
RobertZenz/minetest-australopithecus-sneak-cam
mods/sneak_cam/init.lua
2
1464
--[[ Copyright (c) 2015, Robert 'Bobby' Zenz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
bsd-2-clause
ToxicFrog/kessler
sfsmerged.lua
1
2633
-- inetd daemon for sfsmerge -- upload an SFS, get back a merged SFS -- The protocol it expects is: -- one line with the name -- the contents of the SFS -- the text END -- Upon receiving this, it needs to: -- * create a merged file from all of the saved SFSs, most recent *first* (so that it contains the most recent v...
mit
warreee/Algorithm-Implementations
Happy_Number/Lua/Yonaba/happy_test.lua
26
1425
-- Tests for happy.lua local is_happy = require 'happy' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 end local st...
mit
micahmumper/naev
dat/events/tutorial/tutorial-comms.lua
11
4514
-- This is tutorial: communications. include("dat/events/tutorial/tutorial-common.lua") -- localization stuff, translators would work here lang = naev.lang() if lang == "es" then else -- default english title1 = "Tutorial: Communications" message1 = [[Welcome to the communications tutorial. This tutorial...
gpl-3.0
eriser/psycle
psycle/LuaScripts/plugineditor/maincanvas.lua
1
25415
-- psycle plugineditor (c) 2015, 2016 by psycledelics -- File: maincanvas.lua -- copyright 2015 members of the psycle project http://psycle.sourceforge.net -- This source 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 Softwar...
gpl-2.0
micahmumper/naev
dat/missions/shark/sh02_tapping.lua
1
12110
--[[ This is the third mission of the Shark's teeth campaign. The player has to take illegal holophone recordings in his ship. Stages : 0) Way to Sirius world 1) Way to Darkshed TODO: I didn't test the case when the player tries to do the mission with a freighter, and the case when the player's c...
gpl-3.0
taestone/opennmt_merge
onmt/utils/FileReader.lua
2
1617
local FileReader = torch.class("FileReader") function FileReader:__init(filename, idxSent, featSequence) self.file = assert(io.open(filename, "r")) self.idxSent = idxSent self.featSequence = featSequence end --[[ Read next line in the file and split it on spaces. If EOF is reached, returns nil. ]] function File...
mit
ignacio/luarocks
src/luarocks/deps.lua
7
28021
--- Dependency handling functions. -- Dependencies are represented in LuaRocks through strings with -- a package name followed by a comma-separated list of constraints. -- Each constraint consists of an operator and a version number. -- In this string format, version numbers are represented as -- naturally as possible...
mit
lukasc-ch/nn
ParallelCriterion.lua
28
1355
local ParallelCriterion, parent = torch.class('nn.ParallelCriterion', 'nn.Criterion') function ParallelCriterion:__init(repeatTarget) parent.__init(self) self.criterions = {} self.weights = {} self.gradInput = {} self.repeatTarget = repeatTarget end function ParallelCriterion:add(criterion, weight) ...
bsd-3-clause
steffen-g/htop-cpufreq
test_spec.lua
6
18128
#!/usr/bin/env lua local VISUALDELAY = os.getenv("VISUALDELAY") local visual = VISUALDELAY or false local visual_delay = VISUALDELAY and (tonumber(VISUALDELAY)) or 0.1 local unistd = require("posix.unistd") local time = require("posix.time") local curses = require("posix.curses") local rote = require("rote") local...
gpl-2.0
hongling0/skynet
lualib/snax/msgserver.lua
26
7404
local skynet = require "skynet" local gateserver = require "snax.gateserver" local netpack = require "skynet.netpack" local crypt = require "skynet.crypt" local socketdriver = require "skynet.socketdriver" local assert = assert local b64encode = crypt.base64encode local b64decode = crypt.base64decode --[[ Protocol: ...
mit
maikerumine/nuclear_holocaust
mods/village_ruins/init.lua
2
2248
village_ruins = {} village_ruins.replacements_ruins = function( housetype, pr, replacements ) -- replace the wood - even though those houses use only a limited amount of wood local wood_type = mg_villages.replace_materials( replacements, pr, {'default:wood'}, {''}, { 'default:wood', 'default:junglew...
lgpl-2.1
shayanchabok555/newbot_shayan0099
plugins/remind.lua
279
1873
local filename='data/remind.lua' local cronned = load_from_file(filename) local function save_cron(msg, text,date) local origin = get_receiver(msg) if not cronned[date] then cronned[date] = {} end local arr = { origin, text } ; table.insert(cronned[date], arr) serialize_to_file(cronned, filename) re...
gpl-2.0
qj739/BadRotations
System/Libs/DiesalMenu-1.0/DiesalMenu-1.0.lua
11
3368
-- $Id: DiesalMenu-1.0.lua 53 2016-07-12 21:56:30Z diesal2010 $ local MAJOR, MINOR = "DiesalMenu-1.0", "$Rev: 53 $" local DiesalMenu, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not DiesalMenu then return end -- No Upgrade needed. -- ~~| Libraries |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
gpl-3.0
EvilHero90/otclient
modules/client_entergame/characterlist.lua
1
9274
CharacterList = { } -- private variables local charactersWindow local loadBox local characterList local errorBox local waitingWindow local updateWaitEvent local resendWaitEvent -- private functions local function tryLogin(charInfo, tries) tries = tries or 1 if tries > 50 then return end if g_game.isOnli...
mit
moypray/ardupilot
Tools/CHDK-Scripts/Cannon S100/3DR_EAI_S100.lua
178
29694
--[[ KAP UAV Exposure Control Script v3.2 -- 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
yaohuang2005/ntopng-json-rabbitmq-python-analysis
third-party/LuaJIT-2.0.3/dynasm/dasm_arm.lua
60
34483
------------------------------------------------------------------------------ -- DynASM ARM module. -- -- Copyright (C) 2005-2014 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _in...
gpl-3.0
micahmumper/naev
dat/missions/empire/longdistanceshipping/emp_longdistancecargo6.lua
3
3652
--[[ Sixth (and final) mission that explains the Empire long-distance cargo missions. Author: micahmumper ]]-- include "dat/scripts/numstring.lua" include "dat/scripts/jumpdist.lua" lang = naev.lang() if lang == "es" then -- not translated atm else -- default english bar_desc = "Lieutenant Czesc from t...
gpl-3.0
FreeBlues/neko8
libs/moonscript/moonscript/types.lua
1
5597
local util = require("libs.moonscript.moonscript.util") local Set Set = require("libs.moonscript.moonscript.data").Set local insert insert = table.insert local unpack unpack = util.unpack local manual_return = Set({ "foreach", "for", "while", "return" }) local cascading = Set({ "if", "unless", "with", "...
mit
eku/nodemcu-firmware
lua_modules/bh1750/bh1750.lua
7
1389
-- *************************************************************************** -- BH1750 module for ESP8266 with nodeMCU -- BH1750 compatible tested 2015-1-22 -- -- Written by xiaohu -- -- MIT license, http://opensource.org/licenses/MIT -- *************************************************************************** loca...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua
2
1253
-------------------------------- -- @module EaseQuarticActionInOut -- @extend ActionEase -- @parent_module cc -------------------------------- -- -- @function [parent=#EaseQuarticActionInOut] create -- @param self -- @param #cc.ActionInterval action -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (retu...
mit
JMCGameDev/gamecode4
Assets/Scripts/LevelPostInit.lua
44
1877
--======================================================================== -- 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...
lgpl-3.0
joshua-meng/Util
lua_test/specs/JSONSpec.lua
1
2024
require('modulization') local json = import('json') local Spec = import('spec.Spec') local JSONSpec = class('JSONSpec', Spec) function JSONSpec:run() self:describe('JSONSpec', function () self:describe('util.mkFullDir', function () self:it('should return table with correct data when json.decod...
gpl-2.0
altexy/lj-http-parser
lj_http_parser.lua
1
2639
-------------------------------------------------------------------------------- local ffi = require 'ffi' -------------------------------------------------------------------------------- local core = ffi.load("lj_http_parser") -------------------------------------------------------------------------------- ffi.cd...
mit