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
PowerFull10/Power_Full
plugins/ingroup.lua
371
44212
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
qq779089973/ramod
luci/applications/luci-olsr/luasrc/model/cbi/olsr/olsrdhna.lua
78
1844
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2011 Manuel Munz <freifunk at somakoma dot de> 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 h...
mit
yanarsin/cnnbot
plugins/linkpv.lua
5
31027
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
qq779089973/ramod
luci/protocols/ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
59
3379
--[[ LuCI - Lua Configuration Interface Copyright 2011-2012 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- loc...
mit
bsmr-games/lipsofsuna
data/lipsofsuna/core/dialog/triggers.lua
1
2333
--- Dialog triggers of one actor. -- -- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- @module core.dialo...
gpl-3.0
dismantl/luci-0.12
applications/luci-commands/luasrc/controller/commands.lua
76
5959
--[[ LuCI - Lua Configuration Interface Copyright 2012 Jo-Philipp Wich <jow@openwrt.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- module("...
apache-2.0
LuaDist/lrexlib-oniguruma
test/tre_sets.lua
6
15513
-- See Copyright Notice in the file LICENSE -- This file should contain only test sets that behave identically -- when being run with pcre or posix regex libraries. local luatest = require "luatest" local N = luatest.NT local L = function(s) return (string.gsub(s, ".", "%0\0")) end local function norm(a) return a==...
mit
qq779089973/ramod
luci/applications/luci-statistics/luasrc/statistics/datatree.lua
77
4394
--[[ Luci statistics - rrd data tree builder (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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/...
mit
Noltari/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
5
5801
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.netlink", package.seeall) function item() return luci.i18n.translate("Netlink") end function rrdargs( graph, plugin, plugin_instance ) -- -- t...
apache-2.0
CubeSpaceCC/RedCube-1.0
startgui.lua
1
4573
--RedCube GUI By Gonow32 and CathrodeRayTube --Clock coded by DreamWave os.loadAPI("CubeAPI") local menu = 0 local w,h = term.getSize() if term.isColor() == false then error("This GUI can not be run on monochrome computers.") end function drawTaskbar() term.setCursorPos(1,h) paintutils.drawLine(1, h, w, h, ...
mit
LaFamiglia/Illarion-Content
item/id_305_smokingoven.lua
1
1170
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
camchenry/shaderview
libs/vector.lua
20
5319
--[[ Copyright (c) 2010-2013 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
mit
agentsnazz/sb-mods
Theatre/concerteq/objects/generic/follower/Rfollower/Rfollower.lua
1
7388
function init(args) self.state = stateMachine.create({ "attackState", "scanState" }) entity.setAnimationState("movement", "idle") entity.setInteractive(false) entity.setAllOutboundNodes(false) end -------------------------------------------------------------------------------- function main(args) ...
unlicense
qq779089973/ramod
luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
78
1325
--[[ Luci configuration model for statistics - collectd interface plugin configuration (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 Lic...
mit
LaFamiglia/Illarion-Content
monster/base/spells/cone.lua
1
13642
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
chelog/brawl
addons/brawl-weapons/lua/cw/server/cw_weapondrop.lua
1
1347
CustomizableWeaponry.canDropWeapon = true -- set this to false to disable cw_dropweapon concommand CustomizableWeaponry.enableWeaponDrops = true -- set this to false to disable weapon dropping in general (no idea why you would want to do that though) function CustomizableWeaponry:dropWeapon(ply, wep, velocity, angl...
gpl-3.0
vilarion/WoWProgressLink
Widgets.lua
1
2245
local addonName, addonData = ... function addonData:addFontString(parent, x, y, font, text) local label = parent:CreateFontString(nil, "OVERLAY", font) label:SetPoint("TOPLEFT", x, y) label:SetJustifyH("LEFT") label:SetJustifyV("TOP") label:SetText(text) end local cbCounter = 0 function addonData...
agpl-3.0
LaFamiglia/Illarion-Content
alchemy/lte/id_328_immunity.lua
1
1817
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
snabbnfv-goodies/snabbswitch
lib/ljsyscall/test/linux-constants.lua
18
9330
-- test against clean set of kernel headers, standard set so cross platform. --[[ luajit test/linux-constants.lua x64 > ./obj/c.c && cc -U__i386__ -DBITS_PER_LONG=64 -I./include/linux-kernel-headers/x86_64/include -o ./obj/c ./obj/c.c && ./obj/c luajit test/linux-constants.lua x86 > ./obj/c.c && cc -D__i386__ -DBITS_P...
apache-2.0
RedSnake64/openwrt-luci-packages
applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
1
5612
-- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com> -- Licensed to the public under the Apache License 2.0. local CTRL = require "luci.controller.ddns" -- this application's controller local DISP = require "luci.dispatcher" local SYS = require "luci.sys" local DDNS = require "luci.too...
apache-2.0
luiseduardohdbackup/WarriorQuest
WarriorQuest/runtime/win32/extern.lua
48
2506
function clone(object) local lookup_table = {} local function _copy(object) if type(object) ~= "table" then return object elseif lookup_table[object] then return lookup_table[object] end local new_table = {} lookup_table[object] = new_table ...
mit
luiseduardohdbackup/WarriorQuest
WarriorQuest/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/extern.lua
48
2506
function clone(object) local lookup_table = {} local function _copy(object) if type(object) ~= "table" then return object elseif lookup_table[object] then return lookup_table[object] end local new_table = {} lookup_table[object] = new_table ...
mit
punisherbot/sh
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
Noltari/luci
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua
5
5949
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local util = require "luci.util" local ip = require "luci.ip" function write_float(self, section, value) local n = tonumber(value) if n ~= nil then return Value.write(self, section, "%.1f" % n) ...
apache-2.0
BrasileiroGamer/TrineEE_TranslationTools
translations/portuguese/lua/data/locale/gui/pt/menu/mainmenu/controlsmenupc.lua
1
5310
-- /data/locale/gui/$$/menu/mainmenu/controlsmenupc.lua menuTitle = "Controles" empty = "" waitingInput = "ESC / ?...@" loadBinds = "Carregar" saveBinds = "Salvar" deleteBinds = "Excluir" nameBinds = "Nome: " default = "Padrão" default1 = "Padrão 1" default2 = "Padrão 2" default3 = "Padrão 3" defaul...
gpl-3.0
RedSnake64/openwrt-luci-packages
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
29
2536
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.interface", package.seeall) function rrdargs( graph, plugin, plugin_instance ) -- -- traffic diagram -- local traffic = { -- draw this diag...
apache-2.0
dismantl/luci-0.12
applications/luci-openvpn/luasrc/model/cbi/openvpn.lua
65
3316
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- loc...
apache-2.0
chelog/brawl
addons/brawl-weapons/lua/weapons/khr_mp5a4/shared.lua
1
8786
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") SWEP.magType = "smgMag" if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "MP5A4" SWEP.CSMuzzleFlashes = true SWEP.SuppressedOnEquip = false SWEP.IconLetter = "w" killicon.Add( "khr_mp5a4", "icons/killicons/khr_mp5a4"...
gpl-3.0
LaFamiglia/Illarion-Content
monster/race_57_ratman/id_578_priest.lua
1
1659
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
spark0511/blueteambot
plugins/google.lua
722
1037
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
spark0511/blueteambot
plugins/plugins.lua
325
6164
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( ...
gpl-2.0
skatsuta/aerospike-training
book/answers/RecordUDF/Go/udf/aggregationByRegion.lua
16
1246
local function aggregate_stats(map,rec) -- Examine value of 'region' bin in record rec and increment respective counter in the map if rec.region == 'n' then map['n'] = map['n'] + 1 elseif rec.region == 's' then map['s'] = map['s'] + 1 elseif rec.region == 'e' then map['e'] = map['e'] + ...
mit
skatsuta/aerospike-training
book/exercise/RecordUDF/Go/udf/aggregationByRegion.lua
16
1246
local function aggregate_stats(map,rec) -- Examine value of 'region' bin in record rec and increment respective counter in the map if rec.region == 'n' then map['n'] = map['n'] + 1 elseif rec.region == 's' then map['s'] = map['s'] + 1 elseif rec.region == 'e' then map['e'] = map['e'] + ...
mit
chegenipapi/sajadchegen
plugins/btc.lua
289
1375
-- See https://bitcoinaverage.com/api local function getBTCX(amount,currency) local base_url = 'https://api.bitcoinaverage.com/ticker/global/' -- Do request on bitcoinaverage, the final / is critical! local res,code = https.request(base_url..currency.."/") if code ~= 200 then return nil end local data = j...
gpl-2.0
hnyman/luci
modules/luci-lua-runtime/luasrc/ccache.lua
3
1649
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local io = require "io" local fs = require "nixio.fs" local util = require "luci.util" local nixio = require "nixio" local debug = require "debug" local string...
apache-2.0
nsf/nextgame
scripts/ng/event.lua
1
1659
local M = {} require "ng.struct" local ffi = require "ffi" ------------------------------------------------------------------------------ -- Events ------------------------------------------------------------------------------ M.Type = {} local CTypes = {} local function RegisterEventType(enum, ctype) local next ...
mit
LaFamiglia/Illarion-Content
alchemy/lte/id_330_language.lua
1
1848
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
Noltari/luci
protocols/luci-proto-relay/luasrc/model/cbi/admin_network/proto_relay.lua
70
1945
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local ipaddr, network local forward_bcast, forward_dhcp, gateway, expiry, retry, table ipaddr = section:taboption("general", Value, "ipaddr", translate("Local IPv4 address"), t...
apache-2.0
amireh/vertigo-bom
scripts/Shared/UI/UIAnimable.lua
1
2772
Animatable = {} function Animatable:new(cegui_window, o) local o = o or {} setmetatable(o, {__index = self}) self.__index = self o.__Window = cegui_window o.__Instances = {} return o end function Animatable:destroy() for anim in list_iter(self.__Instances) do self:__stopAnime(anim) CEAnimMgr:...
gpl-3.0
dani-sj/danyal002
bot/creedbot.lua
1
15621
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") VERSION = '1.0' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then retu...
gpl-2.0
LaFamiglia/Illarion-Content
monster/race_40_wolf/id_402_lambslaughterer.lua
1
1104
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
chelog/brawl
addons/brawl-weapons/lua/weapons/cw_grenade_base/cl_hooks.lua
1
1268
local function CW20_Grenade_InitPostEntity() local ply = LocalPlayer() ply.cwFlashbangDuration = 0 ply.cwFlashbangIntensity = 0 ply.cwFlashbangDisplayIntensity = 0 ply.cwFlashDuration = 0 ply.cwFlashIntensity = 0 end hook.Add("InitPostEntity", "CW20_Grenade_InitPostEntity", CW20_Grenade_InitPostEntity) ...
gpl-3.0
nood32/MEEDOBOT
plugins/tosticker.lua
1
2291
--[[ ✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133 ✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133 ✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen ✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy ✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com ✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen ]]-- local function to...
gpl-2.0
Godfather021/yag
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
Shayan123456/botttttt5
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
chegenipapi/sajadchegen
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
facebokiii/arman
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
LaFamiglia/Illarion-Content
quest/seleseth_709_galmair.lua
1
6342
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
gwx/tome-grayswandir-weaponry
data/egos/all-spears.lua
1
2202
if config.settings.tome.grayswandir_weaponry_new_egos ~= false then local rmm = resolvers.mbonus_material newEntity { power_source = {technique = true}, name = 'long ', prefix = true, instant_resolve = true, keywords = {long = true}, combat = {thrust_range = 1}, level_range = {1, 50}, rarity = 3, cost ...
gpl-3.0
pigparadise/skynet
3rd/lpeg/re.lua
160
6286
-- $Id: re.lua,v 1.44 2013/03/26 20:11:40 roberto Exp $ -- imported functions and modules local tonumber, type, print, error = tonumber, type, print, error local setmetatable = setmetatable local m = require"lpeg" -- 'm' will be used to parse expressions, and 'mm' will be used to -- create expressions; that is, 're' ...
mit
Inorizushi/DDR-X3
BGAnimations/ScreenSelectCourse decorations.lua
2
1287
-- when they say fallback they mean fallback, as in "sorry, we're going to -- import the stuff from ScreenSelectMusic decorations anyways" fallback. local t = LoadFallbackB(); --QUAD THE COURSE LIST BG BECAUSE LOL TOO LAZY TO PHOTOSHOP --Green stroke because fuck it. t[#t+1] = Def.Quad{ InitCommand=cmd(halign...
mit
Inorizushi/DDR-X3
Graphics/MusicWheelItem Song NormalPart/2nd.lua
1
1533
local t = Def.ActorFrame {}; t[#t+1] = Def.ActorFrame{ InitCommand=cmd(zoom,0.8); LoadActor("cd/cd_mask")..{ InitCommand=cmd(blend,Blend.NoEffect;zwrite,1;clearzbuffer,true;); }; Def.Banner{ Name="SongCD"; SetMessageCommand=function(self,params) self:ztest(1) local song = params.Song; if song then ...
mit
dismantl/luci-0.12
applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
78
2765
--[[ Luci configuration model for statistics - collectd netlink plugin configuration (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 Licen...
apache-2.0
qq779089973/ramod
luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
78
2765
--[[ Luci configuration model for statistics - collectd netlink plugin configuration (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 Licen...
mit
Noltari/luci
applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua
7
1132
-- Copyright 2014 Aedan Renner <chipdankly@gmail.com> -- Copyright 2018 Florian Eckert <fe@dev.tdt.de> -- Licensed to the public under the GNU General Public License v2. local dsp = require "luci.dispatcher" local m, mwan_policy, member, last_resort arg[1] = arg[1] or "" m = Map("mwan3", translatef("MWAN Policy Con...
apache-2.0
teleshadow/shadowbot
plugins/ingroup.lua
527
44020
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
Ali-2h/wwefucker
libs/redis.lua
566
1214
local Redis = require 'redis' local FakeRedis = require 'fakeredis' local params = { host = os.getenv('REDIS_HOST') or '127.0.0.1', port = tonumber(os.getenv('REDIS_PORT') or 6379) } local database = os.getenv('REDIS_DB') local password = os.getenv('REDIS_PASSWORD') -- Overwrite HGETALL Redis.commands.hgetall = ...
gpl-2.0
sobrinho/busted
spec/execution_order_sync_spec.lua
12
1154
local egg = '' describe('before_each after_each egg test', function() setup(function() egg = egg..'S' end) teardown(function() egg = egg..'T' end) before_each(function() egg = egg..'b' end) after_each(function() egg = egg..'a' end) describe('asd', function() before_each(functi...
mit
jsenellart-systran/OpenNMT
test/onmt/LMTest.lua
8
1166
require('onmt.init') local tester = ... local languageModelTest = torch.TestSuite() function languageModelTest.basic() tester:eq(onmt.LanguageModel.dataType('monotext'), true) tester:eq(onmt.LanguageModel.dataType(), 'monotext') end function languageModelTest.train() local cmd = onmt.utils.ExtendedCmdLine.new...
mit
bsmr-games/lipsofsuna
data/lipsofsuna/core/messaging/messages/login.lua
1
1159
-- Lips of Suna is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. local Network = require("system/network") Main.messaging:re...
gpl-3.0
gligneul/fahrenheit
tests/cast.lua
1
4245
-- MIT License -- -- Copyright (c) 2017 Gabriel de Quadros Ligneul -- -- 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 u...
mit
Noltari/luci
libs/luci-lib-px5g/lua/px5g/util.lua
170
1148
--[[ * px5g - Embedded x509 key and certificate generator based on PolarSSL * * Copyright (C) 2009 Steven Barth <steven@midlink.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License, version 2.1 as published by the Free ...
apache-2.0
gmorishere/c
plugins/inv.lua
46
1079
do local function callbackres(extra, success, result) local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then send_large_msg(chat, 'User is globaly banned.') ...
gpl-2.0
qq779089973/ramod
luci/applications/luci-splash/luasrc/controller/splash/splash.lua
50
4511
module("luci.controller.splash.splash", package.seeall) local uci = luci.model.uci.cursor() local util = require "luci.util" function index() entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90) entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), _("Splas...
mit
FastTM/Fast-Unique
methods.lua
1
14022
local api_errors = require 'api_bad_requests' local BASE_URL = 'https://api.telegram.org/bot' .. config.bot_api_key local api = {} local curl_context = curl.easy{verbose = config.bot_settings.debug_connections} local function getCode(err) for k,v in pairs(api_errors) do if err:match(v) then return k end en...
gpl-2.0
RedSnake64/openwrt-luci-packages
applications/luci-app-dump1090/luasrc/model/cbi/dump1090.lua
37
4987
-- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com> -- Licensed to the public under the Apache License 2.0. m = Map("dump1090", "dump1090", translate("dump1090 is a Mode S decoder specifically designed for RTLSDR devices, here you can configure the settings.")) s = m:section(TypedSection, "dump1090", "") s.a...
apache-2.0
LaFamiglia/Illarion-Content
monster/race_39_wolf/default.lua
1
1131
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
soundsrc/premake-core
modules/gmake/tests/cpp/test_make_linking.lua
12
5918
-- -- tests/actions/make/cpp/test_make_linking.lua -- Validate the link step generation for makefiles. -- Copyright (c) 2010-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("make_linking") local make = p.make local project = p.project -- -- Setup and teardown -- local...
bsd-3-clause
Exupery/DontCast
Libs/LibStub/LibRevision.lua
2
2222
--[[ -- LibRevision.lua -- Finds the revisions of a given addon and works out the version. -- Written by Ken Allan <ken@norganna.org> -- This code is hereby released into the Public Domain without warranty. -- -- Usage: -- local libRevision = LibStub("LibRevision") ...
mit
kitool/gamecode4
Assets/Scripts/Events.lua
44
2298
--======================================================================== -- Events.lua : Defines event handler delegate functions for events -- -- Part of the GameCode4 Application -- -- GameCode4 is the sample application that encapsulates much of the source code -- discussed in "Game Coding Complete - 4th Edi...
lgpl-3.0
tinybearc/sdkbox-ga-sample
js/frameworks/cocos2d-x/plugin/luabindings/auto/api/AgentManager.lua
146
1798
-------------------------------- -- @module AgentManager -- @parent_module plugin -------------------------------- -- -- @function [parent=#AgentManager] getSocialPlugin -- @param self -- @return plugin::ProtocolSocial#plugin::ProtocolSocial ret (return value: cc.plugin::ProtocolSocial) -------------------...
mit
qq779089973/ramod
luci/modules/niu/luasrc/controller/niu/system.lua
33
6889
--[[ LuCI - Lua Development Framework Copyright 2009 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- local...
mit
adminomega/exterme-orginal
plugins/vote.lua
615
2128
do local _file_votes = './data/votes.lua' function read_file_votes () local f = io.open(_file_votes, "r+") if f == nil then print ('Created voting file '.._file_votes) serialize_to_file({}, _file_votes) else print ('Values loaded: '.._file_votes) f:close() end return loadfile (_file_votes)()...
gpl-2.0
astrofra/amiga-experiments
game-shop-shop-galaxy/Python-toolchain/pkg.core/lua/cone.lua
2
3547
-- {"name":"Cone", "category":"Primitive", "editor":["@data/script_integration/register_as_component.py", "@data/script_integration/add_to_scene_create_menu.py"]} execution_context = gs.ScriptContextAll radius = 1 --> float height = 1 --> float subdiv = 4 --> int smoothing_angle = 40.0 --> float material = nil ...
mit
soundsrc/premake-core
scripts/changes.lua
6
1995
--- -- Output a list of merged PRs since last release in the CHANGES.txt format --- local format_separator = "||" local git_command_raw = 'git log '.. '%s/master "^%s/release" '.. '--merges --first-parent '.. '--pretty="%%s%s%%b" '.. '--grep="Merge pull request #"' local changes_pr_format = "...
bsd-3-clause
snabbnfv-goodies/snabbswitch
lib/ljsyscall/examples/init.lua
23
1241
#!/bin/luajit -- basic init process -- note we do not catch all errors as we cannot do much about them -- note that stdin, stderr should be attached to /dev/console package.path = "/lib/?.lua;?" local S = require "syscall" local nl = require "syscall.nl" local function fatal(s) print(s) os.exit() end function...
apache-2.0
keyanmca/MonaClients
MonaStatus/main.lua
2
3531
-- Server application for the flex client MonaStatus (can work with other clients) -- Useful functions function getCongestion(qos) local congestion = qos.lostRate if qos.lastLatency and qos.lastLatency>0 then congestion = congestion + (qos.latency-qos.lastLatency) / qos.lastLatency end qos.lastLatency = qo...
lgpl-3.0
jsenellart-systran/OpenNMT
test/onmt/TensorTest.lua
8
4274
require('onmt.init') local tester = ... local tensorTest = torch.TestSuite() local function reuseTest(a, size) local b = onmt.utils.Tensor.reuseTensor(a, size) tester:eq(torch.pointer(b:storage()), torch.pointer(a:storage())) tester:eq(b:ne(0):sum(), 0) end local function compareStorage(a, b, func) if torch...
mit
jsenellart-systran/OpenNMT
test/onmt/BeamSearchTest.lua
7
4379
require('onmt.init') local tester = ... local beamSearchTest = torch.TestSuite() function beamSearchTest.beamSearch() local transitionScores = { {-math.huge, math.log(.6), math.log(.4), -math.huge}, {math.log(.6), -math.huge, math.log(.4), -math.huge}, {-math.huge, -math.huge,...
mit
pibi/plugin_nagios_adapter
index.lua
1
3061
-- [boundary.com] Nagios Plugin Adapter -- [author] Ivano Picco <ivano.picco@pianobit.com> -- Common requires. local utils = require('utils') local timer = require('timer') local fs = require('fs') local json = require('json') local os = require ('os') local tools = require ('tools') local success, boundary = pcall(...
apache-2.0
fmassa/object-detection.torch
model.lua
2
1278
require 'nn' require 'inn' require 'cudnn' local reshapeLastLinearLayer = paths.dofile('utils.lua').reshapeLastLinearLayer local convertCaffeModelToTorch = paths.dofile('utils.lua').convertCaffeModelToTorch -- 1.1. Create Network local config = opt.netType local createModel = paths.dofile('models/' .. config .. '.lua'...
bsd-2-clause
LaFamiglia/Illarion-Content
triggerfield/runewick_bridges.lua
1
58365
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope th...
agpl-3.0
soundsrc/premake-core
modules/vstudio/tests/sln2005/test_projects.lua
14
5498
-- -- tests/actions/vstudio/sln2005/test_projects.lua -- Validate generation of Visual Studio 2005+ solution project entries. -- Copyright (c) 2009-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_sln2005_projects") local sln2005 = p.vstudio.sln2005 -- -- Setup -...
bsd-3-clause
bsmr-games/lipsofsuna
data/lipsofsuna/core/client/bindings.lua
1
4619
local Client = require("core/client/client") local Graphics = require("system/graphics") local Keysym = require("system/keysym") Main.main_start_hooks:register(500, function() Client.input:register_binding{name = "attack", mode = "toggle", key1 = "mouse1", func = function(v) if not Client.player_object then return...
gpl-3.0
dismantl/luci-0.12
modules/admin-full/luasrc/model/cbi/admin_system/admin.lua
79
3356
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://w...
apache-2.0
dismantl/luci-0.12
libs/nixio/axTLS/samples/lua/axssl.lua
176
19286
#!/usr/local/bin/lua -- -- Copyright (c) 2007, Cameron Rich -- -- 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, -...
apache-2.0
soundsrc/premake-core
src/base/detoken.lua
7
5286
-- -- detoken.lua -- -- Expands tokens. -- -- Copyright (c) 2011-2014 Jason Perkins and the Premake project -- local p = premake p.detoken = {} local detoken = p.detoken -- -- Expand tokens in a value. -- -- @param value -- The value containing the tokens to be expanded. -- @param environ -- An execution e...
bsd-3-clause
chelog/brawl
addons/brawl-weapons/lua/weapons/khr_mp153/shared.lua
1
5916
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "MP-153" SWEP.CSMuzzleFlashes = true SWEP.ViewModelMovementScale = 1 SWEP.IconLetter = "k" SWEP.MuzzleEffect = "muzzleflash_m3" SWEP.PosBasedMuz = false SWEP.SnapTo...
gpl-3.0
Exupery/DontCast
Libs/LibStub/LibStub.lua
2
1064
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 local LibStub = _G[LIBSTUB_MAJOR] if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = { }, minors = { }} _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR function LibStub:NewLibrary(major, minor) assert(type(major) == "stri...
mit
dismantl/luci-0.12
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua
86
1131
--[[ Luci statistics - iptables plugin diagram definition (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net> 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.a...
apache-2.0
dismantl/luci-0.12
contrib/luadoc/lua/luadoc/lp.lua
175
4389
---------------------------------------------------------------------------- -- Lua Pages Template Preprocessor. -- -- @release $Id: lp.lua,v 1.7 2007/04/18 14:28:39 tomas Exp $ ---------------------------------------------------------------------------- local assert, error, getfenv, loadstring, setfenv = assert, erro...
apache-2.0
koeppea/ettercap
src/lua/share/scripts/inject_http_demo.lua
9
10153
--- -- Copyright (C) Ryan Linn and Mike Ryan -- -- 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 2 of the License, or -- (at your option) any later version. -- --...
gpl-2.0
mramir8274/braidostam
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
FastTM/Fast-Unique
plugins/admin.lua
1
11206
local plugin = {} local triggers2 = { '^%$(init)$', '^%$(stop)$', '^%$(backup)$', '^%$(save)$', '^%$(stats)$', '^%$(lua) (.*)$', '^%$(run) (.*)$', '^%$(admin)$', '^%$(block) (%d+)$', '^%$(unblock) (%d+)$', '^%$(leave) (-%d+)$', '^%$(leave)$', '^%$(api errors)$', '^%$(rediscli) (.*)$', '^%$(sendfile) (.*...
gpl-2.0
Noltari/luci
libs/luci-lib-nixio/docsrc/nixio.TLSSocket.lua
173
2926
--- TLS Socket Object. -- TLS Sockets contain the underlying socket and context in the fields -- "socket" and "context". -- @cstyle instance module "nixio.TLSSocket" --- Initiate the TLS handshake as client with the server. -- @class function -- @name TLSSocket.connect -- @usage This function calls SSL_connect(). -- @...
apache-2.0
shmul/mule
tests/test_mulelib.lua
1
65636
require "tests.strict" local lunit = require "lunit" if _VERSION >= 'Lua 5.2' then _ENV = lunit.module('test_mulelib','seeall') else module( "test_mulelib", lunit.testcase, package.seeall ) end require "mulelib" pcall(require, "profiler") require "memory_store" local cdb = require "column_db" local mdb = requir...
apache-2.0
LaFamiglia/Illarion-Content
quest/lotta_medborgar_632_galmair.lua
1
2605
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 distributed in the hope that it wi...
agpl-3.0
299299/Urho3D
bin/Data/LuaScripts/46_RaycastVehicleDemo.lua
11
17490
-- Vehicle example. -- This sample demonstrates: -- - Creating a heightmap terrain with collision -- - Constructing a physical vehicle with rigid bodies for the hull and the wheels, joined with constraints -- - Saving and loading the variables of a script object, including node & component references requi...
mit
cornelisse/LuaFSM
test_fsm.lua
2
2538
--[[ File: test_fsm.lua Description: Tests for the finite state machine library Author: Erik Cornelisse Version 1.0 April 27, 2011 ]]-- require "luaunit" FSM = require "fsm" function action1() return 1 end -- #1 Performaing action 1 function action2() return 2 end -- #2 Performaing another action function action...
mit
erikwilson/CactusCon6
dev-test/qrcode.lua
1
26547
-- fixme - almost converted from https://github.com/ricmoo/QRCode/blob/master/src/qrcode.c local NUM_ERROR_CORRECTION_CODEWORDS = { -- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ...
mit