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 |
|---|---|---|---|---|---|
Mehranhpr/seed | plugins/owners.lua | 68 | 12477 |
local function lock_group_namemod(msg, data, target)
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'yes' then
return 'Group name is already locked'
else
data[tostring(target)]['setting... | gpl-2.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/AnimationData.lua | 2 | 1089 |
--------------------------------
-- @module AnimationData
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#AnimationData] getMovement
-- @param self
-- @param #string movementName
-- @return MovementData#MovementData ret (return value: ccs.MovementData)
-------... | mit |
Rydra/OpenRA | mods/ra/maps/desert-shellmap/desert-shellmap.lua | 4 | 5096 | local ants = Utils.RandomInteger(0, 51) == 0
if ants then
UnitTypes = { "ant", "ant", "ant" }
BeachUnitTypes = { "ant", "ant" }
ParadropUnitTypes = { "ant", "ant", "ant", "ant", "ant" }
ProducedUnitTypes =
{
{ AlliedBarracks1, { "e1", "e3" } },
{ AlliedBarracks2, { "e1", "e3" } },
{ SovietBarracks1, { "ant"... | gpl-3.0 |
asamy45/forgottenmapeditor | modules/mapeditor_itempalette/itempalette.lua | 1 | 4786 | ItemPalette = {}
local paletteWindow
local paletteList
local comboBox
UIPaletteCreature = extends(UICreature)
function UIPaletteCreature:onMousePress(mousePos, button)
-- TODO: Could optimize this by outfit id?...
_G["currentThing"] = self:getCreature():getName()
ToolPalette.update()
end
UIPaletteItem = extend... | mit |
githubmereza/rezaj | bot/InfernalTG.lua | 1 | 8855 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '1.0'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
retu... | gpl-2.0 |
ETegro/OpenSAN | feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk/dialplan_out.lua | 11 | 3280 | --[[
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: dialplan... | gpl-3.0 |
MNoya/DotaCraft | game/dota_addons/dotacraft/scripts/vscripts/heroes/alchemist/healing_spray.lua | 1 | 1790 | --[[
Author: Noya
Creates a dummy unit to apply the HealingSpray thinker modifier which does the waves
]]
function HealingSprayStart( event )
local caster = event.caster
local point = event.target_points[1]
local ability = event.ability
caster.healing_spray_dummy = CreateUnitByName("dummy_unit_vulnerable", point... | gpl-3.0 |
nekrozar/ygopro-scripts | c65150219.lua | 2 | 1168 | --機甲忍法フリーズ・ロック
function c65150219.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c65150219.condition)
e1:SetOperation(c65150219.activate)
c:RegisterEffect(e1)
--pos limit
local e2=Effect.CreateEffect(c)
e2:SetType... | gpl-2.0 |
nekrozar/ygopro-scripts | c83102080.lua | 6 | 1639 | --パラレル・ツイスター
function c83102080.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c83102080.cost)
e1:SetTarget(c83102080.target)
e1:SetOperation(c83102080... | gpl-2.0 |
nekrozar/ygopro-scripts | c65384188.lua | 2 | 3106 | --実力伯仲
function c65384188.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c65384188.target)
e1:SetOperation(c65384188.activate)
c:RegisterEffect(e1)
end
function c65384188.filter(c)
r... | gpl-2.0 |
vasili-v/themis | vendor/github.com/apache/thrift/lib/lua/TSocket.lua | 113 | 2996 | ---- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may... | apache-2.0 |
kingbuffalo/prototype_code | cpp/ejoy2d_note/examples/ex04.lua | 21 | 1146 | local ej = require "ejoy2d"
local fw = require "ejoy2d.framework"
local pack = require "ejoy2d.simplepackage"
local sprite = require "ejoy2d.sprite"
pack.load {
pattern = fw.WorkDir..[[examples/asset/?]],
"sample",
}
local scissor = false
local obj = ej.sprite("sample","mine")
obj.resource.frame = 70
obj.label.text... | mit |
Domderon/spice-minions | hymn/spawnportal.lua | 1 | 1779 | local Entity = require "smee.game_core.entity"
local Building = require "shared.building"
local LogicCore = require "hymn.logiccore"
local EntityStatics = require "hymn.staticdata.entitystatics"
local SpawnPortal = Building:subclass("SpawnPortal")
function SpawnPortal:initialize(entityStatic, playerId)
Bu... | mit |
andreaskoepf/nn | WeightedEuclidean.lua | 43 | 8173 | 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 |
nekrozar/ygopro-scripts | c59687381.lua | 4 | 1140 | --ディフェンスゾーン
function c59687381.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot be target/indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGE... | gpl-2.0 |
MNoya/DotaCraft | game/dota_addons/dotacraft/scripts/vscripts/heroes/beastmaster/summon_bear.lua | 1 | 1619 | local bearNames = {
[1] = "neutral_beastmaster_bear",
[2] = "neutral_beastmaster_raging_bear",
[3] = "neutral_beastmaster_spirit_bear",
}
function SpawnBear(event)
local caster = event.caster
local ability = event.ability
local duration = ability:GetLevelSpecialValueFor("duration", ability:GetLe... | gpl-3.0 |
theonlywild/otouto | plugins/imdb.lua | 16 | 1101 | local command = 'imdb <query>'
local doc = [[```
/imdb <query>
Returns an IMDb entry.
```]]
local triggers = {
'^/imdb[@'..bot.username..']*'
}
local action = function(msg)
local input = msg.text:input()
if not input then
if msg.reply_to_message and msg.reply_to_message.text then
input = msg.reply_to_message... | gpl-2.0 |
finalsliver/supervillain-ui | SVUI_Skins/components/addons/TradeSkillDW.lua | 2 | 5779 | --[[
##########################################################
S V U I By: Failcoder
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.select... | mit |
finalsliver/supervillain-ui | SVUI_UnitFrames/libs/oUF_1.6.9/elements/combat.lua | 7 | 1931 | --[[ Element: Combat Icon
Toggles the visibility of `self.Combat` based on the player's combat status.
Widget
Combat - Any UI widget.
Notes
The default assistant icon will be applied if the UI widget is a texture and
doesn't have a texture or color defined.
Examples
-- Position and size
local Combat ... | mit |
nekrozar/ygopro-scripts | c87931906.lua | 1 | 4008 | --月光融合
function c87931906.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,87931906+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c87931906.target)
... | gpl-2.0 |
Pandafuchs/iLife | server/Classes/Shop/cWellStackedPizza.lua | 2 | 6351 | CWellStackedPizza = inherit(CShop)
function CWellStackedPizza:constructor(dim)
self.Dim = dim
self.Ped = createPed ( 155, 376.6845703125, -117.2783203125, 1001.4921875, 180, false)
setElementInterior(self.Ped, 5)
setElementDimension(self.Ped, self.Dim)
setElementData(self.Ped, "EastereggPed", true)
new(CShopRob... | mit |
NijigenDevs/QSanguosha-For-Saimoe | extension-doc/2-SkillGeneral.lua | 15 | 8474 | --1.技能
--要说三国杀武将DIY,不得不说的就是技能。
--神杀给技能留的接口,与平时我们所说的技能分类有点区别。
--基本上来讲,技能分为以下几种:
--视为技:
--龙胆、武圣等等
--特点:可以将某牌当作另一种牌使用
--触发技:
--奸雄、反馈等等
--特点:在某个时机,可以执行某某效果
--距离技:
--马术、飞影
--特点:不用说大家都明白
--手牌上限技
--横江(后续效果)
--特点:还能是什么
--克己不是手牌上限技,是触发技
--目标修改技
--咆哮、集智、天义(后续效果)
--特点:修改某张牌在出牌阶段内的使用次数、修改某张牌可以选择的目标人数、修改某张牌可以选择的距离限制
--技能共通:... | gpl-3.0 |
nekrozar/ygopro-scripts | c43661068.lua | 3 | 1554 | --星に願いを
function c43661068.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c43661068.target)
e1:SetOperation(c43661068.activate)
c:RegisterEffect(e1)
end
function c43661068.target(e,tp... | gpl-2.0 |
nekrozar/ygopro-scripts | c64437633.lua | 3 | 1758 | --儀水鏡の幻影術
function c64437633.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c64437633.target)
e1:SetOperation(c64437633.activate)
c:RegisterEffect(e1)
end
function c64437633.filter(c,... | gpl-2.0 |
nekrozar/ygopro-scripts | c14541657.lua | 4 | 2021 | --黄昏の忍者-シンゲツ
function c14541657.initial_effect(c)
--untargetable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c14541657.atlimit)
c:RegisterEffect(e1)
local e2=Effect.Creat... | gpl-2.0 |
venkatarajasekhar/bee | test/db/ipc.test.lua | 1 | 3402 | fiber = require('fiber')
ch = fiber.channel()
ch:size()
ch:count()
ch:is_full()
ch:is_empty()
ch:get(.1)
ch:put()
ch:count()
ch:put('test')
ch:get()
ch:get('wrong timeout')
ch:get(-10)
ch:put(234)
ch:put(345, .5)
ch:count()
ch:is_full()
ch:is_empty()
buffer = {}
--# setopt delimiter ';'
tfbr = fiber.create(
functi... | bsd-2-clause |
venkatarajasekhar/bee | third_party/luafun/tests/operators.lua | 5 | 4619 | --
-- All these functions are fully covered by Lua tests.
-- This test just checks that all functions were defined correctly.
--
print(op == operator) -- an alias
--[[test
true
--test]]
--------------------------------------------------------------------------------
-- Comparison operators
---------------------------... | bsd-2-clause |
ev1l0rd/yalnpv | dfhack/hack/scripts/modtools/equip-item.lua | 1 | 2559 | -- modtools/equip-item.lua
-- equip an item on a unit with a particular body part
--[[=begin
modtools/equip-item
===================
Force a unit to equip an item with a particular body part; useful in
conjunction with the ``create`` scripts above. See also `forceequip`.
=end]]
local utils = require 'utils... | mit |
nekrozar/ygopro-scripts | c96915510.lua | 1 | 3427 | --魔神儀の創造主-クリオルター
function c96915510.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,96915510)
e1:SetConditi... | gpl-2.0 |
FailcoderAddons/SVUI | SVUI_!Core/system/api.lua | 1 | 75489 | --[[
##########################################################
S V U I By: Munglunch
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.se... | mit |
mihailim/koreader | plugins/newsdownloader.koplugin/feed_config.lua | 1 | 1386 | return {--do NOT change this line
--HELP:
-- use syntax: {"http://your-url.com", limit=max_number_of_items_to_be_created, download_full_article=true/false},
-- remember to put coma at the end of each line!
-- you can also edit this file in external text editor. Config file is located under:
-- <your_download_di... | agpl-3.0 |
nekrozar/ygopro-scripts | c62543393.lua | 7 | 1456 | --レクンガ
function c62543393.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62543393,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c62543393.cost)
e1:SetTarget(c62543393.target)
e1:SetOperation(c6254339... | gpl-2.0 |
nekrozar/ygopro-scripts | c64442155.lua | 1 | 1819 | --慈悲深き機械天使
function c64442155.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,64442155+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c64442155.cost)
e1:SetT... | gpl-2.0 |
nekrozar/ygopro-scripts | c74298287.lua | 3 | 2719 | --水精鱗-アビスディーネ
function c74298287.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74298287,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,74298287)
e1:SetCondition(c742... | gpl-2.0 |
chrisJohn404/ljswitchboard-module_manager | lib/switchboard_modules/lua_script_debugger/premade_scripts_addresses/counter_examples/23_counters.lua | 1 | 3048 | --This program demonstrates how to use digital lines as simple counters.
--Most commonly users should throttle their code execution using the functions:
--'LJ.IntervalConfig(0, 1000)', and 'if LJ.CheckInterval(0) then' ...
--Array indeces 1-23 correspond with DIO0-22 as the following:
--Index: 1 Channel... | mit |
nekrozar/ygopro-scripts | c59951714.lua | 2 | 2446 | --アドバンス・ディボーター
function c59951714.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)
--spsummon
local e2=Effect.CreateEffect(c)
e2:S... | gpl-2.0 |
FailcoderAddons/SVUI | SVUI_!Core/system/_docklets/misc.lua | 1 | 7767 | --[[
##########################################################
S V U I By: Munglunch
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select ... | mit |
nekrozar/ygopro-scripts | c30155789.lua | 3 | 3087 | --サディスティック・ポーション
function c30155789.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c30155789.cost)
e1:SetTarget(c30155789.target)
e1:SetOperation(c301557... | gpl-2.0 |
hjsrzvpqma/test | plugins/plugins.lua | 19 | 6327 | do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins folder
local function plugin_exists( ... | gpl-2.0 |
nekrozar/ygopro-scripts | c83326048.lua | 2 | 1619 | --次元障壁
function c83326048.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,83326048+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c83326048.target)
e1:S... | gpl-2.0 |
xuejian1354/attitude_adjustment | feeds/luci/modules/admin-full/luasrc/model/cbi/admin_network/ipv6.lua | 17 | 4011 | --[[
LuCI - Lua Configuration Interface
Copyright 2013 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
]]--
local m,... | gpl-2.0 |
nekrozar/ygopro-scripts | c44686185.lua | 4 | 3381 | --影六武衆-ハツメ
function c44686185.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44686185,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,44686185)
e1:SetRange(LOCATION_MZONE)
... | gpl-2.0 |
chrisjbray/hammerspoon | extensions/fnutils/init.lua | 11 | 20125 | --- === hs.fnutils ===
---
--- Functional programming utility functions
local fnutils = {}
local pairs,ipairs = pairs,ipairs
local floor = math.floor
--- hs.fnutils.imap(list, fn) -> list
--- Function
--- Execute a function across a list-like table in order, and collect the results
---
--- Parameters:
--- * list - ... | mit |
vlc-mirror/vlc-2.1 | share/lua/meta/art/03_lastfm.lua | 3 | 1854 | --[[
Gets an artwork from last.fm
$Id$
Copyright © 2010 the VideoLAN team
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 2 of the License, or
(at your option) any later versio... | lgpl-2.1 |
MidflightDigital/ddrsn3-theme | DDR SN3/BGAnimations/ScreenSelectMusic decorations/SNBPMDisplay.lua | 1 | 3520 | local LoadingScreen = Var "LoadingScreen"
--smcmd is "screen metrics command", gmcmd is "general metrics command"
--these make it require a little less typing to run useful BPMDisplay related commands
local smcmd, gmcmd
do
smcmd = function(s, name)
return (THEME:GetMetric(LoadingScreen, name))(s)
end
gmcmd = funct... | mit |
kuffz/ntopng-bk | scripts/lua/iface_ndpi_stats.lua | 2 | 3262 | --
-- (C) 2013-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
interface.select(ifname)
host_info = url2hostinfo(_GET)
if(_GET["breed"] == "true") then
show_breed = true
els... | gpl-3.0 |
MaxyTibia/forgottenserver | data/npc/lib/npc.lua | 21 | 3182 | -- Including the Advanced NPC System
dofile('data/npc/lib/npcsystem/npcsystem.lua')
function msgcontains(message, keyword)
local message, keyword = message:lower(), keyword:lower()
if message == keyword then
return true
end
return message:find(keyword) and not message:find('(%w+)' .. keyword)
end
function doNp... | gpl-2.0 |
MaxyTibia/forgottenserver | data/talkactions/scripts/looktype.lua | 27 | 1088 | function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
local lookType = tonumber(param)
if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookT... | gpl-2.0 |
adib1380/iranian_bot | plugins/modra.lua | 15 | 11324 | -- 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 not is_admin(msg) then
return "You're not admin!"
end
local group_creator = msg.from.print_name
create_group_chat (group_cr... | gpl-2.0 |
NoriSilverrage/Revamped-Factorio-Machines | RFM-tweaks_1.1.4/prototypes/nuclear.lua | 1 | 2207 | data.raw.item["steam-turbine"].stack_size = 20
data:extend({
{
type = "item",
name = "steam-turbine-2",
icon = "__Nucular__/graphics/icons/steam-turbine.png",
flags = {"goes-to-quickbar"},
subgroup = "nuclear-structure",
order = "b-a",
place_result = "steam-turbine-2",
enabled = false,... | mit |
nabilbendafi/haka | modules/protocol/tcp/tcp_connection.lua | 2 | 18812 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local class = require("class")
local check = require("check")
local ipv4 = require("protocol/ipv4")
local tcp = requ... | mpl-2.0 |
eulerreich/nn | CosineDistance.lua | 26 | 2154 | local CosineDistance, parent = torch.class('nn.CosineDistance', 'nn.Module')
function CosineDistance:__init()
parent.__init(self)
self.gradInput = {torch.Tensor(), torch.Tensor()}
end
function CosineDistance:updateOutput(input)
local input1, input2 = input[1], input[2]
if input1:dim() == 1 then
i... | bsd-3-clause |
LuaDist2/dromozoa-commons | dromozoa/commons/base16.lua | 3 | 3545 | -- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-commons.
--
-- dromozoa-commons 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... | gpl-3.0 |
csteddy/luasocket | test/urltest.lua | 30 | 17349 | local socket = require("socket")
socket.url = require("socket.url")
dofile("testsupport.lua")
local check_build_url = function(parsed)
local built = socket.url.build(parsed)
if built ~= parsed.url then
print("built is different from expected")
print(built)
print(expected)
os.exi... | mit |
mohammadgham/man | bot/sbssbot.lua | 1 | 10346 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '2'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return... | gpl-2.0 |
Nether-Machine/NetherMachine | rotations/shared/Reel/Lures.lua | 1 | 3558 | --[[
Copyright (c) 2014, drizz
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRA... | agpl-3.0 |
Nether-Machine/NetherMachine | NetherMachine_MrTheSoulz/rotations/druid/balance.lua | 1 | 6723 | local fetch = NetherMachine.interface.fetchKey
local exeOnLoad = function()
mts.Splash("|cff9482C9[MTS]-|cffFFFFFF"..(select(2, GetSpecializationInfo(GetSpecialization())) or "Error").."-|cff9482C9Loaded", 5.0)
NetherMachine.toggle.create(
'dotEverything',
'Interface\\Icons\\Ability_creature_cursed_05.png',
'D... | agpl-3.0 |
tederis/mta-resources | xrloader/_compile.lua | 5 | 1459 | local _writeScript = function ( responseData, errno, filepath )
if errno > 0 then
outputDebugString ( "Произошла ошибка " .. errno, 2 )
return
end
local file = fileCreate ( filepath )
if file then
fileWrite ( file, responseData )
fileClose ( file )
else
outputDebugString ( "Файл не создается... | gpl-3.0 |
tederis/mta-resources | wbo_modmanager/_compile.lua | 5 | 1459 | local _writeScript = function ( responseData, errno, filepath )
if errno > 0 then
outputDebugString ( "Произошла ошибка " .. errno, 2 )
return
end
local file = fileCreate ( filepath )
if file then
fileWrite ( file, responseData )
fileClose ( file )
else
outputDebugString ( "Файл не создается... | gpl-3.0 |
tederis/mta-resources | sp_login/_compile.lua | 5 | 1459 | local _writeScript = function ( responseData, errno, filepath )
if errno > 0 then
outputDebugString ( "Произошла ошибка " .. errno, 2 )
return
end
local file = fileCreate ( filepath )
if file then
fileWrite ( file, responseData )
fileClose ( file )
else
outputDebugString ( "Файл не создается... | gpl-3.0 |
suppayami/shoot-la-shoot | data/scripts/class/specific/bullet_enemy_d.lua | 1 | 1093 | BulletEnemyD = class(Bullet)
function BulletEnemyD:spriteClass()
return SpriteBulletEnemyD
end
function BulletEnemyD:spriteLayer()
return "scene"
end
function BulletEnemyD:spriteName()
return "bullet_enemy_d"
end
function BulletEnemyD:moveRateX()
if not self.moveY then return 0 end
if self.moveY... | mit |
teleoktan/teleoktan | plugins/banhammer.lua | 1 | 36752 | local function pre_process(msg)
chat = msg.chat_id_
user = msg.sender_user_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.type_.ID == "UserTy... | gpl-3.0 |
szymonkaliski/Dotfiles | Dotfiles/hammerspoon/bindings/global.lua | 1 | 1665 | local module = {}
local grid = require('ext.grid')
local smartLaunchOrFocus = require('ext.application').smartLaunchOrFocus
local system = require('ext.system')
local window = require('ext.window')
-- local toggleCaffeine = require('utils.controlplane.caffeine').toggleCaffeine
--... | mit |
BooM-amour/koskhol | plugins/owners.lua | 4 | 12713 |
local function lock_group_namemod(msg, data, target)
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'yes' then
return 'Group name is already locked'
else
data[tostring(target)]['setting... | gpl-2.0 |
ld-test/dromozoa-graph | test/test_bfs.lua | 2 | 2068 | -- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-graph.
--
-- dromozoa-graph 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... | gpl-3.0 |
eulerreich/nn | FlattenTable.lua | 24 | 3131 | local FlattenTable, parent = torch.class('nn.FlattenTable', 'nn.Module')
function FlattenTable:__init()
parent.__init(self)
self.output = {}
self.input_map = {}
self.gradInput = {}
end
-- Recursive function to flatten a table (output is a table)
local function flatten(output, input)
local input_map -- has... | bsd-3-clause |
marqueza/syzygy | lib/rotLove/src/rot/type/pointSet.lua | 2 | 1544 | --- Pair set.
-- An unordered collection of unique value-pairs.
-- @module ROT.Type.PointSet
local ROT = require((...):gsub(('.[^./\\]*'):rep(2) .. '$', ''))
local PointSet = ROT.Class:extend("PointSet")
function PointSet:init()
self._index = {}
end
local function hash(x, y)
return x and y * 0x4000000 + x or ... | gpl-3.0 |
MaxyTibia/forgottenserver | data/talkactions/scripts/create_item.lua | 24 | 1147 | function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:split(",")
local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if... | gpl-2.0 |
jmackellar/Touhoulike | lib/rotLove/rot/map/arena.lua | 2 | 1180 | --- The Arena map generator.
-- Generates an arena style map. All cells except for the extreme borders are floors. The borders are walls.
-- @module ROT.Map.Arena
local ROT = require((...):gsub(('.[^./\\]*'):rep(2) .. '$', ''))
local Arena = ROT.Map:extend("Arena")
--- Constructor.
-- Called with ROT.Map.Arena:new(widt... | gpl-3.0 |
sneakin/MrRobOboto | data/blocks/minecraft.lua | 1 | 15685 | return {
["minecraft:air"] = { 0 }, -- false {}
["minecraft:stone"] = { 1 }, -- true {variant="stone"}
["minecraft:grass"] = { 2 }, -- true {snowy="false"}
["minecraft:dirt"] = { 3 }, -- true {variant="dirt",snowy="false"}
["minecraft:cobblestone"] = { 4 }, -- false {}
["minecraft:planks"] = { 5 }, -- true ... | gpl-3.0 |
qwertzdenek/elevator-music-generator | load_midi.lua | 1 | 2188 | -- load_midi.lua
-- Zdeněk Janeček, 2016 (ycdmdj@gmail.com)
--
-- University of West Bohemia
MIDI=require 'MIDI'
require 'paths'
input_pool = {}
roll_height = 88
number_count = 0
function init_pool(conf)
for fname in paths.files(conf.data_dir) do
if fname ~= '..' and fname ~= '.' then
local piano_roll = load_... | gpl-3.0 |
sjznxd/lc-20130112 | 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 |
quyse/flaw | flaw-lua-refimpl/src/lua-5.3.4-tests/bitwise.lua | 12 | 9209 | -- $Id: bitwise.lua,v 1.26 2016/11/07 13:11:28 roberto Exp $
-- See Copyright Notice in file all.lua
print("testing bitwise operations")
local numbits = string.packsize('j') * 8
assert(~0 == -1)
assert((1 << (numbits - 1)) == math.mininteger)
-- basic tests for bitwise operators;
-- use variables to avoid constant... | mit |
djkamran021/antispambot | plugins/setrank.lua | 40 | 8897 | do
local Dev = 122774063 --put your id here(BOT OWNER ID)
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, 'مقام کاربر... | gpl-2.0 |
SherlockMe/basewars.1.1 | gamemode/modules/money.lua | 2 | 2697 | MODULE.Name = "Money"
MODULE.Author = "Q2F2, Ghosty and Tenrys"
MODULE.Credits = "Based on sh_money by Tenrys; https://github.com/Tenrys/tenrys-scripts/blob/master/lua/autorun/sh_money.lua"
local tag = "BaseWars.Money"
local tag_escaped = "basewars_money"
local PLAYER = debug.getregistry().Player
local function is... | apache-2.0 |
NoriSilverrage/Revamped-Factorio-Machines | RFM-tweaks_1.1.4/prototypes/hardcrafting.lua | 1 | 7593 | data:extend({
{
type = "item",
name = "crusher-2",
icon = modname.."/graphics/icons/crusher-2.png",
flags = {"goes-to-quickbar"},
subgroup = "advanced-processing-machine",
order = "f",
place_result = "crusher-2",
enabled = false,
stack_size = 50
},
{
type = "item",
name =... | mit |
kmul00/nn | BCECriterion.lua | 12 | 2712 | local BCECriterion, parent = torch.class('nn.BCECriterion', 'nn.Criterion')
local eps = 1e-12
function BCECriterion:__init(weights, sizeAverage)
parent.__init(self)
if sizeAverage ~= nil then
self.sizeAverage = sizeAverage
else
self.sizeAverage = true
end
if weights ~= nil then
... | bsd-3-clause |
georgerbr/gamecode4 | Assets/Scripts/TeapotStates.lua | 44 | 13650 | --========================================================================
-- ActorManager.lua : Defines all the states for an AI controlled teapot
--
-- Part of the GameCode4 Application
--
-- GameCode4 is the sample application that encapsulates much of the source code
-- discussed in "Game Coding Complete - 4t... | lgpl-3.0 |
17twenty/sysdig | userspace/sysdig/chisels/topfiles_errors.lua | 1 | 1131 | --[[
Copyright (C) 2013-2014 Draios inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without... | gpl-2.0 |
kmul00/nn | SpatialConvolution.lua | 2 | 5080 | local THNN = require 'nn.THNN'
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 =... | bsd-3-clause |
ufoai/ufoai | base/ufos/ui/initialsettings.lua | 2 | 5931 | --!usr/bin/lua
--[[
-- @file
-- @brief Initial settings popup
--]]
--[[
Copyright (C) 2002-2020 UFO: Alien Invasion.
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 2
of the License,... | gpl-2.0 |
DuanWeiye/rpiBot | Others/Arduino_Code/TempWebServer/main.lua | 1 | 3857 | #!/usr/bin/lua
--HTTP header
print [[
Content-Type: text/plain
]]
warningTemperature = 40
successReturnText = "succ_ardu_openwrt"
localLogPath = "/mnt/web/data/node_"
globalLogPath = "/mnt/web/data/global.log"
mailList = "/mnt/web/data/mail.list"
mailTempPath = "/tmp/warning.mail"
maskCode = "ArduinoEnvNode"
fun... | mit |
tederis/mta-resources | papi/postprocess_client.lua | 1 | 4952 | --[[
Postprocess & XRAY & 30.06.2012
Эффекты постпроцессинга:
-Add color(оттенок изображения)
-Base color
-Gray color(насыщенность)
-Duality(раздвоение изображения)
-Noise(шум)
-Blur(размытие изображения)
-ColorMapper
Постэффекты можно анимировать посредством ключей
]]
sw, sh = guiG... | gpl-3.0 |
htx/mmoserver | data/script/TatooineNpcTest.lua | 4 | 9195 | -- Tatooine NPC test
-- This script will not start until Zoneserver is ready.
-- math.pi
local MM = require 'Script/TatooineNpcTest2'
local baseUpdateTime = 750
-- local spawnPosX = -1197
local spawnPosX = -1325.0
local defaultYPos = 12
-- local spawnPosZ = -3561
local spawnPosZ = -3657.0
local spawnPos1X = -1212... | gpl-3.0 |
mero97/Hp_II303II | plugins/leave_bot.lua | 1 | 3147 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY MOHAMMED HISHAM ▀▄ ▄▀
▀▄ ▄▀ BY MOHAMMEDHISHAM (@TH3BOSS) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY MOHAMMED HISHAM ▀▄ ▄▀
▀▄ ▄▀ ANTI BOT : منع بوتات ▀▄ ▄▀
▀▄▀▀▄▄▀▀▄▄▀▄▄... | gpl-2.0 |
To0fan/ali | plugins/all.lua | 184 | 4452 | do
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_print_name(user)..' ['..user_id..']'
return u... | gpl-2.0 |
HenrytheSlav/OpenRA | mods/ra/maps/allies-05a/allies05a-AI.lua | 4 | 6731 |
IdlingUnits = { }
AttackGroupSize = 6
Barracks = { Barracks2, Barracks3 }
Rallypoints = { VehicleRallypoint1, VehicleRallypoint2, VehicleRallypoint3, VehicleRallypoint4, VehicleRallypoint5 }
WaterLZs = { WaterLZ1, WaterLZ2 }
Airfields = { Airfield1, Airfield2 }
Yaks = { }
SovietInfantryTypes = { "e1", "e1", "e2", ... | gpl-3.0 |
quyse/flaw | flaw-lua-refimpl/src/lua-5.3.4-tests/all.lua | 5 | 7672 | #!../lua
-- $Id: all.lua,v 1.95 2016/11/07 13:11:28 roberto Exp $
-- See Copyright Notice at the end of this file
local version = "Lua 5.3"
if _VERSION ~= version then
io.stderr:write("\nThis test suite is for ", version, ", not for ", _VERSION,
"\nExiting tests\n")
return
end
_G._ARG = arg -- save arg fo... | mit |
MidflightDigital/ddrsn3-theme | DDR SN3/Graphics/ScreenGameplay LifeFrame/_old.lua | 1 | 5254 | -- gameplay life frame
-- The math.floor(10000*aspect) trick is used to circumvent float precision problems.
local aspectRatioSuffix = {
[math.floor(10000*4/3)] = " 4_3",
[math.floor(10000*16/9)] = " 16_9",
[math.floor(10000*16/10)] = " 16_9"
}
--fall back on the 4:3 frame if we don't know about this aspect ratio a... | mit |
adib1380/iranian_bot | plugins/stats.lua | 5 | 3759 | do
local NUM_MSG_MAX = 6
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..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
-- Returns a table with `... | gpl-2.0 |
renyidong/milkywayathome_client | nbody/tests/GenerateResults.lua | 4 | 3175 |
require "NBodyTesting"
require "persistence"
local arg = {...}
local nbodyBinary = assert(arg[1])
local nbodyFlags = getExtraNBodyFlags()
eprintf("NBODY_FLAGS = %s\n", nbodyFlags)
local testDir = "orphan_models"
math.randomseed(os.time())
-- When generating results, write results to stdout and everything
-- else ... | gpl-3.0 |
me2beats/reapack | Tracks/me2beats_Translit (sel tracks names).lua | 1 | 1408 | -- @description Translit (sel tracks names)
-- @version 1.0
-- @author me2beats
-- @changelog
-- + init
local r = reaper; local function nothing() end; local function bla() r.defer(nothing) end
local tracks = r.CountSelectedTracks()
if tracks == 0 then bla() return end
local v = {}
v['А']='A'
v['Б']='B'
v['В']='V... | gpl-3.0 |
alirezanile/BiG-BoSS | 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 |
openwisp/openwisp-controller-http | openwisp-config/files/sbin/openwisp-store-unmanaged.lua | 1 | 3126 | #!/usr/bin/env lua
-- stores unmanaged configurations
local os = require('os')
local io = require('io')
local uci = require('uci')
local utils = require('openwisp.utils')
local sections
local arg={...}
-- parse arguments
local test = false
for key, value in pairs(arg) do
-- test argument
if value == '--test=1... | gpl-3.0 |
HenrytheSlav/OpenRA | mods/cnc/maps/gdi06/gdi06.lua | 12 | 6352 | IslandSamSites = { SAM01, SAM02 }
NodBase = { PowerPlant1, PowerPlant2, PowerPlant3, PowerPlant4, PowerPlant5, Refinery, HandOfNod, Silo1, Silo2, Silo3, Silo4, ConYard, CommCenter }
FlameSquad = { FlameGuy1, FlameGuy2, FlameGuy3 }
FlameSquadRoute = { waypoint4.Location, waypoint12.Location, waypoint4.Location, waypoin... | gpl-3.0 |
marqueza/syzygy | lib/lovetoys/src/System.lua | 3 | 2895 | -- Getting folder that contains our src
local folderOfThisFile = (...):match("(.-)[^%/%.]+$")
local lovetoys = require(folderOfThisFile .. 'namespace')
local System = lovetoys.class("System")
function System:initialize()
-- Liste aller Entities, die die RequiredComponents dieses Systems haben
self.targets = {... | gpl-3.0 |
Zhen-hao/lstm | data.lua | 9 | 1953 | --
---- Copyright (c) 2014, Facebook, Inc.
---- All rights reserved.
----
---- This source code is licensed under the Apache 2 license found in the
---- LICENSE file in the root directory of this source tree.
----
local stringx = require('pl.stringx')
local file = require('pl.file')
local ptb_path = "./data/"
l... | apache-2.0 |
me2beats/reapack | Markers and regions/me2beats_Set time selection to nearest project or tempo markers from mouse.lua | 1 | 1589 | -- @description Set time selection to nearest project or tempo markers from mouse
-- @version 1.13
-- @author me2beats
-- @changelog
-- + init
local r = reaper; local function nothing() end; local function bla() r.defer(nothing) end
local t_start,t_end,m_start,m_end,m_start_i,t_start_i,mouse,x,y
local window, segme... | gpl-3.0 |
teleoktan/teleoktan | libs/serpent.lua | 31 | 8016 | 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-3.0 |
jtg-gg/skia | tools/lua/skia.lua | 207 | 1863 | -- Experimental helpers for skia --
function string.startsWith(String,Start)
return string.sub(String,1,string.len(Start))==Start
end
function string.endsWith(String,End)
return End=='' or string.sub(String,-string.len(End))==End
end
Sk = {}
function Sk.isFinite(x)
return x * 0 == 0
end
----------------... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.