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 |
|---|---|---|---|---|---|
77u4/randommailsubjectgenerator | json/rpcserver.lua | 6 | 3136 | -----------------------------------------------------------------------------
-- JSONRPC4Lua: JSON RPC server for exposing Lua objects as JSON RPC callable
-- objects via http.
-- json.rpcserver Module.
-- Author: Craig Mason-Jones
-- Homepage: http://json.luaforge.net/
-- Version: 0.9.40
-- This module is rele... | gpl-3.0 |
helling34/skynet | examples/login/gated.lua | 57 | 2201 | local msgserver = require "snax.msgserver"
local crypt = require "crypt"
local skynet = require "skynet"
local loginservice = tonumber(...)
local server = {}
local users = {}
local username_map = {}
local internal_id = 0
-- login server disallow multi login, so login_handler never be reentry
-- call by login server
... | mit |
hfjgjfg/persianguard58 | plugins/all.lua | 54 | 4746 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
amirjoker/Telecloner | plugins/feedback.lua | 6 | 2697 |
do
function run(msg, matches)
local fuse = 'New FeedBack!\n\nID : ' .. msg.from.id .. '\n\n Name : ' .. msg.from.print_name ..'\n\n Username : @'..msg.from.username..'\n\n\n PM:\n' .. matches[1]
local fuses = '!printf user#id' .. msg.from.id
local text = matches[1]
local chat = "chat#id"..97426604 --pu... | gpl-2.0 |
LomoX-Offical/nginx-openresty-windows | src/luajit-root-debug/luajit/share/luajit-2.1.0-beta/jit/dis_x86.lua | 61 | 29376 | ----------------------------------------------------------------------------
-- LuaJIT x86/x64 disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--------------------------------------------------------------------------... | bsd-2-clause |
LomoX-Offical/nginx-openresty-windows | src/luajit-root/luajit/share/luajit-2.1.0-beta/jit/dis_x86.lua | 61 | 29376 | ----------------------------------------------------------------------------
-- LuaJIT x86/x64 disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--------------------------------------------------------------------------... | bsd-2-clause |
braydondavis/Nerd-Gaming-Public | resources/NGPhone/client_core.lua | 2 | 51444 | local sx, sy = guiGetScreenSize ( )
local phone_y = sy + 10
local to_phone_y = sy - 600
local phone_x = sx - 330
local moveSpeed = 18
local isOpen = false
local isRender = false
LoadedPage = nil
local RealTime = "00:00"
local backgroundPath = "images/backgrounds/background_1.png"
if ( fileExists ( "custombg.png" ) ) t... | mit |
kikito/anim8 | spec/anim8/grid_spec.lua | 4 | 4840 | require 'spec.love-mocks'
local anim8 = require 'anim8'
local newQuad = love.graphics.newQuad
local newGrid = anim8.newGrid
describe("anim8", function()
describe("newGrid", function()
it("throws error if any of its parameters is not a positive integer", function()
assert.error(function() newGrid() e... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/christmas_craft/init.lua | 4 | 27908 | --dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --temporary disabled because cristmas is over--
if minetest.setting_getbool("is_winter") then
dofile(minetest.get_modpath("christmas_craft").."/setti... | unlicense |
braydondavis/Nerd-Gaming-Public | resources/[no_ng_tag]/realdriveby/utils/textlib.lua | 3 | 7425 | dxText = {}
dxText_mt = { __index = dxText }
local idAssign,idPrefix = 0,"c"
local g_screenX,g_screenY = guiGetScreenSize()
local visibleText = {}
------
local defaults = {
fX = 0.5,
fY = 0.5,
bRelativePosition = true,
strText = "",
bVerticalAlign = "center",
bHorizontalAlign = "center"... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/pistolMeleeDefense1.lua | 2 | 2638 | --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 |
ljm342/text-world-player | TransitionTable.lua | 3 | 14400 |
require 'image'
local trans = torch.class('dqn.TransitionTable')
function trans:__init(args)
if vector_function == convert_text_to_ordered_list2 then
self.stateDim = args.stateDim * 2 -- @karthik: double state-dim for desc and quest separately
else
self.stateDim = args.stateDim -- State dim... | mit |
Blizzard/premake-core | tests/project/test_eachconfig.lua | 16 | 3443 | --
-- tests/project/test_eachconfig.lua
-- Test the project object configuration iterator function.
-- Copyright (c) 2011-2015 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("project_eachconfig")
--
-- Setup and teardown
--
local wks, prj
function suite.setup()
wks = wo... | bsd-3-clause |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/healMind.lua | 4 | 2117 | --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/lair/npc_theater/endor_gondula_loremaster_neutral_small_theater.lua | 3 | 1134 | endor_gondula_loremaster_neutral_small_theater = Lair:new {
mobiles = {
{"gondula_loremaster",1},
{"gifted_gondula_shaman",1},
{"gondula_shaman",1},
{"gondula_tribesman",1}
},
spawnLimit = 9,
buildingsVeryEasy = {"object/building/poi/endor_ewok_small1.iff","object/building/poi/endor_ewok_small2.iff","object... | agpl-3.0 |
szczukot/domoticz | dzVents/runtime/device-adapters/thermostat_operating_state_device.lua | 6 | 1249 | return {
baseType = 'device',
name = 'Thermostat operating state device adapter',
matches = function(device, adapterManager)
local res = (device.deviceSubType == 'Thermostat Operating State')
if (not res) then
adapterManager.addDummyMethod(device, 'updateMode')
end
return res
end,
process = function... | gpl-3.0 |
thennequin/ImWindow | scripts/genie.lua | 1 | 15307 |
newoption {
trigger = "with-sff",
description = "Enable generation of single file format",
}
newoption {
trigger = "with-dx11",
description = "Enable DX11 backend sample",
}
newoption {
trigger = "with-opengl",
description = "Enable OpenGL backend sample",
}
newoption {
trigger = "with-glfw",
description = ... | mit |
Alireza5928/abedzadeh | plugins/lock_fwd.lua | 7 | 1238 | do
local function pre_process(msg)
local hash = 'mate:'..msg.to.id
if redis:get(hash) and msg.fwd_from and not is_sudo(msg) and not is_owner(msg) and not is_momod(msg) and not is_admin1(msg) then
delete_msg(msg.id, ok_cb, true)
return "done"
end
return msg
end
local... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/loot/items/wearables/vest/vest_s06.lua | 4 | 1245 | vest_s06 = {
-- Padded Pullover
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/vest/vest_s06.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_color_2"},
customiz... | agpl-3.0 |
rained23/barebones | game/dota_addons/barebones/scripts/vscripts/internal/eventtest.lua | 21 | 59645 | function GameMode:StartEventTest()
ListenToGameEvent("team_info", Dynamic_Wrap(GameMode, 'On_team_info'), self)
ListenToGameEvent("team_score", Dynamic_Wrap(GameMode, 'On_team_score'), self)
ListenToGameEvent("teamplay_broadcast_audio", Dynamic_Wrap(GameMode, 'On_teamplay_broadcast_audio'), self)
ListenToGameEvent(... | apache-2.0 |
powerboat9/repository-downloader | download.lua | 1 | 6294 | local rawList = {...}
local list = {}
if #rawList < 1 then
error("Invalid command syntax", 0)
end
for _, v in ipairs(rawList) do
if type(v) ~= "string" then
error("Package name is not a string", 0)
elseif v:gsub("^!?[%w/:@>-_]*", "") ~= "" then
error("Invalid package name", 0)
end
... | mit |
csteddy/lunajson | test/decodeparse/test-lunasaxnobuf-decoder.lua | 4 | 1268 | local saxtbl = {}
local current = {} local nullv
do
local stack = {}
local top = 1
local key = 1
local isobj
local function add(v)
if v == nil then
v = nullv
end
current[key] = v
if type(key) == 'number' then
key = key+1
end
end
local function push()
stack[top] = current
stack[top+1] = key... | mit |
LeMagnesium/minetest-minetestforfun-server | mods/mobs/npc_female.lua | 7 | 4196 |
-- Npc by TenPlus1
mobs.npc_drops = { "farming:meat", "farming:donut", "farming:bread", "default:apple", "default:sapling", "default:junglesapling",
"shields:shield_enhanced_wood", "3d_armor:chestplate_cactus", "3d_armor:boots_bronze",
"default:sword_steel", "default:pick_steel", "default:shovel_steel", "d... | unlicense |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/corellia/selonian_warrior.lua | 2 | 2183 | selonian_warrior = Creature:new {
objectName = "@mob/creature_names:selonian_warrior",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "selonian",
faction = "",
level = 13,
chanceHit = 0.3,
damageMin = 140,
damageMax = 150,
baseXp = 714,
baseHAM = 1500,
baseHAMmax = 1900,
armor = 0,
resists = {0,0,0,0,0,0... | agpl-3.0 |
aqasaeed/spartatg | libs/dkjson.lua | 31 | 26560 | -- Module options:
local always_try_using_lpeg = true
local register_global_module_table = false
local global_module_name = 'json'
--[==[
David Kolf's JSON module for Lua 5.1/5.2
========================================
*Version 2.4*
In the default configuration this module writes no global value... | gpl-2.0 |
a36153656/test | StarMap.lua | 2 | 24209 | ------------------------------------------------------------------
-- °æ Ȩ: (C) ÉîÛÚ±ù´¨ÍøÂç¼¼ÊõÓÐÏÞ¹«Ë¾ 2014 - All Rights Reserved
-- ´´½¨ÈË: ëø»ÛÆ½
-- ÈÕ ÆÚ: 2014-07-04
-- °æ ±¾: 1.0
-- ÎļþÃû: StarMap.lua
-- Ãè Êö: ÐÇͼ
-------------------------------------------------------------------
require(UI_SCRIPT_PATH ... | gpl-2.0 |
StephenZhuang/qdkpv2 | QDKP_V2/QDKP_V2/Code/Lib/LibBabble-3.0.lua | 5 | 8233 | -- LibBabble-3.0 is hereby placed in the Public Domain
-- Credits: ckknight
local LIBBABBLE_MAJOR, LIBBABBLE_MINOR = "LibBabble-3.0", 2
local LibBabble = LibStub:NewLibrary(LIBBABBLE_MAJOR, LIBBABBLE_MINOR)
if not LibBabble then
return
end
local data = LibBabble.data or {}
for k,v in pairs(LibBabble) do
... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/medicalForage.lua | 4 | 2132 | --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/endor/grungy_donkuwah_laborer.lua | 2 | 1048 | grungy_donkuwah_laborer = Creature:new {
objectName = "@mob/creature_names:grungy_donkuwah_laborer",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "donkuwah_tribe",
faction = "donkuwah_tribe",
level = 28,
chanceHit = 0.37,
damageMin = 270,
damageMax = 280,
baseXp = 2914,
baseHAM = 8200,
baseHAMmax = 10000... | agpl-3.0 |
tfagit/telegram-bot | plugins/gnuplot.lua | 622 | 1813 | --[[
* Gnuplot plugin by psykomantis
* dependencies:
* - gnuplot 5.00
* - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html
*
]]
-- Gnuplot needs absolute path for the plot, so i run some commands to find where we are
local outputFile = io.popen("pwd","r")
io.input(outputFile... | gpl-2.0 |
ArmanIr/IrbotTgcli | plugins/gnuplot.lua | 622 | 1813 | --[[
* Gnuplot plugin by psykomantis
* dependencies:
* - gnuplot 5.00
* - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html
*
]]
-- Gnuplot needs absolute path for the plot, so i run some commands to find where we are
local outputFile = io.popen("pwd","r")
io.input(outputFile... | gpl-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/cripplingShot.lua | 2 | 2455 | --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/conversations/themepark/nym/jinkins_conv.lua | 3 | 11142 | jinkinsConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "theme_park_nym_conv_handler",
screens = {}
}
----------
--Jinkins convos if quest completed
----------
good_work = ConvoScreen:new {
id = "good_work",
leftDialog = "@celebrity/jinkins:good_work", -- Securing t... | agpl-3.0 |
Inquiryel/HPW_Rewrite-SBS | lua/hpwrewrite/spells/harrypotter/wingardiumleviosa.lua | 2 | 2990 | local Spell = { }
Spell.LearnTime = 240
Spell.Category = HpwRewrite.CategoryNames.Physics
Spell.Description = [[
Can make something fly.
Doesn't work on huge and
massive objects.
Use 'Reload' (R) and 'Use' (E)
keys to change object's
distance from you.
Hold shift and press
'Fire 1' (Left mouse button)
to t... | mit |
sharoth/SHARO_TH | plugin/ar-banhammer.lua | 2 | 12907 |
local function pre_process(msg)
local data = load_data(_config.moderation.data)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Che... | gpl-3.0 |
braydondavis/Nerd-Gaming-Public | resources/NGAmmunation/training/server.lua | 2 | 3661 | local warpLocs = {
--[[ format:
{
{ the create position },
{ the warp position },
{ int, dim }
} ]]
-- LS
{{286.33, -30.39, 1001.52},{286.19, -27, 1002},{1,0}},
{{286.16, -28.5, 1001.52},{286.19, -32, 1002},{1,0}},
{{286.33, -30.39, 1001.52},{286.19, -27, 1002},{1,1}},
{{286.16, -28.5, 1001.52},{286.1... | mit |
helling34/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 |
javachengwc/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 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dathomir/nightsister_elder.lua | 2 | 1440 | nightsister_elder = Creature:new {
objectName = "@mob/creature_names:nightsister_elder",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "nightsister",
faction = "nightsister",
level = 278,
chanceHit = 27.25,
damageMin = 1520,
damageMax = 2750,
baseXp = 26654,
baseHAM = 321000,
baseHAMmax = 392000,
armor =... | agpl-3.0 |
ClearTables/ClearTables | test-admin.lua | 2 | 1567 | --[[
This file is part of ClearTables
@author Paul Norman <penorman@mac.com>
@copyright 2015-2016 Paul Norman, MIT license
]]--
require "admin"
print("admin.lua tests")
print("TESTING: admin_level")
assert(admin_level(nil) == nil, "test failed: nil")
assert(admin_level("foo") == nil, "test failed: text")
assert(admi... | mit |
glaubitz/ion3-debian | etc/look_simpleblue.lua | 3 | 2388 | -- look_simpleblue.lua drawing engine configuration file for Ion.
if not gr.select_engine("de") then return end
de.reset()
de.defstyle("*", {
shadow_colour = "black",
highlight_colour = "black",
background_colour = "#0f1f4f",
foreground_colour = "#9f9f9f",
padding_pixels = 1,
highlight_pixels... | lgpl-2.1 |
willurd/liblove | lib/graphics/rect.lua | 1 | 1501 | require('lib/essential')
require('lib/math/vector2')
require('lib/graphics/color')
Rect = class('Rect')
Rect.DEFAULT_POSITION = Vector2:new(0, 0)
Rect.DEFAULT_WIDTH = 1
Rect.DEFAULT_HEIGHT = 1
Rect.DEFAULT_DRAW_MODE = "fill"
Rect.DEFAULT_COLOR = Color.WHITE
function Rect:initialize (position, width, heig... | gpl-3.0 |
aqasaeed/spartatg | plugins/chat.lua | 28 | 1195 | local function run(msg)
if msg.text == "hi" then
return "Hello bb"
end
if msg.text == "Hi" then
return "Hello honey"
end
if msg.text == "Hello" then
return "Hi bb"
end
if msg.text == "hello" then
return "Hi honey"
end
if msg.text == "Salam" then
return "Salam aleykom"
end
if msg.text == "salam" then
return "و علی... | gpl-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/lootAiCorpse.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 |
LomoX-Offical/nginx-openresty-windows | src/lua-5.1.5/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-2-clause |
garoose/eecs494.p2 | dev/premake/premake/src/host/lua-5.1.4/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/talus_aakuan_steward_camp_neutral_small_theater.lua | 2 | 1137 | talus_aakuan_steward_camp_neutral_small_theater = Lair:new {
mobiles = {{"aakuan_steward",1},{"aakuan_defender",1},{"aakuan_spice_guard",1}},
spawnLimit = 15,
buildingsVeryEasy = {"object/building/poi/corellia_selonian_separatists_small1.iff","object/building/poi/corellia_selonian_separatists_small2.iff"},
building... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/corellia/selonian_thief.lua | 2 | 2173 | selonian_thief = Creature:new {
objectName = "@mob/creature_names:selonian_thief",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "selonian",
faction = "",
level = 6,
chanceHit = 0.25,
damageMin = 50,
damageMax = 55,
baseXp = 113,
baseHAM = 180,
baseHAMmax = 220,
armor = 0,
resists = {0,0,0,0,0,0,0,-1,-1... | agpl-3.0 |
TheLazar42/Reign-of-Darkness | games/MechCraft/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 |
swordflychen/TSDB_CLUSTER | tools/regression/test.lua | 1 | 4333 | --
-- file: test.lua
-- auth: chenjianfei@daoke.me
-- date: 2014-07-1
-- desc: regression test of tsdb
--
package.path = "../api/?.lua;./api/?.lua;" .. package.path
local redis_pool = require("redis")
-->> create a connection to tsdb.
local function connect(ip, port)
print("=======================================... | gpl-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/getRank.lua | 4 | 2114 | --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 |
kiavateam/HelperKiava | libs/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... | gpl-3.0 |
sadikrapre12/Days-Gone | libs/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... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dungeon/corellian_corvette/neutral/corsec_special_ops_master_sergeant.lua | 2 | 1474 | corsec_special_ops_master_sergeant = Creature:new {
objectName = "@mob/creature_names:corsec_master_sergeant_aggro",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "corsec",
faction = "corsec",
level = 140,
chanceHit = 7,
damageMin = 845,
damageMax = 1400,
baseXp = 13273,
baseHAM = 68000,
baseHAMmax = 8300... | agpl-3.0 |
lolleko/guesswho | gamemodes/guesswho/entities/entities/gw_npc_walker.lua | 1 | 21897 | AddCSLuaFile()
local Behaviour = include("gw_behaviour_tree_lib.lua")
ENT.Base = "base_nextbot"
GW_WALKER_TARGET_TYPE_NONE = 0
GW_WALKER_TARGET_TYPE_POSITION = 1
GW_WALKER_TARGET_TYPE_HIDING_SPOT = 2
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "LastAct")
self:NetworkVar("Int", 1, ... | mit |
Blizzard/premake-core | modules/vstudio/vs2010_vcxproj.lua | 1 | 61490 | --
-- vs2010_vcxproj.lua
-- Generate a Visual Studio 201x C/C++ project.
-- Copyright (c) Jason Perkins and the Premake project
--
local p = premake
p.vstudio.vc2010 = {}
local vstudio = p.vstudio
local project = p.project
local config = p.config
local fileconfig = p.fileconfig
local tree = p.tree
local m = ... | bsd-3-clause |
TeleGram-Real/OmarReaI | bot/seedbot.lua | 22 | 14096 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
local f = assert(io.popen('/usr/bin/git describe --tags', 'r'))
VERSION = assert(f:read('*a'))
f:close()
-- This function is ... | gpl-2.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/endor/vile_korga_battlelord.lua | 2 | 1042 | vile_korga_battlelord = Creature:new {
objectName = "@mob/creature_names:vile_korga_battlelord",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "korga_tribe",
faction = "korga_tribe",
level = 38,
chanceHit = 0.43,
damageMin = 375,
damageMax = 460,
baseXp = 3824,
baseHAM = 8800,
baseHAMmax = 10800,
armor =... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/loot/items/wearables/pants/pants_s21.lua | 4 | 1070 | pants_s21 = {
-- Paramilitary Camos
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/pants/pants_s21.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_color_2"},
cu... | agpl-3.0 |
excessive/obtuse-tanuki | libs/winapi/debug.lua | 2 | 2314 |
--core/debug: strict mode and some debug tools. entirely optional module.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi.namespace')
--disable stdout buffering so we can print-debug stuff
io.stdout:setvbuf'no'
io.stderr:setvbuf'no'
--set strict mode for the whole winapi namespace
local _G ... | mit |
xztraz/domoticz | dzVents/runtime/lodash.lua | 11 | 65212 | ---
-- lodash for lua
-- @module lodash
-- @author Ted Moghimi
-- @license MIT
local _ = {
_VERSION = '0.02'
}
--- Array
-- @section Array
---
-- Creates an array of elements split into groups the length of size.
-- If collection can’t be split evenly, the final chunk will be the
-- remaining elements.
-- @usa... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/ai/templates/templates.lua | 2 | 2853 | includeAiFile("templates/example.lua")
includeAiFile("templates/stationary.lua")
includeAiFile("templates/follow.lua")
includeAiFile("templates/wait.lua")
includeAiFile("templates/idlewander.lua")
includeAiFile("templates/idlewait.lua")
includeAiFile("templates/idlepet.lua")
includeAiFile("templates/gettargetreactive.l... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/faction/imperial/imperial_pilot.lua | 2 | 1358 | imperial_pilot = Creature:new {
objectName = "@npc_spawner_n:imperial_pilot",
socialGroup = "imperial",
faction = "imperial",
level = 20,
chanceHit = 0.33,
damageMin = 190,
damageMax = 200,
baseXp = 1803,
baseHAM = 5000,
baseHAMmax = 6100,
armor = 0,
resists = {0,0,0,0,0,0,0,0,-1},
meatType = "",
meatAmou... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/corellia/afarathu_hellion.lua | 2 | 2120 | afarathu_hellion = Creature:new {
objectName = "@mob/creature_names:afarathu_cult_hellion",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "afarathu",
faction = "afarathu",
level = 15,
chanceHit = 0.31,
damageMin = 160,
damageMax = 170,
baseXp = 960,
baseHAM = 2400,
baseHAMmax = 3000,
armor = 0,
resists ... | agpl-3.0 |
ShadowNinja/areas | hud.lua | 1 | 2410 | -- This is inspired by the landrush mod by Bremaweb
local S = minetest.get_translator("areas")
areas.hud = {}
areas.hud.refresh = 0
minetest.register_globalstep(function(dtime)
areas.hud.refresh = areas.hud.refresh + dtime
if areas.hud.refresh > areas.config["tick"] then
areas.hud.refresh = 0
else
return
end
... | lgpl-2.1 |
mohammad8/mohammad | plugins/Welcome.lua | 114 | 3529 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
LeMagnesium/minetest-minetestforfun-server | mods/homedecor_modpack/computer/init.lua | 11 | 3077 | computer = {}
screwdriver = screwdriver or {}
computer.register = function (name, def)
local nodename = name
if (name:sub(1, 1) == ":") then name = name:sub(2) end
local modname, basename = name:match("^([^:]+):(.*)")
local TEXPFX = modname.."_"..basename.."_"
local ONSTATE = modname..":"..basename
local OFFSTAT... | unlicense |
p0pr0ck5/lua-resty-waf | t/translation/16_figure_phase.lua | 1 | 1378 | describe("figure_phase", function()
local lib = require "resty.waf.translate"
local f = lib.figure_phase
for i = 1, #lib.phase_lookup do
local p = lib.phase_lookup[i]
it("translates a phase determined from phase key " .. p, function()
assert.is.same(f({{phase = i}}), lib.phase_lookup[i])
end)
it("tra... | gpl-3.0 |
Alireza5928/abedzadeh | TeleDiamond/libs/dateparser.lua | 114 | 6213 | local difftime, time, date = os.difftime, os.time, os.date
local format = string.format
local tremove, tinsert = table.remove, table.insert
local pcall, pairs, ipairs, tostring, tonumber, type, setmetatable = pcall, pairs, ipairs, tostring, tonumber, type, setmetatable
local dateparser={}
--we shall use the host OS's... | agpl-3.0 |
StephenZhuang/qdkpv2 | QDKP_V2/QDKP_V2/Code/Lib/LibBabble-Class-3.0.lua | 1 | 6409 | --[[
Name: LibBabble-Class-3.0
Revision: $Rev: 50 $
Author(s): ckknight (ckknight@gmail.com)
Website: http://ckknight.wowinterface.com/
Description: A library to provide localizations for classes.
Dependencies: None
License: MIT
]]
local MAJOR_VERSION = "LibBabble-Class-3.0"
local MINOR_VERSION = 90000 + t... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/dungeon/death_watch_bunker/death_watch_black_sun_assassin.lua | 2 | 1070 | death_watch_black_sun_assassin = Creature:new {
objectName = "@mob/creature_names:mand_bunker_blksun_assassin",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "death_watch",
faction = "",
level = 107,
chanceHit = 1.75,
damageMin = 670,
damageMax = 1050,
baseXp = 10081,
baseHAM = 40000,
baseHAMmax = 40000,
... | agpl-3.0 |
MonkeyZZZZ/platform_external_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 |
TheLazar42/Reign-of-Darkness | builtin/serialize.lua | 1 | 7890 | -- Minetest: builtin/serialize.lua
-- https://github.com/fab13n/metalua/blob/no-dll/src/lib/serialize.lua
-- Copyright (c) 2006-2997 Fabien Fleutot <metalua@gmail.com>
-- License: MIT
--------------------------------------------------------------------------------
-- Serialize an object into a source code string. This... | lgpl-2.1 |
garoose/eecs494.p2 | dev/premake/premake/tests/testfx.lua | 54 | 5768 | --
-- tests/testfx.lua
-- Automated test framework for Premake.
-- Copyright (c) 2008-2009 Jason Perkins and the Premake project
--
--
-- Define a namespace for the testing functions
--
test = { }
--
-- Assertion functions
--
function test.string_contains(buffer, expected)
if not string.find(buffer,expected) t... | mit |
DBarney/luvit | main.lua | 1 | 3853 | --[[
Copyright 2014 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 |
griegler/octnet | th/oc/OctreeModule.lua | 1 | 2188 | -- 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
-- notice, this list of ... | bsd-3-clause |
tst2005/lua-luassert | spec/formatters_spec.lua | 1 | 3861 | local assert
local function returnnils()
-- force the return of nils in an argument array
local a,b
return a, b, "this is not nil"
end
describe("Test Formatters", function()
setup(function()
-- must reload luassert with _TEST defined to test private elements
for k,v in pairs(package.loaded) do
... | mit |
javachengwc/skynet | lualib/http/httpd.lua | 101 | 3708 | local internal = require "http.internal"
local table = table
local string = string
local type = type
local httpd = {}
local http_status_msg = {
[100] = "Continue",
[101] = "Switching Protocols",
[200] = "OK",
[201] = "Created",
[202] = "Accepted",
[203] = "Non-Authoritative Information",
[204] = "No Content",... | mit |
hfjgjfg/sx | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
ClearTables/ClearTables | test-barrier.lua | 2 | 1333 | --[[
This file is part of ClearTables
@author Paul Norman <penorman@mac.com>
@copyright 2016 Paul Norman, MIT license
]]--
require "barrier"
print("barrier.lua tests")
print("TESTING: accept_barrier_line")
assert(not accept_barrier_line({}), "test failed: untagged")
assert(not accept_barrier_line({foo="bar"}), "test... | mit |
bingo235/skynet | lualib/redis.lua | 8 | 6174 | local skynet = require "skynet"
local socket = require "socket"
local socketchannel = require "socketchannel"
local table = table
local string = string
local assert = assert
local redis = {}
local command = {}
local meta = {
__index = command,
-- DO NOT close channel in __gc
}
---------- redis response
local redcm... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/faction/rebel/rebel_brigadier_general.lua | 2 | 1867 | rebel_brigadier_general = Creature:new {
objectName = "@mob/creature_names:rebel_brigadier_general",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "rebel",
faction = "rebel",
level = 25,
chanceHit = 0.36,
damageMin = 240,
damageMax = 250,
baseXp = 2637,
baseHAM = 7200,
baseHAMmax = 8800,
armor = 0,
resi... | agpl-3.0 |
kingluo/luajit.io | lib/ljio/http/constants.lua | 2 | 1575 | -- Copyright (C) Jinhua Luo
local ffi = require("ffi")
local status_tbl = {
[200] = "HTTP/1.1 200 OK\r\n";
[302] = "HTTP/1.1 302 Found\r\n";
[304] = "HTTP/1.1 304 Not Modified\r\n";
[400] = "HTTP/1.1 400 Bad Request\r\n";
[403] = "HTTP/1.1 403 Forbidden\r\n";
[404] = "HTTP/1.1 404 Not Found\r\... | bsd-2-clause |
kidaa/Algorithm-Implementations | Negamax/Lua/Yonaba/negamax_test.lua | 26 | 1129 | -- Tests for alpha_beta_pruning.lua
local negamax = require 'negamax'
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 |
excessive/obtuse-tanuki | libs/winapi/shellapi.lua | 2 | 7447 |
--proc/shellapi: shell API.
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.winuser'
require'winapi.winnt'
shell32 = ffi.load'Shell32'
--file info ------------------------------------------------------------------
ffi.cdef[[
typedef struct _SHFILEINFOW {
HICON hIcon;
int... | mit |
StephenZhuang/qdkpv2 | QDKP_V2/QDKP2_Config/ConfigTree/Announce.lua | 1 | 1192 |
local L=QDKP2_Config.Localize
QDKP2_Config.Tree.args.Announce={
type = 'group',
args={
AN_AnAwards={
type = 'toggle',
order = 20,
},
AN_AnIM={
type = 'toggle',
order = 30,
},
AN_AnPlChange={
type = 'toggle',
order = 40,
},
AN_AnNegative={
type = 'toggle',
or... | gpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/yavin4_stranded_imperial_base_imperial_medium_theater.lua | 3 | 1393 | yavin4_stranded_imperial_base_imperial_medium_theater = Lair:new {
mobiles = {{"stranded_imperial_officer",1},{"stranded_imperial_soldier",1},{"stranded_imperial_pilot",1}},
spawnLimit = 12,
buildingsVeryEasy = {"object/building/poi/yavin4_imperial_patrol_camp_large1.iff","object/building/poi/yavin4_imperial_patrol_... | agpl-3.0 |
TheLazar42/Reign-of-Darkness | games/Reign of Darkness/mods/mines/init.lua | 1 | 6576 | local MINE_DEEP_MIN = tonumber(minetest.setting_get("mines_deep_min"))
local MINE_DEEP_MAX = tonumber(minetest.setting_get("mines_deep_max"))
local MINE_FACTOR = tonumber(minetest.setting_get("mines_spawnfactor"))
if not MINE_DEEP_MIN then
MINE_DEEP_MIN = -64
end
if not MINE_DEEP_MAX then
MINE_DEEP_MAX... | lgpl-2.1 |
ld-test/busted | busted/languages/nl.lua | 15 | 1285 | local s = require('say')
s:set_namespace('nl')
-- 'Pending: test.lua @ 12 \n description
s:set('output.pending', 'Hangend')
s:set('output.failure', 'Mislukt')
s:set('output.success', 'Succes')
s:set('output.pending_plural', 'hangenden')
s:set('output.failure_plural', 'mislukkingen')
s:set('output.success_plural', 's... | mit |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/lair/npc_theater/naboo_plasma_thief_camp_neutral_large_theater.lua | 3 | 1195 | naboo_plasma_thief_camp_neutral_large_theater = Lair:new {
mobiles = {{"plasma_thief",2},{"plasma_thief_leader",1},{"plasma_bandit",2}},
spawnLimit = 15,
buildingsVeryEasy = {"object/building/poi/naboo_borvos_large1.iff","object/building/poi/naboo_borvos_large2.iff","object/building/poi/naboo_borvos_large3.iff"},
b... | agpl-3.0 |
bingo235/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 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/endor/vicious_donkuwah_battlelord.lua | 2 | 1114 | vicious_donkuwah_battlelord = Creature:new {
objectName = "@mob/creature_names:vicious_donkuwah_battlelord",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "donkuwah_tribe",
faction = "donkuwah_tribe",
level = 51,
chanceHit = 0.51,
damageMin = 425,
damageMax = 560,
baseXp = 5007,
baseHAM = 10000,
baseHAMma... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/loot/items/wearables/ithorian/ith_shirt_s07.lua | 4 | 1276 | ith_shirt_s07 = {
-- Ithorian Striped Shirt
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/ithorian/ith_shirt_s07.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_co... | agpl-3.0 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/commands/polearmArea2.lua | 2 | 2783 | --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 |
AndKe/ardupilot | libraries/AP_Scripting/examples/logging.lua | 14 | 2082 | -- example of logging to a file on the SD card and to data flash
local file_name = "AHRS_DATA.csv"
local file
-- index for the data and table
local roll = 1
local pitch = 2
local yaw = 3
local interesting_data = {}
local function write_to_file()
if not file then
error("Could not open file")
end
-- write d... | gpl-3.0 |
TheLazar42/Reign-of-Darkness | games/Reign of Darkness/mods/default/functions.lua | 2 | 10162 | -- mods/default/functions.lua
--
-- Sounds
--
function default.node_sound_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="", gain=1.0}
table.dug = table.dug or
{name="default_dug_node", gain=0.25}
table.place = table.place or
{name="default_place_node_hard", gain=1.0}
retur... | lgpl-2.1 |
Chilastra-Reborn/Chilastra-source-code | bin/scripts/mobile/endor/donkuwah_chieftain.lua | 2 | 1042 | donkuwah_chieftain = Creature:new {
objectName = "@mob/creature_names:donkuwah_chieftan",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "donkuwah_tribe",
faction = "donkuwah_tribe",
level = 58,
chanceHit = 0.57,
damageMin = 430,
damageMax = 570,
baseXp = 5647,
baseHAM = 11000,
baseHAMmax = 14000,
armor =... | agpl-3.0 |
LomoX-Offical/nginx-openresty-windows | src/luajit-root/luajit/share/luajit-2.1.0-beta/jit/p.lua | 65 | 9092 | ----------------------------------------------------------------------------
-- LuaJIT profiler.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-- This modul... | bsd-2-clause |
ozhanf/ozhan | plugins/search_youtube.lua | 674 | 1270 | do
local google_config = load_from_file('data/google.lua')
local function httpsRequest(url)
print(url)
local res,code = https.request(url)
if code ~= 200 then return nil end
return json:decode(res)
end
local function searchYoutubeVideos(text)
local url = 'https://www.googleapis.com/youtube/v3/search?'
u... | gpl-2.0 |
LeMagnesium/minetest-minetestforfun-server | mods/mobs/lavaslimes.lua | 7 | 5215 |
-- Lava Slimes by TomasJLuis & TenPlus1
-- sounds
local lava_sounds = {
damage = "mobs_slimes_damage",
death = "mobs_slimes_death",
jump = "mobs_slimes_jump",
attack = "mobs_slimes_attack",
}
-- lava slime textures
local lava_textures = {"mobs_lava_slime_sides.png", "mobs_lava_slime_sides.png", "mobs_lava_slime_... | unlicense |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.