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
miraage/gladdy
Libs/LibSharedMedia-3.0/CallbackHandler-1.0/CallbackHandler-1.0.lua
2
8698
--[[ $Id: CallbackHandler-1.0.lua 60548 2008-02-07 11:04:06Z nevcairiel $ ]] local MAJOR, MINOR = "CallbackHandler-1.0", 3 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} ...
mit
yetsky/luci
applications/luci-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua
38
6159
--[[ 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$ ]]-- l...
apache-2.0
smogpill/dataspace
premake4.lua
1
6451
dofile("premake4_config.lua") baseAbsPath = os.getcwd() srcAbsPath = baseAbsPath .. "/src" buildAbsPath = baseAbsPath .. "/build" rootAbsPath = baseAbsPath .. "/root" versionMajor = 0 versionMinor = 0 versionBuild = 0 ----------------------------------------------------------------------------- function setSolutionDe...
gpl-3.0
judos/hardCrafting
source/prototypes/crusher.lua
1
2300
require("prototypes.item-group-production") data:extend({ { type = "item", icon_size = 32, name = "crusher", icon = "__"..fullModName.."__/graphics/icons/crusher.png", subgroup = "advanced-processing-machine", order = "f", place_result = "crusher", enabled = false, stack_size = 50 }, { type = "r...
gpl-3.0
LuaDist2/lua-path
test/test_wcs.lua
2
5580
local lunit = require "lunit" local TEST_CASE = lunit.TEST_CASE local SKIP_CASE if lunit.skip then SKIP_CASE = function(msg) return function() lunit.skip(msg) end end else SKIP_CASE = require "utils".skip end local IS_WINDOWS = package.config:sub(1,1) == '\\' if not IS_WINDOWS then local _ENV = TEST_CASE('WCS'...
mit
ZerothAngel/FtDScripts
main/rocketcontrol.lua
1
1323
--! rocketcontrol --@ commonstargets commonsweapons commons periodic weapontypes quadraticintercept function RocketControl_Update(I) -- Get highest-priority non-salvage target local Target = C:FirstTarget() if Target then -- Aim & fire all turrets/missile controllers of the appropriate slot for _,W...
mit
yetsky/luci
applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua
80
2553
--[[ LuCI - Lua Configuration Interface Copyright 2008 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$ ]]-- l...
apache-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua
19
1142
-------------------------------- -- @module GLViewImpl -- @extend GLView -- @parent_module cc -------------------------------- -- -- @function [parent=#GLViewImpl] createWithRect -- @param self -- @param #string viewName -- @param #rect_table rect -- @param #float frameZoomFactor -- @return GLViewImpl#GLViewImpl re...
mit
REZATITAN/X
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
disslove2-bot/Mr.Mj-BOT
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
Aminkavari/-xXD4RKXx-
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
hfjgjfg/seed353
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
xXDarkBoyXx/Cloud-
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
joaofvieira/luci
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
27
1763
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local server, username, password local ipv6, defaultroute, metric, peerdns, dns, mtu server = section:taboption("general", Value, "server", translate("L2TP Server")) server.datat...
apache-2.0
eggBOY91/Arctic-Core
src/scripts/lua/Lua/0Misc/global_var_management.lua
31
6754
--[[ Global Variable Management with automagic global table cleaning, and Lua garbage collection. ********************************* * * * The LUA++ Scripting Project * * * ********************************* This software is provided as free and open source by the staff of The LUA++ Scripting Project, in a...
agpl-3.0
eggBOY91/Arctic-Core
src/scripts/lua/LuaBridge/0Misc/global_var_management.lua
31
6754
--[[ Global Variable Management with automagic global table cleaning, and Lua garbage collection. ********************************* * * * The LUA++ Scripting Project * * * ********************************* This software is provided as free and open source by the staff of The LUA++ Scripting Project, in a...
agpl-3.0
LuaDist2/luarocks
test/test_environment.lua
1
27020
local lfs = require("lfs") local test_env = {} local help_message = [[ LuaRocks test-suite INFORMATION New test-suite for LuaRocks project, using unit testing framework Busted. REQUIREMENTS Be sure sshd is running on your system, or use '--exclude-tags=ssh', to not execute tests which require sshd. USAGE ...
mit
SinZ163/TwilightsEveORPG
game/scripts/vscripts/abilities/druid/summoner/modifier_teve_druid_summoner_regeneration.lua
1
1520
modifier_teve_druid_summoner_regeneration = class ({}) function modifier_teve_druid_summoner_regeneration:OnCreated( kv ) local caster = self:GetCaster() local hTarget = self:GetParent():GetAbsOrigin() local nFXIndex = ParticleManager:CreateParticle( "particles/hero/druid/summoner/summoner_regeneration.v...
mit
breakds/corpus-accu
cnn-sentence/Model/SimpleCNN.lua
1
3566
--- @module Model.SimpleCNN require 'torch' require 'nn' -- The package/class variable local SimpleCNN = {} function SimpleCNN:train(DataSet, training_set, options) local optimizer = nn.StochasticGradient(self.network, self.criterion) optimizer.learningRate = options.learningRate or 0.001 optimizer.maxItera...
mit
joaofvieira/luci
protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua
43
2146
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local netmod = luci.model.network local _, p for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp"}) do local proto = netmod:register_protocol(p) function proto.get_i18n(self) if p == "ppp" th...
apache-2.0
eggBOY91/Arctic-Core
src/scripts/lua/LuaBridge/AUCHINDOUN/SETHEKK_HALLS/talonking.lua
13
3077
--?!MAP=556 assert(include("SethekkHalls.lua") , "Failed to load SethekkHalls.lua") local mod = require("DUNGEON_AUCHINDOUN.INSTANCE_SETHEKK_HALLS") assert(mod) module(mod._NAME..".TALON_KING_IKISS",package.seeall) local self = getfenv(1) function OnSpawn(unit) local chest = unit:GetGameObjectNearestCoords(80.069473,...
agpl-3.0
zh423328/protoc-gen-lua
protobuf/protobuf.lua
15
35313
-- -------------------------------------------------------------------------------- -- FILE: protobuf.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com -- ...
bsd-3-clause
google/flatbuffers
tests/namespace_test/NamespaceA/TableInFirstNS.lua
5
2617
-- automatically generated by the FlatBuffers compiler, do not modify -- namespace: NamespaceA local flatbuffers = require('flatbuffers') local TableInFirstNS = {} -- the module local TableInFirstNS_mt = {} -- the class metatable function TableInFirstNS.New() local o = {} setmetatable(o, {__index = TableInF...
apache-2.0
persianstar/AdvanSource
plugins/saveplug.lua
20
1061
--Created by: @janlou & @Alirezame --Powered by: @SUDO_TM & @AdvanTM --⚠️CopyRight all right reserved⚠️ local function saveplug(extra, success, result) local msg = extra.msg local name = extra.name local receiver = get_receiver(msg) if success then local file = 'plugins/'..name..'.lua' print('File savi...
gpl-2.0
musselwhizzle/Focus-Points
focuspoints.lrdevplugin/AppleDelegates.lua
5
2121
--[[ Copyright 2016 Whizzbang Inc 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 or agreed to in writin...
apache-2.0
redxdev/Wake
dist/tests/native/matrix4x2.lua
1
4859
local test = require('test') local Matrix4x2 = Matrix4x2 local Vector2 = Vector2 test.suite('Matrix4x2 Library') test.test('creation', function() local m = Matrix4x2.new() test.assert_equal(#m, 8) test.expect_equal(m:get(1, 1), 1) test.expect_equal(m:get(1, 2), 0) test.expect_equal(m:get(2, 1), 0)...
mit
enginix/luasocket
src/socket.lua
61
4448
----------------------------------------------------------------------------- -- LuaSocket helper module -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import depend...
mit
IntelligentBot/IntelligentBot
plugins/Inrealm.lua
183
36473
-- 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_admin1(msg) then local group_creator = msg.from.print_name create_group_chat (group_creator, group_na...
gpl-2.0
MRMV2000/amira-o
plugins/ingroup.lua
34
54227
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.peer_id if member_id ~= our_id then -- Group configuration data[...
gpl-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua
7
1694
-------------------------------- -- @module LabelAtlas -- @extend AtlasNode,LabelProtocol -- @parent_module cc -------------------------------- -- -- @function [parent=#LabelAtlas] setString -- @param self -- @param #string label -- @return LabelAtlas#LabelAtlas self (return value: cc.LabelAtlas) ---------...
mit
fegimanam/bib
plugins/antisquig.lua
27
1167
-- Put this at the very top of your plugin list, even before blacklist.lua. antisquig = {} local triggers = { '[\216-\219][\128-\191]' } local action = function(msg) local moddat = load_data('moderation.json') if not moddat[msg.chat.id_str] then return true end if moddat[msg.chat.id_str][msg.from.id_str] ...
gpl-2.0
joaofvieira/luci
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua
68
6587
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local util = require "luci.util" local ip = require "luci.ip" function write_float(self, section, value) local n = tonumber(value) if n ~= nil then return Value.write(self, section, "%.1f" % n) ...
apache-2.0
dangersuperbot/super_boomrange
plugins/insta.lua
4
1947
local JSON = require "cjson" local function instagrm(msg, q) local tuser = q local url = "https://api.instagram.com/v1/users/search?q=" .. tostring(q) .. "&access_token=3063016775.1677ed0.b3fd22eca10144c993bac7ead5c125b8" local jstr, res = https.request(url) local jdat = JSON.decode(jstr) local id = 'not' for...
gpl-2.0
exosite-garage/PlatformScripts
Integrations/hipchat_room_notify.lua
1
1566
-- This script posts a message to a HipChat room using HTTP POST dispatch -- hipchat.com -- To use: -- 1) You must have a HipChat account with a Room setup -- 2) You must set up a Auth Token for the Room and get the Room ID -- 3) Create an Exosite Platform Script and insert this code. -- 4) Debug output will tell you i...
bsd-3-clause
notestudio/shall-I-kill-her
assets/scripts/vendor/HC/init.lua
10
4573
--[[ Copyright (c) 2011 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
apache-2.0
rmtew/demirogue
src/main.lua
3
1476
require 'jit' print(jit.version) -- All other lua files assume this is required before they are. require 'prelude' require 'themes' local genMachine = require 'mode' print('_VERSION', _VERSION) local machine function love.load() gFont30 = love.graphics.newFont('resource/inconsolata.otf', 30) gFont15 = love.grap...
bsd-3-clause
LuaDist2/lua-path
lua/path/win32/ffi/fs.lua
2
13383
------------------------------------------------------------------ -- -- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Copyright (C) 2013-2016 Alexey Melnichuk <alexeymelnichuck@gmail.com> -- -- Licensed according to the included 'LICENCE' document -- -- This file is part of lua-path library. -- -----...
mit
pazos/koreader
frontend/ui/data/css_tweaks.lua
1
36691
--[[-- CSS tweaks must have the following attributes: - id: unique ID identifying this tweak, to be stored in settings - title: menu item title (must not be too long) - css: stylesheet text to append to external stylesheet They may have the following optional attributes: - description: text displayed when holding o...
agpl-3.0
daniel-slaney/demirogue
src/mode/VoronoiMode.lua
3
11066
require 'Vector' local AABB = require 'lib/AABB' require 'Level' require 'Voronoi' require 'Viewport' require 'themes' local schema, VoronoiMode, GraphMode = require 'lib/mode' { 'VoronoiMode', 'GraphMode' } local w, h = 808, 600 local bounds = AABB.new { xmin = 0, ymin = 0, xmax = 3 * w, ymax = 3 * h, } local ...
bsd-3-clause
exosite-garage/PlatformScripts
Utility Lua Functions/form_urlencode_and_replacement_gsub.lua
1
1863
-- Example functions to encode a Lua Table for -- x-www-form-urlencoded content type -- local function gsub(s ,p ,r) local parts = {} local match = {} local nextm nextm = function(s) local repl = function(f ,l ,...) if nil ~= f then match[#match + 1] = nil == ... and {string.sub(s,f,l)} or {...
bsd-3-clause
yetsky/luci
applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
80
1455
--[[ Luci configuration model for statistics - collectd unixsock 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 Lice...
apache-2.0
joaofvieira/luci
applications/luci-app-p910nd/luasrc/model/cbi/p910nd.lua
78
1340
-- Copyright 2008 Yanira <forum-2008@email.de> -- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local uci = luci.model.uci.cursor_state() local net = require "luci.model.network" local m, s, p, b m = Map("p910nd", translate("p910nd - Printer server"), ...
apache-2.0
siktirmirza/dt
bot/bot.lua
1
7394
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
pazos/koreader
frontend/ui/data/keyboardlayouts/ja_keyboard.lua
5
8660
return { min_layer = 1, max_layer = 10, shiftmode_keys = {[""] = true}, symbolmode_keys = {["記号"] = true, ["かな"] = true}, utf8mode_keys = {["🌐"] = true}, umlautmode_keys = {["゜"] = true}, keys = { -- first row { -- 1 2 3 4 5 6 7 ...
agpl-3.0
judos/hardCrafting
source/prototypes/harder-coal.lua
1
1481
-- Requirement: -- require "prototypes.pulverizer" -- Minable ressources: -- data.raw["resource"]["coal"].minable.result = nil data.raw["resource"]["coal"].minable.results = { ressourceItemMinMaxProb("coal", 1, 1, 0.8), ressourceItemMinMaxProb("coal-dust", 1, 2, 0.2) } -- Item: -- local timeToPulverizeCoal = 2 loca...
gpl-3.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/addons/ulib/lua/ulib/server/ucl.lua
2
30017
--[[ Title: UCL ULib's Access Control List ]] local ucl = ULib.ucl -- Make it easier for us to refer to local accessStrings = ULib.parseKeyValues( ULib.fileRead( ULib.UCL_REGISTERED ) or "" ) or {} local accessCategories = {} ULib.ucl.accessStrings = accessStrings ULib.ucl.accessCategories = accessCategories -- H...
mit
ohwgiles/fivehundred
test/test_Ariadne.lua
1
10172
-- Test that even with the same number of cards (without aces), the relative values are being considered HAND = { Card(8, "Clubs"), Card(9, "Clubs"), Card(10, "Clubs"), Card(Card.KING, "Clubs"), Card(Card.QUEEN, "Clubs"), Card(4, "Hearts"), Card(5, "Hearts"), Card(6, "Hearts"), Card(7, "Hearts"), Card(8, "Hear...
gpl-3.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/material.lua
1
1765
local PANEL = {} --[[--------------------------------------------------------- Name: Init -----------------------------------------------------------]] function PANEL:Init() self.Material = nil self.AutoSize = true self:SetAlpha( 255 ) self:SetMouseInputEnabled( false ) self:SetKeyboardInputEnabled( false ...
mit
siktirmirza/seq
bot/seedbot.lua
180
10314
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 = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
gpl-2.0
ioiasff/ghg
bot/seedbot.lua
180
10314
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 = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
agpl-3.0
joaofvieira/luci
applications/luci-app-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua
61
3184
-- Copyright 2009 Daniel Dickinson -- Licensed to the public under the Apache License 2.0. module("luci.controller.luci_diag.smap_common", package.seeall) require("luci.i18n") require("luci.util") require("luci.sys") require("luci.cbi") require("luci.model.uci") local translate = luci.i18n.translate local DummyValue...
apache-2.0
SinZ163/TwilightsEveORPG
game/scripts/vscripts/abilities/modifier_teve_attributes_int.lua
2
1186
modifier_teve_attributes_int = class({}) function modifier_teve_attributes_int:OnCreated( kv ) if IsServer() then self:GetParent():CalculateStatBonus() end end function modifier_teve_attributes_int:OnRefresh( kv ) if IsServer() then self:GetParent():CalculateStatBonus() end end function...
mit
pazos/koreader
spec/unit/readhistory_spec.lua
2
11728
describe("ReadHistory module", function() local DocSettings local DataStorage local joinPath local mkdir local realpath local reload local lfs local now = 61 local function file(name) return joinPath(DataStorage:getDataDir(), name) end local function test_data_dir()...
agpl-3.0
yetsky/luci
protocols/ppp/luasrc/model/network/proto_ppp.lua
77
2695
--[[ LuCI - Network model - 3G, PPP, PPtP, PPPoE and PPPoA protocol extension 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.o...
apache-2.0
ZerothAngel/FtDScripts
lib/terraincheck.lua
1
2752
--@ commons firstrun -- Terrain following module TerrainCheckPoints = {} CurrentMaxVerticalSpeed = 1 -- Pre-calculate check points for terrain following function TerrainCheck_FirstRun(I) local MaxDim = I:GetConstructMaxDimensions() local MinDim = I:GetConstructMinDimensions() local Dimensions = MaxDim - MinDi...
mit
theonlywild/copy
plugins/stats.lua
2
4006
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
joaofvieira/luci
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua
40
3094
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. require("luci.ip") require("luci.model.uci") local basicParams = { -- -- Widget, Name, Default(s), Description -- { ListValue, "verb", { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, translate("Set...
apache-2.0
Infinitive-OS/platform_external_skia
tools/lua/scrape.lua
66
2250
function tostr(t) local str = "" for k, v in next, t do if #str > 0 then str = str .. ", " end if type(k) == "number" then str = str .. "[" .. k .. "] = " else str = str .. tostring(k) .. " = " end if type(v) == "table" then ...
bsd-3-clause
Aminkavari/-xXD4RKXx-
plugins/help.lua
337
5009
do 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
vitaliylag/waifu2x
train.lua
2
8460
require 'pl' local __FILE__ = (function() return string.gsub(debug.getinfo(2, 'S').source, "^@", "") end)() package.path = path.join(path.dirname(__FILE__), "lib", "?.lua;") .. package.path require 'optim' require 'xlua' require 'w2nn' local settings = require 'settings' local srcnn = require 'srcnn' local minibatch_a...
mit
ARPA-SIMC/meteo-vm2
doc/examples/generate-source.lua
1
1562
--[[ This example shows how to create an VM2 attributes file, loading data from a postgresql database The resulting file is in the form: return { stations={ [123]={...}, [456]={...}, ... }, variables={ [789]={...}, [123]={...} } } ]]-- io.write("return {\n") -- open database require "luasq...
gpl-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua
53
7325
if nil == ccui then return end --tip local function deprecatedTip(old_name,new_name) print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") end --functions of ccui.Text will be deprecated begin local TextDeprecated = { } function TextDeprecated.setText(self, st...
mit
gsssrao/MozDef
examples/heka-lua-bro-notice/bronotice.lua
10
3474
-- 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 -- Mike Trinkala mtr...
mpl-2.0
cjtallman/luasocket
test/utestclnt.lua
44
18346
local socket = require"socket" socket.unix = require"socket.unix" host = host or "luasocket" function pass(...) local s = string.format(...) io.stderr:write(s, "\n") end function fail(...) local s = string.format(...) io.stderr:write("ERROR: ", s, "!\n") socket.sleep(3) os.exit() end function wa...
mit
gsssrao/MozDef
examples/heka-lua-bro/bro_dhcp.lua
10
2936
-- 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
wgapl/torch7
init.lua
6
5692
-- We are using paths.require to appease mkl -- Make this work with LuaJIT in Lua 5.2 compatibility mode, which -- renames string.gfind (already deprecated in 5.1) if not string.gfind then string.gfind = string.gmatch end if not table.unpack then table.unpack = unpack end require "paths" paths.require "libtorch...
bsd-3-clause
mp4saeed/energy28
banhammer-fa.lua
20
37193
local function pre_process(msg) chat = msg.chat_id_ user = msg.sender_user_id_ local function check_newmember(arg, data) test = load_data(_config.moderation.data) lock_bots = test[arg.chat_id]['settings']['lock_bots'] local hash = "gp_lang:"..arg.chat_id local lang = redis:get(hash) if data.type_.ID == "UserTy...
gpl-3.0
kurybr/kury.settings
awesome-config/lain/widget/weather.lua
3
5940
--[[ Licensed under GNU General Public License v2 * (c) 2015, Luca CPZ --]] local helpers = require("lain.helpers") local json = require("lain.util").dkjson local focused = require("awful.screen").focused local naughty = require("naughty") local wibox = require("wibox") local math = math loc...
mit
MRMV2000/amira-o
system/libs/redis.lua
36
1136
local Redis = (loadfile "./system/libs/lua-redis.lua")() local FakeRedis = (loadfile "./system/libs/fakeredis.lua")() local params = { host = '127.0.0.1', port = 6379, } -- Overwrite HGETALL Redis.commands.hgetall = Redis.command('hgetall', { response = function(reply, command, ...) local new_reply = { } ...
gpl-2.0
Infinitive-OS/platform_external_skia
tools/lua/glyph-usage.lua
207
4034
function tostr(t) local str = "" for k, v in next, t do if #str > 0 then str = str .. ", " end if type(k) == "number" then str = str .. "[" .. k .. "] = " else str = str .. tostring(k) .. " = " end if type(v) == "table" then ...
bsd-3-clause
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/dform.lua
2
7251
--[[ _ ( ) _| | __ _ __ ___ ___ _ _ /'_` | /'__`\( '__)/' _ ` _ `\ /'_` ) ( (_| |( ___/| | | ( ) ( ) |( (_| | `\__,_)`\____)(_) (_) (_) (_)`\__,_) DForm --]] local PANEL = {} DEFINE_BASECLASS( "DCollapsibleCategory" ) AccessorFu...
mit
yetsky/luci
libs/nixio/docsrc/nixio.UnifiedIO.lua
157
5891
--- 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
pazos/koreader
frontend/ui/widget/container/alphacontainer.lua
2
2594
--[[-- AlphaContainer will paint its content (1 widget) onto lower levels using a transparency (0..1) Example: local alpha alpha = AlphaContainer:new{ alpha = 0.7, FrameContainer:new{ background = Blitbuffer.COLOR_WHITE, bordersize = Size.border.default, ma...
agpl-3.0
hummelchen/unikeylog
src/crypto-test.lua
1
1739
local pubkey = [[ -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeYM5oXEtEXOvejmTUsE9hN0sV Jk9amBOJ/EPHKLYh15WPm0nEegH4fJvFSWqx6ts70iPpp0SZNF0ZuKzhEdE+t+Tq arH/JSe92FnCGwVBxqwC0pjimeZd8+n5s2zBLztxdcxh+GYKaMKI6Tay017/uTCy XCmEuDrgs+zhfWfF3QIDAQAB -----END PUBLIC KEY----- ]] local privkey = [[ -----BE...
mit
peterbarker/ardupilot-1
Tools/CHDK-Scripts/kap_uav.lua
96
28513
--[[ 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 @title KAP UAV 3.1 @param i Shot Interval (sec) @default i 15 @range i 2 120 @param s Total Shots (0=infinite) @default s 0 @range ...
gpl-3.0
GravityScore/LuaIDE
src/ui/tab.lua
1
8943
-- -- Content Manager -- --- Manages a collection of content windows, one for each tab. ContentManager = {} ContentManager.__index = ContentManager --- Creates a new content manager. function ContentManager.new(...) local self = setmetatable({}, ContentManager) self:setup(...) return self end function Content...
mit
lopezloo/mta-csrw
csrw/client/nominate.lua
1
1540
local nominateWindow = guiCreateWindow(0.01, 0.31, 0.17, 0.53, getText("nominateMap"), true) guiWindowSetMovable(nominateWindow, false) guiWindowSetSizable(nominateWindow, false) local nominateGrid = guiCreateGridList(0.05, 0.06, 0.91, 0.92, true, nominateWindow) guiGridListAddColumn(nominateGrid, getText("Map"), 0.5)...
gpl-3.0
disslove2-bot/Mr.Mj-BOT
plugins/xkcd.lua
628
1374
do function get_last_id() local res,code = https.request("http://xkcd.com/info.0.json") if code ~= 200 then return "HTTP ERROR" end local data = json:decode(res) return data.num end function get_xkcd(id) local res,code = http.request("http://xkcd.com/"..id.."/info.0.json") if code ~= 200 then return "HT...
gpl-2.0
hechenfon/torch7
test/timeSort.lua
68
5063
-- gnuplot.figure(2) -- Test torch sort, show it suffers from the problems of quicksort -- i.e. complexity O(N^2) in worst-case of sorted list require 'gnuplot' local cmd = torch.CmdLine() cmd:option('-N', 10^7, 'Maximum array size') cmd:option('-p', 50, 'Number of points in logspace') cmd:option('-r', 20, 'Number of...
bsd-3-clause
bradchesney79/2015BeastRouterProject
openwrt/unsquash/squashfs-root/usr/lib/lua/luci/model/cbi/admin_network/proto_dslite.lua
46
1462
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Copyright 2013 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local peeraddr, ip6addr local tunlink, defaultroute, metric, ttl, mtu peeraddr = section:taboption("general", Value, "peerad...
cc0-1.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EditBox.lua
9
9735
-------------------------------- -- @module EditBox -- @extend Widget,IMEDelegate -- @parent_module ccui -------------------------------- -- js NA<br> -- lua NA -- @function [parent=#EditBox] keyboardDidShow -- @param self -- @param #cc.IMEKeyboardNotificationInfo info -- @return EditBox#EditBox self (return value: ...
mit
eggBOY91/Arctic-Core
src/scripts/lua/LuaBridge/AUCHINDOUN/MANA_TOMBS/tavarok.lua
13
1434
--?!MAP=557 assert( include("manatombs.lua") , "Failed to load manatombs.lua") local mod = require("DUNGEON_AUCHINDOUN.INSTANCE_MANATOMBS") assert(mod) module(mod._NAME..".TAVAROK",package.seeall) local self = getfenv(1) WorldDBQuery("DELETE FROM ai_agents WHERE entry = 18343;") function OnCombat(unit,_,mAggro) self...
agpl-3.0
sdgdsffdsfff/nginx-openresty-windows
lua-resty-lrucache-0.04/lib/resty/lrucache.lua
12
4690
-- Copyright (C) Yichun Zhang (agentzh) local ffi = require "ffi" local ffi_new = ffi.new local ffi_sizeof = ffi.sizeof local ffi_cast = ffi.cast local ffi_fill = ffi.fill local ngx_now = ngx.now local uintptr_t = ffi.typeof("uintptr_t") local setmetatable = setmetatable local tonumber = tonumber -- queue data type...
bsd-2-clause
joaofvieira/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
29
4347
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.netlink", package.seeall) function rrdargs( graph, plugin, plugin_instance ) -- -- traffic diagram -- local traffic = { title = "%H: Netlink...
apache-2.0
joaofvieira/luci
protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
64
3139
-- Copyright 2011 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 address...
apache-2.0
pazos/koreader
frontend/ui/widget/frontlightwidget.lua
2
24381
local Blitbuffer = require("ffi/blitbuffer") local Button = require("ui/widget/button") local CenterContainer = require("ui/widget/container/centercontainer") local CheckButton = require("ui/widget/checkbutton") local CloseButton = require("ui/widget/closebutton") local Device = require("device") local FrameContainer =...
agpl-3.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua
9
7920
-------------------------------- -- @module AudioEngine -- @parent_module ccexp -------------------------------- -- -- @function [parent=#AudioEngine] lazyInit -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- Sets the current playback position of an audio ins...
mit
pazos/koreader
frontend/ui/elements/mass_storage.lua
4
2448
local Device = require("device") local UIManager = require("ui/uimanager") local _ = require("gettext") local MassStorage = {} -- if required a popup will ask before entering mass storage mode function MassStorage:requireConfirmation() return not G_reader_settings:isTrue("mass_storage_confirmation_disabled") end ...
agpl-3.0
joaofvieira/luci
applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua
128
4540
--[[ 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
pazos/koreader
frontend/apps/cloudstorage/cloudstorage.lua
2
24996
local BD = require("ui/bidi") local ButtonDialog = require("ui/widget/buttondialog") local ButtonDialogTitle = require("ui/widget/buttondialogtitle") local ConfirmBox = require("ui/widget/confirmbox") local DataStorage = require("datastorage") local DropBox = require("apps/cloudstorage/dropbox") local Ftp = require("ap...
agpl-3.0
wickedfoo/torch7
File.lua
1
13319
local File = torch.getmetatable('torch.File') function File:writeBool(value) if value then self:writeInt(1) else self:writeInt(0) end end function File:readBool() return (self:readInt() == 1) end local TYPE_NIL = 0 local TYPE_NUMBER = 1 local TYPE_STRING = 2 local TYPE_TABLE = 3 l...
bsd-3-clause
haifeng60902/osgswig
etc/python.lua
2
2334
-- -- Python wrapper functions -- require 'globals' function createPreBuildCommand(name) local cmd = "" local includes = "" if (target == 'vs2003' or target == 'vs2005') then -- only for visual studio cmd = "swig -c++ -python -I..\\..\\src\\ -I\"$(OSG_ROOT)\\include\"" if (name == "osgART") then ...
mit
nimaghorbani/ghbotfool
plugins/feedbacl.lua
1
1032
do function run(msg, matches) local fuse = '#DearAdmin😜 we have recived a new feedback just now : #newfeedback \n\n🆔 : ' .. msg.from.id .. '\n\nNAME▶️ : ' .. msg.from.print_name ..'\n\nusername▶️ :@ ' .. msg.from.username ..'\pm :\n\n' .. matches[1] local fuses = '!printf user#id' .. msg.from.id local text ...
gpl-2.0
ZerothAngel/FtDScripts
missile/missilecommand.lua
1
4781
--@ clamp -- MissileCommand implementation MissileCommand = {} function MissileCommand.new(I, TransceiverIndex, MissileIndex) local self = {} -- Note we don't bother saving TransceiverIndex & MissileIndex in the -- instance because they may change. -- We leave tracking (by missile ID) to the caller. l...
mit
bottelebot/Umbrella
bot/bot.lua
1
6916
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 = '0.14.6' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then r...
gpl-2.0
redxdev/Wake
dist/tests/init.lua
1
2462
-- -- Require any and all tests you need here, in the order you want them to run. -- require('tests.lib.class') require('tests.lib.stringutil') require('tests.lib.event') require('tests.native.vector2') require('tests.native.vector3') require('tests.native.vector4') require('tests.native.matrix2x2') require('tests.na...
mit
cernodile/HexLit
data/drpg.lua
1
2834
local drpg = {} drpg.itemId = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16","17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", ...
gpl-3.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/SkewTo.lua
7
1187
-------------------------------- -- @module SkewTo -- @extend ActionInterval -- @parent_module cc -------------------------------- -- Creates the action.<br> -- param t Duration time, in seconds.<br> -- param sx Skew x angle.<br> -- param sy Skew y angle.<br> -- return An autoreleased SkewTo object. -- @function [par...
mit
pazos/koreader
frontend/depgraph.lua
8
8306
--[[-- DepGraph module. Library for constructing dependency graphs. Example: local dg = DepGraph:new{} dg:addNode('a1', {'a2', 'b1'}) dg:addNode('b1', {'a2', 'c1'}) dg:addNode('c1') -- The return value of dg:serialize() will be: -- {'a2', 'c1', 'b1', 'a1'} NOTE: Insertion order is preserved, ...
agpl-3.0
pazos/koreader
frontend/apps/reader/modules/readerrolling.lua
1
60709
local BD = require("ui/bidi") local Blitbuffer = require("ffi/blitbuffer") local ConfirmBox = require("ui/widget/confirmbox") local Device = require("device") local Event = require("ui/event") local InputContainer = require("ui/widget/container/inputcontainer") local MultiConfirmBox = require("ui/widget/multiconfirmbox...
agpl-3.0