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 |
|---|---|---|---|---|---|
tommo/mock | character/TrackEffect.lua | 2 | 4525 | module 'character'
local function fixpath(p)
p=string.gsub(p,'\\','/')
return p
end
local function stripExt(p)
return string.gsub( p, '%..*$', '' )
end
local function stripDir(p)
p=fixpath(p)
return string.match(p, "[^\\/]+$")
end
--------------------------------------------------------------------
CLASS: Even... | mit |
blackzw/openwrt_sdk_dev1 | staging_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx/usr/lib/lua/luci/template.lua | 6 | 3106 | --[[
LuCI - Template Parser
Description:
A template parser supporting includes, translations, Lua code blocks
and more. It can be used either as a compiler or as an interpreter.
FileId: $Id: template.lua 9558 2012-12-18 13:58:22Z jow $
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apa... | gpl-2.0 |
RebootRevival/FFXI_Test | scripts/zones/Port_Jeuno/npcs/Guddal.lua | 3 | 2241 | -----------------------------------
-- Area: Port Jeuno
-- NPC: Guddal
-- Starts and Finishes Quest: Kazham Airship Pass (This quest does not appear in your quest log)
-- @zone 246
-- !pos -14 8 44
-----------------------------------
package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil;
----------------------------... | gpl-3.0 |
shahabsaf1/fucker | 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 |
dromozoa/dromozoa-commons | dromozoa/commons/murmur_hash3.lua | 2 | 2751 | -- Copyright (C) 2015,2017 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-commons.
--
-- dromozoa-commons 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 Li... | gpl-3.0 |
handsomecheung/miniKanren.lua | num.lua | 1 | 6166 | local MK = require("mk")
local eq = MK.eq
local not_eq = MK.not_eq
local all = MK.all
local alli = MK.alli
local condi = MK.condi
local cond = MK.cond
local fresh_vars = MK.fresh_vars
local E = require("extend")
local nullo = E.nullo
local pairo = E.pairo
local cdro = E.cdro
local function full_addero(b, x, y, r, c)
... | mit |
liruqi/bigfoot | Interface/AddOns/DBM-SiegeOfOrgrimmarV2/IronJuggernaut.lua | 1 | 11057 | local mod = DBM:NewMod(864, "DBM-SiegeOfOrgrimmarV2", nil, 369)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
mod:SetRevision(("$Revision: 11360 $"):sub(12, -3))
mod:SetCreatureID(71466)
mod:SetEncounterID(1600)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"S... | mit |
liruqi/bigfoot | Interface/AddOns/MeetingStone/Cache/DataCache.lua | 1 | 2673 |
BuildEnv(...)
Data = Addon:NewClass('Data')
DataCache = Addon:NewModule('DataCache', 'AceSerializer-3.0')
function Data:Constructor(key)
if type(key) ~= 'string' then
error(([[bad argument #1 to 'New' (string expected, got %s)]]):format(type(key)), 3)
end
self.key = key
end
function... | mit |
Electrovirus/Griffin | bot/bot.lua | 3 | 8049 | 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")
require("./bot/permissions")
local f = assert(io.popen('/usr/bin/git describe --tags', 'r'))
VERSION = assert(f:read('*a'))
f:... | gpl-2.0 |
soumith/fblualib | fblualib/debugger/fb/debugger/utils.lua | 6 | 2585 | --
-- Copyright (c) 2014, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
local pl = requ... | bsd-3-clause |
gastrodia/awesome | lib/awful/widget/progressbar.lua | 2 | 6920 | ---------------------------------------------------------------------------
--- A progressbar widget.
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @classmod awful.widget.progressbar
--------------------------------------------------------------... | gpl-2.0 |
Unknown8765/SpeedBot | plugins/get.lua | 613 | 1067 | local function get_variables_hash(msg)
if msg.to.type == 'chat' then
return 'chat:'..msg.to.id..':variables'
end
if msg.to.type == 'user' then
return 'user:'..msg.from.id..':variables'
end
end
local function list_variables(msg)
local hash = get_variables_hash(msg)
if hash then
local names =... | gpl-2.0 |
bdowning/lj-cdefdb | ljclang/mgrep.lua | 1 | 3508 | #!/usr/bin/env luajit
-- mgrep.lua -- Search for named member accesses.
local io = require("io")
local os = require("os")
local table = require("table")
local cl = require("ljclang")
local print = print
----------
local function printf(fmt, ...)
print(string.format(fmt, ...))
end
local function errprintf(fmt,... | mit |
Yonaba/Algorithm-Implementations | Knuth_Morris_Pratt/Lua/Yonaba/kmp.lua | 26 | 1219 | -- Knuth-Morris-Pratt string searching algorithm implementation
-- See: http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
local function kmp_table(pattern)
local result = {}
for i = 1, #pattern+1,1 do
local j = i
while true do
if j == 1 then
result[#result + 1] = 1
... | mit |
sriducati/sipml5 | asterisk/etc/extensions.lua | 317 | 5827 |
CONSOLE = "Console/dsp" -- Console interface for demo
--CONSOLE = "DAHDI/1"
--CONSOLE = "Phone/phone0"
IAXINFO = "guest" -- IAXtel username/password
--IAXINFO = "myuser:mypass"
TRUNK = "DAHDI/G2"
TRUNKMSD = 1
-- TRUNK = "IAX2/user:pass@provider"
--
-- Extensions are expected to be defined in a global table ... | bsd-3-clause |
Rinnegatamante/Big_Red_Menu | source/index.lua | 1 | 120465 | title_list = {
-- System stuffs
{"TWL_FIRM","CTR-P-CTAP",0x00000102},
{"NATIVE_FIRM","CTR-P-CTAP",0x00000002},
{"SAFE_MOE_FIRM","CTR-P-CTAP",0x00000003},
{"AGB_FIRM","CTR-P-CTAP",0x00000202},
{"Dummy File","N/A",0x00010802},
{"ClCertA","N/A",0x00010002},
{"NS CFA","N/A",0x00010702},
... | gpl-3.0 |
johannes-mueller/ardour | scripts/notch_bank.lua | 2 | 4042 | ardour {
["type"] = "dsp",
name = "a-Notch Bank",
category = "Filter",
license = "MIT",
author = "Ardour Lua Task Force",
description = [[Notch Filter Bank; useful to remove noise with a harmonic spectum (e.g, mains hum, GSM signals, charge-pump noise, etc).
Note: this plugin is not suitable... | gpl-2.0 |
deepforge-dev/deepforge | test/unit/test-cases/code/alexnetowt.lua | 2 | 1656 | require 'nn'
-- thanks to https://github.com/soumith/imagenet-multiGPU.torch for this example
nGPU = 4
nClasses = 5
-- from https://code.google.com/p/cuda-convnet2/source/browse/layers/layers-imagenet-1gpu.cfg
-- this is AlexNet that was presented in the One Weird Trick paper. http://arxiv.org/abs/1404.5997
local featu... | apache-2.0 |
whiver/ntui | zoetrope/sprites/emitter.lua | 7 | 6061 | -- Class: Emitter
-- An emitter periodically emits sprites with varying properties --
-- for example, velocity. These are set with the emitter's min and
-- max properties. For example, you could set the x velocity of
-- particles to range between -100 and 100 with these statements:
--
-- > emitter.min.velocity.x = -100... | gpl-3.0 |
liruqi/bigfoot | Interface/AddOns/DBM-AntorusBurningThrone/localization.tw.lua | 1 | 3779 | if GetLocale() ~= "zhTW" then return end
local L
---------------------------
-- Garothi Worldbreaker --
---------------------------
L= DBM:GetModLocalization(1992)
---------------------------
-- Hounds of Sargeras --
---------------------------
L= DBM:GetModLocalization(1987)
L:SetOptionLocalization({
... | mit |
liruqi/bigfoot | Interface/AddOns/DBM-Party-Legion/DarkheartThicket/Oakheart.lua | 1 | 2330 | local mod = DBM:NewMod(1655, "DBM-Party-Legion", 2, 762)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 17077 $"):sub(12, -3))
mod:SetCreatureID(103344)
mod:SetEncounterID(1837)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_CAST_START 204666 204646 204574 204667"
)... | mit |
Hosseiin138yz/sam | bot/utils.lua | 473 | 24167 | 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")()
JSON = (loadfile "./libs/... | gpl-2.0 |
Beagle/wesnoth | host.lua | 26 | 2733 | -- host.lua --
-- Try to host a game called "Test"
local function plugin()
local function log(text)
std_print("host: " .. text)
end
local counter = 0
local events, context, info
local helper = wesnoth.require("lua/helper.lua")
local function idle_text(text)
counter = counter + 1
if counter... | gpl-2.0 |
soumith/fblualib | fblualib/debugger/fb/debugger/init.lua | 4 | 23555 | --
-- Copyright (c) 2014, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
local pl = requ... | bsd-3-clause |
devm11/DEV_M1 | data/config.lua | 1 | 1335 | do local _ = {
about_text = "🔺Welcome to TH3BOSS v5 For more information Subscribe to the channel @llDEV1lln\n https://github.com/moody2020/TH3BOSS\n\n🔺Dev @TH3BOSS\n\n🔺 Dev Bot @ll60Kllbot\n\n🔺Dev channel @llDEV1ll",
enabled_plugins = {
"badword",
"admin",
"ingroup",
"stats",
"anti_spam",... | gpl-2.0 |
liruqi/bigfoot | Interface/AddOns/BigFoot/AceLibs/Ace3/AceGUI-3.0/AceGUI-3.0.lua | 11 | 24487 | --- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
-- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
-- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
-- stand-alone distribution.
--
-- **No... | mit |
gastrodia/awesome | lib/awful/placement.lua | 4 | 9674 | ---------------------------------------------------------------------------
--- Places client according to special criteria.
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008 Julien Danjou
-- @release @AWESOME_VERSION@
-- @module awful.placement
--------------------------------------------------... | gpl-2.0 |
ingran/balzac | custom_feeds/teltonika_luci/applications/luci-admin_system/luasrc/controller/admin/system.lua | 1 | 15985 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-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
htt... | gpl-2.0 |
liruqi/bigfoot | Interface/AddOns/BigFoot/Config/TradeHelper.lua | 1 | 3191 |
function TradeHelperConfigFunc()
if (GetLocale() == "zhCN") then
MOD_TRADE_HELPER_TITLE = {"交易助手", "jiaoyizhushou"}
TRADE_HELPER_ENABLE_TEXT = "开启交易助手"
TRADE_HELPER_ENABLE_TEXT_TOOLTIP="对交易物品进行提示,并可在小地图按键包中的交易助手显示详细交易记录"
TRADE_HELPER_DISABLE_DELAY_TEXT = "|cff00c0c0<交易助手>|r 你已经关闭交易助手模块,该设置将在下次插件载入时生效。";... | mit |
mario0582/devenserver | data/talkactions/scripts/kills.lua | 43 | 1370 | function onSay(player, words, param)
local fragTime = configManager.getNumber(configKeys.FRAG_TIME)
if fragTime <= 0 then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
return false
end
local skullTime = player:getSkullTime()
if skullTime <= 0 then
player:sendTe... | gpl-2.0 |
benagricola/spacesaving | test.lua | 1 | 1584 | local ffi = require("ffi")
C = ffi.load("rt", true)
ffi.cdef[[
typedef long time_t;
typedef int clockid_t;
typedef struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
} nanotime;
int clock_gettime(clockid_t clk_id, struct time... | bsd-2-clause |
dromozoa/dromozoa-commons | test/test_translate_range.lua | 3 | 1186 | -- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-commons.
--
-- dromozoa-commons 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... | gpl-3.0 |
amirfucker/merbot | bot/utils.lua | 28 | 14994 | 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")()
JSON = (loadfile "./libs/... | gpl-2.0 |
opticron/asterisk-testsuite-temporary | asttest/lib/lua/proclib.lua | 5 | 1781 | --
-- Asterisk -- An open source telephony toolkit.
--
-- Copyright (C) 1999 - 2008, Digium, Inc.
--
-- Matthew Nicholson <mnicholson@digium.com>
--
-- See http://www.asterisk.org for more information about
-- the Asterisk project. Please do not directly contact
-- any of the maintainers of this project for assistance;... | gpl-2.0 |
Capibara-/cardpeek | dot_cardpeek_dir/scripts/calypso/c376n3.lua | 15 | 44100 | --
-- This file is part of Cardpeek, the smart card reader utility.
--
-- Copyright 2009-2013 by Alain Pannetrat <L1L1@gmx.com>
--
-- Cardpeek 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... | gpl-3.0 |
526avijitgupta/MozDef | examples/heka-lua-bro/bro_ssl.lua | 8 | 4127 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-- Copyright (c) 2014 Mozilla Corporation
--
-- Contributors:
-- Anthony Verez averez@mozilla.com
-- Jeff Bryner jbryn... | mpl-2.0 |
shiprabehera/kong | spec/01-unit/004-utils_spec.lua | 4 | 23150 | local utils = require "kong.tools.utils"
describe("Utils", function()
describe("get_hostname()", function()
it("should retrieve the hostname", function()
assert.is_string(utils.get_hostname())
end)
end)
describe("get_system_infos()", function()
it("retrieves various host infos", function()
... | apache-2.0 |
hadirahimi1380/AhrimanBot | plugins/stats.lua | 866 | 4001 | do
-- Returns a table with `name` and `msgs`
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_prin... | gpl-2.0 |
johannes-mueller/ardour | scripts/ltc_reader.lua | 2 | 2151 | ardour {
["type"] = "dsp",
name = "LTC Reader",
category = "Utility",
author = "Ardour Team",
license = "MIT",
description = [[Linear Timecode Decoder with mixer strip inline display]]
}
function dsp_ioconfig ()
return { { audio_in = 1, audio_out = 1}, }
end
function dsp_init (rate)
time... | gpl-2.0 |
BeaconNet/sPhone | src/sPhone.lua | 3 | 38897 | local function kernel(...)
_G.sPhone = {
version = "Beta 1.2.2",
user = "Guest",
devMode = false,
mainTerm = term.current(),
safeMode = false,
}
if safemode then
sPhone.safeMode = true
safemode = nil
end
sPhone.defaultApps = {
["home"] = "sphone.home",
}
sPhone.theme = { --Default colors
... | mit |
johannes-mueller/ardour | scripts/s_region_gain.lua | 1 | 2423 | ardour { ["type"] = "Snippet", name = "Set Region Gain" }
function factory () return function ()
-- get Editor GUI Selection
-- http://manual.ardour.org/lua-scripting/class_reference/#ArdourUI:Selection
local sel = Editor:get_selection ()
-- allocate a buffer (float* in C)
-- http://manual.ardour.org/lua-scripti... | gpl-2.0 |
dsoulayrol/flaw | alsa.lua | 1 | 8423 | -- flaw, a Lua OO management framework for Awesome WM widgets.
-- Copyright (C) 2010,2011 David Soulayrol <david.soulayrol AT gmail DOT net>
-- 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, e... | gpl-3.0 |
liruqi/bigfoot | Interface/AddOns/DBM-Party-Legion/NeltharionsLair/NLTrash.lua | 1 | 1321 | local mod = DBM:NewMod("NLTrash", "DBM-Party-Legion", 5)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 17204 $"):sub(12, -3))
--mod:SetModelID(47785)
mod:SetZone()
mod.isTrashMod = true
mod:RegisterEvents(
"SPELL_CAST_START 183088",
"SPELL_AURA_APPLIED 200154 183407"
)
local warn... | mit |
Lexicality/slide | gamemode/player_class/class_default.lua | 1 | 5692 | --[[
Slide - gamemode/player_class/class_default.lua
Copyright 2017-2020 Lex Robinson
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/LICENS... | apache-2.0 |
mario0582/devenserver | data/talkactions/scripts/prision.lua | 2 | 3560 | jailedstoragevalue_time = 1338
jailedstoragevalue_bool = 1339
local jailpos = {
[1] = {x = 59, y = 52, z =6},
[2] = {x = 59, y = 52, z =5},
[3] = {x = 55, y = 47, z =6},
[4] = {x = 55, y = 47, z =5},
[5] = {x = 55, y = 52, z =6},
[6] = {x = 55, y = 52, z =5},
[7] = {x = 59, y = 47, z =5},
[8] = {x = 63, y = 52... | gpl-2.0 |
shiprabehera/kong | kong/plugins/datadog/migrations/postgres.lua | 5 | 2444 | return {
{
name = "2017-06-09-160000_datadog_schema_changes",
up = function(_, _, dao)
local plugins, err = dao.plugins:find_all { name = "datadog" }
if err then
return err
end
local default_metrics = {
request_count = {
name = "request_count",
... | apache-2.0 |
liruqi/bigfoot | Interface/AddOns/DBM-GarrisonInvasions/LadyFleshsear.lua | 1 | 1887 | local mod = DBM:NewMod("LadyFleshsear", "DBM-GarrisonInvasions")
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 13864 $"):sub(12, -3))
mod:SetCreatureID(91012)
mod:SetZone()
mod:RegisterCombat("combat")
mod:SetMinCombatTime(15)
mod:RegisterEventsInCombat(
"SPELL_CAST_START 180779",
"... | mit |
borromeotlhs/nodemcu-firmware | lua_examples/yet-another-dht22.lua | 65 | 2195 | ------------------------------------------------------------------------------
-- DHT11/22 query module
--
-- LICENCE: http://opensource.org/licenses/MIT
-- Vladimir Dronnikov <dronnikov@gmail.com>
--
-- Example:
-- print("DHT11", dofile("dht22.lua").read(4))
-- print("DHT22", dofile("dht22.lua").read(4, true))
-- NB: ... | mit |
Yonaba/Algorithm-Implementations | Rabin_Karp/Lua/Yonaba/rabin_karp.lua | 26 | 1376 | -- Rabin-Karp string searching algorithm implementation
-- See: http://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_string_search_algorithm
-- Note: This implementation is based on the Python implementation of Shivam Bansal
-- See : https://github.com/kennyledet/Algorithm-Implementations/blob/master/Rabin_Karp/Python/shiv... | mit |
liruqi/bigfoot | Interface/AddOns/Masque/Skins/Zoomed.lua | 1 | 1837 | --[[
This file is part of 'Masque', an add-on for World of Warcraft. For license information,
please see the included License.txt file.
* File.....: Skins\Zoomed.lua
* Revision.: 384
* Author...: JJSheets, StormFX
'Zoomed' skin for Masque.
]]
local _, Core = ...
Core:AddSkin("Zoomed", {
Author ... | mit |
Xusine1131/QSanguosha-DGAH | lang/zh_CN/Package/StandardGeneralsPackage.lua | 1 | 4383 | -- translation for Standard General Package
return {
["standard"] = "标准版",
["standard_generals"] = "审核包",
-- 稻草人(2上限)
["scarecrow_ii"] = "稻草人II",
["&scarecrow_ii"] = "稻草人",
["#scarecrow_ii"] = "审核员",
["illustrator:scarecrow2"] = "网络资源",
-- 赵云
["#zhaoyun"] = "虎威将军",
["zhaoyun"] = "赵云",
["illustrator:zhaoy... | gpl-3.0 |
paintdream/VSCodeTypedLua | typedlua/core/typedlua/tlcode.lua | 1 | 9729 | --[[
This file implements the code generator for Typed Lua
]]
local tlcode = {}
local code_block, code_stm, code_exp, code_var
local code_explist, code_varlist
local function spaces (fmt)
return string.rep(" ", 2 * fmt.indent)
end
local function indent (s, fmt)
return spaces(fmt) .. s
end
local function iscntrl... | mit |
shiprabehera/kong | kong/api/routes/kong.lua | 4 | 3267 | local utils = require "kong.tools.utils"
local singletons = require "kong.singletons"
local conf_loader = require "kong.conf_loader"
local sub = string.sub
local find = string.find
local ipairs = ipairs
local select = select
local tonumber = tonumber
local tagline = "Welcome to " .. _KONG._NAME
local version = _KONG.... | apache-2.0 |
liruqi/bigfoot | Interface/AddOns/DBM-DragonSoul/localization.cn.lua | 1 | 10239 | -- Simplified Chinese by Diablohu(diablohudream@gmail.com)
-- Last update: 2/25/2012
if GetLocale() ~= "zhCN" then return end
local L
-------------
-- Morchok --
-------------
L= DBM:GetModLocalization(311)
L:SetWarningLocalization({
KohcromWarning = "%s: %s"--Bossname, spellname. At least with this... | mit |
liruqi/bigfoot | Interface/AddOns/DBM-Firelands/FandralStaghelm.lua | 1 | 9668 | local mod = DBM:NewMod(197, "DBM-Firelands", nil, 78)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
mod:SetRevision(("$Revision: 79 $"):sub(12, -3))
mod:SetCreatureID(52571)
mod:SetZone()
mod:SetUsedIcons(8)
mod:SetModelSound("Sound\\Creature\\FandralFlameDruid\\VO_FL_FANDRAL_GATE... | mit |
borromeotlhs/nodemcu-firmware | lua_modules/dht_lib/dht_lib.lua | 51 | 4895 | -- ***************************************************************************
-- DHTxx(11,21,22) module for ESP8266 with nodeMCU
--
-- Written by Javier Yanez mod by Martin
-- but based on a script of Pigs Fly from ESP8266.com forum
--
-- MIT license, http://opensource.org/licenses/MIT
-- *****************************... | mit |
kaen/sutratman | mods/default/aliases.lua | 5 | 4068 | -- mods/default/aliases.lua
-- Aliases to support loading worlds using nodes following the old naming convention
-- These can also be helpful when using chat commands, for example /giveme
minetest.register_alias("stone", "default:stone")
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
minetest.re... | mit |
kaen/sutratman | mods/default/furnace.lua | 5 | 7955 |
--
-- Formspecs
--
local function active_formspec(fuel_percent, item_percent)
local formspec =
"size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[current_name;src;2.75,0.5;1,1;]"..
"list[current_name;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[l... | mit |
telegrambot81/supergrup | plugins/Time.lua | 120 | 2804 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
Beagle/wesnoth | data/ai/micro_ais/cas/ca_hunter.lua | 26 | 8246 | local H = wesnoth.require "lua/helper.lua"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local function hunter_attack_weakest_adj_enemy(ai, hunter)
-- Attack the enemy with the fewest hitpoints adja... | gpl-2.0 |
AngelBaltar/RenegadeKlingon | GameFrameWork/PilotPatterns/RandomPilotPattern.lua | 1 | 2889 | -- /* RenegadeKlingon - LÖVE2D GAME
-- * RandomPilotPattern.lua
-- * Copyright (C) Angel Baltar Diaz
-- *
-- * 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... | gpl-3.0 |
whiver/ntui | zoetrope/core/sprite.lua | 2 | 13480 | -- Class: Sprite
-- A sprite receives all update-related events and draws
-- itself onscreen with its draw() method. It is defined
-- by a rectangle; nothing it draws should be outside that
-- rectangle.
--
-- In most cases, you don't want to create a sprite directly.
-- Instead, you'd want to use a subclass tailored t... | gpl-3.0 |
liruqi/bigfoot | Interface/AddOns/Gladius/modules/trinket.lua | 1 | 27640 | local Gladius = _G.Gladius
if not Gladius then
DEFAULT_CHAT_FRAME:AddMessage(format("Module %s requires Gladius", "Trinket"))
end
local L = Gladius.L
local LSM
-- Global Functions
local _G = _G
local pairs = pairs
local strfind = string.find
local strformat = string.format
local CreateFrame = CreateFra... | mit |
liruqi/bigfoot | Interface/AddOns/Skada/modules/Threat.lua | 2 | 12117 |
Skada:AddLoadableModule("Threat", nil, function(Skada, L)
if Skada.db.profile.modulesBlocked.Threat then return end
local media = LibStub("LibSharedMedia-3.0")
-- This mode is a bit special.
local mod = Skada:NewModule(L["Threat"])
local CLIENT_VERSION = tonumber((select(4, GetBuildInfo())))
local... | mit |
mannby/gfx.js | clients/torch/js.lua | 4 | 13146 | --
-- A client to gfx.js
--
require 'image'
require 'pl'
local json = require 'cjson'
local Template = require('pl.text').Template
local gm = require 'graphicsmagick'
text.format_operator()
local js = {}
js.static = os.getenv('HOME') .. '/.gfx.js/static/data/'
js.template = os.getenv('HOME') .. '/.gfx.js/templates/'... | mit |
nurv/lirec | scenarios/MyFriend/MyPleo/tags/version-1.05/workspace/viPleoShivaModule/Resources/Scripts/MyPleoAI_State_Eating_onLeave.lua | 2 | 1029 | --------------------------------------------------------------------------------
-- State............ : Eating
-- Authors.......... : Tiago Paiva and Paulo F. Gomes
-- Description...... : Updates the energy need and schedules a poop creation.
--------------------------------------------------------------------------... | gpl-3.0 |
liruqi/bigfoot | Interface/AddOns/Collector/Module/PlanPanel.lua | 1 | 9686 |
BuildEnv(...)
PlanPanel = Addon:NewModule(CreateFrame('Frame'), 'PlanPanel', 'AceEvent-3.0', 'AceHook-3.0', 'AceBucket-3.0', 'AceTimer-3.0', 'LibInvoke-1.0')
PlanPanel:Hide()
function PlanPanel:OnEnable()
self:SetParent(CollectionsJournal)
GUI:Embed(self, 'Refresh')
self:Hide()
self:SetPo... | mit |
SIDN/spin | src/lua/mio.lua | 1 | 8610 | --
-- Wrapper for posix commands, with some more
-- advanced and some more specific functions than
-- luaposix (such as full pipe control)
--
local posix = require 'posix'
local bit = require 'bit'
local mio = {}
--
-- This modules contains wrappers around the posix library
-- for easier reading of files and runnin... | gpl-2.0 |
kaen/sutratman | mods/stm/misc_helpers.lua | 1 | 8053 | -- Minetest: builtin/misc_helpers.lua
--------------------------------------------------------------------------------
-- Localize functions to avoid table lookups (better performance).
local string_sub, string_find = string.sub, string.find
----------------------------------------------------------------------------... | mit |
RUlanowicz/MyBreakout | cocos2d/external/lua/luajit/src/src/host/genminilua.lua | 73 | 11943 | ----------------------------------------------------------------------------
-- Lua script to generate a customized, minified version of Lua.
-- The resulting 'minilua' is used for the build process of LuaJIT.
----------------------------------------------------------------------------
-- Copyright (C) 2005-2013 Mike P... | gpl-2.0 |
liruqi/bigfoot | Interface/AddOns/Bagnon/libs/Sushi-3.0/Classes/ButtonBase.lua | 1 | 1463 | --[[
Copyright 2008-2016 João Cardoso
Sushi is distributed under the terms of the GNU General Public License (or the Lesser GPL).
This file is part of Sushi.
Sushi 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 Found... | mit |
ingran/balzac | custom_feeds/teltonika_luci/libs/web/luasrc/i18n.lua | 5 | 3888 | --[[
LuCI - Internationalisation
Description:
A very minimalistic but yet effective internationalisation module
FileId:
$Id: i18n.lua 5446 2009-10-31 15:42:07Z jow $
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file ex... | gpl-2.0 |
Lexicality/slide | entities/entities/slide_rundata/cl_init.lua | 1 | 3055 | --[[
Slide - entities/slide_rundata/cl_init.lua
Copyright 2017 Lex Robinson
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
... | apache-2.0 |
liruqi/bigfoot | Interface/AddOns/DBM-Party-WoD/BloodmaulSlagMines/Gugrokk.lua | 1 | 2948 | local mod = DBM:NewMod(889, "DBM-Party-WoD", 2, 385)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15007 $"):sub(12, -3))
mod:SetCreatureID(74790)
mod:SetEncounterID(1654)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_CAST_START 150677 150784 150755",
"SPELL_AURA... | mit |
codership/sysbench | src/lua/update_blob.lua | 1 | 1313 | -- Copyright (C) Codership Oy <info@codership.com>
--
-- A benchmark to run updates on text/blob column in order
-- to generate large write sets.
function help()
print("A benchmark to run updates on text/blob column in order")
print("to generate large write sets. Each event corresponds to")
print("two updates... | gpl-2.0 |
codership/sysbench | third_party/luajit/luajit/src/host/genminilua.lua | 47 | 12039 | ----------------------------------------------------------------------------
-- Lua script to generate a customized, minified version of Lua.
-- The resulting 'minilua' is used for the build process of LuaJIT.
----------------------------------------------------------------------------
-- Copyright (C) 2005-2017 Mike P... | gpl-2.0 |
liruqi/bigfoot | Interface/AddOns/BigFootBar/Bindings.lua | 1 | 33709 | --=============================================================================
-- 大脚动作条按键绑定
--=============================================================================
-- NULL_FUNCTION = function() end
if (GetLocale() == "zhCN") then
BINDING_HEADER_BIGFOOTBAR1 = "大脚1号动作条";
_G["BINDING_NAME_CLICK BigFootBar... | mit |
ld-test/luaunit | use_luaunit.lua | 1 | 2519 | #!/usr/bin/env lua
local LuaUnit = require('luaunit')
TestToto = {} --class
function TestToto:setUp()
-- set up tests
self.a = 1
self.s = 'hop'
end
function TestToto:test1_withFailure()
print( "some stuff test 1" )
assertEquals( self.a , 1 )
-- will fail
assertEqua... | mit |
ingran/balzac | custom_feeds/teltonika_luci/contrib/luadoc/lua/luadoc/taglet/standard.lua | 93 | 16319 | -------------------------------------------------------------------------------
-- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $
-------------------------------------------------------------------------------
local assert, pairs, tostring, type = assert, pairs, tostring, type
local io = require "io... | gpl-2.0 |
MaliceTurtle/gamecode4 | Extra/UtilityDemo/utility.lua | 44 | 7963 | -- Utility.lua
-- A simple utility game
-- A "better" random seed. This was taken from http://lua-users.org/wiki/MathLibraryTutorial
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1,6)))
----------------------------------------------------------------------------------------------------------------... | lgpl-3.0 |
Yonaba/Algorithm-Implementations | Bogosort/Lua/Yonaba/bogosort.lua | 27 | 1070 | -- A custom array shuffle implementation
-- This is not part of the Bogosort algorithm
local function shuffle(list)
local n = #list
for i = 1, n do
local j, k = math.random(1,n), math.random(1,n)
list[j], list[k] = list[k], list[j]
end
return list
end
-- Checks if an array is sorted
local function is_sorted... | mit |
wdicarlo/wlog | examples/classic/classic/Class.lua | 2 | 17772 | local classic = assert(classic, 'metaclass should not be required directly')
-- Argument checking: check that self was correctly passed.
local function checkSelf(self, name)
if type(self) ~= 'table' then
error(name .. "() must be called on a class. Did you forget the colon?", 3)
end
end
-- Argument checking: ... | mit |
liruqi/bigfoot | Interface/AddOns/MySlot/libs/lua-pb/pb/standard/repeated.lua | 1 | 2859 | -- Copyright (c) 2011, Robert G. Jakabosky <bobby@sharedrealm.com> All rights reserved.
local _M = LibStub:NewLibrary("pblua.repeated", 1)
local concat = table.concat
local setmetatable = setmetatable
local rawset = rawset
local repeated_tag = {}
local function new_message_repeated(field)
local new = field.new
loc... | mit |
bjornbytes/RxLua | tests/replaysubject.lua | 2 | 2758 | describe('ReplaySubject', function()
describe('create', function()
it('returns a ReplaySubject', function()
expect(Rx.ReplaySubject.create()).to.be.an(Rx.ReplaySubject)
end)
it('sets an appropriate buffer size if it is specified', function()
local subject = Rx.ReplaySubject.create(2)
lo... | mit |
Tieske/valua | valua.lua | 3 | 6650 | -- Valua 0.2.1
-- Copyright (c) 2014 Etiene Dalcol
-- License: MIT
--
-- Originally bundled with Sailor MVC Web Framework, now released as a separated module.
-- http://sailorproject.org
--
-- This module provides tools for validating values, very useful in forms, but also usable elsewhere.
-- It works in appended chai... | mit |
liruqi/bigfoot | Interface/AddOns/HPetBattleAny/Localization.lua | 1 | 12227 | local addonname,addon = ...
local bcolor = "|cff00ffff%s|r";
if GetLocale() == "zhCN" then
addon.L = {
----------Options
["HPet Options"] = "HPet 设置",
["Pet All Info"] = "宠物信息",
["Config"] = "设置",
["GrowInfo"] = "成长值",
["Loading"] = "已开启,输入%s进入设置界面",
["Battle Stone"]... | mit |
liruqi/bigfoot | Interface/AddOns/EventAlertMod/EventAlert_SpellArray.lua | 1 | 63235 |
-- Prevent tainting global _.
local _
local _G = _G
local function CopyTable(SrcTable)
local TarTable = {};
for sKey, sValue in pairs(SrcTable) do
if type(sValue) == "table" then
TarTable[sKey] = {};
TarTable[sKey] = CopyTable(sValue);
else
TarTable[sKey] = sValue;
end
end
return Ta... | mit |
ingran/balzac | package/coova-chilli/src/doc/landing_page_functions.lua | 1 | 8859 | require("uci")
uci = uci.cursor()
fs = require "luci.fs"
string = require('string')
find = string.find
gsub = string.gsub
char = string.char
byte = string.byte
format = string.format
match = string.match
gmatch = string.gmatch
md5 = require"md5"
bit = require"bit"
function get_values(config, section, option)
local t... | gpl-2.0 |
Datamats/ServerContent | notagain/lua/notagain/essential/libraries/bsp.lua | 3 | 8476 | -- this was taken from
-- http://steamcommunity.com/sharedfiles/filedetails/?id=160087429
-- which was made by Silverlan
-- http://steamcommunity.com/profiles/76561197967919092
local SIZEOF_INT = 4
local SIZEOF_SHORT = 2
local function toUShort(b)
local i = {string.byte(b,1,SIZEOF_SHORT)}
return i[1] +i[2] *256
end
... | mit |
ingran/balzac | custom_feeds/teltonika_luci/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-format.lua | 1 | 4274 | --[[
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... | gpl-2.0 |
wdicarlo/wlog | wlog_plugin_mock.lua | 1 | 2729 |
local mock_plugin = {
is_wlog_plugin = true,
wlog_plugin_name = "mock plugin",
}
local enums = {
WLOG_LEVELS = {
LOG_FATAL = 1,
LOG_ERROR = 2,
LOG_WARNING = 3,
LOG_INFO = 4,
LOG_TRACE = 5,
LOG_DEBUG = 6,
},
WLOG_FUNCTS = {... | mit |
gastrodia/awesome | tests/test-urgent.lua | 5 | 3295 | --- Tests for urgent property.
awful = require("awful")
-- Some basic assertion that the tag is not marked "urgent" already.
assert(awful.tag.getproperty(tags[1][2], "urgent") == nil)
-- Setup signal handler which should be called.
-- TODO: generalize and move to runner.
local urgent_cb_done
client.connect_signal("... | gpl-2.0 |
mysmartgrid/msg-chumby-display | bin/chumbydaemon.lua | 1 | 4609 | #!/usr/bin/env lua
-- This file is part of libflukso.
--
-- (c) Mathias Dalheimer <md@gonium.net>, 2010
--
-- libflukso 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
--... | mit |
liruqi/bigfoot | Interface/AddOns/FestivalHelper/BigfootDayEvent.lua | 1 | 6912 | if GetLocale() == "zhCN" then
L_VALENTINE = "情人节"
L_SPRING = "春节"
L_RELACHIEVEMENT ="大脚提示点击查看成就:"
elseif GetLocale() == "zhTW" then
L_VALENTINE = "情人节"
L_SPRING = "春節"
L_RELACHIEVEMENT = "大腳提示點擊查看成就:"
end
t_ValentineQuestForAchi = {}
DayEvent_QuestForAchivment = {}
DayEvent_QuestForAchivment[L_VALENTINE] = Quest... | mit |
bb010g/otouto | otouto/plugins/calc.lua | 1 | 1112 | --[[
calc.lua
Runs mathematical expressions through the mathjs.org API.
Copyright 2016 topkecleon <drew@otou.to>
This code is licensed under the GNU AGPLv3. See /LICENSE for details.
]]--
local URL = require('socket.url')
local HTTPS = require('ssl.https')
local utilities = require('otouto.utilities')... | agpl-3.0 |
devm11/DEV_M1 | plugins/all.lua | 41 | 4395 | do
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_name(user)..' ['..user_id..']'
return u... | gpl-2.0 |
liruqi/bigfoot | Interface/AddOns/Skada/modules/Debuffs.lua | 2 | 14112 | Skada:AddLoadableModule("Debuffs", nil, function(Skada, L)
if Skada.db.profile.modulesBlocked.Debuffs then return end
local debuffoverview = Skada:NewModule(L["Debuffs"])
local buffoverview = Skada:NewModule(L["Buffs"])
local buffplayers = Skada:NewModule("Buff players")
local debuffplayers = Skada:NewModul... | mit |
kidanger/Chronored | hump/camera.lua | 47 | 3388 | --[[
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... | gpl-2.0 |
inTact700/VLCHotkey | share/lua/intf/dumpmeta.lua | 98 | 2125 | --[==========================================================================[
dumpmeta.lua: dump a file's meta data on stdout/stderr
--[==========================================================================[
Copyright (C) 2010 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
Th... | gpl-2.0 |
devm11/DEV_M1 | plugins/invite.lua | 43 | 1335 | do
local function callbackres(extra, success, result)
--vardump(result)
local user = 'user#id'..result.peer_id
local chat = 'chat#id'..extra.chatid
local channel = 'channel#id'..extra.chatid
if is_banned(result.id, extra.chatid) then
send_large_msg(chat, 'User is banned.')
send_large_msg(c... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.