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 |
|---|---|---|---|---|---|
cenouro/dotfiles | lua/user/nvim-lspconfig.lua | 1 | 2480 | -- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)... | unlicense |
anshkumar/yugioh-glaze | assets/script/c76214441.lua | 3 | 1763 | --ライフ・コーディネイター
function c76214441.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76214441,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG... | gpl-2.0 |
Julzso23/upwardsjourney | resources/lua/controls.lua | 1 | 3387 | jpm.controls = {}
jpm.controls.delay = 0.3
jpm.controls.timer = jpm.controls.delay
function jpm.controls.keyboard(dt)
if jpm.controls.timer < 0.5 then
jpm.controls.timer = jpm.controls.timer + dt
end
--Make the game close with alt+f4
if love.keyboard.isDown("lalt") and love.keyboard.isDown("f4") then
... | apache-2.0 |
anshkumar/yugioh-glaze | assets/script/c73347079.lua | 3 | 1793 | --RR-フォース・ストリクス
function c73347079.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c733... | gpl-2.0 |
rickyHong/nn_lib_torch | SpatialUpSamplingNearest.lua | 6 | 1974 | local SpatialUpSamplingNearest, parent = torch.class('nn.SpatialUpSamplingNearest', 'nn.Module')
--[[
Applies a 2D up-sampling over an input image composed of several input planes.
The upsampling is done using the simple nearest neighbor technique.
The Y and X dimensions are assumed to be the last 2 tensor di... | bsd-3-clause |
anshkumar/yugioh-glaze | assets/script/c16906241.lua | 3 | 1117 | --セイクリッド・レスカ
function c16906241.initial_effect(c)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16906241,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c16906241.sptg)
e2:SetOperatio... | gpl-2.0 |
Arashbrsh/kings-BOT | 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 |
assassinboy208/eagleTG | 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 |
hadirahimi1380/botahriman | 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 |
anshkumar/yugioh-glaze | assets/script/c87649699.lua | 9 | 1145 | --ナチュル・ラグウィード
function c87649699.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87649699,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_DRAW)
e1:SetCond... | gpl-2.0 |
hbomb79/DynaCode | src/Classes/NodeUtil/NodeScrollContainer.lua | 2 | 12795 | abstract class "NodeScrollContainer" extends "NodeContainer" {
yOffset = 0;
xOffset = 0;
cache = {
nodeHeight = 0;
nodeWidth = 0;
xScrollPosition = 0;
yScrollPosition = 0;
xScrollSize = 0;
yScrollSize = 0;
xDisplayPosition = 0;
yDisplayPosi... | mit |
freifunk-gluon/luci | 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 |
ara8586/b.v4 | plugins/banhammer.lua | 1 | 37084 | local function pre_process(msg)
if msg.to.type ~= 'pv' then
chat = msg.to.id
user = msg.from.id
local function check_newmember(arg, data)
test = load_data(_config.moderation.data)
lock_bots = test[arg.chat_id]['settings']['lock_bots']
local hash = "gp_lang:"..arg.chat_id
local lang = redis:get(hash)
if data... | gpl-3.0 |
PocoCraftSource/FiveNightsatFreddysGMod | gamemode/spawnmenu/toolpanel.lua | 1 | 2093 |
include( 'controlpanel.lua' )
local PANEL = {}
AccessorFunc( PANEL, "m_TabID", "TabID" )
--[[---------------------------------------------------------
Name: Paint
-----------------------------------------------------------]]
function PANEL:Init()
self.List = vgui.Create( "DCategoryList", self )
self.List:D... | gpl-2.0 |
anshkumar/yugioh-glaze | assets/script/c77841719.lua | 3 | 1810 | --ヴェルズ・コッペリアル
function c77841719.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:Set... | gpl-2.0 |
BooM-amour/neweagle | plugins/admin.lua | 60 | 6680 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
sjznxd/lc-20130302 | applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua | 74 | 3766 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 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
$Id$
]]--
lo... | apache-2.0 |
anshkumar/yugioh-glaze | assets/script/c32559361.lua | 6 | 2975 | --CNo.9 天蓋妖星カオス・ダイソン・スフィア
function c32559361.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,3)
c:EnableReviveLimit()
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32559361,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarg... | gpl-2.0 |
anshkumar/yugioh-glaze | assets/script/c1639384.lua | 3 | 2206 | --神竜騎士フェルグラント
function c1639384.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1639384,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRan... | gpl-2.0 |
TurBoss/Zero-K-Infrastructure | ZeroKLobby_NET4.0/Benchmarker/Benchmarks/Configs/ZKL_default/LuaUI/Config/ZK_order.lua | 12 | 4858 | -- Widget Order List (0 disables a widget)
return {
["AA Command Helper"] = 14,
AdvPlayersList = 0,
["Ally Resource Bars"] = 0,
AllyCursors = 59,
AnimatorGUI = 0,
["Attack AoE"] = 50,
["Attack Warning"] = 55,
["Auto First Build Facing"] = 15,
["Auto Group"] = 53,
["Auto Patrol Nanos"] = 16,
["Au... | gpl-3.0 |
zwhfly/openwrt-luci | modules/niu/luasrc/controller/niu/traffic.lua | 49 | 1218 | --[[
LuCI - Lua Development Framework
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local... | apache-2.0 |
exch-bms2/beatoraja | skin/default/skinselect/skinselectmain.lua | 1 | 12950 |
local function append_all(list, list1)
for i, v in ipairs(list1) do
table.insert(list, v)
end
end
local property = {
}
local filepath = {
}
local header = {
type = 9,
name = "beatoraja default (lua)",
w = 1280,
h = 720,
scene = 3000,
input = 500,
fadeout = 500,
property = property,
filepath = filepath... | gpl-3.0 |
anshkumar/yugioh-glaze | assets/script/c5050644.lua | 3 | 2668 | --アロマガーデン
function c5050644.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--recover 1
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_I... | gpl-2.0 |
freifunk-gluon/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk/dialzones.lua | 91 | 3529 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 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
$Id: trunks.l... | apache-2.0 |
zhaoxin54430/zhaoxin_test | src_routing/bird-openwrt/bird4-openwrt/src/model/overview.lua | 7 | 2745 | --[[
Copyright (C) 2014 - Eloi Carbó Solé (GSoC2014)
BGP/Bird integration with OpenWRT and QMP
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) a... | gpl-2.0 |
anshkumar/yugioh-glaze | assets/script/c5373478.lua | 5 | 1816 | --サイバー・ドラゴン・ツヴァイ
function c5373478.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c5373478.atkcon)
e1:SetValue(300)
c:RegisterEffect(e1)
--change code... | gpl-2.0 |
mikeller/nodemcu-firmware | lua_modules/redis/redis.lua | 86 | 2621 | ------------------------------------------------------------------------------
-- Redis client module
--
-- LICENCE: http://opensource.org/licenses/MIT
-- Vladimir Dronnikov <dronnikov@gmail.com>
--
-- Example:
-- local redis = dofile("redis.lua").connect(host, port)
-- redis:publish("chan1", foo")
-- redis:subscribe("... | mit |
anshkumar/yugioh-glaze | assets/script/c95286165.lua | 3 | 1816 | --融合解除
function c95286165.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c95286165.target)
e1:SetOperation(c95286165.activate)
... | gpl-2.0 |
adan830/UpAndAway | code/brains/gummybearbrain.lua | 2 | 3200 | BindGlobal()
local CFG = TheMod:GetConfig()
require "behaviours/chaseandattack"
require "behaviours/runaway"
require "behaviours/wander"
require "behaviours/doaction"
require "behaviours/avoidlight"
require "behaviours/panic"
require "behaviours/attackwall"
require "behaviours/useshield"
local GummyBear... | gpl-2.0 |
fmidev/himan | himan-scripts/LVP.lua | 1 | 1328 | logger:Info("Calculating LVP (Low Visibility Procedures) probability")
local Missing = missingf
local probLVP = {}
local producer = configuration:GetSourceProducer(0)
local ensSize = tonumber(radon:GetProducerMetaData(producer, "ensemble size"))
if not ensSize then
logger.Error("Ensemble size not found from datab... | mit |
Tiger66639/premake-core | tests/actions/vstudio/vc2010/test_globals.lua | 2 | 4633 | --
-- tests/actions/vstudio/vc2010/test_globals.lua
-- Validate generation of the Globals property group.
-- Copyright (c) 2011-2014 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_vs2010_globals")
local vc2010 = premake.vstudio.vc2010
--
-- Setup
--
local sln, prj
... | bsd-3-clause |
anshkumar/yugioh-glaze | assets/script/c68670547.lua | 9 | 1286 | --闇竜の黒騎士
function c68670547.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68670547,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c686... | gpl-2.0 |
Dith3r/FrameworkBenchmarks | frameworks/Lua/lapis/web.lua | 72 | 5957 | local lapis = require("lapis")
local db = require("lapis.db")
local Model
do
local _obj_0 = require("lapis.db.model")
Model = _obj_0.Model
end
local config
do
local _obj_0 = require("lapis.config")
config = _obj_0.config
end
local insert
do
local _obj_0 = table
insert = _obj_0.insert
end
local sort
do
loc... | bsd-3-clause |
shirat74/sile | lua-libraries/std/tree.lua | 6 | 6900 | --[[--
Tree container.
Derived from @{std.container}, and inherits Container's metamethods.
Note that Functions listed below are only available from the Tree
prototype return by requiring this module, because Container objects
cannot have object methods.
@classmod std.tree
@see std.container
]]
local base ... | mit |
anshkumar/yugioh-glaze | assets/script/c38450736.lua | 3 | 2921 | --甲虫装機 ウィーグ
function c38450736.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(38450736,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c38450736.eqtg)
e1:SetOperation(c38450736.eqop)
c:Re... | gpl-2.0 |
anshkumar/yugioh-glaze | assets/script/c89397517.lua | 3 | 2701 | --レジェンド・オブ・ハート
function c89397517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,89397517+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c89397517.cost)
e1:SetTarget(c893975... | gpl-2.0 |
bullno1/MoaiNao | sample-project/src/main.lua | 1 | 1317 | print("Hai, can haz cheeze burgerz???")
local viewport = MOAIViewport.new ()
local devWidth, devHeight = MOAIGfxDevice.getViewSize()
viewport:setSize(devWidth, devHeight)
viewport:setScale(devWidth, -devHeight)
viewport:setOffset(-1, 1)
local layer = MOAILayer2D.new ()
layer:setViewport(viewport)
MOAISim.pushRenderPas... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/ActionTimelineNode.lua | 11 | 1809 |
--------------------------------
-- @module ActionTimelineNode
-- @extend Node
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#ActionTimelineNode] getRoot
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [paren... | mit |
Tatuy/uatibia-www | other/Znote AAC/LUA/TFS_10/talkaction shopsystem/znoteshop.lua | 2 | 3160 | -- Znote Shop v1.0 for Znote AAC on TFS 1.1
function onSay(player, words, param)
local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks.
local cooldown = 15 -- in seconds.
if player:getStorageValue(storage) <= os.time() then
player:setStorageValue(storage, os.time(... | apache-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/libzq/auto_buildings/api/ZQDeviceInfo.lua | 2 | 4827 |
--------------------------------
-- @module ZQDeviceInfo
-- @parent_module zq
--------------------------------
--
-- @function [parent=#ZQDeviceInfo] cpu_usage
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [parent=#ZQDeviceInfo] device_uui... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[web]/irc/scripts/loading.lua | 4 | 10921 | ---------------------------------------------------------------------
-- Project: irc
-- Author: MCvarial
-- Contact: mcvarial@gmail.com
-- Version: 1.0.0
-- Date: 31.10.2010
---------------------------------------------------------------------
local adTimer
------------------------------------
-- Loading
-----------... | mit |
shadoalzupedy/shadow | plugins/banhammer1.lua | 2 | 16468 | --[[
#
#ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#:((
# For More Information ....!
# Developer : Aziz < @TH3_GHOST >
# our channel: @DevPointTeam
# Version: 1.1
#:))
#ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#
]]
lo... | gpl-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/script/cocos2d/OpenglConstants.lua | 100 | 27127 |
if not gl then return end
gl.GCCSO_SHADER_BINARY_FJ = 0x9260
gl._3DC_XY_AMD = 0x87fa
gl._3DC_X_AMD = 0x87f9
gl.ACTIVE_ATTRIBUTES = 0x8b89
gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a
gl.ACTIVE_PROGRAM_EXT = 0x8259
gl.ACTIVE_TEXTURE = 0x84e0
gl.ACTIVE_UNIFORMS = 0x8b86
gl.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87... | mit |
Innixma/dex | packs/Dex1/Scripts/defaultLevels/base_2.lua | 2 | 1219 | -- include useful files
execScript("utils.lua")
execScript("common.lua")
execScript("commonpatterns.lua")
-- this function adds a pattern to the timeline based on a key
function addPattern(mKey)
if mKey == 0 then cWallEx(math.random(0, getSides()), math.random(0, 0)) wait(getPerfectDelay(THICKNESS) * 6)
end
end
--... | mit |
Shell64/LuaWebserver2 | Bin/Windows_x64/socket/socket/ftp.lua | 144 | 9120 | -----------------------------------------------------------------------------
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
-----------------------------------------------------------------------------
-------------------... | lgpl-2.1 |
opentechinstitute/luci | modules/admin-full/luasrc/model/cbi/admin_system/system.lua | 37 | 5651 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 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://w... | apache-2.0 |
OTRD5k/Free-D | Plugin/Main/ClassGetter/Libraries.lua | 1 | 3335 | local module = {}
module.float2hex = function(n)
if n == 0.0 then return 0.0 end
local sign = 0
if n < 0.0 then
sign = 0x80
n = -n
end
local mant, expo = math.frexp(n)
local hext = {}
if mant ~= mant then
hext[#hext+1] = string.char(0xFF, 0x88, 0x00,... | gpl-2.0 |
sumefsp/zile | lib/zile/FileString.lua | 1 | 8222 | -- Copyright (c) 2011-2014 Free Software Foundation, Inc.
--
-- This file is part of GNU Zile.
--
-- 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, or (at your option)
-- any ... | gpl-3.0 |
luanorlandi/Swift-Space-Battle | src/main.lua | 2 | 1067 | --[[
--------------------------------------------------------------------------------
This is a free game developed by Luan Orlandi in project of scientific research
at ICMC-USP, guided by Leandro Fiorini Aurichi and supported by CNPq
For more information, access https://github.com/luanorlandi/Swift-Space-Battle
----... | gpl-3.0 |
lizh06/premake-core | tests/tools/test_snc.lua | 16 | 3478 | --
-- tests/test_snc.lua
-- Automated test suite for the SNC toolset interface.
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
--
local suite = test.declare("tools_snc")
local snc = premake.tools.snc
--
-- Setup/teardown
--
local wks, prj, cfg
function suite.setup()
wks, prj = test.createW... | bsd-3-clause |
ld-test/hotswap | src/hotswap/ev.lua | 11 | 1130 | local posix = require "posix"
local ev = require "ev"
local xxhash = require "xxhash"
local Hotswap = getmetatable (require "hotswap")
local Ev = {}
function Ev.new (t)
return Hotswap.new {
new = Ev.new,
observe = Ev.observe,
loop = t and t.loop or ev.Loop.default,
observed = {... | mit |
maxrio/packages981213 | net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interfaceconfig.lua | 4 | 7228 | -- ------ extra functions ------ --
function interfaceCheck()
metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. arg[1] .. ".metric"))
if metricValue == "" then -- no metric
errorNoMetric = 1
else -- if metric exists create list of interface metrics to compare against for duplicates
uci.cursor()... | gpl-2.0 |
HEYAHONG/nodemcu-firmware | lua_examples/pipeutils.lua | 6 | 2213 | -- A collection of pipe-based utility functions
-- A convenience wrapper for chunking data arriving in bursts into more sizable
-- blocks; `o` will be called once per chunk. The `flush` method can be used to
-- drain the internal buffer. `flush` MUST be called at the end of the stream,
-- **even if the stream is a m... | mit |
ecnumjc/NAMAS | summary/beam_search.lua | 9 | 7932 | --
-- 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: Alex... | bsd-3-clause |
satanevil/copy-creed | plugins/inpm.lua | 243 | 3007 | 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 |
robbie-cao/mooncake | mos-pub.lua | 1 | 1079 | #!/usr/bin/env lua
local posix = require("posix")
mqtt = require("mosquitto")
client = mqtt.new()
local BROKER = "test.muabaobao.com"
local UPDATE_TOPIC_NAME = "/mua/sys/upgrade"
local TEST_UPDATE_TOPIC_NAME = "/mua/test/upgrade"
local MSM_TOPIC_DOMAIN = "/mua/msm/"
local MSM_DEFAULT_TOPIC_... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/script/framework/extends/UIPageView.lua | 57 | 1384 |
--[[
Copyright (c) 2011-2014 chukong-inc.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 use, copy, modify, merge, publish, di... | mit |
ncarlson/eiga | runtime/modules/image/image.lua | 1 | 1176 | -- Copyright (C) 2012 Nicholas Carlson
--
-- 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, publi... | mit |
cyberz-eu/octopus | extensions/core/src/template.lua | 1 | 1324 | local exception = require "exception"
local eval = require "eval"
local parse = require "parse"
package.loaded.TEMPLATES = {}
local function configuration (templateName)
local TEMPLATES = package.loaded.TEMPLATES
local octopusHostDir = ngx.var.octopusHostDir
if TEMPLATES[octopusHostDir] then
return TEMPLATES[oc... | bsd-2-clause |
rderimay/Focus-Points | focuspoints.lrdevplugin/FocusPointPrefs.lua | 2 | 1339 | --[[
Copyright 2016 JWhizzbang Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... | apache-2.0 |
shadoalzupedy/shadow | plugins/anti_spam.lua | 191 | 5291 | --An empty table for solving multiple kicking problem(thanks to @topkecleon )
kicktable = {}
do
local TIME_CHECK = 2 -- seconds
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id == our_id then
return msg
end
-- Save... | gpl-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/NavMeshTest/NavMeshTest.lua | 6 | 15269 | local AgentUserData =
{
time = 0
}
local function jump(v1, v2, height, t)
local out = {}
out.x = v1.x + t * (v2.x - v1.x)
out.y = v1.y + t * (v2.y - v1.y)
out.z = v1.z + t * (v2.z - v1.z)
out.y = out.y + height * math.sin(math.pi * t)
return out
end
local actionManager = cc.Director:getIns... | mit |
opentechinstitute/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-format.lua | 80 | 3636 | --[[
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 |
opentechinstitute/luci | applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua | 78 | 1344 | --[[
Luci configuration model for statistics - collectd dns 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 a... | apache-2.0 |
JarnoVgr/Mr.Green-MTA-Resources | resources/[gameplay]/gcshop/horns/horns_c.lua | 1 | 29859 | local screenWidth, screenHeight = guiGetScreenSize()
downloadHornList = {}
hornsTable = {
[1] = "Birdo-geluidje",
[2] = "Boo-gebulder",
[3] = "Come on! - Wario",
[4] = "Dry Bones-gegiechel",
[5] = "Hatsjwao! Oh sorry.. - Luigi",
[6] = "Hey Stinky! - Mario",
[7] = "Mushroom! - Toadette",
... | mit |
luigiScarso/luatexjit | source/texk/web2c/luatexdir/luazlib/test_zlib.lua | 3 | 3016 | -- $Id: test_zlib.lua,v 1.3 2004/07/22 19:10:47 tngd Exp $
-- zlib = loadlib("./lzlib.so", "luaopen_zlib")()
local function line(header, c)
header = header or ''
c = c or '-'
print(string.rep(string.sub(c, 1, 1), 78 - string.len(header))..header)
end
local function ipart(value)
return value - math.mo... | gpl-2.0 |
Frenzie/koreader-base | spec/unit/koptcontext_spec.lua | 3 | 8613 | local ffi = require("ffi")
local KOPTContext = require("ffi/koptcontext")
local mupdf = require("ffi/mupdf")
local k2pdfopt = ffi.load("libs/libk2pdfopt.so.2")
local sample_pdf = "spec/base/unit/data/Alice.pdf"
local paper_pdf = "spec/base/unit/data/Paper.pdf"
describe("KOPTContext module", function()
local sampl... | agpl-3.0 |
AliKhodadad/zed-spam | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
ioiasff/khp | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
ashkanpj/fire | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
luigiScarso/luatexjit | source/texk/web2c/luatexdir/dynasm/dasm_ppc.lua | 15 | 37064 | ------------------------------------------------------------------------------
-- DynASM PPC module.
--
-- Copyright (C) 2005-2012 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _in... | gpl-2.0 |
ctfuckme/asasasas | plugins/id.lua | 13 | 2706 | 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 |
shadoalzupedy/shadow | plugins/lock_fwd.lua | 11 | 1683 | --[[
#
#ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#:((
# For More Information ....!
# Developer : Aziz < @TH3_GHOST >
# our channel: @DevPointTeam
# Version: 1.1
#:))
#ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#
]]
do... | gpl-2.0 |
robbie-cao/mooncake | uvt.lua | 1 | 1526 | local uv = require('luv')
-- Create a handle to a uv_timer_t
local timer = uv.new_timer()
local f = function ()
-- timer here is the value we passed in before from new_timer.
print ("Awake!")
end
--[[
-- This will wait 1000ms and then continue inside the callback
timer:start(1000, 0, f)
--]]
-- Create a ne... | mit |
Zefiros-Software/ZPM | src/manifest/manifests.lua | 1 | 2957 | --[[ @cond ___LICENSE___
-- Copyright (c) 2017 Zefiros Software.
--
-- 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, ... | mit |
jaequery/cmd-key-happy | lua-5.1.4/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | mit |
TyRoXx/lua-with-cmake | lua51/lua-5.1.5/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | mit |
cyberz-eu/octopus | extensions/baseline/src/BaselineHtmlTemplate.lua | 1 | 1374 | return [[
<!DOCTYPE html>
<html lang="en">
<head>
<title id="title">{{title}}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="{{description}}" />
<meta name="keywords" content="{{keywords}}" />
<meta name="author" content="{{author}}">... | bsd-2-clause |
lizh06/premake-core | tests/actions/vstudio/vc2010/test_filters.lua | 6 | 3772 | --
-- tests/actions/vstudio/vc2010/test_filters.lua
-- Validate generation of file filter blocks in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2011-2014 Jason Perkins and the Premake project
--
local suite = test.declare("vs2010_filters")
local vc2010 = premake.vstudio.vc2010
--
-- Setup/teardo... | bsd-3-clause |
LuaDist2/oil | lua/loop/collection/UnorderedArray.lua | 12 | 1495 | --------------------------------------------------------------------------------
---------------------- ## ##### ##### ###### -----------------------
---------------------- ## ## ## ## ## ## ## -----------------------
---------------------- ## ## ## ## ## ###### --------------------... | mit |
DEKHTIARJonathan/BilletterieUTC | badgingServer/Install/swigwin-3.0.7/Examples/lua/exception/runme.lua | 2 | 2192 | -- file: example.lua
---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)()
else
-- lua 5.1 does
require('example')
end
-- throw a lot of exceptions:
-- you m... | apache-2.0 |
JarnoVgr/Mr.Green-MTA-Resources | resources/[web]/interchat/receive.lua | 2 | 5259 | ----------------------------------------------
-- Receive.lua --
-- Respond to requests from other servers --
----------------------------------------------
-----------------
-- F2 redirect --
-----------------
local joiningSerials = {}
function playerRedirect ( serial, playtime, tick, hoursPlayed )
joinin... | mit |
youssef-emad/shogun | tests/integration/lua_modular/generator.lua | 21 | 1204 | package.path = package.path .. ";../../../src/interfaces/lua_modular/?.lua;"
package.cpath = package.cpath .. ";../../../src/interfaces/lua_modular/?.so;/usr/local/lib/?.so"
require("lfs")
example_dir = '../../examples/undocumented/lua_modular'
test_dir = '../../../testsuite/tests'
blacklist = {"load.lua", "MatrixTes... | gpl-3.0 |
neftalimich/YGOPro_AI_Fluffal | ai/decks/Fluffal/FluffalBattle.lua | 1 | 13237 | ------------------------
-------- BATTLE --------
------------------------
FluffalAtt={
39246582, -- Fluffal Dog
13241004, -- Fluffal Penguin
73240432, -- Edge Imp Cotton Eater
97567736, -- Edge Imp Tomahawk
91034681, -- Frightfur Daredevil
80889750, -- Frightfur Sabre-Tooth
40636712, -- Frightfur Kraken
10383554, -- ... | mit |
mobarski/sandbox | scite/old/wscite_zzz/lexers/notused/forth.lua | 3 | 1829 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
-- Forth LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'forth'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments.
local line_c... | mit |
neale/CS-program | 325-Algorithms/project3/lin-regression.lua | 1 | 2133 | -- LinearRegression.lua
-- define class LinearRegression
-- torch libraries
require 'nn'
require 'optim'
-- local libraries
require 'Trainer'
require 'Validations'
do
local LinearRegression = torch.class('LinearRegression')
function LinearRegression:__init(inputs, targets,
... | unlicense |
hussian1997/bot_Iraq1997 | libs/serpent.lua | 656 | 7877 | local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License
local c, d = "Paul Kulchenko", "Lua serializer and pretty printer"
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'}
local badtype = {thread = true, userdata = true, cdata = true}
lo... | gpl-2.0 |
speedduck/Minetest-obsidian-tools | init.lua | 1 | 2365 | minetest.register_tool("obsidiantools:sword_obsidian", {
description = "Obsidian Sword",
inventory_image = "obsidiantools_sword_obsidian.png",
tool_capabilities = {
full_punch_interval = 0.8,
max_drop_level=1,
groupcaps={
snappy={times={[1]=2.2, [2]=1.1, [3]=0.35}, uses=40, maxlevel=2}
},
damage_groups ... | gpl-3.0 |
darkdukey/sdkbox-facebook-sample-v2 | samples/Lua/TestLua/Resources/luaScript/TouchesTest/Paddle.lua | 4 | 1493 | require "extern"
require "luaScript/VisibleRect"
Paddle = class("Paddle", function(texture)
return CCSprite:createWithTexture(texture)
end)
Paddle.__index = Paddle
local kPaddleStateGrabbed = 0
local kPaddleStateUngrabbed = 1
Paddle.m_state = kPaddleStateGrabbed
function Paddle:rect()
local s = self:getT... | mit |
youssef-emad/shogun | examples/undocumented/lua_modular/kernel_comm_ulong_string_modular.lua | 21 | 1367 | require 'modshogun'
require 'load'
traindat = load_dna('../data/fm_train_dna.dat')
testdat = load_dna('../data/fm_test_dna.dat')
parameter_list = {{traindat,testdat,3,0,false},{traindat,testdat,4,0,false}}
function kernel_comm_ulong_string_modular (fm_train_dna,fm_test_dna, order, gap, reverse)
--charfeat=modshogun... | gpl-3.0 |
hussian1997/bot_Iraq1997 | plugins/filter.lua | 8 | 3262 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY(@AHMED_ALOBIDE) ▀▄ ▄▀
▀▄ ▄▀ BY(@hussian_9) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄▀... | gpl-2.0 |
romanchyla/nodemcu-firmware | lua_modules/lm92/lm92.lua | 19 | 5241 | -- ******************************************************
-- LM92 module for ESP8266 with nodeMCU
--
-- Written by Levente Tamas <levente.tamas@navicron.com>
--
-- modify by Garberoglio Leonardo <leogarberoglio@gmail.com>
--
-- GNU LGPL, see https://www.gnu.org/copyleft/lesser.html
-- *********************************... | mit |
lizh06/premake-core | tests/actions/make/cs/test_response.lua | 7 | 1976 | --
-- tests/actions/make/cs/test_response.lua
-- Validate the list of objects for a response file used by a makefile.
-- Copyright (c) 2009-2013 Jason Perkins and the Premake project
--
local suite = test.declare("make_cs_response")
local make = premake.make
--
-- Setup
--
local wks, prj
function suite.setup()... | bsd-3-clause |
mahdib9/89 | plugins/rss.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
UB12/y_r | plugins/rss.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
aminaleahmad/merbots | plugins/rss.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
Telecat-full/-Telecat-Full | plugins/Welcome.lua | 114 | 3529 | 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 |
sumefsp/zile | lib/zile/search.lua | 1 | 6365 | -- Search and replace functions
--
-- Copyright (c) 2010-2014 Free Software Foundation, Inc.
--
-- This file is part of GNU Zile.
--
-- 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 ver... | gpl-3.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/PointLight.lua | 11 | 1236 |
--------------------------------
-- @module PointLight
-- @extend BaseLight
-- @parent_module cc
--------------------------------
-- get or set range
-- @function [parent=#PointLight] getRange
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function... | mit |
TheAgonist/NRAdmin | lstm2/util/CharSplitLMMinibatchLoader.lua | 1 | 9038 |
-- Modified from https://github.com/oxford-cs-ml-2015/practical6
-- the modification included support for train/val/test splits
local CharSplitLMMinibatchLoader = {}
CharSplitLMMinibatchLoader.__index = CharSplitLMMinibatchLoader
function CharSplitLMMinibatchLoader.create(data_dir, batch_size, seq_length, split_frac... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.