repo_name
stringlengths
6
69
path
stringlengths
6
178
copies
stringclasses
278 values
size
stringlengths
4
7
content
stringlengths
671
917k
license
stringclasses
15 values
akh00/kong
kong/plugins/bot-detection/rules.lua
13
3575
-- List taken from https://github.com/ua-parser/uap-core/blob/master/regexes.yaml return { bots = { [[(Pingdom.com_bot_version_)(\d+)\.(\d+)]], -- Pingdom [[(facebookexternalhit)/(\d+)\.(\d+)]], -- Facebook [[Google.*/\+/web/snippet]], -- Google Plus [[(Twitterbot)/(\d+)\.(\d+)]], -- Twitter [[/(...
apache-2.0
mamaddeveloper/sedm
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
chtyim/infrastructure-puppet
modules/kibana_asf/files/JSON.lua
5
19816
local VERSION = 20111207.5 local OBJDEF = { VERSION = VERSION } local isArray = { __tostring = function() return "JSON array" end } isArray.__index = isArray local isObject = { __tostring = function() return "JSON object" end } isObject.__index = isObject function OBJDEF:newArray(tbl) return setmetatable...
apache-2.0
kennethlombardi/moai-components
Data/LunaTest/tests/EventSuite.lua
1
7526
module(..., package.seeall) local pickle = require("Pickle").pickle local PASSED = true local FAILED = false local testDirectory = "./Data/Scripts/Test/" function passResult() end local function START_THE_REACTOR() Event:initialize() end local function STOP_THE_REACTOR() Event:shutdown() e...
mit
yozw/torch-dokx
luasrc/markdown.lua
3
3110
--- Handle Markdown generation local textx = require 'pl.text' -- This class opens and writes to a markdown file local MarkdownWriter = torch.class("dokx.MarkdownWriter") --[[ Constructor for MarkdownWriter Args: * `outputPath` - string; path to write to * `style` - string; 'repl' or 'html' - adjust the output st...
bsd-3-clause
dmccuskey/dmc-wamp
examples/dmc-wamp-subscribe/dmc_corona/dmc_sockets.lua
14
11066
--====================================================================-- -- dmc_corona/dmc_sockets.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2014-2015 David McCuskey Permission is hereby g...
mit
amir1213/aa
bot/utils.lua
494
23873
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
Alexx-G/openface
training/dataset-issue-132.lua
8
14611
-- Source: https://github.com/soumith/imagenet-multiGPU.torch/blob/master/dataset.lua -- Modified by Brandon Amos in Sept 2015 for OpenFace by adding -- `samplePeople` and `sampleTriplet`. require 'torch' torch.setdefaulttensortype('torch.FloatTensor') local ffi = require 'ffi' local argcheck = require 'argcheck' requ...
apache-2.0
VurtualRuler98/kswep2
lua/autorun/kswep_testsound.lua
1
4469
if (SERVER) then AddCSLuaFile() end sound.Add({ name="weapon_kswep.single", volume=1.0, pitch={155,165}, sound="^weapons/sg550/sg550-1.wav", level=145, channel=CHAN_WEAPON }) sound.Add({ name="weapon_kswept_law.single", volume=1.0, pitch={55,60}, sound="^weapons/357_fire2.wav", level=165, channel=CHAN_WE...
apache-2.0
minism/love-analog
mono.lua
1
2077
local RATE = 44100 local BUFSIZE = RATE / 4 local BITS = 16 local CHANNELS = 1 local MonoOut = Module:extend() --- Speaker output module with built in sampler function MonoOut:init() Module.init(self, 'Mono Out', { ports = { Port('In') }, knobs = { Knob('Vol') } }) -- Sampli...
bsd-2-clause
artynet/luci
modules/luci-base/luasrc/i18n.lua
10
1252
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local tparser = require "luci.template.parser" local util = require "luci.util" local tostring = tostring module "luci.i18n" i18ndir = util.libpath() .. "/i18n/" context = util.threadlocal() default = "en...
apache-2.0
dxmgame/dxm-cocos-demo
src/lua-coin-tree/Resources/src/cocos/ui/GuiConstants.lua
44
3020
if nil == ccui then return end ccui.BrightStyle = { none = -1, normal = 0, highlight = 1, } ccui.TextureResType = { localType = 0, plistType = 1, } ccui.TouchEventType = { began = 0, moved = 1, ended = 2, canceled = 3, } ccui.SizeType = { absolute = 0, percent = 1, } ...
mit
c4augustus/Urho3D
bin/Data/LuaScripts/35_SignedDistanceFieldText.lua
26
7747
-- Signed distance field text example. -- This sample demonstrates: -- - Creating a 3D scene with static content -- - Creating a 3D text use SDF Font -- - Displaying the scene using the Renderer subsystem -- - Handling keyboard and mouse input to move a freelook camera require "LuaScripts/Utilities/Sam...
mit
BlubBlab/rom-bot
classes/pawn.lua
1
31003
PT_NONE = 0; PT_PLAYER = 1; PT_MONSTER = 2; PT_SIGIL = 3; PT_NPC = 4; PT_NODE = 4; RACE_HUMAN = 0; RACE_ELF = 1; RACE_DWARF = 2; CLASS_NONE = -1; CLASS_WARRIOR = 1; CLASS_SCOUT = 2; CLASS_ROGUE = 3; CLASS_MAGE = 4; CLASS_PRIEST = 5; CLASS_KNIGHT = 6; CLASS_WARDEN = 7; CLASS_DRUID = 8; CLASS_WARLOC...
mit
tudelft/chdkptp
lua/util.lua
4
16416
--[[ Copyright (C) 2010-2014 <reyalp (at) gmail dot com> 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 WITH...
gpl-2.0
70hz/Hercules
tools/item_merge.lua
45
22377
-- Copyright (c) Hercules Dev Team, licensed under GNU GPL. -- See the LICENSE file -- Base Author: Dastgir @ http://hercules.ws -- -- This script requires lua 5.1 to run. getmetatable('').__call = string.sub require('math') --Bit Operators local tab = { -- tab[i][j] = xor(i-1, j-1) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
gpl-3.0
VurtualRuler98/kswep2
lua/weapons/weapon_kswept_model10.lua
1
2371
--[[ Copyright 2018 vurtual VurtualRuler98@gmail.com vurtual.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 Unless required by applicable law o...
apache-2.0
stephank/luci
libs/rpcc/luasrc/rpcc.lua
93
2227
--[[ LuCIRPCc (c) 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 util = require "luci.ut...
apache-2.0
changeway/packages
lang/luaexpat/files/compat-5.1r5/compat-5.1.lua
251
6391
-- -- Compat-5.1 -- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) -- According to Lua 5.1 -- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ -- _COMPAT51 = "Compat-5.1 R5" local LUA_DIRSEP = '/' local LUA_OFSEP = '_' local OLD_LUA_OFSEP = '' local POF = 'luaopen_' local LUA_PA...
gpl-2.0
facebokiii/Uproject
plugins/isup.lua
741
3095
do local socket = require("socket") local cronned = load_from_file('data/isup.lua') local function save_cron(msg, url, delete) local origin = get_receiver(msg) if not cronned[origin] then cronned[origin] = {} end if not delete then table.insert(cronned[origin], url) else for k,v in pairs(cronned[...
gpl-2.0
Wiladams/LJIT2perfmon
fun.lua
1
28396
--- --- Lua Fun - a high-performance functional programming library for LuaJIT --- --- Copyright (c) 2013-2014 Roman Tsisyk <roman@tsisyk.com> --- --- Distributed under the MIT/X11 License. See COPYING.md for more details. --- local exports = {} local methods = {} -----------------------------------------------------...
mit
Mephostopilis/lua
lualib/StackTracePlus.lua
1
12175
-- tables local _G = _G local string, io, debug, coroutine = string, io, debug, coroutine -- functions local tostring, print, require = tostring, print, require local next, assert = next, assert local pcall, type, pairs, ipairs = pcall, type, pairs, ipairs local error = error assert(debug, "debug table must be availa...
apache-2.0
moltafet35/ssssis
plugins/service_entergroup.lua
355
3585
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
dxmgame/dxm-cocos-demo
src/lua-fantasy-warrior-3d/src/custom/api/JumpBy3D.lua
9
1552
-------------------------------- -- @module JumpBy3D -- @extend ActionInterval -- @parent_module cc -------------------------------- -- initializes the action -- @function [parent=#JumpBy3D] initWithDuration -- @param self -- @param #float duration -- @param #vec3_table position -- @param #float height -- @param #...
mit
stephank/luci
applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
80
1455
--[[ Luci configuration model for statistics - collectd unixsock 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 Lice...
apache-2.0
aqasaeed/signalbot
plugins/Robot.lua
292
1641
-- Checks if bot was disabled on specific chat local function is_channel_disabled( receiver ) if not _config.disabled_channels then return false end if _config.disabled_channels[receiver] == nil then return false end return _config.disabled_channels[receiver] end local function enable_channel(receiver) if...
gpl-2.0
devlaith/DEVLAITH
plugins/inpm.lua
19
9514
local function pre_process(msg) local to = msg.to.type local service = msg.service if to == 'user' and msg.fwd_from then if not is_support(msg.from.id) and not is_admin1(msg) then return end local user = 'user#id'..msg.from.id local from_id = msg.fwd_from.peer_id if msg.fwd_from.first_name then from_f...
gpl-2.0
Daniex0r/project-roleplay-rp
resources/system-prac/c_job_framework.lua
1
1375
job = 0 localPlayer = getLocalPlayer() function playerSpawn() local logged = getElementData(localPlayer, "loggedin") if (logged==1) then job = tonumber(getElementData(localPlayer, "job")) if (job==1) then -- TRUCKER displayTruckerJob() else resetTruckerJob() end if (job==2) then --...
gpl-2.0
marshmellow42/proxmark3
client/lualibs/default_toys.lua
10
19294
local _names = { --[[ decimal, hexadecimal, ccc, elements, group, name --]] {"0", "0000", "0030", "air", "regular", "Whirlwind"}, --{"0", "0000", "0030", "air", "regular", "Elite Whirlwind"}, --{"0", "0000", "0030", "air", "regular", "Polar Whirlwind"}, {"1", "0100", "0030", "air", "regular", "Sonic Boom"}, {"2...
gpl-2.0
5620g/pp
plugins/arabic_lock.lua
234
1405
antiarabic = {}-- An empty table for solving multiple kicking problem do local function run(msg, matches) if is_momod(msg) then -- Ignore mods,owner,admins return end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['lock_arabic'] then if data[tostring(msg.to.id)...
gpl-2.0
dmccuskey/dmc-wamp
dmc_corona_boot.lua
47
15406
--====================================================================-- -- dmc_corona_boot.lua -- -- utility to read in configuration file for dmc-corona-library -- -- Documentation: --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2013-2015 David Mc...
mit
ToxicFrog/ttymor
tty.lua
1
7406
tty = {} flags.register "debug-rendering-stack" { help = "Log each window as it's pushed or popped"; } -- Stack of rendering states. local stack = {} local top = nil -- Buffer for current frame. local buf = {} -- position of cursor local X,Y = 0,0 -- Initialize the tty. function tty.init() os.execute('stty raw...
mit
UnluckyNinja/PathOfBuilding
Data/2_6/Minions.lua
1
7177
-- Path of Building -- -- Minion Data -- Monster data (c) Grinding Gear Games -- local minions, mod = ... minions["RaisedZombie"] = { name = "Raised Zombie", life = 2.55, fireResist = 40, coldResist = 40, lightningResist = 40, chaosResist = 20, damage = 1.5, damageSpread = 0.4, attackTime = 1.755, attackRang...
mit
artynet/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua
5
1823
-- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.openvpn", package.seeall) function item() return luci.i18n.translate("OpenVPN") end function rrdargs( graph, plugin, plugin_instance ) local inst = plugin_instance...
apache-2.0
moltafet35/ssssis
plugins/pokedex.lua
626
1668
do local images_enabled = true; local function get_sprite(path) local url = "http://pokeapi.co/"..path print(url) local b,c = http.request(url) local data = json:decode(b) local image = data.image return image end local function callback(extra) send_msg(extra.receiver, extra.text, ok_cb, false) end lo...
gpl-2.0
tudelft/chdkptp
lua/camtests.lua
5
10588
--[[ Copyright (C) 2013-2014 <reyalp (at) gmail dot com> 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 WITHO...
gpl-2.0
djkamran021/BY
plugins/groupmanager.lua
2
154855
local function modadd(msg) local hash = "gp_lang:"..msg.to.id local lang = redis:get(hash) -- superuser and admins only (because sudo are always has privilege) if not is_admin(msg) then if not lang then return '_You are not bot admin_' else return 'شما مدیر ربات نمیباشید' end end local d...
gpl-3.0
Mephostopilis/lua
fixmath/test_bounce.lua
1
2008
require "fixmath.bounce" -- Create a b3World object. local m_world = bounce.b3World() local gravity = { x= 0.0, y = -9.8, z = 0.0} m_world:SetGravity(gravity) local timeStep = 1.0 / 60.0 local velocityIterations = 8 local positionIterations = 2 local groundDef = {} local ground = m_world:CreateBody(groundDef) loca...
apache-2.0
xanathar/lualinq
src/grimq_dbg_header.lua
1
1536
-- ------------------------------------------------------------------------ -- This project is developed by Marco Mastropaolo (Xanathar) -- as a personal project and is in no way affiliated with Almost Human. -- You can use this scripts in any Legend of Grimrock dungeon you want; -- credits are appreciated though not...
bsd-3-clause
kickinrad/healerhealer
patient.lua
1
11145
patient = { ailments={skin=nil, sweating=0, bloodshot=0, sunken=0, welts=0, spots=0}, skin={k=nil, r=nil, g=nil, b=nil, img=love.graphics.newImage("assets/character/skin.png")}, shirt={r=nil, g=nil, b=nil, img=love.graphics.newImage("assets/character/shirt.png")}, hair={r=nil, g=nil, b=nil, img=love.graphics.newIma...
mit
UnluckyNinja/PathOfBuilding
Data/3_0/Bases/shield.lua
1
30696
-- This file is automatically generated, do not edit! -- Item data (c) Grinding Gear Games local itemBases = ... itemBases["Splintered Tower Shield"] = { type = "Shield", subType = "Armour", tags = { default = true, armour = true, shield = true, str_armour = true, str_shield = true, }, armour = { BlockChance = 24...
mit
errmor91/gamecode4
Assets/Scripts/PreInit.lua
44
11576
--======================================================================== -- PreInit.lua : Script that's run when the scripting system is initialized -- -- Part of the GameCode4 Application -- -- GameCode4 is the sample application that encapsulates much of the source code -- discussed in "Game Coding Complete -...
lgpl-3.0
artynet/luci
applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua
7
7240
-- Copyright 2018 Rosy Song <rosysong@rosinson.com> -- Licensed to the public under the Apache License 2.0. local uci = require("luci.model.uci").cursor() local wa = require("luci.tools.webadmin") local fs = require("nixio.fs") local ipc = require("luci.ip") local def_rate_dl = uci:get("nft-qos", "default", "static_r...
apache-2.0
camchenry/shaderview
libs/class.lua
9
3066
--[[ Copyright (c) 2010-2013 Matthias Richter 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, merge, publish, dis...
mit
kalyanreddyemani/hpg-bigdata
hpg-bigdata-core/native/third-party/samtools/misc/r2plot.lua
28
2877
#!/usr/bin/env luajit function string:split(sep, n) local a, start = {}, 1; sep = sep or "%s+"; repeat local b, e = self:find(sep, start); if b == nil then table.insert(a, self:sub(start)); break end a[#a+1] = self:sub(start, b - 1); start = e...
apache-2.0
hnyman/luci
modules/luci-mod-admin-mini/luasrc/model/cbi/mini/system.lua
78
2244
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. require("luci.sys") require("luci.sys.zoneinfo") require("luci.tools.webadmin") require("luci.util") m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device li...
apache-2.0
Noltari/luci
modules/luci-mod-admin-mini/luasrc/model/cbi/mini/system.lua
78
2244
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. require("luci.sys") require("luci.sys.zoneinfo") require("luci.tools.webadmin") require("luci.util") m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device li...
apache-2.0
tsharly/TSHARLY
plugins/lockfwd.lua
1
1095
do local function pre_process(msg) local hash = 'mate:'..msg.to.id if redis:get(hash) and msg.fwd_from and not is_sudo(msg) and not is_owner(msg) and not is_momod(msg) then delete_msg(msg.id, ok_cb, true) return "done" end return msg end local function ta...
gpl-2.0
hnyman/luci
applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua
3
7928
--[[ LuCI - Lua Configuration Interface Copyright 2019 lisaac <https://github.com/lisaac/luci-app-dockerman> ]]-- local docker = require "luci.model.docker" local dk = docker.new() local containers, images, res local m, s, o res = dk.images:list() if res.code < 300 then images = res.body else return end res = dk....
apache-2.0
adminomega/exterme-orginal
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
LaFamiglia/Illarion-Content
item/id_6_scissors.lua
1
3506
--[[ 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
matthiasweller/Oxide-Plugins
Oxide 2/0friendsAPI.lua
1
14688
PLUGIN.Title = "FriendsAPI" PLUGIN.Description = "An API to manage friends" PLUGIN.Author = "#Domestos" PLUGIN.Version = V(1, 2, 4) PLUGIN.ResourceID = 686 local debugMode = false function PLUGIN:Init() command.AddChatCommand("friend", self.Object, "cmdFriend") command.AddConsoleCommand("...
mit
Death15/swatch
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
shahabsaf1/copy-infernal
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
agentsnazz/sb-mods
Theatre/concerteq/objects/generic/follower/Bfollower/Bfollower.lua
1
7388
function init(args) self.state = stateMachine.create({ "attackState", "scanState" }) entity.setAnimationState("movement", "idle") entity.setInteractive(false) entity.setAllOutboundNodes(false) end -------------------------------------------------------------------------------- function main(args) ...
unlicense
ninjalulz/forgottenserver
data/spells/scripts/custom/polymorph.lua
10
1084
local condition = Condition(CONDITION_OUTFIT) condition:setParameter(CONDITION_PARAM_TICKS, 20000) condition:setOutfit(0, 230, 0, 0, 0, 0) condition:setOutfit(0, 231, 0, 0, 0, 0) condition:setOutfit(0, 232, 0, 0, 0, 0) condition:setOutfit(0, 233, 0, 0, 0, 0) condition:setOutfit(0, 234, 0, 0, 0, 0) condition:setOutfit(0...
gpl-2.0
Noltari/luci
applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua
2
12852
-- Copyright 2017-2018 Stan Grishin <stangri@melmac.net> -- Licensed to the public under the Apache License 2.0. module("luci.controller.advanced_reboot", package.seeall) devices = { -- deviceName, boardName, partition1, partition2, offset, envVar1, envVar1Value1, envVar1Value2, envVar2, envVar2Value1, envVar2Value...
apache-2.0
ninjalulz/forgottenserver
data/scripts/lib/event_callbacks.lua
1
3775
-- Creature EVENT_CALLBACK_ONCHANGEOUTFIT = 1 EVENT_CALLBACK_ONCHANGEMOUNT = 2 EVENT_CALLBACK_ONAREACOMBAT = 3 EVENT_CALLBACK_ONTARGETCOMBAT = 4 EVENT_CALLBACK_ONHEAR = 5 -- Party EVENT_CALLBACK_ONJOIN = 6 EVENT_CALLBACK_ONLEAVE = 7 EVENT_CALLBACK_ONDISBAND = 8 EVENT_CALLBACK_ONSHAREEXPERIENCE = 9 -- Player EVENT_CALLB...
gpl-2.0
snabbnfv-goodies/snabbswitch
src/lib/json.lua
29
10286
-- JSON4Lua: JSON encoding / decoding support for the Lua language. -- json Module. -- Author: Craig Mason-Jones -- Homepage: http://json.luaforge.net/ -- Version: 0.9.40 -- This module is released under the MIT License (MIT). -- -- NOTE: This is only the decode functionality ripped out from JSON4Lua. -- See: https://g...
apache-2.0
camchenry/shaderview
globals.lua
1
4491
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- !! This flag controls the ability to toggle the debug view. !! -- !! You will want to turn this to 'true' when you publish your game. !! -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! RELEASE = false -- Enab...
mit
bsmr-games/lipsofsuna
data/system/database.lua
1
2353
--- 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 system.database -- @alias Datab...
gpl-3.0
bsmr-games/lipsofsuna
data/system/password.lua
1
1183
--- 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 system.password -- @alias Passw...
gpl-3.0
nood32/MEEDOBOT
plugins/save.lua
1
23684
--[[ ✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133 ✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133 ✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen ✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy ✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com ✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen ]]-- do -------------...
gpl-2.0
danielga/luachip
lua/weapons/gmod_tool/stools/luachip.lua
1
2417
TOOL.Category = "Construction" TOOL.Name = "#tool.luachip.name" TOOL.RequiresTraceHit = true TOOL.DefaultModel = "models/beer/wiremod/gate_e2.mdl" TOOL.ClientConVar = { model = TOOL.DefaultModel } cleanup.Register("luachips") if SERVER then CreateConVar("sbox_maxluachips", 5) function TOOL:LeftClick(trace) lo...
bsd-3-clause
FastTM/Fast-Unique
plugins/private_settings.lua
1
2538
local plugin = {} local function get_button_description(key) if key == 'rules_on_join' then return _("When you join a group moderated by this bot, you will receive the group rules in private") elseif key == 'reports' then return _("If enabled, you will receive all the messages reported with the...
gpl-2.0
snabbnfv-goodies/snabbswitch
lib/ljsyscall/syscall/linux/ioctl.lua
13
10152
-- ioctls, filling in as needed -- note there are some architecture dependent values 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, pcal...
apache-2.0
LaFamiglia/Illarion-Content
item/altars.lua
1
22990
--[[ 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
decimad/luabind-deboostified
examples/glut/glut_bindings.lua
38
1543
quit = false function resize_func(w, h) local ratio = w / h print('====== resize') glMatrixMode(gl.PROJECTION) glLoadIdentity() glViewport(0,0,w,h) gluPerspective(45,ratio,1,1000) glMatrixMode(gl.MODELVIEW) glLoadIdentity() end angle = 0 angle2 = 0 previous_time = 0 function display_func() if quit the...
mit
gwx/tome-grayswandir-weaponry
data/objects/clubs.lua
1
2377
if config.settings.tome.grayswandir_weaponry_clubs ~= false then newEntity{ define_as = 'BASE_CLUB', slot = 'MAINHAND', dual_wieldable = true, type = 'weapon', subtype='club', add_name = ' (#COMBAT#)', display = '/', color=colors.LIGHT_RED, image = 'object/generic_club.png', moddable_tile =...
gpl-3.0
qq779089973/ramod
luci/libs/core/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...
mit
299299/Urho3D
Source/ThirdParty/LuaJIT/dynasm/dasm_arm.lua
33
34598
------------------------------------------------------------------------------ -- DynASM ARM module. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _in...
mit
chelog/brawl
gamemodes/brawl/gamemode/modules/base/modes/ffa_dm/sv_mode.lua
1
2563
function MODE:Think() if GetGlobalInt( "brawl.RoundState" ) < 3 then for k, ply in pairs( player.GetAll() ) do if not IsValid( ply ) then continue end if ply:Frags() >= self.maxKills then brawl.EndRound({ winner = ply }) end end end end local intermissionTime = 10 function MODE:EndRound( ...
gpl-3.0
rrze-likwid/likwid
examples/Lua-likwidAPI.lua
2
2871
#!<PREFIX>/bin/likwid-lua --[[ * ======================================================================================= * * Filename: Lua-likwidAPI.lua * * Description: Example how to use the LIKWID API in Lua scripts * * Version: <VERSION> * Released: <DATE> * * Author: Thom...
gpl-3.0
dismantl/luci-0.12
protocols/hso/luasrc/model/cbi/admin_network/proto_hso.lua
14
4573
--[[ LuCI - Lua Configuration Interface Copyright 2015 Stanislas Bertrand <stanislasbertrand@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 ...
apache-2.0
qq779089973/ramod
luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua
80
1153
--[[ LuCI - Lua Configuration Interface (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.controller.l...
mit
UberWaffe/OpenRA
mods/ra/maps/allies-02-classic/allies02.lua
1
2440
JeepReinforcements = { "e1", "e1", "e1", "jeep" } JeepReinforcementsInterval = 15 TruckNames = { "truk", "truk", "truk" } TruckInterval = 25 TruckDelay = 75 FirstJeepReinforcementsDelay = 125 SecondJeepReinforcementsDelay = 250 SendMcvReinforcements = function() Media.PlaySpeechNotification("ReinforcementsArrived") ...
gpl-3.0
jason9263/JasonAI
torch/2_supervised/4_train.lua
1
7013
---------------------------------------------------------------------- -- This script demonstrates how to define a training procedure, -- irrespective of the model/loss functions chosen. -- -- It shows how to: -- + construct mini-batches on the fly -- + define a closure to estimate (a noisy) loss -- function, a...
apache-2.0
gwx/tome-grayswandir-weird-wyrmic
data/libs/auto-temps-0.lua
5
1697
-- 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
299299/Urho3D
bin/Data/LuaScripts/01_HelloWorld.lua
24
1882
-- This first example, maintaining tradition, prints a "Hello World" message. -- Furthermore it shows: -- - Using the Sample utility functions as a base for the application -- - Adding a Text element to the graphical user interface -- - Subscribing to and handling of update events require "LuaScripts...
mit
LaFamiglia/Illarion-Content
item/id_2052_stretcher.lua
1
1145
--[[ 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
dwicke/L-BFGS-B-Lua
src/luatest.lua
1
1174
package.path = package.path..";../../?/init.lua" package.path = package.path..";../../?.lua" require "luawrapper" function getf(action1, action2) local x1,y1 = -10,-10 local h1 = 100 local s1 = 4.0 local f1 = h1*(1 - (((action1-x1)/s1)*((action1-x1)/s1)) - (((action2-y1)/s1)*((action2-y1)/s1))) + 50 print ...
bsd-3-clause
kitool/gamecode4
Extra/UtilityDemo/utility.lua
44
7963
-- Utility.lua -- A simple utility game -- A "better" random seed. This was taken from http://lua-users.org/wiki/MathLibraryTutorial math.randomseed(tonumber(tostring(os.time()):reverse():sub(1,6))) ----------------------------------------------------------------------------------------------------------------...
lgpl-3.0
luiseduardohdbackup/WarriorQuest
WarriorQuest/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/ltn12.lua
71
8331
----------------------------------------------------------------------------- -- LTN12 - Filters, sources, sinks and pumps. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ------------------------------------------------------------------------...
mit
LaFamiglia/Illarion-Content
monster/race_78_golden_skeleton/id_783_magus.lua
1
1470
--[[ 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
skatsuta/aerospike-training
book/answers/RecordUDF/Go/udf/example.lua
9
1433
function example_function(rec, userid, profile) local ret = map() -- Initialize the return value (a map) if not aerospike:exists(rec) then -- Check to see that the record exists ret['status'] = 'DOES NOT EXIST' -- Set the return status else local x = rec['bin1'] ...
mit
noahdesu/legion
bindings/lua/examples/circuit/circuit.lua
2
1356
-- Copyright 2015 Stanford University -- -- 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 agree...
apache-2.0
SirSepehr/Sepehr
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
MustaphaTR/OpenRA
mods/ra/maps/fall-of-greece-2-evacuation/evacuation-AI.lua
7
3468
--[[ 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
Godfather021/yag
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
mamadtnt/ya
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
snabbnfv-goodies/snabbswitch
lib/ljsyscall/syscall/openbsd/types.lua
24
9707
-- OpenBSD types 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 function init(types) local abi = requ...
apache-2.0
hnyman/luci
applications/luci-app-unbound/luasrc/model/cbi/unbound/zone-details.lua
3
3473
-- Copyright 2018 Eric Luehrsen <ericluehrsen@gmail.com> -- Licensed to the public under the Apache License 2.0. local sy = require "luci.sys" local ds = require "luci.dispatcher" local hp = require "luci.http" local m7, s7 local ena, flb, zty, znm, srv, rlv, tlu local prt, tlp, tli, url arg[1] = arg[1] or "" m7 = Ma...
apache-2.0
MustaphaTR/OpenRA
mods/ra/maps/ant-01/ant-attack.lua
7
2347
--[[ 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
Hzj-jie/koreader-base
spec/unit/zeromq_spec.lua
4
2306
local ffi = require("ffi") local zyre = ffi.load("libs/libzyre.so.1") local filemq = ffi.load("libs/libfmq.so.1") ffi.cdef[[ int zre_msg_test(bool verbose); void zyre_peer_test(bool verbose); void zyre_group_test(bool verbose); void zyre_node_test(bool verbose); void zyre_event_test(bool verbose); void zyre_test(bool ...
agpl-3.0
soundsrc/premake-core
modules/gmake2/tests/test_gmake2_pch.lua
11
4768
-- -- test_gmake2_pch.lua -- Validate the setup for precompiled headers in makefiles. -- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project -- local p = premake local suite = test.declare("gmake2_pch") local p = premake local gmake2 = p.modules.gmake2 local project = p.project -- -- ...
bsd-3-clause
BHYCHIK/tntlua
notifications.lua
5
6485
-- -- A system to store and serve notifications in a social network. -- Stores an association [user_id <-> list of notifications]. -- -- Each notification describes a recent event a user should get -- informed about, and is represented by a notifcation_id. -- -- Notification id is a fixed length string. -- -- Notificat...
bsd-2-clause
eagle14/Snippy
plugins/stats.lua
24
3698
do local NUM_MSG_MAX = 1 local TIME_CHECK = 1 -- 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..' ' end if user.lastname then text = text..user.last_name end return text end -- Returns a table with `...
gpl-2.0
Noltari/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua
5
1637
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.df", package.seeall) function item() return luci.i18n.translate("Disk Space Usage") end function rrdargs( graph, plugin, plugin_instance, dtype )...
apache-2.0
bsmr-games/lipsofsuna
data/system/billboard.lua
1
2397
--- Renderable billboard. -- -- 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 system.billboard -...
gpl-3.0
tinybearc/sdkbox-ga-sample
cpp/cocos2d/plugin/luabindings/auto/api/lua_cocos2dx_pluginx_auto_api.lua
146
1793
-------------------------------- -- @module plugin -------------------------------------------------------- -- the plugin PluginProtocol -- @field [parent=#plugin] PluginProtocol#PluginProtocol PluginProtocol preloaded module -------------------------------------------------------- -- the plugin PluginManager -- @fi...
mit