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
qq779089973/ramod
luci/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-cdr.lua
80
1878
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 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 h...
mit
snabbnfv-goodies/snabbswitch
lib/ljsyscall/syscall/openbsd/ffi.lua
18
6838
-- This are the types for OpenBSD local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = require "syscal...
apache-2.0
zhityer/zhityer4
plugins/stats.lua
458
4098
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 5 local TIME_CHECK = 4 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name....
gpl-2.0
Henkoglobin/luadep
container.lua
1
2858
-- container.lua -- -- Provides a form of dependency injection for Lua projects local container = setmetatable({}, { __call = function(self, ...) return setmetatable(self.new(...), self) end }) container.__index = container function container.new() return { modules = {}, finished = {} } e...
unlicense
qq779089973/ramod
luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua
141
1031
--[[ smap_devinfo - SIP Device Information (c) 2009 Daniel Dickinson 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$ ]]-- require("luci.i18n") re...
mit
yanjunh/luasocket-gyp
src/http.lua
121
12193
----------------------------------------------------------------------------- -- HTTP/1.1 client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab -- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $ ----------------------------------------------------------------------------- -----...
mit
chelog/brawl
addons/brawl-weapons/lua/weapons/cw_jng90/sh_sounds.lua
1
1315
CustomizableWeaponry:addFireSound("CW_JNG_SUB", "weapons/jng90/sub.wav", 1, 50, CHAN_STATIC) CustomizableWeaponry:addFireSound("CW_JNG_FIRE", "weapons/jng90/fire.wav", 1, 105, CHAN_STATIC) CustomizableWeaponry:addReloadSound("CW_JNG_MAGOUT", "weapons/jng90/magout.wav") CustomizableWeaponry:addReloadSound("CW_JNG_M...
gpl-3.0
Inorizushi/DDR-X3
BGAnimations/optionicon_P2/default.lua
3
6716
return Def.ActorFrame { -- Speed Def.Sprite { OnCommand=function(self) self:x(-85); if GAMESTATE:PlayerIsUsingModifier(PLAYER_2,'1.5x') and SCREENMAN:GetTopScreen():GetScreenType() == "ScreenType_Gameplay" then self:Load(THEME:GetPathB("","optionicon_P2/speed_x1_5_P1")); elseif GAMESTATE:PlayerI...
mit
vladimir-kotikov/clink-completions
modules/matchers.lua
2
4332
local clink_version = require('clink_version') local exports = {} local path = require('path') local w = require('tables').wrap -- A function to generate directory matches. -- -- local matchers = require("matchers") -- clink.argmatcher():addarg(matchers.dirs) exports.dirs = function(word) -- Strip off any path...
mit
BrasileiroGamer/TrineEE_TranslationTools
translation_tools/base/data/locale/gui/en/menu/mainmenu/howtoplaymenu.lua
1
1630
-- /data/locale/gui/$$/menu/mainmenu/howtoplaymenu.lua headerHowToPlay = "How to Play" buttonTab = "" valuegeneral = "Introduction" valuegettingstarted = "Getting Started" valuetips = "Tips" tipsText1 = "\n <b>•</b> If you find yourself stuck, try solving the puzzle with another character or get another p...
gpl-3.0
Hzj-jie/koreader-base
ffi/zipwriter.lua
1
7503
-- Zip packing workflow & code from luarocks' zip.lua : -- https://github.com/luarocks/luarocks/blob/master/src/luarocks/tools/zip.lua -- Modified to not require lua-zlib (we can wrap zlib with ffi) -- cf: http://luajit.org/ext_ffi_tutorial.html, which uses zlib as an example ! -- Simplified to take filename and co...
agpl-3.0
mpeterv/literal
src/literal.lua
1
14728
--- A library for safe evaluation of Lua literal expressions. -- @module literal -- @license Public Domain -- @author Peter Melnichenko local literal = {} local class = require "30log" --- Default grammar to be used by evaluation functions. Set to the version of Lua used to run the module. literal.grammar = _VERSIO...
unlicense
hnyman/luci
build/luadoc/luadoc/util.lua
32
5859
------------------------------------------------------------------------------- -- General utilities. -- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local posix = require "nixio.fs" local type, table, string, io, as...
apache-2.0
jjmleiro/hue
tools/wrk-scripts/lib/equal-5bb8dbf.lua
22
1818
-- The MIT License (MIT) -- -- Copyright (c) 2014, Cyril David <cyx@cyx.is> -- -- 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 right...
apache-2.0
chelog/brawl
addons/brawl-weapons/lua/cw/shared/attachments/md_cmore.lua
1
1449
local att = {} att.name = "md_cmore" att.displayName = "C-More Railway Sight" att.displayNameShort = "C-More" att.aimPos = {"CmorePos", "CmoreAng"} att.FOVModifier = 15 att.isSight = true att.colorType = CustomizableWeaponry.colorableParts.COLOR_TYPE_SIGHT att.statModifiers = {OverallMouseSensMult = -0.04} i...
gpl-3.0
soundsrc/premake-core
modules/vstudio/tests/vc2010/test_rule_vars.lua
9
2233
-- -- tests/actions/vstudio/vc2010/test_rule_vars.lua -- Validate generation of custom rule variables at the project level. -- Author Jason Perkins -- Copyright (c) 2014-2015 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_vs2010_rule_vars") local vc2010 = p.vstudio.vc...
bsd-3-clause
mpeterv/pflua
src/pf/match.lua
15
11796
module(...,package.seeall) --- --- Program := 'match' Cond --- Cond := '{' Clause... '}' --- Clause := Test '=>' Dispatch [ClauseTerminator] -- Test := 'otherwise' | LogicalExpression --- ClauseTerminator := ',' | ';' --- Dispatch := Call | Cond --- Call := Identifier Args? --- Args := '(' [ ArithmeticExpression [ ',...
apache-2.0
RedSnake64/openwrt-luci-packages
protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua
72
2039
-- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local ipaddr, peeraddr, ip6addr, tunnelid, username, password local defaultroute, metric, ttl, mtu ipaddr = s:taboption("general", Value, "ipaddr", translate("Local IPv4 ad...
apache-2.0
snabbnfv-goodies/snabbswitch
lib/ljsyscall/syscall/netbsd/fcntl.lua
24
1318
-- NetBSD fcntl local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local function init(types) local c = require...
apache-2.0
dismantl/luci-0.12
libs/nixio/docsrc/nixio.bit.lua
171
2044
--- Bitfield operators and mainpulation functions. -- Can be used as a drop-in replacement for bitlib. module "nixio.bit" --- Bitwise OR several numbers. -- @class function -- @name bor -- @param oper1 First Operand -- @param oper2 Second Operand -- @param ... More Operands -- @return number --- Invert given number. ...
apache-2.0
vladimir-kotikov/clink-completions
scoop.lua
2
7981
-- -*- coding: utf-8 -*- -- preamble: common routines local JSON = require("JSON") local matchers = require("matchers") local path = require("path") local w = require("tables").wrap local concat = require("funclib").concat local parser = clink.arg.new_parser local function get_home_dir() return os.getenv("home"...
mit
chelog/brawl
gamemodes/brawl/gamemode/modules/changelog/client/changelog.lua
1
2822
local f local function refresh( reset ) if reset then f.page = 1 f.prev:SetEnabled( false ) end local t, p = f.type:GetValue(), f.page http.Fetch( "http://www.octothorp.team/changelog/fetch.php?s=brawl&t="..t.."&p="..p, function( body, size, headers, code ) if code ~= 200 then return end local data = uti...
gpl-3.0
RedSnake64/openwrt-luci-packages
applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-chan.lua
68
1513
-- 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. cbimap = Map("asterisk", "asterisk", "") module = cbimap:section(TypedSection, "module", "Modules", "") module.anonymous = true chan_agent = module:option(L...
apache-2.0
jsenellart-systran/OpenNMT
onmt/utils/MemoryOptimizer.lua
8
6733
--[[ MemoryOptimizer is a class used for optimizing memory usage of a replicated network. --]] local MemoryOptimizer = torch.class('MemoryOptimizer') -- We cannot share every internal tensors (that is why we need to replicate in the first place). -- The general rule is to not share tensors whose content is used in the...
mit
snabbnfv-goodies/snabbswitch
lib/ljsyscall/syscall/linux/nl.lua
18
36273
-- modularize netlink code as it is large and standalone local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string loca...
apache-2.0
bsmr-games/lipsofsuna
data/system/color.lua
1
3660
--- Colorspace conversions and helpers. -- -- 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 syst...
gpl-3.0
ashkanpj/seedfire
plugins/banhammer.lua
2
11452
local function pre_process(msg) -- 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('Checking invited user '..user_id) local banned ...
gpl-2.0
MustaphaTR/OpenRA
mods/ra/maps/sarin-gas-2-down-under/downunder.lua
7
15672
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you 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 vers...
gpl-3.0
prophile/xsera
Resources/Scripts/Modules/TextManip.lua
2
4059
import('GlobalVars') --dofile("PrintRecursive.lua") -- Splits the text into wrappable strings with a maximum length of maxLength. -- Returns a table of strings of maxLength length or shorter. function textWrap(text, font, height, maxLength) local done = false local numWords local words local totalLengt...
mit
spark0511/blueteambot
plugins/bugzilla.lua
611
3983
do local BASE_URL = "https://bugzilla.mozilla.org/rest/" local function bugzilla_login() local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password print("accessing " .. url) local res,code = https.request( url ) local data = json:decode(res) return data ...
gpl-2.0
adminomega/exterme-orginal
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
SirSepehr/Sepehr
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
chelog/brawl
addons/brawl-weapons/lua/cw/shared/cw_originalvaluesaving.lua
1
1828
AddCSLuaFile() -- This is a small module-thing that assigns a specified value a value with _Orig at the end of it -- and can also, optionally, assign the value with a 'Mult' ending that's always 1, which can be used for attachments that modify a weapon's stats CustomizableWeaponry.originalValue = {} Customizabl...
gpl-3.0
Shrafe/myo-scripts
browser-control.lua
1
1079
scriptId = 'com.thauser.myo.scripts.browser-control' function webBack() myo.keyboard("left_arrow", "press","alt") myo.debug("webBack() : Navigate to previous webpage") end function nextTab() myo.keyboard("tab", "press", "control") myo.debug("nextTab() : Switch to next tab") end function newTab() ...
apache-2.0
dismantl/luci-0.12
applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua
76
5638
--[[ Luci diag - Diagnostics controller module (c) 2009 Daniel Dickinson 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("luci.cont...
apache-2.0
Noltari/luci
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua
10
7037
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local ip = require "luci.ip" local fs = require "nixio.fs" if arg[1] then mp = Map("olsrd6", translate("OLSR - Plugins")) p = mp:section(TypedSection, "Loa...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/ai/combat/melee.lua
1
1227
local AiActionSpec = require("core/specs/aiaction") AiActionSpec{ name = "melee", categories = {["combat"] = true, ["offensive"] = true}, calculate = function(self, args) -- Make sure that the actor can use melee. if not args.attack then return end if not args.spec.can_melee then return end -- Check for goo...
gpl-3.0
Noltari/luci
applications/luci-app-vnstat/luasrc/model/cbi/vnstat.lua
78
1816
-- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local utl = require "luci.util" local sys = require "luci.sys" local fs = require "nixio.fs" local nw = require "luci.model.network" local dbdir, line for line in io.lines("/etc/vnstat.conf") do dbdir ...
apache-2.0
LaFamiglia/Illarion-Content
npc/base/consequence/rune.lua
4
1083
--[[ 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
LaFamiglia/Illarion-Content
monster/base/quests.lua
4
15012
--[[ 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
dariocanoh/numberbook
xlsxwriter/utility.lua
1
9910
---- -- Utility - Utility functions for xlsxwriter.lua. -- -- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org -- require "numberbook.xlsxwriter.strict" local Utility = {} local char_A = string.byte("A") local col_names = {} local named_colors = { ["black"] = "#000000", ["blue"] = "#0000FF", ["brown"...
mit
chelog/brawl
gamemodes/brawl/gamemode/lib/mysqlite.lua
1
12036
--[[ MySQLite - Abstraction mechanism for SQLite and MySQL Why use this? - Easy to use interface for MySQL - No need to modify code when switching between SQLite and MySQL - Queued queries: execute a bunch of queries in order an run the callback when all queries are done License: LGPL V2.1 (read here: https:...
gpl-3.0
LaFamiglia/Illarion-Content
monster/race_89_red_imp/id_893_mystic.lua
1
1261
--[[ 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
650ia/RaOne
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
PowerFull10/Power_Full
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
Inorizushi/DDR-X3
Graphics/NoteField board.lua
1
1369
--Lifted from default, appears to have been written by Kyzentun local filter_color= color("0,0,0,1") local this_pn local args= { --the danger display Def.Quad{ InitCommand=function(self) self :diffusealpha(0) :diffuseshift() :effectcolor1(color("1,0,0,0.8")) :effectcolor2(color("1,0,0,0")) :effectcl...
mit
LaFamiglia/Illarion-Content
content/gatheringcraft/glassingotproducing.lua
1
4375
--[[ 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
luiseduardohdbackup/WarriorQuest
WarriorQuest/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/DeprecatedOpenglEnum.lua
148
11934
-- This is the DeprecatedEnum DeprecatedClass = {} or DeprecatedClass _G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT _G.GL_LINE_WIDTH = gl.LINE_WIDTH _G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA _G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA _G.GL_GREEN_BITS = gl.GREEN_BITS _G.GL_STENCIL_REF = gl.STENCI...
mit
hnyman/luci
libs/luci-lib-nixio/docsrc/nixio.File.lua
173
4457
--- Large File Object. -- Large file operations are supported up to 52 bits if the Lua number type is -- double (default). -- @cstyle instance module "nixio.File" --- Write to the file descriptor. -- @class function -- @name File.write -- @usage <strong>Warning:</strong> It is not guaranteed that all data -- in the bu...
apache-2.0
LaFamiglia/Illarion-Content
item/food.lua
1
17537
--[[ 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
mpeterv/pflua
tests/pfquickcheck/pflua_ir.lua
25
1989
#!/usr/bin/env luajit -- -*- lua -*- -- This module generates (a subset of) pflua's IR, -- for property-based tests of pflua internals. module(..., package.seeall) local choose = require("pf.utils").choose local True, False, Fail, ComparisonOp, BinaryOp, Number, Len local Binary, Arithmetic, Comparison, Conditional -...
apache-2.0
dismantl/luci-0.12
applications/luci-pbx/luasrc/model/cbi/pbx.lua
146
4360
--[[ Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com> This file is part of luci-pbx. luci-pbx 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 ...
apache-2.0
shmul/mule
fdi/hourlyAlg.lua
1
5610
------------------------------------- -- Hourly algo, Matlab version 27 --- ------------------------------------- require 'helpers' require 'fdi/statisticsBasic' --require 'statisticsBasic' -- costants local INTERVAL = 3600 local REF_TIME = 1357344000 local DAY = 24 local WEEK = 168 -- parameters local DRIFT = 1...
apache-2.0
chelog/brawl
gamemodes/brawl/gamemode/init.lua
1
2188
brawl = brawl or {} -- include libraries include "lib/mysqlite.lua" AddCSLuaFile "lib/misc.lua" function brawl.msg( text, ... ) local args = {...} local time = os.date( "(%H:%M:%S)", os.time() ) local msg = args and string.format( text, unpack(args) ) or text print( string.format( "[#] %s - %s", time, msg ) ) ...
gpl-3.0
chelog/brawl
addons/brawl-weapons/lua/weapons/khr_aek971/shared.lua
1
9501
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") SWEP.magType = "arMag" if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "AEK-971" SWEP.CSMuzzleFlashes = true SWEP.IconLetter = "w" killicon.Add( "", "", Color(255, 80, 0, 150)) SWEP.MuzzleEffect = "muzzleflash_ak...
gpl-3.0
LaFamiglia/Illarion-Content
monster/race_11_skeleton/base.lua
5
2965
--[[ 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
dismantl/luci-0.12
modules/admin-full/luasrc/model/cbi/admin_system/fstab/swap.lua
84
1922
--[[ LuCI - Lua Configuration Interface Copyright 2010 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 $Id$ ]]-- lo...
apache-2.0
gwx/tome-grayswandir-weaponry
data/objects/2hspears.lua
1
2561
if config.settings.tome.grayswandir_weaponry_spears ~= false then newEntity{ define_as = 'BASE_GREATSPEAR', slot = 'MAINHAND', slot_forbid = 'OFFHAND', type = 'weapon', subtype='greatspear', add_name = ' (#COMBAT#)', display = '/', color=colors.SLATE, image = 'object/generic_greatspear.png'...
gpl-3.0
bsmr-games/lipsofsuna
data/lipsofsuna/landscape/camera.lua
1
2571
--- Camera for the landscape subgame. -- -- 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 landsc...
gpl-3.0
MustaphaTR/OpenRA
mods/ra/maps/allies-05c/allies05c.lua
7
11123
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you 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 vers...
gpl-3.0
dpalacio/awesome-randr-zaphod
luadoc/dbus.lua
3
1563
--- awesome D-Bus API -- @author Julien Danjou &lt;julien@danjou.info&gt; -- @copyright 2008-2009 Julien Danjou module("dbus") --- Register a D-Bus name to receive message from. -- @param bus A string indicating if we are using system or session bus. -- @param name A string with the name of the D-Bus name to register....
gpl-2.0
koeppea/ettercap
src/lua/share/third-party/stdlib/src/lcs.lua
12
1584
--- Longest Common Subsequence algorithm. -- After pseudo-code in <a -- href="http://www.ics.uci.edu/~eppstein/161/960229.html">lecture -- notes</a> by <a href="mailto:eppstein@ics.uci.edu">David Eppstein</a>. -- Find common subsequences. -- @param a first sequence -- @param b second sequence -- @return list of commo...
gpl-2.0
vanzomerenc/misc-lua
functional/bind.lua
1
1224
---@module bind -- @author Christopher VanZomeren -- @copyright (c) 2014 Christopher VanZomeren assert(..., 'Do not use as main file; use require from different file') local _id = select(2, ...) or ... local error = error local select = select local type = type local require = require 'relative_require' (...) loca...
bsd-2-clause
mohsen9hard/saba
plugins/all.lua
264
4202
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
snabbnfv-goodies/snabbswitch
lib/ljsyscall/test/bsd.lua
18
16048
-- General BSD tests local function init(S) local helpers = require "syscall.helpers" local types = S.types local c = S.c local abi = S.abi local bit = require "syscall.bit" local ffi = require "ffi" local t, pt, s = types.t, types.pt, types.s local assert = helpers.assert local function fork_assert(cond, err, .....
apache-2.0
adminomega/exterme-orginal
bot/utils.lua
239
13499
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() http.TIMEOUT = 10 funct...
gpl-2.0
Ali-2h/wwefucker
bot/utils.lua
239
13499
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() http.TIMEOUT = 10 funct...
gpl-2.0
sobrinho/busted
busted/languages/fr.lua
12
1487
local s = require('say') s:set_namespace('fr') -- 'Pending: test.lua @ 12 \n description s:set('output.pending', 'En attente') s:set('output.failure', 'Echec') s:set('output.success', 'Reussite') s:set('output.pending_plural', 'en attente') s:set('output.failure_plural', 'echecs') s:set('output.success_plural', 'reu...
mit
github1380/active-bot
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
alivilteram/seedteam
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
chelog/brawl
gamemodes/brawl/gamemode/modules/base/client/vgui/sidemenuscroller.lua
1
2811
local PANEL = {} function PANEL:Init() self.Panels = {} self.OffsetX = 0 self.FrameTime = 0 self.pnlCanvas = vgui.Create( "DDragBase", self ) self.pnlCanvas:SetDropPos( "6" ) self.pnlCanvas:SetUseLiveDrag( false ) self.pnlCanvas.OnModified = function() self:OnDragModified() end self.pnlCanvas.UpdateDropTar...
gpl-3.0
soundsrc/premake-core
modules/vstudio/vs2010.lua
5
6057
-- -- vs2010.lua -- Add support for the Visual Studio 2010 project formats. -- Copyright (c) Jason Perkins and the Premake project -- local p = premake p.vstudio.vs2010 = {} local vs2010 = p.vstudio.vs2010 local vstudio = p.vstudio local project = p.project local tree = p.tree --- -- Map Premake tokens to the...
bsd-3-clause
qq779089973/ramod
luci/modules/admin-full/luasrc/model/cbi/admin_network/iface_add.lua
79
3091
--[[ LuCI - Lua Configuration Interface Copyright 2009-2010 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 $Id$ ]]...
mit
Dantevg/RedWeb
src/Server.lua
1
13934
--[[ RedWeb server by DvgCraft Wireless modem required VERSION 1.0 LONG V 0.9.12.2 DATE 29-04-2016 ]]-- -- Variables local arg = {...} local running = true local serverPath = "/server.cfg" local usage = "Usage:\nRedWebServer" local c = { bg = colors.white, txt = colors....
mit
FastTM/Fast-Unique
plugins/links.lua
1
1928
local plugin = {} function plugin.onTextMessage(msg, blocks) if msg.chat.type == 'private' then return end if not roles.is_admin_cached(msg) then return end local hash = 'chat:'..msg.chat.id..':links' local text if blocks[1] == 'link' then local key = 'link' local link = db:hget(hash, key) --ch...
gpl-2.0
Noltari/luci
libs/luci-lib-nixio/docsrc/nixio.UnifiedIO.lua
16
5900
--- Unified high-level I/O utility API for Files, Sockets and TLS-Sockets. -- These functions are added to the object function tables by doing <strong> -- require "nixio.util"</strong>, can be used on all nixio IO Descriptors and -- are based on the shared low-level read() and write() functions. -- @cstyle instance mo...
apache-2.0
chelog/brawl
gamemodes/brawl/gamemode/modules/base/modes/squad_dm/sv_mode.lua
1
3144
function MODE:Think() if GetGlobalInt( "brawl.RoundState" ) == 0 then SetGlobalInt( "brawl.Rounds", 0 ) brawl.NewRound() end if GetGlobalInt( "brawl.RoundState" ) < 3 then for _, k in pairs( self.teams ) do if team.GetScore( k ) >= self.maxKills then brawl.EndRound({ winner = k }) end en...
gpl-3.0
qq779089973/ramod
luci/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
69
2769
--[[ Luci statistics - interface 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....
mit
mamadtnt/ya
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
LaFamiglia/Illarion-Content
item/id_3076_coppercoins.lua
1
1846
--[[ 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
23maverick23/hammerspoon-config
modules/layouts.lua
1
2220
-- Main grid methods local layouts = {} -- Define monitor names for layout purposes local display_home = "f.lux profile" local display_laptop = "Color LCD" local display_monitor = "Thunderbolt Display" -- Define window layouts -- Format reminder: -- {"App name", "Window name", "Display Name", "unitrect", "fra...
mit
AIUbi/2D-vector-for-Lua
vector2.lua
1
3032
local META = {} META = { __index = function(tbl, key) return META[key] end, __unm = function(lhs) return vec2(-lhs.x, lhs.y) end, __add = function(lhs, rhs) return vec2(lhs.x + (rhs.x or rhs), lhs.y + (rhs.y or rhs)) end, __sub = function(lhs, rhs) return vec2(lhs.x - (rhs.x or rhs), lhs.y - (rhs.y or rhs)) end, ...
gpl-2.0
skatsuta/aerospike-training
book/answers/Aggregations/Java/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/answers/Queries/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/answers/Aggregations/C#/AerospikeTraining/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/Queries/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
enulex/skynet
examples/agent.lua
65
2082
local skynet = require "skynet" local netpack = require "netpack" local socket = require "socket" local sproto = require "sproto" local sprotoloader = require "sprotoloader" local WATCHDOG local host local send_request local CMD = {} local REQUEST = {} local client_fd function REQUEST:get() print("get", self.what) ...
mit
Godfather021/yag
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
Noltari/luci
applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua
9
7370
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com> -- Licensed to the public under the Apache License 2.0. local m, s, o require "luci.util" m = Map("nut_monitor", translate("Network UPS Tools (Monitor)"), translate("Network UPS Tools Monitoring Configuration")) s = m:section(NamedSection, "upsmon", ...
apache-2.0
MustaphaTR/OpenRA
mods/ra/maps/evacuation/evacuation.lua
7
11136
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you 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 vers...
gpl-3.0
cvondrick/soundnet
main_train.lua
1
8577
require 'torch' require 'nn' require 'optim' -- to specify these at runtime, you can do, e.g.: -- $ lr=0.001 th main.lua opt = { dataset = 'audio', -- indicates what dataset load to use (in data.lua) nThreads = 40, -- how many threads to pre-fetch data batchSize = 64, -- self-explanatory loadS...
mit
bsmr-games/lipsofsuna
data/lipsofsuna/main/messaging.lua
1
6978
--- Implements communications between the server and the client. -- -- 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 ve...
gpl-3.0
Hzj-jie/koreader-base
spec/unit/md5_spec.lua
4
1050
describe("MD5 module", function() local md5 setup(function() md5 = require("ffi/MD5") end) it("should calculate correct MD5 hashes", function() assert.is_equal(md5.sum(""), "d41d8cd98f00b204e9800998ecf8427e") assert.is_equal(md5.new():sum("\0"), "93b885adfe0da089cdf634904fd59f...
agpl-3.0
dismantl/luci-0.12
applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
80
1397
--[[ Luci configuration model for statistics - collectd ping 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 License ...
apache-2.0
qq779089973/ramod
luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
80
1397
--[[ Luci configuration model for statistics - collectd ping 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 License ...
mit
bsmr-games/lipsofsuna
data/lipsofsuna/core/messaging/messages/walk.lua
1
1130
-- 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. Main.messaging:register_message{ name = "walk", client_to_...
gpl-3.0
ramindel0761/setdelete
libs/fakeredis.lua
650
40405
local unpack = table.unpack or unpack --- Bit operations local ok,bit if _VERSION == "Lua 5.3" then bit = (load [[ return { band = function(x, y) return x & y end, bor = function(x, y) return x | y end, bxor = function(x, y) return x ~ y end, bnot = function(x) return ~x end, rshift = function(x...
gpl-3.0
tsharly/TSHARLY
libs/fakeredis.lua
650
40405
local unpack = table.unpack or unpack --- Bit operations local ok,bit if _VERSION == "Lua 5.3" then bit = (load [[ return { band = function(x, y) return x & y end, bor = function(x, y) return x | y end, bxor = function(x, y) return x ~ y end, bnot = function(x) return ~x end, rshift = function(x...
gpl-2.0
chelog/brawl
addons/brawl-weapons/lua/cw/client/cw_hud.lua
1
1033
CustomizableWeaponry.ITEM_PACKS_TOP_COLOR = Color(0, 200, 255, 255) local noDraw = {CHudAmmo = true, CHudSecondaryAmmo = true, CHudHealth = true, CHudBattery = true} local noDrawAmmo = {CHudAmmo = true, CHudSecondaryAmmo = true} local wep, ply local function CW_HUDShouldDraw(n) local customHud = ...
gpl-3.0
LaFamiglia/Illarion-Content
monster/base/spells/heal.lua
1
5407
--[[ 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