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
xponen/Zero-K
LuaUI/Widgets/chili/Controls/button.lua
17
1147
--//============================================================================= Button = Control:Inherit{ classname= "button", caption = 'button', defaultWidth = 70, defaultHeight = 20, } local this = Button local inherited = this.inherited --//============================================================...
gpl-2.0
xponen/Zero-K
lups/ParticleClasses/gimmick1.lua
15
4559
-- $Id: gimmick1.lua 3171 2008-11-06 09:06:29Z det $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local SantaHat = {} SantaHat.__index =...
gpl-2.0
xponen/Zero-K
LuaUI/Widgets/chili/simple examples/Widgets/gui_chiligui.lua
18
2737
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "chiliGUI", desc = "hot GUI Framework", author = "jK & quantum", date = "WIP", ...
gpl-2.0
alastair-robertson/awesome
lib/awful/screen.lua
1
14105
--------------------------------------------------------------------------- --- Screen module for awful -- -- @author Julien Danjou <julien@danjou.info> -- @copyright 2008 Julien Danjou -- @release @AWESOME_VERSION@ -- @module screen --------------------------------------------------------------------------- -- ...
gpl-2.0
alastair-robertson/awesome
lib/awful/widget/keyboardlayout.lua
3
10901
--------------------------------------------------------------------------- -- @author Aleksey Fedotov <lexa@cfotr.com> -- @copyright 2015 Aleksey Fedotov -- @release @AWESOME_VERSION@ -- @classmod wibox.widget.keyboardlayout --------------------------------------------------------------------------- local capi ...
gpl-2.0
xponen/Zero-K
LuaRules/Gadgets/dbg_ceg_spawner.lua
1
1960
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function gadget:GetInfo() return { name = "CEG Spawner", desc = 'Spawn CEGs', author = "CarRepairer", date = "2010-11-07"...
gpl-2.0
alastair-robertson/awesome
lib/gears/geometry.lua
3
8263
--------------------------------------------------------------------------- -- -- Helper functions used to compute geometries. -- -- When this module refer to a geometry table, this assume a table with at least -- an *x*, *y*, *width* and *height* keys and numeric values. -- -- @author Julien Danjou <julien@danjou.i...
gpl-2.0
gdestuynder/MozDef
examples/heka-lua-bro/bro_conn.lua
2
3512
-- 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 local l=require "lpeg" local string=require "string" l.locale(l) --add loca...
mpl-2.0
mortezamosavy999/monster
plugins/meme.lua
637
5791
local helpers = require "OAuth.helpers" local _file_memes = './data/memes.lua' local _cache = {} local function post_petition(url, arguments) local response_body = {} local request_constructor = { url = url, method = "POST", sink = ltn12.sink.table(response_body), headers = {}, red...
gpl-2.0
AmirVTA/Dandelion
bot/bot.lua
1
7046
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") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This function is ...
gpl-3.0
pjulien/flatbuffers
tests/MyGame/Example/TypeAliases.lua
12
4520
-- automatically generated by the FlatBuffers compiler, do not modify -- namespace: Example local flatbuffers = require('flatbuffers') local TypeAliases = {} -- the module local TypeAliases_mt = {} -- the class metatable function TypeAliases.New() local o = {} setmetatable(o, {__index = TypeAliases_mt}) ...
apache-2.0
xponen/Zero-K
units/corclog.lua
1
4115
unitDef = { unitname = [[corclog]], name = [[Dirtbag]], description = [[Box of Dirt]], acceleration = 0.2, brakeRate = 0.2, buildCostEnergy = 30, buildCostMetal = 30, buildPic = [[corclog.png]], buildTime ...
gpl-2.0
D3vMa3sTrO/superbot
plugins/lock_inlin.lua
1
1347
--[[ _ _ _ _____ _____ ____ ____ / \ / \ / \ | ____|___|_ _| /_\ \ / __ \ Đєⱴ 💀: @MaEsTrO_0 / / \/ / \ / _ \ | _| / __| | | | |_\_/| | | | Đєⱴ 💀: @devmaestr0 / / \ \/ \ \ / ___ \| |___\__ \ | | | | \ \| |__| | Đєⱴ ฿๏ͳ💀: @iqMaestroBot /_/ \/ ...
gpl-2.0
mortezamosavy999/monster
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
egaebel/cifar-neural-networks
old-code/first-cnn-arch.lua
1
5079
require 'torch' require 'nn' require 'cifar10-data-loader' local EXCLUDE_CUDA_FLAG = false local function cudaRequires() require 'cutorch' require 'cunn' end if pcall(cudaRequires) then print('Imported cuda modules in first-cnn-arch') else print('Failed to import cuda modules in first-cnn-arch') EX...
mit
nwf/nodemcu-firmware
lua_modules/ds3231/ds3231.lua
7
6895
-------------------------------------------------------------------------------- -- DS3231 I2C module for NODEMCU -- NODEMCU TEAM -- LICENCE: http://opensource.org/licenses/MIT -- Tobie Booth <tbooth@hindbra.in> -------------------------------------------------------------------------------- require("bit") require("i2...
mit
jackywgw/ntopng_test
scripts/callbacks/daily.lua
2
2184
-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "alert_utils" if(ntop.isPro()) then package.path = dirs.installdir .. "/pro/scripts/callbacks/?.lua;" .. package.path require("daily") end -- Delet...
gpl-3.0
4aiman/MineClone
mods/WorldEdit/worldedit/primitives.lua
3
16121
worldedit = worldedit or {} local minetest = minetest --local copy of global --adds a hollow sphere centered at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added worldedit.hollow_sphere = function(pos, radius, nodename) --set up voxel manipulator local manip = minetest.get...
lgpl-2.1
LuaDist2/nginx-metrix
tests/listener_spec.lua
2
2307
require('tests.bootstrap')(assert) describe('listener', function() local listener before_each(function() package.loaded['nginx-metrix.listener'] = nil listener = require 'nginx-metrix.listener' end) after_each(function() package.loaded['nginx-metrix.listener'] = nil _...
mit
MRAHS/UBTEST
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
kiarash14/spam
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
jjimenezg93/ai-pathfinding
moai/src/lua-headers/moai.lua
3
14903
--============================================================== -- Copyright (c) 2010-2011 Zipline Games, Inc. -- All Rights Reserved. -- http://getmoai.com --============================================================== --============================================================-- -- initTransform2DInterface -...
mit
shreyaspotnis/S4
examples/MPI_example/binary_grating_mpi.lua
14
1769
-- In a 1D pattern, the pattern should be specified only with rectangles. -- The y-dimension of the rectangles is ignored. S = S4.NewSimulation() S:SetLattice({1,0}, {0,0}) -- 1D lattice S:SetNumG(27) -- Material definition S:AddMaterial("Silicon", {12,0}) -- real and imag parts S:AddMaterial("Vacuum", {1,0}...
gpl-2.0
jmaurice/profiles
gui/awesome/vicious/widgets/pkg.lua
4
1320
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> --------------------------------------------------- -- {{{ Grab environment local io = { popen = io.popen } local math = { max = math.max } local setmetatable = setmeta...
mit
rogerpueyo/luci
libs/luci-lib-nixio/axTLS/www/lua/download.lua
180
1550
#!/usr/local/bin/lua require"luasocket" function receive (connection) connection:settimeout(0) local s, status = connection:receive (2^10) if status == "timeout" then coroutine.yield (connection) end return s, status end function download (host, file, outfile) --local f = assert (io.open (outfile, "w")) loc...
apache-2.0
infernal1200/infernall
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
persiaAziz/trafficserver
lib/luajit/src/jit/dump.lua
84
19509
---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -...
apache-2.0
jjimenezg93/ai-pathfinding
moai/3rdparty/luasql-2.2.0/tests/mysql.lua
6
1078
--------------------------------------------------------------------- -- MySQL specific tests and configurations. -- $Id: mysql.lua,v 1.4 2006/01/25 20:28:30 tomas Exp $ --------------------------------------------------------------------- QUERYING_STRING_TYPE_NAME = "binary(65535)" table.insert (CUR_METHODS, "numrow...
mit
merlinblack/Game-Engine-Testbed
scripts/gui/gui.lua
1
1314
-- Basic GUI parts. require 'gui/dialogpanel' require 'gui/text' require 'gui/markup' require 'gui/button' require 'gui/dragbutton' require 'gui/checkbox' require 'gui/control' require 'gui/mouse' require 'gui/keybinding' -- Higher level parts. require 'gui/quit' require 'gui/message' -- Testing --require 'gui/guites...
mit
alexandergall/snabbswitch
src/lib/lpm/ip6.lua
9
3597
module(..., package.seeall) local ffi = require("ffi") local C = ffi.C local lib = require("core.lib") local htons = lib.htons local ntohs = lib.ntohs IP6 = {} ip6_t = ffi.typeof([[ union { uint64_t u64[2]; uint16_t u16[8]; uint8_t u8[16]; } ]]) local function colons (str) local i = 0 for _ in string.g...
apache-2.0
Samnsparky/ljswitchboard
switchboard_modules/lua_script_debugger/premade_scripts/Sensor_Examples/ADXL345 3-axis Accel (SPI).lua
1
5225
print("Communicate with an ADXL345 SPI accelerometer") --For more information about SPI on the T7, see the T7 datasheet --http://labjack.com/support/datasheets/t7/digital-io/spi --For more information on the ADXL345, see the datasheet --http://www.analog.com/static/imported-files/data_sheets/ADXL345.pdf --Supply voltag...
mit
xponen/Zero-K
LuaUI/Widgets/gui_chili_crudeplayerlist.lua
1
26215
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Chili Crude Player List", desc = "v1.327 Chili Crude Player List.", author = "CarRepair...
gpl-2.0
xponen/Zero-K
effects/ariel.lua
25
6283
-- ariel_splosh -- ariel_gurgle -- ariel_fizz_bubble -- ariel_splash -- ariel_fizz -- torplosion return { ["ariel_splosh"] = { splosh = { air = true, class = [[CSimpleParticleSystem]], count = 1, ground = true, water ...
gpl-2.0
Vermeille/kong
kong/plugins/udp-log/handler.lua
5
1274
local BasePlugin = require "kong.plugins.base_plugin" local serializer = require "kong.plugins.log-serializers.basic" local cjson = require "cjson" local timer_at = ngx.timer.at local udp = ngx.socket.udp local UdpLogHandler = BasePlugin:extend() UdpLogHandler.PRIORITY = 1 local function log(premature, conf, str) ...
apache-2.0
xuejian1354/barrier_breaker
feeds/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...
gpl-2.0
xponen/Zero-K
LuaUI/Widgets/chili_new/controls/screen.lua
8
7553
--- Screen module --- Screen fields. -- Inherits from Object. -- @see object.Object -- @table Screen -- @int[opt=0] x x position -- @int[opt=0] y y position -- @int[opt=0] width width -- @int[opt=0] height height -- @tparam control.Control activeControl active control -- @tparam control.Control focusedControl focused ...
gpl-2.0
JosephMcGrath/Misc-scripts
lua/ComputerCraft/clear.lua
1
1492
--Clears and paves an area, leaving caves exposed --Set parameters-------------------------------------------------------------- rightFirst = true lineDepth = 50 nLines = 50 --Define functions------------------------------------------------------------ function overburden() i = 1 while turtle.detectUp() do ...
gpl-3.0
Canaan-Creative/luci
libs/httpclient/luasrc/httpclient/receiver.lua
93
6049
--[[ 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$ ]]-- requ...
apache-2.0
rogerpueyo/luci
applications/luci-app-banip/luasrc/model/cbi/banip/blacklist_tab.lua
7
1628
-- Copyright 2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") local util = require("luci.util") local uci = require("luci.model.uci").cursor() local input = uci:get("banip", "blacklist", "ban_src") or uci:get("banip", "bla...
apache-2.0
halfnelson/moaicli
templates/project/src/main.lua
1
1350
---------------------------------------------------------------- -- Copyright (c) 2010-2011 Zipline Games, Inc. -- All Rights Reserved. -- http://getmoai.com ---------------------------------------------------------------- MOAISim.openWindow ( "test", 320, 480 ) viewport = MOAIViewport.new () viewport:setSize ( 320...
mit
alexandergall/snabbswitch
src/apps/ipv4/echo.lua
2
5152
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. -- ICMPv4 echo request ("ping") responder (RFC 792) module(..., package.seeall) local bit = require("bit") local ffi = require("ffi") local lib = require("core.lib") local packet = require("core.packet") local cou...
apache-2.0
shahabsaf1/merbot
bot/utils.lua
28
14994
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0
xponen/Zero-K
scripts/cordoom.lua
1
3451
include "constants.lua" --pieces local base = piece "Base" local shellbase = piece "ShellBase" local shell_1 = piece "Shell_1" local shell_2 = piece "Shell_2" -- guns local cannonbase = piece "CannonBase" local cannon = piece "Cannon" local flare1 = piece "flare1" local heatraybase = piece "HeatrayBase" local heatr...
gpl-2.0
Poyer/Anchor-BoT
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
alexandergall/snabbswitch
src/lib/yang/path_data.lua
1
36194
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(..., package.seeall) local ffi = require("ffi") local lib = require("core.lib") local data = require("lib.yang.data") local value = require("lib.yang.value") local schema = require("lib.yang.schema") local parse_path = require("lib....
apache-2.0
sandsmark/vlc-kio
share/lua/meta/art/02_frenchtv.lua
48
2666
--[[ Gets an artwork from amazon $Id$ Copyright © 2007 the VideoLAN team 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...
gpl-2.0
alexandergall/snabbswitch
lib/ljsyscall/syscall/linux/syscalls.lua
2
29596
-- This is the actual system calls for Linux local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = requi...
apache-2.0
Poyer/Anchor-BoT
plugins/rae.lua
616
1312
do function getDulcinea( text ) -- Powered by https://github.com/javierhonduco/dulcinea local api = "http://dulcinea.herokuapp.com/api/?query=" local query_url = api..text local b, code = http.request(query_url) if code ~= 200 then return "Error: HTTP Connection" end dulcinea = json:decode(b) ...
gpl-2.0
mortezamosavy999/monster
plugins/rae.lua
616
1312
do function getDulcinea( text ) -- Powered by https://github.com/javierhonduco/dulcinea local api = "http://dulcinea.herokuapp.com/api/?query=" local query_url = api..text local b, code = http.request(query_url) if code ~= 200 then return "Error: HTTP Connection" end dulcinea = json:decode(b) ...
gpl-2.0
ehsankohansal051/protective
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...
agpl-3.0
DavidIngraham/ardupilot
libraries/AP_Scripting/examples/LED_roll.lua
26
2127
--[[ Script to control LED strips based on the roll of the aircraft. This is an example to demonstrate the LED interface for WS2812 LEDs --]] --[[ for this demo we will use a single strip with 30 LEDs --]] local num_leds = 30 --[[ use SERVOn_FUNCTION 94 for LED. We can control up to 16 separate strips of LEDs by pu...
gpl-3.0
nifty-site-manager/nsm
LuaJIT/src/jit/dis_mips.lua
6
22010
---------------------------------------------------------------------------- -- LuaJIT MIPS disassembler module. -- -- Copyright (C) 2005-2021 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------...
mit
ld-test/lzmq
examples/perf/remote_lat.lua
16
2160
-- Copyright (c) 2010 Aleksey Yeschenko <aleksey@yeschenko.com> -- -- 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, c...
mit
pablo93/TrinityCore
Data/Interface/FrameXML/UIParent.lua
1
90154
TOOLTIP_UPDATE_TIME = 0.2; ROTATIONS_PER_SECOND = .5; -- Alpha animation stuff FADEFRAMES = {}; FLASHFRAMES = {}; -- Pulsing stuff PULSEBUTTONS = {}; -- Shine animation SHINES_TO_ANIMATE = {}; -- Needs to be defined here so the manage frames function works properly BATTLEFIELD_TAB_OFFSET_Y = 0; -- Per panel settin...
gpl-2.0
brewsterl/forgottenserver-1
data/spells/scripts/party/train.lua
2
2033
local combat = createCombatObject() local area = createCombatArea(AREA_CROSS5X5) setCombatArea(combat, area) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, ...
gpl-2.0
xponen/Zero-K
LuaUI/chat_preprocess.lua
1
6832
--Chat preprocessor. Provide preprocessed chat message for Chili Chat widget --last update: 20 May 2014 local myName = Spring.GetPlayerInfo(Spring.GetMyPlayerID()) local transmitMagic = "> ["..myName.."]!transmit" -- Lobby is sending to LuaUI local voiceMagic = "> ["..myName.."]!transmit voice" -- Lobby is sending a v...
gpl-2.0
xponen/Zero-K
LuaRules/Utilities/GetUnitIsBuilding.lua
1
3454
-- $Id:$ ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- -- -- Author: jK @2010 -- License: GPLv2 and later -- -------------------------------------------------------------------------------------...
gpl-2.0
Schaka/gladdy
Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
5
5150
local AceGUI = LibStub("AceGUI-3.0") -------------------------- -- Keybinding -- -------------------------- do local Type = "Keybinding" local Version = 8 local ControlBackdrop = { bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true,...
mit
DavidIngraham/ardupilot
libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua
24
5180
-- This script is a useful tool when first setting up a heli. You can use it to dial in the IM_STB_COL_2 and -- IM_STAB_COL_3 parameters in a more intuative way. It is meant for use with a transmitter that has two pots -- available. 1 Pot can be used to control the gradient of the line between the 40% and 60% curve...
gpl-3.0
rogerpueyo/luci
build/luadoc/luadoc/taglet/standard/tags.lua
32
5542
------------------------------------------------------------------------------- -- Handlers for several tags -- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $ ------------------------------------------------------------------------------- local luadoc = require "luadoc" local util = require "luadoc.util"...
apache-2.0
alexandergall/snabbswitch
lib/luajit/testsuite/test/lang/meta/newindex.lua
6
1479
do --- table 1 local t=setmetatable({}, {__newindex=function(t,k,v) rawset(t, k, 100-v) end}) for i=1,100 do t[i] = i end for i=1,100 do assert(t[i] == 100-i) end for i=1,100 do t[i] = i end for i=1,100 do assert(t[i] == i) end for i=1,100 do t[i] = nil end for i=1,100 do t[i] = i end for i=1,1...
apache-2.0
alexandergall/snabbswitch
src/lib/json.lua
29
10286
-- JSON4Lua: JSON encoding / decoding support for the Lua language. -- json Module. -- Author: Craig Mason-Jones -- Homepage: http://json.luaforge.net/ -- Version: 0.9.40 -- This module is released under the MIT License (MIT). -- -- NOTE: This is only the decode functionality ripped out from JSON4Lua. -- See: https://g...
apache-2.0
xponen/Zero-K
LuaRules/Gadgets/91_unit_capture.lua
1
18756
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function gadget:GetInfo() return { name = "Capture_91", desc = "Handles Yuri Style Capture System", author = "Google Frog",...
gpl-2.0
alexandergall/snabbswitch
src/apps/test/match.lua
12
2823
module(...,package.seeall) local ffi = require("ffi") local C = ffi.C local lib = require("core.lib") local function dump (p) return lib.hexdump(ffi.string(p.data, p.length)) end Match = { config = { fuzzy = {}, modest = {} } } function Match:new (conf) return setmetatable({ fuzzy = conf.fuzzy, ...
apache-2.0
link4all/20170920openwrt
own_files/ar934x/files_aolkee9341/usr/lib/lua/luci/controller/admin/index.lua
21
1141
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.index", package.seeall) function index() local root = node() if not root.target then root.target = alias("admin") root.index = true end local page = node("admin") page....
gpl-2.0
link4all/20170920openwrt
own_files/files_pt100/usr/lib/lua/luci/controller/admin/index.lua
21
1141
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.index", package.seeall) function index() local root = node() if not root.target then root.target = alias("admin") root.index = true end local page = node("admin") page....
gpl-2.0
link4all/20170920openwrt
own_files/qca953x/files_9531_zhongxing/usr/lib/lua/luci/controller/admin/index.lua
21
1141
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.index", package.seeall) function index() local root = node() if not root.target then root.target = alias("admin") root.index = true end local page = node("admin") page....
gpl-2.0
Canaan-Creative/luci
applications/luci-pbx/luasrc/model/cbi/pbx-advanced.lua
99
14473
--[[ 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
shahabsaf1/powerhelper
plugins/inrealm.lua
6
24921
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
Canaan-Creative/luci
protocols/ipv6/luasrc/model/network/proto_4x6.lua
63
1522
--[[ LuCI - Network model - 6to4, 6in4 & 6rd protocol extensions Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Copyright 2013 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 ...
apache-2.0
Paradokz/BadRotations
Rotations/Hunter/Beastmaster/BeastmasterCpoworks.lua
3
35210
local rotationName = "Cpoworks" --------------- --- Toggles --- --------------- local function createToggles() -- Rotation Button RotationModes = { [1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps between Single and Multiple based on number of targets in range.", highlight = ...
gpl-3.0
jackywgw/ntopng_test
scripts/lua/modules/json.lua
10
4552
-- -- (C) 2013-15 - ntop.org -- --- Simple class for JSON parsing dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path local parseElement local function skipWhitespaces(content, pos) local _,nend = content:find("^[ \n\r\t]+", pos) if (nend ~= nil) then retur...
gpl-3.0
crwnet/openwrt-15.05
package/crwsoft/luci-app-kcptun/luasrc/controller/kcptun.lua
1
1030
--[[ openwrt-dist-luci: kcptun ]]-- module("luci.controller.kcptun", package.seeall) function index() if not nixio.fs.access("/etc/config/kcptun") then return end entry({"admin", "services", "kcptun"}, cbi("kcptun/global"), _("Kcptun"), 2).dependent = true entry({"admin", "services", "kcptun", "serverconfig"},...
gpl-2.0
jmaurice/profiles
gui/awesome/vicious/contrib/pop.lua
5
1406
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Boris Bolgradov <> -- -- This widget type depends on luasocket. -- -- Widget arguments are host, port, username and -- password, i.e.: -- {"mail.myhost.com", 110, "John", "132435"} ----------------...
mit
brunaaleixo/Sistemas-Reativos
tarefa7/servidorbasico.lua
1
2716
-- SWITCH -- sw1 = 1 sw2 = 2 gpio.mode(sw1, gpio.INPUT) gpio.mode(sw2, gpio.INPUT) local sw={} sw[1]="OFF" sw[0]="ON_" -- LED -- led1 = 3 led2 = 6 -- set LED mode gpio.mode(led1, gpio.OUTPUT) gpio.mode(led2, gpio.OUTPUT) -- initialize LED state gpio.write(led1, gpio.LOW); gpio.write(led2, gpio.LOW); function c...
mit
kernelsauce/turbo
examples/httpserver.lua
12
1544
--- Turbo.lua Hello world using HTTPServer -- -- Using the HTTPServer offers more control for the user, but less convenience. -- In almost all cases you want to use turbo.web.RequestHandler. -- -- Copyright 2013 John Abrahamsen -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use thi...
apache-2.0
sandsmark/vlc-kio
share/lua/intf/modules/httprequests.lua
6
15675
--[==========================================================================[ httprequests.lua: code for processing httprequests commands and output --[==========================================================================[ Copyright (C) 2007 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at video...
gpl-2.0
alexandergall/snabbswitch
lib/ljsyscall/syscall/ffitypes.lua
24
2200
-- these are types which are currently the same for all ports -- in a module so rump does not import twice -- note that even if type is same (like pollfd) if the metatype is different cannot be here due to ffi -- TODO not sure we want these long term, merge to individual OS files. local require, error, assert, tonumb...
apache-2.0
deepakjois/ufy
src/ufy/loader.lua
1
2331
local loader = {} -- Cache the current kpse based searchers local kpse_lua_searcher = package.searchers[2] local kpse_clua_searcher = package.searchers[3] -- Emulates the default package.searchers[2] searcher. local function lua_searcher(name) local file, err = package.searchpath(name,package.path) if err then ...
mit
alexandergall/snabbswitch
src/lib/yang/alarms.lua
6
32084
module(..., package.seeall) local data = require('lib.yang.data') local lib = require('core.lib') local util = require('lib.yang.util') local counter = require("core.counter") local format_date_as_iso_8601 = util.format_date_as_iso_8601 local parse_date_as_iso_8601 = util.parse_date_as_iso_8601 local alarm_handler f...
apache-2.0
link4all/20170920openwrt
own_files/mt7628/files_hangzhou_ddc/usr/lib/lua/luci/sys.lua
21
15277
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local io = require "io" local os = require "os" local table = require "table" local nixio = require "nixio" local fs = require "nixio.fs" local uci = require "luci.model.uci" local luci = {} l...
gpl-2.0
link4all/20170920openwrt
own_files/ar934x/files_yn9341/usr/lib/lua/luci/sys.lua
21
15277
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local io = require "io" local os = require "os" local table = require "table" local nixio = require "nixio" local fs = require "nixio.fs" local uci = require "luci.model.uci" local luci = {} l...
gpl-2.0
xponen/Zero-K
scripts/tele_beacon.lua
1
2172
include "constants.lua" include "utility.lua" local beacon, holder, sphere = piece('beacon', 'holder', 'sphere') local SIG_CEG_EFFECTS = 1 local smokePiece = {sphere} local spinmodes = { [1] = {holder = 30, sphere = 25}, [2] = {holder = 50, sphere = 45}, [3] = {holder = 100, sphere = 130}, } local holderDirect...
gpl-2.0
Judge-Dead/streetKing-gtav
ressources/interiors/scripts/client/c.lua
1
3374
RegisterNetEvent('sendInteriors') candraw = false iteriors = {} distance = 50.5999 -- distance to draw timer = 0 current_int = 0 AddEventHandler('onClientMapStart', function() TriggerServerEvent("getInteriors") end) AddEventHandler('sendInteriors', function(idata) iteriors = idata candraw = not candraw end) funct...
gpl-3.0
xponen/Zero-K
units/puppy.lua
1
4504
unitDef = { unitname = [[puppy]], name = [[Puppy]], description = [[Walking Missile]], acceleration = 0.24, activateWhenBuilt = true, brakeRate = 0.24, buildCostEnergy = 50, buildCostMetal = 50, builder ...
gpl-2.0
UB12/ub
bot/utils.lua
646
23489
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
xponen/Zero-K
units/tiptest.lua
4
6649
unitDef = { unitname = [[tiptest]], name = [[TIP test unit]], description = [[bla]], acceleration = 0.008, brakeRate = 0.0385, buildCostEnergy = 250, buildCostMetal = 250, builder = false, buildPic ...
gpl-2.0
MRAHS/UBTEST
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
kiarash14/spam
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
eagle14/Snippy-git
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
xponen/Zero-K
effects/gundam_xamelimpact.lua
18
12632
-- xamelimpact -- smallxamelimpact return { ["xamelimpact"] = { dirta = { air = true, class = [[CSimpleParticleSystem]], count = 1, properties = { airdrag = 0.7, alwaysvisible = true, colormap = [[0...
gpl-2.0
alexandergall/snabbswitch
lib/ljsyscall/syscall/freebsd/types.lua
24
10466
-- FreeBSD types local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local function init(types) local abi = requ...
apache-2.0
DavidIngraham/ardupilot
libraries/AP_Scripting/tests/strings.lua
26
13753
-- $Id: strings.lua,v 1.86 2016/11/07 13:11:28 roberto Exp roberto $ --[[ ***************************************************************************** * Copyright (C) 1994-2016 Lua.org, PUC-Rio. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated document...
gpl-3.0
Elanis/SciFi-Pack-Addon-Gamemode
lua/entities/b5_vorchan/init.lua
1
4435
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include('shared.lua') function ENT:SpawnFunction( ply,tr ) local ent = ents.Create("b5_vorchan") --SpaceShip entity ent:SetPos( tr.HitPos + Vector(0,0,220)) ent:Spawn() ent:Activate() return ent end function ENT:Initialize() self.MaxHealth = 1000 self.P...
gpl-2.0
SirNate0/Urho3D
bin/Data/LuaScripts/09_MultipleViewports.lua
24
13081
-- Multiple viewports example. -- This sample demonstrates: -- - Setting up two viewports with two separate cameras -- - Adding post processing effects to a viewport's render path and toggling them require "LuaScripts/Utilities/Sample" local rearCameraNode = nil function Start() -- Execute the ...
mit
ld-test/lzmq
test/lunit/console.lua
19
3798
--[[-------------------------------------------------------------------------- This file is part of lunit 0.6. For Details about lunit look at: http://www.mroth.net/lunit/ Author: Michael Roth <mroth@nessie.de> Copyright (c) 2006-2008 Michael Roth <mroth@nessie.de> Permission is hereby granted...
mit
DavidIngraham/ardupilot
libraries/AP_Scripting/examples/ahrs-source-gps-optflow.lua
8
11147
-- switches between AHRS/EKF sources based on the pilot's source selection switch or using an automatic source selection algorithm -- this script is intended to help vehicles automatically switch between GPS and optical flow -- -- configure a forward or downward facing lidar with a range of at least 5m -- setup RCx_OPT...
gpl-3.0
alexandergall/snabbswitch
lib/luajit/src/host/genminilua.lua
47
12039
---------------------------------------------------------------------------- -- Lua script to generate a customized, minified version of Lua. -- The resulting 'minilua' is used for the build process of LuaJIT. ---------------------------------------------------------------------------- -- Copyright (C) 2005-2017 Mike P...
apache-2.0
masterteam1/Master-plus
bot/bot.lua
1
9408
tdcli = dofile('./tg/tdcli.lua') serpent = (loadfile "./libs/serpent.lua")() feedparser = (loadfile "./libs/feedparser.lua")() require('./bot/utils') URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "....
gpl-3.0
efelix/lua-cjson
tests/common.lua
3
5978
require "cjson" -- Misc routines to assist with CJSON testing -- -- Mark Pulford <mark@kyne.com.au> -- Determine with a Lua table can be treated as an array. -- Explicitly returns "not an array" for very sparse arrays. -- Returns: -- -1 Not an array -- 0 Empty table -- >0 Highest index in the array function is...
mit