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 |
|---|---|---|---|---|---|
helling34/skynet | service/cmaster.lua | 78 | 3256 | local skynet = require "skynet"
local socket = require "socket"
--[[
master manage data :
1. all the slaves address : id -> ipaddr:port
2. all the global names : name -> address
master hold connections from slaves .
protocol slave->master :
package size 1 byte
type 1 byte :
'H' : HANDSHAKE, report slav... | mit |
garoose/eecs494.p2 | dev/premake/premake/src/actions/vstudio/vs2010_vcxproj.lua | 2 | 19176 | --
-- vs2010_vcxproj.lua
-- Generate a Visual Studio 2010 C/C++ project.
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
premake.vstudio.vc2010 = { }
local vc2010 = premake.vstudio.vc2010
local vstudio = premake.vstudio
local function vs2010_config(prj)
_p(1,'<ItemGroup Label="ProjectConfig... | mit |
garoose/eecs494.p2 | dev/premake/premake/src/base/io.lua | 12 | 1545 | --
-- io.lua
-- Additions to the I/O namespace.
-- Copyright (c) 2008-2009 Jason Perkins and the Premake project
--
--
-- Prepare to capture the output from all subsequent calls to io.printf(),
-- used for automated testing of the generators.
--
function io.capture()
io.captured = ''
end
--
-- Returns the... | mit |
LeMagnesium/minetest-minetestforfun-server | minetestforfun_game/mods/farming/barley.lua | 13 | 2625 |
local S = farming.intllib
-- barley seeds
minetest.register_node("farming:seed_barley", {
description = S("Barley Seed"),
tiles = {"farming_barley_seed.png"},
inventory_image = "farming_barley_seed.png",
wield_image = "farming_barley_seed.png",
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_nod... | unlicense |
DBarney/luvit | tests/test-require.lua | 8 | 3903 | --[[
Copyright 2012 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... | apache-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/managers/jedi/village/tests/sith_shadow_intro_theater_Test_disabled.lua | 2 | 17412 | local SithShadowIntroTheater = require("managers.jedi.village.sith_shadow_intro_theater")
local DirectorManagerMocks = require("screenplays.mocks.director_manager_mocks")
local QuestManagerMocks = require("managers.quest.mocks.quest_manager_mocks")
local SpawnMobilesMocks = require("utils.mocks.spawn_mobiles_mocks")
lo... | agpl-3.0 |
LeMagnesium/minetest-minetestforfun-server | minetestforfun_game/mods/player_physics/init.lua | 5 | 3191 | local players = {}
player_physics = {}
function player_physics.check(playerName)
if players[playerName] == nil then
players[playerName] = {speed = {}, jump = {}, gravity={}, temp={}}
end
end
minetest.register_on_joinplayer(function(player)
local playerName = player:get_player_name()
player_physics.check(playe... | unlicense |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dantooine/dark_side_savage.lua | 2 | 1314 | dark_side_savage = Creature:new {
objectName = "@mob/creature_names:dark_side_savage",
socialGroup = "kun",
faction = "",
level = 75,
chanceHit = 0.7,
damageMin = 595,
damageMax = 900,
baseXp = 7207,
baseHAM = 12000,
baseHAMmax = 15000,
armor = 1,
resists = {60,60,60,60,60,60,60,60,-1},
meatType = "",
mea... | agpl-3.0 |
TheLazar42/Reign-of-Darkness | games/Reign of Darkness/mods/default/crafting.lua | 2 | 14070 | -- mods/default/crafting.lua
minetest.register_craft({
output = 'default:wood 4',
recipe = {
{'default:tree'},
}
})
minetest.register_craft({
output = 'default:junglewood 4',
recipe = {
{'default:jungletree'},
}
})
minetest.register_craft({
output = 'default:stick 4',
recipe = {
{'group:wood'},
}
})
... | lgpl-2.1 |
insionng/gopher-lua | _lua5.1-tests/locals.lua | 18 | 2728 | print('testing local variables plus some extra stuff')
do
local i = 10
do local i = 100; assert(i==100) end
do local i = 1000; assert(i==1000) end
assert(i == 10)
if i ~= 10 then
local i = 20
else
local i = 30
assert(i == 30)
end
end
f = nil
local f
x = 1
a = nil
loadstring('local a = {}... | mit |
p0pr0ck5/lua-resty-waf | lib/resty/waf/storage.lua | 1 | 3965 | local _M = {}
local base = require "resty.waf.base"
local cjson = require "cjson"
local logger = require "resty.waf.log"
local util = require "resty.waf.util"
_M.version = base.version
local string_upper = string.upper
local _valid_backends = { dict = true, memcached = true, redis = true }
function _M.initial... | gpl-3.0 |
excessive/obtuse-tanuki | libs/material-love/libs/ripple.lua | 2 | 4659 | local ripple = {}
local ease = function (time, ftime)
local p = time / ftime
local e = -p * (p - 2)
return e
end
local lg = love.graphics
ripple.fade = function (self)
if self.type == "stencil" then
return self:fade()
end
if self.active then
self.ripples[#self.ripples + 1] = self.active
self.active = n... | mit |
ycaihua/QSanguosha | lua/ai/debug-ai.lua | 6 | 10138 | --[[********************************************************************
Copyright (c) 2013-2014 - QSanguosha-Rara
This file is part of QSanguosha-Hegemony.
This game 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... | gpl-3.0 |
LuaDist2/serpent | src/serpent.lua | 656 | 7877 | 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... | mit |
Blizzard/premake-core | modules/vstudio/tests/vc200x/test_nmake_settings.lua | 14 | 2271 | --
-- tests/actions/vstudio/vc200x/test_nmake_settings.lua
-- Validate generation the VCNMakeTool element in Visual Studio 200x C/C++ projects.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vs200x_nmake_settings")
local vc200x = p.vstudio.vc200x
--
--... | bsd-3-clause |
jorben/tokyotyrant | lab/footprint.lua | 4 | 1562 | MAXPRINT = 60
function add(key, value)
key = tonumber(key)
value = tonumber(value)
if not key or not value or key == value then
return nil
end
local ksel = _pack("i", key)
local time = os.time()
local date = os.date("*t", time)
date.hour = 0
date.min = 0
date.sec = 0
local mintim... | lgpl-2.1 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dantooine/janta_loreweaver.lua | 2 | 1080 | janta_loreweaver = Creature:new {
objectName = "@mob/creature_names:janta_loreweaver",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "janta_tribe",
faction = "janta_tribe",
level = 55,
chanceHit = 0.6,
damageMin = 445,
damageMax = 600,
baseXp = 5373,
baseHAM = 11000,
baseHAMmax = 14000,
armor = 0,
resis... | agpl-3.0 |
lidaohang/luajson | tests/lunit-simple-decode.lua | 4 | 3624 | local json = require("json")
local lunit = require("lunit")
-- Test module for handling the simple decoding that behaves more like expected
module("lunit-simple-decode", lunit.testcase, package.seeall)
function test_decode_simple_undefined()
assert_nil(json.decode('undefined', json.decode.simple))
end
function test_... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/blindAttack.lua | 2 | 2304 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program 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 2 of the License,
--or (at your option) any later version.
... | agpl-3.0 |
TheLazar42/Reign-of-Darkness | games/Reign of Darkness/mods/firearms/firearmslib/weapon.lua | 2 | 3111 |
--[[
|| weapon.lua
|| Routines to deal with weapons.
||
|| Part of the Firearms Modpack for Minetest.
|| Copyright (C) 2013 Diego Martínez <kaeza>
|| See `LICENSE.txt' for details.
--]]
local DEF_WIELD_SCALE = { x=2, y=2, z=2 }
local special_inits = {
sniper_rifle = function(weapon_def)
weapon_def.fir... | lgpl-2.1 |
sbouchex/domoticz | dzVents/runtime/integration-tests/varString.lua | 19 | 1685 | local log
local dz
local err = function(msg)
log(msg, dz.LOG_ERROR)
end
local tstMsg = function(msg, res)
print('Variable trigger, ' .. msg .. ': ' .. tostring(res and 'OK' or 'FAILED'))
end
local expectEql = function(attr, test, marker)
if (attr ~= test) then
local msg = tostring(attr) .. '~=' .. tostring(test... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/faction/imperial/imperial_sergeant_major.lua | 2 | 1714 | imperial_sergeant_major = Creature:new {
objectName = "@mob/creature_names:imperial_sergeant_major",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "imperial",
faction = "imperial",
level = 19,
chanceHit = 0.33,
damageMin = 180,
damageMax = 190,
baseXp = 1609,
baseHAM = 4500,
baseHAMmax = 5500,
armor = 0,... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/global_imperial_large_base_imperial_large_theater.lua | 2 | 1079 | global_imperial_large_base_imperial_large_theater = Lair:new {
mobiles = {
{"imperial_colonel",1},
{"imperial_major",1},
{"imperial_first_lieutenant",2},
{"imperial_sergeant",3}
},
spawnLimit = 15,
buildingsVeryEasy = {"object/building/poi/lok_imperial_large2.iff","object/building/poi/anywhere_imperial_base... | agpl-3.0 |
NYRDS/pixel-dungeon-remix | RemixedDungeon/src/main/assets/scripts/items/RawFish.lua | 1 | 1068 | --
-- User: mike
-- Date: 26.05.2018
-- Time: 21:32
-- This file is part of Remixed Pixel Dungeon.
--
local RPD = require "scripts/lib/commonClasses"
local item = require "scripts/lib/item"
return item.init{
desc = function ()
return {
image = 12,
imageFile = "items/food.png"... | gpl-3.0 |
MinimalOS/android_external_chromium_org_third_party_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 |
excessive/obtuse-tanuki | libs/material-love/libs/icons.lua | 2 | 36833 | --Generated with StyleToLua https://gist.github.com/Positive07/79cee2ae97bbcc8dc760
local unpack = table.unpack or unpack
local icons = { --1008
["account"] = "\239\132\129",
["account-alert"] = "\239\132\130",
["account-box"] = "\239\132\131",
["account-box-outline"] = "\239\132\132",
["account-check"] = "\239\... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/boardShuttle.lua | 4 | 2129 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program 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 2 of the License,
--or (at your option) any later version.
... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/faction/imperial/imperial_corporal.lua | 2 | 1393 | imperial_corporal = Creature:new {
objectName = "@mob/creature_names:imperial_corporal",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "imperial",
faction = "imperial",
level = 16,
chanceHit = 0.31,
damageMin = 170,
damageMax = 180,
baseXp = 960,
baseHAM = 2900,
baseHAMmax = 3500,
armor = 0,
resists = {... | agpl-3.0 |
fantajeon/TripletNet | Main.lua | 1 | 24476 | require 'DataContainer'
require 'TripletNet2'
require 'TripletNet'
require 'TripletNetBias'
require 'cutorch'
require 'eladtools'
require 'optim'
require 'xlua'
require 'trepl'
require 'DistanceRatioCriterion'
require 'DistanceRatioSoftMaxCriterion'
require 'DistancePseudoRatioCriterion'
require 'DistanceInterClassRati... | mit |
braydondavis/Nerd-Gaming-Public | resources/NGTurf/client.lua | 2 | 2585 | local isRender = false
local renderData = nil
local removeIfNotText = 0
addEvent ( "NGTurfs:onClientEnterTurfArea", true )
addEventHandler ( "NGTurfs:onClientEnterTurfArea", root, function ( info )
renderData = info
if ( not render ) then
addEventHandler ( "onClientRender", root, onClientRender )
render = true
... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/pipeworks/compat.lua | 9 | 5269 | -- this bit of code modifies the default chests and furnaces to be compatible
-- with pipeworks.
minetest.override_item("default:furnace", {
tiles = {
"default_furnace_top.png^pipeworks_tube_connection_stony.png",
"default_furnace_bottom.png^pipeworks_tube_connection_stony.png",
"default_furnace_side.png^pipewo... | unlicense |
rweichler/hostageidentity | addons/RCS/lua/weapons/rcs_p228/shared.lua | 1 | 2037 | --REAL CS BASE
--sorry for no comments to show what everything does im too lazy to do it LOL!
if (SERVER) then
AddCSLuaFile( "shared.lua" )
SWEP.Weight = 5
SWEP.HoldType = "pistol"
end
if ( CLIENT ) then
SWEP.PrintName = "SIG P228"
SWEP.Author = "cheesylard"
SWEP.SlotPos = 2
SWE... | mit |
interfect/cjdns | contrib/lua/cjdns/config.lua | 34 | 1851 | -- Cjdns admin module for Lua
-- Written by Philip Horger
common = require 'cjdns/common'
ConfigFile = {}
ConfigFile.__index = ConfigFile
common.ConfigFile = ConfigFile
function ConfigFile.new(path, no_init)
local values = {
path = path,
text = "",
contents = {},
}
setmeta... | gpl-3.0 |
kidaa/Algorithm-Implementations | Levenshtein_distance/Lua/Yonaba/levenshtein_test.lua | 27 | 1499 | -- Tests for levenshtein.lua
local lev_iter = (require 'levenshtein').lev_iter
local lev_recursive = (require 'levenshtein').lev_recursive
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... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/global_slicer_camp_neutral_small_theater.lua | 3 | 1076 | global_slicer_camp_neutral_small_theater = Lair:new {
mobiles = {{"slicer",1}},
spawnLimit = 9,
buildingsVeryEasy = {"object/building/poi/tatooine_hutt_businessmen_camp_small1.iff","object/building/poi/tatooine_hutt_businessmen_camp_small2.iff"},
buildingsEasy = {"object/building/poi/tatooine_hutt_businessmen_camp_... | agpl-3.0 |
mabotech/mabo.io | py/opcda/lua/update2.lua | 1 | 1268 |
--
-- key1,argv1,argv2
--
--
-- ttl : ARGV[4]
local payload = redis.call("HGET", KEYS[1],"val")
local heartbeat_key = string.format("%s_%s", KEYS[1], "heartbeat")
if payload == ARGV[1] then
-- redis.call("LPUSH", "c1","chan2")
redis.call("HSET", KEYS[1],"heartbeat",ARGV[2])
redis.call("HSET", KE... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/peace_areas/init.lua | 5 | 1930 | --
-- Peaceful areas
-- Where hitting is impossible
--
peace_areas = {areas = {}}
function is_in_peace_area(player)
local pos = player:getpos()
if pos == nil then return false end
for name, positions in pairs(peace_areas.areas) do
local pos1 = positions["pos1"]
local pos2 = positions["pos2"]
local minp = {
... | unlicense |
krunkathos/quasimofo | menu.lua | 1 | 5242 | -- Copyright 2016 krunkathos
--
-- 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 t... | apache-2.0 |
activebot20/activebot | plugins/owners.lua | 20 | 23763 | 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)]['settings'... | gpl-2.0 |
braydondavis/Nerd-Gaming-Public | resources/NGJobs/law/detective/detective_c.lua | 2 | 4401 | local detective = { }
local runningCases = { }
local clues = {349, 350, 325, 335, 337, 347, 358, 2263, 2703, 2837, 928, 3082, 1946, 1025, 2647, 2702, 2769}
function detective.startCase ( skin, x, y, z )
if ( getElementData ( localPlayer, "Job" ) ~= "Detective" or table.len ( runningCases ) >= 5 ) then
return
end
... | mit |
kiavateam/HelperKiava | plugins/core.lua | 1 | 48086 | --Begin Core.lua By #BeyondTeam
local function getindex(t,id)
for i,v in pairs(t) do
if v == id then
return i
end
end
return nil
end
local function reload_plugins( )
plugins = {}
load_plugins()
end
--By @SoLiD021
local function already_sudo(user_id)
for k,v in pairs(_config.sudo_users) do
if... | gpl-3.0 |
amin1717/Dark-Wolfs-bot | plugins/admin.lua | 230 | 6382 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
thiolliere/ultimate-warfare | src/weapon2.lua | 1 | 2286 | weapon[2]={} -- changer un peu le fonctionnement pour que arme qui chauffe et tir en continue
weapon[2].impulse=0
weapon[2].position={x=0,y=2*meter}
weapon[2].recul=weapon[2].impulse
weapon[2].bulletnumber=0
weapon[2].bulletnumbermax=256
weapon[2].reloadingbullettime=2
weapon[2].reloadingmagazinetime=10
weapon[2].dens... | mit |
javachengwc/skynet | lualib/multicast.lua | 66 | 2283 | local skynet = require "skynet"
local mc = require "multicast.core"
local multicastd
local multicast = {}
local dispatch = setmetatable({} , {__mode = "kv" })
local chan = {}
local chan_meta = {
__index = chan,
__gc = function(self)
self:unsubscribe()
end,
__tostring = function (self)
return string.format("[M... | mit |
TylerL-uxai/SamsBday | Resources/OpenglConstants.lua | 78 | 27074 | --Encapsulate opengl constants.
gl = gl or {}
gl.GCCSO_SHADER_BINARY_FJ = 0x9260
gl._3DC_XY_AMD = 0x87fa
gl._3DC_X_AMD = 0x87f9
gl.ACTIVE_ATTRIBUTES = 0x8b89
gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a
gl.ACTIVE_PROGRAM_EXT = 0x8259
gl.ACTIVE_TEXTURE = 0x84e0
gl.ACTIVE_UNIFORMS = 0x8b86
gl.ACTIVE_UNIFORM_M... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/snow/src/stairsplus.lua | 10 | 12560 | -- ===============================================================================
-- StairsPlus Bonus!
-- ===============================================================================
--[[
This section of code that makes blocks compatible with MoreBlocks' circular saw.
I've added circular saw compatible code for def... | unlicense |
TylerL-uxai/SamsBday | cocos2d/external/lua/luajit/src/src/jit/dis_x86.lua | 99 | 29330 | ----------------------------------------------------------------------------
-- LuaJIT x86/x64 disassembler module.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--------------------------------------------------------------------------... | mit |
excessive/obtuse-tanuki | libs/winapi/spi.lua | 2 | 7796 |
--proc/spi: system parameters info API.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
SPI_GETBEEP = 0x0001
SPI_SETBEEP = 0x0002
SPI_GETMOUSE = 0x0003
SPI_SETMOUSE = 0x0004
SPI_GETBORDER = 0x0005
SPI_SETBORDE... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/sea/seacobble/init.lua | 11 | 4870 | -- NODES
minetest.register_node("seacobble:seacobble", {
description = "Sea cobblestone",
tiles = {"seacobble_seacobble.png"},
is_ground_content = true,
groups = {cracky=3, stone=2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("seacobble:seacobble_cyan", {
description = "Sea cobbles... | unlicense |
LeMagnesium/minetest-minetestforfun-server | mods/homedecor_modpack/homedecor/handlers/sit.lua | 13 | 1049 | function homedecor.sit(pos, node, clicker)
do return end -- delete it when the engine is stabler for the player's physics
local meta = minetest.get_meta(pos)
local param2 = node.param2
local name = clicker:get_player_name()
if name == meta:get_string("is_sit") then
meta:set_string("is_sit", "")
pos.y = pos.y-... | unlicense |
alinofel/zooz11 | plugins/supergroup.lua | 1 | 80765 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY ALI NOFEL ▀▄ ▄▀
▀▄ ▄▀ BY ALI NOFEl (@ali_nofel) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY ALI NOFEL ▀▄ ▄▀
▀▄ ▄▀ Orders : الاوامر ▀▄ ▄▀
▀▄... | gpl-2.0 |
LeMagnesium/minetest-minetestforfun-server | mods/snow/src/falling_snow.lua | 9 | 7026 | --[[
--=================
--======================================
LazyJ's Fork of Splizard's "Snow" Mod
by LazyJ
version: Umpteen and 7/5ths something or another.
2014_04_12
--======================================
--=================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE LIST OF CHANGES I'VE MADE
~~~~~~~~~~~~~~~~~~... | unlicense |
Blizzard/premake-core | modules/vstudio/tests/vc2010/test_nmake_props.lua | 7 | 4179 | --
-- tests/actions/vstudio/vc2010/test_nmake_props.lua
-- Check makefile project generation.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vs2010_nmake_props")
local vc2010 = p.vstudio.vc2010
--
-- Setup
--
local wks, prj
function suite.setup()
... | bsd-3-clause |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dantooine/janta_hunter.lua | 2 | 1064 | janta_hunter = Creature:new {
objectName = "@mob/creature_names:janta_hunter",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "janta_tribe",
faction = "janta_tribe",
level = 50,
chanceHit = 0.5,
damageMin = 415,
damageMax = 540,
baseXp = 4916,
baseHAM = 11000,
baseHAMmax = 13000,
armor = 1,
resists = {5,... | agpl-3.0 |
griegler/octnet | th/oc/test_gpu.lua | 1 | 63866 | #!/usr/bin/env th
-- Copyright (c) 2017, The OctNet authors
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- no... | bsd-3-clause |
LeMagnesium/minetest-minetestforfun-server | mods/carts/functions.lua | 7 | 5082 | function carts:get_sign(z)
if z == 0 then
return 0
else
return z / math.abs(z)
end
end
function carts:manage_attachment(player, status, obj)
if not player then
return
end
local player_name = player:get_player_name()
if default.player_attached[player_name] == status then
return
end
default.player_attac... | unlicense |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/loot/items/wearables/shoes/shoes_s01.lua | 4 | 1246 | shoes_s01 = {
-- Dress Shoes
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/shoes/shoes_s01.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_color_2"},
customiza... | agpl-3.0 |
yimogod/boom | trunk/t-engine4/game/engines/engine/interface/PlayerExplore.lua | 1 | 20213 | -- TE4 - T-Engine 4
-- Copyright (C) 2009 - 2015 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.... | apache-2.0 |
LeMagnesium/minetest-minetestforfun-server | minetestforfun_game/mods/farming/soil.lua | 8 | 2011 |
local S = farming.intllib
-- normal soil
minetest.register_node("farming:soil", {
description = S("Soil"),
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
drop = "default:dirt",
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2},
sounds = default.node_sound_dirt_defaults(),
})
--... | unlicense |
kiarash14/adc | plugins/owners.lua | 284 | 12473 |
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 |
rained23/barebones | game/dota_addons/barebones/scripts/vscripts/gamemode.lua | 1 | 6882 | -- This is the primary barebones gamemode script and should be used to assist in initializing your game mode
-- Set this to true if you want to see a complete debug output of all events/processes done by barebones
-- You can also change the cvar 'barebones_spew' at any time to 1 or 0 for output/no output
BAREBONES_DE... | apache-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/dathomir_nightsister_outcast_camp_neutral_small_theater.lua | 3 | 2035 | dathomir_nightsister_outcast_camp_neutral_small_theater = Lair:new {
mobiles = {{"nightsister_outcast",1}},
spawnLimit = 9,
buildingsVeryEasy = {"object/building/poi/dathomir_nightsister_small1.iff","object/building/poi/dathomir_nightsister_small2.iff","object/building/poi/dathomir_nightsister_small3.iff","object/bu... | agpl-3.0 |
DeepeshC/pubnub | lua-corona/Json.lua | 13 | 12742 | --[[
JSON Encoder and Parser for Lua 5.1
Copyright © 2007 Shaun Brown (http://www.chipmunkav.com).
All Rights Reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software to deal in the Software without
restriction, including without limitation the rights... | mit |
bingo235/skynet | lualib/http/httpc.lua | 13 | 3184 | local socket = require "http.sockethelper"
local url = require "http.url"
local internal = require "http.internal"
local dns = require "dns"
local string = string
local table = table
local httpc = {}
local function request(fd, method, host, url, recvheader, header, content)
local read = socket.readfunc(fd)
local wr... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/csGetArticle.lua | 4 | 2129 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program 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 2 of the License,
--or (at your option) any later version.
... | agpl-3.0 |
henu/Urho3D | bin/Data/LuaScripts/33_Urho2DSpriterAnimation.lua | 24 | 7416 | -- Urho2D sprite example.
-- This sample demonstrates:
-- - Creating a 2D scene with spriter animation
-- - Displaying the scene using the Renderer subsystem
-- - Handling keyboard to move and zoom 2D camera
require "LuaScripts/Utilities/Sample"
local spriterNode = nil
local spriterAnimationIndex... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/loot/items/wearables/gloves/gloves_s07.lua | 4 | 1259 | gloves_s07 = {
-- Long Leather Gloves
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/gloves/gloves_s07.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_color_2"},
... | agpl-3.0 |
lolleko/guesswho | gamemodes/guesswho/gamemode/lang/de.lua | 1 | 1367 | local de = {
--Language name
language_name = "Deutsch (German)",
--Round states
round_pre_game = "Vorbereitung",
round_waiting_players = "Warten auf Spieler",
round_creating = "Erschaffe NPCs",
round_hide = "Verstecken",
round_seek = "Suchen",
round_post = "Gleich geht es weiter",
... | mit |
kidaa/Algorithm-Implementations | Linear_Search/Lua/Yonaba/linear_search_test.lua | 26 | 2059 | -- Tests for linear_search.lua
local search = require 'linear_search'
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 ... | mit |
ArmanIr/IrbotTgcli | plugins/get.lua | 613 | 1067 | local function get_variables_hash(msg)
if msg.to.type == 'chat' then
return 'chat:'..msg.to.id..':variables'
end
if msg.to.type == 'user' then
return 'user:'..msg.from.id..':variables'
end
end
local function list_variables(msg)
local hash = get_variables_hash(msg)
if hash then
local names =... | gpl-2.0 |
mkxml/dotfiles | .keyboard/hammerspoon/panes.lua | 4 | 1088 | local itermHotkeyMappings = {
-- Use control + dash to split panes horizontally
{
from = {{'ctrl'}, '-'},
to = {{'cmd', 'shift'}, 'd'}
},
-- Use control + pipe to split panes vertically
{
from = {{'ctrl', 'shift'}, '\\'},
to = {{'cmd'}, 'd'}
},
-- Use control + h/j/k/l to move left/d... | mit |
theunknownxy/opencomputers-base | uHUD/horizontalbar.lua | 1 | 1415 | HorizontalBar = Widget:subclass("HorizontalBar")
function HorizontalBar:initialize(name, x, y, width, height, fg, bg, bordercolor, opacity)
Widget.initialize(self, name, x, y, width, height)
self.fg = fg
self.bg = bg
self.bordercolor = bordercolor
self.opacity = opacity
self.value = 0
self.borderpx = 1... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/melee1hBodyHit2.lua | 2 | 2458 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program 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 2 of the License,
--or (at your option) any later version.
... | agpl-3.0 |
kidaa/Algorithm-Implementations | Knuth_Morris_Pratt/Lua/Yonaba/kmp.lua | 26 | 1219 | -- Knuth-Morris-Pratt string searching algorithm implementation
-- See: http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
local function kmp_table(pattern)
local result = {}
for i = 1, #pattern+1,1 do
local j = i
while true do
if j == 1 then
result[#result + 1] = 1
... | mit |
p0pr0ck5/lua-resty-waf | t/translation/11_translate_chains.lua | 1 | 4353 | describe("translate_chains", function()
local lib = require "resty.waf.translate"
local t = lib.translate_chains
it("builds the skeleton chain hashref when given an empty chain list",
function()
local chains, err
assert.has.no_errors(function() chains, err = t({}) end)
assert.are.same(chains, {
access... | gpl-3.0 |
garoose/eecs494.p2 | dev/premake/premake/src/tools/snc.lua | 13 | 3387 | --
-- snc.lua
-- Provides Sony SNC-specific configuration strings.
-- Copyright (c) 2010 Jason Perkins and the Premake project
--
premake.snc = { }
-- TODO: Will cfg.system == "windows" ever be true for SNC? If
-- not, remove the conditional blocks that use this test.
--
-- Set default tools
--
premake.snc.cc... | mit |
alzaen/al-zaen | data/config.lua | 1 | 8813 | do local _ = {
about_text = "Teleseed v4\nAn advanced administration bot based on TG-CLI written in Lua\n\nhttps://github.com/SEEDTEAM/TeleSeed\n\nAdmins\n@iwals [Founder]\n@imandaneshi [Developer]\n@POTUS [Developer]\n@seyedan25 [Manager]\n@aRandomStranger [Admin]\n\nSpecial thanks to\nawkward_potato\nSiyanew\ntopke... | gpl-2.0 |
ethantang95/DIGITS-GAN | digits/tools/torch/data.lua | 5 | 31382 | -- Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
require 'torch' -- torch
require 'nn' -- provides a normalization operator
require 'utils' -- various utility functions
local threads = require 'threads' -- for multi-threaded data loader
check_require('image') -- for color transforms
package.path = ... | bsd-3-clause |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/corellia/corsec_chief.lua | 2 | 1109 | corsec_chief = Creature:new {
objectName = "@mob/creature_names:corsec_chief",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "corsec",
faction = "corsec",
level = 27,
chanceHit = 0.37,
damageMin = 260,
damageMax = 270,
baseXp = 2822,
baseHAM = 8100,
baseHAMmax = 9900,
armor = 0,
resists = {20,20,20,20,2... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/dathomir_escaped_mtn_clan_slave_camp_neutral_medium_theater.lua | 3 | 1102 | dathomir_escaped_mtn_clan_slave_camp_neutral_medium_theater = Lair:new {
mobiles = {
{"escaped_singing_mountain_clan_slave",1},
{"domesticated_brackaset",1},
},
spawnLimit = 12,
buildingsVeryEasy = {"object/building/poi/dathomir_freedprisonerscamp_medium1.iff","object/building/poi/dathomir_freedprisonerscamp_me... | agpl-3.0 |
jlegendary/torch7 | Tensor.lua | 57 | 16339 | -- additional methods for Storage
local Storage = {}
-- additional methods for Tensor
local Tensor = {}
-- types
local types = {'Byte', 'Char', 'Short', 'Int', 'Long', 'Float', 'Double'}
-- Lua 5.2 compatibility
local log10 = math.log10 or function(x) return math.log(x, 10) end
-- tostring() functions for Tensor an... | bsd-3-clause |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dungeon/corellian_corvette/serverobjects.lua | 3 | 3027 |
--Imperial
includeFile("dungeon/corellian_corvette/imperial/darkstone.lua")
includeFile("dungeon/corellian_corvette/imperial/ds_297.lua")
includeFile("dungeon/corellian_corvette/imperial/lt_velso.lua")
includeFile("dungeon/corellian_corvette/imperial/rebel_admiral.lua")
includeFile("dungeon/corellian_corvette/imperial... | agpl-3.0 |
excessive/obtuse-tanuki | libs/winapi/tabcontrolclass.lua | 2 | 2109 |
--oo/tabcontrol: standard tab control.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.controlclass'
require'winapi.itemlist'
require'winapi.tabcontrol'
TabItemList = class(ItemList)
function TabItemList:__init(tab)
self.hwnd = tab.hwnd
end
function TabItemList:add(i, ite... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/setBoostmorale.lua | 4 | 2194 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program 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 2 of the License,
--or (at your option) any later version.
... | agpl-3.0 |
Blizzard/premake-core | modules/vstudio/tests/cs2005/test_assembly_refs.lua | 10 | 6663 | --
-- tests/actions/vstudio/cs2005/test_assembly_refs.lua
-- Test the assembly linking block of a Visual Studio 2005+ C# project.
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_cs2005_assembly_refs")
local dn2005 = p.vstudio.dotnetbase
--
... | bsd-3-clause |
matt-deboer/marathon-lb | signalmlb.lua | 4 | 1309 | -- A simple Lua module for HAProxy that sends signals to the marathon-lb process
function run(cmd)
local file = io.popen(cmd)
local output = file:read('*a')
local success, _, code = file:close()
return output, success, code
end
function send_response(applet, code, response)
applet:set_status(code)
applet:... | apache-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dathomir/spiderclan_crawler.lua | 2 | 1501 | spiderclan_crawler = Creature:new {
objectName = "@mob/creature_names:spider_nightsister_crawler",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "spider_nightsister",
faction = "spider_nightsister",
level = 85,
chanceHit = 0.75,
damageMin = 555,
damageMax = 820,
baseXp = 8130,
baseHAM = 12000,
baseHAMmax ... | agpl-3.0 |
MikeMcShaffry/gamecode3 | Dev/Source/3rdParty/LuaPlus/Bin/lua/luasql-sqlite3.lua | 4 | 5938 |
--[[--------------------------------------------------------------------------
Author: Michael Roth <mroth@nessie.de>
Copyright (c) 2004 Michael Roth <mroth@nessie.de>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
file... | lgpl-2.1 |
moonlight/cave-adventure | data/scripts/Cave2.lua | 1 | 3515 | --
-- The second cave map
--
import("Map.lua")
Cave2 = Map:subclass
{
name = "Cave2";
init = function(self)
Map.init(self, "data/maps/cave2.map")
self:spawn(Spring, 44, 7)
self:spawn(Spring, 6, 42)
-- Spider webs
self:spawn(SpiderWeb, 19, 7)
self:spawn(SpiderWeb, 1, 45)
self:sp... | gpl-2.0 |
amirhoseinkarimi2233/uzzbot | plugins/domaintools.lua | 359 | 1494 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function check(name)
local api = "https://domainsearch.p.mashape.com/index.php?"... | gpl-2.0 |
ArmanIr/IrbotTgcli | plugins/webshot.lua | 919 | 1473 | local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
method = "GET",
sink = ltn12.sink.table(response_body),
header... | gpl-2.0 |
peymankhanas/khanas-bot | plugins/time.lua | 771 | 2865 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
amirjoker/Telecloner | plugins/inpm.lua | 11 | 2850 | do
function run(msg, matches)
if msg.to.id == our_id then
local data = load_data(_config.moderation.data)
if matches[1] == 'join' and data[tostring(matches[2])] then
if is_banned(msg.from.id, matches[2]) then
return 'شما بن هستید'
end
if is_gbanned(msg.from.id) then
return 'شما از تمام... | gpl-2.0 |
edge2054/Fae | class/Player.lua | 1 | 13747 | -- Fae
-- Copyright (C) 2012 Eric Wykoff
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is di... | gpl-3.0 |
StephenZhuang/qdkpv2 | QDKP_V2/QDKP_V2/Code/Lib/AceComm-3.0.lua | 10 | 11192 | --- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels.
-- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
-- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
--
-- **AceComm-3.0** can... | gpl-3.0 |
helling34/skynet | lualib/http/httpc.lua | 42 | 2906 | local socket = require "http.sockethelper"
local url = require "http.url"
local internal = require "http.internal"
local string = string
local table = table
local httpc = {}
local function request(fd, method, host, url, recvheader, header, content)
local read = socket.readfunc(fd)
local write = socket.writefunc(fd)... | mit |
javachengwc/skynet | lualib/http/httpc.lua | 42 | 2906 | local socket = require "http.sockethelper"
local url = require "http.url"
local internal = require "http.internal"
local string = string
local table = table
local httpc = {}
local function request(fd, method, host, url, recvheader, header, content)
local read = socket.readfunc(fd)
local write = socket.writefunc(fd)... | mit |
lolleko/guesswho | gamemodes/guesswho/entities/weapons/weapon_gw_blasting_off.lua | 1 | 1185 | AddCSLuaFile()
SWEP.Base = "weapon_gwbase"
SWEP.Name = "Blast Off"
SWEP.AbilityDuration = 3
SWEP.AbilityDescription = "Launches all seekers into the air after a short delay.\nThe seekers are stuck in the air for at least $AbilityDuration seconds.\n\nDoes not work well indoors."
function SWEP:Ability()
if SERVER ... | mit |
helling34/skynet | lualib/mqueue.lua | 115 | 1798 | -- This is a deprecated module, use skynet.queue instead.
local skynet = require "skynet"
local c = require "skynet.core"
local mqueue = {}
local init_once
local thread_id
local message_queue = {}
skynet.register_protocol {
name = "queue",
-- please read skynet.h for magic number 8
id = 8,
pack = skynet.pack,
u... | mit |
javachengwc/skynet | lualib/mqueue.lua | 115 | 1798 | -- This is a deprecated module, use skynet.queue instead.
local skynet = require "skynet"
local c = require "skynet.core"
local mqueue = {}
local init_once
local thread_id
local message_queue = {}
skynet.register_protocol {
name = "queue",
-- please read skynet.h for magic number 8
id = 8,
pack = skynet.pack,
u... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.