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
microcai/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
jsfdez/premake-core
tests/actions/vstudio/vc200x/test_compiler_block.lua
9
13247
-- -- tests/actions/vstudio/vc200x/test_compiler_block.lua -- Validate generation the VCCLCompiler element in Visual Studio 200x C/C++ projects. -- Copyright (c) 2011-2013 Jason Perkins and the Premake project -- local suite = test.declare("vs200x_compiler_block") local vc200x = premake.vstudio.vc200x --...
bsd-3-clause
ArchiveTeam/adrive-grab
urlcode.lua
58
3476
---------------------------------------------------------------------------- -- Utility functions for encoding/decoding of URLs. -- -- @release $Id: urlcode.lua,v 1.10 2008/01/21 16:11:32 carregal Exp $ ---------------------------------------------------------------------------- local ipairs, next, pairs, tonumber, ty...
unlicense
Cloudef/darkstar
scripts/zones/Metalworks/npcs/Naji.lua
5
4810
----------------------------------- -- Area: Metalworks -- NPC: Naji -- Involved in Quests: The doorman (finish), Riding on the Clouds -- Involved in Mission: Bastok 6-2 -- !pos 64 -14 -4 237 ----------------------------------- package.loaded["scripts/zones/Metalworks/TextIDs"] = nil; ---------------------------------...
gpl-3.0
herksaw/protoquest
libs/hardoncollider/init.lua
9
9043
--[[ Copyright (c) 2011 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, publish, distribu...
mit
nevercast/cuberite
MCServer/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
romonzaman/newfies-dialer
lua/libs/uuid4.lua
12
3046
--[[ The MIT License (MIT) Copyright (c) 2012 Toby Jennings 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, mer...
mpl-2.0
fiallo1313veeee/Anti_bot
plugins/dictionary.lua
9
1631
--[[ -- Translate text using Google Translate. -- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello --]] do function translate(source_lang, target_lang, text) local path = "http://translate.google.com/translate_a/single" -- URL query parameters local p...
gpl-2.0
letoram/durden
durden/uiprim/popup.lua
1
12023
-- Copyright 2019, Björn Ståhl -- License: 3-Clause BSD -- Reference: http://durden.arcan-fe.com -- Description: UI primitive for spawning a simple popup menu. -- Dependencies: assumes builtin/mouse.lua is loaded and active. -- Limitations: -- * Does not implement scrolling, assumes all entries fits inside buffer, -- ...
bsd-3-clause
tst2005googlecode/fbclient
lua/fbclient/module.lua
2
2062
--[[ Since you opened this file, you might want to know how modules work in fbclient. A typical fbclient module starts with the line: module(...,require'fbclient.module') This does two things: 1) loads this module if it's not loaded already (so the initialization code only happens once) 2) calls the value re...
mit
Cloudef/darkstar
scripts/globals/abilities/ice_shot.lua
2
3240
----------------------------------- -- Ability: Ice Shot -- Consumes a Ice Card to enhance ice-based debuffs. Deals ice-based magic damage -- Frost Effect: Enhanced DoT and AGI- ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/magic"); ...
gpl-3.0
kkrishna/gorealis
vendor/git.apache.org/thrift.git/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
Cloudef/darkstar
scripts/globals/abilities/gauge.lua
7
1345
----------------------------------- -- Ability: Gauge -- Checks to see if an enemy can be charmed. -- Obtained: Beastmaster Level 10 -- Recast Time: 0:30 -- Duration: Instant ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/msg"); -----...
gpl-3.0
Cloudef/darkstar
scripts/zones/Xarcabard/npcs/qm4.lua
5
1138
----------------------------------- -- Area: Xarcabard -- NPC: qm4 (???) -- Involved in Quests: Atop the Highest Mountains (for Boreal Hound) -- !pos -21 -25 -490 112 ----------------------------------- package.loaded["scripts/zones/Xarcabard/TextIDs"] = nil; ----------------------------------- require("scripts/zones/...
gpl-3.0
bendeutsch/minetest-sunburn
persistent_player_attributes.lua
1
2936
--[[ Persistent player attributes ]] -- change this to inject into other module local M = sunburn M.persistent_player_attributes = {} local PPA = M.persistent_player_attributes --[[ Helper functions that take care of the conversions *and* the clamping for us ]] local function _count_for_val(value, def) local ...
lgpl-2.1
Cloudef/darkstar
scripts/zones/Northern_San_dOria/npcs/Danngogg.lua
5
1120
----------------------------------- -- Area: Northern San d'Oria -- NPC: Danngogg -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Northern_San_dOria/TextIDs"); require("scripts/globals/...
gpl-3.0
Cloudef/darkstar
scripts/zones/Cape_Teriggan/TextIDs.lua
5
1625
-- Variable TextID Description text -- General Texts ITEM_CANNOT_BE_OBTAINED = 6380; -- You cannot obtain the item <item> come back again after sorting your inventory. FULL_INVENTORY_AFTER_TRADE = 6384; -- You cannot obtain the #. Try trading again after sorting your inventory. ITEM_OBTAINED = 638...
gpl-3.0
pablojorge/brainfuck
lua/brainfuck.lua
1
1422
#!/usr/bin/env lua -- Copyright (c) 2016 Francois Perrad local f = arg[1] and assert(io.open(arg[1], 'r')) or io.stdin local src = string.gsub(f:read'*a', '[^><+%-%.,%[%]]', '') local len = string.len(src) f:close() io.stdout:setvbuf'no' local stack = {} local jump = {} local code = {} for pc = 1, len do local o...
mit
Cloudef/darkstar
scripts/zones/Dragons_Aery/mobs/Nidhogg.lua
4
1926
----------------------------------- -- Area: Dragons Aery -- HNM: Nidhogg ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/titles"); require("scripts/globals/status"); ----------------------------------- function onMobInitialize(mob) end; function onMobSpawn(mob) ...
gpl-3.0
rohlem/lua_mods
lpp.lua
1
24445
--EXTENSION replace level long strings in 5.0 (disallowing long strings in layer-2 code, because layer-1 is inescapable) --EXTENSION numeric literal syntax --note: This file is loaded in two "stages", first as plain Lua 5.1-5.3 and then parsed by itself. That's why it might look a bit odd in places. --"imports" [[ ...
unlicense
Cloudef/darkstar
scripts/globals/items/bowl_of_yayla_corbasi.lua
2
1229
----------------------------------------- -- ID: 5579 -- Item: bowl_of_yayla_corbasi -- Food Effect: 3Hrs, All Races ----------------------------------------- -- HP 20 -- Dexterity -1 -- Vitality 2 -- HP Recovered While Healing 3 -- MP Recovered While Healing 1 ----------------------------------------- require("scripts...
gpl-3.0
mehrpouya81/iranspammer
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
jewmin/astd
com.lover.astd.game.ui/lua/module/equip.lua
1
5166
-- ×°±¸Ä£¿é equip = {} equip.null = 1 equip.error = 10 equip.finish = 2 equip.success = 0 equip.getUpgradeInfo = function() local url = "/root/equip!getUpgradeInfo.action" local result = ProtocolMgr():getXml(url, "×°±¸-ÐÅÏ¢") if not result then return equip.null end if not result.CmdSucceed then return equip.err...
mit
Cloudef/darkstar
scripts/zones/Garlaige_Citadel/npcs/qm18.lua
5
1809
----------------------------------- -- Area: Garlaige Citadel -- NPC: qm18 (??? - Bomb Coal Fragments) -- Involved in Quest: In Defiant Challenge -- !pos -13.425,-1.176,191.669 200 ----------------------------------- package.loaded["scripts/zones/Garlaige_Citadel/TextIDs"] = nil; ----------------------------------- re...
gpl-3.0
fgprodigal/RayUI
Interface/AddOns/RayUI/libs/cargBags/mixins-add/itemkeys/basic.lua
2
1704
--[[ LICENSE cargBags: An inventory framework addon for World of Warcraft Copyright (C) 2010 Constantin "Cargor" Schomburg <xconstruct@gmail.com> cargBags 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; ei...
mit
MinetestForFun/server-minetestforfun
mods/framedglass/init.lua
10
4388
-- Minetest 0.4.7 mod: framedglass minetest.register_craft({ output = 'framedglass:wooden_framed_glass 4', recipe = { {'default:glass', 'default:glass', 'default:stick'}, {'default:glass', 'default:glass', 'default:stick'}, {'default:stick', 'default:stick', ''}, } }) minetest.register_craft({ output = 'fra...
unlicense
Cloudef/darkstar
scripts/zones/Fort_Karugo-Narugo_[S]/npcs/Indescript_Markings.lua
2
1951
---------------------------------- -- Area: Fort Karugo Narugo [S] -- NPC: Indescript Markings -- Type: Quest -- @zone 96 -- !pos -63 -75 4 ----------------------------------- package.loaded["scripts/zones/Fort_Karugo-Narugo_[S]/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Fort_Karugo-N...
gpl-3.0
Cloudef/darkstar
scripts/zones/Kazham/npcs/Rauteinot.lua
5
2783
----------------------------------- -- Area: Kazham -- NPC: Rauteinot -- Starts and Finishes Quest: Missionary Man -- @zone 250 -- !pos -42 -10 -89 ----------------------------------- package.loaded["scripts/zones/Kazham/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require(...
gpl-3.0
tst2005googlecode/fbclient
lua/fbclient/decimal_ldecnumber.lua
2
2119
--[=[ ldecnumber binding for decnumber decimal number support df(lo,hi,scale) -> d; to be used with getdecimal() sdf(d,scale) -> lo,hi; to be used with setdecimal() decnumber_meta -> ldecNumber.number_metatable isdecnumber(x) -> true|false; the decnumber library should provide this but since it doesn't... xsql...
mit
MinetestForFun/server-minetestforfun
mods/colormachine/init.lua
8
95030
--[[ color chooser for unifieddyes Copyright (C) 2013 Sokomine 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...
unlicense
jdsfhsdbf65/test
plugins/anti_spam.lua
191
5291
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id == our_id then return msg end -- Save...
agpl-3.0
tst2005googlecode/fbclient
lua/fbclient/sql_formatting.lua
2
4751
module(...,require 'fbclient.module') local sql = require 'fbclient.sql' --[==[ --source: LangRef.pdf CREATE TABLE table [EXTERNAL [FILE] ’filespec’] (<col_def> [, <col_def> | <tconstraint> …]); <col_def> = col {<datatype> | COMPUTED [BY] (<expr>) | domain} [DEFAULT {literal | NULL | USER}] [NOT NULL] [<col_cons...
mit
Cloudef/darkstar
scripts/zones/Inner_Horutoto_Ruins/npcs/_5c5.lua
5
1688
----------------------------------- -- Area: Inner Horutoto Ruins -- NPC: Gate: Magical Gizmo -- Involved In Mission: The Horutoto Ruins Experiment -- !pos 419 0 -27 192 ----------------------------------- package.loaded["scripts/zones/Inner_Horutoto_Ruins/TextIDs"] = nil; ----------------------------------- require(...
gpl-3.0
Cloudef/darkstar
scripts/zones/Port_San_dOria/npcs/Coullave.lua
5
1658
----------------------------------- -- Area: Port San d'Oria -- NPC: Coullave -- Standard Merchant NPC ----------------------------------- package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Port_San_dOria/TextIDs"); require("scripts/globals/quests")...
gpl-3.0
fgprodigal/RayUI
Interface/AddOns/RayUI/libs/oUF/elements/phaseindicator.lua
3
2272
--[[ # Element: Phasing Indicator Toggles the visibility of an indicator based on the unit's phasing relative to the player. ## Widget PhaseIndicator - Any UI widget. ## Notes A default texture will be applied if the widget is a Texture and doesn't have a texture or a color set. ## Examples -- Position and s...
mit
Warboss-rus/wargameengine
WargameEngine/WargameEngine/WargameEngine/Killteam/Chaos.lua
1
2527
races["Chaos"] = { racename = "Chaos", units = { ["Chaos Marine"] = { SupportedWeapons = { "Bolter", "Melta gun", "Heavy Bolter" }, Cost = 15, RangedWeapon = "Bolter", MeleeWeapon = "Knife", Model = "CSM.wbm", WS = 4, BS = 4, T = 4, Attacks = 1, Sv = 3, ...
gpl-3.0
KarlKode/dotfiles
hammerspoon/hammerspoon.symlink/yabai_old.lua
1
1230
local socket = require("hs.socket") local module = {} module.sockFile = string.format("/tmp/yabai_%s.socket", os.getenv("USER")) module.sockTimeout = 5 module.send = function(fn, ...) assert( type(fn) == "function" or (getmetatable(fn) or {}).__call, "callback must be a function or object with...
mit
coderstudy/luarocks
src/luarocks/path_cmd.lua
18
2345
--- @module luarocks.path_cmd -- Driver for the `luarocks path` command. local path_cmd = {} local util = require("luarocks.util") local deps = require("luarocks.deps") local cfg = require("luarocks.cfg") path_cmd.help_summary = "Return the currently configured package path." path_cmd.help_arguments = "" path_cmd.he...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/DrawNode.lua
2
8444
-------------------------------- -- @module DrawNode -- @extend Node -- @parent_module cc -------------------------------- -- Draw an line from origin to destination with color. <br> -- param origin The line origin.<br> -- param destination The line destination.<br> -- param color The line color.<br> -- js NA -- @fu...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua
2
6239
-------------------------------- -- @module ProgressTimer -- @extend Node -- @parent_module cc -------------------------------- -- Initializes a progress timer with the sprite as the shape the timer goes through -- @function [parent=#ProgressTimer] initWithSprite -- @param self -- @param #cc.Sprite sp -- @return b...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionEnum.lua
62
1410
if nil == cc.Control then return end _G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS _G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS _G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE _G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN _G.CC...
mit
ScegfOd/wesnoth
data/ai/micro_ais/micro_ai_self_data.lua
7
3920
-- This set of functions provides a consistent way of storing Micro AI variables -- in the AI's persistent data variable. These need to be stored inside -- a [micro_ai] tag, so that they are bundled together for a given Micro AI -- together with an ai_id= key. Their existence can then be checked when setting -- up anot...
gpl-2.0
ignacio/luarocks
src/luarocks/install.lua
15
8077
--- Module implementing the LuaRocks "install" command. -- Installs binary rocks. --module("luarocks.install", package.seeall) local install = {} package.loaded["luarocks.install"] = install local path = require("luarocks.path") local repos = require("luarocks.repos") local fetch = require("luarocks.fetch") local util...
mit
alexschrod/freedink-lua
lua-scripts/s1-mh-f.lua
1
2522
function talk() if global.wizard_see > 3 then return end player:freeze() local cs = cutscene.create_cutscene(200) local function whoosh(x, y) local mcrap = dink.create_sprite(x, y, brain.KILL_SEQ_DONE, 167, 1) mcrap.seq = 167 dink.playsound(24, 22052, 0, nil, false) end cs:add_command("...
gpl-3.0
deplinenoise/tundra
scripts/tundra/syntax/dotnet.lua
28
3090
module(..., package.seeall) local util = require "tundra.util" local nodegen = require "tundra.nodegen" local depgraph = require "tundra.depgraph" local _csbase_mt = nodegen.create_eval_subclass { DeclToEnvMappings = { References = "CSLIBS", RefPaths = "CSLIBPATH", }, } local _csexe_mt = nodegen.cre...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/ParticleSystem3D.lua
6
5418
-------------------------------- -- @module ParticleSystem3D -- @extend Node,BlendProtocol -- @parent_module cc -------------------------------- -- remove affector by index -- @function [parent=#ParticleSystem3D] removeAffector -- @param self -- @param #int index -- @return ParticleSystem3D#ParticleSystem3D self (re...
mit
ld-test/hotswap-lfs
src/hotswap/ev.lua
11
1130
local posix = require "posix" local ev = require "ev" local xxhash = require "xxhash" local Hotswap = getmetatable (require "hotswap") local Ev = {} function Ev.new (t) return Hotswap.new { new = Ev.new, observe = Ev.observe, loop = t and t.loop or ev.Loop.default, observed = {...
mit
Starfox64/FoxedBot
addons/foxedbot/lua/foxedbot/sv_callbacks.lua
1
5325
--[[ The OnChat callback is called whenever a message should be printed in chat. ]]-- FoxedBot.addCallback("OnChat", function( data ) net.Start("FoxedBot_Chat") net.WriteTable(data) net.Send(player.GetAll()) end) --[[ The OnAnnounce callback is called whenever an announcement should be printed on screen. ]]-- Fox...
gpl-2.0
joshua-meng/Util
luaexeclib/modulization.lua
1
5396
local string_split_ = function (input, delimiter) input = tostring(input) delimiter = tostring(delimiter) if (delimiter=='') then return false end local pos,arr = 0, {} -- for each divider found for st,sp in function() return string.find(input, delimiter, pos, true) end do table.insert(a...
gpl-2.0
TheJosh/chaotic-rage
data/cr/gametypes/zombies.lua
1
4693
---- ---- Lua script for the gametype "Zombies". ---- num_zombies = 0; num_zombie_players = 0; num_wanted = 0; num_dead = 0; num_lives = 3; spawn_cluster_num = 3; spawn_cluster_gap = 3000; round = 0; round_max = 0; score_table = 0; score_labels = {}; rain_rate = 1000; player_zombies = {}; do_score = function() sco...
gpl-2.0
joeyhng/nn
FlattenTable.lua
21
3205
local FlattenTable, parent = torch.class('nn.FlattenTable', 'nn.Module') function FlattenTable:__init() parent.__init(self) self.output = {} self.input_map = {} self.gradInput = {} end -- Recursive function to flatten a table (output is a table) local function flatten(output, input) local input_map -- has...
bsd-3-clause
alexschrod/freedink-lua
share/freedink/init.lua
1
29030
-- init.lua -- -- Loaded by the C function dinklua_initialize(). Expected to contain the -- tables "script" and "routine", and the functions "resume_script", -- "run_script", "proc_exists" and "load_script". For more details on their use -- and expected functionality and parameters, see the file "dinklua.c". -- -- Be c...
gpl-3.0
hongling0/skynet
lualib/skynet/sharemap.lua
30
1503
local stm = require "skynet.stm" local sprotoloader = require "sprotoloader" local sproto = require "sproto" local setmetatable = setmetatable local sharemap = {} function sharemap.register(protofile) -- use global slot 0 for type define sprotoloader.register(protofile, 0) end local sprotoobj local function loadsp...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua
18
3150
-------------------------------- -- @module AnimationCache -- @extend Ref -- @parent_module cc -------------------------------- -- Returns a Animation that was previously added.<br> -- If the name is not found it will return nil.<br> -- You should retain the returned copy if you are going to use it.<br> -- return A ...
mit
lukasc-ch/nn
FlattenTable.lua
24
3131
local FlattenTable, parent = torch.class('nn.FlattenTable', 'nn.Module') function FlattenTable:__init() parent.__init(self) self.output = {} self.input_map = {} self.gradInput = {} end -- Recursive function to flatten a table (output is a table) local function flatten(output, input) local input_map -- has...
bsd-3-clause
CaptainCN/QCEditor
cocos2d/external/lua/luasocket/script/socket/tp.lua
31
3627
----------------------------------------------------------------------------- -- Unified SMTP/FTP subsystem -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare...
mit
Dens0n/rmg_torch
train.lua
1
8108
require 'midiparse' require 'validate' require 'lfs' require 'rnn' require 'optim' require 'xlua' json = require 'json' cmd = torch.CmdLine() cmd:option('-d', 'slowtest', 'Dataset directory') cmd:option('-vd', '', 'Validation data directory') cmd:option('-datasize', 0, 'Size of dataset (for benchmarking)') cmd:option(...
gpl-3.0
eyalsk-wowaddons/AwesomeTweaks
libs/Libra/Utils.lua
1
1324
local Libra = LibStub("Libra") local Type, Version = "Utils", 2 if Libra:GetModuleVersion(Type) >= Version then return end Libra.modules[Type] = Libra.modules[Type] or {} local object = Libra.modules[Type] object.api = object.api or {} object.frame = object.frame or CreateFrame("Frame") object.connectedRealms = objec...
mit
EvilHero90/otclient
data/locales/de.lua
4
16751
locale = { name = "de", charset = "cp1252", languageName = "Deutsch", translation = { ["1a) Offensive Name"] = false, ["1b) Invalid Name Format"] = false, ["1c) Unsuitable Name"] = false, ["1d) Name Inciting Rule Violation"] = false, ["2a) Offensive Statement"] = false, ["2b) Spamming"...
mit
Ardy123/xsd-tools
src/TemplateEngine/stringbuffer.lua
3
1768
--[[ Copyright: (c)2012 Ardavon Falls This file is part of xsd-tools. xsd-tools 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....
gpl-3.0
maikerumine/nuclear_holocaust
mods/mobs_fallout/config.lua
2
2500
--mobs_fallout v0.0.1 --maikerumine --made for Extreme Survival game --dofile(minetest.get_modpath("mobs_fallout").."/api.lua") --CODING NOTES --REF CODE FROM PMOBS by CProgrammerRU --https://github.com/CProgrammerRU/progress --[[ -- right clicking with cooked meat will give npc more health on_rightclick = functio...
lgpl-2.1
alpha-team/smart_gourd_final
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
abbasgh12345/extremenew0
plugins/filterorg.lua
32
4280
do TMP = {} function First( msg ) local Xdata = load_data(_config.moderation.data); if ( not Xdata[tostring(msg.to.id)]["settings"]["Blocked_Words"] ) then Xdata[tostring(msg.to.id)]["settings"]["Blocked_Words"] = TMP save_data(_config.moderation.data, Xdata); print("i couldn't find the table so i cre...
gpl-2.0
breakds/torch7
Tester.lua
8
7315
local Tester = torch.class('torch.Tester') function Tester:__init() self.errors = {} self.tests = {} self.testnames = {} self.curtestname = '' end function Tester:assert_sub (condition, message) self.countasserts = self.countasserts + 1 if not condition then local ss = debug.traceback('tester...
bsd-3-clause
EXILEDNONAME/SERVER
lua/antihack/starcraft.lua
7
2206
--[[ Simple Anti MapHack for Starcraft: BroodWar 1.16.1 Copyright (C) 2014 HarpyWar (harpywar@gmail.com) This file is a part of the PvPGN Project http://pvpgn.pro Licensed under the same terms as Lua itself. ]]-- -- just unique request id for maphack ah_mh_request_id = 99 -- map visible offset ah_mh_offset =...
gpl-2.0
xXX-mRx-XXx/xxXxx
plugins/ar-en-zhrafa_arab.lua
2
29539
local function run(msg, matches) if #matches < 2 then return "اكتب الامر /زخرف ثم ضع فاصلة واكتب الجملة وستظهر لك نتائج الزخرفةی وارد کنید" end if string.len(matches[2]) > 20 then return "متاح لك 20 حرف انكليزي فقط لايمكنك وضع حروف اكثر ❤️😐 @"..msg.from.username end local font_base =...
gpl-2.0
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/script/framework/device.lua
5
3851
--[[ Copyright (c) 2014-2017 Chukong Technologies Inc. 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, pu...
mit
lukasc-ch/nn
HingeEmbeddingCriterion.lua
50
1290
local HingeEmbeddingCriterion, parent = torch.class('nn.HingeEmbeddingCriterion', 'nn.Criterion') function HingeEmbeddingCriterion:__init(margin) parent.__init(self) self.margin = margin or 1 self.sizeAverage = true end function HingeEmbeddingCriterion:updateOutput(input,y) self.buffer = self.buffer or ...
bsd-3-clause
FreeBlues/neko8
libs/moonscript/spec/outputs/lists.lua
2
3968
local hi do local _accum_0 = { } local _len_0 = 1 for _, x in ipairs({ 1, 2, 3, 4 }) do _accum_0[_len_0] = x * 2 _len_0 = _len_0 + 1 end hi = _accum_0 end local items = { 1, 2, 3, 4, 5, 6 } for z in ipairs(items) do if z > 4 then local _ = z end end local rad do ...
mit
sfriesel/libdessert
dissectors/dessert.lua
2
7761
-- ---------------------------------------------------------------------------- -- Copyright 2009, David Gutzmann, Freie Universitaet Berlin (FUB). -- Copyright 2010, Bastian Blywis, Freie Universitaet Berlin (FUB). -- All rights reserved. --These sources were originally developed by David Gutzmann, --rewritten and ex...
gpl-3.0
eyalsk-wowaddons/AwesomeTweaks
libs/Libra/Slider.lua
1
1718
local Libra = LibStub("Libra") local Type, Version = "Slider", 2 if Libra:GetModuleVersion(Type) >= Version then return end local backdrop = { bgFile = [[Interface\Buttons\UI-SliderBar-Background]], edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8, insets = {left = 3, right = 3, top = 6, bottom =...
mit
eku/nodemcu-firmware
lua_modules/email/imap.lua
7
6297
--- -- Working Example: https://www.youtube.com/watch?v=PDxTR_KJLhc -- IMPORTANT: run node.compile("imap.lua") after uploading this script -- to create a compiled module. Then run file.remove("imap.lua") -- @name imap -- @description An IMAP 4rev1 module that can be used to read email. -- Tested on NodeMCU 0.9.5 build ...
mit
joeyhng/nn
Bottle.lua
6
2537
local Bottle, parent = torch.class("nn.Bottle", "nn.Container") local unpack = unpack or table.unpack function Bottle:__init(module, nInputDim, nOutputDim) parent.__init(self) self.nInputDim = nInputDim or 2 self.nOutputDim = nOutputDim or self.nInputDim self.dimDelta = self.nInputDim - self.nOutputDim ...
bsd-3-clause
asamy45/forgottenmapeditor
modules/corelib/ui/uispinbox.lua
1
3539
-- @docclass UISpinBox = extends(UITextEdit) function UISpinBox.create() local spinbox = UISpinBox.internalCreate() spinbox:setFocusable(false) spinbox:setValidCharacters('0123456789') spinbox.displayButtons = true spinbox.minimum = 0 spinbox.maximum = 0 spinbox.value = 0 spinbox.step = 1 spinbox.fir...
mit
qj739/BadRotations
System/engines/ArtifactTable.lua
6
3716
local name, addon = ... local LAD = LibStub("LibArtifactData-1.0") br.artifact = {} function updateArtifact() local artifactId = select(1,C_ArtifactUI.GetEquippedArtifactInfo()) local _, data = LAD:GetArtifactInfo(artifactId) if br.artifact == nil then br.artifact = {} end br.artifact.id = artifactId ...
gpl-3.0
Rydra/OpenRA
mods/common/lua/actor.lua
1
5869
Actor = { } Actor.Create = function(name, init) if name == nil then error("No actor name specified", 2) end if init.Owner == nil then error("No actor owner specified", 2) end local td = OpenRA.New("TypeDictionary") local addToWorld = true for key, value in pairs(init) do if key == "AddToWorld" then addToWorl...
gpl-3.0
micahmumper/naev
dat/missions/sirius/heretic/heretic2.lua
9
7850
--[[misn title - the patrol]] --[[in this mission, the player will be guarding the "high command" of the nasin, the wringer/suna. house sirius is sending in recon parties. the players job is to take out any and all sirius in the system.]] include "dat/scripts/numstring.lua" lang = naev.lang() bmsg = {} --beginning...
gpl-3.0
micahmumper/naev
dat/missions/shark/sh01_corvette.lua
1
5788
--[[ This is the second mission of the Shark's teeth campaign. The player has to take part to a fake battle. Stages : 0) Way to Toaxis 1) Battle 2) Going to Darkshed --]] include "numstring.lua" lang = naev.lang() if lang == "es" then else -- default english title = {} text = {} ...
gpl-3.0
maikerumine/nuclear_holocaust
mods/roadvalleys/init.lua
2
10297
-- Parameters local DEBUG = true -- Mapgen valleys noises local np_terrain_height = { offset = -10, scale = 50, spread = {x = 1024, y = 1024, z = 1024}, seed = 5202, octaves = 6, persist = 0.4, lacunarity = 2.0, } local np_valley_depth = { offset = 5, scale = 4, spread = {x = 512, y = 512, z = 512}, seed...
lgpl-2.1
EagleTeam/EST-GP
plugins/menu.lua
1
10394
local config = require 'config' local misc = require 'utilities'.misc local roles = require 'utilities'.roles local api = require 'methods' local plugin = {} local function get_button_description(key) if key == 'Reports' then -- TRANSLATORS: these strings should be shorter than 200 characters return _("...
gpl-2.0
ahmadname12/animus1999
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-2.0
theraven262/amber
tools.lua
1
4500
-- Tools -- -- Descriptions -- tooltypes = { "Pickaxe", "Shovel", "Axe", "Sword" } amber.create_description = function(n) description = "Amber " .. tooltypes[n] return description end amber.create_ancient_description = function(n) description = "Ancient Amber " .. tooltypes[n] return description end...
lgpl-2.1
chickenkiller/mongrel2
examples/bbs/engine.lua
96
1958
local print = print local pcall = pcall local coroutine = coroutine local ui = require 'ui' local db = require 'db' module 'engine' local STATE = {} function run(conn, engine) while true do -- Get a message from the Mongrel2 server local good, request = pcall(conn.recv_json, conn) if goo...
bsd-3-clause
yraigne/domotique
PID chauffage/script_device_thermostat-salon.lua
1
1580
-- Alexandre DUBOIS - 2014 -- Ce script permet de maintenir la température de salon entre 19°C et 21°C quand l'interrupteur -- virtuel 'Thermostat salon' est activé. -------------------------------- ------ Variables à éditer ------ -------------------------------- local consigne = 20 --Température de consigne ...
gpl-3.0
z0fa/ChatNorris
libraries/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
68
2216
--[[----------------------------------------------------------------------------- Heading Widget -------------------------------------------------------------------------------]] local Type, Version = "Heading", 20 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or...
gpl-3.0
fetaera/mudlet-qt5
src/mudlet-lua/lua/geyser/GeyserColor.lua
19
6003
-------------------------------------- -- -- -- The Geyser Layout Manager by guy -- -- -- -------------------------------------- Geyser.Color = {} --- Converts color to 3 hex values as a string, no alpha, css style -- @return The color formatted as a h...
gpl-2.0
lukasc-ch/nn
MM.lua
46
2695
--[[ Module to perform matrix multiplication on two minibatch inputs, producing a minibatch. ]] local MM, parent = torch.class('nn.MM', 'nn.Module') --[[ The constructor takes two optional arguments, specifying whether or not transpose any of the input matrices before perfoming the multiplication. ]] functi...
bsd-3-clause
hongling0/skynet
test/testcrypt.lua
12
1179
local skynet = require "skynet" local crypt = require "skynet.crypt" local text = "hello world" local key = "12345678" local function desencode(key, text, padding) local c = crypt.desencode(key, text, crypt.padding[padding or "iso7816_4"]) return crypt.base64encode(c) end local function desdecode(key, text, paddin...
mit
CaptainCN/QCEditor
cocos2d/cocos/scripting/lua-bindings/auto/api/NavMeshObstacle.lua
10
2763
-------------------------------- -- @module NavMeshObstacle -- @extend Component -- @parent_module cc -------------------------------- -- -- @function [parent=#NavMeshObstacle] getSyncFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- -- -- @function [parent=#N...
mit
wsenafranca/urban
examples/UrbanSprawl_figure_05.lua
1
1509
--@example Relationship between Gini’s coefficient and income segregation indicators. import("urban") local dataFigA = {} local dataFigB = {} local ginis = {0.1, 0.2, 0.3, 0.4, 0.5} local stdIncomes = {300, 400, 500, 600, 700, 800} sessionInfo().graphics = false for meanIncome = 900, 1500, 300 do local rowFigA = {}...
gpl-3.0
joeyhng/nn
VolumetricMaxUnpooling.lua
17
1804
local VolumetricMaxUnpooling, parent = torch.class('nn.VolumetricMaxUnpooling', 'nn.Module') function VolumetricMaxUnpooling:__init(poolingModule) parent.__init(self) assert(torch.type(poolingModule)=='nn.VolumetricMaxPooling', 'Argument must be a nn.VolumetricMaxPooling module') assert(poolingModule.kT==pooling...
bsd-3-clause
coronalabs/plugins-source-openssl
Corona/luasec/main.lua
1
1944
-------------------------------------------------------------------------------- -- Sample code is MIT licensed, see http://www.coronalabs.com/links/code/license -- Copyright (C) 2013 Corona Labs Inc. All Rights Reserved. -------------------------------------------------------------------------------- -- -- To test thi...
mit
aderiabin/sdl_atf
modules/mobile_connection.lua
1
2221
local ph = require('protocol_handler/protocol_handler') local file_connection = require("file_connection") local module = { mt = { __index = {} } } function module.MobileConnection(connection) res = { } res.connection = connection setmetatable(res, module.mt) return res end function module.mt.__index:Con...
bsd-3-clause
kennyballou/blingbling
udisks_glue.lua
5
10051
--@author cedlemo local helpers = require("blingbling.helpers") local awful = require("awful") local naughty = require("naughty") local string = string local math = math local ipairs = ipairs local next = next local pairs = pairs local type = type local setmetatable = setmetatable local table = table local wibox = requ...
gpl-2.0
Whit3Tig3R/z1z1z1z1
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
siktirmirza/CroCodile
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
zactelegram12/TeleSeed
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
samael65535/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
deplinenoise/tundra
scripts/tundra/test/t_env.lua
22
2324
module(..., package.seeall) unit_test('scalar interpolation', function (t) local e = require 'tundra.environment' local e1, e2, e3 e1 = e.create(nil, { Foo="Foo", Baz="Strut" }) e2 = e1:clone({ Foo="Bar" }) e3 = e1:clone({ Baz="c++" }) t:check_equal(e1:get("Foo"), "Foo") t:check_equal(e1:get("Baz"), "S...
mit
hongling0/skynet
service/launcher.lua
9
4124
local skynet = require "skynet" local core = require "skynet.core" require "skynet.manager" -- import manager apis local string = string local services = {} local command = {} local instance = {} -- for confirm (function command.LAUNCH / command.ERROR / command.LAUNCHOK) local launch_session = {} -- for command.QUERY,...
mit