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
Ali021s/Ali021
bot/utils.lua
26
31633
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = (loadfile "./libs/serpent.lua")() feedparser = (loadfile "./libs/feedparser.lua")() json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.l...
agpl-3.0
ehsankohansal051/protective
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
agpl-3.0
ArashFaceBook/InfernalTG
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
ioiasff/sosia
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
sini370/xysini370
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
xponen/Zero-K
LuaUI/Configs/zk_keys.lua
1
5600
return { -- yyyymmdd -- if newer than user's, overwrite ALL zir zk_keys -- else just add any that are missing from local config ["date"] = 20130630, -- all default ZK keybinds. ["keybinds"] = { { "togglecammode", "Ctrl+backspace",}, { "togglecammode", "Shift+backspace",}, { "edit_backspace", "Any+backsp...
gpl-2.0
xponen/Zero-K
scripts/bomberassault.lua
1
3472
local bomb = piece('bomb'); local exhaustLeft = piece('exhaustLeft'); local exhaustRight = piece('exhaustRight'); local exhaustTop = piece('exhaustTop'); local hull = piece('hull'); local petalLeft = piece('petalLeft'); local petalRear = piece('petalRear'); local petalRight = piece('petalRight'); local turbineLeft = pi...
gpl-2.0
alexandergall/snabbswitch
lib/ljsyscall/syscall/freebsd/c.lua
24
1298
-- This sets up the table of C functions local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = require ...
apache-2.0
medoo3131/NEW-BOTT
plugins/supergroup.lua
2
103853
--[[ # #ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ #:(( # For More Information ....! # Developer : Aziz < @TH3_GHOST > # our channel: @DevPointTeam # Version: 1.1 #:)) #ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ # ]] --...
gpl-2.0
Canaan-Creative/luci
libs/ipkg/luasrc/model/ipkg.lua
82
5778
--[[ LuCI - Lua Configuration Interface (c) 2008-2011 Jo-Philipp Wich <xm@subsignal.org> (c) 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.apach...
apache-2.0
xponen/Zero-K
scripts/amphtele.lua
1
9393
--linear constant 65536 include "constants.lua" include "utility.lua" include 'letsNotFailAtTrig.lua' local base, pelvis, body = piece('base', 'pelvis', 'body') local rthigh, rshin, rfoot, lthigh, lshin, lfoot = piece('rthigh', 'rshin', 'rfoot', 'lthigh', 'lshin', 'lfoot') local holder, sphere = piece('holder', 'sphe...
gpl-2.0
kiarash14/tg5
plugins/lock_tag.lua
13
2903
local function run(msg, matches) if msg.to.type == 'chat' then if is_momod(msg) then return end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)] then if data[tostring(msg.to.id)]['settings'] then if data[tostring(msg.to.id)]['settings']['lock_tag']...
gpl-2.0
DaanHaaz/love-base
scripts/libs/lovebird.lua
1
19986
-- -- lovebird -- -- Copyright (c) 2015 rxi -- -- This library is free software; you can redistribute it and/or modify it -- under the terms of the MIT license. See LICENSE for details. -- local socket = require "socket" local lovebird = { _version = "0.4.0" } lovebird.loadstring = loadstring or load l...
mit
nwf/nodemcu-firmware
lua_examples/luaOTA/_doTick.lua
7
3018
--if (self.timer) then self.timer:stop() end--SAFETRIM -- function _doTick(self) -- Upvals local self = ... local wifi,net = wifi,net local sta = wifi.sta local config,log,startApp = self.config,self.log,self.startApp local tick_count = 0 local function...
mit
Canaan-Creative/luci
applications/luci-openvpn/luasrc/model/cbi/openvpn.lua
65
3316
--[[ 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...
apache-2.0
Vermeille/kong
spec/03-plugins/07-ip-restriction/02-access_spec.lua
3
5070
local helpers = require "spec.helpers" local cache = require "kong.tools.database_cache" local cjson = require "cjson" describe("Plugin: ip-restriction (access)", function() local plugin_config local client, admin_client setup(function() assert(helpers.start_kong()) client = helpers.proxy_client() ad...
apache-2.0
snail23/snailui
elements/class_bars/general.lua
1
3489
-- -- Copyright (C) 2012-2016 Snail <https://github.com/snail23/snailui/> -- -- 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 ...
gpl-2.0
D3vMa3sTrO/superbot
tg/test.lua
210
2571
started = 0 our_id = 0 function vardump(value, depth, key) local linePrefix = "" local spaces = "" if key ~= nil then linePrefix = "["..key.."] = " end if depth == nil then depth = 0 else depth = depth + 1 for i=1, depth do spaces = spaces .. " " end end if type(value) == 'tab...
gpl-2.0
RedOS/rOS
Apps/Files/Startup.lua
1
3754
tArgs={...} tHistory={} nHistory=0 tFiles={} sPath=tArgs[1] or "Apps/" nScroll=0 oldScroll=0 sFile=nil x=0 y=0 tMenu={" Rename "," Delete "," Open "," Edit "} function drawBrowser(sPath,bMode,selected) if fs.exists(sPath) and fs.isDir(sPath) then tFiles=fs.list(sPath) if #tFiles==0 then tFiles[1]="Folder is...
apache-2.0
Schaka/gladdy
Speclist.lua
1
5856
local GetSpellInfo = GetSpellInfo local Gladdy = LibStub("Gladdy") local L = Gladdy.L function Gladdy:GetSpecBuffs() return { -- DRUID [GetSpellInfo(33881)] = L["Restoration"], -- Natural Perfection [GetSpellInfo(16880)] = L["Restoration"], -- Nature's Grace; Dreamstate spec in TBC equ...
mit
jllacuna/docker-vim
nvim/config/nvim/lua/user/plugins.lua
1
6690
local fn = vim.fn -- Automatically install packer local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then PACKER_BOOTSTRAP = fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_pat...
gpl-2.0
sullome/km-freeminer-mods
mods/default/crafting.lua
2
8126
-- mods/default/crafting.lua minetest.register_craft({ output = 'default:wood 4', recipe = { {'default:tree'}, } }) minetest.register_craft({ output = 'default:junglewood 4', recipe = { {'default:jungletree'}, } }) minetest.register_craft({ output = 'default:pine_wood 16',...
gpl-3.0
andreasbaumann/crawler
tolua/src/bin/lua/doit.lua
14
1152
-- Generate binding code -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- Last update: Apr 2003 -- $Id: doit.lua,v 1.3 2009/11/24 16:45:13 fabraham 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 ...
gpl-3.0
persiaAziz/trafficserver
plugins/experimental/ts_lua/example/test_sleep.lua
17
1445
-- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); y...
apache-2.0
Vermeille/kong
spec/03-plugins/98-rate-limiting/02-daos_spec.lua
3
2974
local uuid = require("kong.tools.utils").uuid local helpers = require "spec.helpers" local timestamp = require "kong.tools.timestamp" local ratelimiting_metrics = helpers.dao.ratelimiting_metrics describe("Plugin: rate-limiting (DAO)", function() local api_id = uuid() local identifier = uuid() setup(function()...
apache-2.0
Vermeille/kong
spec/02-integration/02-dao/06-plugins_daos_spec.lua
3
1556
local helpers = require "spec.02-integration.02-dao.helpers" local Factory = require "kong.dao.factory" helpers.for_each_dao(function(kong_config) describe("Plugins DAOs with DB: #"..kong_config.database, function() it("load plugins DAOs", function() local factory = Factory(kong_config) assert.truthy...
apache-2.0
Paradokz/BadRotations
System/UI/Elements/PageDropdown.lua
4
1400
local DiesalGUI = LibStub("DiesalGUI-1.0") -- Dropdown for pages -- todo: save last active page and restore function br.ui:createPagesDropdown(window, menuPages) window.pages = menuPages window.pageDD = DiesalGUI:Create('DropdownBR') local newDropdown = window.pageDD newDropdown:SetParent(window.parent...
gpl-3.0
DavidIngraham/ardupilot
libraries/AP_Scripting/applets/MissionSelector.lua
19
2662
-- Loads one of three mission files to autopilot on each arm, depending on position of the Mission Reset AUX FUNC switch -- Must have Mission Reset switch assigned, it will function normally when armed or disarmed -- but also on the disarm to arm transition, it will load (if file exists) a file in the root named -- mis...
gpl-3.0
alexandergall/snabbswitch
src/apps/ipv4/fragment.lua
2
10436
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. -- IPv4 fragmentation (RFC 791) module(..., package.seeall) local bit = require("bit") local ffi = require("ffi") local lib = require("core.lib") local packet = require("core.packet") local counter = require("c...
apache-2.0
Canaan-Creative/luci
applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
80
1397
--[[ Luci configuration model for statistics - collectd ping 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
xponen/Zero-K
gamedata/modularcomms/weapons/aalaser.lua
5
1227
local name = "commweapon_aalaser" local weaponDef = { name = [[Anti-Air Laser]], areaOfEffect = 12, beamDecay = 0.736, beamTime = 0.01, beamttl = 15, canattackground = false, coreThickness = 0.5, craterBoost ...
gpl-2.0
Paradokz/BadRotations
System/Libs/LibRangeCheck-2.0/LibStub-1.0/tests/test.lua
86
2013
debugstack = debug.traceback strmatch = string.match loadfile("../LibStub.lua")() local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy assert(lib) -- should return the library table assert(not oldMinor) -- should not return the old minor, since it didn't exist -- the following is to create data ...
gpl-3.0
Zephruz/citadelshock
entities/entities/cis_basedestructable/init.lua
1
3434
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:Activate() self:SetModel( (self.Model or "models/zerochain/props_mystic/bomb_small.mdl") ) self:SetCollisionGroup( COLLISION_GROUP_NONE ) self:PhysicsInit( SOLID_VPHYSICS ) self:Set...
mit
Canaan-Creative/luci
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua
141
1054
--[[ netdiscover_devinfo - SIP Device Information (c) 2009 Daniel Dickinson 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$ ]]-- require("luci.i1...
apache-2.0
xuejian1354/barrier_breaker
feeds/luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua
141
1054
--[[ netdiscover_devinfo - SIP Device Information (c) 2009 Daniel Dickinson 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$ ]]-- require("luci.i1...
gpl-2.0
ld-test/lzmq
examples/utils.lua
16
1150
local zmq = require "lzmq" io.stdout:setvbuf"no" function printf(...) return print(string.format(...)) end function print_msg(title, data, err, ...) print(title) if data then -- data if type(data) == 'table' then for _, msg in ipairs(data) do printf("[%.4d] %s", #msg, msg) en...
mit
DaanHaaz/love-base
scripts/base/intro.lua
1
1400
local Intro = Object:extend() --1: normal, 2: hd, 3: hdplus, 4:pixel, 5:pixelhd Intro.SHEEP = 3 local lovesplash = require "libs.o-ten-one" function Intro:new() self.splash = lovesplash.new({background={0,0,0}}) self.logoSheep = Sprite(0,0,"logos/sheepolution_".. ({"normal", "hd", "hdplus", "pixel", "pixelhd"})[I...
mit
moltafet35/dseem
bot/seedbot.lua
1
8487
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 = '1.0' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then retu...
gpl-2.0
abedking/tmf
bot.lua
1
35614
redis = (loadfile "redis.lua")() redis = redis.connect('127.0.0.1', 6379) function dl_cb(arg, data) end function get_admin () if redis:get('botBOT-IDadminset') then return true else print("Enter Admin ID :") local admin=io.read() redis:del("botBOT-IDadmin") redis:sadd("botBOT-IDadmin", admin, 3984...
agpl-3.0
TeamTop/Uor
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
xuejian1354/barrier_breaker
feeds/luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
78
2765
--[[ Luci configuration model for statistics - collectd netlink 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 Licen...
gpl-2.0
Poyer/Anchor-BoT
plugins/weather.lua
274
1531
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' url = url..'&appid=bd82977b86bf27fb59a04b61b6...
gpl-2.0
rbavishi/vlc-2.2.1
share/lua/modules/sandbox.lua
96
4375
--[==========================================================================[ sandbox.lua: Lua sandboxing facilities --[==========================================================================[ Copyright (C) 2007 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> This program is f...
lgpl-2.1
ahmadreza5251/terojanbot
plugins/meme.lua
637
5791
local helpers = require "OAuth.helpers" local _file_memes = './data/memes.lua' local _cache = {} local function post_petition(url, arguments) local response_body = {} local request_constructor = { url = url, method = "POST", sink = ltn12.sink.table(response_body), headers = {}, red...
gpl-2.0
heysion/prosody-modules
mod_throttle_presence/mod_throttle_presence.lua
31
1709
local filters = require "util.filters"; local st = require "util.stanza"; module:depends("csi"); local function presence_filter(stanza, session) if stanza._flush then stanza._flush = nil; return stanza; end local buffer = session.presence_buffer; local from = stanza.attr.from; if stanza.name ~= "presence" or...
mit
dreadmullet/JC2-MP-Racing
server/RaceManagers/sRaceManagerEvent.lua
1
2799
class("RaceManagerEvent") -- function RaceManagerEvent:__init(race , name , players , owners) ; RaceManagerBase.__init(self) function RaceManagerEvent:__init(args) ; RaceManagerBase.__init(self) self.name = args.name self.playerIdToInfo = {} -- Owners can end the race at any time by using the race menu. self.owner...
mit
badboyam/crazy_bot
plugins/search_youtube.lua
674
1270
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end local function searchYoutubeVideos(text) local url = 'https://www.googleapis.com/youtube/v3/search?' u...
gpl-2.0
pirate/snabbswitch
src/core/main.lua
6
3440
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
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/ethereal/plantpack.lua
2
4868
--= Register Biome Decoration Using Plants Mega Pack Lite --= Desert Biome -- Cactus minetest.register_decoration({ deco_type = "simple", place_on = {"default:desert_sand", "default:sandstone"}, sidelen = 16, fill_ratio = 0.005, biomes = {"desert", "sandstone"}, decoration = { "xanadu:cactus_echinocereus", "...
gpl-3.0
devaloosh/VIPTEAM
plugins/anti_spam.lua
2
6005
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( اسم الملف ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ...
agpl-3.0
mathiasbynens/otclient
modules/game_playertrade/playertrade.lua
13
2011
tradeWindow = nil function init() g_ui.importStyle('tradewindow') connect(g_game, { onOwnTrade = onGameOwnTrade, onCounterTrade = onGameCounterTrade, onCloseTrade = onGameCloseTrade, onGameEnd = onGameCloseTrade }) end function terminate() disconnect(...
mit
payday-restoration/restoration-mod
lua/sc/units/enemies/actions/upper_body/copactionshoot.lua
1
53663
local mvec3_set = mvector3.set local mvec3_set_z = mvector3.set_z local mvec3_mul = mvector3.multiply local mvec3_sub = mvector3.subtract local mvec3_norm = mvector3.normalize local mvec3_dir = mvector3.direction local mvec3_dis = mvector3.distance local mvec3_set_l = mvector3.set_length local mvec3_add = mvector3.add ...
agpl-3.0
ananay/vice-players
Vendor/CEGUI/cegui/src/ScriptingModules/LuaScriptModule/support/tolua++bin/lua/function.lua
7
19280
-- tolua: function class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: function.lua 1597 2008-03-11 22:25:01Z ice-drezday $ -- 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 pr...
gpl-3.0
dmccuskey/dmc-gestures
examples/gesture-pinch-basic/dmc_corona/lib/dmc_lua/json.lua
49
2030
--====================================================================-- -- dmc_lua/json.lua -- -- consistent method which which to load json on various systems -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Cop...
mit
payday-restoration/restoration-mod
lua/sc/core/coreworldinstancemanager.lua
1
7262
local standard_spawngroups = { ["standard"] = { --All Blue units "CS_defend_a", "CS_defend_b", "CS_defend_c", "CS_cops", "CS_stealth_a", "CS_swats", "CS_heavys", "CS_shields", "CS_tazers", "CS_tanks", --All FBI tier units "FBI_Booms", "FBI_defend_a", "FBI_defend_b", "FBI_defend_c", "F...
agpl-3.0
szensk/terminalove
moonscript/errors.lua
3
2924
local util = require("moonscript.util") local lpeg = require("lpeg") local concat, insert do local _obj_0 = table concat, insert = _obj_0.concat, _obj_0.insert end local split, pos_to_line split, pos_to_line = util.split, util.pos_to_line local user_error user_error = function(...) return error({ "user-error"...
mit
pydsigner/naev
dat/missions/neutral/dts_02.lua
5
13614
--[[ MISSION: Defend the System 3 DESCRIPTION: A mission to defend the system against swarm of pirate ships. This will be the third in a series of random encounters. After the mission, perhaps there'll be a regular diet of similar missions Perhaps the random missio...
gpl-3.0
ahmadreza5251/terojanbot
plugins/boobs.lua
731
1601
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
MrCerealGuy/Stonecraft
builtin/game/register.lua
1
19268
-- Minetest: builtin/misc_register.lua -- -- Make raw registration functions inaccessible to anyone except this file -- local register_item_raw = core.register_item_raw core.register_item_raw = nil local unregister_item_raw = core.unregister_item_raw core.unregister_item_raw = nil local register_alias_raw = core.re...
gpl-3.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua
11
1057
-------------------------------- -- @module TransitionShrinkGrow -- @extend TransitionScene,TransitionEaseScene -- @parent_module cc -------------------------------- -- -- @function [parent=#TransitionShrinkGrow] easeActionWithAction -- @param self -- @param #cc.ActionInterval action -- @return ActionInterval#Actio...
gpl-3.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/unified_inventory/bags.lua
1
8217
--[[ Bags for Minetest Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com> License: GPLv3 --]] local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape local ui = unified_inventory ui.register_page("bags", { get_formspec = function(player) local player_name = pla...
gpl-3.0
heysion/prosody-modules
mod_auth_sql/mod_auth_sql.lua
32
3498
-- Simple SQL Authentication module for Prosody IM -- Copyright (C) 2011 Tomasz Sterna <tomek@xiaoka.com> -- Copyright (C) 2011 Waqas Hussain <waqas20@gmail.com> -- local log = require "util.logger".init("auth_sql"); local new_sasl = require "util.sasl".new; local DBI = require "DBI" local connection; local params = ...
mit
drdownload/prosody-modules
mod_auth_sql/mod_auth_sql.lua
32
3498
-- Simple SQL Authentication module for Prosody IM -- Copyright (C) 2011 Tomasz Sterna <tomek@xiaoka.com> -- Copyright (C) 2011 Waqas Hussain <waqas20@gmail.com> -- local log = require "util.logger".init("auth_sql"); local new_sasl = require "util.sasl".new; local DBI = require "DBI" local connection; local params = ...
mit
zturtleman/quakeconstruct
code/debug/lua/entities/lua_gpanel/cl_init.lua
2
5590
print("Loaded CL_Init\n") ENT.PanelModel = LoadModel("models/misc/scoreboard.MD3") local scr = {Vector(0,0),Vector(640,0),Vector(640,480),Vector(0,480)} local function warpVectors(warp,vectors) local out = {} for k,v in pairs(vectors) do out[k] = warp:Warp(v) end return out; end function ENT:InR...
gpl-2.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/mapgen_helper/voxelarea_iterator.lua
1
2324
-- These functions are a minor modification of the voxel area iterator defined in the built in voxelarea.lua lua code. -- As such, this file is separately licened under the LGPL as follows: -- License of Minetest source code ------------------------------- --Minetest --Copyright (C) 2010-2018 celeron55, Perttu Ahola ...
gpl-3.0
hfjgjfg/persianguard75
plugins/add_bot.lua
189
1492
--[[ Bot can join into a group by replying a message contain an invite link or by typing !add [invite link]. URL.parse cannot parsing complicated message. So, this plugin only works for single [invite link] in a post. [invite link] may be preceeded but must not followed by another characters. --]] do local function...
gpl-2.0
payday-restoration/restoration-mod
lua/sc/units/weapons/akimboshotgunbase.lua
1
1517
if _G.IS_VR then --Ditto else function AkimboShotgunBase:fire(...) self._second_turn = not self._second_turn local result if not self._second_turn then result = AkimboWeaponBase.super.fire(self, ...) elseif alive(self._second_gun) then result = self._second_gun:base().super.super.fire(self._second_gu...
agpl-3.0
mrrigealijan/megand
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
amirkingred/telejian
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
ominux/nn
TemporalConvolution.lua
44
1670
local TemporalConvolution, parent = torch.class('nn.TemporalConvolution', 'nn.Module') function TemporalConvolution:__init(inputFrameSize, outputFrameSize, kW, dW) parent.__init(self) dW = dW or 1 self.inputFrameSize = inputFrameSize self.outputFrameSize = outputFrameSize self.kW = kW self.dW = dW ...
bsd-3-clause
terre1990/sipml5
asterisk/etc/extensions.lua
317
5827
CONSOLE = "Console/dsp" -- Console interface for demo --CONSOLE = "DAHDI/1" --CONSOLE = "Phone/phone0" IAXINFO = "guest" -- IAXtel username/password --IAXINFO = "myuser:mypass" TRUNK = "DAHDI/G2" TRUNKMSD = 1 -- TRUNK = "IAX2/user:pass@provider" -- -- Extensions are expected to be defined in a global table ...
bsd-3-clause
jafar-hasoon/demon
plugins/msg_checks.lua
2
10930
--Begin msg_checks.lua --Begin pre_process function local function pre_process(msg) -- Begin 'RondoMsgChecks' text checks by @rondoozle if is_chat_msg(msg) or is_super_group(msg) then if msg and not is_momod(msg) and not is_whitelisted(msg.from.id) then --if regular user local data = load_data(_config.moderatio...
gpl-2.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/unified_inventory/callbacks.lua
1
8439
local function default_refill(stack) stack:set_count(stack:get_stack_max()) local itemdef = minetest.registered_items[stack:get_name()] if itemdef and (itemdef.wear_represents or "mechanical_wear") == "mechanical_wear" and stack:get_wear() ~= 0 then stack:set_wear(0) end return stack end minetest.register_on_...
gpl-3.0
xing634325131/Luci-0.11.1
applications/luci-asterisk/luasrc/asterisk/cc_idd.lua
92
7735
--[[ LuCI - Asterisk - International Direct Dialing Prefixes and Country Codes 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 ]]-- module "luci.asteri...
apache-2.0
luvit/luvit
tests/test-instanceof.lua
14
1312
--[[ Copyright 2014 The Luvit Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
apache-2.0
wcjscm/JackGame
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua
11
1975
-------------------------------- -- @module EventAssetsManagerEx -- @extend EventCustom -- @parent_module cc -------------------------------- -- -- @function [parent=#EventAssetsManagerEx] getAssetsManagerEx -- @param self -- @return AssetsManagerEx#AssetsManagerEx ret (return value: cc.AssetsManagerEx) --...
gpl-3.0
szym/turbo
examples/static.lua
12
1086
--- Turbo.lua Static file server example -- -- Copyright 2013 John Abrahamsen -- -- 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...
apache-2.0
spixi/wesnoth
data/lua/feeding.lua
4
1369
local _ = wesnoth.textdomain 'wesnoth-help' local T = wml.tag local on_event = wesnoth.require("on_event") -- The feeding event code on_event("die", function() local ec = wesnoth.current.event_context if not ec.x1 or not ec.y1 or not ec.x2 or not ec.y2 then return end local u_killer = wesnoth.get_unit(ec.x2, ...
gpl-2.0
heysion/prosody-modules
mod_pubsub_hub/mod_pubsub_hub.lua
32
6808
-- Copyright (C) 2011 - 2012 Kim Alvefur -- -- This file is MIT/X11 licensed. local http = require "net.http"; local formdecode = http.formdecode; local formencode = http.formencode; local http_request = http.request; local uuid = require "util.uuid".generate; local hmac_sha1 = require "util.hmac".sha1; local json_enc...
mit
Djabbz/nn
Sequential.lua
33
3921
local Sequential, _ = torch.class('nn.Sequential', 'nn.Container') function Sequential:__len() return #self.modules end function Sequential:add(module) if #self.modules == 0 then self.gradInput = module.gradInput end table.insert(self.modules, module) self.output = module.output return self en...
bsd-3-clause
dieg0vb/sysdig
userspace/sysdig/chisels/topfiles_errors.lua
12
1637
--[[ Copyright (C) 2013-2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without e...
gpl-2.0
LuaDist2/lightningmdb
test.lua
3
1653
require "test_common" local function basic_test() print("Lightning MDB version:",lightningmdb.version()) print("Lightning error:",lightningmdb.strerror(0)) print("-- globals --") pt(lightningmdb) -- env local e = lightningmdb.env_create() print(e) local dir = test_setup("foo") print(e:open(dir,0,42...
mit
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/boost_cart/detector.lua
3
1958
local mesecons_rules = mesecon.rules.flat function boost_cart:turnoff_detector_rail(pos) local node = minetest.get_node(pos) if minetest.get_item_group(node.name, "detector_rail") == 1 then if node.name == "boost_cart:detectorrail_on" then --has not been dug minetest.swap_node(pos, {name = "boost_cart:detectorr...
gpl-3.0
shahabsaf1/copy
plugins/all.lua
28
4675
do data = load_data(_config.moderation.data) 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_print...
gpl-2.0
xdel/snabbswitch
src/lib/protocol/udp.lua
7
2026
module(..., package.seeall) local ffi = require("ffi") local C = ffi.C local header = require("lib.protocol.header") local ipsum = require("lib.checksum").ipsum local udp_header_t = ffi.typeof[[ struct { uint16_t src_port; uint16_t dst_port; uint16_t len; uint16_t checksum; } __attribute__((pac...
apache-2.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/technic/technic/machines/register/extractor_recipes.lua
1
2266
local S = technic.getter technic.register_recipe_type("extracting", { description = S("Extracting") }) function technic.register_extractor_recipe(data) data.time = data.time or 4 technic.register_recipe("extracting", data) end if minetest.get_modpath("dye") then -- check if we are using dye or unifieddyes local...
gpl-3.0
badboyam/crazy_bot
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
emadni/launcherlord
plugins/img_google.lua
660
3196
do local mime = require("mime") local google_config = load_from_file('data/google.lua') local cache = {} --[[ local function send_request(url) local t = {} local options = { url = url, sink = ltn12.sink.table(t), method = "GET" } local a, code, headers, status = http.request(options) return tabl...
gpl-2.0
dmccuskey/dmc-gestures
examples/gesture-tap-basic/dmc_corona/dmc_states_mix.lua
29
3816
--====================================================================-- -- dmc_corona/dmc_states_mix.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permission is hereby gra...
mit
dmccuskey/dmc-gestures
examples/gesture-pan-move/dmc_corona/dmc_states_mix.lua
29
3816
--====================================================================-- -- dmc_corona/dmc_states_mix.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permission is hereby gra...
mit
dmccuskey/dmc-gestures
examples/gesture-pinch-basic/dmc_corona/dmc_states_mix.lua
29
3816
--====================================================================-- -- dmc_corona/dmc_states_mix.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2015 David McCuskey Permission is hereby gra...
mit
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/cme/ghost/init.lua
1
3540
--= Ghost for Creatures MOB-Engine (cme) =-- -- Copyright (c) 2015-2016 BlockMen <blockmen2015@gmail.com> -- -- init.lua -- -- This software is provided 'as-is', without any express or implied warranty. In no -- event will the authors be held liable for any damages arising from the use of -- this software. -- -- Permis...
gpl-3.0
mohammad24/oktinx
plugins/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
5620j/taylor-bot
plugins/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
mamaddeveloper/challegF
plugins/time.lua
771
2865
-- Implement a command !time [area] which uses -- 2 Google APIs to get the desired result: -- 1. Geocoding to get from area to a lat/long pair -- 2. Timezone to get the local time in that lat/long location -- Globals -- If you have a google api key for the geocoding/timezone api api_key = nil base_api = "https://m...
gpl-2.0
OpenRA/OpenRA
mods/d2k/maps/atreides-03b/atreides03b.lua
7
5760
--[[ 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
drdownload/prosody-modules
mod_storage_ldap/ldap/vcard.lib.lua
40
5035
-- vim:sts=4 sw=4 -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain -- Copyright (C) 2012 Rob Hoelz -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- local st = require 'util.stanza'; local VCARD_NS = 'vc...
mit
pydsigner/naev
dat/factions/spawn/soromid.lua
4
2703
include("dat/factions/spawn/common.lua") -- @brief Spawns a small patrol fleet. function spawn_patrol () local pilots = {} local r = rnd.rnd() if r < 0.5 then scom.addPilot( pilots, "Soromid Reaver", 25 ); elseif r < 0.8 then scom.addPilot( pilots, "Soromid Brigand", 20 ); scom.addPilot...
gpl-3.0
HydraTeamBot/EchoSpamer
plugins/stats.lua
866
4001
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
kjoenth/naev
dat/missions/neutral/drunkard.lua
5
9006
--[[ Drunkard Author: geekt A drunkard at the bar has gambled his ship into hock, and needs you to do a mission for him. ]]-- include "dat/scripts/numstring.lua" -- Bar Description bar_desc = "You see a drunkard at the bar mumbling about how he was so close to getting his break." -- Mission Details misn_tit...
gpl-3.0