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 |
|---|---|---|---|---|---|
errmor91/gamecode4 | Assets/Scripts/Events.lua | 44 | 2298 | --========================================================================
-- Events.lua : Defines event handler delegate functions for events
--
-- Part of the GameCode4 Application
--
-- GameCode4 is the sample application that encapsulates much of the source code
-- discussed in "Game Coding Complete - 4th Edi... | lgpl-3.0 |
theonlywild/erfaan | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
changeway/packages | net/wifidog-ng/files/wifidog-ng/auth.lua | 22 | 6175 | --[[
Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
This program 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 2.1 of the License, or (at your option) any later vers... | gpl-2.0 |
UnluckyNinja/PathOfBuilding | Data/Uniques/gloves.lua | 1 | 12330 | -- Item data (c) Grinding Gear Games
return {
-- Gloves: Armour
[[
Atziri's Acuity
Vaal Gauntlets
Variant: {2_6}Pre 3.0.0
Variant: Current
Requires Level 75, 100 Str
+(60-80) to Intelligence
+(60-75) to maximum Life
(200-220)% increased Armour
(25-35)% increased Global Critical Strike Chance
{variant:1}Leech applies i... | mit |
stephank/luci | modules/admin-mini/luasrc/controller/mini/system.lua | 10 | 6669 | --[[
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 |
mcanthony/neuralart | images.lua | 10 | 1303 | --
-- Convenience functions to replicate Caffe preprocessing
--
local means = { 104, 117, 123 }
function preprocess(img, scale)
-- handle monochrome images
if img:size(1) == 1 then
local copy = torch.FloatTensor(3, img:size(2), img:size(3))
copy[1] = img[1]
copy[2] = img[1]
cop... | mit |
pchote/OpenRA | lua/stacktraceplus.lua | 24 | 13196 | --[[
The MIT License
Copyright (c) 2010 Ignacio Burgueño
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, cop... | gpl-3.0 |
Daniex0r/project-roleplay-rp | resources/prp_text3d/tablicainf_urzad.lua | 1 | 1152 | local tablice={
-- [WZÓR] [x,y,z,r,dimension,interior]
{1316.01, -1367.78, 13.30,1,0,0,tablica=118, nazwa="(( tablica informacyjna ))\nUrząd Miasta LS" }, -- parking pomocy drogowej przy stacji dolnej
}
ib_win = guiCreateWindow(0.5703,0.2729,0.4016,0.5958,"Informacje.",true)
ib_memo = guiCreateMemo(0.0506,0.1049,... | gpl-2.0 |
siilaas/silas | 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... | agpl-3.0 |
mymedia2/it_cat_butler | plugins/extra.lua | 7 | 4586 | local config = require 'config'
local u = require 'utilities'
local api = require 'methods'
local plugin = {}
local function is_locked(chat_id)
local hash = 'chat:'..chat_id..':settings'
local current = db:hget(hash, 'Extra')
if current == 'off' then
return true
else
return false
end
end
funct... | gpl-2.0 |
Whit3Tig3R/SpammBot | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
korialuo/xServer | common/playermgr.lua | 1 | 1112 | local player = require "player"
local playermgr = {
-- player map
_players_id = {}, -- id --> player
_players_fd = {} -- fd --> player
}
-- 创建玩家对象
function playermgr.newplayer(res, token)
return player.new(res, token)
end
-- 绑定会话
function playermgr.bindsession(player, clisession)
playermgr._pl... | mit |
dmccuskey/dmc-wamp | examples/dmc-wamp-rpc-caller/dmc_corona/dmc_sockets/async_tcp.lua | 14 | 12640 | --====================================================================--
-- dmc_sockets/async_tcp.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2014-2015 David McCuskey
Permission is hereby gr... | mit |
UnluckyNinja/PathOfBuilding | Modules/CalcOffence-2_6.lua | 1 | 75837 | -- Path of Building
--
-- Module: Calc Offence
-- Performs offence calculations.
--
local calcs = ...
local pairs = pairs
local ipairs = ipairs
local unpack = unpack
local t_insert = table.insert
local m_floor = math.floor
local m_min = math.min
local m_max = math.max
local m_sqrt = math.sqrt
local m_pi = math.pi
loca... | mit |
akh00/kong | kong/dao/schemas/targets.lua | 3 | 1888 | -- This schema defines a sequential list of updates to the upstream/loadbalancer algorithm
-- hence entries cannot be deleted or modified. Only new ones appended that will overrule
-- previous entries.
local Errors = require "kong.dao.errors"
local utils = require "kong.tools.utils"
local DEFAULT_PORT = 8000
local DE... | apache-2.0 |
ToxicFrog/ttymor | ui/EntityLine.lua | 1 | 1296 | -- Like a TextLine, but displays an in-game entity tile and name.
local Window = require 'ui.Window'
local EntityLine = Window:subclass {
can_focus = true;
-- cmd_activate will emit this verb if set
default_verb = nil;
size = { inf, 0 };
}
function EntityLine:__init(...)
ui.Window.__init(self, ...)
assertf... | mit |
jiuaiwo1314/skynet | examples/share.lua | 66 | 1702 | local skynet = require "skynet"
local sharedata = require "sharedata"
local mode = ...
if mode == "host" then
skynet.start(function()
skynet.error("new foobar")
sharedata.new("foobar", { a=1, b= { "hello", "world" } })
skynet.fork(function()
skynet.sleep(200) -- sleep 2s
skynet.error("update foobar a = 2")
... | mit |
LucentW/s-uzzbot | 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 |
emadni/Telelord- | 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 |
roelofr/titanwars | gamemodes/titanwars/gamemode/init.lua | 1 | 3131 | include( 'shared.lua' )
include( 'sv_beta.lua' )
GM.PlayerSpawnTime = {}
--[[---------------------------------------------------------
Name: gamemode:Initialize( )
Desc: Called immediately after starting the gamemode
-----------------------------------------------------------]]
function GM:Initialize( )
end
... | gpl-3.0 |
spoconnor/ElixirMessagingServer | EclipseWorkspace/LuaClient/runtime/linux/Resources/DeprecatedCocos2dEnum.lua | 1 | 16884 | require "Cocos2dConstants.lua"
require "OpenglConstants.lua"
--Enums will be deprecated,begin
_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
_G.kCCTextAlignmentCenter = cc.TEXT_ALIGNMENT_CENTER
_G.kCCVerticalTextAlignmentTop ... | mit |
stephank/luci | applications/luci-openvpn/luasrc/model/cbi/openvpn-basic.lua | 71 | 3274 | --[[
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$
]]--
requ... | apache-2.0 |
artynet/luci | applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua | 7 | 1448 | -- Copyright 2018 Rosy Song <rosysong@rosinson.com>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.nft-qos", package.seeall)
function index()
if not nixio.fs.access("/etc/config/nft-qos") then
return
end
entry({"admin", "status", "realtime", "rate"},
template("nft-qos/rate"), ... | apache-2.0 |
aqasaeed/signalbot | plugins/banhammer.lua | 1085 | 11557 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
redstormbot/xyiliya | plugins/banhammer.lua | 1085 | 11557 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
devlaith/DEVLAITH | plugins/isup.lua | 3 | 3172 | ---{ BY #DEVLAITH _ TELEGRAM @II07II }---
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],... | gpl-2.0 |
akh00/kong | spec/03-plugins/22-bot-detection/01-access_spec.lua | 3 | 3536 | local helpers = require "spec.helpers"
local HELLOWORLD = "HelloWorld" -- just a test value
local FACEBOOK = "facebookexternalhit/1.1" -- matches a known bot in `rules.lua`
describe("Plugin: bot-detection (access)", function()
local client
setup(function()
local api1 = assert(helpers.dao.apis:ins... | apache-2.0 |
Daniex0r/project-roleplay-rp | resources/sponsorzy/c_donation_gui.lua | 1 | 5303 | local wDonation,lSpendText,lActive,lAvailable, bClose,f7state = nil
local lItems = {}
local bItems = { }
local function checkF7( )
if not f7state and getKeyState( "f7" ) then
closeDonationGUI( )
else
f7state = getKeyState( "f7" )
end
end
function openDonationGUI(obtained, available, credits)
if wDonation ~=... | gpl-2.0 |
kennethlombardi/moai-components | Data/Scripts/EventDefinitions.lua | 1 | 1200 | --[[
The event definitions for the event system.
The purpose of these definitions is to try and keep some kind of error checking
and centralized location for the types and arguments for events.
It should be obvious that this definition is going to explode in size pretty quickly
We will need... | mit |
k8s-packages-power/contrib | ingress/controllers/nginx/lua/vendor/lua-resty-http/lib/resty/http.lua | 45 | 21496 | local http_headers = require "resty.http_headers"
local ngx_socket_tcp = ngx.socket.tcp
local ngx_req = ngx.req
local ngx_req_socket = ngx_req.socket
local ngx_req_get_headers = ngx_req.get_headers
local ngx_req_get_method = ngx_req.get_method
local str_gmatch = string.gmatch
local str_lower = string.lower
local str_u... | apache-2.0 |
UnluckyNinja/PathOfBuilding | Data/Uniques/boots.lua | 1 | 13572 | -- Item data (c) Grinding Gear Games
return {
-- Boots: Armour
[[
The Infinite Pursuit
Goliath Greaves
League: Breach
Requires Level 54, 95 Str
+(30-60) to maximum Life
20% increased Movement Speed
Moving while Bleeding doesn't cause you to take extra Damage
15% increased Movement Speed while Bleeding
50% chance to be... | mit |
Kryntasia/rea-content | objects/rea_turret/rea_turret.lua | 1 | 15082 | -- Needed Json Params:
-- <int> turLevel,
-- <float> turFireTime,
-- <int> turConsumeEnergy,
-- <path> turFireSound,
-- <int> turDamPerShot,
-- <float> turFireSpeed,
-- <int / 1> turSpread,
-- <projectileName> projToFire,
-- <effectName> turDebuff
-- @Kayuko
function init(args)
--Bunch of parameters
self.b... | artistic-2.0 |
Sponk/NeoEditor | 3rdparty/sdl2-emscripten/premake/projects/testscale.lua | 7 | 1052 | -- Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
--
-- 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.
--
-- Permission is granted to anyone to use this software for an... | gpl-2.0 |
spoconnor/ElixirMessagingServer | EclipseWorkspace/LuaClient/runtime/win32/mime.lua | 149 | 2487 | -----------------------------------------------------------------------------
-- MIME support for the Lua language.
-- Author: Diego Nehab
-- Conforming to RFCs 2045-2049
-----------------------------------------------------------------------------
----------------------------------------------------------------------... | mit |
wiox/archive | gmod-multi-jump-master/lua/autorun/multi_jump.lua | 2 | 1199 | PrecacheParticleSystem("doublejump_smoke")
local function GetMoveVector(mv)
local ang = mv:GetAngles()
local max_speed = mv:GetMaxSpeed()
local forward = math.Clamp(mv:GetForwardSpeed(), -max_speed, max_speed)
local side = math.Clamp(mv:GetSideSpeed(), -max_speed, max_speed)
local abs_xy_move = math.abs(forwar... | unlicense |
facebook/SCRNNs | lstm.lua | 3 | 10925 | --
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Sumi... | bsd-3-clause |
UnluckyNinja/PathOfBuilding | Export/mods.lua | 1 | 1876 | loadStatFile("stat_descriptions.txt")
local function writeMods(outName, condFunc)
local out = io.open(outName, "w")
out:write('-- This file is automatically generated, do not edit!\n')
out:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n')
for modKey = 0, Mods.maxRow do
local mod = Mods[modKey]
if con... | mit |
djkamran021/BY | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-3.0 |
aqasaeed/spartaseed | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
rasolllll/tele.gold | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
siilaas/silas | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | agpl-3.0 |
emadni/Telelord- | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
facebokiii/Uproject | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
flipcoder/qor | templates/base/premake5.lua | 1 | 3253 | workspace("base")
targetdir("bin")
debugdir("bin")
configurations {"Debug", "Release"}
defines {
"META_SHARED",
"GLM_FORCE_CTOR_INIT",
"GLM_ENABLE_EXPERIMENTAL",
"GLM_FORCE_RADIANS",
--"QOR_NO_CAIRO",
--"QOR_NO_PYTHON"... | mit |
amir1213/aa | plugins/help.lua | 44 | 5047 | do
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 |
artynet/luci | protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua | 9 | 1065 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local netmod = luci.model.network
local _, p
for _, p in ipairs({"6in4", "6to4", "6rd"}) do
local proto = netmod:register_protocol(p)
function proto.get_i18n(self)
if p == "6in4" then
return luci.i18n.... | apache-2.0 |
pddthinh/android-vlc | vlc/share/lua/intf/test.lua | 11 | 1933 | function assert_url(result, protocol, username, password, host, port, path)
assert(result.protocol == protocol)
assert(result.username == username)
assert(result.password == password)
assert(result.host == host)
assert(result.port == port)
assert(result.path == path)
end
vlc.msg.inf... | gpl-2.0 |
sebastianlis/DesignPatterns-in-Lua-Using-CoronaSDK | State/PatternCraftState/classes/SpeedState.lua | 1 | 1206 | require "classes.constants.screen"
SpeedState={}
function SpeedState:new(siegeTank)
local this = display.newGroup()
local public = this
local private = {}
local siegeTank = siegeTank
this.current = "SpeedState"
this.damage = 0
this.canMove = true
this.color = {0, 0, 204}
function ... | mit |
churay/fxn | fxn/graph_t.lua | 1 | 7475 | local table_t = require( 'fxn.table_t' )
local struct = require( 'fxn.struct' )
local util = require( 'util' )
--[[ Constructor ]]--
local graph_t = struct( {},
'_nlabelsunique', false,
'_elabelsunique', false,
'_nodes', {},
'_edges', {labels={}, outgoing={}, incoming={}},
'_nlabels', table_t({}),
'_elabe... | gpl-2.0 |
ohoservices/remoteNodeMcu | rnm_mqtt.lua | 1 | 1401 | -- Oliver Horn
-- oliver.horn@ohoservices.de
-- (c) Copyright Oliver Horn 2015, 2016
rnmLog(RNM_TRACE, "rnm_mqtt.lua")
-- rnm_mqtt -> send/receive data to/from mqtt
function rnmMqtt(data, pubTopic, pubQos, pubRet)
local mq
if pubTopic==nil then pubTopic = MQTT_PUBTOPIC end
if pubQos==nil then pubQos = M... | apache-2.0 |
traissa/endls | newGamePlay.lua | 1 | 24682 | -----------------------------------------------------------------------------------------
--
-- level1.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local scene = composer.newScene()
-- include Corona's "physics" library
local p... | mit |
devlaith/DEVLAITH | plugins/HL-banhammer.lua | 3 | 13169 | local function pre_process(msg)
local data = load_data(_config.moderation.data)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Chec... | gpl-2.0 |
UnluckyNinja/PathOfBuilding | Export/minions.lua | 1 | 3530 | local modMap = { }
do
local lastMod
for line in io.lines("Minions/modmap.ini") do
local statName = line:match("^%[([^]]+)%]$")
if statName then
modMap[statName] = { }
lastMod = modMap[statName]
elseif line:match("^[^#].+") then
table.insert(lastMod, line)
end
end
end
local itemClassMap = {
[6] = "... | mit |
DevMoataz/Maestro | plugins/leavebot.lua | 2 | 1507 | --[[
_ _ _ _____ _____ ____ ____
/ \ / \ / \ | ____|___|_ _| /_\ \ / __ \ Đєⱴ 💀: @MaEsTrO_0
/ / \/ / \ / _ \ | _| / __| | | | |_\_/| | | | Đєⱴ 💀: @devmaestr0
/ / \ \/ \ \ / ___ \| |___\__ \ | | | | \ \| |__| | Đєⱴ ฿๏ͳ💀: @iqMaestroBot
/_/ \/ ... | gpl-2.0 |
akh00/kong | kong/plugins/datadog/statsd_logger.lua | 1 | 2360 | local ngx_socket_udp = ngx.socket.udp
local ngx_log = ngx.log
local table_concat = table.concat
local setmetatable = setmetatable
local NGX_ERR = ngx.ERR
local NGX_DEBUG = ngx.DEBUG
local statsd_mt = {}
statsd_mt.__index = statsd_mt
function statsd_mt:new(conf)
local sock = ngx_socket_udp()
sock:settimeout(conf.t... | apache-2.0 |
pchote/OpenRA | mods/cnc/maps/nod02b/nod02b.lua | 2 | 4046 | --[[
Copyright 2007-2021 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 |
akh00/kong | spec/03-plugins/20-hmac-auth/02-api_spec.lua | 1 | 6840 | local helpers = require "spec.helpers"
local cjson = require "cjson"
describe("Plugin: hmac-auth (API)", function()
local client, credential, consumer
setup(function()
helpers.prepare_prefix()
assert(helpers.start_kong())
client = helpers.admin_client()
end)
teardown(function()
if client then ... | apache-2.0 |
pins-ocs/OCP-tests | test-Dido/data/Dido_Data.lua | 1 | 4138 | --[[
/*-----------------------------------------------------------------------*\
| file: Dido_Data.lua |
| |
| version: 1.0 date 28/3/2020 |
| ... | gpl-2.0 |
MeGa-TeAm/megabot | bot/nod32bot.lua | 1 | 11992 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '2'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return... | gpl-2.0 |
Daniex0r/project-roleplay-rp | resources/system-aut/g_doors.lua | 1 | 2568 | doorCount = {[583] = 1, [574] = 1} -- 1 means two doors, 2 = 3 doors, etc. Tugs have two doors, hence.
controllableDoors = {
-- Type Pos # doors Controlled by seat Vehicles without that sort of stuff
--
-- Note: 0 can always control all the doors as he's in the driver seat.
--
{ "Maska", 0, 1, ... | gpl-2.0 |
BlubBlab/rom-bot | classes/party.lua | 2 | 18111 | include("pawn.lua");
include("player.lua");
local _timexx, _firsttimes, partyleader, leaderobj, leaderpawn, stop, healer, havewarden, _whispname
local function _heal()
for i,v in ipairs(partymemberpawn) do
player:target(partymemberpawn[i])
partymemberpawn[i]:updateHP()
partymemberpawn[i]:updateBuffs()
if par... | mit |
gitTerebi/OpenRA | mods/ra/maps/desert-shellmap/desert-shellmap.lua | 22 | 5274 | if DateTime.IsHalloween then
UnitTypes = { "ant", "ant", "ant" }
BeachUnitTypes = { "ant", "ant" }
ProxyType = "powerproxy.parazombies"
ProducedUnitTypes =
{
{ AlliedBarracks1, { "e1", "e3" } },
{ AlliedBarracks2, { "e1", "e3" } },
{ SovietBarracks1, { "ant" } },
{ SovietBarracks2, { "ant" } },
{ SovietB... | gpl-3.0 |
Sponk/NeoEditor | SDK/LuaApi/QuadTree.lua | 1 | 7278 | --- Author: Murii
-- references to common functions
local tremove = table.remove
-- quadrant names
local rdirs = { nw='se', sw='ne', ne='sw', se='nw' }
-- minimum cell size
local mincellsize = 8
-- some stats (optional)
local nobjects = 0
local nlivecells = 0
local ndeadcells = 0
-- internals
local root = nil
loca... | gpl-2.0 |
akh00/kong | spec/03-plugins/10-key-auth/02-access_spec.lua | 1 | 16621 | local helpers = require "spec.helpers"
local cjson = require "cjson"
local meta = require "kong.meta"
local utils = require "kong.tools.utils"
describe("Plugin: key-auth (access)", function()
local client
setup(function()
local anonymous_user = assert(helpers.dao.consumers:insert {
username = "no-body"
... | apache-2.0 |
larber/domoticz | scripts/lua_parsers/example_owm.lua | 37 | 1285 | -- Example of XML parser handling data with the following structure
-- Data are coming from the OpenWeatherMap API : See http://www.openweathermap.org/current
-- <current>
-- <city id="12345" name="Paris">
-- <coord lon="2.35" lat="48.85"/>
-- <country>FR</country>
-- <sun rise="2016-04-22T04:45:07" set="2016-... | gpl-3.0 |
amir1213/aa | plugins/lock_badword.lua | 59 | 1102 | local function run(msg, matches)
if msg.to.type == 'chat' then
if is_owner(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_badw'... | gpl-2.0 |
xanathar/lualinq | src/lualinq_terminators.lua | 1 | 4980 | -- ============================================================
-- TERMINATING METHODS
-- ============================================================
-- Return the first item or default if no items in the colelction
function _first(self, default)
if (#self.m_Data > 0) then
return self.m_Data[1]
else
return defa... | bsd-3-clause |
stephank/luci | applications/luci-coovachilli/luasrc/model/cbi/coovachilli_radius.lua | 79 | 1768 | --[[
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 |
akh00/kong | kong/plugins/response-ratelimiting/migrations/cassandra.lua | 6 | 1856 | return {
{
name = "2015-08-21_init_response-rate-limiting",
up = [[
CREATE TABLE IF NOT EXISTS response_ratelimiting_metrics(
api_id uuid,
identifier text,
period text,
period_date timestamp,
value counter,
PRIMARY KEY ((api_id, identifier, period_date, pe... | apache-2.0 |
nimaghorbani/telenima2 | bot/seedbot.lua | 1 | 9951 | 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 |
tudelft/chdkptp | lua/gui_tree.lua | 5 | 11472 | --[[
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 |
tudelft/chdkptp | lua/dngcli.lua | 4 | 21223 | --[[
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 |
dmccuskey/dmc-wamp | examples/dmc-wamp-subscribe/dmc_corona/dmc_wamp/types.lua | 6 | 11688 | --====================================================================--
-- dmc_corona/dmc_wamp/types.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2014-2015 David McCuskey
Permission is hereb... | mit |
VurtualRuler98/kswep2 | lua/entities/sent_kgrent_thermite.lua | 1 | 1410 | ENT.Type = "Anim"
ENT.Base = "sent_kgren_base"
ENT.PrintName = "Grenade"
ENT.Author = "VurtualRuler98"
ENT.Contact = "steam"
ENT.Purpose = "Getting more ammo!"
ENT.Instructions = "Spawn. Use. Reload."
ENT.Category = "Vurtual's base"
ENT.DetFragMagnitude="50"
ENT.DetFragRadius="512"
ENT.FragDamage=20
ENT.FragRad... | apache-2.0 |
asridharan/dcos | packages/adminrouter/extra/src/lib/resty/jwt-validators.lua | 11 | 15257 | local _M = {_VERSION="0.1.5"}
--[[
This file defines "validators" to be used in validating a spec. A "validator" is simply a function with
a signature that matches:
function(val, claim, jwt_json)
This function returns either true or false. If a validator needs to give more information on why it failed,
... | apache-2.0 |
codyroux/lean0.1 | tests/lua/ceq1.lua | 6 | 3216 | local env = get_environment()
assert(env:find_object("neq_elim"))
function show_ceqs(ceqs)
for i = 1, #ceqs do
print(ceqs[i][1], ceqs[i][2], is_permutation_ceq(ceqs[i][1]))
env:type_check(ceqs[i][2])
assert(is_ceq(env, nil, ceqs[i][1]))
end
end
function test_ceq(name, expected, is_perm)
lo... | apache-2.0 |
bahmrockk/configs | dotfiles/vim/bundle/vim-lua-ftplugin/misc/lua-ftplugin/complete.lua | 2 | 2560 | #!/usr/bin/env lua
--[[
Author: Peter Odding <peter@peterodding.com>
Last Change: July 6, 2014
URL: http://peterodding.com/code/vim/lua-ftplugin
This Lua script prints a few hundred lines of Vim script to standard output.
These lines are used by my Lua file type plug-in for the Vim text editor to
provide completion ... | gpl-2.0 |
cloudeleven/dotfiles | .hammerspoon/init.lua | 1 | 5112 | -- ShiftIt もどき
hs.window.animationDuration = 0
units = {
left50 = { x = 0.00, y = 0.00, w = 0.50, h = 1.00 },
right50 = { x = 0.50, y = 0.00, w = 0.50, h = 1.00 },
top50 = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 },
bottom50 = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 },
left70 ... | mit |
UnluckyNinja/PathOfBuilding | Data/3_0/Skills/act_int.lua | 1 | 189976 | -- This file is automatically generated, do not edit!
-- Path of Building
--
-- Active Intelligence skill gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["Arc"] = {
name = "Arc",
gemTags = {
intelligence = true,
active_skill = true,
spell = true,
chaining = true,
l... | mit |
larber/domoticz | scripts/dzVents/runtime/device-adapters/Adapters.lua | 5 | 3937 | local genericAdapter = require('generic_device')
local deviceAdapters = {
'airquality_device',
'alert_device',
'ampere_1_phase_device',
'ampere_3_phase_device',
'barometer_device',
'counter_device',
'custom_sensor_device',
'distance_device',
'electric_usage_device',
'evohome_device',
'gas_device',
'group_d... | gpl-3.0 |
artynet/luci | modules/luci-base/luasrc/sgi/cgi.lua | 81 | 1688 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
exectime = os.clock()
module("luci.sgi.cgi", package.seeall)
local ltn12 = require("luci.ltn12")
require("nixio.util")
require("luci.http")
require("luci.sys")
require("luci.dispatcher")
-- Limited source to av... | apache-2.0 |
Nostrademous/Dota2-WebAI | debug.lua | 1 | 2659 | -------------------------------------------------------------------------------
--- AUTHOR: Nostrademous
--- GITHUB REPO: https://github.com/Nostrademous/Dota2-WebAI
-------------------------------------------------------------------------------
local X = {}
function X.myPrint(...)
local args = {...}
if ... | mit |
Sponk/NeoEditor | SDK/LuaApi/Testing/Tests.lua | 1 | 3982 |
function assertVectorEquals(vec1, vec2, margin)
for i = 1, #vec1, 1 do
assertAlmostEquals(vec1[i], vec2[i], margin)
end
end
Test3DSDK = {}
Test2DSDK = {}
TestModules = {}
require("NeoEngine")
require("NeoCore")
require("NeoGui")
function Test3DSDK:TestNeoCore()
local vect2 = NeoCore.Vector2(15, 13)
lo... | gpl-2.0 |
Mephostopilis/lua | luafilesystem/test.lua | 3 | 6303 | #!/usr/bin/env lua5.1
local tmp = "/tmp"
local sep = string.match (package.config, "[^\n]+")
local upper = ".."
local lfs = require"lfs"
print (lfs._VERSION)
io.write(".")
io.flush()
function attrdir (path)
for file in lfs.dir(path) do
if file ~= "." and file ~= ".." then
... | apache-2.0 |
aqasaeed/mamad | 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 |
BlubBlab/rom-bot | classes/camera.lua | 1 | 3760 | CCamera = class(
function(self)
self.Address = memoryReadUIntPtr(getProc(), addresses.staticbase_char, addresses.camPtr_offset) or 0
self.XUVec = 0.0;
self.YUVec = 0.0;
self.ZUVec = 0.0;
self.X = 0;
self.Y = 0;
self.Z = 0;
self.XFocus = 0;
self.YFocus = 0;
self.ZFocus = 0;
sel... | mit |
spoconnor/ElixirMessagingServer | EclipseWorkspace/LuaClient/runtime/linux/Resources/Cocos2dConstants.lua | 1 | 14103 | cc = cc or {}
cc.SPRITE_INDEX_NOT_INITIALIZED = 0xffffffff
cc.TMX_ORIENTATION_HEX = 0x1
cc.TMX_ORIENTATION_ISO = 0x2
cc.TMX_ORIENTATION_ORTHO = 0x0
cc.Z_COMPRESSION_BZIP2 = 0x1
cc.Z_COMPRESSION_GZIP = 0x2
cc.Z_COMPRESSION_NONE = 0x3
cc.Z_COMPRESSION_ZLIB = 0x0
cc.BLEND_DST = 0x303
cc.BLEND_SRC = 0x1
... | mit |
stephank/luci | libs/core/luasrc/model/firewall.lua | 13 | 11139 | --[[
LuCI - Firewall model
Copyright 2009 Jo-Philipp Wich <xm@subsignal.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 applica... | apache-2.0 |
spoconnor/ElixirMessagingServer | EclipseWorkspace/LuaClient/runtime/win32/Deprecated.lua | 13 | 52861 | require "Cocos2d.lua"
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of CCDirector will be deprecated,begin
local CCDirectorDeprecated = { }
function CCDirectorDeprecated.sharedDirector()... | mit |
ld-test/lua-llthreads2-compat | test/test_llthreads.lua | 8 | 2184 | -- Copyright (c) 2011 by Robert G. Jakabosky <bobby@sharedrealm.com>
--
-- 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 u... | mit |
aqasaeed/mamad | plugins/channels.lua | 300 | 1680 | -- 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 |
larber/domoticz | scripts/dzVents/runtime/integration-tests/stage1.lua | 5 | 29936 | local log
local dz
local err = function(msg)
log(msg, dz.LOG_ERROR)
end
local tstMsg = function(msg, res)
print('Stage: 1, ' .. msg .. ': ' .. tostring(res and 'OK' or 'FAILED'))
end
local expectEql = function (attr, test, marker)
if (attr ~= test) then
local msg = tostring(attr) .. '~=' .. tostring(test)
if ... | gpl-3.0 |
akh00/kong | kong/plugins/correlation-id/handler.lua | 1 | 2040 | -- Copyright (C) Mashape, Inc.
local BasePlugin = require "kong.plugins.base_plugin"
local req_set_header = ngx.req.set_header
local req_get_headers = ngx.req.get_headers
local uuid = require("kong.tools.utils").uuid
local CorrelationIdHandler = BasePlugin:extend()
local worker_uuid
local worker_counter
local fmt =... | apache-2.0 |
chelog/brawl | addons/brawl-weapons/lua/cw/shared/attachments/md_aimpoint.lua | 1 | 1620 | local att = {}
att.name = "md_aimpoint"
att.displayName = "Aimpoint"
att.displayNameShort = "Aimpoint"
att.aimPos = {"AimpointPos", "AimpointAng"}
att.FOVModifier = 20
att.isSight = true
att.colorType = CustomizableWeaponry.colorableParts.COLOR_TYPE_SIGHT
att.statModifiers = {OverallMouseSensMult = -0.07}
if... | gpl-3.0 |
dismantl/luci-0.12 | modules/base/luasrc/model/firewall.lua | 84 | 11156 | --[[
LuCI - Firewall model
Copyright 2009 Jo-Philipp Wich <xm@subsignal.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 applica... | apache-2.0 |
Noltari/luci | modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua | 74 | 1261 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.mini.index", package.seeall)
function index()
local root = node()
if not root.lock then
root.target = alias("mini")
root.index =... | apache-2.0 |
eagle14/Snippy | plugins/id.lua | 355 | 2795 | local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, resu... | gpl-2.0 |
299299/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/custom.lua | 25 | 1388 |
function extract_code(fn,s)
local code = ""
if fn then
code = '\n$#include "'..fn..'"\n'
end
s= "\n" .. s .. "\n" -- add blank lines as sentinels
local _,e,c,t = strfind(s, "\n([^\n]-)SCRIPT_([%w_]*)[^\n]*\n")
while e do
t = strlower(t)
if t == "bind_begin" then
_,e,c = strfind(s,"(.-)\n[^\n]... | mit |
soundsrc/premake-core | modules/gmake2/gmake2_csharp.lua | 12 | 7771 | --
-- gmake2_csharp.lua
-- Generate a C# project makefile.
-- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project
--
local p = premake
local gmake2 = p.modules.gmake2
gmake2.cs = {}
local cs = gmake2.cs
local project = p.project
local config = p.config
local filec... | bsd-3-clause |
facebokiii/arman | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.