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
willmoffat/lua-fmt
test/lua-5.3.4-tests/all.lua
5
7672
#!../lua -- $Id: all.lua,v 1.95 2016/11/07 13:11:28 roberto Exp $ -- See Copyright Notice at the end of this file local version = "Lua 5.3" if _VERSION ~= version then io.stderr:write("\nThis test suite is for ", version, ", not for ", _VERSION, "\nExiting tests\n") return end _G._ARG = arg -- save arg fo...
mit
great90/skynet
lualib/skynet/dns.lua
1
10029
--[[ lua dns resolver library See https://github.com/xjdrew/levent/blob/master/levent/dns.lua for more detail -- resource record type: -- TYPE value and meaning -- A 1 a host address -- NS 2 an authoritative name server -- MD 3 a mail destination (Obsolete - use MX...
mit
RamiLego4Game/PixelizerBox-Sandbox
Engine/SpriteSheet.lua
1
1512
--This file is part of PixelizerBox-- --[[ * Copyright 2015 RamiLego4Game * * 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
billbonney/ardupilot
Tools/CHDK-Scripts/Cannon SX260/3DR_EAI_SX260.lua
96
29666
--[[ KAP UAV Exposure Control Script v3.1 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script 3DR EAI 1.0 is a fork of KAP 3.1 with settings specific to Canon cameras triggered off the Pixhawk autopilot. Changelog: -Modified Tv, Av, and...
gpl-3.0
NerdWalletOSS/Q
ML/KMEANS/lua/check.lua
1
1638
-- https://en.wikipedia.org/wiki/K-means_clustering local Q = require 'Q' local Scalar = require 'libsclr' -- =========================================== -- nI = number of instances -- nJ = number of attributes/features -- nK = number of classes local check = {} check.means = function (means, nJ, nK) assert(nJ) a...
mit
Spring-SpringBoard/SpringBoard-Core
scen_edit/gfx/draw/draw_diffuse.lua
1
1725
function DrawDiffuse(opts, x, z, size) if not opts["diffuseEnabled"] or not opts.brushTexture.diffuse then return end local textures = SB.model.textureManager:getMapTextures(x, z, x + size, z + size) local tmps = gfx:MakeMapTextureCopies(textures) local shaderObj = getPenShader(opts.mode) ...
mit
Spring-SpringBoard/SpringBoard-Core
scen_edit/view/map/metal_editor.lua
1
3167
SB.Include(Path.Join(SB.DIRS.SRC, 'view/editor.lua')) MetalEditor = Editor:extends{} MetalEditor:Register({ name = "metalEditor", tab = "Map", caption = "Metal", tooltip = "Edit metal map", image = Path.Join(SB.DIRS.IMG, 'minerals.png'), order = 3, }) function MetalEditor:init() self:super...
mit
Oliveryo/Interface
AddOns/oCB/Libs/AceEvent-2.0/AceEvent-2.0.lua
1
28592
--[[ Name: AceEvent-2.0 Revision: $Rev: 16541 $ Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team) Inspired By: Ace 1.x by Turan (turan@gryphon.com) Website: http://www.wowace.com/ Documentation: http://www.wowace.com/index.php/AceEvent-2.0 SVN: http://svn.wowace.com/root/...
gpl-3.0
keyidadi/luci
applications/luci-radvd/luasrc/model/cbi/radvd/dnssl.lua
82
2276
--[[ 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: rdnss.lu...
apache-2.0
MaliciouZzHD/AndroidChromeCastControl
files/nmap/nselib/drda.lua
2
24317
--- -- DRDA Library supporting a very limited subset of operations. -- -- Summary -- * The library currently provides functionality to: (1) Query the server for -- basic settings using the <code>getServerInfo</code> function of the helper -- class. (2) Authenticate to a DB2 server using a plain-text username and -- pas...
gpl-3.0
TeslaCloud/TTTRewrite
terrortown/gamemode/libs/vgui/scrolllabel.lua
2
2196
--- why can't the default label scroll? welcome to gmod PANEL = {} function PANEL:Init() self.Label = vgui.Create("DLabel", self) self.Label:SetPos(0, 0) self.Scroll = vgui.Create("DVScrollBar", self) end function PANEL:GetLabel() return self.Label end function PANEL:OnMouseWheeled(dlta) if not self.S...
mit
tboox/xmake
xmake/core/base/filter.lua
1
4691
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
Oliveryo/Interface
AddOns/dpsmate/modules/DPSMate_Details_AbsorbsTakenTotal.lua
2
18933
DPSMate.Modules.DetailsAbsorbsTakenTotal = {} local g, g2 = nil,nil local curKey = 1 local db, cbt = {}, 0 local buttons = {} local ColorTable={} local _G = getglobal local tinsert = table.insert local tremove = table.remove local strformat = string.format local toggle = false local totSumTable = {} local totMax = 0 l...
gpl-3.0
FlightControl-Master/MOOSE
Moose Development/Moose/Wrapper/Client.lua
1
17249
--- **Wrapper** - CLIENT wraps DCS Unit objects acting as a __Client__ or __Player__ within a mission. -- -- === -- -- ### Author: **FlightControl** -- ### Contributions: **funkyfranky** -- -- === -- -- @module Wrapper.Client -- @image Wrapper_Client.JPG --- The CLIENT class -- @type CLIENT -- @field #string Clas...
gpl-3.0
AliKhodadad/Dark-Boys
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
eagle14/Snippy-robot
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
leftbrainstrain/cherts-esp8266-devkit
Espressif/examples/nodemcu-firmware/lua_examples/email/send_email_smtp.lua
82
4640
--- -- Working Example: https://www.youtube.com/watch?v=CcRbFIJ8aeU -- @description a basic SMTP email example. You must use an account which can provide unencrypted authenticated access. -- This example was tested with an AOL and Time Warner email accounts. GMail does not offer unecrypted authenticated access. -- To o...
gpl-3.0
Spring-SpringBoard/SpringBoard-Core
scen_edit/state/add_rect_state.lua
1
2782
AddRectState = AbstractState:extends{} function AddRectState:enterState() AbstractState.enterState(self) SB.SetGlobalRenderingFunction(function(...) self:__DrawInfo(...) end) end function AddRectState:leaveState() AbstractState.leaveState(self) SB.SetGlobalRenderingFunction(nil) end fun...
mit
keith/dotfiles
vim/plugin/setup.lua
1
3389
-- vim.lsp.set_log_level("debug") local lspconfig = require "lspconfig" local lsp_spinner = require "lsp_spinner" lsp_spinner.setup { placeholder = " ", } require("lsp-inlayhints").setup() local function on_attach(client, bufnr) require("lsp_spinner").on_attach(client, bufnr) require("lsp-inlayhints").on_att...
mit
Spring-SpringBoard/SpringBoard-Core
scen_edit/command/compound_command.lua
1
1300
--- CompoundCommand module. --- CompoundCommand class. Execute commands in sequence. -- @type CompoundCommand CompoundCommand = Command:extends{} CompoundCommand.className = "CompoundCommand" --- CompoundCommand constructor. -- Commands will be executed in sequence. In case of undo, they will be unexecuted in reverse...
mit
DSUK/OpenRA
mods/ra/maps/soviet-05/main.lua
33
8124
CheckForBase = function() baseBuildings = Map.ActorsInBox(Map.TopLeft, CFBPoint.CenterPosition, function(actor) return actor.Type == "fact" or actor.Type == "powr" end) return #baseBuildings >= 2 end CheckForCYard = function() ConYard = Map.ActorsInBox(mcvGGLoadPoint.CenterPosition, ReinfEastPoint.CenterPositio...
gpl-3.0
NerdWalletOSS/Q
UTILS/test/test_pack.lua
1
1441
local strict = require 'Q/UTILS/lua/strict' local Q = require 'Q' local qconsts = require 'Q/UTILS/lua/q_consts' local Scalar = require 'libsclr' local tests = {} -- Q.pack to return vector of given input number values tests.t1 = function() local tbl = {10,20,30,40,50} local qtype = "I1" local vec = Q.pack(tb...
mit
sysuzhang/arcemu
src/scripts/lua/Lua/Stable Scripts/Azeroth/Karazhan/BOSS_Karazhan_Shadikith.lua
30
1115
function Shadikith_Charge(Unit, event, miscunit, misc) print "Shadikith Charge" Unit:FullCastSpellOnTarget(38461,Unit:GetRandomPlayer()) Unit:SendChatMessage(11, 0, "Charge...") end function Shadikith_Sonic_Burst(Unit, event, miscunit, misc) print "Shadikith Sonic Burst" Unit:FullCastSpellOnTarget(39052,Unit:GetC...
agpl-3.0
keyidadi/luci
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/mactodevinfo.lua
80
1260
--[[ LuCI - Lua Configuration Interface (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$ ]]-- m = Map("mactodevinfo", lu...
apache-2.0
mohammadclashclash/seed5
bot/seedbot.lua
1
10738
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
EnglandTeam/EnglandTeamBot
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
Telewildv4/Telewildv4bot
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
codergreen/ValyriaTear
dat/effects/particles/fireflies.lua
4
3003
-- Fireflies effect -- Author: Bertram -- The effect overall size in pixel. Used to make the map mode draw the effect on time. map_effect_collision = { effect_collision_width = 6 * 16, effect_collision_height = 5 * 16 } systems = {} systems[0] = { enabled = true, emitter = { x = -32, ...
gpl-2.0
NerdWalletOSS/Q
RUNTIME/DEPRECATED/COLUMN/code/test/exp/vector_spec.lua
1
3546
local ffi = require 'Q/UTILS/lua/q_ffi' local Vector = require 'Q/RUNTIME/COLUMN/code/lua/Vector' local qconsts = require 'Q/UTILS/lua/q_consts' local plpath = require 'pl.path' -- for k,v in pairs(arg) do print(k,v) end local length = tonumber(arg[4]) or 1000 local f_name, f2_name, f3_name local v_type = "I4" describe...
mit
tboox/xmake
xmake/languages/cuda/xmake.lua
1
4761
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
g0t-ya/XiaoyuBox
luci/model/cbi/hd_idle.lua
36
1043
--[[ LuCI hd-idle (c) 2008 Yanira <forum-2008@email.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 http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- require("nixio.fs") m = Map...
lgpl-3.0
TeslaCloud/TTTRewrite
terrortown/entities/weapons/weapon_tttbasegrenade.lua
1
5946
-- common code for all types of grenade AddCSLuaFile() SWEP.HoldReady = "grenade" SWEP.HoldNormal = "slam" if CLIENT then SWEP.PrintName = "Incendiary grenade" SWEP.Instructions = "Burn." SWEP.Slot = 3 SWEP.SlotPos = 0 SWEP.Icon = "vgui/ttt/icon_nades" end SWEP.Base = "weapon_tttbase" ...
mit
xkfz007/vlc
share/lua/extensions/VLSub.lua
3
59783
--[[ VLSub Extension for VLC media player 1.1 and 2.0 Copyright 2013 Guillaume Le Maout Authors: Guillaume Le Maout Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche Bug report: http://addons.videolan.org/content/show.php/?content=148752 This program is free software; you can redist...
lgpl-2.1
Oliveryo/Interface
AddOns/SHunterTimers/localization.de.lua
1
6433
if( GetLocale() == "deDE" ) then --abilities----------------------------------------- --shots SHT_AIMED_SHOT = "Gezielter Schuss"; SHT_CONC_SHOT = "Ersch\195\188tternder Schuss"; SHT_IMP_CONC = "Verbesserter Ersch\195\188tternder Schuss"; SHT_IMP_CONC_SHORT = "Verb. Ersch\195\188tternder Schuss"; SHT_SCATTER = "...
gpl-3.0
tboox/xmake
xmake/modules/detect/tools/find_vsjitdebugger.lua
1
2163
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
NerdWalletOSS/Q
experimental/cuda_files/Q_UTILS_build_mk_so.lua
1
3299
local q_root = os.getenv("Q_ROOT") assert(q_root, "Do export Q_ROOT=/home/subramon/Q/ or some such") final_h = q_root .. "/include/" final_so = q_root .. "/lib/" local q_build_dir = assert(os.getenv("Q_BUILD_DIR"), "Requires to Q_BUILD_DIR to be specified") -- local dbg = require 'Q/UTILS/lua.debugger' local plpath = ...
mit
slayerrensky/luci
build/luadoc/luadoc/init.lua
172
1333
------------------------------------------------------------------------------- -- LuaDoc main function. -- @release $Id: init.lua,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local require = require local util = require "luadoc.util" log...
apache-2.0
Flexibity/luci
libs/core/luasrc/util.lua
7
22046
--[[ LuCI - Utility library Description: Several common useful Lua functions FileId: $Id$ License: 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...
apache-2.0
ld-test/sqltable
test-pool.lua
2
4936
#!/usr/bin/env lua pcall(require, "luacov") --measure code coverage, if luacov is present require "luarocks.loader" lunatest = require "lunatest" sqltable = require "sqltable.pool" local db_type = arg[ #arg ] assert(db_type, "Must specify database type") local config = dofile("test-configs/" .. db_type .. ".lua...
mit
Oliveryo/Interface
AddOns/BigWigs/Plugins/Tranq.lua
1
5607
 assert(BigWigs, "BigWigs not found!") ---------------------------- -- Localization -- ---------------------------- local L = AceLibrary("AceLocale-2.2"):new("BigWigsTranq") L:RegisterTranslations("enUS", function() return { CHAT_MSG_SPELL_SELF_BUFF = "You fail to dispel (.+)'s Frenzy.", CHAT_MSG_SPELL_...
gpl-3.0
tboox/xmake
xmake/modules/package/tools/xmake.lua
1
3461
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
nilsbrummond/ESO-MailLooter
ui/Settings.lua
1
6502
MailLooter = MailLooter or {} local ADDON = MailLooter ADDON.UI = ADDON.UI or {} local UI = ADDON.UI function ADDON.UI.InitSettings() local panelData = { type = "panel", name = GetString(SI_MAILLOOTER_ADDON_NAME), displayName = "|cC0C0A0" .. GetString(SI_MAILLOOTER_TITLE) .. "|r", author = "Lodur...
mit
eagle14/Snippy-robot
plugins/search_youtube.lua
674
1270
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end local function searchYoutubeVideos(text) local url = 'https://www.googleapis.com/youtube/v3/search?' u...
gpl-2.0
RamiLego4Game/PixelizerBox-Sandbox
Helpers/loveframes/objects/internal/tabbutton.lua
14
5632
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- get the current require path local path = string.sub(..., 1, string.len(...) - string.len(".objects.internal.tabbutton"))...
apache-2.0
Spring-SpringBoard/SpringBoard-Core
scen_edit/gfx/draw/draw_void.lua
1
2393
local voidShader local function getVoidShader() if voidShader == nil then local shaderFragStr = VFS.LoadFile("shaders/void_drawing.glsl", nil, VFS.MOD) local shaderTemplate = { fragment = shaderFragStr, uniformInt = { mapTex = 0, patternTextur...
mit
Polynominal/Piefiller
piefiller.lua
2
9566
local path = ... local piefiller = {} local function hsvToRgb(h, s, v) local h,s,v = h,1,1 local h,s,v = math.fmod(h,360),s,v if s==0 then return { v,v,v } end h=h/60 i=math.floor(h) f=h-i p=v*(1-s) q=v*(1-s*f) t=v*(1-s*(1-f)) if i==0 then r=v g=t b=p elseif i==1 then r=q g...
mit
kvalium/loveGame
lib/knife/behavior.lua
7
1812
-- behavior.lua -- a state manager -- internal/external api local function getCurrentFrame (behavior) return behavior.states[behavior.state][behavior.index] end local function advanceFrame (behavior) local nextState = behavior.frame.after local nextIndex = behavior.index + 1 local maxIndex = #behavio...
gpl-3.0
eagle14/Snippy-robot
plugins/owners.lua
284
12473
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
zhityer/zhityer7
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
padrinoo/padrino85
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
slayerrensky/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua
31
1569
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.iwinfo", package.seeall) function rrdargs( graph, plugin, plugin_instance ) -- -- signal/noise diagram -- local snr = { title = "%H: Signal and noise on %pi", ...
apache-2.0
lhmwzy/vanilla
resty/lua-resty-shcache-0.1.0/shcache.lua
3
15258
-- Copyright (C) 2013 Matthieu Tourne -- @author Matthieu Tourne <matthieu@cloudflare.com> -- small overlay over shdict, smart cache load mechanism -- TODO (rdsharma): remove this line once we have tracked down bugs jit.off(true, true) local _M = {} local resty_lock = require("resty.lock") local conf = require("con...
mit
keyidadi/luci
modules/rpc/luasrc/jsonrpcbind/uci.lua
81
1914
--[[ 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 ht...
apache-2.0
fbesse/torch-totem
examples/test_tensor.lua
7
1083
#!/usr/bin/env th require 'totem' test = {} local tester = totem.Tester() function test.Dimension() local a = torch.Tensor(1,2) local b = torch.Tensor(2) tester:assertTensorEq(a, b, 1e-16, 'a == b') tester:assertTensorNe(a, b, 1e-16, 'a ~= b') end function test.Size() local a = torch.Tensor(1,2...
bsd-3-clause
sysuzhang/arcemu
src/scripts/lua/LuaBridge/Stable Scripts/Azeroth/Karazhan/BOSS_Karazhan_Maiden.lua
30
1099
function Maiden_Holy_Fire(Unit, event, miscunit, misc) print "Maiden Holy Fire" Unit:FullCastSpellOnTarget(29522,Unit:GetRandomPlayer()) Unit:SendChatMessage(11, 0, "You like Holy Fire...") end function Maiden_Holy_Wrath(Unit, event, miscunit, misc) print "Maiden Holy Wrath" Unit:FullCastSpellOnTarget(32445,Unit:...
agpl-3.0
jie-meng/Lunar
publish/plugins/parse_supplement_api_python.lua
2
21232
local file_ext = nil if pcall(require, 'file_ext') then file_ext = require('file_ext') end local pattern_func = [[def%s+([%w_]+)%s*%((.*)%)%s*:]] local pattern_func_init = [[def%s+__init__%s*%((.*)%)%s*:]] local pattern_class = [[class%s+([%w_]+)%s*:]] local pattern_class_extend = [[class%s+([%w_]+)%s*%((.*)%)%s*:...
gpl-2.0
dabbler0/seq2seq-comparison
saliency/four-saliency-maps.lua
1
6817
-- Compute saliencies by four methods: -- - Word erasure -- - Layer-wise Relevance Propagation -- - SmoothGrad -- - LIME require 'nn' require 'nngraph' require 'hdf5' require 'optim' require 'cutorch' require 'cunn' require 's2sa.data' require 's2sa.models' require 's2sa.model_utils' require 'smooth-grad' requi...
mit
disslove85/NOVS-BOT
bot/seedbot.lua
1
8642
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
Flexibity/luci
modules/niu/luasrc/controller/niu/traffic.lua
49
1218
--[[ 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...
apache-2.0
EvilHero90/forgottenserver
data/npc/scripts/promotion.lua
6
5979
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, ms...
gpl-2.0
fredericjoanis/Argorha-Pathfinding
extern/premake/actions/vstudio/vs200x_vcproj_user.lua
26
1489
-- -- vs200x_vcproj_user.lua -- Generate a Visual Studio 2002-2008 C/C++ project .user file -- Copyright (c) 2011 Jason Perkins and the Premake project -- -- -- Set up namespaces -- local vc200x = premake.vstudio.vc200x -- -- Generate the .vcproj.user file -- function vc200x.generate_user(prj) vc200x.header('...
mit
mahdisudo/see
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
Oliveryo/Interface
AddOns/BigWigs/Libs/CandyBar-2.0/CandyBar-2.0.lua
1
44927
--[[ Name: CandyBar-2.0 Revision: $Rev: 15771 $ Author: Ammo (wouter@muze.nl) Website: http://www.wowace.com/ Documentation: http://www.wowace.com/ SVN: svn://svn.wowace.com/root/trunk/CandyBar/CandyBar-2.0 Description: A timer bars library Dependencies: AceLibrary, AceOO-2.0, PaintChips-2.0, (optional) Compost-2.0 ]] ...
gpl-3.0
x-v8/bkb
deps/lua-cjson/tests/test.lua
3
18076
#!/usr/bin/env lua -- Lua CJSON tests -- -- Mark Pulford <mark@kyne.com.au> -- -- Note: The output of this script is easier to read with "less -S" local json = require "cjson" local json_safe = require "cjson.safe" local util = require "cjson.util" local function gen_raw_octets() local chars = {} for i = 0, ...
mit
NerdWalletOSS/Q
DEPRECATED_Q2/Q_TOOL/deps/weblit-static.lua
2
2997
--[[lit-meta name = "creationix/weblit-static" version = "2.1.0" dependencies = { "creationix/mime@2.0.0", "creationix/coro-fs@2.0.0", "luvit/json@2.5.2", } description = "A weblit middleware for serving static files from disk or bundle." tags = {"weblit", "middleware", "static"} license = "MI...
mit
tboox/xmake
xmake/modules/core/tools/tcc.lua
1
6722
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
keyidadi/luci
applications/luci-p910nd/luasrc/model/cbi/p910nd.lua
74
1512
--[[ LuCI p910nd (c) 2008 Yanira <forum-2008@email.de> (c) 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...
apache-2.0
tboox/xmake
xmake/modules/detect/tools/find_curl.lua
1
1609
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
Flexibity/luci
protocols/3g/luasrc/model/cbi/admin_network/proto_3g.lua
8
4307
--[[ LuCI - Lua Configuration Interface 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://www.apache.org/licenses/LICENSE-2.0 ]]-- local ma...
apache-2.0
NerdWalletOSS/Q
RUNTIME/DEPRECATED/COLUMN/code/tests/vector.test.lua
2
1832
local ffi = require "ffi" require "globals" local Vector = require "Vector" local function describe() print "hello" end local function it() print "bye" end g_valid_types = {} g_valid_types['i'] = 'int' g_valid_types['f'] = 'float' g_valid_types['d'] = 'double' g_valid_types['c'] = 'char' g_chunk_size = 15 de...
mit
sysuzhang/arcemu
src/scripts/lua/Lua/0Misc/0LCF_Includes/LCF_Player.lua
18
2613
--[[ * ArcEmu MMORPG Server * Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/> * Copyright (C) 2008-2010 <http://www.ArcEmu.org/> * * 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 Softwa...
agpl-3.0
NerdWalletOSS/Q
ML/DT/lua/run_dt.lua
1
4962
local Q = require 'Q' local Scalar = require 'libsclr' local utils = require 'Q/UTILS/lua/utils' local make_dt = require 'Q/ML/DT/lua/dt'['make_dt'] local ml_utils = require 'Q/ML/UTILS/lua/ml_utils' local extract_goal = require 'Q/ML/UTILS/lua/extract_goal' local split_train_test = require 'Q/ML/UTILS/lua/split_train_...
mit
DSUK/OpenRA
mods/cnc/maps/nod06a/nod06a.lua
25
7746
NodStartUnitsRight = { 'ltnk', 'bike', 'e1', 'e1', 'e3', 'e3' } NodStartUnitsLeft = { 'ltnk', 'ltnk', 'bggy', 'e1', 'e1', 'e1', 'e1', 'e3', 'e3', 'e3', 'e3' } Chn1Units = { 'e1', 'e1', 'e1', 'e1', 'e1' } Chn2Units = { 'e2', 'e2', 'e2', 'e2', 'e2' } Obj2Units = { 'ltnk', 'bike', 'e1', 'e1', 'e1' } Chn3CellTriggerActiva...
gpl-3.0
LibreLabUCM/telegram-bot
plugins/webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
Oliveryo/Interface
AddOns/KLHThreatMeter/Code/KTM_Core.lua
1
3859
 --[[ A module can optionally have 1) .myevents - a list of strings, the events to register 2) .onload - to be called on startup 3) .onloadcomplete to be called after all other modules have been loaded. 3) .onevent - will do your onevent. Currently sends all events to you, we should fix it to send only your event...
gpl-3.0
AliKhodadad/Dark-Boys
plugins/time.lua
771
2865
-- 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
weirdouncle/QSanguosha-For-Hegemony
lang/zh_CN/Audio/MomentumLines.lua
1
2509
return { -- 李典 ["cv:lidian"] = "黑冰", ["$xunxun1"] = "大将之范,当有恂恂之风。" , ["$xunxun2"] = "矜严重礼,进退恂恂。" , ["$wangxi1"] = "典岂可因私憾而忘公义?" , ["$wangxi2"] = "义忘私隙,端国正己。" , ["~lidian"] = "隙仇俱忘,怎奈……" , -- 臧霸 ["cv:zangba"] = "老狼", ["$hengjiang1"] = "横江断人道,骁骑跨江表。", ["$hengjiang2"] = "执义征暴,清定海岱。", ["~zangba"] = "明公不识霸言...
gpl-3.0
Oliveryo/Interface
AddOns/dpsmate/modules/DPSMate_Details_Deaths.lua
2
7023
-- Global Variables DPSMate.Modules.DetailsDeaths = {} -- Local variables local DetailsArr, DetailsTotal, DmgArr, DetailsUser, DetailsSelected = {}, 0, {}, "", 1 local DetailsArrComp, DetailsTotalComp, DmgArrComp, DetailsUserComp, DetailsSelectedComp = {}, 0, {}, "", 1 local g, g2 local curKey = 1 local db, cbt = {}...
gpl-3.0
dejayc/BaseLua
Packages/FileHelper.lua
1
7387
--[[ BaseLua https://github.com/dejayc/BaseLua Copyright 2012 Dejay Clayton All use of this file must comply with the Apache License, Version 2.0, under which this file is licensed: http://www.apache.org/licenses/LICENSE-2.0 --]] --[[ ---------------------------------------------------------...
apache-2.0
great90/skynet
lualib/skynet/mqueue.lua
115
1798
-- This is a deprecated module, use skynet.queue instead. local skynet = require "skynet" local c = require "skynet.core" local mqueue = {} local init_once local thread_id local message_queue = {} skynet.register_protocol { name = "queue", -- please read skynet.h for magic number 8 id = 8, pack = skynet.pack, u...
mit
leecrest/luvit
deps/utils.lua
6
2726
--[[ Copyright 2014-2015 The Luvit Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law o...
apache-2.0
mahdisudo/see
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
EnglandTeam/EnglandTeamBot
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
XeonSquared/PsychOS
modules/net/copper.lua
1
3303
net = {} net.id = computer.address():sub(1,8) net.delay = 2 net.np = 4957 net.cache = true net.cache_time = 16 net.log = false net.tm = {} if not component.list("ocemu")() then net.cache = true end function net.send(id,po,msg) -- id, port, message if id and po and msg then event.push("sendmsg",id,po,msg) else retu...
mpl-2.0
Flexibity/luci
libs/nixio/docsrc/nixio.lua
151
15824
--- General POSIX IO library. module "nixio" --- Look up a hostname and service via DNS. -- @class function -- @name nixio.getaddrinfo -- @param host hostname to lookup (optional) -- @param family address family [<strong>"any"</strong>, "inet", "inet6"] -- @param service service name or port (optional) -- @return ...
apache-2.0
AliKhodadad/Dark-Boys
plugins/moderation.lua
336
9979
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 local username = v.username data[tostring(m...
gpl-2.0
Flexibity/luci
applications/luci-ltqtapi/luasrc/controller/ltqtapi.lua
8
1299
--[[ LuCI - Lua Configuration Interface Copyright 2019 John Crispin <blogic@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
slayerrensky/luci
applications/luci-app-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua
141
1038
--[[ 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...
apache-2.0
AccroGaming/DarkRP-Entities
Entities/Drugs/drug/cl_init.lua
2
1289
include("shared.lua") function ENT:Initialize() end function ENT:Draw() self:DrawModel() local Pos = self:GetPos() local Ang = self:GetAngles() local owner = self:Getowning_ent() owner = (IsValid(owner) and owner:Nick()) or "Unknown" surface.SetFont("HUDNumber5") local TextWidth = surface.GetTextSize("Drugs...
mpl-2.0
tboox/xmake
xmake/plugins/project/vstudio/vs2019.lua
1
1256
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
apache-2.0
EvilHero90/forgottenserver
data/creaturescripts/scripts/player_death.lua
6
3209
local deathListEnabled = true local maxDeathRecords = 5 function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified) local playerId = player:getId() if nextUseStaminaTime[playerId] then nextUseStaminaTime[playerId] = nil end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, ...
gpl-2.0
Flexibity/luci
applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua
44
1102
--[[ LuCI hd-idle (c) 2008 Yanira <forum-2008@email.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 http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- require("nixio.fs") m = Map...
apache-2.0
jie-meng/Lunar
replace_current_lunar_on_mac.lua
2
1233
print('copy lunar.cfg') os.execute('cp /Applications/Lunar.app/Contents/MacOS/lunar.cfg Lunar.app/Contents/MacOS/') if util.isPathFile('/Applications/Lunar.app/Contents/MacOS/apis/python/pydoclibs') then print('copy pydoclibs') os.execute('cp /Applications/Lunar.app/Contents/MacOS/apis/python/pydoclibs Lunar.a...
gpl-2.0
njrat/BREKEBOT
plugins/all.lua
1
4448
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
great90/skynet
service/sharedatad.lua
8
3329
local skynet = require "skynet" local sharedata = require "skynet.sharedata.corelib" local table = table local cache = require "skynet.codecache" cache.mode "OFF" -- turn off codecache, because CMD.new may load data file local NORET = {} local pool = {} local pool_count = {} local objmap = {} local collect_tick = 10 ...
mit
funshine/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
Goodzilam/Good1
plugins/cpu.lua
244
1893
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' you...
gpl-2.0
aure/Soundpipe
modules/data/clock.lua
3
1110
sptbl["clock"] = { files = { module = "clock.c", header = "clock.h", example = "ex_clock.c", }, func = { create = "sp_clock_create", destroy = "sp_clock_destroy", init = "sp_clock_init", compute = "sp_clock_compute", }, params = { o...
mit
MaliciouZzHD/AndroidChromeCastControl
files/nmap/nselib/rtsp.lua
2
8630
--- -- This Real Time Streaming Protocol (RTSP) library implements only a minimal -- subset of the protocol needed by the current scripts. -- -- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html -- @author Patrik Karlsson <patrik@cqure.net> -- -- The library contains the following classes: -- -- * <code>...
gpl-3.0
nilsbrummond/ESO-MailLooter
lib/LAM/controls/panel.lua
2
6579
--[[panelData = { type = "panel", name = "Window Title", -- or string id or function returning a string displayName = "My Longer Window Title", -- or string id or function returning a string (optional) (can be useful for long addon names or if you want to colorize it) author = "Seerah", -- or string i...
mit