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
Godfather021/yag
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
jorden66/haedori
plugin/ar-banhammer.lua
1
13807
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY HaedRI ▀▄ ▄▀ ▀▄ ▄▀ BY HaedRI (@HaedoRI) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY HaedRI ▀▄ ▄▀ ▀▄ ▄▀ ban hammer : الطرد والحظر ▀▄ ▄▀ ▀▄▀...
gpl-3.0
cvondrick/soundnet
main_finetune.lua
1
5371
require 'torch' require 'nn' require 'optim' require 'dpnn' require 'cunn' require 'cudnn' -- to specify these at runtime, you can do, e.g.: -- $ lr=0.001 th main.lua opt = { dataset = 'audio_labeled', -- indicates what dataset load to use (in data.lua) nThreads = 16, -- how many threads to pre-fetch d...
mit
aruanruan/Atlas
lib/histogram.lua
40
5165
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
hnyman/luci
applications/luci-app-radicale2/luasrc/model/cbi/radicale2/logging.lua
10
1503
-- Licensed to the public under the Apache License 2.0. local m = Map("radicale2", translate("Radicale 2.x"), translate("A lightweight CalDAV/CardDAV server")) local s = m:section(NamedSection, "logging", "section", translate("Logging")) s.addremove = true s.anonymous = false local logging_file = nil logging...
apache-2.0
enulex/skynet
lualib/snax/hotfix.lua
39
2268
local si = require "snax.interface" local io = io local hotfix = {} local function envid(f) local i = 1 while true do local name, value = debug.getupvalue(f, i) if name == nil then return end if name == "_ENV" then return debug.upvalueid(f, i) end i = i + 1 end end local function collect_uv(f , ...
mit
makedin/mpv-web-ui
webui-page.lua
1
2360
page = [[<!doctype html> <html> <head> <meta charset="utf-8"/> <meta name="viewport" content="user-scalable=no"> <title>mpv webui</title> </head> <h1 id="filename">Filename</h1> <h2 id="length">file length</h1> <h2 id="volume">volume</h1> <body> <div onClick="send('pause')" id="play" class="...
mit
soundsrc/premake-core
modules/vstudio/tests/vc200x/test_linker_block.lua
15
4849
-- -- tests/actions/vstudio/vc200x/test_linker_block.lua -- Validate generation of VCLinkerTool blocks in Visual Studio 200x C/C++ projects. -- Copyright (c) 2009-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vs200x_linker_block") local vc200x = p.vstudio.vc200x -- --...
bsd-3-clause
soundsrc/premake-core
modules/gmake/tests/cpp/test_wiidev.lua
15
1183
-- -- tests/actions/make/cpp/test_wiidev.lua -- Tests for Wii homebrew support in makefiles. -- Copyright (c) 2011-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("make_wiidev") local make = p.make local project = p.project -- -- Setup -- local cfg function suite.se...
bsd-3-clause
soundsrc/premake-core
tests/base/test_filename.lua
32
1690
-- -- tests/base/test_filename.lua -- Verify generation of project/workspace/rule filenames. -- Copyright (c) 2008-2014 Jason Perkins and the Premake project -- local suite = test.declare("project_filename") local p = premake -- -- Setup -- local wks function suite.setup() wks = test.createWorkspace() end...
bsd-3-clause
uil-xela/ffbe-farm
ffbe_common.lua
1
4690
Settings:setCompareDimension(true, 800) Settings:setScriptDimension(true, 800) similarValue = 0.9 waitingTime = 3 -- second reg1 = Region(146, 375, 34, 20) reg2 = Region(541, 375, 34, 20) reg3 = Region(146, 600, 34, 20) reg4 = Region(541, 600, 34, 20) reg5 = Region(146, 824, 34, 20) reg6 = Region(541, 824, 3...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/chat/chat-manager.lua
1
1836
--- Manages chat commands. -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module core.chat.chat_ma...
gpl-3.0
raedwulf/perceptio
src/perceptio/textbox.lua
1
2042
------------------------------------------------------------------------------ -- Perceptio textbox module for providing access to textbox control. -- @release Perceptio (C) 2011-2012 University of York -- Please see LICENSE for details of the BSD license. ---------------------------------------------------------------...
bsd-3-clause
LaFamiglia/Illarion-Content
base/hair.lua
1
4062
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
299299/Urho3D
bin/Data/LuaScripts/40_Localization.lua
5
6283
-- Localization example. -- This sample demonstrates: -- - Loading a collection of strings from JSON-files -- - Creating text elements that automatically translates itself by changing the language -- - The manually reaction to change language require "LuaScripts/Utilities/Sample" function Start() -- E...
mit
dismantl/luci-0.12
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...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/specs/faction.lua
1
1364
--- Faction specification. -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module core.specs.factio...
gpl-3.0
yanarsin/cnnbot
plugins/Info.lua
1
1882
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(user)..' ['....
gpl-2.0
Shayan123456/botttttt5
bot/utils.lua
646
23489
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0
yanarsin/cnnbot
plugins/music.lua
1
2485
do -- Base search URL local BASE_URL = 'http://pleer.com/mobile/search?q=' -- Base download URL local BASE_DL_URL = 'http://pleer.com/mobile/files_mobile/' local htmlparser = require 'htmlparser' -- Provide download link local function getDownloadLink(id) return BASE_DL_URL .. id .. '.mp3' end ...
gpl-2.0
chelog/brawl
gamemodes/brawl/gamemode/modules/base/server/points.lua
1
6174
function brawl.points.add( type, t ) if not t or not t.pos then return end if not brawl.points.data[ type ] then brawl.points.data[ type ] = {} end table.insert( brawl.points.data[ type ], t ) brawl.points.update() end function brawl.points.remove( type, id ) if not brawl.points.data[ type ] then return end ...
gpl-3.0
Noltari/luci
modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi_overview.lua
2
3341
-- Copyright 2018 Jo-Philipp Wich <jo@mein.io> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local utl = require "luci.util" local tpl = require "luci.template" local ntm = require "luci.model.network" local has_iwinfo = pcall(require, "iwinfo") function guess_wifi_hw(dev) lo...
apache-2.0
shmul/mule
anon.lua
2
6115
require "helpers" local words = { "coconut","lolipop","refreshing","growl","theif","swiftly","tuna","freak","oyster", "manatee","pop","candy","tomorow","biscuit","stumble","dislocate","swiss", "classic", "maraca","penninsala", "nucleus","ping","twinkle","tinkle","foe","kung","coffee", "vigeriously","hyper", "o...
apache-2.0
LaFamiglia/Illarion-Content
item/general/jewel.lua
1
1397
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
mpeterv/pflua
src/pf/anf.lua
1
7580
module(...,package.seeall) local utils = require('pf.utils') local set, pp, dup = utils.set, utils.pp, utils.dup local relops = set('<', '<=', '=', '!=', '>=', '>') local binops = set( '+', '-', '*', '*64', '/', '&', '|', '^', '<<', '>>' ) local unops = set('ntohs', 'ntohl', 'uint32', 'int32') local simple = se...
apache-2.0
adminomega/exterme-orginal
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
Ali-2h/wwefucker
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
LaFamiglia/Illarion-Content
quest/hummi_olaficht_607.lua
1
4372
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
SirSepehr/Sepehr
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
RedSnake64/openwrt-luci-packages
applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
46
3168
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. m = Map("luci_statistics", translate("RRDTool Plugin Configuration"), translate( "The rrdtool plugin stores the collected data in rrd database " .. "files, the foundation of the diagrams...
apache-2.0
Nexela/autofill
stdlib/area/tile.lua
1
3870
--- Tools for working with tiles. -- A tile represents a 1 unit<sup>2</sup> on a surface in Factorio. -- @module Tile -- @usage local Tile = require('stdlib/area/tile') -- @see LuaTile local Tile = {_module = 'Tile'} setmetatable(Tile, require('stdlib/core')) local Is = require('stdlib/utils/is') local Game = require...
mit
LaFamiglia/Illarion-Content
content/gatheringcraft/threadproducing.lua
1
4240
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
yanarsin/cnnbot
plugins/inpm.lua
33
2992
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
nood32/MEEDOBOT
plugins/admin.lua
1
10431
--[[ ✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133 ✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133 ✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen ✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy ✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com ✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen ]]-- local function set...
gpl-2.0
qq779089973/ramod
luci/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
5
34186
--[[ LuCI - Lua Configuration Interface Copyright 2008 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$ ]]-- loc...
mit
dismantl/luci-0.12
modules/admin-full/luasrc/model/cbi/admin_system/startup.lua
67
2805
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org> Copyright 2010 Manuel Munz <freifunk at somakoma dot de> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with t...
apache-2.0
qq779089973/ramod
luci/modules/admin-full/luasrc/model/cbi/admin_system/startup.lua
67
2805
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org> Copyright 2010 Manuel Munz <freifunk at somakoma dot de> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with t...
mit
yanjunh/luasocket-gyp
samples/cddb.lua
56
1415
local socket = require("socket") local http = require("socket.http") if not arg or not arg[1] or not arg[2] then print("luasocket cddb.lua <category> <disc-id> [<server>]") os.exit(1) end local server = arg[3] or "http://freedb.freedb.org/~cddb/cddb.cgi" function parse(body) local lines = string.gfind(bo...
mit
LionKingTeam/Lion.king.bot
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
dismantl/luci-0.12
applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-cdr.lua
80
1878
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.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 h...
apache-2.0
snabbnfv-goodies/snabbswitch
lib/ljsyscall/test/netbsd.lua
18
9661
-- BSD specific tests local function init(S) local helpers = require "syscall.helpers" local types = S.types local c = S.c local abi = S.abi local features = S.features local util = S.util local bit = require "syscall.bit" local ffi = require "ffi" local t, pt, s = types.t, types.pt, types.s local assert = helpers...
apache-2.0
shmul/mule
fdi/secondlyAlg.lua
1
4402
--------------------------------------- -- Secondly algo, Matlab version 04 --- --------------------------------------- require 'helpers' require 'fdi/statisticsBasic' --require 'statisticsBasic' -- costants local INTERVAL = 5 local REF_TIME = 1357344000 -- parameters local DRIFT = 2 local THRESHOLD = 10 local FORGET...
apache-2.0
snabbnfv-goodies/snabbswitch
src/core/main.lua
7
4653
module(...,package.seeall) -- Default to not using any Lua code on the filesystem. -- (Can be overridden with -P argument: see below.) package.path = '' local STP = require("lib.lua.StackTracePlus") local ffi = require("ffi") local zone = require("jit.zone") local lib = require("core.lib") local C = ffi.C -- Load l...
apache-2.0
dameiss/wireshark-aeron
test/lua/gregex.lua
29
8743
-- Tests for GLib Regex functions -- written by Hadriel Kaplan, based on Lrexlib's test suite -- This is a test script for tshark/wireshark. -- This script runs inside tshark/wireshark, so to run it do: -- tshark -r empty.cap -X lua_script:<path_to_testdir>/lua/gregex.lua -X lua_script1:glib -- -- if you have to give ...
gpl-2.0
chelog/brawl
addons/brawl-weapons/lua/weapons/khr_m92fs/shared.lua
1
6104
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") SWEP.magType = "pistolMag" if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "M92FS" SWEP.CSMuzzleFlashes = true SWEP.SightWithRail = true SWEP.IconLetter = "y" killicon.Add( "khr_m92fs", "icons/killicons/khr_m92fs", ...
gpl-3.0
bsmr-games/lipsofsuna
data/lipsofsuna/ui/theme.lua
1
6451
--- TODO:doc -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module ui.theme -- @alias Theme local...
gpl-3.0
adam000/xsera
Resources/Scripts/Tests/TextTest.lua
1
1427
-- Text tests. Will be changed from time to time, perhaps eventually removed if -- there is no longer any need for them import('TextManip') import('PrintRecursive') function test1() message = { "RUNNING TEST 1." } printTable(message) local i = 2 local result result = textWrap("This is some sa...
mit
RedSnake64/openwrt-luci-packages
modules/luci-base/luasrc/sys/iptparser.lua
47
9515
--[[ Iptables parser and query library (c) 2008-2009 Jo-Philipp Wich <jow@openwrt.org> (c) 2008-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:...
apache-2.0
gwx/tome-grayswandir-weird-wyrmic
data/libs/scale-0.lua
4
4391
-- 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 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful...
gpl-3.0
plog04/Wireshark-Chain-dissector
myDissector/Modele_ChainDissector_revA.lua
1
1745
do -- Initialisation d'un nouveau protocole local tcp_wrapper_simple_proto = Proto("simple_tcp_extra", "Simple Extra analysis of the tcp protocol"); -- Declaration des champs qui seront consultés afin d'obtenir leur valeur (à partir de protocole existant) f_get_TCP_port = Field.new("tcp.dstport") ...
mit
nood32/MEEDOBOT
plugins/adduser.lua
1
2651
--[[ ✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133 ✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133 ✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen ✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy ✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com ✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen ]]-- do local function ...
gpl-2.0
jsenellart-systran/OpenNMT
test/onmt/PreprocessorTest.lua
4
4198
require('onmt.init') local tester = ... local preprocessorTest = torch.TestSuite() local hookManager_save local dataDir = 'data' local noFilter = function(_) return true end local function buildPreprocessor(mode) local cmd = onmt.utils.ExtendedCmdLine.new() onmt.data.Preprocessor.declareOpts(cmd, mode == 'pars...
mit
jjmleiro/hue
tools/wrk-scripts/lib/hue.lua
22
1575
local argparse = require("lib/argparse") local cookie = require("lib/cookie") local uri = require("lib/uri-f570bf7") local inspect = require("lib/inspect") local hue = {} hue.parse_args = function(args) local parser = argparse() parser:option "-X" "--method" :description "HTTP method" parser:option "-s" "--sessi...
apache-2.0
Inorizushi/DDR-X3
Scripts/2ndMIX.lua
1
10309
CDImage = { ["Boys"]= "01", ["Butterfly"]= "02", ["I Believe In Miracles (The Lisa Marie Experience Radio Edit)"]= "03", ["Little Bitch"]= "04", ["MAKE IT BETTER"]= "05", ["PARANOiA"]= "06", ["PARANOiA MAX~DIRTY MIX~"]= "07", ["PARANOiA MAX~DIRTY MIX~ (in roulette)"]= "07", ["PUT YOUR FAITH IN ME"]= "08", ["A...
mit
6wilink/snippets
lua/lib/six/json.lua
1
1480
-- json encode/decode -- by Qige -- 2017.01.06 -- 2017.03.13: add local, change "require 'six.json'" to "local json = require 'six.json'" local json = {} function json.encode(_data) local _response = {} _response = json.table2string(_data) if (_response == nil or _response == '') then _response = {} end ...
mit
LaFamiglia/Illarion-Content
content/gatheringcraft/bricksproducing.lua
1
7712
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
adminomega/exterme-orginal
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempt...
gpl-2.0
Shayan123456/botttttt5
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempt...
gpl-2.0
LaFamiglia/Illarion-Content
handler/createbridge.lua
5
5818
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
kimiyoung/review_net
image_caption_online/opts.lua
1
8362
local M = {} function M.parse(arg) local cmd = torch.CmdLine() cmd:text() cmd:text('Torch-7 Image Captioning') cmd:text() cmd:text('Options:') ------------ Model options ---------------------- cmd:option('-emb_size', 100, 'Word embedding size') -- 100 cmd:option('-lstm_size', 2048,...
mit
reedcwilson/dotfiles
hammerspoon/hammerspoon.symlink/Spoons/SpoonInstall.spoon/init.lua
8
17398
--- === SpoonInstall === --- --- Install and manage Spoons and Spoon repositories --- --- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpoonInstall.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpoonInstall.spoon.zip) local obj={} obj.__index = obj -- Metadata obj.name = "Sp...
mit
chelog/brawl
gamemodes/brawl/gamemode/modules/base/server/experience.lua
1
5176
brawl.exp = brawl.exp or {} local meta = FindMetaTable "Player" function meta:SetXP( val ) self:SetNWInt( "XP", tonumber(val) ) self:CheckLevel() end function meta:AddXP( val, t ) self:SetNWInt( "XP", self:GetXP() + val ) if val > 0 then net.Start( "brawl.exp.add" ) net.WriteUInt( val, 16 ) net.Write...
gpl-3.0
enulex/skynet
lualib/snax/loginserver.lua
42
5057
local skynet = require "skynet" require "skynet.manager" local socket = require "socket" local crypt = require "crypt" local table = table local string = string local assert = assert --[[ Protocol: line (\n) based text protocol 1. Server->Client : base64(8bytes random challenge) 2. Client->Server : base64(8bytes...
mit
ninjalulz/forgottenserver
data/scripts/weapons/#example.lua
8
1536
--[[ Burst Arrow example ]] local area = createCombatArea({ {1, 1, 1}, {1, 3, 1}, {1, 1, 1} }) local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true) combat:setFormul...
gpl-2.0
Noltari/luci
libs/luci-lib-nixio/docsrc/nixio.bit.lua
171
2044
--- Bitfield operators and mainpulation functions. -- Can be used as a drop-in replacement for bitlib. module "nixio.bit" --- Bitwise OR several numbers. -- @class function -- @name bor -- @param oper1 First Operand -- @param oper2 Second Operand -- @param ... More Operands -- @return number --- Invert given number. ...
apache-2.0
soundsrc/premake-core
src/base/rule.lua
5
3645
--- -- base/rule.lua -- Defines rule sets for generated custom rule files. -- Copyright (c) 2014 Jason Perkins and the Premake project --- local p = premake p.rule = p.api.container("rule", p.global) local rule = p.rule --- -- Create a new rule container instance. --- function rule.new(name) local self = p....
bsd-3-clause
LaFamiglia/Illarion-Content
quest/judith_tanner_715_runewick.lua
1
7393
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
rjeli/node9
LuaJIT-2.0.3/src/jit/vmdef.lua
56
6676
-- This is a generated file. DO NOT EDIT! module(...) bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI K...
mit
SantyagoSeaman/lua-sparse-matrix
matrix.lua
1
16175
-- PUMICE Copyright (C) 2009 Lars Rosengreen (-*-coding:iso-safe-unix-*-) -- released as free software under the terms of MIT open source license -- A sparse matrix data structure. Elements in the matrix that are -- zero take up no memory. -- to create a matrix do something like: -- A = matrix{{1, 2, 3}, {4, 5, 6}, ...
mit
LaFamiglia/Illarion-Content
monster/race_55_imp/id_553_cursed.lua
1
1251
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
LaFamiglia/Illarion-Content
triggerfield/donation_galmair.lua
1
1765
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
qq779089973/ramod
luci/protocols/openconnect-ra/luasrc/model/cbi/admin_network/proto_openconnect.lua
4
3654
--[[ LuCI - Lua Configuration Interface Copyright 2011 RA <ravageralpha@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- local map, sect...
mit
RedSnake64/openwrt-luci-packages
modules/luci-base/luasrc/controller/admin/servicectl.lua
38
1167
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.servicectl", package.seeall) function index() entry({"servicectl"}, alias("servicectl", "status")).sysauth = "root" entry({"servicectl", "status"}, call("action_status")).leaf = ...
apache-2.0
shahabsaf1/copy-infernal
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
Ali-2h/wwefucker
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/landscape/generator/place-castle.lua
1
5012
--- Castle generator. -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module landscape.generator.pl...
gpl-3.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/messaging/messages/object-animated.lua
1
1059
-- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. Main.messaging:register_message{ name = "object animated", ...
gpl-3.0
nort-ir/nort
plugins/stats.lua
1
3995
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
LaFamiglia/Illarion-Content
item/id_66_markerstone.lua
1
2851
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
kimiyoung/review_net
image_caption_offline/eval/neuraltalk2/misc/utils.lua
2
1673
local cjson = require 'cjson' local utils = {} -- Assume required if default_value is nil function utils.getopt(opt, key, default_value) if default_value == nil and (opt == nil or opt[key] == nil) then error('error: required key ' .. key .. ' was not provided in an opt.') end if opt == nil then return defaul...
mit
dismantl/luci-0.12
applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
78
1934
--[[ Luci configuration model for statistics - collectd email plugin configuration (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.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...
apache-2.0
qq779089973/ramod
luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
78
1934
--[[ Luci configuration model for statistics - collectd email plugin configuration (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.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...
mit
Admicos/CCPY
res/ccpy.lua
1
3620
_HOST = "Computercraft 1.79 (ccpy.info for more)" ccpy.info = [[ * computercraft.py ]] .. ccpy.vers.ccpy .. [[ * Python ]] .. ccpy.vers.python .. [[ * Pygame ]] .. ccpy.vers.pygame .. [[ * Lupa ]] .. ccpy.vers.lupa .. [[ (running as ]] .. _VERSION .. [[) ]] -- PRIVATE API -- _ccpy.timers = {} _ccpy.event_queue = {}...
mit
raedwulf/perceptio
src/perceptio/slider.lua
1
2253
------------------------------------------------------------------------------ -- Perceptio slider module for providing access to slider control. -- @release Perceptio (C) 2011-2012 University of York -- Please see LICENSE for details of the BSD license. -----------------------------------------------------------------...
bsd-3-clause
MustaphaTR/OpenRA
mods/ra/maps/allies-06b/allies06b.lua
7
7952
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you 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 vers...
gpl-3.0
LaFamiglia/Illarion-Content
content/craft/gemcutting.lua
1
4444
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
yanjunh/luasocket-gyp
samples/lpr.lua
59
1574
local lp = require("socket.lp") local function usage() print('\nUsage: lua lpr.lua [filename] [keyword=val...]\n') print('Valid keywords are :') print( ' host=remote host or IP address (default "localhost")\n' .. ' queue=remote queue or printer name (default "printer")\n' .. ' port=remote port ...
mit
RobertZenz/minetest-australopithecus-artisanry
mods/artisanry/artisanry.lua
2
3785
--[[ 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
Noltari/luci
applications/luci-app-mjpg-streamer/luasrc/model/cbi/mjpg-streamer.lua
4
7799
-- Copyright 2014 Roger D <rogerdammit@gmail.com> -- Licensed to the public under the Apache License 2.0. m = Map("mjpg-streamer", "MJPG-streamer", translate("mjpg streamer is a streaming application for Linux-UVC compatible webcams")) --- General settings --- section_gen = m:section(TypedSection, "mjpg-streamer", t...
apache-2.0
jsenellart-systran/OpenNMT
onmt/data/Preprocessor.lua
4
42265
--[[ Data Preparation functions. ]] local function vecToTensor(vec) local t = torch.Tensor(#vec) for i = 1, #vec do t[i] = vec[i] end return t end local Preprocessor = torch.class('Preprocessor') local paths = require 'paths' local tokenizer = require('tools.utils.tokenizer') local tds local threads loc...
mit
blackhacker666/zep
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
LaFamiglia/Illarion-Content
scheduled/factionLeader.lua
1
1816
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
qq779089973/ramod
luci/libs/web/luasrc/http/protocol.lua
55
18445
--[[ HTTP protocol implementation for LuCI (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.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/licen...
mit
Noltari/luci
applications/luci-app-mwan3/luasrc/model/cbi/mwan/memberconfig.lua
7
1057
-- Copyright 2014 Aedan Renner <chipdankly@gmail.com> -- Copyright 2018 Florian Eckert <fe@dev.tdt.de> -- Licensed to the public under the GNU General Public License v2. local dsp = require "luci.dispatcher" local m, mwan_member, interface, metric, weight arg[1] = arg[1] or "" m = Map("mwan3", translatef("MWAN Memb...
apache-2.0
shahabsaf1/copy-infernal
plugins/media.lua
376
1679
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/combat/utils.lua
1
11639
--- Combat utils. -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module arena.combat_utils -- @ali...
gpl-3.0
qq779089973/ramod
luci/libs/nixio/docsrc/nixio.File.lua
173
4457
--- Large File Object. -- Large file operations are supported up to 52 bits if the Lua number type is -- double (default). -- @cstyle instance module "nixio.File" --- Write to the file descriptor. -- @class function -- @name File.write -- @usage <strong>Warning:</strong> It is not guaranteed that all data -- in the bu...
mit
qq779089973/ramod
luci/modules/niu/luasrc/model/cbi/niu/wireless/bridge.lua
51
2481
local uci = require "luci.model.uci" local cursor = uci.cursor() if not cursor:get("wireless", "bridge") then cursor:section("wireless", "wifi-iface", "bridge", {device = "_", doth = "1", _niu = "1", mode = "sta", wds = "1"}) cursor:save("wireless") end local function deviceroute(self) cursor:unload("wireless") ...
mit
github1380/active-bot
plugins/ingroup.lua
371
44212
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
nort-ir/nort
plugins/ingroup.lua
371
44212
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0