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 |
|---|---|---|---|---|---|
MinetestForFun/minetest-minetestforfun-server | mods/homedecor_modpack/homedecor/shutters.lua | 13 | 1774 | -- Various kinds of window shutters
local S = homedecor.gettext
local shutters = {
{"oak", "Unpainted oak", "#bf8a51:200" },
{"mahogany", "Mahogany", "#822606:200" },
{"red", "Red", "#d00000:150" },
{"yellow", "Yellow", "#ffff00:150" },
{"forest_green", "Forest g... | unlicense |
dev-osrose/osIROSE-new | scripts/mobs/ai/red_flanae.lua | 2 | 1931 | registerNpc(43, {
walk_speed = 0,
run_speed = 0,
scale = 100,
r_weapon = 1073,
l_weapon = 0,
level = 16,
hp = 28,
attack = 80,
hit = 70,
def = 45,
res = 32,
avoid ... | apache-2.0 |
notcake/gooey | lua/gooey/ui/visibilitycontroller.lua | 1 | 1816 | local self = {}
Gooey.VisibilityController = Gooey.MakeConstructor (self, Gooey.BooleanController)
--[[
Events:
VisibleChanged (visible)
Fired when the visibility of the object this controller controls has changed.
]]
function self:ctor (control)
self.Control = nil
self:SetControl (control)
end... | gpl-3.0 |
ibawt/ev | vendor/lua/luassert/languages/ja.lua | 1 | 2586 | local s = require('say')
s:set_namespace('ja')
s:set("assertion.same.positive", "オブジェクトの内容が同一であることが期待されています。実際の値:\n%s\n期待されている値:\n%s")
s:set("assertion.same.negative", "オブジェクトの内容が同一でないことが期待されています。実際の値:\n%s\n期待されていない値:\n%s")
s:set("assertion.equals.positive", "オブジェクトが同一であることが期待されています。実際の値:\n%s\n期待されている値:\n%s")
s:set(... | mit |
MinetestForFun/minetest-minetestforfun-server | minetestforfun_game/mods/default/aliases.lua | 6 | 5593 | -- mods/default/aliases.lua
-- Aliases to support loading worlds using nodes following the old naming convention
-- These can also be helpful when using chat commands, for example /giveme
minetest.register_alias("stone", "default:stone")
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
minetest.re... | unlicense |
dev-osrose/osIROSE-new | scripts/mobs/ai/phantomsword.lua | 2 | 8985 | registerNpc(821, {
walk_speed = 140,
run_speed = 700,
scale = 130,
r_weapon = 0,
l_weapon = 0,
level = 54,
hp = 1542,
attack = 190,
hit = 166,
def = 141,
res = 58,
avoid ... | apache-2.0 |
siktirmirza/infernal | plugins/Banhammer.lua | 22 | 10356 |
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 |
ZhuanJia/my-skynet | lualib/snax.lua | 9 | 3269 | local skynet = require "skynet"
local snax_interface = require "snax.interface"
local snax = {}
local typeclass = {}
local G = { require = function() end }
skynet.register_protocol {
name = "snax",
id = skynet.PTYPE_SNAX,
pack = skynet.pack,
unpack = skynet.unpack,
}
function snax.interface(name)
if typeclass... | mit |
Amorph/premake-dev | src/base/help.lua | 26 | 1220 | --
-- help.lua
-- User help, displayed on /help option.
-- Copyright (c) 2002-2008 Jason Perkins and the Premake project
--
function premake.showhelp()
-- display the basic usage
printf("Premake %s, a build script generator", _PREMAKE_VERSION)
printf(_PREMAKE_COPYRIGHT)
printf("%s %s", _VERSION, _COPYRIGHT... | bsd-3-clause |
APItools/middleware | middleware/500-webhook/500_webhook_spec.lua | 1 | 1576 | local spec = require 'spec.spec'
describe('500 Webhook', function()
local webhook
before_each(function()
webhook = spec.middleware('500-webhook/500_webhook.lua')
end)
describe('when the status is not 500', function()
it('does nothing', function()
local request = spec.request({method = 'G... | mit |
oregamikiller/cocos2dPod | cocos/scripting/lua-bindings/auto/api/ControlButton.lua | 6 | 14222 |
--------------------------------
-- @module ControlButton
-- @extend Control
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ControlButton] isPushed
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the title label to use fo... | mit |
MinetestForFun/minetest-minetestforfun-server | mods/pipeworks/models.lua | 9 | 1620 | -----------------------------------
-- The various pipe select boxes
pipeworks.pipe_selectboxes = {
{ -32/64, -8/64, -8/64, 8/64, 8/64, 8/64 },
{ -8/64 , -8/64, -8/64, 32/64, 8/64, 8/64 },
{ -8/64 , -32/64, -8/64, 8/64, 8/64, 8/64 },
{ -8/64 , -8/64, -8/64, 8/64, 32/64, 8/64 },
{ -8/64 , -8/64, ... | unlicense |
MinetestForFun/minetest-minetestforfun-server | minetestforfun_game/mods/creative/init.lua | 6 | 8326 | -- minetest/creative/init.lua
creative = {}
local player_inventory = {}
local creative_mode = minetest.setting_getbool("creative_mode")
-- Create detached creative inventory after loading all mods
creative.init_creative_inventory = function(owner)
local owner_name = owner:get_player_name()
player_inventory[owner_na... | unlicense |
TsarN/uber-os | packages/uberkernel/drivers/fs/devfs/devfs.lua | 1 | 1812 | --DevFs Driver
local devfs = {}
function devfs.loadFs()
if udev then
return {}, true
else
printError("[devfs] udev not found!")
return nil, false
end
end
function devfs.getSize() return 0 end
function devfs.list(mountPath, device, path)
return udev.getMnemonics()
end
functio... | mit |
tgcloner/how- | bot/utils.lua | 646 | 23489 | 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 |
sogandmusic/sogbot2 | bot/utils.lua | 646 | 23489 | 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 |
phanhuy1502/FYP | gap/multigap.lua | 1 | 5062 | require 'torch'
require 'nn'
require 'LanguageModel'
require 'gap/utils'
require 'gap/singlegap'
-- fill in a string with multiple gaps
-- string_with_gap: the string to fill in
-- gap_char: the character which denoting the 'gap' (e.g. string.char(127))
-- model: loaded sequence model
-- return: an object with
-- gap... | mit |
crazyhamedboy/botoliver | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
opentomb/OpenTomb | scripts/entity/entities/tr1/characters/tr1_cowboy.lua | 1 | 1856 | function cowboy_init(id)
basic_init(id);
setCharacterParam(id, PARAM_HEALTH, TR1_COWBOY, TR1_COWBOY);
setEntityGhostCollisionShape(id, 0, COLLISION_SHAPE_SPHERE, -60.0, nil, 0, 60.0, nil, 16.0); -- base
setEntityGhostCollisionShape(id, 7, COLLISION_SHAPE_BOX, nil, nil, nil, nil, nil, nil); ... | lgpl-3.0 |
oregamikiller/cocos2dPod | cocos/scripting/lua-bindings/auto/api/SceneReader.lua | 19 | 1434 |
--------------------------------
-- @module SceneReader
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#SceneReader] setTarget
-- @param self
-- @param #function selector
-- @return SceneReader#SceneReader self (return value: ccs.SceneReader)
--------------------------------... | mit |
SquidDev/luaj.luajc | src/test/resources/org/squiddev/luaj/patches/stringMisc.lua | 1 | 1487 | -- From penlight. They break normally.
local res = string.format("%5.2f %5.2f %5.2f!", 20, 5.2e-2, 52.3)
assert(res == "20.00 0.05 52.30!")
-- %b[] fails if no matches
assert(("foobar"):match("%b[]") == nil)
-- More advanced example
local ptrn = "\n ? ? ?(%b[]):[ \t]*\n?[ \t]*<?([^%s>]+)>?[ \t]*[ \t]+\n?[ \t]*[\"'(]... | mit |
Amorph/premake-dev | tests/actions/vstudio/vc2010/test_assembly_refs.lua | 1 | 1609 | --
-- tests/actions/vstudio/vc2010/test_assembly_refs.lua
-- Validate managed assembly references in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local suite = test.declare("vs2010_assembly_refs")
local vc2010 = premake.vstudio.vc2010
--
-- Setup
--
local sln,... | bsd-3-clause |
spurra/ss-infogan | helper_functions.lua | 1 | 7137 | -------------------------------------------------
--
-- HELPER FUNCTIONS
--
-------------------------------------------------
-- Constructs the target for the discriminator based on the generators input
-- contained in 'tensor'. The flag indicates if it should construct it for the
-- semi-supervised or unsupervised h... | mit |
dev-osrose/osIROSE-new | scripts/mobs/ai/small_clown.lua | 2 | 1066 | registerNpc(181, {
walk_speed = 180,
run_speed = 700,
scale = 95,
r_weapon = 0,
l_weapon = 0,
level = 47,
hp = 28,
attack = 232,
hit = 142,
def = 146,
res = 64,
avoid ... | apache-2.0 |
Sxcret/FrenchRP | gamemode/modules/fadmin/fadmin/playeractions/chatmute/sv_init.lua | 10 | 2668 | local function MuteChat(ply, cmd, args)
if not args[1] then return false end
local targets = FAdmin.FindPlayer(args[1]) or {}
if not targets or #targets == 1 and not IsValid(targets[1]) then
FAdmin.Messages.SendMessage(ply, 1, "Player not found")
return false
end
local time = tonum... | mit |
oregamikiller/cocos2dPod | cocos/scripting/lua-bindings/auto/api/GridAction.lua | 11 | 1389 |
--------------------------------
-- @module GridAction
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
-- brief Get the pointer of GridBase.<br>
-- return The pointer of GridBase.
-- @function [parent=#GridAction] getGrid
-- @param self
-- @return GridBase#GridBase ret (return value: ... | mit |
kusk356/fucktion | plugins/danbooru.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
dev-osrose/osIROSE-new | scripts/mobs/ai/junon's_grunter.lua | 2 | 1073 | registerNpc(402, {
walk_speed = 260,
run_speed = 670,
scale = 330,
r_weapon = 138,
l_weapon = 0,
level = 66,
hp = 211,
attack = 352,
hit = 223,
def = 241,
res = 147,
avoid... | apache-2.0 |
fpoli/PassiveSniffer | lua/utils.lua | 1 | 1654 | -- calling tostring() on random FieldInfo's can cause an error, so this func handles it
function getstring(finfo)
local ok, val = pcall(tostring, finfo)
if not ok then val = "" end
return val
end
function hex2ascii(data)
decoded = ""
for hex_char in string.gmatch(data, "([0-9a-f][0-9a-f])") do
new_char = string... | gpl-2.0 |
dev-osrose/osIROSE-new | scripts/mobs/ai/pincer_queen.lua | 2 | 1072 | registerNpc(512, {
walk_speed = 250,
run_speed = 550,
scale = 250,
r_weapon = 0,
l_weapon = 0,
level = 153,
hp = 38,
attack = 655,
hit = 440,
def = 570,
res = 430,
avoid ... | apache-2.0 |
PurgePJ/VouchBot | deps/secure-socket/init.lua | 1 | 1088 | --[[
Copyright 2016 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | gpl-3.0 |
Midiman/Verde | libs/dominatrix/properties/display.lua | 1 | 13018 | local path = (...):gsub('%.[^%.]+$', '') .. "."
local Flex = require(path.."flex")
local Display = {}
function Display.position_elements(elements, d, x, y, w, h)
if #elements == 0 then return end
local d = d or "child"
local x = x or 0
local y = y or 0
local nl = 0 -- new line
-- Parent box
local par... | mit |
lsm/google-diff-match-patch | lua/diff_match_patch.lua | 265 | 73869 | --[[
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser.
* Ported to Lua by Duncan Cross.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | apache-2.0 |
meiwenhui/google-diff-match-patch | lua/diff_match_patch.lua | 265 | 73869 | --[[
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser.
* Ported to Lua by Duncan Cross.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | apache-2.0 |
phanhuy1502/FYP | gap/test_model_checkSequenceLikelihood.lua | 1 | 2122 | require 'torch'
require 'nn'
require 'LanguageModel'
require 'gap/utils'
require 'gap/singlegap'
CHECKPOINT_PATH = 'models/cv/checkpoint_17000.t7'
local model = get_model_by_path(CHECKPOINT_PATH)
---------------------------------------
-- TEST MODEL:checkSequenceLikelihood
----------------------------------------
-- p... | mit |
pperichon/domoticz | scripts/dzVents/examples/check dead devices by desc.lua | 25 | 1272 | --Check dead device using their description
--This allow to configure device to be checked directly in domoticz GUI by accessing to device details and add "CDA:<delayInMinute>"
--You have to active http fetching !
return {
active = true,
on = {
['timer'] = {
'every 60 minutes'
}
},
execu... | gpl-3.0 |
eskibars/domoticz | scripts/dzVents/examples/check dead devices by desc.lua | 25 | 1272 | --Check dead device using their description
--This allow to configure device to be checked directly in domoticz GUI by accessing to device details and add "CDA:<delayInMinute>"
--You have to active http fetching !
return {
active = true,
on = {
['timer'] = {
'every 60 minutes'
}
},
execu... | gpl-3.0 |
dev-osrose/osIROSE-new | scripts/mobs/ai/moon_sister_inguz.lua | 2 | 1075 | registerNpc(654, {
walk_speed = 450,
run_speed = 850,
scale = 140,
r_weapon = 1130,
l_weapon = 0,
level = 157,
hp = 41,
attack = 850,
hit = 389,
def = 592,
res = 310,
avoi... | apache-2.0 |
Sxcret/FrenchRP | gamemode/modules/voting/sv_questions.lua | 1 | 1620 | local Question = {}
local Questions = {}
local function ccDoQuestion(ply, cmd, args)
if not Questions[args[1]] then return end
if not tonumber(args[2]) then return end
Questions[args[1]]:handleNewQuestion(tonumber(args[2]))
end
concommand.Add("ans", ccDoQuestion)
local function handleQuestionEnd(id)
... | mit |
ibawt/ev | vendor/lua/busted/outputHandlers/TAP.lua | 3 | 1514 | local pretty = require 'pl.pretty'
local tablex = require 'pl.tablex'
return function(options, busted)
local handler = require 'busted.outputHandlers.base'(busted)
local getFullName = function(context)
local parent = context.parent
local names = { (context.name or context.descriptor) }
while parent a... | mit |
cms-sw/apt-rpm | contrib/guess/guess.lua | 3 | 1450 | -- This script will try to change the requested names in a few
-- ways, trying to guess an available package. It must be plugged
-- in the slot Scripts::AptGet::Install::TranslateArg
--
-- Author: Gustavo Niemeyer <niemeyer@conectiva.com>
-- Allow someone to disable this without removing the script.
if confget("APT::G... | gpl-2.0 |
cms-sw/apt-rpm | contrib/list-nodeps/list-nodeps.lua | 3 | 1239 | -- This script will list all installed packages which are not
-- required by any other installed package. It must be plugged
-- in the slot Scripts::AptCache::Command
--
-- Author: Gustavo Niemeyer <niemeyer@conectiva.com>
if script_slot == "Scripts::AptCache::Help::Command" then
print(_(" list-nodeps - Show ins... | gpl-2.0 |
Sxcret/FrenchRP | gamemode/modules/fadmin/fadmin/logging/sv_init.lua | 2 | 7821 | local logging
FAdmin.StartHooks["Logging"] = function()
FAdmin.Access.AddPrivilege("Logging", 3)
FAdmin.Commands.AddCommand("Logging", function(ply, cmd, args)
if not FAdmin.Access.PlayerHasPrivilege(ply, "Logging") then FAdmin.Messages.SendMessage(ply, 5, "No access!") return false end
if not t... | mit |
MinetestForFun/minetest-minetestforfun-server | mods/throwing/fireworks_arrows.lua | 8 | 5707 | local function throwing_register_fireworks(color, desc)
minetest.register_craftitem("throwing:arrow_fireworks_" .. color, {
description = desc .. "fireworks arrow",
inventory_image = "throwing_arrow_fireworks_" .. color .. ".png",
})
minetest.register_node("throwing:arrow_fireworks_" .. color .. "_box", {
dra... | unlicense |
Sxcret/FrenchRP | gamemode/modules/fadmin/fadmin/playeractions/changeteam/sv_init.lua | 1 | 1950 | local function checkFrenchRP(ply, target, t)
if not FrenchRP then return true end
local TEAM = RPExtraTeams[t]
if not TEAM then return true end
if TEAM.customCheck and not TEAM.customCheck(target) then
return false
end
local hookValue = hook.Call("playerCanChangeTeam", nil, target, t,... | mit |
cryovat/frost | src/main.lua | 1 | 1045 | local fw = require "fw.init"
local menu = fw.menu
local function quit()
love.event.push("quit")
end
local function mainMenu(prev)
return menu.makeMenu(nil,
{ "fw" },
{ "Quit", quit }
)
end
function love.load()
gs = mainMenu(nil)
end
function love.update(e)
local nextState = gs:update(e... | mit |
DevLoL/super-mario-count | software/mqtt-client.lua | 1 | 2417 |
local module = {}
local client = nil
local options = nil
function module.setup(opts, connected)
module.options = opts
print ("mqtt-client setup")
client = mqtt.Client(module.options.id, 12, module.options.user, module.options.password)
client:lwt(module.options.endpoint .. "status", "offline", 0, 1... | mit |
Amorph/premake-dev | tests/base/test_detoken.lua | 5 | 2066 | --
-- tests/base/test_detoken.lua
-- Test suite for the token expansion API.
-- Copyright (c) 2011-2012 Jason Perkins and the Premake project
--
local suite = test.declare("detoken")
local detoken = premake.detoken
--
-- Setup
--
local x
local environ = {}
--
-- The contents of the token should be executed a... | bsd-3-clause |
hery/nn | Parallel.lua | 39 | 3780 | local Parallel, parent = torch.class('nn.Parallel', 'nn.Container')
function Parallel:__init(inputDimension,outputDimension)
parent.__init(self)
self.modules = {}
self.size = torch.LongStorage()
self.inputDimension = inputDimension
self.outputDimension = outputDimension
end
function Parallel:updateOut... | bsd-3-clause |
PurgePJ/VouchBot | deps/discordia/libs/client/Resolver.lua | 1 | 3710 | local fs = require('fs')
local ssl = require('openssl')
local class = require('class')
local enums = require('enums')
local permission = enums.permission
local actionType = enums.actionType
local base64 = ssl.base64
local readFileSync = fs.readFileSync
local classes = class.classes
local isInstance = class.i... | gpl-3.0 |
shahin20nice/nic | libs/feedparser.lua | 5 | 11968 | local LOM = assert(require("lxp.lom"), "LuaExpat doesn't seem to be installed. feedparser kind of needs it to work...")
local XMLElement = (loadfile "./libs/XMLElement.lua")()
local dateparser = (loadfile "./libs/dateparser.lua")()
local URL = (loadfile "./libs/url.lua")()
local tinsert, tremove, tconcat = table.insert... | gpl-3.0 |
i-z/cocos2d-x-samples | samples/KillBug/src/cocos/framework/init.lua | 35 | 2697 | --[[
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... | mit |
cogddo/vlc | share/lua/playlist/vimeo.lua | 65 | 3213 | --[[
$Id$
Copyright © 2009-2013 the VideoLAN team
Authors: Konstantin Pavlov (thresh@videolan.org)
François Revol (revol@free.fr)
Pierre Ynard
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 S... | gpl-2.0 |
alikingambav/archer3 | plugins/filtering.lua | 13 | 5866 | local function save_filter(msg, name, value)
local hash = nil
if msg.to.type == 'chat' then
hash = 'chat:'..msg.to.id..':filters'
end
if msg.to.type == 'user' then
return 'فقط در گروه'
end
if hash then
redis:hset(hash, name, value)
return "انجام شد"
end
end
local function get_filter_hash(msg)
if msg.to... | gpl-2.0 |
chen0031/Dato-Core | src/unity/python/graphlab/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... | agpl-3.0 |
PurgePJ/VouchBot | deps/discordia/containers/Snowflake.lua | 4 | 1185 | local Container = require('../utils/Container')
local date = os.date
local modf = math.modf
local format = string.format
local Snowflake, property = class('Snowflake', Container)
Snowflake.__description = "Abstract base class for Discord objects that have unique Snowflake IDs."
function Snowflake:__init(data, parent... | gpl-3.0 |
eskibars/domoticz | dzVents/runtime/Domoticz.lua | 5 | 16885 | local scriptPath = globalvariables['script_path']
package.path = package.path .. ';' .. scriptPath .. '?.lua'
local Device = require('Device')
local Variable = require('Variable')
local Time = require('Time')
local TimedCommand = require('TimedCommand')
local utils = require('Utils')
local _ = require('lodash')
-- sim... | gpl-3.0 |
MinetestForFun/minetest-minetestforfun-server | mods/more_chests/secret.lua | 8 | 3850 | local function has_locked_chest_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then
return false
end
return true
end
local open = "size[8,10]"..
"list[current_name;main;0,0;8,4;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[current_name;main]" ..
"listring[current_play... | unlicense |
npge/lua-npge | spec/util/clone_spec.lua | 2 | 1119 | -- lua-npge, Nucleotide PanGenome explorer (Lua module)
-- Copyright (C) 2014-2016 Boris Nagaev
-- See the LICENSE file for terms of use.
local clone = require 'npge.util.clone'
describe("npge.util.clone", function()
it("makes a copy of an array", function()
local x = {1, 2}
assert.same(clone.arra... | mit |
Amorph/premake-dev | tests/test_string.lua | 84 | 1550 | --
-- tests/test_string.lua
-- Automated test suite for the new string functions.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
T.string = { }
--
-- string.endswith() tests
--
function T.string.endswith_ReturnsTrue_OnMatch()
test.istrue(string.endswith("Abcdef", "def"))
end
function T.strin... | bsd-3-clause |
TsarN/uber-os | packages/coreutils/Build.lua | 1 | 1707 | --Build this package from inside UberOS
local minify = lua.include("min")
local SRC = {"alias", "chown", "drive", "exit", "label", "lua", "modprobe", "ps", "cd", "clear", "edit", "id", "log", "mv", "chmod", "cp", "eject", "kill", "ls", "mkdir", "rm", "mount", "umount", "ln", "readlink", "passwd", "useradd", "usermod", ... | mit |
oregamikiller/cocos2dPod | 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 |
pingidentity/lua-resty-openidc | tests/spec/id_token_validation_spec.lua | 1 | 12657 | local http = require("socket.http")
local test_support = require("test_support")
require 'busted.runner'()
describe("when the id_token obtained from the token endpoint doesn't contain an iss claim",
function()
test_support.start_server({
remove_id_token_claims = { "iss" }
})
teardown(test_support.st... | apache-2.0 |
Billiam/draggable.lua | conf.lua | 2 | 2948 | function love.conf(t)
t.identity = "DraggableDemo" -- The name of the save directory (string)
t.version = "0.9.1" -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.window.title = "Draggable Demo" -... | mit |
i-z/cocos2d-x-samples | samples/FantasyWarrior3D/src/actors/Actor.lua | 8 | 15721 | require "Helper"
require "AttackCommand"
require "GlobalVariables"
--type
Actor = class ("Actor", function ()
local node = cc.Sprite3D:create()
node:setCascadeColorEnabled(true)
return node
end)
function Actor:ctor()
self._action = {}
copyTable(ActorDefaultValues,self)
copyTable(ActorCommonValu... | mit |
nerai/OpenRA | mods/ra/maps/soviet-01/soviet01.lua | 28 | 2150 | Yaks = { "yak", "yak", "yak" }
Airfields = { Airfield1, Airfield2, Airfield3 }
InsertYaks = function()
local i = 1
Utils.Do(Yaks, function(yakType)
local start = YakEntry.CenterPosition + WVec.New(0, (i - 1) * 1536, Actor.CruiseAltitude(yakType))
local dest = StartJeep.Location + CVec.New(0, 2 * i)
local yak =... | gpl-3.0 |
Wohlstand/PGE-Project | Editor/_resources/lunalua/templates/lunaoverworld.lua | 4 | 1244 | --------------------------------------------------
-- World map code
-- Created @DATETIME@
--------------------------------------------------
@ONLOAD{
-- Run code on world map loading by game engine before initalizing stuff
-- (CAREFULLY USE IT! Use it to initialize own variables
-- and don't process any operations wi... | gpl-3.0 |
huangshucheng/MyUtil | Lua/src/app/views/CardSprite.lua | 1 | 7356 | local CardSprite = class("CardSprite",cc.Sprite)
function CardSprite:ctor()
self.m_card = 0x00 --默认牌值
self.m_imageFilePrefix = '' --资源
self.m_shooted = false --弹起
self.m_selected = false --选中
self.m_expanded = false -... | gpl-3.0 |
adamjoniec/cmdline | cmder/vendor/conemu-maximus5/ConEmu/Far3_lua/ConEmu.ShiftEnter.lua | 3 | 4032 |
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Run 'File under cursor' or 'Command line' in new console of ConEmu.
-- 'Press enter to close console' will be displayed after command completion.
-- Note! If you want to disable this confirmation,
-- set 'DisableCloseConfirm = true'
local DisableClo... | gpl-3.0 |
kusk356/fucktion | 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 |
hery/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 |
oregamikiller/cocos2dPod | 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... | mit |
oregamikiller/cocos2dPod | 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 |
dev-osrose/osIROSE-new | scripts/mobs/ai/sikuku_veteran.lua | 2 | 1075 | registerNpc(539, {
walk_speed = 420,
run_speed = 890,
scale = 110,
r_weapon = 1106,
l_weapon = 0,
level = 173,
hp = 43,
attack = 787,
hit = 516,
def = 587,
res = 475,
avoi... | apache-2.0 |
hery/nn | CosineEmbeddingCriterion.lua | 16 | 1328 | local CosineEmbeddingCriterion, parent = torch.class('nn.CosineEmbeddingCriterion', 'nn.Criterion')
function CosineEmbeddingCriterion:__init(margin)
parent.__init(self)
margin = margin or 0
self.margin = margin
self.gradInput = {torch.Tensor(), torch.Tensor()}
end
function CosineEmbeddingCriterion:upda... | bsd-3-clause |
ignorabimus/luasocket | samples/lpr.lua | 59 | 1574 | local lp = require("socket.lp")
local function usage()
print('\nUsage: lua lpr.lua [filename] [keyword=val...]\n')
print('Valid keywords are :')
print(
' host=remote host or IP address (default "localhost")\n' ..
' queue=remote queue or printer name (default "printer")\n' ..
' port=remote port ... | mit |
luzexi/slua-3rd | build/luasocket-2.0.2/samples/lpr.lua | 59 | 1574 | local lp = require("socket.lp")
local function usage()
print('\nUsage: lua lpr.lua [filename] [keyword=val...]\n')
print('Valid keywords are :')
print(
' host=remote host or IP address (default "localhost")\n' ..
' queue=remote queue or printer name (default "printer")\n' ..
' port=remote port ... | mit |
AntumDeluge/arianne-stendhal | data/script/region/semos/plains/BrokerNPC.lua | 3 | 1798 | --[[
***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* ... | gpl-2.0 |
4aiman/ethereal | dirt.lua | 2 | 4287 | -- Override default Dirt (to stop caves cutting away dirt)
minetest.override_item("default:dirt", {is_ground_content = false})
-- Green Dirt
minetest.register_node("ethereal:green_dirt", {
description = "Green Dirt",
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
is_gr... | gpl-3.0 |
oregamikiller/cocos2dPod | cocos/scripting/lua-bindings/auto/api/Animate3D.lua | 9 | 5261 |
--------------------------------
-- @module Animate3D
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
--
-- @function [parent=#Animate3D] setKeyFrameUserInfo
-- @param self
-- @param #int keyFrame
-- @param #map_table userInfo
-- @return Animate3D#Animate3D self (return value: cc.Ani... | mit |
eskibars/domoticz | dzVents/runtime/TimedCommand.lua | 9 | 5050 | local scriptPath = _G.globalvariables['script_path']
package.path = package.path .. ';' .. scriptPath .. '?.lua'
local TIMED_OPTIONS = require('TimedCommandOptions')
local utils = require('Utils')
local function TimedCommand(domoticz, commandName, value, mode, currentState)
if (type(mode) == 'string') then
mo... | gpl-3.0 |
drunklurker/wesnoth | data/lua/location_set.lua | 28 | 3736 | local location_set = {}
local function index(x, y)
-- the 2000 bias ensure that the correct x is recovered for negative y
return x * 16384 + y + 2000
end
local invscale = 1 / 16384
local function revindex(p)
local x = math.floor(p * invscale)
return x, p - x * 16384 - 2000
end
local methods = {}
local locset_met... | gpl-2.0 |
oregamikiller/cocos2dPod | cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua | 8 | 3060 |
--------------------------------
-- @module AnimationFrame
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Set the SpriteFrame.<br>
-- param frame A SpriteFrame will be used.
-- @function [parent=#AnimationFrame] setSpriteFrame
-- @param self
-- @param #cc.SpriteFrame frame
-- @return Animat... | mit |
Amorph/premake-dev | src/base/option.lua | 3 | 2207 | --
-- option.lua
-- Work with the list of registered options.
-- Copyright (c) 2002-2013 Jason Perkins and the Premake project
--
premake.option = {}
--
-- The list of registered options.
--
premake.option.list = {}
--
-- Register a new option.
--
-- @param opt
-- The new option object.
--
function premake... | bsd-3-clause |
dev-osrose/osIROSE-new | scripts/mobs/ai/hook.lua | 2 | 1072 | registerNpc(516, {
walk_speed = 300,
run_speed = 650,
scale = 180,
r_weapon = 0,
l_weapon = 0,
level = 145,
hp = 31,
attack = 713,
hit = 416,
def = 394,
res = 499,
avoid ... | apache-2.0 |
oregamikiller/cocos2dPod | 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)
--------------------------------... | mit |
dev-osrose/osIROSE-new | scripts/mobs/ai/goblin_leader.lua | 2 | 1952 | registerNpc(198, {
walk_speed = 240,
run_speed = 650,
scale = 190,
r_weapon = 169,
l_weapon = 0,
level = 97,
hp = 62,
attack = 489,
hit = 245,
def = 427,
res = 167,
avoid ... | apache-2.0 |
cogddo/vlc | share/lua/modules/common.lua | 54 | 4986 | --[[ This code is public domain (since it really isn't very interesting) ]]--
module("common",package.seeall)
-- Iterate over a table in the keys' alphabetical order
function pairs_sorted(t)
local s = {}
for k,_ in pairs(t) do table.insert(s,k) end
table.sort(s)
local i = 0
return function () i = ... | gpl-2.0 |
hery/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 |
ibawt/ev | vendor/lua/busted/outputHandlers/utfTerminal.lua | 1 | 4495 | local ansicolors = require 'ansicolors'
local s = require 'say'
local pretty = require 'pl.pretty'
return function(options, busted)
local handler = require 'busted.outputHandlers.base'(busted)
local successDot = ansicolors('%{green}●')
local failureDot = ansicolors('%{red}●')
local errorDot = ansicolors('%... | mit |
holyscroll/holyscroll | plugins/anti-flood-super.lua | 1 | 1895 |
--An empty table for solving multiple kicking problem(thanks to sniper )
kicktable = {}
do
local TIME_CHECK = 2
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id == our_id then
return msg
end
-- Save user on Redis... | gpl-2.0 |
Xuno/mpv | TOOLS/lua/autodeint.lua | 20 | 5073 | -- This script uses the lavfi idet filter to automatically insert the
-- appropriate deinterlacing filter based on a short section of the
-- currently playing video.
--
-- It registers the key-binding ctrl+d, which when pressed, inserts the filters
-- ``vf=lavfi=idet,pullup,vf=lavfi=idet``. After 4 seconds, it removes ... | gpl-2.0 |
TsarN/uber-os | packages/devutils/Build.lua | 1 | 1180 | --Build this package from inside UberOS
local minify = lua.include("min")
local SRC = {"makepkg", "makeallpkg", "gendb"}
local PWD = shell.dir()
local DEST = "/bin"
local EXTIN = ".lua"
local EXTOUT = ""
local argv = { ... }
local function clean()
fs.delete(PWD .. "/out")
end
local function prepare()
fs.makeD... | mit |
syj2010syj/w3x2lni | script/backend/cli/config.lua | 3 | 2417 | local messager = require 'share.messager'
local config = require 'share.config'
local lang = require 'share.lang'
local get_lni_map = require 'backend.get_lni_map'
local function show_config(section, k, v)
local map = config:raw_map(section, k)
if map ~= nil then
messager.raw(('%s %s.%s = %s\r\n'):form... | gpl-3.0 |
MinetestForFun/minetest-minetestforfun-server | mods/runes/api.lua | 8 | 10862 | -- API of the rune mod --
-- Global namespace
runes = {}
runes.datas = {}
runes.datas.handlers = {}
runes.datas.items = {}
runes.datas.amulets = {}
runes.functions = {}
-- Simple rune register function
runes.functions.register_rune = function(parameters)
local runedef = {}
if not parameters.name then
minetest.lo... | unlicense |
dev-osrose/osIROSE-new | scripts/npcs/ai/[eccentric_inventor]_spero.lua | 2 | 1068 | registerNpc(1011, {
walk_speed = 0,
run_speed = 0,
scale = 110,
r_weapon = 0,
l_weapon = 0,
level = 10,
hp = 100,
attack = 100,
hit = 100,
def = 100,
res = 100,
avoid ... | apache-2.0 |
dev-osrose/osIROSE-new | scripts/mobs/ai/grimhemmz's_henchman.lua | 2 | 1954 | registerNpc(624, {
walk_speed = 450,
run_speed = 950,
scale = 300,
r_weapon = 1032,
l_weapon = 0,
level = 60,
hp = 76,
attack = 324,
hit = 179,
def = 213,
res = 133,
avoid... | apache-2.0 |
dev-osrose/osIROSE-new | scripts/npcs/ai/[smith]_ronk.lua | 2 | 1071 | registerNpc(1034, {
walk_speed = 0,
run_speed = 0,
scale = 130,
r_weapon = 0,
l_weapon = 0,
level = 10,
hp = 100,
attack = 100,
hit = 100,
def = 100,
res = 100,
avoid ... | apache-2.0 |
tahashakiba/boomrange_bot | bot/utils.lua | 239 | 13499 | 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")()
http.TIMEOUT = 10
funct... | gpl-2.0 |
ZACTELEGRAM1/ALIREZA | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.