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 |
|---|---|---|---|---|---|
npmaier/JuJuCast | mods/shamanmobs/animals/rat.lua | 1 | 2069 | shamanmobs:register_mob("shamanmobs:rat", {
type = "animal",
juju = Black,`
hp_max = 1,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "shamanmobs_rat.x",
textures = {"shamanmobs_rat.png"},
makes_footstep_sound = false,
walk_ve... | gpl-2.0 |
ashdnazg/Zero-K | scripts/planeheavyfighter.lua | 4 | 3748 | include "constants.lua"
--pieces
local base = piece "base"
local wingR, wingL, wingtipR, wingtipL = piece("wingr", "wingl", "wingtip1", "wingtip2")
local engineR, engineL, thrust1, thrust2, thrust3 = piece("jetr", "jetl", "thrust1", "thrust2", "thrust3")
local missR, missL = piece("m1", "m2")
local smokePiece = {base... | gpl-2.0 |
edumntg/forgottenserver | data/talkactions/scripts/add_skill.lua | 35 | 1716 | local function getSkillId(skillName)
if skillName == "club" then
return SKILL_CLUB
elseif skillName == "sword" then
return SKILL_SWORD
elseif skillName == "axe" then
return SKILL_AXE
elseif skillName:sub(1, 4) == "dist" then
return SKILL_DISTANCE
elseif skillName:sub(1, 6) == "shield" then
return SKILL_S... | gpl-2.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/Touch.lua | 2 | 2964 |
--------------------------------
-- @module Touch
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Returns the previous touch location in screen coordinates. <br>
-- return The previous touch location in screen coordinates.
-- @function [parent=#Touch] getPreviousLocationInView
-- @param self... | bsd-3-clause |
AlexeySa/rspamd | test/lua/unit/rfc2047.lua | 3 | 3737 | --[[
Copyright (c) 2016, Vsevolod Stakhov <vsevolod@highsecure.ru>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of ... | bsd-2-clause |
ashdnazg/Zero-K | LuaRules/Gadgets/mission_galaxy_campaign_battle.lua | 2 | 50295 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Galaxy Campaign Battle Handler",
desc = "Implements unit locks and structure placement.",
author = "GoogleFr... | gpl-2.0 |
edumntg/forgottenserver | data/npc/lib/npcsystem/npchandler.lua | 15 | 22088 | -- Advanced NPC System by Jiddo
if NpcHandler == nil then
-- Constant talkdelay behaviors.
TALKDELAY_NONE = 0 -- No talkdelay. Npc will reply immedeatly.
TALKDELAY_ONTHINK = 1 -- Talkdelay handled through the onThink callback function. (Default)
TALKDELAY_EVENT = 2 -- Not yet implemented
-- Currently applied tal... | gpl-2.0 |
Wohlhabend-Networks/LunaDLL | LuaScriptsLib/mainV2.lua | 2 | 43654 | --[[
'##:::::::'##::::'##:'##::: ##::::'###::::'##:::::::'##::::'##::::'###::::
##::::::: ##:::: ##: ###:: ##:::'## ##::: ##::::::: ##:::: ##:::'## ##:::
##::::::: ##:::: ##: ####: ##::'##:. ##:: ##::::::: ##:::: ##::'##:. ##::
##::::::: ##:::: ##: ## ## ##:'##:::. ##: ##::::::: ##:::: ##:'##:::. ##:
##::::::: ##:... | gpl-3.0 |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua | 11 | 1397 |
--------------------------------
-- @module TransitionTurnOffTiles
-- @extend TransitionScene,TransitionEaseScene
-- @parent_module cc
--------------------------------
--
-- @function [parent=#TransitionTurnOffTiles] easeActionWithAction
-- @param self
-- @param #cc.ActionInterval action
-- @return ActionInterval#A... | mit |
rm-code/unpack-bags | RMConvenientBags/media/lua/client/TimedActions/TADropBags.lua | 2 | 2841 | ---
-- This feature is inspired by the Turn Tail mod originally developed by The_Real_Al.
--
require('TimedActions/ISBaseTimedAction');
-- ------------------------------------------------
-- Constants
-- ------------------------------------------------
local TIME_BACKPACK = 100;
local TIME_DEFAULT = 50;
-- -------... | mit |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua | 10 | 17038 |
--------------------------------
-- @module ParticleSystem
-- @extend Node,TextureProtocol
-- @parent_module cc
--------------------------------
-- size variance in pixels of each particle
-- @function [parent=#ParticleSystem] getStartSizeVar
-- @param self
-- @return float#float ret (return value: float)
... | gpl-2.0 |
ali-iraqi-bot/devil3_bot | bot/seedbot.lua | 1 | 7201 | 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... | agpl-3.0 |
vhpham80/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-codec.lua | 80 | 2172 | --[[
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 |
AlexeySa/rspamd | lualib/rspamd_config_transform.lua | 1 | 5718 | --[[
Copyright (c) 2017, Vsevolod Stakhov <vsevolod@highsecure.ru>
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 ... | bsd-2-clause |
ashdnazg/Zero-K | LuaRules/Configs/cai/strategies.lua | 20 | 7579 | --[[
example buildTasksMods
buildTasksMods = function(buildConfig)
buildConfig.robots.factoryByDefId[UnitDefNames['factorycloak'].id].importance = 0
buildConfig.robots.factoryByDefId[UnitDefNames['factoryshield'].id].importance = 1
buildConfig.robots.factoryByDefId[UnitDefNames['factoryveh'].id].importance =... | gpl-2.0 |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionClass.lua | 39 | 4760 | -- 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 class will be Deprecated,begin
function D... | gpl-2.0 |
ashdnazg/Zero-K | LuaUI/Widgets/gfx_deferred_rendering.lua | 2 | 22528 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Deferred rendering",
version = 3,
desc = "Collects and renders point and beam lights using HDR an... | gpl-2.0 |
AlexeySa/rspamd | contrib/torch/nn/SpatialContrastiveNormalization.lua | 63 | 1444 | local SpatialContrastiveNormalization, parent = torch.class('nn.SpatialContrastiveNormalization','nn.Module')
function SpatialContrastiveNormalization:__init(nInputPlane, kernel, threshold, thresval)
parent.__init(self)
-- get args
self.nInputPlane = nInputPlane or 1
self.kernel = kernel or torch.Tensor(9... | bsd-2-clause |
disslove/DJ-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 |
mattkime/CHDK | CHDK/LUALIB/capmode.lua | 9 | 2517 | --[[
module to control capture modes
Modes names may be found in CHDK/LUALIB/GEN/modelist.lua.
These are the same as the enum values in include/modelist.h, minus the MODE_ prefix
capmode public members:
mode_to_name: table mapping CHDK mode numbers to names.
name_to_mode: table mapping names to CHDK mode numbers.
g... | gpl-2.0 |
hughperkins/char-rnn-er | train.lua | 2 | 7154 | --[[
This file trains a character-level multi-layer RNN on text data
Code is based on implementation in Andrej Karpathy's https://github.com/karpathy/char-rnn
... which was in turn based on implementation in
https://github.com/oxford-cs-ml-2015/practical6
but modified to have multi-layer support, GPU support, as wel... | bsd-2-clause |
padrinoo/padrino | plugins/qr.lua | 637 | 1730 | --[[
* qr plugin uses:
* - http://goqr.me/api/doc/create-qr-code/
* psykomantis
]]
local function get_hex(str)
local colors = {
red = "f00",
blue = "00f",
green = "0f0",
yellow = "ff0",
purple = "f0f",
white = "fff",
black = "000",
gray = "ccc"
}
for color, value in pairs(colors)... | gpl-2.0 |
superopen/openwrt-luci | applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua | 76 | 5638 | --[[
Luci diag - Diagnostics controller module
(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
]]--
module("luci.cont... | apache-2.0 |
vhpham80/luci | applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua | 76 | 5638 | --[[
Luci diag - Diagnostics controller module
(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
]]--
module("luci.cont... | apache-2.0 |
halilkaya/minetest-mods | technic/technic/tools/mining_drill.lua | 2 | 12327 | local max_charge = {50000, 200000, 650000}
local power_usage_per_node = {200, 500, 800}
local S = technic.getter
minetest.register_craft({
output = 'technic:mining_drill',
recipe = {
{'moreores:tin_ingot', 'technic:diamond_drill_head', 'moreores:tin_ingot'},
{'technic:stainless_steel_ingot', 'technic... | gpl-3.0 |
ashdnazg/Zero-K | LuaRules/Configs/spawn_defs.lua | 4 | 13385 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local modoptions = Spring.GetModOptions() or {}
local eggsModifier = 0.8 --unused
--------------------------------------------------------------------------... | gpl-2.0 |
Ardour/ardour | share/scripts/scl_to_mts.lua | 2 | 10006 | ardour {
["type"] = "EditorAction",
name = "Scala to MIDI Tuning",
license = "MIT",
author = "Ardour Team",
description = [[Read scala (.scl) tuning from a file, generate MIDI tuning standard (MTS) messages and send them to a MIDI port]]
}
function factory () return function ()
-- return tabl... | gpl-2.0 |
aaiijmrtt/nn | SpatialConvolution.lua | 27 | 4452 | local SpatialConvolution, parent = torch.class('nn.SpatialConvolution', 'nn.Module')
function SpatialConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH)
parent.__init(self)
dW = dW or 1
dH = dH or 1
self.nInputPlane = nInputPlane
self.nOutputPlane = nOutputPlane
self.kW = kW
... | bsd-3-clause |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua | 8 | 2327 |
--------------------------------
-- @module PhysicsShapeCircle
-- @extend PhysicsShape
-- @parent_module cc
--------------------------------
-- Get the circle's radius.<br>
-- return A float number.
-- @function [parent=#PhysicsShapeCircle] getRadius
-- @param self
-- @return float#float ret (return value: float)
... | mit |
ashdnazg/Zero-K | LuaUI/Widgets/gui_transporting.lua | 11 | 10222 | -- $Id: gui_transporting.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: gui_transporting.lua
-- brief: Display the units currently being transported
-... | gpl-2.0 |
jbrashear/Vanilla-In-Game-Leveling-Guide | SlashCommands.lua | 1 | 1288 | --[[--------------------------------------------------
----- VanillaGuide -----
------------------
SlashCommands.lua
Authors: Liinx
Version: 1.00
------------------------------------------------------
Description:
This file handles Slash Commands using Ace2 lib
1.00
-- Initial Ace2 release
-----... | gpl-3.0 |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/JumpBy.lua | 11 | 1766 |
--------------------------------
-- @module JumpBy
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
-- initializes the action<br>
-- param duration in seconds
-- @function [parent=#JumpBy] initWithDuration
-- @param self
-- @param #float duration
-- @param #vec2_table position
-- @para... | mit |
gochenming/sumwars-code | share/data/lua/dwarfenwall.lua | 1 | 16911 |
-- helperfunctions for the siege of dwarfenwall and dwarfenwall itself
function sendOutHealer(unitToHeal)
local healer = createObject("aisen_healer", "locHealerIn")
local targetLoc = get(unitToHeal,"position");
if(dwarfenwall.people[unitToHeal]~=nil)then
--print(dwarfenwall.people[unitToHeal])
local i = dwarfe... | gpl-3.0 |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua | 14 | 3014 |
--------------------------------
-- @module AssetsManager
-- @extend Node
-- @parent_module cc
--------------------------------
--
-- @function [parent=#AssetsManager] setStoragePath
-- @param self
-- @param #char storagePath
-- @return AssetsManager#AssetsManager self (return value: cc.AssetsManager)
----... | mit |
ashdnazg/Zero-K | LuaRules/Gadgets/unit_AA_overkill_control.lua | 5 | 5818 | local versionNumber = "v0.1"
function gadget:GetInfo()
return {
name = "AA overkill control",
desc = versionNumber .. " Managed Allowed Weapon Target for Defender, Hacksaw, Chainsaw and Artemis to prevent overkill",
author = "Jseah",
date = "03/05/13",
license = "GNU GPL, v2 o... | gpl-2.0 |
ashdnazg/Zero-K | scripts/staticheavyradar.lua | 5 | 2170 | local base = piece 'base'
local spinner = piece 'spinner'
local arm = piece 'arm'
local ant = piece 'ant'
local dish = piece 'dish'
local float1 = piece 'float1'
local float2 = piece 'float2'
include "constants.lua"
local smokePiece = { ant, base}
local spGetUnitIsStunned = Spring.GetUnitIsStunned
local SIG_... | gpl-2.0 |
ereizertmbot/fuck | 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 |
sadikalknani/DEV_PRO | 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... | agpl-3.0 |
ashdnazg/Zero-K | LuaUI/Widgets/map_draw_blocker.lua | 17 | 9188 | function widget:GetInfo()
return {
name = "Map Draw Blocker",
desc = "blocks map draws from spamers",
author = "SirMaverick",
date = "2010",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = false,
}
end
local GetPlayerList = Spring.GetPlayerList
local GetPlayerInfo = S... | gpl-2.0 |
atlimit8/OpenRA | mods/d2k/maps/harkonnen-02a/harkonnen02a.lua | 7 | 2633 | --[[
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 |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua | 39 | 7289 | --tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of ccui.Text will be deprecated begin
local TextDeprecated = { }
function TextDeprecated.setText(self, str)
deprecatedTip("ccui.Text:setT... | gpl-2.0 |
goofanader/space-bar | libraries/queue.lua | 1 | 1876 | ---
-- Queue holds both a regular queue and a double queue - whichever is needed for your needs.
-- @module queue
require("middleclass")
require("middleclass-commons")
Queue = class("Queue")
function Queue:initialize()
self.first = 0
self.last = -1
self.values = {}
self.repeats = {}
end
function Queue:... | gpl-2.0 |
speedteam-github/mega-SPEED | plugins/ingroup.lua | 371 | 44212 | do
-- Check Member
local function check_member_autorealm(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostr... | agpl-3.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua | 9 | 2001 |
--------------------------------
-- @module Skeleton3D
-- @extend Ref
-- @parent_module cc
--------------------------------
-- remove all bones
-- @function [parent=#Skeleton3D] removeAllBones
-- @param self
-- @return Skeleton3D#Skeleton3D self (return value: cc.Skeleton3D)
--------------------------------... | bsd-3-clause |
LuaDist/luajava | test/hibernateConfig.lua | 1 | 2314 | return
{
name="class",
attributes={{name="name", value="Recipient"}, {name="table", value="RECIPIENTS"}},
body=
{
{
name="cache",
attributes={{name="usage", value="read-write"}},
body={}
},
... | mit |
atlimit8/OpenRA | mods/d2k/maps/shellmap/d2k-shellmap.lua | 7 | 6527 | --[[
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 |
vhpham80/luci | applications/luci-pbx/luasrc/model/cbi/pbx.lua | 146 | 4360 | --[[
Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com>
This file is part of luci-pbx.
luci-pbx 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
... | apache-2.0 |
ashdnazg/Zero-K | effects/gundam_constructionexp.lua | 26 | 4789 | -- blue_explosion
return {
["blue_explosion"] = {
dirt = {
count = 4,
ground = true,
properties = {
alphafalloff = 2,
alwaysvisible = true,
color = [[0.2, 0.1, 0.05]],
pos = [[r-10 r10, 0, r-10 r10]]... | gpl-2.0 |
ashdnazg/Zero-K | LuaRules/Configs/cai/accessory/targetReachableTester.lua | 17 | 1084 | local spGetUnitPosition = Spring.GetUnitPosition
local spRequestPath = Spring.RequestPath
local spGetUnitDefID = Spring.GetUnitDefID
VFS.Include("LuaRules/Utilities/isTargetReachable.lua")
function IsTargetReallyReachable(unitID, x,y,z,ux, uy, uz)
local udid = spGetUnitDefID(unitID)
local moveID = UnitDefs[udid].mov... | gpl-2.0 |
vhpham80/luci | applications/luci-coovachilli/luasrc/model/cbi/coovachilli_network.lua | 79 | 1639 | --[[
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 |
vhpham80/luci | applications/luci-commands/luasrc/controller/commands.lua | 76 | 5959 | --[[
LuCI - Lua Configuration Interface
Copyright 2012 Jo-Philipp Wich <jow@openwrt.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
]]--
module("... | apache-2.0 |
superopen/openwrt-luci | applications/luci-statistics/luasrc/statistics/datatree.lua | 77 | 4394 | --[[
Luci statistics - rrd data tree builder
(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/licenses/... | apache-2.0 |
aaiijmrtt/nn | Padding.lua | 12 | 1441 | local Padding, parent = torch.class('nn.Padding', 'nn.Module')
-- pad can be positive (right) negative (left)
function Padding:__init(dim, pad, nInputDim, value)
self.dim = dim
self.pad = pad
self.nInputDim = nInputDim
self.value = value or 0
self.outputSize = torch.LongStorage()
parent.__init(self)
... | bsd-3-clause |
xcjmine/skynet | test/testrediscluster.lua | 19 | 3400 | local skynet = require "skynet"
local rediscluster = require "skynet.db.redis.cluster"
local test_more = ...
-- subscribe mode's callback
local function onmessage(data,channel,pchannel)
print("onmessage",data,channel,pchannel)
end
skynet.start(function ()
local db = rediscluster.new({
{host="127.0.0.1",port=7000... | mit |
mitterdoo/wire | lua/entities/gmod_wire_digitalscreen/cl_init.lua | 3 | 7324 | include('shared.lua')
function ENT:Initialize()
self.Memory1 = {}
self.Memory2 = {}
self.LastClk = true
self.NewClk = true
self.Memory1[1048575] = 1
self.Memory2[1048575] = 1
self.NeedRefresh = true
self.IsClear = true
self.ClearQueued = false
self.RefreshPixels = {}
self.RefreshRows = {}
self.ScreenWidt... | apache-2.0 |
mitterdoo/wire | lua/wire/stools/7seg.lua | 9 | 3209 | WireToolSetup.setCategory( "Visuals/Indicators" )
WireToolSetup.open( "7seg", "7 Segment Display", "gmod_wire_indicator", nil, "7 Segment Displays" )
TOOL.GhostAngle = Angle(90, 0, 0)
TOOL.GhostMin = "x"
if CLIENT then
language.Add( "tool.wire_7seg.name", "7-Segment Display Tool" )
language.Add( "tool.wire_7seg.des... | apache-2.0 |
mitterdoo/wire | lua/wire/stools/fx_emitter.lua | 9 | 1457 | WireToolSetup.setCategory( "Visuals" )
WireToolSetup.open( "fx_emitter", "FX Emitter", "gmod_wire_fx_emitter", nil, "FX Emitters" )
if ( CLIENT ) then
language.Add( "Tool.wire_fx_emitter.name", "Wire FX Emitter" )
language.Add( "Tool.wire_fx_emitter.desc", "Wire FX Emitter Emits effects eh?" )
language.Add( "Tool.w... | apache-2.0 |
TehFlaminTaco/Reverse-Programmer-Notation | lua_implementation/stack.lua | 1 | 2171 | local stack = {}
local unpack = unpack or table.unpack -- WHO DID THIS, WHO MADE UNPACK NON-GLOBAL RANDOMLY?
function stack.new(size,t)
size = size or -1
if (type(t)=='string' or type(t)=='number')then
local T = {}
for s in t:gmatch"." do
T[#T+1] = s
end
t = T
end
local holderT = t or {}
local st = {}... | gpl-3.0 |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua | 11 | 1380 |
--------------------------------
-- @module ParticleFlower
-- @extend ParticleSystemQuad
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ParticleFlower] init
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent... | mit |
ashdnazg/Zero-K | LuaUI/Widgets/chili_new/skins/Robocracy/skin.lua | 9 | 6120 | --//=============================================================================
--// Skin
local skin = {
info = {
name = "Robocracy",
version = "0.3",
author = "jK",
}
}
--//=============================================================================
--//
skin.general = {
focusColor = {1.0,... | gpl-2.0 |
GiuseppeGorgoglione/mame | 3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua | 3 | 37567 | --
-- vs2010_vcxproj.lua
-- Generate a Visual Studio 2010 C/C++ project.
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
premake.vstudio.vc2010 = { }
local vc2010 = premake.vstudio.vc2010
local vstudio = premake.vstudio
local function vs2010_config(prj)
_p(1,'<ItemGroup Label="ProjectConfig... | gpl-2.0 |
ld-test/depgraph | src/depgraph/luacheck/parser.lua | 1 | 19580 | local lexer = require "depgraph.luacheck.lexer"
local utils = require "depgraph.luacheck.utils"
local function new_state(src)
return {
lexer = lexer.new_state(src),
code_lines = {}, -- Set of line numbers containing code.
comments = {} -- Array of {comment = string, location = location}.
}
end
... | mit |
ashdnazg/Zero-K | units/dynassault1.lua | 5 | 2658 | unitDef = {
unitname = [[dynassault1]],
name = [[Guardian Commander]],
description = [[Heavy Combat Commander]],
acceleration = 0.18,
activateWhenBuilt = true,
brakeRate = 0.375,
buildCostMetal = 1200,
buildDistance = 144,
builder ... | gpl-2.0 |
vhpham80/luci | applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua | 74 | 2324 | --[[
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 |
atlimit8/OpenRA | mods/ra/maps/allies-05c/allies05c.lua | 7 | 11123 | --[[
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 |
ashdnazg/Zero-K | LuaRules/Utilities/GetUnitIsBuilding.lua | 5 | 3682 | -- $Id:$
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
--
-- Author: jK @2010
-- License: GPLv2 and later
--
-------------------------------------------------------------------------------------... | gpl-2.0 |
vhpham80/luci | applications/luci-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua | 54 | 7297 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 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/Widgets/gfx_lups_units_on_fire.lua | 5 | 3025 | -- $Id: gfx_lups_units_on_fire.lua 3171 2008-11-06 09:06:29Z det $
function widget:GetInfo()
return {
name = "Units on Fire",
desc = "Graphical effect for burning units",
author = "jK/quantum",
date = "Sep, 2008",
license = "GNU GPL, v2 or later",
layer = 10,
enabl... | gpl-2.0 |
caldweln/nn | SpatialDropout.lua | 11 | 1576 | local SpatialDropout, Parent = torch.class('nn.SpatialDropout', 'nn.Module')
function SpatialDropout:__init(p)
Parent.__init(self)
self.p = p or 0.5
self.train = true
self.noise = torch.Tensor()
end
function SpatialDropout:updateOutput(input)
self.output:resizeAs(input):copy(input)
if self.train the... | bsd-3-clause |
interhui/httpdns | utils/number_utils.lua | 2 | 1493 |
local _M = { _VERSION = '0.1' }
function _M:bin2dec(str_num)
local result = 0
local len = string.len(str_num)
local i = len
while i > 0 do
local j = string.sub(str_num, i, i)
result = result + (tonumber(j) * 2 ^ (len - i))
i = i - 1
end
return tostring(result)
end
function _M:dec2bin(str_num)
local... | apache-2.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua | 11 | 2660 |
--------------------------------
-- @module MenuItemFont
-- @extend MenuItemLabel
-- @parent_module cc
--------------------------------
-- Returns the name of the Font.<br>
-- js getFontNameObj<br>
-- js NA
-- @function [parent=#MenuItemFont] getFontNameObj
-- @param self
-- @return string#string ret (return value:... | bsd-3-clause |
cedricporter/everlost | frameworks/cocos2d-x/cocos/scripting/lua-bindings/script/extern.lua | 48 | 2506 | function clone(object)
local lookup_table = {}
local function _copy(object)
if type(object) ~= "table" then
return object
elseif lookup_table[object] then
return lookup_table[object]
end
local new_table = {}
lookup_table[object] = new_table
... | apache-2.0 |
hfjgjfg/persianguard50 | plugins/inpm.lua | 1114 | 3008 | do
local function pairsByKeys (t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
AlexeySa/rspamd | contrib/torch/nn/SpatialDepthWiseConvolution.lua | 4 | 4103 | local THNN = require 'nn.THNN'
local SpatialDepthWiseConvolution, parent = torch.class('nn.SpatialDepthWiseConvolution', 'nn.Module')
function SpatialDepthWiseConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH)
parent.__init(self)
dW = dW or 1
dH = dH or 1
self.nInputPlane = nInputP... | bsd-2-clause |
minaka1412/Cocos3DEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua | 9 | 4935 |
--------------------------------
-- @module AtlasNode
-- @extend Node,TextureProtocol
-- @parent_module cc
--------------------------------
-- updates the Atlas (indexed vertex array).<br>
-- Shall be overridden in subclasses.
-- @function [parent=#AtlasNode] updateAtlasValues
-- @param self
-- @return AtlasNode#At... | mit |
kinotrip/HelloRuby | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Texture2D.lua | 10 | 6902 |
--------------------------------
-- @module Texture2D
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Gets max T
-- @function [parent=#Texture2D] getMaxT
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- returns the pixel format.<b... | gpl-2.0 |
superopen/openwrt-luci | libs/ipkg/luasrc/model/ipkg.lua | 82 | 5778 | --[[
LuCI - Lua Configuration Interface
(c) 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
(c) 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apach... | apache-2.0 |
Wohlhabend-Networks/LunaDLL | LuaScriptsLibExt/pSwitchTicking.lua | 3 | 1057 | --**************************************
-- *
-- pSwitchTicking.lua *
-- v1.0 *
-- *
-- pSwitch Ticking Behaviour for A2XT *
-- *
--*******************************... | gpl-3.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/CCBReader.lua | 19 | 4473 |
--------------------------------
-- @module CCBReader
-- @extend Ref
-- @parent_module cc
--------------------------------
--
-- @function [parent=#CCBReader] addOwnerOutletName
-- @param self
-- @param #string name
-- @return CCBReader#CCBReader self (return value: cc.CCBReader)
--------------------------... | bsd-3-clause |
caldweln/nn | BinaryOutputLinear.lua | 1 | 1088 |
local BinaryOutputLinear, Parent = torch.class('nn.BinaryOutputLinear', 'nn.Linear')
function BinaryOutputLinear:__init(inputSize, outputSize)
Parent.__init(self, inputSize, outputSize)
-- binarized parameters for propagation
self.rvWeight = torch.Tensor(outputSize, inputSize)
self.binWeight = torch.Tenso... | bsd-3-clause |
superopen/openwrt-luci | modules/admin-full/luasrc/model/cbi/admin_network/iface_add.lua | 79 | 3091 | --[[
LuCI - Lua Configuration Interface
Copyright 2009-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$
]]... | apache-2.0 |
ashdnazg/Zero-K | LuaRules/Gadgets/cmd_factory_stop_production.lua | 4 | 2841 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Factory Stop Production",
desc = "Adds a command to clear the factory queue",
author = "Google... | gpl-2.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/TextureData.lua | 19 | 1044 |
--------------------------------
-- @module TextureData
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#TextureData] getContourData
-- @param self
-- @param #int index
-- @return ContourData#ContourData ret (return value: ccs.ContourData)
---------------------... | bsd-3-clause |
cedricporter/everlost | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua | 2 | 1397 |
--------------------------------
-- @module SkeletonAnimation
-- @extend Skeleton
--------------------------------
-- @function [parent=#SkeletonAnimation] addAnimation
-- @param self
-- @param #int int
-- @param #char char
-- @param #bool bool
-- @param #float float
-- @return spTrackEntry#spTrackEntry ret (return ... | apache-2.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua | 19 | 1045 |
--------------------------------
-- @module ArmatureData
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#ArmatureData] addBoneData
-- @param self
-- @param #ccs.BoneData boneData
-- @return ArmatureData#ArmatureData self (return value: ccs.ArmatureData)
------... | bsd-3-clause |
mitterdoo/wire | lua/entities/gmod_wire_expression2/core/debug.lua | 9 | 9471 | -- import some e2lib and math functions
local IsValid = IsValid
local isOwner = E2Lib.isOwner
local Clamp = math.Clamp
local seq = table.IsSequential
/******************************************************************************/
local function checkOwner(self)
return IsValid(self.player);
end
/******... | apache-2.0 |
ArchiveTeam/google-helpouts-grab | table_show.lua | 58 | 3226 | --[[
Author: Julio Manuel Fernandez-Diaz
Date: January 12, 2007
(For Lua 5.1)
Modified slightly by RiciLake to avoid the unnecessary table traversal in tablecount()
Formats tables with cycles recursively to any depth.
The output is returned as a string.
References to other tables are shown as values.... | unlicense |
atlimit8/OpenRA | mods/d2k/maps/harkonnen-03b/harkonnen03b.lua | 7 | 6559 | --[[
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 |
atlimit8/OpenRA | mods/ra/maps/soviet-09/soviet09-AI.lua | 7 | 5339 | --[[
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 |
Serabass/vice-players | Vendor/CEGUI/cegui/src/ScriptingModules/LuaScriptModule/support/tolua++bin/lua/container.lua | 7 | 17047 | -- tolua: container abstract class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: container.lua 1141 2006-05-18 23:58:45Z lindquist $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligat... | gpl-3.0 |
padrinoo/padrino | plugins/google.lua | 722 | 1037 | local function googlethat(query)
local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&"
local parameters = "q=".. (URL.escape(query) or "")
-- Do the request
local res, code = https.request(api..parameters)
if code ~=200 then return nil end
local data = json:decode(res)
local r... | gpl-2.0 |
halilkaya/minetest-mods | technic/technic/machines/other/coal_alloy_furnace.lua | 2 | 5863 |
-- Fuel driven alloy furnace. This uses no EUs:
local S = technic.getter
minetest.register_craft({
output = 'technic:coal_alloy_furnace',
recipe = {
{'default:brick', 'default:brick', 'default:brick'},
{'default:brick', '', 'default:brick'},
{'default:brick', 'default:brick', 'default:brick'},
... | gpl-3.0 |
ashdnazg/Zero-K | LuaUI/Widgets/unit_cloakfirestate2.lua | 5 | 3429 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Cloak Fire State 2",
desc = "Sets units to Hold Fire when cloaked, reverts to original state when d... | gpl-2.0 |
tahabaghshomalazar/CrystaL_bot | plugins/btc.lua | 289 | 1375 | -- See https://bitcoinaverage.com/api
local function getBTCX(amount,currency)
local base_url = 'https://api.bitcoinaverage.com/ticker/global/'
-- Do request on bitcoinaverage, the final / is critical!
local res,code = https.request(base_url..currency.."/")
if code ~= 200 then return nil end
local data = j... | gpl-2.0 |
TeleDALAD/n | plugins/btc.lua | 289 | 1375 | -- See https://bitcoinaverage.com/api
local function getBTCX(amount,currency)
local base_url = 'https://api.bitcoinaverage.com/ticker/global/'
-- Do request on bitcoinaverage, the final / is critical!
local res,code = https.request(base_url..currency.."/")
if code ~= 200 then return nil end
local data = j... | gpl-2.0 |
Culinax/manjaro-awesome-respin | awesome/awesome-overlay/etc/skel/.config/awesome/rc.lua | 1 | 25301 | --[[
Cesious Awesome WM theme
Created by Culinax
--]]
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful =... | gpl-3.0 |
lynnard/cocos2d-hs | cbits/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua | 3 | 9084 |
--------------------------------
-- @module ActionTimeline
-- @extend Action
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#ActionTimeline] clearFrameEndCallFuncs
-- @param self
-- @return ActionTimeline#ActionTimeline self (return value: ccs.ActionTimeline)
---------------... | bsd-3-clause |
halilkaya/minetest-mods | streets/roadsigns/workshop.lua | 1 | 6190 | --[[
StreetsMod: Create signs in the signworkshop
]]
local forms = {
inactive = {
"size[12,10]",
"label[3.5,0;"..streets.S("Sign workshop - Create signs for your roads!").."]",
"label[0,0.5;"..streets.S("Available signs:").."]",
"list[context;streets:signworkshop_list;0,1;5,4]",
"label[9,0.5;"..streets.S("N... | gpl-3.0 |
npmaier/JuJuCast | mods/shamanloyalty/ctf_turret/init.lua | 1 | 3630 | ARROW_DAMAGE = 2
ARROW_VELOCITY = 2
minetest.register_node("ctf_turret:turret", {
description = "Team Turret",
tiles = {
"default_stone.png",
"default_stone.png",
"default_stone.png",
"default_stone.png",
"default_stone.png",
"default_stone.png",
},
drawtype="nodebox",
groups={attached_node=1},
paramt... | gpl-2.0 |
WolfGaming/OpenRA | mods/d2k/maps/harkonnen-03b/harkonnen03b-AI.lua | 4 | 1857 | --[[
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.