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
eku/nodemcu-firmware
lua_examples/mqtt/mqtt_file.lua
7
1736
-- test transfer files over mqtt. local m_dis = {} local function dispatch(m, t, pl) if pl ~= nil and m_dis[t] then m_dis[t](m,pl) end end local function pubfile(m,filename) file.close() file.open(filename) repeat local pl = file.read(1024) if pl then m:publish("/topic2", pl, 0, 0) end until not pl ...
mit
excessive/love-against-humanity
client/conf.lua
1
2457
function love.conf(t) t.identity = nil -- The name of the save directory (string) t.version = "0.9.1" -- The LÖVE version this game was made for (string) t.console = true -- Attach a console (boolean, Windows only) t.window.title = "LÖVE Against H...
mit
ABIZBOT/5
system/bot/bot.lua
1
7951
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("./system/bot/commands") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This fu...
gpl-2.0
z0fa/ChatNorris
libraries/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
6
2788
--[[----------------------------------------------------------------------------- Button Widget Graphical Button. -------------------------------------------------------------------------------]] local Type, Version = "Button", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidget...
gpl-3.0
JDoubleU00/JWXPBar
JWXPBar.lua
1
4092
-- Yes Another XP Bar. --Config area local JWBarHeight = 28 local JWBarWidth = 250 local JWBarAnchor = {"CENTER", UIPARENT, "CENTER", 0, -275} local JWBarPoint = {"CENTER", "JWXPBarFrame","CENTER", 0, 0} local JWBarTexture = "Interface\\TargetingFrame\\UI-StatusBar" --local JWBarFont = [[Fonts\FRIZQT__.TTF]] ...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/BillBoard.lua
11
1833
-------------------------------- -- @module BillBoard -- @extend Sprite -- @parent_module cc -------------------------------- -- Get the billboard rotation mode. -- @function [parent=#BillBoard] getMode -- @param self -- @return int#int ret (return value: int) -------------------------------- -- Set the ...
mit
SHIELDTM/senatorbot
plugins/invite.lua
393
1225
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then -- I...
gpl-2.0
EXILEDNONAME/SERVER
lua/ghost/handle.lua
7
1426
--[[ Copyright (C) 2014 HarpyWar (harpywar@gmail.com) This file is a part of the PvPGN Project http://pvpgn.pro Licensed under the same terms as Lua itself. ]]-- function gh_handle_game_userjoin(game, account) -- check that game owner is ghost bot if not gh_is_bot(game.owner) then return end -- send ping si...
gpl-2.0
botcatgood/mr
plugins/google.lua
2
1322
do local function googlethat(query) local url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&safe=active&&rsz=5&' local parameters = 'q='..(URL.escape(query) or '') -- Do the request local res, code = https.request(url..parameters) if code ~=200 then return nil end loca...
gpl-2.0
cosmo-ray/yirl
modules/jrpg-fight/animation.lua
1
1599
function initAnimationObj(main, anim, anime_func, field) main = Entity.wrapp(main) field = Entity.wrapp(field) anim = Entity.wrapp(anim) main[field:to_string()] = anim anim.animation_frame = 0 anim.func = anime_func doAnimation(main, field) return anim end function startAnimation(main, anime, ...
lgpl-3.0
qj739/BadRotations
System/UI/Toggles/Toggles.lua
4
5732
-- this handles old profiles buttons function TogglesFrame() GarbageButtons() --------------------------- -- Main Button -- --------------------------- -- Default Values emptyIcon = [[Interface\FrameGeneral\UI-Background-Marble]] backIconOn = [[Interface\ICONS\Spell_Holy_PowerWordShield]] backIconOff = [[...
gpl-3.0
maikerumine/nuclear_holocaust
mods/weather_pack/snow.lua
3
2339
snow = {} snow.particles_count = 15 snow.init_done = false -- calculates coordinates and draw particles for snow weather snow.add_rain_particles = function(player) rain.last_rp_count = 0 for i=snow.particles_count, 1,-1 do local random_pos_x, random_pos_y, random_pos_z = weather.get_random_pos_by_player_look...
lgpl-2.1
taestone/opennmt_merge
onmt/translate/DecoderAdvancer.lua
2
6042
--[[ DecoderAdvancer is an implementation of the interface Advancer for specifyinghow to advance one step in decoder. --]] local DecoderAdvancer = torch.class('DecoderAdvancer', 'Advancer') --[[ Constructor. Parameters: * `decoder` - an `onmt.Decoder` object. * `batch` - an `onmt.data.Batch` object. * `conte...
mit
prannayk/word2vec
util/BatchCreator.lua
1
7931
-- require 'path' require 'lfs' require 'nn' --local BatchCreator = torch.class('util.BatchCreator') BatchCreator = {} BatchCreator.__index = BatchCreator function BatchCreator.create(input_params) local self = {} setmetatable(self, BatchCreator) self.inputfile = input_params.input_file self.vocabfile = input_...
mit
maikerumine/nuclear_holocaust
mods/bucket/init.lua
2
9357
-- Minetest 0.4 mod: bucket -- See README.txt for licensing and other information. minetest.register_alias("bucket", "bucket:bucket_empty") minetest.register_alias("bucket_water", "bucket:bucket_water") --minetest.register_alias("bucket_lava", "bucket:bucket_lava") minetest.register_alias("bucket_toxic", "bucket:bucke...
lgpl-2.1
ahmadname12/animus1999
plugins/inpm.lua
85
9513
local function pre_process(msg) local to = msg.to.type local service = msg.service if to == 'user' and msg.fwd_from then if not is_support(msg.from.id) and not is_admin1(msg) then return end local user = 'user#id'..msg.from.id local from_id = msg.fwd_from.peer_id if msg.fwd_from.first_name then from_f...
gpl-2.0
KarlKode/dotfiles
hammerspoon/hammerspoon.symlink/init.lua
1
3065
-- Set up basic logger (messages are displayed in the Hammerspoon console) logger = hs.logger.new('ne-debugger', 'info'); -- Hyper key (triggered by capslock that is remapped to the keys bellow using Karabiner) hyper = {"cmd", "alt", "ctrl"} hyperS = {"cmd", "alt", "ctrl", "shift"} -- bind reload / show console at st...
mit
KarlKode/dotfiles
hammerspoon/hammerspoon.symlink/yabai.lua
1
7128
--- === Yubai === --- --- TODO: Description, URL etc. local obj={} obj.__index = obj -- Metadata obj.name = "URLDispatcher" obj.version = "0.3" obj.author = "Diego Zamboni <diego@zzamboni.org>" obj.homepage = "https://github.com/Hammerspoon/Spoons" obj.license = "MIT - https://opensource.org/licenses/MIT" -- TODO: C...
mit
joye/gamecode4
Assets/Scripts/TeapotBrains.lua
44
2897
--======================================================================== -- TeapotBrains.lua : Base class for teapot brains -- -- 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 McS...
lgpl-3.0
yaohuang2005/ntopng-json-rabbitmq-python-analysis
third-party/LuaJIT-2.0.3/src/jit/dump.lua
74
19509
---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2014 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -...
gpl-3.0
yraigne/domotique
Controle_sondes.lua
1
3285
-------------------------------------------------------------------------------- -- Source : http://domoticz.blogspot.fr/2014/07/un-exemple-de-script-lua-time-coherence.html -- Permet de renvoyer la commande actuelle sensée etre appliquée aux modules en 433 ( sans retour d'etat ) toutes les 15 minutes --------------...
gpl-3.0
PavlosMelissinos/densecap
densecap/modules/OurCrossEntropyCriterion.lua
4
1145
local CrossEntropyCriterion, Criterion = torch.class('nn.OurCrossEntropyCriterion', 'nn.Criterion') --[[ This is a copy of CrossEntropyCriterion from torch/nn, except that the inputs and targets are not squeezed. This was giving strange results for single-element minibatches. --]] function CrossEntropyCriterion:__ini...
mit
maikerumine/nuclear_holocaust
mods/thirsty/components.lua
4
7546
--[[ Default components for Thirsty. These are nodes and items that "implement" the functionality from functions.lua See init.lua for license. ]] --[[ Drinking containers (Tier 1) Defines a simple wooden bowl which can be used on water to fill your hydration. Optionally also augments the nodes from vessels to ...
lgpl-2.1
samael65535/skynet
lualib/http/httpc.lua
4
3127
local socket = require "http.sockethelper" local url = require "http.url" local internal = require "http.internal" local dns = require "dns" local string = string local table = table local httpc = {} local function request(fd, method, host, url, recvheader, header, content) local read = socket.readfunc(fd) local wr...
mit
EvilHero90/otclient
modules/corelib/ui/uiwindow.lua
3
1130
-- @docclass UIWindow = extends(UIWidget) function UIWindow.create() local window = UIWindow.internalCreate() window:setTextAlign(AlignTopCenter) window:setDraggable(true) window:setAutoFocusPolicy(AutoFocusFirst) return window end function UIWindow:getClassName() return 'UIWindow' end function UIWindow:...
mit
andronmobi/vlc-parrot-asteroid
share/lua/sd/fmc.lua
122
2554
--[[ $Id$ Copyright © 2010 VideoLAN and AUTHORS Authors: Fabio Ritrovato <sephiroth87 at videolan dot org> 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 ...
gpl-2.0
matmutant/sl4a
lua/luasocket/src/smtp.lua
142
7961
----------------------------------------------------------------------------- -- SMTP client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab -- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp $ ----------------------------------------------------------------------------- ---------...
apache-2.0
Murii/Tilo-game-framework
main.lua
1
3340
tilo = {} local paddle1 = {} paddle1.x = 10 paddle1.y = window:getHeight()/2 paddle1.w = 10 paddle1.h = 50 local paddle2 = {} paddle2.x = window:getWidth()-20 paddle2.y = window:getHeight()/2 paddle2.w = 10 paddle2.h = 50 local ball = {} ball.x = window:getWidth()/2 ball.y = window:getHeight()/2+16 ball.radius = 8 b...
mit
mohammads15/super-window
bot/windowbot.lua
1
10533
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 = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
gpl-2.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/PUParticleSystem3D.lua
4
12083
-------------------------------- -- @module PUParticleSystem3D -- @extend ParticleSystem3D -- @parent_module cc -------------------------------- -- -- @function [parent=#PUParticleSystem3D] initWithFilePath -- @param self -- @param #string filePath -- @return bool#bool ret (return value: bool) ------------...
mit
FreeBlues/neko8
libs/asm-lua/include/std.lua
1
2504
local std = {} -- base operations, included in prelude std.itoa = [[local itoa=function() _R.ds=tostring(_R.a) end]] std.atoi = [[local atoi=function() _R.ds=tostring(_R.a) end]] std.memset = [[local memset=function() for i=0,_R.c-1 do _D[_R.b+i]=_R.a end end]] std.memcpy = [[local memcpy=function() for i=0,_R.c-1 do...
mit
peterayeni/kong
spec/plugins/ssl/fixtures.lua
29
1779
return { cert = [[-----BEGIN CERTIFICATE----- MIICSTCCAbICCQDZ7lxm1iUKmDANBgkqhkiG9w0BAQsFADBpMQswCQYDVQQGEwJV UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEN MAsGA1UECgwES29uZzELMAkGA1UECwwCSVQxETAPBgNVBAMMCHNzbDEuY29tMB4X DTE1MDUxOTAwNTAzNloXDTE1MDYxODAwNTAzNlowaTELMAkGA1UEBhMCVVMxEzAR BgNVBAgMCkNh...
apache-2.0
Ardy123/xsd-tools
src/TemplateEngine/table.lua
3
1189
--[[ Copyright: (c)2012 Ardavon Falls This file is part of xsd-tools. xsd-tools 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 3 of the License, or (at your option) any later version....
gpl-3.0
micahmumper/naev
dat/factions/equip/generic.lua
13
11434
-- Outfit definitions include("dat/factions/equip/outfits.lua") -- Helper functions include("dat/factions/equip/helper.lua") --[[ -- @brief Does generic pilot equipping -- -- @param p Pilot to equip --]] function equip_generic( p ) -- Start with an empty ship p:rmOutfit("all") p:rmOutfit("cores") -- G...
gpl-3.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua
19
1088
-------------------------------- -- @module AnchorPointFrame -- @extend Frame -- @parent_module ccs -------------------------------- -- -- @function [parent=#AnchorPointFrame] setAnchorPoint -- @param self -- @param #vec2_table point -- @return AnchorPointFrame#AnchorPointFrame self (return value: ccs.AnchorPointFr...
mit
qj739/BadRotations
System/UI/Elements/Spinner.lua
4
2382
local DiesalGUI = LibStub("DiesalGUI-1.0") function br.ui:createSpinner(parent, text, number, min, max, step, tooltip, tooltipSpin, hideCheckbox) local newSpinner = DiesalGUI:Create('Spinner') local parent = parent -- Create Checkbox for Spinner local checkBox = br.ui:createCheckbox(parent, text, tool...
gpl-3.0
fetaera/mudlet-qt5
src/mudlet-lua/lua/StringUtils.lua
7
4650
---------------------------------------------------------------------------------- --- Mudlet String Utils ---------------------------------------------------------------------------------- --- Cut string to specified maximum length. --- --- @release post Mudlet 1.1.1 (<b><u>TODO update before release</u></b>) --- -...
gpl-2.0
taestone/opennmt_merge
tools/utils/unicode.lua
2
4829
-- for lua < 5.3 compatibility local bit32 = nil if not bit32 then bit32 = require('bit32') end local unidata = require('tools.utils.unidata') local unicode = {} -- convert the next utf8 character to ucs -- returns codepoint and utf-8 character function unicode._utf8_to_cp(s, idx) if idx > #s then return end i...
mit
maikerumine/nuclear_holocaust
mods/handle_schematics/build_chest_add_schems_by_directory.lua
3
5425
local build_chest_add_files_to_menu_from_directory = function( schem, path, entry_name, backup_name, menu_path_list) -- we need the filename without extension (*.mts, *.we, *.wem) local schemname = schem; local i = string.find( schem, '.mts', -4 ); if( i ) then schemname = string.sub( schem, 1, i-1 ); ...
lgpl-2.1
XR-s/Do-an-Sar-
sf/share/locale/turkey/quest/flame_dungeon.lua
1
29527
quest flame_dungeon begin state start begin when 20394.click with pc.get_level() >= 90 begin pc.give_item2(71175, 1) set_state(run) end end state run begin function setting() return { ["bossroom_entry_pos"] = {8109,6867}, ...
apache-2.0
noah/awesome
partials/04_tags.lua
1
2725
-- {{{ Tags -- -- Only 12 keys will be used for tags (keyboard order). Tags are -- indexed in top-row natural keyboard order [1,2,3,...,0,'-',=']. This -- indexing corresponds to the alt+-prefixed keybindings they receive -- elsewhere and gives a pretty good reasonable total of 12 tags per -- screen. That extends t...
mit
maikerumine/nuclear_holocaust
mods/cityscape/deco_deciduous.lua
2
5448
--------------------- -- Deciduous Trees -- --------------------- -- Make some leaves of different colors (but the same properties). local newnode = cityscape.clone_node("default:leaves") if cityscape.noleafdecay then newnode.groups.leafdecay = 0 end newnode.tiles = {"default_leaves.png^[colorize:#FF0000:20"} minetes...
lgpl-2.1
MikaPetteriLundgren/Domoticz-Lua-scripts
script_security_securityalarmcompanion.lua
1
3533
--[[Intention of this script is to work as a companion script for the ”script_device_securityalarm.lua” script. The script triggers if security device is set to Normal state. Script turns alarm siren and fire alarm off only if there has been a security alarm. Script runs every time state of the security device is ch...
mit
warreee/Algorithm-Implementations
Derivative/Lua/Yonaba/derivative.lua
26
1918
-- Derivative evaluation algorithm implementation -- See : http://en.wikipedia.org/wiki/Derivative -- Fuzzy equality test local function fuzzyEqual(a, b, eps) local eps = eps or 1e-4 return (math.abs(a - b) < eps) end -- Evaluates the derivative of function f at x0 -- Uses Newton's forward slope approximation -- ...
mit
maikerumine/nuclear_holocaust
mods/farming/rhubarb.lua
3
2228
--= Rhubarb minetest.register_craftitem("farming:rhubarb", { description = "Rhubarb", inventory_image = "farming_rhubarb.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") end, on_use = minetest.item_eat(1), }) minetest....
lgpl-2.1
micahmumper/naev
dat/missions/neutral/diy-nerds.lua
6
19357
--[[    MISSION: diy-nerds    DESCRIPTION: Cart some nerds and their hardware to some DIY contest on a neighbouring planet. Wait until the contest is over, then cart them back. Receive either your payment or their hardware. The player can fail in multiple ways. AUTHOR: thilo <thilo@thil...
gpl-3.0
eriser/psycle
psycle/LuaScripts/plugineditor/pluginselector.lua
1
7856
-- psycle pluginselector (c) 2016 by psycledelics -- File: pluginselector.lua -- copyright 2016 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
LuaDist2/coronest
test/lua-5.3.0.lua
3
20210
-- $Id: coroutine.lua,v 1.37 2014/12/26 17:20:53 roberto Exp $ print "testing coroutines" local coroutine = require "coroutine.make" () local debug = require'debug' local f local main, ismain = coroutine.running() assert(type(main) == "thread" and ismain) assert(not coroutine.resume(main)) assert(not coroutine.isyi...
mit
peterayeni/kong
kong/cli/utils/signal.lua
4
12294
-- Send signals to the `nginx` executable -- Run the necessary so the nginx working dir (prefix) and database are correctly prepared -- @see http://nginx.org/en/docs/beginners_guide.html#control local IO = require "kong.tools.io" local cutils = require "kong.cli.utils" local ssl = require "kong.cli.utils.ssl" local co...
apache-2.0
EagleTeam/EST-GP
plugins/dashboard.lua
1
5919
local config = require 'config' local misc = require 'utilities'.misc local roles = require 'utilities'.roles local api = require 'methods' local plugin = {} local function getFloodSettings_text(chat_id) local status = db:hget('chat:'..chat_id..':settings', 'Flood') or 'yes' --check (default: disabled) if sta...
gpl-2.0
xXX-mRx-XXx/xxXxx
plugins/ar-azan.lua
2
3179
do function run_bash(str) local cmd = io.popen(str) local result = cmd:read('*all') return result end local api_key = nil local base_api = "https://maps.googleapis.com/maps/api" function get_latlong(area) local api = base_api .. "/geocode/json?" local parameters = "address=".. (URL.escape(area) or ...
gpl-2.0
aliasadi126/test
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...
unlicense
maikerumine/nuclear_holocaust
mods/noairblocks/init.lua
2
7096
-- NODES minetest.register_node("noairblocks:water_flowingx", { description = "Flowing Waterx", inventory_image = minetest.inventorycube("default_water.png"), drawtype = "flowingliquid", tiles = {"default_water.png"}, special_tiles = { { image="default_water_flowing_animated.png", backface_culling=false, ...
lgpl-2.1
joeyhng/nn
SpatialDropout.lua
10
1684
local SpatialDropout, Parent = torch.class('nn.SpatialDropout', 'nn.Module') function SpatialDropout:__init(p,stochasticInference) Parent.__init(self) self.p = p or 0.5 self.train = true self.stochastic_inference = stochasticInference or false self.noise = torch.Tensor() end function SpatialDropout:upd...
bsd-3-clause
asamy45/forgottenmapeditor
modules/corelib/ui/uitable.lua
1
5416
-- @docclass --[[ TODO: * Make table headers more robust. * Get dynamic row heights working with text wrapping. * Every second row different background color applied. ]] UITable = extends(UIWidget) local HEADER_ID = 'row0' function UITable.create() local table = UITable.internalCreate() table.header...
mit
libremap/libremap-agent-openwrt
libremap-agent/luasrc/libremap/plugins/babel.lua
2
1777
--[[ Copyright 2014 Geneviève Bastien <gbastien@versatic.net> 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 ]]-- local libremap = require 'luci.libre...
apache-2.0
coderstudy/luarocks
src/luarocks/write_rockspec.lua
14
11155
--module("luarocks.write_rockspec", package.seeall) local write_rockspec = {} package.loaded["luarocks.write_rockspec"] = write_rockspec local dir = require("luarocks.dir") local fetch = require("luarocks.fetch") local fs = require("luarocks.fs") local path = require("luarocks.path") local persist = require("luarocks...
mit
hizel/dotfiles
awesome/vicious/helpers.lua
1
1105
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2009, Adrian C. <anrxc.sysphere.org> -- * (c) Wicked, Lucas de Vries --------------------------------------------------- -- {{{ Grab environment local pairs = pairs local string = { sub = string.sub, ...
bsd-2-clause
mahdib9/mj
plugins/anti_spam.lua
435
3886
--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
FreeBlues/neko8
editors/sfx.lua
1
8421
local UiManager = require "ui.manager" local UiLabelButton = require "ui.label_button" local UiCounter = require "ui.counter" local UiButton = require "ui.button" local UiComponent = require "ui.component" local sfx = {} keyToNoteMap = { [ "z" ] = "c ", [ "x" ] = "d ", [ "c" ] = "e ", [ "v" ] = "f ", [ "b" ] = "...
mit
yaohuang2005/ntopng-json-rabbitmq-python-analysis
scripts/callbacks/second.lua
2
1297
-- -- (C) 2013 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "graph_utils" -- Toggle debug local enable_second_debug = 0 ifnames = interface.getIfNames() for _,ifname in pairs(ifnames) do a = string.ends(ifname, ".p...
gpl-3.0
rasol-fucker/Self-Bot
plugins/help.lua
1
2617
do function run(msg, matches) local help = [[Self-Bot Commands ●#bot on فعال کردن بوت در یک گروه خواص ●#bot off غیر فعال کردن بوت در یک گروه خواض ●#plugins مشاهده لیست پلاگین ها ●#plugins enable (plugin name) فعال کردن پلاگینی با نام (plugin name) ●#plugins disable (plugin name) غیر فعال کردن پلاگینی با نام...
gpl-2.0
samael65535/skynet
test/testredis.lua
85
1039
local skynet = require "skynet" local redis = require "redis" local conf = { host = "127.0.0.1" , port = 6379 , db = 0 } local function watching() local w = redis.watch(conf) w:subscribe "foo" w:psubscribe "hello.*" while true do print("Watch", w:message()) end end skynet.start(function() skynet.fork(watc...
mit
maikerumine/nuclear_holocaust
mods/default/mapgen.lua
2
45396
-- -- Aliases for map generator outputs -- minetest.register_alias("mapgen_stone", "default:stone") minetest.register_alias("mapgen_dirt", "default:dirt") minetest.register_alias("mapgen_dirt_with_grass", "default:dry_dirt") minetest.register_alias("mapgen_sand", "default:sand") minetest.register_alias("mapgen_water_s...
lgpl-2.1
maikerumine/nuclear_holocaust
mods/cottages/UNUSED/nodes_barrel.lua
6
8818
--------------------------------------------------------------------- -- a barrel and a tub - plus a function that makes 'round' objects --------------------------------------------------------------------- -- IMPORTANT NOTE: The barrel requires a lot of nodeboxes. That may be -- too much for weak hard...
lgpl-2.1
EagleTeam/EST-GP
plugins/users.lua
1
10462
local config = require 'config' local misc = require 'utilities'.misc local roles = require 'utilities'.roles local api = require 'methods' local plugin = {} local function do_keyboard_credits() local keyboard = {} keyboard.inline_keyboard = { { {text = _("Channel"), url = 'https://telegram.me/'..conf...
gpl-2.0
deplinenoise/tundra
scripts/tundra/path.lua
20
1650
module(..., package.seeall) local npath = require "tundra.native.path" local native = require "tundra.native" split = npath.split normalize = npath.normalize join = npath.join get_filename_dir = npath.get_filename_dir get_filename = npath.get_filename get_extension = npath.g...
mit
warreee/Algorithm-Implementations
Iterative_Deepening_Depth_First_Search/Lua/Yonaba/iddfs.lua
26
3480
-- Generic Iterative Deepening Depth-First search algorithm implementation -- See : http://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search -- Notes : this is a generic implementation of IDDFS algorithm. -- It is devised to be used on any type of graph (point-graph, tile-graph, -- or whatever. It expects t...
mit
ramonsnir/redis
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...
bsd-3-clause
cch123/codis
extern/redis-2.8.13/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
Paydar-robotic/Paydar
libs/dkjson.lua
1
26560
-- 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 value...
gpl-3.0
biohazardlover/ROer
DataConverter/Data/Thai/skilldescript.lua
1
789147
-- Decompiled using luadec 2.2 GBK r120 from http://luadec.googlecode.com -- Command line: skilldescript.lub SKILL_DESCRIPT = { [SKID.NV_BASIC] = {"ความสามารถพื้นฐา\185", "MAX Lv : 9", "^777777ใช้ความสามารถขั้นพื้นฐาน^000000", "[เลเว\197 1] : แลกเปลี่ยน", "^777777ทำให้แลกเปลี่ยนสิ่งของกับตัวละครอื่นได้^000000", "^990...
mit
fetaera/mudlet-qt5
src/mudlet-lua/lua/geyser/GeyserGauge.lua
23
4524
-------------------------------------- -- -- -- The Geyser Layout Manager by guy -- -- -- -------------------------------------- --- Represents a gauge that can be either vertical or horizontal. -- @class table -- @name Geyser.Gauge -- @field value Perc...
gpl-2.0
maikerumine/nuclear_holocaust
mods/minetest-we/worldedit_gui/init.lua
2
8997
worldedit = worldedit or {} --[[ Example: worldedit.register_gui_function("worldedit_gui_hollow_cylinder", { name = "Make Hollow Cylinder", privs = {worldedit=true}, get_formspec = function(name) return "some formspec here" end, on_select = function(name) print(name .. " clicked the button!") ...
lgpl-2.1
yraigne/domotique
PID chauffage/script_time_cmdchauffv2.lua
1
3141
-- script_time_cmdchauffv2.lua --------------------------------------- -- G PETREMENT ------------------------------------------------------- ---------------------------------------------------------------------- -- Permet de commander relais de pilotage de chaudiere à gaz --------- -- Le cycle fait 900s / 15min -...
gpl-3.0
qj739/BadRotations
Rotations/Warlock/Demonology/DemonologyCuteOne.lua
1
50995
local rotationName = "CuteOne" --------------- --- Toggles --- --------------- local function createToggles() -- Rotation Button RotationModes = { [1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps between Single and Multiple based on number of targets in range.", highlight = 1...
gpl-3.0
maikerumine/nuclear_holocaust
mods/cottages/UNUSED/nodes_fences.lua
6
4047
-- 22.01.13 Changed texture to that of the wood from the minimal development game local S = cottages.S minetest.register_node("cottages:fence_small", { description = S("small fence"), drawtype = "nodebox", -- top, bottom, side1, side2, inner, outer tiles = {"cottages_minimal_wood.png"}, paramt...
lgpl-2.1
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua
1
1931
-------------------------------- -- @module LayerMultiplex -- @extend Layer -- @parent_module cc -------------------------------- -- initializes a MultiplexLayer with an array of layers<br> -- since v2.1 -- @function [parent=#LayerMultiplex] initWithArray -- @param self -- @param #array_table arrayOfLayers -- @retu...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua
2
1253
-------------------------------- -- @module EaseQuinticActionInOut -- @extend ActionEase -- @parent_module cc -------------------------------- -- -- @function [parent=#EaseQuinticActionInOut] create -- @param self -- @param #cc.ActionInterval action -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (retu...
mit
joeyhng/nn
SpatialDilatedConvolution.lua
9
2629
local THNN = require 'nn.THNN' local SpatialDilatedConvolution, parent = torch.class('nn.SpatialDilatedConvolution', 'nn.SpatialConvolution') function SpatialDilatedConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH, dilationW, dilationH) parent.__init(self, nInputPlane, nOutputPlane, kW, kH, ...
bsd-3-clause
aderiabin/sdl_atf
modules/atf/stdlib/std/strict.lua
1
1521
--[[-- Checks uses of undeclared global variables. All global variables must be 'declared' through a regular assignment (even assigning `nil` will do) in a top-level chunk before being used anywhere or assigned to inside a function. To use this module, just require it near the start of your program. From Lua distrib...
bsd-3-clause
ignacio/luarocks
src/luarocks/tools/zip.lua
9
8372
--- A Lua implementation of .zip file archiving (used for creating .rock files), -- using only lzlib. --module("luarocks.tools.zip", package.seeall) local zip = {} local zlib = require("zlib") local fs = require("luarocks.fs") local dir = require("luarocks.dir") local function number_to_bytestring(number, nbytes) ...
mit
andronmobi/vlc-parrot-asteroid
share/lua/playlist/cue.lua
12
3748
--[[ Parse CUE files $Id$ Copyright (C) 2009 Laurent Aimar 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 pro...
gpl-2.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua
5
5676
-------------------------------- -- @module cc -------------------------------------------------------- -- the cc PhysicsShape -- @field [parent=#cc] PhysicsShape#PhysicsShape PhysicsShape preloaded module -------------------------------------------------------- -- the cc PhysicsShapeCircle -- @field [parent=#cc] Ph...
mit
micahmumper/naev
dat/missions/baron/baron_baron.lua
3
12805
--[[ -- This is the first mission in the crazy baron string. --]] -- localization stuff, translators would work here lang = naev.lang() if lang == "es" then else -- default english sysname1 = "Darkstone" sysname2 = "Ingot" planetname = "Varia" title = {} text = {} osd_msg = {} title[1] = "...
gpl-3.0
MasterKia/Pars
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
ScegfOd/wesnoth
data/ai/micro_ais/mai-defs/recruiting.lua
7
1435
local H = wesnoth.require "lua/helper.lua" local W = H.set_wml_action_metatable {} local function handle_default_recruitment(cfg) -- Also need to delete/add the default recruitment CA if cfg.action == 'add' then W.modify_ai { side = cfg.side, action = "try_delete", path = "stage[main_loop].candidate_actio...
gpl-2.0
SHIELDTM/senatorbot
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
qj739/BadRotations
System/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
7
16485
local MAJOR, MINOR = "LibArtifactData-1.0", 15 assert(_G.LibStub, MAJOR .. " requires LibStub") local lib = _G.LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end lib.callbacks = lib.callbacks or _G.LibStub("CallbackHandler-1.0"):New(lib) local Debug = function() end if _G.AdiDebug then Debug = _G.AdiDebug:...
gpl-3.0
3epnm/lua-data-logger
read.lua
1
4687
-- This simple LUA script is used for logging serial port data send by an Arduino to a OpenWRT router -- add the path where includes could be found local packages = '/root/lua-data-logger' -- adress of the serial port where the arduino is connected local port = '/dev/tts/1' -- path where to write logfiles local data_p...
mit
micahmumper/naev
dat/missions/neutral/nebu_satellite.lua
6
5324
--[[ Nebula Satellite One-shot mission Help some independent scientists put a satellite in the nebula. ]]-- include "dat/scripts/numstring.lua" -- localization stuff, translators would work here lang = naev.lang() if lang == "es" then else -- default english bar_desc = "A bunch of scientists seem to b...
gpl-3.0
maikerumine/nuclear_holocaust
mods/weather_pack/weather_core.lua
3
6159
weather = { -- weather states, 'none' is default, other states depends from active mods state = "none", -- player list for saving player meta info players = {}, -- time when weather should be re-calculated next_check = 0, -- default weather recalculation interval check_interval = 300, -- w...
lgpl-2.1
micahmumper/naev
dat/factions/spawn/flf.lua
11
2042
include("dat/factions/spawn/common.lua") -- @brief Spawns a small fleet. function spawn_patrol () local pilots = {} local r = rnd.rnd() if r < 0.5 then scom.addPilot( pilots, "FLF Lancelot", 25 ); scom.addPilot( pilots, "FLF Lancelot", 25 ); elseif r < 0.8 then scom.addPilot( pil...
gpl-3.0
XanDDemoX/ESOCookeryWiz-Tweak
EasyFrame/EasyFrame.lua
1
12447
local SHOW_HIDE = 1 local SHOW_SHRUNK = 2 local SHOW_NORMAL = 3 -- The EasyFrame class EasyFrame = {} EasyFrame.name = "EasyFrame" EasyFrame.ui = nil EasyFrame.buttonShrink = nil EasyFrame.textureShrink = nil EasyFrame.expandTooltip = "Expand" EasyFrame.shrinkTooltip = "Shrink" EasyFrame.shrinkBu...
unlicense
breakds/torch7
CmdLine.lua
62
7104
local CmdLine = torch.class('torch.CmdLine') local function strip(str) return string.match(str, '%-*(.*)') end local function pad(str, sz) return str .. string.rep(' ', sz-#str) end function CmdLine:error(msg) print('') io.stderr:write(msg) print('') self:help() os.exit(1) end function CmdLine:...
bsd-3-clause
tmbr54/Cluedota
game/dota_addons/cluedota/scripts/vscripts/abilities/create_new_hint.lua
1
3706
function createNewHint(event) -- Oh my god, what a mess ... local target = event.target local caster = event.caster --Get target to face caster rotateTargetToCaster(target, caster) local npc_name = target:GetUnitName() local caster_name = caster:GetUnitName() print("Target name", npc_name) prin...
apache-2.0
CaptainCN/QCEditor
cocos2d/external/lua/luasocket/script/socket/smtp.lua
31
8096
----------------------------------------------------------------------------- -- SMTP client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- -------------------------------------------------------------------------...
mit
ignacio/luarocks
src/luarocks/fetch/git_ssh.lua
15
1382
--- Fetch back-end for retrieving sources from Git repositories -- that use ssh:// transport. For example, for fetching a repository -- that requires the following command line: -- `git clone ssh://git@example.com/path/foo.git -- you can use this in the rockspec: -- source = { url = "git+ssh://git@example.com/path/foo....
mit
excessive/love-against-humanity
client/libs/LoveFrames/objects/internal/linenumberspanel.lua
6
4137
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- linenumberspanel class local newobject = loveframes.NewObject("linenumberspanel", "loveframes_object_linenumberspanel", t...
mit
warreee/Algorithm-Implementations
Best_First_Search/Lua/Yonaba/utils/bheap.lua
78
2454
-- Binary Heap data structure implementation -- See: http://www.policyalmanac.org/games/binaryHeaps.htm -- Adapted from: https://github.com/Yonaba/Binary-Heaps local PATH = (...):gsub('%.bheap$','') local class = require (PATH .. '.class') -- Looks for item in an array local function findIndex(array, item) for k,v ...
mit