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
digitalloggers/nodemcu-firmware
lua_examples/adc_rgb.lua
73
1163
-- -- Light sensor on ADC(0), RGB LED connected to gpio12(6) Green, gpio13(7) Blue & gpio15(8) Red. -- This works out of the box on the typical ESP8266 evaluation boards with Battery Holder -- -- It uses the input from the sensor to drive a "rainbow" effect on the RGB LED -- Includes a very "pseudoSin" function -- f...
mit
weera00/nodemcu-firmware
lua_examples/adc_rgb.lua
73
1163
-- -- Light sensor on ADC(0), RGB LED connected to gpio12(6) Green, gpio13(7) Blue & gpio15(8) Red. -- This works out of the box on the typical ESP8266 evaluation boards with Battery Holder -- -- It uses the input from the sensor to drive a "rainbow" effect on the RGB LED -- Includes a very "pseudoSin" function -- f...
mit
tomm/pioneer
data/libs/Legal.lua
1
2102
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Comms = import("Comms") local Game = import("Game") local Lang = import("Lang") local l = Lang.GetResource("ui-core") -- -- Namespace: Legal -- -- -- Constants: CrimeType ...
gpl-3.0
kurtbieg/LEX_OPEN_SOURCE__CORONA_SDK
Systems/Log.lua
1
2354
module(..., package.seeall) local json = require "json"; local _logs = {}; _logs["TRACE"] = {suppress=false, messages={}, indent=0}; _logs["WARNING"] = {suppress=false, messages={}, indent=0}; _logs["ERROR"] = {suppress=false, messages={}, indent=0}; local _messages = {}; local _suppressAll = false; local _defaultE...
mit
sundream/gamesrv
script/card/wood/card225008.lua
1
2268
--<<card 导表开始>> local super = require "script.card.wood.card125008" ccard225008 = class("ccard225008",super,{ sid = 225008, race = 2, name = "列王守卫", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ma...
gpl-2.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/external/lua/luajit/src/dynasm/dasm_arm.lua
74
34483
------------------------------------------------------------------------------ -- DynASM ARM module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _in...
mit
LukeFarrell/incubator-openwhisk-apigateway
scripts/lua/policies/security/oauth2.lua
1
3337
-- Copyright (c) 2016 IBM. All rights reserved. -- -- 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, mod...
apache-2.0
lgvier/dotfiles
.hammerspoon/init.lua
1
3802
local mash = {"ctrl","alt","cmd"} --hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", function() -- hs.reload() --end) function reload_config(files) hs.reload() end hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reload_config):start() hs.alert.show("Config loaded") require "sizeup" function eclipse_focus() lo...
mit
wangchenOS/skynet
service/sharedatad.lua
8
2725
local skynet = require "skynet" local sharedata = require "sharedata.corelib" local table = table local NORET = {} local pool = {} local pool_count = {} local objmap = {} local function newobj(name, tbl) assert(pool[name] == nil) local cobj = sharedata.host.new(tbl) sharedata.host.incref(cobj) local v = { value =...
mit
wangchenOS/skynet
lualib/skynet.lua
3
16437
local c = require "skynet.core" local tostring = tostring local tonumber = tonumber local coroutine = coroutine local assert = assert local pairs = pairs local pcall = pcall local profile = require "profile" coroutine.resume = profile.resume coroutine.yield = profile.yield local proto = {} local skynet = { -- read ...
mit
tltneon/NutScript
plugins/spawns.lua
5
3010
local PLUGIN = PLUGIN PLUGIN.name = "Spawns" PLUGIN.desc = "Spawn points for factions and classes." PLUGIN.author = "Chessnut" PLUGIN.spawns = PLUGIN.spawns or {} function PLUGIN:PostPlayerLoadout(client) if (self.spawns and table.Count(self.spawns) > 0 and client:getChar()) then local class = client:getChar():get...
mit
princess-selena/pricess-selena2
plugins/contact_manager.lua
1
4704
local function get_contact_list_callback (cb_extra, success, result) local text = " " for k,v in pairs(result) do if v.print_name and v.id and v.phone then text = text..string.gsub(v.print_name , "_" , " ").." ["..v.id.."] = "..v.phone.."\n" end end local file = io.open("contact_list.txt", "w") ...
gpl-2.0
codemon66/Urho3D
Source/ThirdParty/toluapp/src/bin/lua/define.lua
43
1317
-- tolua: define class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: define.lua,v 1.2 1999/07/28 22:21:08 celes Exp $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to provide ...
mit
Sour/pfUI
api/unitframes.lua
1
53689
pfUI.uf = CreateFrame("Frame",nil,UIParent) pfUI.uf.frames = {} -- load pfUI environment setfenv(1, pfUI:GetEnvironment()) local pfValidUnits = {} pfValidUnits["player"] = true pfValidUnits["target"] = true pfValidUnits["pet"] = true pfValidUnits["mouseover"] = true pfValidUnits["player" .. "target"] = true pfValidU...
mit
dalvorsn/tests
data/spells/scripts/attack/curse.lua
27
1206
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) local condition = createConditionObject(CONDITION_CURSED) setConditionParam(condition,...
gpl-2.0
sev-/scummvm
devtools/create_ultima/files/ultima6/scripts/u6/usecode.lua
18
2112
local USE_EVENT_USE = 0x01 function use_telescope(obj, actor) if obj.on_map == true then mapwindow_center_at_location(obj.x, obj.y, obj.z) else -- FIXME - should probably work in the inventory (can't be done without cheating though) print("Not usable\n") return end local dir = really_get_direction("Direction...
gpl-3.0
alidess/aliali
plugins/commands.lua
31
2957
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
markkolich/FrameworkBenchmarks
frameworks/Lua/lapis/web.lua
72
5957
local lapis = require("lapis") local db = require("lapis.db") local Model do local _obj_0 = require("lapis.db.model") Model = _obj_0.Model end local config do local _obj_0 = require("lapis.config") config = _obj_0.config end local insert do local _obj_0 = table insert = _obj_0.insert end local sort do loc...
bsd-3-clause
sundream/gamesrv
script/card/neutral/card265026.lua
1
2235
--<<card 导表开始>> local super = require "script.card.neutral.card165026" ccard265026 = class("ccard265026",super,{ sid = 265026, race = 6, name = "狗头人地卜师", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
libremesh/lime-packages
packages/lime-proto-bgp/files/usr/lib/lua/lime/proto/bgp.lua
2
2624
#!/usr/bin/lua local network = require("lime.network") local config = require("lime.config") local fs = require("nixio.fs") local utils = require("lime.utils") proto = {} proto.configured = false function proto.configure(args) if proto.configured then return end proto.configured = true local ipv4, ipv6 = netwo...
agpl-3.0
spark0511/revolt_bot
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua
30
2105
--[[ LuCI - Lua Configuration Interface Copyright 2012 Christian Gagneraud <chris@techworks.ie> 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 $Id$ ]]...
gpl-2.0
mortezaand/tgpragramer
webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
jkhlf85/THETETOO_8
bot/seedbot.lua
1
7737
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") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This function is ...
agpl-3.0
sami2448/set
plugins/welcomepn.lua
7
3674
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
mahyarnajibi/fast-rcnn-torch
main_test.lua
1
1245
-- Require the detection package require 'detection' -- Paths local dataset_name = config.dataset local image_set = config.test_img_set local dataset_dir = paths.concat(config.dataset_path,dataset_name) local ss_dir = './data/datasets/selective_search_data/' local ss_file = paths.concat(ss_dir,dataset_name .. '_' .. ...
mit
letmefly/skynet
lualib/mqueue.lua
115
1798
-- This is a deprecated module, use skynet.queue instead. local skynet = require "skynet" local c = require "skynet.core" local mqueue = {} local init_once local thread_id local message_queue = {} skynet.register_protocol { name = "queue", -- please read skynet.h for magic number 8 id = 8, pack = skynet.pack, u...
mit
sundream/gamesrv
script/card/wood/card125006.lua
1
2594
--<<card 导表开始>> local super = require "script.card.init" ccard125006 = class("ccard125006",super,{ sid = 125006, race = 2, name = "真银之剑", type = 301, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/contrib/luadoc/lua/luadoc/taglet/standard/tags.lua
93
5221
------------------------------------------------------------------------------- -- Handlers for several tags -- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $ ------------------------------------------------------------------------------- local luadoc = require "luadoc" local util = require "luadoc.util"...
gpl-2.0
ld-test/lua-log
lua/log/writer/net/zmq/_private/compat.lua
4
3040
local function prequire(...) local ok, mod = pcall(require, ...) return ok and mod, mod or nil end local zmq, zthreads, zpoller local zstrerror, zassert, ETERM local zconnect, zbind local zrecv_all, zrecv local zerrcode local function has_member(t, key) local ok, has if type(key) == "table" th...
mit
sundream/gamesrv
script/card/neutral/card166026.lua
1
2204
--<<card 导表开始>> local super = require "script.card.init" ccard166026 = class("ccard166026",super,{ sid = 166026, race = 6, name = "贝恩·血蹄", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/ActionObject.lua
6
2600
-------------------------------- -- @module ActionObject -- @extend Ref -------------------------------- -- @function [parent=#ActionObject] setCurrentTime -- @param self -- @param #float float -------------------------------- -- @function [parent=#ActionObject] pause -- @param self --------------...
mit
spark0511/revolt_bot
plugins/id.lua
355
2795
local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, resu...
gpl-2.0
dylanwh/moonshine
src/preload.lua
1
1738
--[[ Moonshine - a Lua-based chat client Copyright (C) 2010 Dylan William Hardison This file is part of Moonshine. Moonshine 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, e...
gpl-3.0
hazarkarabay/nodemcu-httpserver
http/node_info.lua
5
1347
local function sendHeader(connection) connection:send("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nCache-Control: private, no-store\r\n\r\n") end local function sendAttr(connection, attr, val) connection:send("<li><b>".. attr .. ":</b> " .. val .. "<br></li>\n") end return function (connection, req,...
gpl-2.0
dylanwh/moonshine
runtime/moonshine/shell/account.lua
2
2708
local parseopt = require "moonshine.parseopt" local log = require "moonshine.log" local purple_account = require "purple.account" local get_subcmd = parseopt.build_parser { '#' } local subcmd = {} local parser = { add = parseopt.build_parser { '#', -- username '#', -- protocol 'port|p=n',...
gpl-3.0
sami2448/set
plugins/id.lua
226
4260
local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, result) local re...
gpl-2.0
n-sierra/cc-scm
src/eval.lua
1
4328
function eval(data, env) local left, ret if data["type"] == "cons" then left = eval(data["left"], env) -- tail recursion return apply(left, data["right"], env) elseif data["type"] == "id" then ret = get_var(env, data["value"]) if not ret then error("undefined variable is refered: " .. ...
mit
Choumiko/Factorio-Stdlib
spec/area/position_spec.lua
1
8223
require 'spec/defines' require 'stdlib/area/position' describe('Position', function() it('should validate position construction', function() assert.same({x = -4, y = 21}, Position.construct(-4, 21)) end) it('should validate position copies', function() local pos = { x = -4, y = 5 } ...
isc
sundream/gamesrv
script/card/fire/card144001.lua
1
2642
--<<card 导表开始>> local super = require "script.card.init" ccard144001 = class("ccard144001",super,{ sid = 144001, race = 4, name = "关门放狗", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
facebokiii/facebookplug
plugins/minecraft.lua
624
2605
local usage = { "!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565", "!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.", } local ltn12 = require "ltn12" local function mineSearch(ip, port, receiver) --25565 local responseText = "" l...
gpl-2.0
FizzerWL/ExampleMods
SafeStartMod/Server_AdvanceTurn.lua
1
1797
function Server_AdvanceTurn_Order(game, order, result, skipThisOrder, addNewOrder) --[[if (order.proxyType == 'GameOrderAttackTransfer' and order.PlayerID == 4569) then print('NumTurns=' .. game.Game.NumberOfTurns .. ' Mod.Settings.NumTurns=' .. tostring(Mod.Settings.NumTurns) .. ' From=' .. game.Map.Territories[or...
mit
letmefly/skynet
test/testredis2.lua
82
1043
local skynet = require "skynet" local redis = require "redis" local db function add1(key, count) local t = {} for i = 1, count do t[2*i -1] = "key" ..i t[2*i] = "value" .. i end db:hmset(key, table.unpack(t)) end function add2(key, count) local t = {} for i = 1, count do ...
mit
wangchenOS/skynet
test/testredis2.lua
82
1043
local skynet = require "skynet" local redis = require "redis" local db function add1(key, count) local t = {} for i = 1, count do t[2*i -1] = "key" ..i t[2*i] = "value" .. i end db:hmset(key, table.unpack(t)) end function add2(key, count) local t = {} for i = 1, count do ...
mit
shahpri/sina
plugins/cpu.lua
244
1893
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' you...
gpl-2.0
wez2020/bow
plugins/cpu.lua
244
1893
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' you...
gpl-2.0
movb/Algorithm-Implementations
Quick_Sort/Lua/Yonaba/quick_sort_test.lua
27
1363
-- Tests for quick_sort.lua local quicksort = require 'quick_sort' 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...
mit
movb/Algorithm-Implementations
Rabin_Karp/Lua/Yonaba/rabin_karp.lua
26
1376
-- Rabin-Karp string searching algorithm implementation -- See: http://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_string_search_algorithm -- Note: This implementation is based on the Python implementation of Shivam Bansal -- See : https://github.com/kennyledet/Algorithm-Implementations/blob/master/Rabin_Karp/Python/shiv...
mit
hfjgjfg/spam1111
bot/seedbot.lua
2
10254
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
tltneon/NutScript
gamemode/core/hooks/sh_hooks.lua
1
10636
function GM:PlayerNoClip(client) return client:IsAdmin() end HOLDTYPE_TRANSLATOR = {} HOLDTYPE_TRANSLATOR[""] = "normal" HOLDTYPE_TRANSLATOR["physgun"] = "smg" HOLDTYPE_TRANSLATOR["ar2"] = "smg" HOLDTYPE_TRANSLATOR["crossbow"] = "shotgun" HOLDTYPE_TRANSLATOR["rpg"] = "shotgun" HOLDTYPE_TRANSLATOR["slam"] = "normal" H...
mit
kvaps/docker-prosody
modules/mod_storage_ldap.lua
2
6494
-- vim:sts=4 sw=4 -- Metronome IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain -- Copyright (C) 2012 Rob Hoelz -- Copyright (C) 2015 YUNOHOST.ORG -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. ---------------------...
mit
tltneon/NutScript
gamemode/languages/sh_dutch.lua
5
8129
-- DUTCH TRANSLATION - http://steamcommunity.com/profiles/76561198084653538/ NAME = "Nederlands" LANGUAGE = { loading = "Laden", dbError = "Database verbinding gefaald", unknown = "Onbekend", noDesc = "Geen beschrijving beschikbaar", create = "Creëer", createTip = "Maak ...
mit
Seagull42/Starbound_RU
translations/others/items/buildscripts/buildunrandweapon.lua
8
3594
require "/scripts/util.lua" require "/scripts/vec2.lua" require "/scripts/versioningutils.lua" require "/items/buildscripts/abilities.lua" function build(directory, config, parameters, level, seed) local configParameter = function(keyName, defaultValue) if parameters[keyName] ~= nil then return parameters[...
apache-2.0
tltneon/NutScript
plugins/pac.lua
1
7420
-- This Library is just for PAC3 Integration. -- You must install PAC3 to make this library works. PLUGIN.name = "PAC3 Integration" PLUGIN.author = "Black Tea" PLUGIN.desc = "More Upgraded, More well organized PAC3 Integration made by Black Tea" if (!pace) then return end nut.config.add("pacAdminOnly", true, "Whethe...
mit
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/TextField.lua
1
6210
-------------------------------- -- @module TextField -- @extend Widget -------------------------------- -- @function [parent=#TextField] setAttachWithIME -- @param self -- @param #bool bool -------------------------------- -- @function [parent=#TextField] getFontSize -- @param self -- @return int#int ret ...
mit
apletnev/koreader-base
ffi/posix_h.lua
1
3304
local ffi = require("ffi") ffi.cdef[[ typedef long unsigned int size_t; typedef long int off_t; struct timeval { long int tv_sec; long int tv_usec; }; struct statvfs { long unsigned int f_bsize; long unsigned int f_frsize; long unsigned int f_blocks; long unsigned int f_bfree; long unsigned int f_bavail; ...
agpl-3.0
mariadb-corporation/mariadb-columnstore-engine
benchmarks/bench_report.lua
1
1256
function sysbench.report_json(stat) if not gobj then io.write('[\n') -- hack to print the closing bracket when the Lua state of the reporting -- thread is closed gobj = newproxy(true) getmetatable(gobj).__gc = function () io.write('\n]\n') end else io.write(',\n') end lo...
gpl-2.0
ld-test/seawolf
contrib/init.lua
2
7361
local type, print, rawget, unpack = type, print, rawget, unpack local table, pairs = table, pairs local ipairs, tostring = ipairs, tostring local sformat = string.format local sort, tinsert, tconcat = table.sort, table.insert, table.concat local _M = {} -- Recursively print a table. function _M.table_print(t) local...
gpl-3.0
moteus/lua-pdh
lakeconfig.lua
4
4450
local io = require "io" io.stdout:setvbuf"no" io.stderr:setvbuf"no" function vc_version() local VER = lake.compiler_version() MSVC_VER = ({ [15] = '9'; [16] = '10'; })[VER.MAJOR] or '' return MSVC_VER end if not L then local function arkey(t) assert(type(t) == 'table') local keys = {} for k in ...
mit
sundream/gamesrv
script/card/soil/card151001.lua
1
2325
--<<card 导表开始>> local super = require "script.card.init" ccard151001 = class("ccard151001",super,{ sid = 151001, race = 5, name = "塞纳留斯", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/libs/nixio/lua/nixio/util.lua
179
5824
--[[ nixio - Linux I/O library for lua Copyright 2009 Steven Barth <steven@midlink.org> 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 $Id$ ]]-- local...
gpl-2.0
DedlySpyder/Proxy_Wars
scripts/gui.lua
1
3465
--Handler for clicking the start button function onClickedStartButton() startGame() end --Handler for clicking the arena transfer button -- @param player obj function onClickedArenaButton(player) if global.player_at_arena[player.name] then stopSpectatingArena(player) updateArenaButton(player, false) else spec...
mit
sami2448/set
plugins/boobs.lua
9
1609
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/modules/base/luasrc/ltn12.lua
83
11303
--[[ LuaSocket 2.0.2 license Copyright � 2004-2007 Diego Nehab 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, me...
gpl-2.0
facebokiii/facebookplug
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
sami2448/set
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
gsingh93/ipscanner
app/src/main/assets/nmap/share/nmap/nselib/omp2.lua
2
4826
--- -- This library was written to ease interaction with OpenVAS Manager servers -- using OMP (OpenVAS Management Protocol) version 2. -- -- A very small subset of the protocol is implemented. -- * Connection/authentication -- * Targets enumeration -- -- The library can also store accounts in the registry to share them...
mit
tltneon/NutScript
gamemode/core/libs/sh_plugin.lua
1
10053
nut.plugin = nut.plugin or {} nut.plugin.list = nut.plugin.list or {} nut.plugin.unloaded = nut.plugin.unloaded or {} HOOKS_CACHE = {} function nut.plugin.load(uniqueID, path, isSingleFile, variable) if (hook.Run("PluginShouldLoad", uniqueID) == false) then return end variable = variable or "PLUGIN" -- Plugins w...
mit
wangchenOS/skynet
examples/watchdog.lua
3
1083
package.path = "./examples/?.lua;" .. package.path local skynet = require "skynet" local netpack = require "netpack" local proto = require "proto" local CMD = {} local SOCKET = {} local gate local agent = {} function SOCKET.open(fd, addr) skynet.error("New client from : " .. addr) agent[fd] = skynet.newservice("ag...
mit
icrawler/LoveNoise
lovenoise.lua
1
1844
-- ... shameless library info copy from kikito :P local lovenoise = { _VERSION = 'v0.2.0', _DESCRIPTION = 'Noise Library for LOVE', _URL = 'https://github.com/icrawler/lovenoise', _LICENSE = [[ MIT LICENSE Copyright (c) 2014 Phoenix Enero Permission is hereby granted, free of ...
mit
shahpri/sina
plugins/stats.lua
1
4192
do -- Returns a table with `name` and `msgs` local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_prin...
gpl-2.0
siggame/Joueur.lua
games/necrowar/ai.lua
1
5214
-- This is where you build your AI for the Necrowar game. local class = require("joueur.utilities.class") local BaseAI = require("joueur.baseAI") -- <<-- Creer-Merge: requires -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs. -- you can add additional require(s) her...
mit
bjornswenson/RxLua
tests/replaysubject.lua
2
2758
describe('ReplaySubject', function() describe('create', function() it('returns a ReplaySubject', function() expect(Rx.ReplaySubject.create()).to.be.an(Rx.ReplaySubject) end) it('sets an appropriate buffer size if it is specified', function() local subject = Rx.ReplaySubject.create(2) lo...
mit
tomm/pioneer
data/libs/ui/TabView.lua
1
3709
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local normalColor = { r=0.5, g=0.5, b=0.5, a=1.0 } local hoverColor = { r=0.8, g=0.8, b=0.8, a=1.0 } local activeColor = { r=1.0, g=1.0, b=1.0, a=...
gpl-3.0
Sour/pfUI
env/fonts.lua
1
3249
-- this must be set during the initial execution if GetLocale() == "zhCN" then STANDARD_TEXT_FONT = "Fonts\\FZXHLJW.TTF" elseif GetLocale() == "koKR" then STANDARD_TEXT_FONT = "Fonts\\2002.TTF" else STANDARD_TEXT_FONT = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf" end function pfUI.environment:UpdateFonts() ...
mit
Xeptix/framework
Services/GuiService.lua
1
6247
-- An example of a service! local AutosizeCanvases = {} return {"GuiService", "GuiService", { _StartService = function(self, a, b, c, d, e, f, g, h, i, j, k, l) game, Game, workspace, Workspace, table, string, math, typeof, type, Instance, print, require = a, b, c, d, e, f, g, h, i, j, k, l game:GetService("Fram...
gpl-3.0
letmefly/skynet
gameserver/agent_s/agent_s.lua
1
13748
local skynet = require "skynet" local nothing = require "skynet.manager" local netpack = require "netpack" local socket = require "socket" local netutil = require "agent_s.netutil" local httpc = require "http.httpc" local dns = require "dns" local cjson = require "cjson" local WATCHDOG local host local send_request l...
mit
sami2448/set
plugins/anti_flood.lua
281
2422
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, function (data, success, result) if success ~= 1 then local text = 'I can\'t k...
gpl-2.0
Toukibi/ToSAddon
BetterPickQueue/src/betterpickqueue.lua
1
63402
local addonName = "BetterPickQueue"; local verText = "1.18"; local autherName = "TOUKIBI"; local addonNameLower = string.lower(addonName); local SlashCommandList = {"/pickq", "/pickqueue"} -- {"/コマンド1", "/コマンド2", .......}; local CommandParamList = { reset = {jp = "計測リセット", en = "Reset Session."}, resetpos = {jp = "位置...
gpl-3.0
apletnev/koreader-base
ffi/png.lua
1
1155
--[[-- Module for PNG decoding/encoding. Currently, this is a LuaJIT FFI wrapper for lodepng lib. @module ffi.png ]] local ffi = require("ffi") local _ = require("ffi/lodepng_h") local lodepng if ffi.os == "Windows" then lodepng = ffi.load("libs/liblodepng.dll") elseif ffi.os == "OSX" then lodepng = ffi.loa...
agpl-3.0
rastin45/waqer12
plugins/sicktir.lua
4
2145
local function run(msg) if msg.text == "hi" then return "سلام خوش اومدی " end if msg.text == "Hi" then return "سلام خوش اومدی " end if msg.text == "Hello" then return "Hi bb" end if msg.text == "hello" then return "Hi honey" end if msg.text == "Salam" then return "Salam aleykom" end if msg.text == "salam" then re...
gpl-2.0
digitalloggers/nodemcu-firmware
app/cjson/tests/bench.lua
145
3247
#!/usr/bin/env lua -- This benchmark script measures wall clock time and should be -- run on an unloaded system. -- -- Your Mileage May Vary. -- -- Mark Pulford <mark@kyne.com.au> local json_module = os.getenv("JSON_MODULE") or "cjson" require "socket" local json = require(json_module) local util = require "cjson.ut...
mit
jrversteegh/softsailor
deps/swig-2.0.4/Examples/lua/import.lua
2
1248
-- import -- the lua 5.0 loading mechanism is rather poor & relies upon the loadlib() fn -- the lua 5.1 loading mechanism is simplicity itself -- for now we need a bridge which will use the correct verion function import_5_0(module) -- imports the file into the program -- for a module 'example' -- this must load 'e...
gpl-3.0
sundream/gamesrv
script/card/soil/card154005.lua
1
2307
--<<card 导表开始>> local super = require "script.card.init" ccard154005 = class("ccard154005",super,{ sid = 154005, race = 5, name = "愤怒", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_adde...
gpl-2.0
finnbar/twar
tweetConverter.lua
1
3193
-- [[ converts Tweets into executable Lua code :) ]] -- local assigns = nil local k = 1 local temp = nil local go = 0 local rA = nil local rB = nil local var = nil local val = nil local pass = nil local fail = nil --all variables below = temp user = { } user.name = "t_a" t_a = { } io.write("Please type tweet... ") ...
gpl-2.0
kobakei/CCLocalNotification
cocos2d/external/lua/luajit/src/dynasm/dasm_x86.lua
73
58651
------------------------------------------------------------------------------ -- DynASM x86/x64 module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ local x64 = x64 -- Module i...
apache-2.0
tltneon/NutScript
plugins/chatbox/sh_plugin.lua
1
1547
PLUGIN.name = "Chatbox" PLUGIN.author = "Chessnut" PLUGIN.desc = "Adds a chatbox that replaces the default one." if (CLIENT) then NUT_CVAR_CHATFILTER = CreateClientConVar("nut_chatfilter", "", true, false) function PLUGIN:createChat() if (IsValid(self.panel)) then return end self.panel = vgui.Create("nutC...
mit
purplerails/google-diff-match-patch
lua/diff_match_patch.lua
265
73869
--[[ * Diff Match and Patch * * Copyright 2006 Google Inc. * http://code.google.com/p/google-diff-match-patch/ * * Based on the JavaScript implementation by Neil Fraser. * Ported to Lua by Duncan Cross. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance ...
apache-2.0
siggame/Joueur.lua
games/spiders/ai.lua
2
2974
-- This is where you build your AI for the Spiders game. local class = require("joueur.utilities.class") local BaseAI = require("joueur.baseAI") -- <<-- Creer-Merge: requires -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs. -- you can add additional require(s) here...
mit
Alireza5928/new1
plugins/groupmanager-fa.lua
16
110863
local function modadd(msg) local hash = "gp_lang:"..msg.chat_id_ local lang = redis:get(hash) if not is_admin(msg) then if not lang then return '_You are not bot admin_' else return 'شما مدیر ربات نمیباشید' end end local data = load_data(_config.moderation.data) if data[tostring(msg.chat_i...
gpl-3.0
jacklicn/mysql-proxy
lib/proxy/commands.lua
4
3567
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2012, 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
kobakei/CCLocalNotification
cocos2d/external/lua/luajit/src/src/jit/bc.lua
78
5606
---------------------------------------------------------------------------- -- LuaJIT bytecode listing module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -...
apache-2.0
dmccuskey/dmc-websockets
examples/dmc-websockets-pusher/dmc_corona/lib/dmc_lua/lua_e4x.lua
47
18011
--====================================================================-- -- lua_e4x.lua -- -- Documentation: http://docs.davidmccuskey.com/display/docs/lua_e4x.lua --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2014 David McCuskey. All Rights Reserve...
mit
dmccuskey/dmc-websockets
examples/dmc-websockets-autobahntestsuite/dmc_corona/lib/dmc_lua/lua_e4x.lua
47
18011
--====================================================================-- -- lua_e4x.lua -- -- Documentation: http://docs.davidmccuskey.com/display/docs/lua_e4x.lua --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2014 David McCuskey. All Rights Reserve...
mit
facebokiii/facebookplug
plugins/stats.lua
458
4098
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 5 local TIME_CHECK = 4 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name....
gpl-2.0
jacklicn/mysql-proxy
tests/suite/base/t/xtab1-mock.lua
4
1117
--[[ $%BEGINLICENSE%$ Copyright (c) 2008, 2012, 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
ealegol/kolla-newton
docker/heka/plugins/decoders/os_ceilometer_apache_log.lua
1
2265
-- Copyright 2015 Mirantis, Inc. -- -- 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 agreed to ...
apache-2.0
letmefly/skynet
test/testpipeline.lua
27
1255
local skynet = require "skynet" local redis = require "redis" local conf = { host = "127.0.0.1", port = 6379, db = 0 } local function read_table(t) local result = { } for i = 1, #t, 2 do result[t[i]] = t[i + 1] end return result end skynet.start(function() local db = redis.connect(conf) db.pipelini...
mit
weera00/nodemcu-firmware
app/cjson/lua/cjson/util.lua
170
6837
local json = require "cjson" -- Various common routines used by the Lua CJSON package -- -- Mark Pulford <mark@kyne.com.au> -- Determine with a Lua table can be treated as an array. -- Explicitly returns "not an array" for very sparse arrays. -- Returns: -- -1 Not an array -- 0 Empty table -- >0 Highest index ...
mit
digitalloggers/nodemcu-firmware
lua_examples/irsend.lua
88
1803
------------------------------------------------------------------------------ -- IR send module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- -- Example: -- dofile("irsend.lua").nec(4, 0x00ff00ff) -----------------------------------------------------------------------...
mit