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 |
|---|---|---|---|---|---|
bromagosa/beetleCloud | rename_me_to_config.lua | 1 | 1234 | -- You need to rename this file to config.lua and set the proper
-- password and database name, as well as a secret phrase for
-- Lapis session encryption.
local config = require('lapis.config')
config('development', {
postgres = {
host = '127.0.0.1:5432',
user = 'beetle',
password = 'post... | gpl-3.0 |
mabako/mta-paradise | resources/parasite/elementdata.lua | 1 | 1944 | --[[
Copyright (c) 2010 MTA: Paradise
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 ... | gpl-3.0 |
chukong/sdkbox-samples | src/cocos/extension/DeprecatedExtensionClass.lua | 61 | 4838 | if nil == cc.Control then
return
end
-- This is the DeprecatedExtensionClass
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--CCControl ... | mit |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionClass.lua | 61 | 4838 | if nil == cc.Control then
return
end
-- This is the DeprecatedExtensionClass
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--CCControl ... | mit |
ashdnazg/Zero-K | LuaRules/Gadgets/dbg_animator.lua | 5 | 6266 | ------------------------
function gadget:GetInfo()
return {
name = "Animator",
desc = "v0.002 Moves and turns pieces.",
author = "CarRepairer & knorke",
date = "2010-03-05",
license = "raubkopierer sind verbrecher",
layer = 0,
enabled = false,
}
end
local fu... | gpl-2.0 |
ashdnazg/Zero-K | effects/gundam_factory_explosion.lua | 25 | 3751 | -- factory_explosion
return {
["factory_explosion"] = {
groundflash = {
air = true,
alwaysvisible = true,
circlealpha = 0.6,
circlegrowth = 6,
flashalpha = 0.9,
flashsize = 256,
ground = true,
ttl ... | gpl-2.0 |
tarantonio/OTHire | data/npc/scripts/test.lua | 2 | 1280 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) en... | gpl-3.0 |
mitterdoo/wire | lua/weapons/laserpointer/init.lua | 15 | 1608 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
SWEP.Weight = 8
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Receiver = nil
SWEP.Pointing = false
function SWEP:Initialize()
self.Pointing = false
end
function SWEP:Equip( newOwner )
if IsValid(newOwner.LasReceiver) then
... | apache-2.0 |
linuxmaniac/luacheck | spec/helper.lua | 1 | 1303 | local helper = {}
local dir_sep = package.config:sub(1, 1)
-- Return path to root directory when run from `path`.
local function antipath(path)
local _, level = path:gsub("[/\\]", "")
return (".."..dir_sep):rep(level)
end
function helper.luacov_config(prefix)
return {
statsfile = prefix.."luacov.stats... | mit |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/Helper.lua | 3 | 3639 |
--------------------------------
-- @module Helper
-- @parent_module ccui
--------------------------------
-- brief Get a UTF8 substring from a std::string with a given start position and length<br>
-- Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
-- param str The so... | mit |
sjznxd/luci-0.11.1 | libs/sgi-wsapi/luasrc/sgi/wsapi.lua | 12 | 1844 | --[[
LuCI - SGI-Module for WSAPI
Description:
Server Gateway Interface for WSAPI
FileId:
$Id: wsapi.lua 2656 2008-07-23 18:52:12Z Cyrus $
License:
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 ... | apache-2.0 |
sjznxd/luci-0.11.1 | protocols/ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua | 12 | 1276 | --[[
LuCI - Lua Configuration Interface
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://www.apache.org/licenses/LICENSE-2.0
]]--
local ma... | apache-2.0 |
superopen/openwrt-luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-cdr.lua | 80 | 1878 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | apache-2.0 |
fegimanam/sg1 | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- 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.... | gpl-2.0 |
vhpham80/luci | libs/core/luasrc/ccache.lua | 82 | 1863 | --[[
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
ht... | apache-2.0 |
sjznxd/luci-0.11.1 | libs/core/luasrc/ccache.lua | 82 | 1863 | --[[
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
ht... | apache-2.0 |
ircluzar/RTC3 | Real-Time Corruptor/BizHawk_RTC/Assets/Lua/SNES/Super Mario World.lua | 7 | 141287 | ---------------------------------------------------------------------------
-- Super Mario World (U) Utility Script for BizHawk
-- http://tasvideos.org/Bizhawk.html
--
-- Author: Rodrigo A. do Amaral (Amaraticando)
-- Git repository: https://github.com/rodamaral/smw-tas
-------------------------------------------... | mit |
mitterdoo/wire | lua/entities/gmod_wire_twoway_radio.lua | 10 | 5170 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Two-way Radio"
ENT.WireDebugName = "2W Radio"
if CLIENT then return end -- No more client
function ENT:Initialize()
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self.Input... | apache-2.0 |
halilkaya/minetest-mods | snow/src/snowball.lua | 1 | 10037 | --============
--Snowballs
--============
-- Snowballs were destroying nodes if the snowballs landed just right.
-- Quite a bit of trial-and-error learning here and it boiled down to a
-- small handful of code lines making the difference. ~ LazyJ
local snowball_GRAVITY=9
local snowball_VELOCITY=19
--Shoot snowball
... | gpl-3.0 |
superopen/openwrt-luci | modules/freifunk/luasrc/model/cbi/freifunk/profile.lua | 56 | 2755 | --[[
LuCI - Lua Configuration Interface
Copyright 2011-2012 Manuel Munz <freifunk at somakoma dot de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
httc://www.apache.org/licenses/LICENSE-2.0
]]... | apache-2.0 |
superopen/openwrt-luci | applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua | 141 | 1031 | --[[
smap_devinfo - SIP Device Information
(c) 2009 Daniel Dickinson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
require("luci.i18n")
re... | apache-2.0 |
madafoo/cjdns | contrib/lua/cjdns/addrcalc.lua | 19 | 1888 | -- Cjdns address conversion functions
-- Translated from Cjdns C code to lua code by Alex <alex@portlandmeshnet.org>
--- @module cjdns.addrcalc
local addrcalc = {}
local bit32 = require("bit32")
local sha2 = require("sha2")
function addrcalc.Base32_decode(input)
local numForAscii = {
99,99,99,99,99,99,99,99,99,9... | gpl-3.0 |
halilkaya/minetest-mods | mesecons/mesecons_solarpanel/init.lua | 17 | 2945 | -- Solar Panel
minetest.register_node("mesecons_solarpanel:solar_panel_on", {
drawtype = "nodebox",
tiles = { "jeija_solar_panel.png", },
inventory_image = "jeija_solar_panel.png",
wield_image = "jeija_solar_panel.png",
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
is_ground_content = true,... | gpl-3.0 |
GiuseppeGorgoglione/mame | scripts/genie.lua | 1 | 35795 | -- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team
STANDALONE = false
newoption {
trigger = 'build-dir',
description = 'Build directory name',
}
premake.check_paths = true
premake.make.override = { "TARGET" }
premake.xcode.parameters = { 'CLANG_CXX_LANGUAGE_STANDARD = "c++14"', 'CLANG_CXX_LIBRARY = "libc++"... | gpl-2.0 |
lumidify/Lord-of-the-Test | mods/darkage/nodes.lua | 3 | 8373 | ----------
-- Nodes
----------
minetest.register_node("darkage:adobe", {
description = "Adobe",
tiles = {"darkage_adobe.png"},
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("darkage:basalt", {
description = "Basalt",
tiles = {"darkage_bas... | lgpl-2.1 |
gebhardm/flmlocal | usr/sbin/queryd.lua | 1 | 6155 | #!/usr/bin/env lua
--[[
queryd.lua - Flukso timeseries query daemon
Copyright (C) 2014 Bart Van Der Meerssche <bart@flukso.net>
2016 Markus Gebhard <markus.gebhard@web.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Pub... | mit |
chiyun1/wax | lib/stdlib/helpers/cache.lua | 19 | 1993 | wax.cache = {}
setmetatable(wax.cache, wax.cache)
-- Returns contents of cache keys
-- key: string # value for cache
-- maxAge: number (optional) # max age of file in seconds
function wax.cache.get(key, maxAge)
local path = wax.cache.pathFor(key)
if not wax.filesystem.isFile(path) then return nil end
if ... | mit |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua | 11 | 1044 |
--------------------------------
-- @module TransitionSlideInT
-- @extend TransitionSlideInL
-- @parent_module cc
--------------------------------
-- Creates a transition with duration and incoming scene.<br>
-- param t Duration time, in seconds.<br>
-- param scene A given scene.<br>
-- return A autoreleased Transit... | bsd-3-clause |
Phoib/truewar | lua/stacktraceplus.lua | 59 | 12006 | -- 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... | gpl-3.0 |
ryanplusplus/luvit-playground | ocean/spec/core/RuleSet_spec.lua | 1 | 2975 | describe('core.RuleSet', function()
local RuleSet = require 'core.RuleSet'
local rule_set
before_each(function()
rule_set = RuleSet()
end)
it('should allow adding a simple rule', function()
local builder = load''
rule_set.add_rule('target', 'dep', builder)
assert.are.same({
{
... | mit |
Wohlhabend-Networks/LunaDLL | LuaScriptsLibExt/apc.lua | 3 | 3818 | --Advanced Player Collisions API (WIP - Not reccomended for personal use)
--Created by Sambo
--Requires Colliders and Vectors libraries
--API values
local apc = {}
colliders = loadSharedAPI("colliders")
local r = 0
local ropeCheck = 0
local ropeBox = {}
function apc.onInitAPI()
registerEvent(apc, "onLoop")
end
fun... | gpl-3.0 |
atlimit8/OpenRA | mods/cnc/maps/nod08a/nod08a-AI.lua | 2 | 5752 | --[[
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 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua | 14 | 2851 |
--------------------------------
-- @module ActionTimelineCache
-- @parent_module ccs
--------------------------------
-- Clone a action with the specified name from the container.
-- @function [parent=#ActionTimelineCache] createActionFromJson
-- @param self
-- @param #string fileName
-- @return ActionTimeline#Ac... | bsd-3-clause |
ld-test/penlight | lua/pl/strict.lua | 28 | 3839 | --- Checks uses of undeclared global variables.
-- All global variables must be 'declared' through a regular assignment
-- (even assigning `nil` will do) in a main chunk before being used
-- anywhere or assigned to inside a function. Existing metatables `__newindex` and `__index`
-- metamethods are respected.
--
-- Yo... | mit |
ashdnazg/Zero-K | effects/michelle.lua | 18 | 12448 | -- michelle_ne
-- michelle_w
-- michelle
-- michelle_s
-- michelle_pacemaker
-- michelle_e
-- michelle_se
-- michelle_sw
-- michelle_n
-- michelle_nw
return {
["michelle_ne"] = {
rocks = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
g... | gpl-2.0 |
WolfGaming/OpenRA | mods/d2k/maps/harkonnen-03a/harkonnen03a-AI.lua | 4 | 1707 | --[[
Copyright 2007-2019 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 |
mitterdoo/wire | lua/entities/gmod_wire_spu/init.lua | 3 | 10319 | -- Load shared/clientside stuff
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("cl_spuvm.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.WireDebugName = "ZSPU"
--------------------------------------------------------------------------------
WireSPU_MaxChannels = 32
----------------------------------------------... | apache-2.0 |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua | 19 | 4990 |
--------------------------------
-- @module DisplayManager
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#DisplayManager] getDisplayRenderNode
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [p... | mit |
alech/libquvi-scripts | share/lua/website/imdb.lua | 4 | 3692 | --
-- libquvi-scripts
-- Copyright (C) 2011 quvi project
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This library 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; ... | agpl-3.0 |
ashdnazg/Zero-K | LuaUI/i18nlib/i18n/variants.lua | 36 | 1195 | local variants = {}
local function reverse(arr, length)
local result = {}
for i=1, length do result[i] = arr[length-i+1] end
return result, length
end
local function concat(arr1, len1, arr2, len2)
for i = 1, len2 do
arr1[len1 + i] = arr2[i]
end
return arr1, len1 + len2
end
function variants.ancestry(... | gpl-2.0 |
AlexeySa/rspamd | test/lua/compat_env.lua | 11 | 13692 | --[[
compat_env v$(_VERSION) - Lua 5.1/5.2 environment compatibility functions
SYNOPSIS
-- Get load/loadfile compatibility functions only if using 5.1.
local CL = pcall(load, '') and _G or require 'compat_env'
local load = CL.load
local loadfile = CL.loadfile
-- The following now works in both Lua... | bsd-2-clause |
ashdnazg/Zero-K | gamedata/modularcomms/dyncomm_chassis_generator.lua | 1 | 5044 | local chassisDefs = {
{
name = "dynstrike1",
weapons = {
"commweapon_peashooter",
"commweapon_beamlaser",
"commweapon_lparticlebeam",
"commweapon_shotgun",
"commweapon_shotgun_disrupt",
"commweapon_disruptor",
"commweapon_heavymachinegun",
"commweapon_heavymachinegun_disrupt",
"commweapo... | gpl-2.0 |
persaianbot/ppp | bot/utils.lua | 2 | 23606 | 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 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua | 9 | 1222 |
--------------------------------
-- @module EaseBackOut
-- @extend ActionEase
-- @parent_module cc
--------------------------------
-- brief Create the action with the inner action.<br>
-- param action The pointer of the inner action.<br>
-- return A pointer of EaseBackOut action. If creation failed, return nil.
-- @... | bsd-3-clause |
interhui/httpdns | service/cache.lua | 1 | 1608 |
local global = require 'global'
local redis_srv = require 'service.redis'
local function set(key, value, exptime)
if not key or not value then
return false, 'key or value is nil'
end
local usr_cache = ngx.shared.usr_cache
local val_type = type(value)
if val_type ~= 'number' and val_type ~= 'string' and val_ty... | apache-2.0 |
ashdnazg/Zero-K | lups/ParticleClasses/OverdriveParticles.lua | 5 | 11148 | -- $Id: OverdriveParticles.lua 3345 2008-12-02 00:03:50Z jk $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local OverdriveParticles = {}... | gpl-2.0 |
sjznxd/luci-0.11.1 | modules/admin-full/luasrc/controller/admin/status.lua | 4 | 4653 | --[[
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 |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua | 10 | 4423 |
--------------------------------
-- @module DisplayManager
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#DisplayManager] getDisplayRenderNode
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [p... | gpl-2.0 |
ashdnazg/Zero-K | LuaRules/Gadgets/ai_CAI.lua | 2 | 141957 |
-- In-game, type "/luarules caiscout [x]" in the console to toggle scoutmap drawing for team [x]
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "CAI"... | gpl-2.0 |
tahabaghshomalazar/CrystaL_bot | plugins/bugzilla.lua | 611 | 3983 | do
local BASE_URL = "https://bugzilla.mozilla.org/rest/"
local function bugzilla_login()
local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password
print("accessing " .. url)
local res,code = https.request( url )
local data = json:decode(res)
return data
... | gpl-2.0 |
facebokiii/UHproject | plugins/bugzilla.lua | 611 | 3983 | do
local BASE_URL = "https://bugzilla.mozilla.org/rest/"
local function bugzilla_login()
local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password
print("accessing " .. url)
local res,code = https.request( url )
local data = json:decode(res)
return data
... | gpl-2.0 |
aaiijmrtt/nn | WeightedEuclidean.lua | 17 | 8147 | local WeightedEuclidean, parent = torch.class('nn.WeightedEuclidean', 'nn.Module')
function WeightedEuclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- each template (output dim) has its own di... | bsd-3-clause |
sjznxd/luci-0.11.1 | modules/niu/luasrc/model/cbi/niu/network/etherwan.lua | 50 | 5482 | --[[
LuCI - Lua Configuration Interface
Copyright 2009 Steven Barth <steven@midlink.org>
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://w... | apache-2.0 |
ashdnazg/Zero-K | LuaUI/i18nlib/spec/i18n_interpolate_spec.lua | 21 | 2228 | require 'spec.fixPackagePath'
local interpolate = require 'i18n.interpolate'
describe('i18n.interpolate', function()
it("exists", function()
assert_equal('function', type(interpolate))
end)
it("performs standard interpolation via string.format", function()
assert_equal("My name is John, I am 13", inter... | gpl-2.0 |
meepdarknessmeep/gmod-csweapons | lua/weapons/weapon_ak47.lua | 1 | 3124 | AddCSLuaFile()
DEFINE_BASECLASS( "weapon_csbasegun" )
--Jvs: I wish this weapon defining shit was this easy
CSParseWeaponInfo( SWEP , [[WeaponData
{
"MaxPlayerSpeed" "221"
"WeaponType" "Rifle"
"FullAuto" 1
"WeaponPrice" "2500"
"WeaponArmorRatio" "1.55"
"CrosshairMinDistance" "4"
"CrosshairDeltaDistan... | unlicense |
Ardour/ardour | share/scripts/periodic_backup.lua | 4 | 1449 | ardour {
["type"] = "EditorHook",
name = "Periodically Save Snapshot",
author = "Ardour Team",
description = "Save a session-snapshot periodically (every 15mins) named after the current date-time",
}
-- subscribe to signals
-- http://manual.ardour.org/lua-scripting/class_reference/#LuaSignal.LuaSign... | gpl-2.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/Timer.lua | 7 | 1243 |
--------------------------------
-- @module Timer
-- @extend Ref
-- @parent_module cc
--------------------------------
-- get interval in seconds
-- @function [parent=#Timer] getInterval
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [pare... | bsd-3-clause |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/script/framework/package_support.lua | 45 | 4006 | --[[
Copyright (c) 2011-2015 chukong-incc.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... | bsd-3-clause |
NicolBolas/New-Vulkan-XML-Format | SLAXML/slaxdom.lua | 7 | 2107 | -- Optional parser that creates a flat DOM from parsing
local SLAXML = require 'slaxml'
function SLAXML:dom(xml,opts)
if not opts then opts={} end
local rich = not opts.simple
local push, pop = table.insert, table.remove
local stack = {}
local doc = { type="document", name="#doc", kids={} }
local current ... | mit |
ashdnazg/Zero-K | LuaRules/Gadgets/api_gameframe_orders.lua | 4 | 2254 | ----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Gameframe Orders",
desc = "Delegates unit orders to GameFrame to avoid AllowComma... | gpl-2.0 |
superopen/openwrt-luci | modules/admin-mini/luasrc/controller/mini/index.lua | 79 | 1429 | --[[
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 |
dfki-iui/oms | resources/lua/sandbox.lua | 1 | 1716 | sbox = {
unpack = unpack,
collectgarbage = collectgarbage,
pairs = pairs,
select = select,
next = next,
tostring = tostring,
omm = omm,
dfki = dfki,
type = type,
print = print,
getmetatable = getmetatable,
assert = assert,
ipairs = ipairs,
pcall = pcall,
tonumber = tonumber,
math = {
at... | gpl-3.0 |
xyzz/minetest-stress | core/Stack.lua | 1 | 1525 | local Stack = { __type = "Stack" }
function Stack.__call(self, inventory, number)
self = {
inventory = inventory,
number = number
}
setmetatable(self, Stack.__meta)
return self
end
function Stack.__modify_or_access(self, property, change)
local itemstack = self.inventory.invref:get... | mit |
xcjmine/skynet | lualib/snax/hotfix.lua | 20 | 2420 | local si = require "snax.interface"
local function envid(f)
local i = 1
while true do
local name, value = debug.getupvalue(f, i)
if name == nil then
return
end
if name == "_ENV" then
return debug.upvalueid(f, i)
end
i = i + 1
end
end
local function collect_uv(f , uv, env)
local i = 1
while true... | mit |
dani-sj/mahan04 | plugins/greeter.lua | 25 | 4242 | --[[
Sends a custom message when a user enters or leave a chat.
!welcome group
The custom message will send to the group. Recommended way.
!welcome pm
The custom message will send to private chat newly joins member.
Not recommended as a privacy concern and the possibility of user reporting the bot.
!welcome disable
... | gpl-2.0 |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua | 10 | 1341 |
--------------------------------
-- @module PhysicsJointRatchet
-- @extend PhysicsJoint
-- @parent_module cc
--------------------------------
--
-- @function [parent=#PhysicsJointRatchet] getAngle
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @funct... | gpl-2.0 |
cedricporter/everlost | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ControlButton.lua | 2 | 8518 |
--------------------------------
-- @module ControlButton
-- @extend Control
--------------------------------
-- @function [parent=#ControlButton] isPushed
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#ControlButton] setSelected
-- @para... | apache-2.0 |
ashdnazg/Zero-K | LuaUI/Widgets/gui_ingame_guide.lua | 7 | 5822 | function widget:GetInfo() return {
name = "In-game Guide",
enabled = true,
} end
options_path = 'Help'
options = {
ingameguide_concept_wreckage = {
name = "Wreckage",
value= "When destroyed, units leave wreckage containing a part of their metal worth. This value can then be Reclaimed by constructors, which mak... | gpl-2.0 |
robegan21/upc_utils | klib/lua/klib.lua | 42 | 20155 | --[[
The MIT License
Copyright (c) 2011, Attractive Chaos <attractor@live.co.uk>
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 th... | mit |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua | 10 | 4320 |
--------------------------------
-- @module ProgressTimer
-- @extend Node
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ProgressTimer] isReverseDirection
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- This allows the bar typ... | gpl-2.0 |
zarbatehsan/programmer | plugins/inrealm.lua | 850 | 25085 | -- data saved to moderation.json
-- check moderation plugin
do
local function create_group(msg)
-- superuser and admins only (because sudo are always has privilege)
if is_sudo(msg) or is_realm(msg) and is_admin(msg) then
local group_creator = msg.from.print_name
create_g... | gpl-2.0 |
ashdnazg/Zero-K | effects/gundam_330rlexplode.lua | 19 | 4743 | -- 330rlexplode
return {
["330rlexplode"] = {
dirt = {
count = 4,
ground = true,
properties = {
alphafalloff = 2,
color = [[0.2, 0.1, 0.05]],
pos = [[r-10 r10, 0, r-10 r10]],
size = 22,
... | gpl-2.0 |
vhpham80/luci | libs/web/luasrc/http/protocol.lua | 55 | 18445 | --[[
HTTP protocol implementation for LuCI
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licen... | apache-2.0 |
mitterdoo/wire | lua/wire/timedpairs.lua | 17 | 3271 | -- Timedpairs by Grocel. (Rewrite by Divran)
-- It allows you to go through long tables, but without game freezing.
-- Its like a for-pairs loop.
--
-- How to use:
-- WireLib.Timedpairs(string unique name, table, number ticks done at once, function tickcallback[, function endcallback, ...])
--
-- tickcallback is called... | apache-2.0 |
mitterdoo/wire | lua/entities/gmod_wire_numpad.lua | 10 | 3176 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Numpad"
ENT.WireDebugName = "Numpad"
if CLIENT then return end -- No more client
local keynames = {"0","1","2","3","4","5","6","7","8","9",".","enter","+","-","*","/"} -- Names as we will display them and for inputs/outputs
local keyenu... | apache-2.0 |
Ardour/ardour | share/scripts/midi_cc_to_automation.lua | 2 | 5397 | ardour { ["type"] = "EditorAction", name = "MIDI CC to Plugin Automation",
license = "MIT",
author = "Ardour Team",
description = [[Parse a given MIDI control changes (CC) from all selected MIDI regions and convert them into plugin parameter automation]]
}
function factory () return function ()
-- find po... | gpl-2.0 |
vhpham80/luci | modules/freifunk/luasrc/model/cbi/freifunk/basics.lua | 74 | 3518 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 Manuel Munz <freifunk at somakoma de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:... | apache-2.0 |
facebokiii/UHproject | plugins/media.lua | 376 | 1679 | do
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = matches[1]
local ext = matches[2]
local file = download_to_file(url)
local cb_extra = {file_path=file}
local mime_type = mimetype.get_content_type_no_sub(ext)
if ext == 'gif' then
print('send_file')
send_docum... | gpl-2.0 |
anoidgit/Torch-nn-ext | getrcnn.lua | 1 | 4130 | require "nngraph"
require "cudnn"
function buildrtcnn_simple(vsize)
local input = nn.Identity()()
local ws = cudnn.GRU(vsize, vsize, 1)(input)
local w_hat = nn.Select(1, -1)(ws)
local newseq = nn.JoinTable(1)({w_hat, input})
local output = nn.Select(1, -1)(cudnn.GRU()(newseq))
return nn.gModule({input}, {output... | gpl-3.0 |
Ardour/ardour | share/scripts/_session_load_hook.lua | 4 | 1120 | ardour {
["type"] = "EditorHook",
name = "Load Session Hook Example",
author = "Ardour Team",
description = "Display some dialogs during session load and execute actions",
}
-- subscribe to signals
-- http://manual.ardour.org/lua-scripting/class_reference/#LuaSignal.LuaSignal
function signals ()
s ... | gpl-2.0 |
Houshalter/Tattletale | Tattletale.lua | 1 | 2019 | package.path = package.path..";./?.lua;./?/init.lua;"
require 'names'
require 'config'
require "irc"
require 'markovDetect'
if not logToConsole then
print = function() end
end
local namesHash = {}
for i, n in ipairs(names) do
namesHash[n] = true
end
local sleep = require "socket".sleep
local s = irc.new{nick = ... | mit |
Ardour/ardour | share/scripts/bounce_replace.lua | 2 | 2903 | ardour { ["type"] = "EditorAction", name = "Bounce+Replace Regions",
license = "MIT",
author = "Ardour Team",
description = [[Bounce selected regions with processing and replace region]]
}
function factory (params) return function ()
-- there is currently no direct way to find the track
-- corresponding ... | gpl-2.0 |
rwygand/ngx_borderpatrol | src/service_token.lua | 5 | 1468 | local json = require("json")
local sessionid = require("sessionid")
-------------------------------------------
-- get service token using master token
-------------------------------------------
local session_id = ngx.var.cookie_border_session
if not session_id then
ngx.log(ngx.INFO, "==== access denied: no sessi... | mit |
WolfGaming/OpenRA | mods/ra/maps/allies-03a/allies03a.lua | 3 | 9620 | --[[
Copyright 2007-2019 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 |
qweru/Dilan | plugins/weather.lua | 29 | 1436 |
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location..'&APPID=eedbc05ba060c787ab0614cad1f2e12b'
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= 200... | gpl-2.0 |
alartum/cells | textures/mm_data_old_ground.lua | 1 | 7839 | -- Number of ticks for the whole
-- animation sequence for one state
animation_time = 16
-- Default tile size
tile_size = {x = 32, y = 32}
-- Init the sprite sheet
model = {}
model.sprite_sheet = './tileinfo/water.png'
-- Create new animation state
default = {name = 'default'}
-- Load frames for the 'default' state
... | gpl-3.0 |
saeqe/telespark | vir/MemberManager.lua | 44 | 9652 | local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id)... | gpl-2.0 |
alech/libquvi-scripts | share/media/collegehumor.lua | 3 | 2469 | -- libquvi-scripts
-- Copyright (C) 2012,2013 Toni Gundogdu <legatvs@gmail.com>
-- Copyright (C) 2010-2011 Lionel Elie Mamane <lionel@mamane.lu>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This program is free software: you can redistribute it and/or
-- modify it under the terms o... | agpl-3.0 |
halilkaya/minetest-mods | homedecor/lrfurn/armchairs.lua | 3 | 1291 |
local armchair_cbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
}
}
for i in ipairs(lrfurn.colors) do
local colour = lrfurn.colors[i][1]
local hue = lrfurn.colors[i][2]
minetest.register_node("lrfurn:armchair_"..colour, {
description = "Armchair ("..... | gpl-3.0 |
interhui/httpdns | httpdns.lua | 1 | 4558 |
local cjson = require 'cjson'
local global = require 'global'
local resolver = require "resty.dns"
local nsf = require 'resty.nsf'
local cache_srv = require 'service.cache'
local log_srv = require 'service.log'
local num_utils = require 'utils.number_utils'
local ip_utils = require 'utils.ip_utils'
local io_utils ... | apache-2.0 |
tarantonio/OTHire | data/talkactions/scripts/war.lua | 2 | 5483 | function checkExhausted(cid, storage, seconds)
local v = exhaustion.get(cid, storage)
if(not v) then
exhaustion.set(cid, storage, seconds)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait " .. v .. " seconds before trying this command again.")
return false
end
... | gpl-3.0 |
huailiang/GameEngineen | Assets/uLua/Lua_Backup/System/List.lua | 4 | 6434 | local List_Node = {}
List_Node.value = nil
List_Node.next = nil
List_Node.prev = nil
function List_Node:New(object)
object = object or {}
setmetatable(object, self)
self.__index = self
return object
end
List_Iterator = {}
List_Iterator.node = nil
List_Iterator.owner = nil
function List_Iterator:New(_owner)
... | mit |
ereizertmbot/fuck | plugins/stats.lua | 43 | 4082 | do
-- Returns a table with `name` and `msgs`
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_prin... | gpl-2.0 |
superopen/openwrt-luci | libs/sys/luasrc/sys.lua | 11 | 25788 | --[[
LuCI - System library
Description:
Utilities for interaction with the Linux system
FileId:
$Id$
License:
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... | apache-2.0 |
chukong/sdkbox-samples | src/cocos/cocos2d/functions.lua | 12 | 18419 | --[[
Copyright (c) 2011-2015 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, dis... | mit |
ashdnazg/Zero-K | effects/emg.lua | 25 | 12010 | -- emg_shells_m
-- emg_hit
-- flashplosion
-- flashmuzzle1
-- emg_hit_he
-- brawlimpacts
-- brawlermuzzle
-- emg_shells_l
-- emg_hit_water
return {
["emg_shells_m"] = {
usedefaultexplosions = false,
shells = {
air = true,
class = [[CSimpleParticleSystem]],
count ... | gpl-2.0 |
ashdnazg/Zero-K | LuaUI/Widgets/chili_new/controls/label.lua | 18 | 2997 | --//=============================================================================
--- Label module
--- Label fields.
-- Inherits from Control.
-- @see control.Control
-- @table Label
-- @string[opt="left"] align alignment
-- @string[opt="linecenter"] valign vertical alignment
-- @string[opt="no text"] caption text to... | gpl-2.0 |
KratosTeam/terminator | plugins/supergroup.lua | 1 | 94461 | --[[
|-------------------------------------------------------------------------------------------------|
| ######## ######## ######## ## ## #### ## ## ### ######## ####### ######## |
| ## ## ## ## ### ### ## ### ## ## ## ## ## ## ## ## |
| ## ##... | agpl-3.0 |
napcode/ardour | share/scripts/_hook_test.lua | 1 | 1084 | ardour {
["type"] = "EditorHook",
name = "Callback Example",
author = "Ardour Team",
description = "Rewind On Solo Change, Write a file when regions are moved",
}
function signals ()
s = LuaSignal.Set()
--s:add ({[LuaSignal.SoloActive] = true, [LuaSignal.RegionsPropertyChanged] = true})
s:add (
... | gpl-2.0 |
takaaptech/easing | examples/love/easing.lua | 2 | 9828 | --
-- Adapted from
-- Tweener's easing functions (Penner's Easing Equations)
-- and http://code.google.com/p/tweener/ (jstweener javascript version)
--
--[[
Disclaimer for Robert Penner's Easing Equations license:
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright © 2001 Robert Penner
All ... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.