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 |
|---|---|---|---|---|---|
link4all/20170920openwrt | own_files/files_pt100/usr/lib/lua/luci/controller/admin/servicectl.lua | 21 | 1168 | -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.servicectl", package.seeall)
function index()
entry({"servicectl"}, alias("servicectl", "status")).sysauth = "admin"
entry({"servicectl", "status"}, call("action_status")).leaf =... | gpl-2.0 |
link4all/20170920openwrt | own_files/mt7628/files_tw7628_wifidog/usr/lib/lua/luci/controller/admin/servicectl.lua | 21 | 1168 | -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.servicectl", package.seeall)
function index()
entry({"servicectl"}, alias("servicectl", "status")).sysauth = "admin"
entry({"servicectl", "status"}, call("action_status")).leaf =... | gpl-2.0 |
link4all/20170920openwrt | own_files/mt7628/files_7628fanglikai/usr/lib/lua/luci/controller/admin/servicectl.lua | 21 | 1168 | -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.servicectl", package.seeall)
function index()
entry({"servicectl"}, alias("servicectl", "status")).sysauth = "admin"
entry({"servicectl", "status"}, call("action_status")).leaf =... | gpl-2.0 |
xponen/Zero-K | units/armnanotc.lua | 1 | 4930 | unitDef = {
unitname = [[armnanotc]],
name = [[Caretaker]],
description = [[Nanoturret, Builds at 10 m/s]],
acceleration = 0,
brakeRate = 1.5,
buildCostEnergy = 220,
buildCostMetal ... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/cmd_customformations2.lua | 2 | 39044 | function widget:GetInfo()
return {
name = "CustomFormations2",
desc = "Allows you to draw a formation line:"..
"\n mouse drag draw various command on ground."..
"\n ALT+Attack draw attack command on the ground.",
author = "Niobium, modified by Skasi", -- Based on 'Custom Formations' by j... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/gui_auto_engine_falsecolor.lua | 2 | 4391 | local version = "v1.0"
function widget:GetInfo()
return {
name = "Auto-toggle false color vision",
desc = version .. " provide options to automatically toggle Spring's false color vision" ..
" by detecting current active command.",
author = "Msafwan",
date = "17 July 2013",
lice... | gpl-2.0 |
Paradokz/BadRotations | Rotations/Monk/Mistweaver/MistweaverLyLoLoq.lua | 3 | 39203 | local rotationName = "LyLoLoq"
---------------
--- Toggles ---
---------------
local function createToggles()
-- Cooldown Button
CooldownModes = {
[1] = { mode = "Auto", value = 1 , overlay = "Cooldowns Automated", tip = "Automatic Cooldowns - Boss Detection", highlight = 1, icon = br.player.spell.life... | gpl-3.0 |
jackywgw/ntopng_test | scripts/lua/db.lua | 3 | 3929 | --
-- (C) 2013-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
-- io.write ("Session:".._SESSION["session"].."\n")
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
... | gpl-3.0 |
alexandergall/snabbswitch | src/lib/yang/binary.lua | 3 | 23753 | -- Use of this source code is governed by the Apache 2.0 license; see
-- COPYING.
module(..., package.seeall)
local S = require("syscall")
local ffi = require("ffi")
local lib = require("core.lib")
local shm = require("core.shm")
local file = require("lib.stream.file")
local schema = require("lib.yang.schema")
local u... | apache-2.0 |
lambd0x/Awesome-wm-Funtoo-GreenInfinity | awesome/lain/util/init.lua | 2 | 4967 |
--[[
Lain
Layouts, widgets and utilities for Awesome WM
Utilities section
... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/camera_recorder.lua | 17 | 8831 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "CameraRecorder",
desc = "v0.011 Record positions of the camera to a file and repath those posi... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-pbx/luasrc/model/cbi/pbx-google.lua | 146 | 5490 | --[[
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
... | gpl-2.0 |
Xamla/torch-pcl | demo/cropsphere_filter_demo.lua | 1 | 1187 | local pcl = require 'pcl'
local cloud = pcl.rand(10000)
local removed = pcl.Indices()
local sphere_filtered = pcl.filter.cropSphere(
cloud, -- input
{0.5,0.5,0.5}, -- center
0.4, -- radius
nil, -- transform
nil, -- indices
nil, -- output
... | bsd-3-clause |
eulerreich/rnn | Recurrent.lua | 1 | 12143 | ------------------------------------------------------------------------
--[[ Recurrent ]]--
-- Ref. A.: http://goo.gl/vtVGkO (Mikolov et al.)
-- B. http://goo.gl/hu1Lqm
-- Processes the sequence one timestep (forward/backward) at a time.
-- A call to backward only keeps a log of the gradOutputs and scales.
-- Back-Pr... | bsd-3-clause |
xponen/Zero-K | effects/gaatgun.lua | 25 | 1354 | -- hltradiate0
-- hltradiate
return {
["hltradiate0"] = {
pollute = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 0.5,
... | gpl-2.0 |
Danteoriginal/pvpgn-lua | lua/extend/enum/messagebox.lua | 6 | 1435 | --[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- https://github.com/pvpgn/pvpgn-server/issues/15
-- http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
--
-- use math_or(... | gpl-2.0 |
alexandergall/snabbswitch | lib/ljsyscall/examples/epoll.lua | 23 | 3206 | -- simple epoll-based socket example. Serves up http responses, but is of course not a proper server
-- you can test performance with ab -n 100000 -c 100 http://localhost:8000/ although ab may be the limiting factor
local S
if arg[1] == "rump" then
S = require "syscall.rump.init".init{"net", "net.net", "net.local", ... | apache-2.0 |
egaebel/cifar-neural-networks | main.lua | 1 | 6496 | require 'torch'
require 'nn'
require 'optim'
require 'image'
local c = require 'trepl.colorize'
if itorch then
path = require 'pl.path'
end
require 'models'
require 'data-augmentation'
require 'cifar10-data-loader'
-- CUDA Import Stuff
local EXCLUDE_CUDA_FLAG = false
local function cudaRequires()
print('Impo... | mit |
alastair-robertson/awesome | lib/awful/keygrabber.lua | 4 | 3047 | ---------------------------------------------------------------------------
--- Keygrabber Stack
--
-- @author dodo
-- @copyright 2012 dodo
-- @release @AWESOME_VERSION@
-- @module awful.keygrabber
---------------------------------------------------------------------------
local ipairs = ipairs
local table = table
loc... | gpl-2.0 |
Saurabh7/shogun | examples/undocumented/lua_modular/load.lua | 21 | 1269 | function load_numbers(fname)
f = io.open(fname)
if (f == nil) then
print("Cannot open ", fname)
end
matrix = {}
while true do
local num = f:read("*number")
if not num then break end
table.insert(matrix, num)
end
f:close()
n = #matrix
result = {}
for i = 1, 2 do
result[i] = {}
for j = 1, n/2 do
... | mit |
anvilvapre/OpenRA | mods/cnc/maps/nod07a/nod07a-AI.lua | 5 | 5825 | AttackPaths = { { AttackPath1 }, { AttackPath2 } }
GDIBase = { GDICYard, GDIPyle, GDIWeap, GDIHQ, GDIProc, GDINuke1, GDINuke2, GDINuke3, GDIBuilding1, GDIBuilding2, GDIBuilding3, GDIBuilding4, GDIBuilding5, GDIBuilding6, GDIBuilding7, GDIBuilding8 }
InfantryAttackGroup = { }
InfantryGroupSize = 4
InfantryProductionCool... | gpl-3.0 |
CreamyCookie/google-diff-match-patch | lua/diff_match_patch.lua | 265 | 73869 | --[[
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser.
* Ported to Lua by Duncan Cross.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | apache-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | lua/weapons/gmod_tool/init.lua | 5 | 1948 | AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "ghostentity.lua" )
AddCSLuaFile( "object.lua" )
AddCSLuaFile( "stool.lua" )
AddCSLuaFile( "cl_viewscreen.lua" )
AddCSLuaFile( "stool_cl.lua" )
include('shared.lua')
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
--[[... | gpl-2.0 |
NENO70/GENERAL | bot/bot.lua | 1 | 9516 | 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 |
Schaka/gladdy | Libs/AceConfig-3.0/AceConfig-3.0.lua | 2 | 1274 | --[[ $Id: AceConfig-3.0.lua 60131 2008-02-03 13:03:56Z nevcairiel $ ]]
--[[
AceConfig-3.0
Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole.
Also automatically adds "config", "enable" and "disable" commands to options table as appropriate.
]]
local MAJOR, MINOR... | mit |
xponen/Zero-K | scripts/cruisemissile.lua | 1 | 1356 | include "constants.lua"
local base = piece 'base'
function script.AimWeapon1(heading, pitch) return true end
-- keep the missile alive for a bit after launch
-- otherwise the silo may try to build right over it right away, resulting in an "accident"
local function RemoveMissile()
Spring.SetUnitNoSelect(unitID, tru... | gpl-2.0 |
jackywgw/ntopng_test | scripts/lua/sprobe_hosts.lua | 10 | 1681 | --
-- (C) 2014-15-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
if(mode ~= "embed") then
sendHTTPHeader('text/html; charset=iso-8859-1')
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
active_page = "ho... | gpl-3.0 |
alastair-robertson/awesome | spec/wibox/widget/base_spec.lua | 14 | 3351 | ---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2016 Uli Schlachter
---------------------------------------------------------------------------
local base = require("wibox.widget.base")
local no_parent = base.no_parent_I_know_what_I_am_doing
describe... | gpl-2.0 |
merlinblack/Game-Engine-Testbed | scripts/geselect.lua | 1 | 1219 | -- Init
--
require 'gui/control'
require 'gui/mouse'
geSelect = geSelect or {}
geSelect.selected = geSelect.selected or {}
geSelect.lx = 0
geSelect.ly = 0
-- x and y are in pixels
function geSelect:mouseMoved( x, y, buttons )
-- If the mouse has moved more than 5px in either direction...
if math.abs(x-self.l... | mit |
DavidIngraham/ardupilot | libraries/AP_Scripting/drivers/EFI_SkyPower.lua | 2 | 8118 | --[[
Name: EFI Scripting backend driver for SkyPower
Authors: Andrew Tridgell & Josh Henderson
The protocol has high CAN utilization due to CAN packets that are used
internal to the enigne being published externally, as well as being
limited to 500 kbit/s.
CAN_D1_PROTOCOL 10 (Scripting Driver 1)
CAN_P1_DRIVER 1 (Fir... | gpl-3.0 |
imarqs/ardupilot | Tools/CHDK-Scripts/Cannon SX260/3DR_EAI_SX260.lua | 3 | 29665 |
--[[
KAP UAV Exposure Control Script v3.1
-- Released under GPL by waterwingz and wayback/peabody
http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script
3DR EAI 1.0 is a fork of KAP 3.1 with settings specific to Canon cameras triggered off the Pixhawk autopilot.
Changelog:
-Modified Tv, Av, and... | gpl-3.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/gamemode/player_extension.lua | 3 | 2593 |
local meta = FindMetaTable( "Player" )
-- Return if there's nothing to add on to
if (!meta) then return end
g_SBoxObjects = {}
function meta:CheckLimit( str )
-- No limits in single player
if (game.SinglePlayer()) then return true end
local c = cvars.Number( "sbox_max"..str, 0 )
if ( c < 0 ) then return tru... | gpl-2.0 |
lambd0x/Awesome-wm-Funtoo-GreenInfinity | awesome/vicious/widgets/gmail_all.lua | 4 | 2055 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local type = type
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatab... | gpl-2.0 |
kiarash14/tg5 | plugins/filtering.lua | 13 | 5866 | local function save_filter(msg, name, value)
local hash = nil
if msg.to.type == 'chat' then
hash = 'chat:'..msg.to.id..':filters'
end
if msg.to.type == 'user' then
return 'فقط در گروه'
end
if hash then
redis:hset(hash, name, value)
return "انجام شد"
end
end
local function get_filter_hash(msg)
if msg.to... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/mission_messagebox.lua | 4 | 15182 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "MessageBoxes",
desc = "Displays messages from missions.",
author = "quantum",
date ... | gpl-2.0 |
gpedro/forgottenserver | data/talkactions/scripts/add_skill.lua | 35 | 1716 | local function getSkillId(skillName)
if skillName == "club" then
return SKILL_CLUB
elseif skillName == "sword" then
return SKILL_SWORD
elseif skillName == "axe" then
return SKILL_AXE
elseif skillName:sub(1, 4) == "dist" then
return SKILL_DISTANCE
elseif skillName:sub(1, 6) == "shield" then
return SKILL_S... | gpl-2.0 |
gpedro/forgottenserver | data/spells/scripts/support/sharpshooter.lua | 26 | 1143 | local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
condition:setP... | gpl-2.0 |
xponen/Zero-K | effects/gate.lua | 18 | 7475 | -- gate_teleport_smoke
-- gate_teleport
-- gate_teleport_circle_lightning
-- gate_teleport_glow
-- gate_teleport_rgroundflash
-- gate_teleport_circle_lightning_single
-- gate
-- gate_teleport_ygroundflash
return {
["gate_teleport_smoke"] = {
wezels = {
air = true,
class = ... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iwinfo.lua | 78 | 1089 | --[[
Luci configuration model for statistics - collectd interface plugin configuration
(c) 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://ww... | gpl-2.0 |
rogerpueyo/luci | libs/luci-lib-nixio/docsrc/nixio.bit.lua | 171 | 2044 | --- Bitfield operators and mainpulation functions.
-- Can be used as a drop-in replacement for bitlib.
module "nixio.bit"
--- Bitwise OR several numbers.
-- @class function
-- @name bor
-- @param oper1 First Operand
-- @param oper2 Second Operand
-- @param ... More Operands
-- @return number
--- Invert given number.
... | apache-2.0 |
egaebel/cifar-neural-networks | data-augmentation.lua | 1 | 2892 | require 'image'
-- data augmentation methods
local function crop(x, offsets, width, height)
height = height or width
return image.crop(x, offsets[1], offsets[2], offsets[1] + width, offsets[2] + height)
end
local function horizontal_reflection(x)
return image.hflip(x)
end
local function zoomout(x)
ret... | mit |
alexandergall/snabbswitch | lib/ljsyscall/syscall/netbsd/nr.lua | 24 | 9205 | -- NetBSD syscall numbers
local nr = {
SYS = {
syscall = 0,
exit = 1,
fork = 2,
read = 3,
write = 4,
open = 5,
close = 6,
compat_50_wait4 = 7,
compat_43_ocreat = 8,
link = 9,
unlink = 10,
chdir = 12,
fchdir = 13,
compat_50_mknod = 14,
chmod = 15,
chown = 16,
["break"] = 17,
compat... | apache-2.0 |
alexandergall/snabbswitch | lib/ljsyscall/syscall/linux/nl.lua | 18 | 36273 | -- modularize netlink code as it is large and standalone
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
loca... | apache-2.0 |
alexandergall/snabbswitch | lib/luajit/testsuite/test/opt/fwd/tnew_tdup.lua | 6 | 1324 | do --- 1.
local x = 2
for i=1,100 do
local t = {} -- TNEW: DCE
x = t.foo -- HREF -> niltv: folded
end
assert(x == nil)
end
do --- 2.
local x = 2
for i=1,100 do
local t = {1} -- TDUP: DCE
x = t.foo -- HREF -> niltv: folded
end
assert(x == nil)
end
do --- 3.
local x = 2
for i=1,100... | apache-2.0 |
patrikrm13/avenper | plugins/banhammer.lua | 12 | 12022 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
Paradokz/BadRotations | BadRotations.lua | 2 | 3713 | -- define br global that will hold the bot global background features
br = {}
-- brdata = {}
br.data = {}
br.dungeon = {}
br.raid = {}
br.data.settings = {}
br.selectedSpec = "None"
br.selectedProfile = 1
br.dropOptions = {}
br.dropOptions.Toggle = {"LeftCtrl","LeftShift","RightCtrl","RightShift","RightAlt","None"}
br.... | gpl-3.0 |
Paradokz/BadRotations | System/GeneralFunctions.lua | 1 | 101524 | function GetObjectExists(Unit)
if Unit == nil then return false end
if FireHack then
if Unit == "target" or Unit == "targettarget" then
if not GetUnitExists(Unit) then return false end
end
return ObjectExists(Unit)
else
return false
end
end
function GetUnitExists(Unit)
if Unit == ni... | gpl-3.0 |
kernelsauce/turbo | turbo/inotify.lua | 12 | 5820 | --- Turbo.lua inotify Module
--
-- Copyright 2013 John Abrahamsen
--
-- 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... | apache-2.0 |
georgethedan/Diamond-Clicker | main.lua | 1 | 5264 | -----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
-- Declaring Variables
display.setStatusBar( display.HiddenStatusBar )
local widget = require( "widget" )
local canTap = ... | mit |
wizardbottttt/Seed | plugins/inrealm.lua | 11 | 15415 | -- 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_group_chat (group_creator, group_name, o... | gpl-2.0 |
xponen/Zero-K | units/hoverminer.lua | 4 | 4133 | unitDef = {
unitname = [[hoverminer]],
name = [[Dampener]],
description = [[Minelaying Hover]],
acceleration = 0.0435,
brakeRate = 0.205,
buildCostEnergy = 200,
buildCostMetal = 200,
builder = false,
buildPic = [[hoverm... | gpl-2.0 |
eagle14/Snippy-git | plugins/qr.lua | 637 | 1730 | --[[
* qr plugin uses:
* - http://goqr.me/api/doc/create-qr-code/
* psykomantis
]]
local function get_hex(str)
local colors = {
red = "f00",
blue = "00f",
green = "0f0",
yellow = "ff0",
purple = "f0f",
white = "fff",
black = "000",
gray = "ccc"
}
for color, value in pairs(colors)... | gpl-2.0 |
Canaan-Creative/luci | modules/niu/luasrc/model/cbi/niu/network/etherwan.lua | 50 | 5482 | --[[
LuCI - Lua Configuration Interface
Copyright 2009 Steven Barth <steven@midlink.org>
Copyright 2009 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://w... | apache-2.0 |
xponen/Zero-K | LuaUI/Widgets/unit_auto_group.lua | 1 | 11071 | local versionNum = '3.031'
function widget:GetInfo()
return {
name = "Auto Group",
desc = "v".. (versionNum) .." Alt+0-9 sets autogroup# for selected unit type(s). Newly built units get added to group# equal to their autogroup#. Alt BACKQUOTE (~) remove units. Type '/luaui autogroup help' for help or view setti... | gpl-2.0 |
xponen/Zero-K | LuaRules/Configs/cai/general.lua | 12 | 1429 | include("LuaRules/Configs/CAI/buildtasks.lua")
include("LuaRules/Configs/CAI/unitarrays.lua")
include("LuaRules/Configs/CAI/brains.lua")
include("LuaRules/Configs/CAI/battlegroupcondition.lua")
include("LuaRules/Configs/CAI/configCoordinator.lua")
include("LuaRules/Configs/CAI/strategies.lua")
include("LuaRules/Configs... | gpl-2.0 |
Vermeille/kong | spec/03-plugins/15-response-transformer/05-big_response_body_spec.lua | 3 | 1751 | local helpers = require "spec.helpers"
local function create_big_data(size)
return string.format([[
{"mock_json":{"big_field":"%s"}}
]], string.rep("*", size))
end
describe("Plugin: response-transformer", function()
local client
setup(function()
helpers.start_kong()
local api = assert(helpers.da... | apache-2.0 |
eulerreich/rnn | LSTM.lua | 1 | 11806 | ------------------------------------------------------------------------
--[[ LSTM ]]--
-- Long Short Term Memory architecture.
-- Ref. A.: http://arxiv.org/pdf/1303.5778v1 (blueprint for this module)
-- B. http://web.eecs.utk.edu/~itamar/courses/ECE-692/Bobby_paper1.pdf
-- C. http://arxiv.org/pdf/1503.04069v1.pdf
-- D... | bsd-3-clause |
link4all/20170920openwrt | own_files/qca953x/files_9531laowu_gar/usr/lib/lua/luci/model/cbi/Config4G.lua | 15 | 1437 | require("luci.sys")
m = Map("config4g", translate("4G/3G Config"), translate("Configure 4G/3G Parameter"))
s = m:section(TypedSection, "4G", "")
s.addremove = false
s.anonymous = true
enable = s:option(Flag, "enable", translate("Enable"), translate("Enable 4G"))
apn = s:option(Value, "apn", translate("APN"))
user = ... | gpl-2.0 |
hfjgjfg/PERSIANGUARD101010 | plugins/banhammer.lua | 22 | 13075 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
alexandergall/snabbswitch | src/lib/lpm/lpm4_dxr.lua | 9 | 5195 | module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lpm4_trie = require("lib.lpm.lpm4_trie").LPM4_trie
local lpm4 = require("lib.lpm.lpm4")
local ip4 = require("lib.lpm.ip4")
LPM4_dxr = setmetatable({ alloc_storable = { "dxr_smints", "dxr_keys", "dxr_bottoms", "dxr_tops" } }, { __index = lpm4_... | apache-2.0 |
Vermeille/kong | kong/core/handler.lua | 3 | 3593 | -- Kong core
--
-- This consists of events that need to
-- be ran at the very beginning and very end of the lua-nginx-module contexts.
-- It mainly carries information related to a request from one context to the next one,
-- through the `ngx.ctx` table.
--
-- In the `access_by_lua` phase, it is responsible for retriev... | apache-2.0 |
moltafet35/dseem | plugins/banhammer.lua | 214 | 11956 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
lsbardel/python-stdnet | stdnet/backends/redisb/lua/commands/timeseries.lua | 2 | 7121 | -- UNIVARIATE TIMESERIES IN REDIS
--
-- Stand-alone Lua script for managing an univariate timeseries in Redis
--
-- A timeseries is an
-- 1) ordered (with respect timestamps)
-- 2) unique (each timestamp is unique within the timeseries)
-- 3) associative (it associate a timestamp with a value)
-- container.
... | bsd-3-clause |
phyorat/Pktgen-user-payload | examples/pktgen-3.0.14/test/gtpu-range.lua | 1 | 2716 | package.path = package.path ..";?.lua;test/?.lua;app/?.lua;"
-- A list of the test script for Pktgen and Lua.
-- Each command somewhat mirrors the pktgen command line versions.
-- A couple of the arguments have be changed to be more like the others.
--
local function doWait(port, waitTime)
local idx;
pktgen.d... | gpl-2.0 |
pavanky/arrayfire-lua | examples/getting_started/integer.lua | 4 | 1861 | --[[
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
*****************************************... | bsd-3-clause |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-statistics/luasrc/statistics/i18n.lua | 69 | 2405 | --[[
Luci statistics - diagram i18n helper
(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 License at
http://www.apache.org/licen... | gpl-2.0 |
Schaka/gladdy | Libs/AceDB-3.0/AceDB-3.0.lua | 2 | 18719 | --[[ $Id: AceDB-3.0.lua 81438 2008-09-06 13:44:36Z nevcairiel $ ]]
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 8
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
if not AceDB then return end -- No upgrade needed
local type = type
local pairs, next = pairs, next
local rawget, rawset = rawget, raw... | mit |
xponen/Zero-K | LuaUI/Widgets/map_draw_blocker.lua | 17 | 9188 | function widget:GetInfo()
return {
name = "Map Draw Blocker",
desc = "blocks map draws from spamers",
author = "SirMaverick",
date = "2010",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = false,
}
end
local GetPlayerList = Spring.GetPlayerList
local GetPlayerInfo = S... | gpl-2.0 |
Xandaros/Starfall | lua/entities/starfall_processor/init.lua | 4 | 3185 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
include( "starfall/SFLib.lua" )
assert( SF, "Starfall didn't load correctly!" )
local context = SF.CreateContext()
function ENT:UpdateState ( state )
self:SetOverlayText( "- Starfall Processor -\n[ " .. ( self.name or "Ge... | bsd-3-clause |
Feilkin/cyberpunk | engine/thirdparty/dkjson.lua | 4 | 22416 | -- Module options:
local always_try_using_lpeg = true
local register_global_module_table = false
local global_module_name = 'json'
--[==[
David Kolf's JSON module for Lua 5.1/5.2
Version 2.5
For the documentation see the corresponding readme.txt or visit
<http://dkolf.de/src/dkjson-lua.fsl/>.
You can contact the ... | mit |
MRAHS/UBTEST | plugins/media.lua | 376 | 1679 | do
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = matches[1]
local ext = matches[2]
local file = download_to_file(url)
local cb_extra = {file_path=file}
local mime_type = mimetype.get_content_type_no_sub(ext)
if ext == 'gif' then
print('send_file')
send_docum... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-olsr/luasrc/model/cbi/olsr/olsrdhna.lua | 78 | 1844 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | gpl-2.0 |
xponen/Zero-K | LuaRules/Gadgets/unit_reclaim_hp.lua | 12 | 4135 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Reclaim HP changer",
desc = "Stops units from losing HP when reclaimed",
author = "Goog... | gpl-2.0 |
pborky/openvibe | openvibe-scenarios/trunc/share/openvibe-scenarios/bci/motor-imagery/motor-imagery-bci-graz-stimulator.lua | 2 | 2323 |
function initialize(box)
dofile(box:get_config("${Path_Data}") .. "/openvibe-plugins/stimulation/lua-stimulator-stim-codes.lua")
number_of_trials = box:get_setting(2)
first_class = _G[box:get_setting(3)]
second_class = _G[box:get_setting(4)]
baseline_duration = box:get_setting(5)
wait_for_beep_duration = box:g... | lgpl-2.1 |
xuejian1354/barrier_breaker | feeds/luci/modules/base/luasrc/http/protocol/mime.lua | 88 | 2933 | --[[
HTTP protocol implementation for LuCI - mime handling
(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 License at
http://www.... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-coovachilli/luasrc/model/cbi/coovachilli_network.lua | 79 | 1639 | --[[
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 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/entities/weapons/gmod_tool/shared.lua | 4 | 9629 | -- Variables that are used on both client and server
SWEP.Author = ""
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.ViewModel = "models/weapons/c_toolgun.mdl"
SWEP.WorldModel = "models/weapons/w_toolgun.mdl"
SWEP.AnimPrefix = "python"
SWEP.UseHands = true
SWEP.Spawnable = true
-- ... | gpl-2.0 |
nifty-site-manager/nsm | LuaJIT/src/jit/v.lua | 6 | 5783 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | mit |
MarshedOut/android_external_skia | resources/test.lua | 68 | 1921 |
local r = { left = 10, top = 10, right = 100, bottom = 80 }
local x = 0;
local paint = Sk.newPaint();
paint:setAntiAlias(true);
local image -- = Sk.loadImage('/skia/sailboat.jpg');
function setImageFilename(filename)
image = Sk.loadImage(filename)
end
local color = {a = 1, r = 1, g = 0, b = 0};
function r... | bsd-3-clause |
xponen/Zero-K | LuaRules/Gadgets/api_saveload.lua | 1 | 23105 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- HOW TO USE
-- - see http://springrts.com/wiki/Lua_SaveLoad
-- - tl;dr: /save -y <filename> to save to Spring/Saves
-- remove the -y to not overwrite
--... | gpl-2.0 |
xponen/Zero-K | ModOptions.lua | 1 | 23957 |
-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $
-- Custom Options Definition Table format
-- NOTES:
-- - using an enumerated table lets you specify the options order
--
-- These keywords must be lowercase for LuaParser to read them.
--
-- key: the string used in the script.txt
-- name: ... | gpl-2.0 |
Paradokz/BadRotations | System/Core.lua | 2 | 12275 | local brMainThread = nil
deadPet = false
function br:Engine()
-- Hidden Frame
if Pulse_Engine == nil then
Pulse_Engine = CreateFrame("Frame", nil, UIParent)
-- Pulse_Engine:SetScript("OnUpdate", ThreadHelper)
Pulse_Engine:SetScript("OnUpdate", BadRotationsUpdate)
Pulse_Engine:Show()
end
end
--[[-----------... | gpl-3.0 |
xponen/Zero-K | effects/xta_crawlexplode.lua | 50 | 8555 | -- small_nuke_explosion_fx
return {
["small_nuke_explosion_fx"] = {
usedefaultexplosions = false,
g_blast = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties... | gpl-2.0 |
sandsmark/vlc-kio | share/lua/extensions/VLSub.lua | 5 | 32800 | --[[
VLSub Extension for VLC media player 1.1 and 2.0
Copyright 2010 - 2013 Guillaume Le Maout
Authors: Guillaume Le Maout
Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche
Bug report: http://addons.videolan.org/content/show.php/?content=148752
This program is free software; yo... | gpl-2.0 |
lambd0x/Awesome-wm-Funtoo-GreenInfinity | awesome/lain/widget/watch.lua | 3 | 1125 |
--[[
Licensed under GNU General Public License v2
* (c) 2014, Luke Bonham
--]]
local helpers = require("lain.helpers")
local textbox = require("wibox.widget.textbox")
-- Template for... | gpl-2.0 |
xponen/Zero-K | LuaRules/Gadgets/91_awards.lua | 1 | 26131 | function gadget:GetInfo()
return {
name = "Awards_91",
desc = "v1.002 Awards players at end of battle with shiny trophies.",
author = "CarRepairer",
date = "2008-10-15", --2013-09-05
license = "GNU GPL, v2 or later",
layer = 1000000, -- Must be after all other build steps and before unit_spawne... | gpl-2.0 |
patrikrm13/avenper | plugins/stats.lua | 43 | 4082 | 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 |
snail23/snailui | elements/timers.lua | 1 | 12940 | --
-- Copyright (C) 2012-2016 Snail <https://github.com/snail23/snailui/>
--
-- 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 ... | gpl-2.0 |
4aiman/MineClone | mods/item_drop/init.lua | 3 | 2368 | minetest.register_globalstep(function(dtime)
for _,player in ipairs(minetest.get_connected_players()) do
if player:get_hp() > 0 or not minetest.setting_getbool("enable_damage") then
local pos = player:getpos()
pos.y = pos.y+0.5
local inv = player:get_inventory()
local ctrl =... | lgpl-2.1 |
xponen/Zero-K | units/corsh.lua | 1 | 6345 | unitDef = {
unitname = [[corsh]],
name = [[Dagger]],
description = [[Fast Attack Hovercraft]],
acceleration = 0.066,
activateWhenBuilt = true,
brakeRate = 0.0835,
buildCostEnergy = 85,
buildCostMetal = 85,
builder = false,
bui... | gpl-2.0 |
xponen/Zero-K | effects/emg.lua | 25 | 12010 | -- emg_shells_m
-- emg_hit
-- flashplosion
-- flashmuzzle1
-- emg_hit_he
-- brawlimpacts
-- brawlermuzzle
-- emg_shells_l
-- emg_hit_water
return {
["emg_shells_m"] = {
usedefaultexplosions = false,
shells = {
air = true,
class = [[CSimpleParticleSystem]],
count ... | gpl-2.0 |
Vermeille/kong | spec/02-integration/00-helpers/00-helpers_spec.lua | 3 | 10558 | local helpers = require "spec.helpers"
local cjson = require "cjson"
describe("helpers: assertions and modifiers", function()
local client
setup(function()
assert(helpers.dao:run_migrations())
assert(helpers.dao.apis:insert {
request_host = "mockbin.com",
upstream_url = "http://mockbin.com"
... | apache-2.0 |
alexandergall/snabbswitch | lib/ljndpi/ndpi/protocol_ids_2_2.lua | 6 | 13593 | -- Generated by ljdnpi's tools/update-protocol-ids script
local T = {
[0] = "PROTOCOL_UNKNOWN",
[0] = "PROTOCOL_UNKNOWN",
[1] = "PROTOCOL_FTP_CONTROL",
[2] = "PROTOCOL_SIZE",
[2] = "PROTOCOL_MAIL_POP",
[3] = "PROTOCOL_MAIL_SMTP",
[4] = "PROTOCOL_MAIL_IMAP",
[5] = "PROTOCOL_DNS",
[6] = "PROTOCOL_IPP",
... | apache-2.0 |
xuejian1354/barrier_breaker | feeds/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua | 73 | 11663 | --[[
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 |
shreyaspotnis/S4 | examples/magneto/halfspace.lua | 7 | 1758 | -- Infinite halfspace of magneto-optic material.
-- Assume the permittivity tensor in the receiving halfspace is
-- [ e ie' 0 ]
-- [ -ie' e 0 ]
-- [ 0 0 e ]
-- Then solving the wave equation gives two circular polarization modes:
-- E = (1, i)/sqrt(2), km = omega sqrt(e-ie)
-- E = (1,-i)/sqrt... | gpl-2.0 |
xponen/Zero-K | units/chicken_blimpy.lua | 1 | 6843 | unitDef = {
unitname = [[chicken_blimpy]],
name = [[Blimpy]],
description = [[Dodo Bomber]],
airHoverFactor = 0,
amphibious = true,
buildCostEnergy = 0,
buildCostMetal = 0,
builder = false,
buildPic = [[chicken_blimpy.png]... | gpl-2.0 |
ld-test/lzmq | test/test_threads_fork_arg.lua | 16 | 1024 | local TEST_FFI = ("ffi" == os.getenv("LZMQ"))
local LZMQ = "lzmq" .. (TEST_FFI and ".ffi" or "")
local zmq = require (LZMQ)
local zthreads = require (LZMQ .. ".threads" )
local thread = zthreads.fork(zmq.context(), [[
local function assert_equal(name, a, b, ...)
if a == b then return b, ... end
pri... | mit |
jackywgw/ntopng_test | scripts/lua/os_stats.lua | 10 | 1868 | --
-- (C) 2013-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
active_page = "hosts"
dofile(dirs.installdir .. "/sc... | gpl-3.0 |
xponen/Zero-K | effects/disrupter_missile.lua | 19 | 3610 | return {
["disruptor_missile_hit"] = {
usedefaultexplosions = false,
airflash = {
air = true,
class = [[heatcloud]],
count = 3,
ground = true,
water = true,
properties = {
alwaysvisible = false,
... | gpl-2.0 |
sullome/km-freeminer-mods | mods/gallows/init.lua | 2 | 1647 | minetest.register_node("gallows:knot", {
description = "Gallows rope",
drawtype = "airlike",
paramtype = "light",
inventory_image = "gallows_knot.png",
wield_image = "gallows_knot.png",
selection_box = {
type = "fixed",
fixed = {-0.1, -0.1, -0.1, 0.1, 0.5, 0.1}
},
... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.