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
ominux/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 ...
apache-2.0
makanishere/CycloneTG
plugins/italian_lang.lua
2
18403
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
libremesh/lime-packages
packages/pirania/tests/test_pirania_rpcd.lua
1
5010
local utils = require "lime.utils" local test_utils = require "tests.utils" local json = require 'luci.jsonc' local test_utils = require 'tests.utils' require('packages/pirania/tests/pirania_test_utils').fake_for_tests() local vouchera = require('voucher.vouchera') local portal = require('portal.portal') local test_f...
agpl-3.0
sundream/gamesrv
script/card/neutral/card264038.lua
1
2311
--<<card 导表开始>> local super = require "script.card.neutral.card164038" ccard264038 = class("ccard264038",super,{ sid = 264038, race = 6, name = "叫嚣的中士", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
mahyarnajibi/fast-rcnn-torch
config.lua
1
3465
--- All parameters goes here config = config or {} function config.parse(arg) local cmd = torch.CmdLine() cmd:text() cmd:text('Fast R-CNN for Torch') cmd:text() cmd:text('') -- Parameters cmd:option('-resume_training',false, 'True if you are resuming the training from a FRCNN model or false when starting from t...
mit
bjornswenson/RxLua
src/operators/switch.lua
2
1036
local Observable = require 'observable' --- Given an Observable that produces Observables, returns an Observable that produces the values -- produced by the most recently produced Observable. -- @returns {Observable} function Observable:switch() return Observable.create(function(observer) local innerSubscription...
mit
xaviermariaconejo/R-type
res/levels/main-menu.lua
1
6923
return { version = "1.1", luaversion = "5.1", tiledversion = "0.12.3", orientation = "orthogonal", width = 13, height = 9, tilewidth = 80, tileheight = 80, nextobjectid = 4, properties = {}, tilesets = { { name = "main-menu-background-animation", firstgid = 1, tilewidth = 80,...
mit
movb/Algorithm-Implementations
Maximum_Subarray/Lua/Yonaba/maximum_subarray.lua
26
2823
-- Greatest subsequential sum finding algorithms implementation -- See: http://en.wikipedia.org/wiki/Maximum_subarray_problem -- Computes the largest sub-sequential sum using kadanes algorithm -- s : a given sequence -- returns : the sum of the largest subsequence found -- returns : the starting index of the lar...
mit
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/Scene.lua
1
1316
-------------------------------- -- @module Scene -- @extend Node -------------------------------- -- @function [parent=#Scene] getPhysicsWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- -- @function [parent=#Scene] createWithSize...
mit
EvPowerTeam/EV_OP
feeds/luci/applications/luci-transmission/luasrc/model/cbi/transmission.lua
75
13259
--[[ LuCI - Lua Configuration Interface - Transmission support Copyright 2012 Gabor Varga <vargagab@gmail.com> 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/LICEN...
gpl-2.0
dmccuskey/dmc-websockets
examples/dmc-websockets-autobahntestsuite/dmc_corona/dmc_sockets/tcp.lua
14
9315
--====================================================================-- -- dmc_corona/dmc_sockets/tcp.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2014-2015 David McCuskey Permission is here...
mit
harryzeng/skynet
examples/simpleweb.lua
76
2091
local skynet = require "skynet" local socket = require "socket" local httpd = require "http.httpd" local sockethelper = require "http.sockethelper" local urllib = require "http.url" local table = table local string = string local mode = ... if mode == "agent" then local function response(id, ...) local ok, err = ht...
mit
sundream/gamesrv
script/card/fire/card246001.lua
1
2204
--<<card 导表开始>> local super = require "script.card.fire.card146001" ccard246001 = class("ccard246001",super,{ sid = 246001, race = 4, name = "狗", type = 202, magic_immune = 0, assault = 1, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic...
gpl-2.0
Alireza5928/new1
plugins/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
movb/Algorithm-Implementations
Gauss_Seidel_Algorithm/Lua/Yonaba/gauss_seidel_test.lua
26
2074
-- Tests for sor.lua local gauss_seidel = require 'gauss_seidel' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 end ...
mit
EvPowerTeam/EV_OP
feeds/packages/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua
111
1535
-- ------ member configuration ------ -- ds = require "luci.dispatcher" m5 = Map("mwan3", translate("MWAN Member Configuration")) m5:append(Template("mwan/config_css")) mwan_member = m5:section(TypedSection, "member", translate("Members"), translate("Members are profiles attaching a metric and weight to an MWAN ...
gpl-2.0
tomm/pioneer
data/factions/091_Inner_Horde.lua
1
1085
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local f = Faction:new('Inner Horde') :description_short('Inner Horde') :description('Very little is currently known about The Inner Horde') :homeworld(-14,-30,-30,0,9) :foundin...
gpl-3.0
bashi-bazouk/mongrel2
docs/site/model/site.lua
54
4091
local tir = require 'tir.view' local markdown = require 'markdown' local posix = require 'posix' local json = require 'json' local util = require 'tir.util' local RFC_822 = "%a, %d %b %Y %H:%M:%S %z" local DATE_MATCH = "(%a+)_(%d+)_(%d+)" Generator = { output = 'output/', source = 'src/', } function Genera...
bsd-3-clause
Choumiko/Factorio-Stdlib
stdlib/table.lua
1
12753
--- Extends lua 5.2 table -- @module table -- @see table --- Given a mapping function, creates a transformed copy of the table --- by calling the function for each element in the table, and using --- the result as the new value for the key. Passes the index as second argument to the function. --- @usage a= { 1, 2, 3, ...
isc
dmccuskey/dmc-websockets
examples/dmc-websockets-echo/dmc_corona/dmc_websockets/exception.lua
11
2781
--====================================================================-- -- dmc_corona/dmc_websockets/exception.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2014-2015 David McCuskey. All Right...
mit
sundream/gamesrv
script/card/fire/card143002.lua
1
2883
--<<card 导表开始>> local super = require "script.card.init" ccard143002 = class("ccard143002",super,{ sid = 143002, race = 4, name = "误导", type = 102, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_adde...
gpl-2.0
Lynx3d/tinker_tools
Modules/CopyPaste.lua
2
14084
local Dta = select(2, ...) Dta.copa = {} Dta.copa.CountedItems = 0 -------------------------------------- --COPY / PASTE BUTTON HANDLERS -------------------------------------- function Dta.copa.CopaOffsetChanged() local copa_ui = Dta.Tools.CoPa.window.copyPaste if copa_ui.multiplyOffsets:GetChecked() then copa_...
bsd-3-clause
letmefly/skynet
service/cdummy.lua
94
1797
local skynet = require "skynet" require "skynet.manager" -- import skynet.launch, ... local globalname = {} local queryname = {} local harbor = {} local harbor_service skynet.register_protocol { name = "harbor", id = skynet.PTYPE_HARBOR, pack = function(...) return ... end, unpack = skynet.tostring, } skynet.reg...
mit
jxskiss/orange
dashboard/model/user.lua
4
2443
local DB = require("dashboard.model.db") return function(config) local user_model = {} local mysql_config = config.store_mysql local db = DB:new(mysql_config) function user_model:new(username, password, enable) return db:query("insert into dashboard_user(username, password, enable) values(?,?...
mit
Putnam3145/SPARKING-Dwarf-Fortress-DBZ-mod
raw/scripts/dragonball/transformation.lua
1
12052
--@ module = true --[[ transformation persist info: 1. ints[1]: currently transformed 2. ints[2]: last tick that ticks was ran the rest can be used for whatever, but start from 7 ]] transformations={} function load_transformation_file(file_name) local new_transformation_file=dfhack.script_environ...
mit
EvPowerTeam/EV_OP
feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-func.lua
80
1208
--[[ 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
olostan/mudlet
src/mudlet-lua/lua/GUIUtils.lua
1
32495
---------------------------------------------------------------------------------- --- Mudlet GUI Utils ---------------------------------------------------------------------------------- --- The <i>gaugesTable table</i>. First we need to make this table which will be --- used later to store important data in. --- ---...
gpl-2.0
jacklicn/mysql-proxy
tests/suite/base/t/client_address-test.lua
4
1593
--[[ $%BEGINLICENSE%$ Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
tltneon/NutScript
plugins/observer.lua
1
4394
PLUGIN.name = "Observer" PLUGIN.author = "Chessnut" PLUGIN.desc = "Adds on to the no-clip mode to prevent instrusion." if (CLIENT) then -- Create a setting to see if the player will teleport back after noclipping. NUT_CVAR_OBSTPBACK = CreateClientConVar("nut_obstpback", 0, true, true) NUT_CVAR_ADMINESP = CreateClie...
mit
jxskiss/orange
api/router.lua
3
3967
local ipairs = ipairs local pairs = pairs local type = type local require = require local xpcall = xpcall local string_lower = string.lower local lor = require("lor.index") local function load_plugin_api(plugin, api_router, store) local plugin_api_path = "orange.plugins." .. plugin .. ".api" ngx.log(ngx.ERR, ...
mit
movb/Algorithm-Implementations
Minimax/Lua/Yonaba/handlers/tree_handler.lua
78
1131
-- Search tree class handler implementation local PATH = (...):gsub('handlers.tree_handler$','') local class = require (PATH .. '.utils.class') local tree = class () -- Tree initialization function tree:initialize() self.nodes = {} end -- Adds a node in the tree function tree:addNode(name, parent, value) asser...
mit
movb/Algorithm-Implementations
Floyd_Warshall/Lua/Yonaba/floyd_warshall.lua
26
1802
-- Floyd-Warshall "all pairs-shortest" algorithm implementation -- See : http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm -- Note : this implementation (and tests) were roughly translated to -- Lua from Diego Allen's implementation of the same problem. -- See : https://github.com/kennyledet/Algorithm-Im...
mit
siggame/Joueur.lua
games/catastrophe/tile.lua
2
4553
-- Tile: A Tile in the game that makes up the 2D map grid. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. local class = require("joueur.utilities.class") local GameObj...
mit
pandaforks/tido-rainbow
demos/labels/main.lua
1
1737
-- Copyright (c) 2010-14 Bifrost Entertainment AS and Tommy Nguyen -- Distributed under the MIT License. -- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) -- -- > OpenSans-Light.ttf -- Copyright (c) 2011 Steve Matteson -- -- Licensed under the Apache License, Version 2.0 (the “License”); ...
mit
letmefly/skynet
service/datacenterd.lua
100
1928
local skynet = require "skynet" local command = {} local database = {} local wait_queue = {} local mode = {} local function query(db, key, ...) if key == nil then return db else return query(db[key], ...) end end function command.QUERY(key, ...) local d = database[key] if d then return query(d, ...) end ...
mit
Seagull42/Starbound_RU
translations/others/scripts/actions/dialog.lua
1
6553
require("/scripts/quest/text_generation.lua") require("/scripts/util.lua") function context() return _ENV[entity.entityType()] end function entityVariant() if entity.entityType() == "monster" then return monster.type() elseif entity.entityType() == "npc" then return npc.npcType() elseif entity.entityTy...
apache-2.0
Alireza5928/new1
libs/dateparser.lua
31
6347
local difftime, time, date = os.difftime, os.time, os.date local format = string.format local tremove, tinsert = table.remove, table.insert local pcall, pairs, ipairs, tostring, tonumber, type, setmetatable = pcall, pairs, ipairs, tostring, tonumber, type, setmetatable local dateparser={} --we shall use the host OS's...
gpl-3.0
sundream/gamesrv
script/card/neutral/card265024.lua
1
2288
--<<card 导表开始>> local super = require "script.card.neutral.card165024" ccard265024 = class("ccard265024",super,{ sid = 265024, race = 6, name = "鱼人猎潮者", type = 203, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
tomm/pioneer
data/modules/MusicPlayer.lua
1
4357
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local Game = import("Game") local Music = import("Music") local Event = import("Event") local music = {} local getCategoryForSong = function (name...
gpl-3.0
david-xiao/packages
net/smartsnmpd/files/mibs/system.lua
158
6428
-- -- This file is part of SmartSNMP -- Copyright (C) 2014, Credo Semiconductor Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your optio...
gpl-2.0
libremesh/lime-packages
packages/bmx7-mdns/files/luci/bmx7-mdns.lua
1
3015
--[[ Copyright (C) 2019 Pau Escrich This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is di...
agpl-3.0
EvPowerTeam/EV_OP
feeds/luci/applications/luci-firewall/luasrc/tools/firewall.lua
59
6016
--[[ LuCI - Lua Configuration Interface Copyright 2011-2012 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- mo...
gpl-2.0
dojoteef/loltorch
verifymatches.lua
1
8253
local cjson = require('cjson') local dataset = require('dataset') local dir = require('pl.dir') local file = require('pl.file') local lol = require('lol') local path = require('pl.path') local threads = require('threads') local tablex = require('pl.tablex') local tds = require('tds') local torch = require('torch') loca...
mit
codemon66/Urho3D
bin/Data/LuaScripts/25_Urho2DParticle.lua
21
4746
-- Urho2D particle example. -- This sample demonstrates: -- - Creating a 2D scene with particle -- - Displaying the scene using the Renderer subsystem -- - Handling mouse move to move particle require "LuaScripts/Utilities/Sample" local particleNode = nil function Start() -- Execute the common startu...
mit
finnbar/twar
tester.lua
1
1498
--[[ This is a file that I am using for testing. It builds and deploys (on 3,2) a unit consisting of a cpu block next to an explosive and explosion-resistant block. The test should end with the third block being propelled away after using --> Unit:on(3,2,4,3,1), which turns on the cpu block. If this is successful, the...
gpl-2.0
Midiman/Concrete
main.lua
1
1858
Gamestate = require "lib.hump.gamestate" -- content = {} content.fonts = {} game = {} game.time = 0 game.focused = nil GRAVITY = 9.8 * 1.65 SCREEN_LEFT = nil SCREEN_RIGHT = nil SCREEN_TOP = nil SCREEN_BOTTOM = nil SCREEN_CENTER_X = nil SCREEN_CENTER_Y = nil SCREEN_WIDTH = nil SCREEN_HEIGHT = ni...
mit
apletnev/koreader-base
ffi/lodepng_h.lua
3
1088
local ffi = require("ffi") ffi.cdef[[ typedef enum LodePNGColorType LodePNGColorType; enum LodePNGColorType { LCT_GREY = 0, LCT_RGB = 2, LCT_PALETTE = 3, LCT_GREY_ALPHA = 4, LCT_RGBA = 6, }; const char *lodepng_error_text(unsigned int); unsigned int lodepng_decode32_file(unsigned char **, unsigned int *, uns...
agpl-3.0
gsingh93/ipscanner
app/src/main/assets/nmap/share/nmap/nselib/match.lua
2
1888
--- -- Buffered network I/O helper functions. -- -- The functions in this module can be used for delimiting data received by the -- <code>nmap.receive_buf</code> function in the Network I/O API (which see). -- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html module(... or "match", package.seeall) requ...
mit
mahyarnajibi/fast-rcnn-torch
utils/InputMaker.lua
1
1612
local InputMaker = torch.class('detection.InputMaker') local roi = detection.ROI() function InputMaker:__init() end function InputMaker:process(orig_im,bboxes) -- This function performs the needed processing on input images if type(bboxes) == 'table' then bboxes = torch.FloatTensor(bboxes) bboxes = bboxes...
mit
facebokiii/facebookplug
plugins/sikban.lua
1
6675
local function sik_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, ok_cb, true) end local function siktir_user(user_id, chat_id) -- Save to redis local hash = 'siktired:'..chat_id..':'..user_id redis:set(hash, true) -- Kick from chat kic...
gpl-2.0
jacklicn/mysql-proxy
examples/tutorial-inject.lua
6
2480
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
tltneon/NutScript
entities/weapons/nut_hands.lua
2
6712
AddCSLuaFile() if (CLIENT) then SWEP.PrintName = "Hands" SWEP.Slot = 0 SWEP.SlotPos = 1 SWEP.DrawAmmo = false SWEP.DrawCrosshair = false end SWEP.Author = "Chessnut" SWEP.Instructions = "Primary Fire: [RAISED] Punch\nSecondary Fire: Knock/Pickup" SWEP.Purpose = "Hitting things and knocking on doors." SWEP.Drop =...
mit
CodingKitsune/Riritools
riritools/lua/gui_draggable_bar.lua
1
1259
local class = require("riritools.lua.class") local gui_bar = require("riritools.lua.gui_bar") local gui_clickable_mixin = require("riritools.lua.gui_clickable_mixin") local draggable_bar = class("rt.gui_draggable_bar", gui_bar) function draggable_bar:__initialize(name, params, parent) gui_bar.__initialize(sel...
mit
sundream/gamesrv
script/card/neutral/card263015.lua
1
2304
--<<card 导表开始>> local super = require "script.card.neutral.card163015" ccard263015 = class("ccard263015",super,{ sid = 263015, race = 6, name = "铸剑师", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
Alireza5928/new1
plugins/mute-time.lua
24
1318
local function pre_process(msg) local hash = 'mute_time:'..msg.chat_id_ if redis:get(hash) and gp_type(msg.chat_id_) == 'channel' and not is_mod(msg) then tdcli.deleteMessages(msg.chat_id_, {[0] = tonumber(msg.id_)}) end end local function run(msg, matches) if matches[1]:lower() == 'mt' and is_mod(msg) t...
gpl-3.0
digitalloggers/nodemcu-firmware
lua_examples/yet-another-bmp085.lua
65
2608
------------------------------------------------------------------------------ -- BMP085 query module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- Heavily based on work of Christee <Christee@nodemcu.com> -- -- Example: -- dofile("bmp085.lua").read(sda, scl) ----------...
mit
weera00/nodemcu-firmware
lua_examples/yet-another-bmp085.lua
65
2608
------------------------------------------------------------------------------ -- BMP085 query module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- Heavily based on work of Christee <Christee@nodemcu.com> -- -- Example: -- dofile("bmp085.lua").read(sda, scl) ----------...
mit
HannesTuhkala/saitohud
src/SaitoHUD/lua/saitohud/modules/winamp.lua
3
3654
-- SaitoHUD -- Copyright (c) 2009-2010 sk89q <http://www.sk89q.com> -- Copyright (c) 2010 BoJaN -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 2 of the License, or ...
gpl-2.0
ElectricPrism/stargus
scripts/protoss/unit-protoss-scout.lua
1
2072
-- -- unit-protoss-scout -- DefineAnimations("animations-protoss-scout", { Still = {"frame 0", "wait 125",--[[FIXME: shift down 79A2]]}, Move = {"unbreakable begin", "frame 0", "move 3", "wait 2", "frame 0", "move 3", "wait 1", "frame 0", "move 3", "wait 2", "frame 0", "move 2", "wait 1", "frame 0", "move ...
gpl-2.0
jrversteegh/softsailor
deps/swig-2.0.4/Examples/lua/class/runme.lua
2
1333
-- file: runme.lua -- This file illustrates class C++ interface generated -- by SWIG. ---- importing ---- if string.sub(_VERSION,1,7)=='Lua 5.0' then -- lua5.0 doesnt have a nice way to do this lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') assert(lib)() else -- lua 5.1 do...
gpl-3.0
wangchenOS/skynet
lualib/sprotoparser.lua
4
8817
local lpeg = require "lpeg" local bit32 = require "bit32" local table = require "table" local P = lpeg.P local S = lpeg.S local R = lpeg.R local C = lpeg.C local Ct = lpeg.Ct local Cg = lpeg.Cg local Cc = lpeg.Cc local V = lpeg.V local function count_lines(_,pos, parser_state) if parser_state.pos < pos then parser...
mit
libremesh/lime-packages
packages/lime-hwd-openwrt-wan/files/usr/lib/lua/lime/hwd/openwrt_wan.lua
1
1623
#!/usr/bin/lua local hardware_detection = require("lime.hardware_detection") local config = require("lime.config") local utils = require("lime.utils") local openwrt_wan = {} openwrt_wan.sectionName = hardware_detection.sectionNamePrefix.."openwrt_wan" function openwrt_wan.clean() if config.autogenerable(openwrt_wa...
agpl-3.0
facebokiii/facebookplug
plugins/youtube.lua
644
1722
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 function get_yt_data (yt_code) local url = 'https://www.googleapis.com/yo...
gpl-2.0
movb/Algorithm-Implementations
Depth_First_Search/Lua/Yonaba/handlers/gridmap_handler.lua
182
2356
-- A grid map handler -- Supports 4-directions and 8-directions moves -- This handler is devised for 2d bounded grid where nodes are indexed -- with a pair of (x, y) coordinates. It features straight (4-directions) -- and diagonal (8-directions) moves. local PATH = (...):gsub('handlers.gridmap_handler$','') local Nod...
mit
kobakei/CCLocalNotification
cocos2d/external/lua/luajit/src/src/jit/dis_arm.lua
99
19364
---------------------------------------------------------------------------- -- LuaJIT ARM disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -...
apache-2.0
JohnFlowerful/offedit
matrix.lua
1
33774
--[[ matrix v 0.2.8 Lua 5.1 compatible 'matrix' provides a good selection of matrix functions. With simple matrices this script is quite useful, though for more exact calculations, one would probably use a program like Matlab instead. Matrices of size 100x100 can still be handled very well. The error for t...
gpl-3.0
ashfinal/awesome-hammerspoon
config-example.lua
2
2710
-- Specify Spoons which will be loaded hspoon_list = { "AClock", "BingDaily", -- "Calendar", "CircleClock", "ClipShow", "CountDown", "FnMate", "HCalendar", "HSaria2", "HSearch", -- "KSheet", "SpeedMenu", -- "TimeFlow", -- "UnsplashZ", "WinWin", } -- appM envi...
mit
alidess/aliali
bot/ad.lua
1
1514
do local function run(msg, matches) if matches[1] == "chat_add_user_link" then if msg.from.id == 0 then return else if not msg.from.username then nama = string.gsub(msg.from.print_name, "_", " ") else name = "@"..msg.from.username end ...
gpl-2.0
pandaforks/tido-rainbow
demos/recorder/main.lua
1
1610
-- Recorder Demo -- -- Copyright (c) 2010-14 Bifrost Entertainment AS and Tommy Nguyen -- Distributed under the MIT License. -- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) local g_scene = nil function clamp(v, min, max) return math.min(max, math.max(min, v)) end function init() lo...
mit
Sour/pfUI
modules/xpbar.lua
1
7034
pfUI:RegisterModule("xpbar", function () pfUI.xp = CreateFrame("Frame",nil, UIParent) pfUI.xp:SetWidth(5) if pfUI.chat then pfUI.xp:SetPoint("TOPLEFT", pfUI.chat.left, "TOPRIGHT", C.appearance.border.default*2, 0) pfUI.xp:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMRIGHT", C.appearance.border.default*2,...
mit
tomm/pioneer
data/modules/DeliverPackage/DeliverPackage.lua
1
17745
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local Lang = import("Lang") local Game = import("Game") local Space = import("Space") local Comms = import("Comms") local Event = import("Event") lo...
gpl-3.0
movb/Algorithm-Implementations
Iterative_Deepening_Depth_First_Search/Lua/Yonaba/handlers/point_graph_handler.lua
182
2492
-- A point graph handler -- This handler is devised for waypoints graphs. -- Waypoints are locations represented via labelled nodes -- and are connected with edges having a positive weight. -- It assumes edges are symmetric, that is if an edge exists -- between a and b, weight(a -> b) == weight(b -> a) local PATH = ...
mit
martin-eden/lua_code_formatter
workshop/mechs/processor/core/match.lua
1
1816
return function(self, rule) local rule_type = type(rule) if (rule_type == 'string') then return self.input_stream:match_string(rule) elseif (rule_type == 'function') then return rule(self.input_stream, self.output_stream) elseif (rule_type == 'table') then local op_neg = (rule.op == ...
gpl-3.0
nphilipp/ardour
scripts/_amp2.lua
3
1576
ardour { ["type"] = "dsp", name = "Simple Amp II", category = "Example", license = "MIT", author = "Ardour Lua Task Force", description = [[ An Example DSP Plugin for processing audio, to be used with Ardour's Lua scripting facility.]] } -- see amp1.lua function dsp_ioconfig () return { ...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/contrib/luadoc/lua/luadoc/config.lua
165
1234
------------------------------------------------------------------------------- -- LuaDoc configuration file. This file contains the default options for -- luadoc operation. These options can be overriden by the command line tool -- @see luadoc.print_help -- @release $Id: config.lua,v 1.6 2007/04/18 14:28:39 tomas Exp...
gpl-2.0
martin-eden/lua_code_formatter
workshop/formats/lua/quote_string.lua
2
1128
local quote_escaped = request('quote_string.linear') local quote_long = request('quote_string.intact') local quote_dump = request('quote_string.dump') local content_funcs = request('!.string.content_attributes') local has_control_chars = content_funcs.has_control_chars local has_backslashes = content_funcs.has_backsla...
gpl-3.0
ld-test/seawolf
database/init.lua
3
4090
local seawolf = require 'seawolf'.__build 'variable' local empty, require, ini_get, assert, pairs = seawolf.variable.empty, require, ini_get, assert, pairs local _M = {} -- TODO: --~ MYSQL_CLIENT_SSL = --~ MYSQL_CLIENT_COMPRESS = --~ MYSQL_CLIENT_IGNORE_SPACE = --~ MYSQL_CLIENT_INTERACTIVE = --~ MYSQL_ASSOC...
gpl-3.0
ashfinal/awesome-hammerspoon
Spoons/KSheet.spoon/init.lua
2
6675
--- === KSheet === --- --- Keybindings cheatsheet for current application --- --- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip) local obj={} obj.__index = obj -- Metadata obj.name = "KSheet" obj.version = ...
mit
sundream/gamesrv
script/card/wood/card222001.lua
1
2328
--<<card 导表开始>> local super = require "script.card.wood.card122001" ccard222001 = class("ccard222001",super,{ sid = 222001, race = 2, name = "公正之剑", type = 301, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ma...
gpl-2.0
nphilipp/ardour
scripts/s_plugin_automation.lua
3
1398
ardour { ["type"] = "Snippet", name = "Plugin automation" } function factory () return function () -- query playhead position and session sample-rate local playhead = Session:transport_frame () local samplerate = Session:nominal_frame_rate () -- get Track/Bus with RID 3 local r = Session:get_remote_nth_route(3) ...
gpl-2.0
ramindel22/delete
plugins/fun.lua
1
16338
--Begin Fun.lua By @deleteTeam --Special Thx To @To0fan -------------------------------- local function run_bash(str) local cmd = io.popen(str) local result = cmd:read('*all') return result end -------------------------------- local api_key = nil local base_api = "https://maps.googleapis.com/maps/api" ---...
gpl-3.0
Sour/pfUI
modules/buff.lua
1
4915
pfUI:RegisterModule("buff", function () pfUI.buff = CreateFrame("Frame") pfUI.buff:RegisterEvent("PLAYER_AURAS_CHANGED") pfUI.buff:RegisterEvent("UNIT_INVENTORY_CHANGED") pfUI.buff:RegisterEvent("UNIT_AURA") pfUI.buff:RegisterEvent("UNIT_MODEL_CHANGED") pfUI.buff:SetScript("OnEvent", function () if even...
mit
jacklicn/mysql-proxy
examples/tutorial-routing.lua
47
1829
--[[ $%BEGINLICENSE%$ Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
EvPowerTeam/EV_OP
feeds/packages/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua
14
3497
-- ------ extra functions ------ -- function ruleCheck() -- determine if rule needs a protocol specified local sourcePort = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".src_port")) local destPort = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".dest_port")) if sourcePort ~= "" or d...
gpl-2.0
sundream/gamesrv
script/card/soil/card251001.lua
1
2336
--<<card 导表开始>> local super = require "script.card.soil.card151001" ccard251001 = class("ccard251001",super,{ sid = 251001, race = 5, name = "塞纳留斯", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ma...
gpl-2.0
libremesh/lime-packages
packages/lime-proto-bmx7/files/usr/lib/lua/lime/proto/bmx7.lua
1
9159
#!/usr/bin/lua local network = require("lime.network") local config = require("lime.config") local fs = require("nixio.fs") local libuci = require("uci") local wireless = require("lime.wireless") local utils = require("lime.utils") bmx7 = {} bmx7.configured = false bmx7.f = "bmx7" function bmx7.configure(args) if ...
agpl-3.0
mortezaand/tgpragramer
location.lua
625
1564
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
SeyedKia/alpha
libs/url.lua
567
9183
--[[ Copyright 2004-2007 Diego Nehab. 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, distribute,...
agpl-3.0
SubjectAlpha/Zombie_Spawn_Creator
lua/autorun/server/sv_zombiespawn.lua
1
1215
local ZombieSpawnPoints = { { pos = Vector( 0, 0, 0 ) }, --Add as many as you like... Get the vectors by typing "getpos" in console. } local numZombies = 0 local maxZombies = 150 function ZombieSpawns() timer.Create( "Respawner", 10, 10, function() if ( numZombies < maxZombies ) then ...
mit
sundream/gamesrv
script/card/neutral/card166006.lua
1
2205
--<<card 导表开始>> local super = require "script.card.init" ccard166006 = class("ccard166006",super,{ sid = 166006, race = 6, name = "紫罗兰学徒", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
venusdeveloper/venus_beta
plugins/invite.lua
393
1225
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then -- I...
gpl-2.0
telergybot/telergy2
plugins/tweet.lua
634
7120
local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json" local client = OAuth.new(consumer_key, consumer_secret, ...
gpl-2.0
sev-/scummvm
devtools/create_ultima/files/ultima6/scripts/md/intro.lua
17
57970
local lua_file = nil --load common functions lua_file = nuvie_load("common/intro_common.lua"); lua_file(); local FREUD_STATE_STARING = 0 local FREUD_STATE_WRITING = 1 local function origin_fx_sequence() local g_img_tbl = image_load_all("title.lzc") canvas_set_palette("strax.pal", 0) local stars = sprit...
gpl-3.0
libremesh/lime-packages
packages/pirania/tests/test_read_for_access.lua
1
2370
local test_utils = require 'tests.utils' local utils = require('lime.utils') local read_for_access = require('read_for_access.read_for_access') local CONFIG_PATH = "./packages/pirania/files/etc/config/pirania" local current_time_s = 66040.78 local uci describe('read_for_access tests #readforaccess', function() lo...
agpl-3.0
jacklicn/mysql-proxy
tests/suite/base/t/bug_46141-mock.lua
4
1565
--[[ $%BEGINLICENSE%$ Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
tomm/pioneer
data/libs/Equipment.lua
1
35623
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local utils = import("utils") local Game = import_core("Game") local Serializer = import("Serializer") local Lang = import("Lang") local ShipDef = import("ShipDef") local Timer = i...
gpl-3.0
mahyarnajibi/fast-rcnn-torch
train/SequentialTrainer.lua
1
6004
require 'optim' require 'paths' local SequentialTrainer = torch.class('detection.SequentialTrainer') local utils = detection.GeneralUtils() local _iter_show = 20 function SequentialTrainer:__init(cls_criterion,reg_criterion,roi) -- Initializing... self._avg_cls_loss = 0 self._avg_reg_loss = 0 network:training() se...
mit
CodingKitsune/Riritools
riritools/lua/riritools_msgs.lua
1
5945
local table_utils = require("riritools.lua.table_utils") local rt_msg = table_utils.make_read_only_table { DISABLE_STENCIL_MASK = hash("rt_disable_stencil_mask"), ENABLE_STENCIL_MASK = hash("rt_enable_stencil_mask"), SET_ZOOM = hash("rt_set_zoom"), SET_MIRROR = hash("rt_set_mirror"), DELETE_OBJECT = hash...
mit
reonZ/Release-the-Hounds
game/dota_addons/release_the_hounds/scripts/vscripts/utils.lua
1
1193
function printf( ... ) print( string.format( ... ) ) end function CreateParticleFromPosition( position, particle_name, time_before_removal ) time_before_removal = time_before_removal or 1 local dummy = CreateUnitByName( 'npc_dummy_blank', position, false, nil, nil, DOTA_TEAM_NEUTRALS ) local particle = ParticleMan...
mit
LuaDist2/lua-curl
lakeconfig.lua
4
5384
local io = require "io" io.stdout:setvbuf"no" io.stderr:setvbuf"no" function vc_version() local VER = lake.compiler_version() MSVC_VER = ({ [15] = '9'; [16] = '10'; })[VER.MAJOR] or '' return MSVC_VER end if not L then local function arkey(t) assert(type(t) == 'table') local keys = {} for k in ...
mit