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 |
|---|---|---|---|---|---|
Midiman/Concrete | lib/hump/timer.lua | 1 | 6412 | --[[
Copyright (c) 2010-2013 Matthias Richter
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, publis... | mit |
sundream/gamesrv | script/card/neutral/card261000.lua | 1 | 2260 | --<<card 导表开始>>
local super = require "script.card.neutral.card161000"
ccard261000 = class("ccard261000",super,{
sid = 261000,
race = 6,
name = "幸运币",
type = 101,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 0,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card161004.lua | 1 | 2617 | --<<card 导表开始>>
local super = require "script.card.init"
ccard161004 = class("ccard161004",super,{
sid = 161004,
race = 6,
name = "比斯巨兽",
type = 201,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 1,
sneak = 0,
magic_hurt_ad... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card265001.lua | 1 | 2218 | --<<card 导表开始>>
local super = require "script.card.neutral.card165001"
ccard265001 = class("ccard265001",super,{
sid = 265001,
race = 6,
name = "狼骑兵",
type = 201,
magic_immune = 0,
assault = 1,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
... | gpl-2.0 |
hacker44-h44/n32 | plugins/inrealm.lua | 92 | 25223 | -- 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 |
pandaforks/tido-rainbow | lua/Parallax.lua | 1 | 2109 | -- Simple parallax controller.
--
-- \code
-- local Parallax = require(module_path .. "Parallax")
--
-- local layers = {
-- -- A layer is defined by a batch and its velocity on the x- and y-axis
-- { batch1, 0.5, 0 } -- background
-- { batch2, 0.8, 0 } -- midground
-- { batch3, 1.0, 0 } -- foreground
-- }
--... | mit |
sundream/gamesrv | script/card/wood/card224004.lua | 1 | 2294 | --<<card 导表开始>>
local super = require "script.card.wood.card124004"
ccard224004 = class("ccard224004",super,{
sid = 224004,
race = 2,
name = "以眼还眼",
type = 101,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 0,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
ma... | gpl-2.0 |
EvPowerTeam/EV_OP | feeds/luci/modules/base/luasrc/sys/zoneinfo/tzoffset.lua | 10 | 4048 | -- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzoffset"
OFFSET = {
gmt = 0, -- GMT
eat = 10800, -- EAT
cet = 3600, -- CET
wat = 3600, -- WAT
cat = 7200, -- CAT
eet = 7200, -- EET
wet = 0, -- WET
sast = 7200, -- SAST
hst = -36000, -- HS... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card165006.lua | 1 | 2210 | --<<card 导表开始>>
local super = require "script.card.init"
ccard165006 = class("ccard165006",super,{
sid = 165006,
race = 6,
name = "鲁莽火箭兵",
type = 201,
magic_immune = 0,
assault = 1,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
magic_hurt_a... | gpl-2.0 |
sami2448/set | plugins/chat.lua | 9 | 2728 | local function run(msg)
if msg.text == "ARJ" then
return " جونم ؟ چی شده؟"
end
if msg.text == "A.R.J" then
return "بله ، کاری داری ؟"
end
if msg.text == "hi" then
return "سلام... اگه میشه فارسی تایپ کن"
end
if msg.text == "ربات" then
return "بله؟"
end
if msg.text == "Salam" then
return "سلام علیکم ، فارسی تایپ کن... | gpl-2.0 |
jxskiss/orange | api/server.lua | 4 | 2459 | local type = type
local ipairs = ipairs
local setmetatable = setmetatable
local encode_base64 = ngx.encode_base64
local string_lower = string.lower
local string_format = string.format
local string_gsub = string.gsub
local lor = require("lor.index")
local function auth_failed(res)
res:status(401):json({
su... | mit |
dojoteef/loltorch | dataset.lua | 1 | 16223 | local cjson = require('cjson')
local file = require('pl.file')
local path = require('pl.path')
local torch = require('torch')
local dataset = {
maxSpellCount=2,
maxItemCount = 7,
maxBlueRuneCount = 9,
maxRedRuneCount = 9,
maxYellowRuneCount = 9,
maxBlackRuneCount = 3,
maxRuneCount = 30,
... | mit |
movb/Algorithm-Implementations | Bogosort/Lua/Yonaba/bogosort_test.lua | 27 | 1956 | -- Tests for bogosort.lua
local bogosort = require 'bogosort'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end
local stat... | mit |
YurongYou/rlTORCS | train_rl/models/SemanticAttention.lua | 1 | 2658 | local nn = require 'nn'
require 'classic.torch' -- Enables serialisation
Body = classic.class('Body')
-- Calculates network output size
local function getOutputSize(net, inputDims)
return net:forward(torch.Tensor(torch.LongStorage(inputDims))):size():totable()
end
-- dirty table clone
local function clone(org)
retu... | gpl-3.0 |
tomm/pioneer | data/ui/StationView/ShipMarket.lua | 1 | 8823 | -- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details
-- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
local Engine = import("Engine")
local Game = import("Game")
local Event = import("Event")
local Format = import("Format")
local Lang = import("Lang")
local ShipDef = import("ShipDe... | gpl-3.0 |
sundream/gamesrv | script/card/soil/card253004.lua | 1 | 2298 | --<<card 导表开始>>
local super = require "script.card.soil.card153004"
ccard253004 = class("ccard253004",super,{
sid = 253004,
race = 5,
name = "丛林守卫者",
type = 201,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
m... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card165005.lua | 1 | 2202 | --<<card 导表开始>>
local super = require "script.card.init"
ccard165005 = class("ccard165005",super,{
sid = 165005,
race = 6,
name = "淡水鳄",
type = 202,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
magic_hurt_add... | gpl-2.0 |
sundream/gamesrv | script/card/water/card134003.lua | 1 | 2695 | --<<card 导表开始>>
local super = require "script.card.init"
ccard134003 = class("ccard134003",super,{
sid = 134003,
race = 3,
name = "心灵之火",
type = 101,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 0,
shield = 0,
warcry = 0,
dieeffect = 0,
sneak = 0,
magic_hurt_ad... | gpl-2.0 |
t1633361/pskynet | service/cdummy.lua | 12 | 1722 | local skynet = require "skynet"
local globalname = {}
local queryname = {}
local harbor = {}
skynet.register_protocol {
name = "harbor",
id = skynet.PTYPE_HARBOR,
pack = function(...) return ... end,
unpack = skynet.tostring,
}
skynet.register_protocol {
name = "text",
id = skynet.PTYPE_TEXT,
pack = function(... | apache-2.0 |
mjaric/chameleon | chameleon/utils.lua | 1 | 7022 | local cjson = require("cjson");
local pairs = pairs;
local ipairs = ipairs;
local type = type;
local rawset = rawset;
local rawget = rawget;
local ngx = ngx;
local string = string;
local os = os;
local tonumber = tonumber;
module(...);
-- private
local lua_special_pattern_chars = {
["^"] = "%^";
["$"] = "%$... | gpl-3.0 |
bmcbarron/moonshine | test/scripts/test-no-require.lua | 3 | 224741 | --------------------------------------------------------------------------
-- Moonshine - a Lua virtual machine.
--
-- Email: moonshine@gamesys.co.uk
-- http://moonshinejs.org
--
-- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining
... | mit |
sundream/gamesrv | script/logger/init.lua | 1 | 1483 |
logger = logger or {}
local LOGGERSRV=".LOGGER"
--function logger.write(filename,msg)
-- skynet.send(LOGGERSRV,"lua","write",filename,msg)
--end
function logger.debug(filename,...)
skynet.send(LOGGERSRV,"lua","debug",filename,...)
end
function logger.info(filename,...)
skynet.send(LOGGERSRV,"lua","info",filename,.... | gpl-2.0 |
movb/Algorithm-Implementations | Happy_Number/Lua/Yonaba/happy_test.lua | 26 | 1425 | -- Tests for happy.lua
local is_happy = require 'happy'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end
local st... | mit |
rastin45/waqer12 | plugins/invite.lua | 15 | 1046 | -- Invite other user to the chat group.
-- Use !invite name User_name or !invite id id_number
-- The User_name is the print_name (there are no spaces but _)
do
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local user = matches[2]
-- Use... | gpl-2.0 |
davidkazlauskas/safelists | src/lua/main.lua | 1 | 59267 |
--require('lua/mobdebug').start()
package.path = package.path .. ";" .. LUA_SCRIPTS_PATH .. "/?.lua"
require('util')
require('sqlite')
require('safelist-constants')
require('genericwidget')
require('settings')
require('messages')
require('guiutil')
require('domaingui')
require('downloadsmodel')
require('utilobjects'... | gpl-2.0 |
ElectricPrism/stargus | scripts/menus/network.lua | 2 | 13251 | -- (c) Copyright 2005-2006 by François Beerten and Jimmy Salmon
function bool2int(boolvalue)
if boolvalue == true then
return 1
else
return 0
end
end
function int2bool(int)
if int == 0 then
return false
else
return true
end
end
function ErrorMenu(errmsg)
local menu = WarMenu(nil, panel... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card164027.lua | 1 | 2638 | --<<card 导表开始>>
local super = require "script.card.init"
ccard164027 = class("ccard164027",super,{
sid = 164027,
race = 6,
name = "麦田傀儡",
type = 206,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 0,
dieeffect = 1,
sneak = 0,
magic_hurt_ad... | gpl-2.0 |
yangboz/petulant-octo-dubstep | HP_ID_Print_App/cocos2d/external/lua/luasocket/url.lua | 78 | 11036 | -----------------------------------------------------------------------------
-- URI parsing, composition and relative URL resolution
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
--------------------------------------------------------------... | mit |
ominux/skia | tools/lua/count_reduced_clipstacks.lua | 147 | 3116 | stats = {}
-- switch this to run on the automated scraper system
newline = "\n"
-- newline = "\\n"
function sk_scrape_startcanvas(c, fileName)
canvas = c
oldstackstr = "<invalid>"
end
function sk_scrape_endcanvas(c, fileName)
canvas = nil
end
function string.starts(String,Start)
return string.sub(Str... | apache-2.0 |
gpu0/vulkan-examples | example-01/vkCreateDevice/external/vulkan/spirv.lua | 23 | 22593 | -- Copyright (c) 2014-2016 The Khronos Group Inc.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and/or associated documentation files (the "Materials"),
-- to deal in the Materials without restriction, including without limitation
-- the rights to use, copy, mod... | mit |
codemon66/Urho3D | bin/Data/LuaScripts/11_Physics.lua | 24 | 12206 | -- Physics example.
-- This sample demonstrates:
-- - Creating both static and moving physics objects to a scene
-- - Displaying physics debug geometry
-- - Using the Skybox component for setting up an unmoving sky
-- - Saving a scene to a file and loading it to restore a previous state
require ... | mit |
bjornswenson/RxLua | rx.lua | 2 | 66186 | -- RxLua v0.0.3
-- https://github.com/bjornbytes/rxlua
-- MIT License
local util = {}
util.pack = table.pack or function(...) return { n = select('#', ...), ... } end
util.unpack = table.unpack or unpack
util.eq = function(x, y) return x == y end
util.noop = function() end
util.identity = function(x) return x end
uti... | mit |
codemon66/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/feature.lua | 24 | 2974 | -- tolua: abstract feature class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: $
-- 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 obligation to provide maintenance, support, updates,
-- enh... | mit |
alidess/aliali | plugins/arabic_lang.lua | 5 | 22611 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
yangboz/petulant-octo-dubstep | HP_ID_Print_App/cocos2d-x-3.2/external/lua/luajit/src/dynasm/dasm_ppc.lua | 74 | 37064 | ------------------------------------------------------------------------------
-- DynASM PPC module.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _in... | mit |
ealegol/kolla-newton | docker/heka/plugins/decoders/os_swift_log.lua | 2 | 1587 | -- Copyright 2016 Mirantis, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to ... | apache-2.0 |
digitalloggers/nodemcu-firmware | app/cjson/tests/test.lua | 112 | 18076 | #!/usr/bin/env lua
-- Lua CJSON tests
--
-- Mark Pulford <mark@kyne.com.au>
--
-- Note: The output of this script is easier to read with "less -S"
local json = require "cjson"
local json_safe = require "cjson.safe"
local util = require "cjson.util"
local function gen_raw_octets()
local chars = {}
for i = 0, ... | mit |
FizzerWL/ExampleMods | BuyNeutralMod/Server_AdvanceTurn.lua | 1 | 2237 | require('Utilities');
require('WLUtilities');
function Server_AdvanceTurn_Order(game, order, result, skipThisOrder, addNewOrder)
if (order.proxyType == 'GameOrderCustom' and startsWith(order.Payload, 'BuyNeutral_')) then --look for the order that we inserted in Client_PresentMenuUI
--in Client_PresentMenuUI, w... | mit |
dalvorsn/tests | data/events/scripts/player.lua | 3 | 3323 | function Player:onBrowseField(position)
return true
end
function Player:onLook(thing, position, distance)
local description = "You see " .. thing:getDescription(distance)
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItemID: [%d]", description, thing:getId())
l... | gpl-2.0 |
hazarkarabay/nodemcu-httpserver | httpserver-header.lua | 2 | 1373 | -- httpserver-header.lua
-- Part of nodemcu-httpserver, knows how to send an HTTP header.
-- Author: Marcos Kirsch
return function (connection, code, extension, gzip)
local function getHTTPStatusString(code)
local codez = {[200]="OK", [400]="Bad Request", [404]="Not Found",}
local myResult = co... | gpl-2.0 |
mahdikord/mahdi5 | plugins/invite.lua | 1111 | 1195 | do
local function callbackres(extra, success, result) -- Callback for res_user in line 27
local user = 'user#id'..result.id
local chat = 'chat#id'..extra.chatid
if is_banned(result.id, extra.chatid) then -- Ignore bans
send_large_msg(chat, 'User is banned.')
elseif is_gbanned(result.id) then -- I... | gpl-2.0 |
badboyam/boti | plugins/invite.lua | 1111 | 1195 | do
local function callbackres(extra, success, result) -- Callback for res_user in line 27
local user = 'user#id'..result.id
local chat = 'chat#id'..extra.chatid
if is_banned(result.id, extra.chatid) then -- Ignore bans
send_large_msg(chat, 'User is banned.')
elseif is_gbanned(result.id) then -- I... | gpl-2.0 |
facebokiii/facebookplug | plugins/remind.lua | 362 | 1875 | local filename='data/remind.lua'
local cronned = load_from_file(filename)
local function save_cron(msg, text,date)
local origin = get_receiver(msg)
if not cronned[date] then
cronned[date] = {}
end
local arr = { origin, text } ;
table.insert(cronned[date], arr)
serialize_to_file(cronned, filename)
re... | gpl-2.0 |
alireza1998/mega | plugins/owners.lua | 71 | 12458 |
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 |
Lynx3d/tinker_tools | UI/ExpImp_UI.lua | 2 | 5031 | local Dta = select(2, ...)
Dta.expimp_ui = {}
local ExpImpWindowSettings = {
WIDTH = 325,
HEIGHT = 290,
CLOSABLE = true,
MOVABLE = true,
POS_X = "ExpImpwindowPosX",
POS_Y = "ExpImpwindowPosY"
}
function Dta.expimp_ui.buildExpImpWindow()
local x = Dta.settings.get("ExpImpwindowPosX")
local y = Dta.settings.ge... | bsd-3-clause |
harryzeng/skynet | lualib/socketchannel.lua | 31 | 9447 | local skynet = require "skynet"
local socket = require "socket"
local socketdriver = require "socketdriver"
-- channel support auto reconnect , and capture socket error in request/response transaction
-- { host = "", port = , auth = function(so) , response = function(so) session, data }
local socket_channel = {}
loca... | mit |
EvPowerTeam/EV_OP | feeds/luci/modules/base/luasrc/fs.lua | 96 | 8670 | --[[
LuCI - Filesystem tools
Description:
A module offering often needed filesystem manipulation functions
FileId:
$Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may o... | gpl-2.0 |
sundream/gamesrv | script/card/neutral/card264032.lua | 1 | 2263 | --<<card 导表开始>>
local super = require "script.card.neutral.card164032"
ccard264032 = class("ccard264032",super,{
sid = 264032,
race = 6,
name = "大地之环先知",
type = 201,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 1,
dieeffect = 0,
sneak = 0,
... | gpl-2.0 |
yangboz/bugfree-bugfixes | CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Controller.lua | 6 | 1390 |
--------------------------------
-- @module Controller
-- @parent_module cc
--------------------------------
-- @function [parent=#Controller] receiveExternalKeyEvent
-- @param self
-- @param #int int
-- @param #bool bool
--------------------------------
-- @function [parent=#Controller] getDeviceName
-- @... | mit |
medialab-prado/Interactivos-15-Ego | minetest-ego/builtin/common/vector.lua | 3 | 2426 |
vector = {}
function vector.new(a, b, c)
if type(a) == "table" then
assert(a.x and a.y and a.z, "Invalid vector passed to vector.new()")
return {x=a.x, y=a.y, z=a.z}
elseif a then
assert(b and c, "Invalid arguments for vector.new()")
return {x=a, y=b, z=c}
end
return {x=0, y=0, z=0}
end
function vector.e... | mit |
rlcevg/Zero-K | LuaAI.lua | 11 | 1231 | -- $Id: LuaAI.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- LuaAI.lua
--
-- List of LuaAIs supported by the mod.
--
--
return {
{
-- to be recognised as a... | gpl-2.0 |
anholt/ValyriaTear | dat/maps/layna_forest/layna_forest_cave1_2_map.lua | 4 | 99587 | map_data = {}
-- The number of rows, and columns that compose the map
map_data.num_tile_cols = 64
map_data.num_tile_rows = 48
-- The tilesets definition files used.
map_data.tileset_filenames = {}
map_data.tileset_filenames[1] = "dat/tilesets/desert_cave.lua"
map_data.tileset_filenames[2] = "dat/tilesets/desert_cave_... | gpl-2.0 |
ViolyS/RayUI_VS | Interface/AddOns/RayUI/modules/skins/blizzard/binding.lua | 2 | 2397 | ----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Skins")
local S = _Skins
local function LoadSkin()
local r, g, b = _r, _g, _b
local KeyBindingFrame = KeyBindingFrame
KeyBindingFrame.header:DisableDrawLa... | mit |
soulik/luambedtls | tests/x509/test_x509.lua | 1 | 1326 | #!/usr/bin/luajit
local bit = require 'bit'
local tls = require 'luambedtls'
require 'utils'
local function TLS_assert(...)
local errn = select(1, ...)
if type(errn)=='number' and errn ~= 0 then
error(tls.strError(errn))
else
return ...
end
end
local function OIDname(n)
local r = tls.pushOIDAttrShortName(n)... | gpl-2.0 |
medialab-prado/Interactivos-15-Ego | minetest-ego/games/adventuretest/mods/moreblocks/stairsplus/slopes.lua | 2 | 9952 | --[[
More Blocks: slope definitions
Copyright (c) 2011-2015 Calinou and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = moreblocks.intllib
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5... | mit |
medialab-prado/Interactivos-15-Ego | minetest-ego/games/adventuretest/mods/dye/init.lua | 9 | 5787 | -- minetest/dye/init.lua
-- To make recipes that will work with any dye ever made by anybody, define
-- them based on groups.
-- You can select any group of groups, based on your need for amount of colors.
-- basecolor: 9, excolor: 17, unicolor: 89
--
-- Example of one shapeless recipe using a color group:
-- Note: As... | mit |
medialab-prado/Interactivos-15-Ego | minetest-ego/mods/minetest-mod-mesecons-master/mesecons/actionqueue.lua | 4 | 3796 | mesecon.queue.actions={} -- contains all ActionQueue actions
function mesecon.queue:add_function(name, func)
mesecon.queue.funcs[name] = func
end
-- If add_action with twice the same overwritecheck and same position are called, the first one is overwritten
-- use overwritecheck nil to never overwrite, but just add t... | mit |
avataronline/avatarclient | modules/gamelib/protocollogin.lua | 1 | 7765 | -- @docclass
ProtocolLogin = extends(Protocol, "ProtocolLogin")
LoginServerError = 10
LoginServerTokenSuccess = 12
LoginServerTokenError = 13
LoginServerUpdate = 17
LoginServerMotd = 20
LoginServerUpdateNeeded = 30
LoginServerSessionKey = 40
LoginServerCharacterList = 100
LoginServerExtendedCharacterList = 101
-- Sin... | mit |
stas2z/openwrt-witi | package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/startup.lua | 74 | 2567 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2010-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2010 Manuel Munz <freifunk at somakoma dot de>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local inits = { }
for _, name ... | gpl-2.0 |
nshermione/pingpongcocos2dx | Resources/pingponggui-ccs/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua | 79 | 16871 |
--Enums will be deprecated,begin
_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
_G.kCCTextAlignmentCenter = cc.TEXT_ALIGNMENT_CENTER
_G.kCCVerticalTextAlignmentTop = cc.VERTICAL_TEXT_ALIGNMENT_TOP
_G.kCCVerticalTextAlignment... | apache-2.0 |
zhuhangyu/ABTestingGateway | admin/policy/get.lua | 22 | 3106 | local policyModule = require('abtesting.adapter.policy')
local redisModule = require('abtesting.utils.redis')
local systemConf = require('abtesting.utils.init')
local handler = require('abtesting.error.handler').handler
local utils = require('abtesting.utils.utils')
local ERRORINFO = require('ab... | mit |
cloudkick/ck-agent | extern/luasocket/src/ftp.lua | 144 | 9120 | -----------------------------------------------------------------------------
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
-----------------------------------------------------------------------------
-------------------... | apache-2.0 |
kevinr/cuberite | Server/Plugins/APIDump/Hooks/OnKilling.lua | 36 | 1190 | return
{
HOOK_KILLING =
{
CalledWhen = "A player or a mob is dying.",
DefaultFnName = "OnKilling", -- also used as pagename
Desc = [[
This hook is called whenever a {{cPawn|pawn}}'s (a player's or a mob's) health reaches zero. This
means that the pawn is about to be killed, unless a plugin "revives" them... | apache-2.0 |
Unrepentant-Atheist/mame | 3rdparty/genie/tests/base/test_baking.lua | 57 | 3205 | --
-- tests/test_baking.lua
-- Automated test suite for the configuration baking functions.
-- Copyright (c) 2009, 2010 Jason Perkins and the Premake project
--
T.baking = { }
local suite = T.baking
--
-- Setup code
--
local prj, cfg
function suite.setup()
_ACTION = "gmake"
solution "MySolution"
configu... | gpl-2.0 |
SneakyB/iceball | pkg/base/citygen/buildings/tpl_building.lua | 4 | 1944 | --[[
This file is part of Ice Lua Components.
Ice Lua Components is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-3.0 |
cloudkick/ck-agent | src/lua/remote/check_file.lua | 1 | 4163 | -- -- Copyright 2012 Rackspace
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in complia... | apache-2.0 |
reTXT/thrift | lib/lua/TMemoryBuffer.lua | 100 | 2266 | --
-- 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 ma... | apache-2.0 |
elloray/thrift | lib/lua/TMemoryBuffer.lua | 100 | 2266 | --
-- 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 ma... | apache-2.0 |
SneakyB/iceball | pkg/base/lib_namegen.lua | 4 | 1536 | --[[
This file is part of Ice Lua Components.
Ice Lua Components is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-3.0 |
rlcevg/Zero-K | LuaUI/Widgets/gui_chili_proconsole2.lua | 5 | 44245 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Chili Pro Console2",
desc = "v2.004 Chili Chat Pro Console.",
author = "CarRepairer",
... | gpl-2.0 |
EliHar/Pattern_recognition | torch1/install/share/lua/5.1/nn/Container.lua | 6 | 4620 | -- This is code common to container modules, which are collections of
-- smaller constituent modules like Parallel, Sequential, etc.
local Container, parent = torch.class('nn.Container', 'nn.Module')
function Container:__init(...)
parent.__init(self, ...)
self.modules = {}
end
function Container:add(module)
... | mit |
SneakyB/iceball | pkg/gm/abos/main_client.lua | 4 | 5146 | dofile("pkg/gm/abos/common.lua")
dofile("pkg/gm/abos/genmap.lua")
dofile("pkg/gm/abos/player.lua")
dofile("pkg/base/lib_sdlkey.lua")
client.mk_compat_disable()
client.mk_set_title("A Buttfull Of Skateboards")
render_sec_current = 0
mouse_x, mouse_y = client.screen_get_dims()
mouse_x = mouse_x / 2
mouse_y = mouse_y /... | gpl-3.0 |
stas2z/openwrt-witi | package/luci/applications/luci-app-asterisk/luasrc/model/cbi/asterisk/dialplan_out.lua | 68 | 3021 | -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local ast = require("luci.asterisk")
local function find_outgoing_contexts(uci)
local c = { }
local h = { }
-- uci:foreach("asterisk", "dialplan",
-- function(s)
-- if not h[s['.name']] then
-- c[#c+1]... | gpl-2.0 |
rlcevg/Zero-K | units/amphaa.lua | 1 | 4866 | unitDef = {
unitname = [[amphaa]],
name = [[Angler]],
description = [[Amphibious Anti-Air Bot]],
acceleration = 0.18,
activateWhenBuilt = true,
brakeRate = 0.375,
buildCostEnergy = 180,
buildCostMetal = 180,
buildop... | gpl-2.0 |
rlcevg/Zero-K | LuaRules/Configs/gfx_dynamic_lighting_defs.lua | 6 | 1237 |
local rgbSpecMults = {0.25, 0.25, 0.25} -- specular RGB scales
local dynLightDefs = {
["ZK"] = {
['weaponLightDefs']={
["nuclear_missile"] = {
explosionLightDef = {
diffuseColor = {40.0, 20.0, 5.0 },
specularColor =... | gpl-2.0 |
AliKhodadad/Telebot | plugins/inpm.lua | 243 | 3007 | do
local function pairsByKeys (t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
medialab-prado/Interactivos-15-Ego | minetest-ego/games/adventuretest/mods/mobs/animals/rat.lua | 1 | 1474 | mobs:register_mob("mobs:rat", {
type = "animal",
hp_min = 1,
hp_max = 4,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "mobs_rat.x",
textures = {"mobs_rat.png"},
makes_footstep_sound = false,
walk_velocity = 1,
armor = 200,
drops = {},
drawtype = "front",
water_damage = 0,
lav... | mit |
rlcevg/Zero-K | scripts/spiderriot.lua | 16 | 4531 | include "spider_walking.lua"
include "constants.lua"
--------------------------------------------------------------------------------
-- pieces
--------------------------------------------------------------------------------
local base = piece 'base'
local turret = piece 'turret'
local barrel = piece 'barrel'
local... | gpl-2.0 |
omid1212/ccd | plugins/invite.lua | 299 | 1025 | -- Invite other user to the chat group.
-- Use !invite name User_name or !invite id id_number
-- The User_name is the print_name (there are no spaces but _)
do
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local user = matches[2]
-- Use... | gpl-2.0 |
imashkan/ashifire | plugins/owners.lua | 2 | 12458 |
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 |
EliHar/Pattern_recognition | torch1/install/share/lua/5.1/torchx/group.lua | 2 | 1505 |
function torch.group(sorted, index, tensor, samegrp, desc)
if not torch.isTensor(tensor) then
desc = tensor
samegrp = index
tensor = sorted
index = nil
sorted = nil
end
assert(torch.isTensor(tensor), 'expecting torch.Tensor for arg 3')
local sorted = sorted or tensor.new()... | mit |
rlcevg/Zero-K | effects/krow.lua | 25 | 2897 | return {
["krowdust"] = {
clouds0 = {
air = true,
class = [[CSimpleParticleSystem]],
count = 0,
ground = true,
underwater = 0,
water = false,
properties = {
airdrag = 0.96,
... | gpl-2.0 |
Amadiro/obtuse-tanuki | libs/winapi/windowclass.lua | 2 | 16356 |
--oo/window: overlapping (aka top-level) windows.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.basewindowclass'
require'winapi.menuclass'
require'winapi.color'
require'winapi.cursor'
require'winapi.waitemlistclass'
Window = subclass({
__class_style_bitmask = bitmask{ --o... | mit |
ikstream/Minstrel-Blues | measurement/minstrel-measurement/EmptyExperiment.lua | 1 | 1394 | require ('Experiment')
local posix = require ('posix') -- sleep
-- runs an experiment that do nothing
EmptyExperiment = Experiment:new()
function EmptyExperiment:new (o)
local o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function EmptyExperiment:create ( control, data, is_fixed... | gpl-2.0 |
rlcevg/Zero-K | units/amgeo.lua | 2 | 3478 | unitDef = {
unitname = [[amgeo]],
name = [[Advanced Geothermal]],
description = [[Produces Energy (100) - HAZARDOUS]],
activateWhenBuilt = true,
buildCostEnergy = 1500,
buildCostMetal = 1500,
builder ... | gpl-2.0 |
mcanthony/livedb | lib/scripts/submit.lua | 10 | 2111 | local versionKey, opLogKey = unpack(KEYS)
-- The regular keys are followed by the dirty list names
local DIRTY_KEYS_IDX = 3
local v, logEntry, docVersion = unpack(ARGV) -- From redisSubmit, below.
-- ... and the regular args are followed by the dirty list data.
local DIRTY_ARGS_IDX = 4
v = tonumber(v)
docVersion = to... | mit |
ViolyS/RayUI_VS | Interface/AddOns/RayUI/modules/skins/addons/postal.lua | 1 | 2442 | ----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Skins")
local S = _Skins
local PostalSkin = CreateFrame("Frame")
PostalSkin:RegisterEvent("MAIL_SHOW")
PostalSkin:SetScript("OnEvent", function(self, event)... | mit |
yangboz/bugfree-bugfixes | CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EventController.lua | 6 | 1319 |
--------------------------------
-- @module EventController
-- @extend Event
-- @parent_module cc
--------------------------------
-- @function [parent=#EventController] getControllerEventType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Ev... | mit |
Satoshi-t/Re-SBS | lang/zh_CN/Audio/SPPackageLines.lua | 1 | 8389 | -- lines for SP Package
return {
-- 杨修
["$jilei"] = "食之无味,弃之可惜",
["$danlao"] = "一人一口,分而食之",
["~yangxiu"] = "恃才傲物,方有此命",
["cv:yangxiu"] = "幻象迷宫",
-- 公孙瓒
["$yicong3"] = "冲啊!", -- +1 -> -1
["$yicong4"] = "众将听令,摆好阵势,御敌!", -- -1 -> +1
["~gongsunzan"] = "我军将败,我已无颜苟活于世……",
-- 袁术
["$yongsi1"] = "玉玺在手,天下我有!",
["$... | gpl-3.0 |
EliHar/Pattern_recognition | torch1/install/share/lua/5.1/pl/lapp.lua | 6 | 13984 | --- Simple command-line parsing using human-readable specification.
-- Supports GNU-style parameters.
--
-- lapp = require 'pl.lapp'
-- local args = lapp [[
-- Does some calculations
-- -o,--offset (default 0.0) Offset to add to scaled number
-- -s,--scale (number) Scaling factor
-- ... | mit |
Unrepentant-Atheist/mame | 3rdparty/genie/src/actions/xcode/xcode_project.lua | 3 | 5636 | --
-- xcode_project.lua
-- Generate an Xcode C/C++ project.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
local xcode = premake.xcode
local tree = premake.tree
--
-- Create a tree corresponding to what is shown in the Xcode project browser
-- pane, with nodes for files and folders, resources, frame... | gpl-2.0 |
Codex-NG/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 |
lo7err/khodemunihaa | plugins/ingroup.lua | 4 | 62600 | 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[tostri... | gpl-2.0 |
Codex-NG/forgottenserver | data/talkactions/scripts/deathlist.lua | 43 | 2176 | local function getArticle(str)
return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a"
end
local function getMonthDayEnding(day)
if day == "01" or day == "21" or day == "31" then
return "st"
elseif day == "02" or day == "22" then
return "nd"
elseif day == "03" or day == "23" then
return "rd"
else
return "t... | gpl-2.0 |
SneakyB/iceball | pkg/gm/chen/pre.lua | 4 | 1341 | do
DIR_CHENMOD = "pkg/gm/chen/"
DIR_PKG_IT = "pkg/gm/chen/"
-- need string.split
dofile("pkg/base/lib_util.lua")
local chen_padding = {
":3", "^_^", "HONK", "MEOW", "HONK", "Yum!",
}
function chenpick(l)
return l[math.floor(math.random()*#l)+1]
end
function chenify_msg(msg)
local l = string.split(msg, " ")
loc... | gpl-3.0 |
Amadiro/obtuse-tanuki | libs/winapi/imagelist.lua | 2 | 9894 |
--proc/imagelist: image list resources.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.comctl'
ffi.cdef[[
HIMAGELIST ImageList_Create(int cx, int cy, UINT flags, int cInitial, int cGrow);
BOOL ImageList_Destroy(HIMAGELIST himl);
]]
ILC_MASK = 0x0000... | mit |
Satoshi-t/Re-SBS | lua/ai/smart-ai.lua | 1 | 308081 | -- This is the Smart AI, and it should be loaded and run at the server side
-- "middleclass" is the Lua OOP library written by kikito
-- more information see: https://github.com/kikito/middleclass
require "middleclass"
-- initialize the random seed for later use
math.randomseed(os.time())
-- SmartAI is the base clas... | gpl-3.0 |
mightymadTV/gcraft | gcraft/gamemode/shared.lua | 2 | 10055 |
--[[---------------------------------------------------------
This file should contain variables and functions that are
the same on both client and server.
This file will get sent to the client - so don't add
anything to this file that you don't want them to be
able to see.
--------------------------... | gpl-2.0 |
lynx-seu/skynet | lualib/mysql.lua | 31 | 15725 | -- Copyright (C) 2012 Yichun Zhang (agentzh)
-- Copyright (C) 2014 Chang Feng
-- This file is modified version from https://github.com/openresty/lua-resty-mysql
-- The license is under the BSD license.
-- Modified by Cloud Wu (remove bit32 for lua 5.3)
local socketchannel = require "socketchannel"
local mysqlaux = req... | mit |
cloudkick/ck-agent | extern/alien/tests/test_alien.lua | 2 | 15601 |
pcall(require, "luarocks.require")
require "alien"
require "alien.struct"
local dll = alien.alientest
do
io.write(".")
local f = dll._testfunc_i_bhilfd
f:types("int", "byte", "short", "int", "long", "float", "double")
local result = f(string.byte("x"), 1, 3, 4, 5, 6)
assert(result == 139)
end
do
io.wri... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.