repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278
values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15
values |
|---|---|---|---|---|---|
disslove3/MAX4-BOT | plugins/help.lua | 290 | 1653 | do
-- Returns true if is not empty
local function has_usage_data(dict)
if (dict.usage == nil or dict.usage == '') then
return false
end
return true
end
-- Get commands for that plugin
local function plugin_help(name)
local plugin = plugins[name]
if not plugin then return nil end
local text = ""
if ... | gpl-2.0 |
tboox/xmake | xmake/core/ui/statusbar.lua | 1 | 1753 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Spring-SpringBoard/SpringBoard-Core | LuaUI/Configs/chili/skins/Glass/skin.lua | 4 | 5089 | --//=============================================================================
--// GlassSkin
local skin = {
info = {
name = "Glass",
version = "0.2",
author = "jK",
}
}
--//=============================================================================
--//
skin.general = {
--f... | mit |
Flexibity/luci | modules/admin-core/luasrc/tools/webadmin.lua | 88 | 3493 | --[[
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... | apache-2.0 |
ycsoft/lua-rapidjson | spec/json_dump_spec.lua | 3 | 5103 | --luacheck: ignore describe it setup teardown
describe('rapidjson.dump()', function()
local rapidjson = require('rapidjson')
local function check(filename, ...)
local e = rapidjson.load(filename)
local df = 'dump.json'
rapidjson.dump(e, df, ...)
local a = rapidjson.load(df)
--os.remove(df)
r... | mit |
codergreen/ValyriaTear | img/sprites/map/enemies/dark_soldier01_walk.lua | 4 | 1995 | -- Sprite animation file descriptor
-- This file will describe the frames used to load the sprite animations
-- This files is following a special format compared to other animation scripts.
local ANIM_SOUTH = vt_map.MapMode.ANIM_SOUTH;
local ANIM_NORTH = vt_map.MapMode.ANIM_NORTH;
local ANIM_WEST = vt_map.MapMode.ANI... | gpl-2.0 |
x-v8/bkb | bkb/lib/resty/lrucache.lua | 1 | 4671 | -- Copyright (C) Yichun Zhang (agentzh)
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_sizeof = ffi.sizeof
local ffi_cast = ffi.cast
local ffi_fill = ffi.fill
local ngx_now = ngx.now
local uintptr_t = ffi.typeof("uintptr_t")
local setmetatable = setmetatable
local tonumber = tonumber
-- queue data type... | mit |
Spring-SpringBoard/SpringBoard-Core | scen_edit/view/editor.lua | 1 | 18035 | --- Editor module
--- Editor class. Inherit to create custom Editors
-- @type Editor
Editor = LCS.class{}
--- Editor constructor. Make sure you invoke this in your custom editor
-- @see Editor.Finalize
-- @usage
-- MyEditor = Editor:extends{}
-- function MyEditor:init()
-- Editor.init(self)
-- -- rest of code... | mit |
slayerrensky/luci | libs/luci-lib-nixio/root/usr/lib/lua/nixio/fs.lua | 184 | 3723 | --[[
nixio - Linux I/O library for lua
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local... | apache-2.0 |
Flexibity/luci | libs/nixio/lua/nixio/fs.lua | 184 | 3723 | --[[
nixio - Linux I/O library for lua
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local... | apache-2.0 |
aure/Soundpipe | modules/data/jitter.lua | 3 | 1410 | sptbl["jitter"] = {
files = {
module = "jitter.c",
header = "jitter.h",
example = "ex_jitter.c",
},
func = {
create = "sp_jitter_create",
destroy = "sp_jitter_destroy",
init = "sp_jitter_init",
compute = "sp_jitter_compute",
},
params = {
... | mit |
jjonethal/simul | ai/simul.lua | 1 | 1877 | -- simul.lua
-- twoWheelRobot
movingObjects={}
time = 0
motor = {
Name = "Igarashi SP 3650-065-GHC-29-3",
Uref = 6.0, -- [V]olt
N0 = 5600, -- leerlaufdrehzahl [1/min]
I0 = 0.6, -- leerlauf strom [A]
Mmax = 0.065, -- Anhaltemoment [N*m]
Imax = 7.5, -- Anlaufstrom [A]
init = function(m,J)
in... | gpl-2.0 |
tboox/xmake | xmake/modules/package/manager/brew/find_package.lua | 1 | 2490 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
funshine/nodemcu-firmware | lua_examples/ucglib/GT_pixel_and_lines.lua | 30 | 1076 | local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component pixel_and_lines...")
local mx
local x, xx
mx = disp:getWidth() / 2
--my = disp:getHeight() / 2
disp:setColor(0, 0, 0, 150)
disp:setCol... | mit |
tboox/xmake | xmake/languages/msrc/api.lua | 1 | 1325 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
starius/kodomoquiz | quiz/c1.lua | 1 | 4667 | local c1hw = {}
local typing = require 'quiz.typing'
for i = 1, 3 do
c1hw["typing_direct_" .. i] = typing.direct
end
for i = 1, 3 do
c1hw["typing_reverse_" .. i] = typing.reverse
end
function c1hw.c_born(req)
return
'',
'1969—1973',
'1950—1952',
'1991—1993',
'1998—2001',
[[Когда ... | mit |
keith/dotfiles | config/webkitten/commands/highlight-inputs.lua | 3 | 1952 | function description()
return "Highlights and focuses inputs/buttons without a mouse"
end
function run()
local windex = focused_window_index()
local webdex = focused_webview_index(windex)
run_javascript(windex, webdex, [[
var inputs = document.querySelectorAll("input,button"),
target = [], timer = nu... | mit |
ld-test/sqltable | sqltable/drivers/SQLite3.lua | 2 | 2618 | #!/usr/bin/env lua
---
-- SQLite3 code generator and insert_id handling logic.
--
local sqlite = {}
---
-- Generates a well formed placeholder.
--
function sqlite.placeholder( num )
-- SQLite will take either MySQL style '?' or PostgreSQL style
-- numbered arguments
return "$" .. tostring(num)
end
---
-- Genera... | mit |
RamiLego4Game/PixelizerBox-Sandbox | Helpers/loveframes/objects/internal/columnlist/columnlistarea.lua | 9 | 11827 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- get the current require path
local path = string.sub(..., 1, string.len(...) - string.len(".objects.internal.columnlist.c... | apache-2.0 |
Spring-SpringBoard/SpringBoard-Core | triggers/extra.lua | 1 | 3727 | return {
dataTypes = {
{
humanName = "Person",
name = "person",
input = {
{
name = "first_name",
humanName = "First name",
type = "string",
},
{
... | mit |
FlightControl-Master/MOOSE | Moose Development/Moose/AI/AI_Air_Engage.lua | 1 | 24133 | --- **AI** - Models the process of air to ground engagement for airplanes and helicopters.
--
-- This is a class used in the @{AI.AI_A2G_Dispatcher}.
--
-- ===
--
-- ### Author: **FlightControl**
--
-- ===
--
-- @module AI.AI_Air_Engage
-- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_AIR_ENGAGE
-- @exte... | gpl-3.0 |
NerdWalletOSS/Q | OPERATORS/LOAD_CSV/test/load_csv_convert_I1_B1.lua | 1 | 2189 | local Q = require 'Q'
require 'Q/UTILS/lua/strict'
local c_to_txt = require 'Q/UTILS/lua/C_to_txt'
local input_col
local expected_col
local converted_col
local test_convert = {}
test_convert.t1 = function()
local M_I1 = { { name = "colI1", qtype = "I1", has_nulls = false, is_load = true }}
input_col = Q.load... | mit |
dejayc/BaseLua | Tests/MathHelperTest.lua | 1 | 1144 | --[[ BaseLua
https://github.com/dejayc/BaseLua
Copyright 2012 Dejay Clayton
All use of this file must comply with the Apache License,
Version 2.0, under which this file is licensed:
http://www.apache.org/licenses/LICENSE-2.0 --]]
local BaseLua = require( "Packages.BaseLua" )
local MathHelper... | apache-2.0 |
astanin/notch | benchmarks/bench_twospirals.lua | 1 | 2057 | -- Create a 2-50-50-50-50-10-1 multilayer perceptron with Torch7
-- and train it on the twospirals problem.
--
-- Major to notch C++ implementation (bench_twospirals.cpp):
--
-- * torch version is using Tanh, notch version is using scaledTanh
-- * torch version is usuing fixed rate SGD, notch version is using ADADELT... | mit |
NerdWalletOSS/Q | ML/KNN/test/experimental/test_knn_conv.lua | 1 | 6329 | local Q = require 'Q'
local classify_conv = require 'Q/ML/KNN/lua/classify_conv'
local utils = require 'Q/UTILS/lua/utils'
local Scalar = require 'libsclr'
local tests = {}
tests.t1 = function()
local n = 2
local m = 3
local g_vec -- it's size will be n
local x -- input sample of length m, it... | mit |
satta/companion | bin/make_gg_line.lua | 4 | 1783 | #!/usr/bin/env gt
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2014 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all co... | isc |
njrat/BREKEBOT | plugins/anti_spam.lua | 417 | 3978 |
--An empty table for solving multiple kicking problem(thanks to @topkecleon )
kicktable = {}
do
local TIME_CHECK = 2 -- seconds
local data = load_data(_config.moderation.data)
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id =... | gpl-2.0 |
gmorishere/gm | plugins/anti_spam.lua | 417 | 3978 |
--An empty table for solving multiple kicking problem(thanks to @topkecleon )
kicktable = {}
do
local TIME_CHECK = 2 -- seconds
local data = load_data(_config.moderation.data)
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id =... | gpl-2.0 |
NerdWalletOSS/Q | UTILS/lua/json.lua | 1 | 7210 | --[[ json.lua
-- https://gist.github.com/tylerneylon/59f4bcf316be525b30ab.js
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented... | mit |
Rodeo314/tim-vlc | share/lua/playlist/extreme.lua | 80 | 3883 | --[[
$Id$
Copyright © 2011 the VideoLAN team
Authors: Konstantin Pavlov (thresh@videolan.org)
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 opt... | gpl-2.0 |
celarco/ardupilot | libraries/AP_Scripting/examples/copter-nav-script-time.lua | 6 | 3428 | -- Copter perform a simple maneuver in response to a NAV_SCRIPT_TIME mission command while the vehicle is in Auto mode
--
-- Create a simple mission like below
-- TAKEOFF, Alt:10m
-- NAV_SCRIPT_TIME, command=0 (not used in this script), timeout=30 (seconds), arg1=5 (square width in meters), arg2=10 (square height in me... | gpl-3.0 |
slayerrensky/luci | applications/luci-app-splash/luasrc/model/cbi/splash/splash.lua | 68 | 3008 | -- Licensed to the public under the Apache License 2.0.
require("luci.model.uci")
m = Map("luci_splash", translate("Client-Splash"), translate("Client-Splash is a hotspot authentification system for wireless mesh networks."))
s = m:section(NamedSection, "general", "core", translate("General"))
s.addremove = false
s... | apache-2.0 |
keyidadi/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-sip-connections.lua | 80 | 3921 | --[[
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... | apache-2.0 |
NerdWalletOSS/Q | OPERATORS/GET/test/test_add_vec_val_by_idx.lua | 1 | 1233 | local Q = require 'Q'
local qconsts = require 'Q/UTILS/lua/q_consts'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local Scalar = require 'libsclr'
require 'Q/UTILS/lua/strict'
local tests = {}
tests.t1 = function()
local n_idx = 65
local n_val = n_idx
local idx = Q.seq( {start = 0, by = 1, qtype =... | mit |
celarco/ardupilot | libraries/AP_Scripting/applets/plane_ship_landing.lua | 15 | 13152 | -- support takeoff and landing on moving platforms for VTOL planes
local PARAM_TABLE_KEY = 7
local PARAM_TABLE_PREFIX = "SHIP_"
local MODE_MANUAL = 0
local MODE_RTL = 11
local MODE_QRTL = 21
local MODE_AUTO = 10
local MODE_QLOITER = 19
local NAV_TAKEOFF = 22
local NAV_VTOL_TAKEOFF = 84
local ALT_FRAME_ABSOLUTE = 0
... | gpl-3.0 |
slayerrensky/luci | modules/luci-base/luasrc/tools/status.lua | 10 | 5118 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.tools.status", package.seeall)
local uci = require "luci.model.uci".cursor()
local function dhcp_leases_common(family)
local rv = { }
local nfs = require "nixio.fs"
local leasefile = "/var/dhcp... | apache-2.0 |
TeslaCloud/TTTRewrite | terrortown/gamemode/libs/sh_enum.lua | 1 | 1696 | -- Enumerations.
-- Round status consts
ROUND_WAIT = 1
ROUND_PREP = 2
ROUND_ACTIVE = 3
ROUND_POST = 4
-- Player roles
-- We change enumerations to strings, because new role system uses strings.
ROLE_INNOCENT = "innocent"
ROLE_TRAITOR = "traitor"
ROLE_DETECTIVE = "detective"
ROLE_MANIAC = "maniac"
ROLE_NON... | mit |
FlightControl-Master/MOOSE | Moose Development/Moose/Core/Base.lua | 1 | 49726 | --- **Core** - The base class within the framework.
--
-- ===
--
-- ## Features:
--
-- * The construction and inheritance of MOOSE classes.
-- * The class naming and numbering system.
-- * The class hierarchy search system.
-- * The tracing of information or objects during mission execution for debugging purpos... | gpl-3.0 |
gilzoide/lualvm | src/lua/Module.lua | 1 | 2279 | --[[
-- Copyright 2016-2017 Gil Barbosa Reis <gilzoide@gmail.com>
-- This file is part of Lualvm.
--
-- Lualvm is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (a... | lgpl-3.0 |
Spring-SpringBoard/SpringBoard-Core | scen_edit/model/extensions_manager.lua | 1 | 2405 | ExtensionsManager = Observable:extends{}
function ExtensionsManager:init()
self:loadAll()
self:LoadAllExtensions()
end
function ExtensionsManager:loadAll()
self.extsFolders = {}
for _, subDir in ipairs(Path.SubDirs(SB.DIRS.EXTS)) do
table.insert(self.extsFolders, {
path = subDir,
... | mit |
NerdWalletOSS/Q | OPERATORS/INDEX/lua/expander_indices.lua | 1 | 3359 | local ffi = require 'Q/UTILS/lua/q_ffi'
local lVector = require 'Q/RUNTIME/lua/lVector'
local qconsts = require 'Q/UTILS/lua/q_consts'
local qc = require 'Q/UTILS/lua/q_core'
local cmem = require 'libcmem'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local function expander_indices(op, a)
-- Verificatio... | mit |
tboox/xmake | xmake/platforms/linux/xmake.lua | 1 | 2613 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Spring-SpringBoard/SpringBoard-Core | scen_edit/model/variable_manager.lua | 1 | 2396 | VariableManager = Observable:extends{}
function VariableManager:init()
self:super('init')
self.variableIDCount = 0
self.variables = {}
end
function VariableManager:addVariable(variable)
if variable.id == nil then
variable.id = self.variableIDCount + 1
end
self.variableIDCount = variabl... | mit |
Spring-SpringBoard/SpringBoard-Core | scen_edit/state/rotate_object_state.lua | 1 | 5808 | RotateObjectState = AbstractState:extends{}
function RotateObjectState:init()
AbstractState.init(self)
SB.SetMouseCursor("resize-x")
self.ghostViews = {}
end
function RotateObjectState:GetRotatedObject(params, bridge)
local objectID = params.objectID
local angle = params.angle
local avgX, avgZ... | mit |
slayerrensky/luci | applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua | 19 | 6061 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local nw = require "luci.model.network"
local fw = require "luci.model.firewall"
local ds = require "luci.dispatcher"
local ut = require "luci.util"
loca... | apache-2.0 |
tboox/xmake | xmake/modules/detect/tools/gcc/has_flags.lua | 1 | 4276 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
sysuzhang/arcemu | src/scripts/lua/LuaBridge/0Misc/0LCF_Includes/LCF.lua | 5 | 57325 | --[[
* ArcEmu MMORPG Server
* Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
* Copyright (C) 2008-2010 <http://www.ArcEmu.org/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free... | agpl-3.0 |
xkfz007/vlc | share/lua/sd/icast.lua | 81 | 4264 | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Julien 'Lta' BALLET <contact at lta dot io>
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 y... | lgpl-2.1 |
TeslaCloud/TTTRewrite | terrortown/gamemode/libs/cl_targetid.lua | 1 | 9058 |
local util = util
local surface = surface
local draw = draw
local GetPTranslation = LANG.GetParamTranslation
local GetRaw = LANG.GetRawTranslation
local key_params = {usekey = Key("+use", "USE"), walkkey = Key("+walk", "WALK")}
local ClassHint = {
prop_ragdoll = {
name= "corpse",
hint= "corpse_hint",... | mit |
cc122cc/THETETOO2 | VIPTEAM/utils.lua | 27 | 31597 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.l... | gpl-2.0 |
Telewildv4/Telewildv4bot | plugins/info.lua | 1 | 23420 | local function callback_reply(extra, success, result)
—icon & rank —----------------------------------------------------------------------------------------------
userrank = "Member"
if tonumber(result.from.id) == 139693972 then
userrank = "Master ⭐️⭐️⭐️⭐️"
send_document(org_chat_id,"./icons/7.webp", ok_c... | gpl-2.0 |
Oliveryo/Interface | AddOns/BigWigs/Libs/AceEvent-2.0/AceEvent-2.0.lua | 1 | 28954 | --[[
Name: AceEvent-2.0
Revision: $Rev: 17803 $
Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
Inspired By: Ace 1.x by Turan (turan@gryphon.com)
Website: http://www.wowace.com/
Documentation: http://www.wowace.com/index.php/AceEvent-2.0
SVN: http://svn.wowace.com/root/... | gpl-3.0 |
dejayc/BaseLua | Packages/ClassHelper.lua | 1 | 7937 | --[[ BaseLua
https://github.com/dejayc/BaseLua
Copyright 2012 Dejay Clayton
All use of this file must comply with the Apache License,
Version 2.0, under which this file is licensed:
http://www.apache.org/licenses/LICENSE-2.0 --]]
--[[
---------------------------------------------------------... | apache-2.0 |
tboox/xmake | xmake/core/sandbox/modules/import/core/ui/mconfdialog.lua | 1 | 1031 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
tboox/xmake | xmake/core/sandbox/modules/interpreter/os.lua | 1 | 2437 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
DSUK/OpenRA | mods/cnc/maps/gdi01/gdi01.lua | 25 | 3583 | MCVReinforcements = { "mcv" }
InfantryReinforcements = { "e1", "e1", "e1" }
VehicleReinforcements = { "jeep" }
NodPatrol = { "e1", "e1" }
GDIBaseBuildings = { "pyle", "fact", "nuke" }
SendNodPatrol = function()
Reinforcements.Reinforce(enemy, NodPatrol, { nod0.Location, nod1.Location }, 15, function(soldier)
soldie... | gpl-3.0 |
funshine/nodemcu-firmware | tools/build.lua | 48 | 28446 | -- eLua build system
module( ..., package.seeall )
local lfs = require "lfs"
local sf = string.format
utils = require "tools.utils"
-------------------------------------------------------------------------------
-- Various helpers
-- Return the time of the last modification of the file
local function get_ftime( pat... | mit |
NerdWalletOSS/Q | experimental/lupa_ab/core.lua | 1 | 1133 | local ffi = require 'ffi'
local header_file = "core.h"
local qc = ffi.load('./lib_ab.so')
local JSON = require "JSON"
local file = io.open(header_file, "r")
ffi.cdef(file:read("*all"))
file:close()
ffi.cdef([[
void * malloc(size_t size);
void free(void *ptr);
]])
local fns = {}
local function init_ab(config_file... | mit |
squeek502/luver | tests/test-require.lua | 1 | 4462 | --[[
Copyright 2012 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | apache-2.0 |
EvilHero90/forgottenserver | data/scripts/actions/others/usable_outfit_items.lua | 6 | 2629 | local config = {
[18517] = { -- gnomish voucher type MB
female = 514,
male = 516,
effect = CONST_ME_GREEN_RINGS
},
[18518] = { -- gnomish voucher type MA1
female = 514,
male = 516,
addon = 1,
effect = CONST_ME_GREEN_RINGS,
achievement = "Funghitastic"
},
[18519] = { -- gnomish voucher type MA2
fe... | gpl-2.0 |
Joy-Zhang/loo | loo/app.lua | 1 | 1056 | local M = {}
package.loaded[...] = M
M.router = require('loo.router')
M.model = require('loo.model')
M.execute = function(uri)
local controller_module, call, args = M.router.route(ngx.req.get_method(), uri)
if call == nil then
return false, 'routing uri "'..uri..'" failed'
end
local ok, cont... | mit |
codergreen/ValyriaTear | dat/maps/layna_village/layna_village_center_script.lua | 1 | 57795 | -- Set the namespace according to the map name.
local ns = {};
setmetatable(ns, {__index = _G});
layna_village_center_script = ns;
setfenv(1, ns);
-- The map name, subname and location image
map_name = "Mountain Village of Layna"
map_image_filename = "img/menus/locations/mountain_village.png"
map_subname = "Village ce... | gpl-2.0 |
keyidadi/luci | applications/luci-pbx/luasrc/controller/pbx.lua | 144 | 1448 | --[[
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 |
daurnimator/lpeg_patterns | spec/http_cookie_spec.lua | 1 | 1711 | describe("lpeg_patterns.http.cookie", function()
local http_cookie = require "lpeg_patterns.http.cookie"
local lpeg = require "lpeg"
local EOF = lpeg.P(-1)
it("Parses a Set-Cookie header", function()
local Set_Cookie = lpeg.Ct(http_cookie.Set_Cookie) * EOF
assert.same({"SID", "31d4d96e407aad42", {}}, Set_Cookie... | mit |
titansec/openwaf | lib/twaf/twaf_log.lua | 1 | 9747 |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "1.0.0"
}
local twaf_func = require "lib.twaf.inc.twaf_func"
local twaf_socket = require "resty.logger.socket"
local file_access = require "resty.logger.file_access"
local file_security = require "resty.logg... | apache-2.0 |
fredericjoanis/Argorha-Pathfinding | extern/premake/base/solution.lua | 24 | 2225 | --
-- solution.lua
-- Work with the list of solutions loaded from the script.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
premake.solution = { }
-- The list of defined solutions (which contain projects, etc.)
premake.solution.list = { }
--
-- Create a new solution and add it to the sessi... | mit |
leecrest/luvit | deps/stream/stream_readable.lua | 6 | 23793 | --[[
Copyright 2014 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | apache-2.0 |
MaliciouZzHD/AndroidChromeCastControl | files/nmap/nselib/data/psexec/default.lua | 4 | 5423 | ---This is the default configuration file. It simply runs some built-in Window
-- programs to gather information about the remote system. It's intended to be
-- simple, demonstrate some of the concepts, and not break/alte anything.
-- Any variable in the 'config' table in smb-psexec.nse can be overriden in the
-- ... | gpl-3.0 |
NerdWalletOSS/Q | OPERATORS/COUNT/lua/expander_counts.lua | 1 | 2216 | local qconsts = require 'Q/UTILS/lua/q_consts'
local Reducer = require 'Q/RUNTIME/lua/Reducer'
local ffi = require 'Q/UTILS/lua/q_ffi'
local qc = require 'Q/UTILS/lua/q_core'
local chk_chunk = require 'Q/UTILS/lua/chk_chunk'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local record_time = require 'Q/UTIL... | mit |
Flexibity/luci | applications/luci-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua | 78 | 4582 | --[[
Luci statistics - netlink plugin diagram definition
(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.ap... | apache-2.0 |
tboox/xmake | xmake/actions/require/impl/environment.lua | 1 | 4428 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Oliveryo/Interface | AddOns/dpsmate/modules/DPSMate_CCBreaker.lua | 1 | 3239 | -- Global Variables
DPSMate.Modules.CCBreaker = {}
DPSMate.Modules.CCBreaker.Hist = "CCBreaker"
DPSMate.Options.Options[1]["args"]["ccbreaker"] = {
order = 310,
type = 'toggle',
name = DPSMate.L["ccbreaker"],
desc = DPSMate.L["show"].." "..DPSMate.L["ccbreaker"]..".",
get = function() return DPSMateSettings["windo... | gpl-3.0 |
leecrest/luvit | tests/test-dgram-multicast.lua | 11 | 1162 | --[[
Copyright 2012-2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | apache-2.0 |
Oliveryo/Interface | AddOns/dpsmate/modules/DPSMate_Details_Fails.lua | 2 | 3728 | -- Global Variables
DPSMate.Modules.DetailsFails = {}
-- Local variables
local DetailsUser, DetailsUserComp = "", ""
local curKey = 1
local db, cbt = {}, 0
local Buffpos, BuffposComp = 0, 0
local _G = getglobal
local tinsert = table.insert
function DPSMate.Modules.DetailsFails:UpdateDetails(obj, key)
DPSMate_Details... | gpl-3.0 |
tboox/xmake | xmake/core/sandbox/modules/has_package.lua | 1 | 1356 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
tboox/xmake | xmake/modules/detect/tools/find_yum.lua | 1 | 1614 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Oliveryo/Interface | AddOns/BigWigs/Raids/ZG/Wushoolay.lua | 1 | 3600 | ------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Wushoolay"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations... | gpl-3.0 |
iranianhacker40/ARCHON-TEAM | plugins/tagall.lua | 13 | 2876 | --Tag ppl with username and a msg after it
local function tagall(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = "chat#id"..result.id
local text = ''
for k,v in pairs(result.members) do
if v.username then
text = text.."> @"..v.username.."\n"
end
end
text =... | gpl-2.0 |
codergreen/ValyriaTear | src/luabind/examples/filesystem/inspect.lua | 38 | 4231 | -- base class for all inspectors
-- every derived class must implement inspect()
class 'inspector'
function inspector:__init(name)
self.name = name
self.warnings = {}
end
function inspector:warning(path, str)
table.insert( self.warnings, { path, str } )
end
function inspector:report()
loca... | gpl-2.0 |
leecrest/luvit | tests/test-http-client-server.lua | 11 | 1796 | --[[
Copyright 2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | apache-2.0 |
Flexibity/luci | libs/sys/luasrc/sys/zoneinfo/tzdata.lua | 72 | 16813 | --[[
LuCI - Autogenerated Zoneinfo Module
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
module "luci.sys.zoneinfo.tzdata"
TZ = {
{ 'Africa/Abi... | apache-2.0 |
slayerrensky/luci | protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua | 18 | 3594 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local device, username, password
local ipv6, defaultroute, metric, peerdns, dns,
keepalive_failure, keepalive_interval, demand, mtu
device = section:taboption("general", Value... | apache-2.0 |
weirdouncle/QSanguosha-For-Hegemony | extension-doc/15-Activate.lua | 15 | 17885 | --[[
在 14-Responsing.lua 中集中介绍了 smart-ai.lua 中第三部分的内容。
这一文档将集中介绍与 smart-ai.lua 中第四部分“主动出牌”相关的内容。
首先介绍一个重要的函数:
! SmartAI:activate(use):响应 Room::activate 的函数。
% use: CardUseStruct*
% 返回值:nil。
这个函数所要完成的任务,就是给 use.card 和 use.to 赋予恰当的值。
这两个值就决定了 AI 使用哪张牌,对谁使用。
在这里,有必要介绍一下程序在出牌阶段的流程。这部分流程的代码位于 gamerule.cpp 第 63 至 75 行。
ca... | gpl-3.0 |
slayerrensky/luci | applications/luci-app-p2pblock/luasrc/model/cbi/luci_fw/p2pblock.lua | 60 | 2067 | -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local sys = require "luci.sys"
m = Map("freifunk_p2pblock", translate("P2P-Block"),
translate("P2P-Block is a greylisting mechanism to block various peer-to-peer protocols for non-whitelisted clients."))
s = ... | apache-2.0 |
NerdWalletOSS/Q | OPERATORS/AINB/test/test_ainb_gen.lua | 1 | 1164 | require 'Q/UTILS/lua/strict'
local qc = require 'Q/UTILS/lua/q_core'
local ffi = require 'Q/UTILS/lua/q_ffi'
local qconsts = require 'Q/UTILS/lua/q_consts'
local fns_name = "simple_ainb_I4_I4"
local chunk_count = 0
-- generator validator function
local function my_magic_function(aptr, alen, bptr, blen, cbuf)
print("... | mit |
keyidadi/luci | applications/luci-wshaper/luasrc/model/cbi/wshaper.lua | 36 | 2050 | --[[
LuCI - Lua Configuration Interface
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
http://www.apache.org/licenses/LICENSE-2.0
]]--
r... | apache-2.0 |
NerdWalletOSS/Q | RUNTIME/test/lua_test/vec_utility.lua | 1 | 5006 | local ffi = require 'Q/UTILS/lua/q_ffi'
local cmem = require 'libcmem'
local qconsts = require 'Q/UTILS/lua/q_consts'
local Scalar = require 'libsclr'
local qc = require 'Q/UTILS/lua/q_core'
local get_ptr = require "Q/UTILS/lua/get_ptr"
local fns = {}
fns.validate_values = function(vec, qtype, chunk_numb... | mit |
NerdWalletOSS/Q | OPERATORS/GET/test/test_get_val_by_idx.lua | 1 | 3339 | local Q = require 'Q'
local qconsts = require 'Q/UTILS/lua/q_consts'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local Scalar = require 'libsclr'
require 'Q/UTILS/lua/strict'
local tests = {}
tests.t1 = function()
local x_length = 65
local y_length = 80
local x = Q.seq( {start = 1, by = 1, qtype ... | mit |
NerdWalletOSS/Q | OPERATORS/AINB/lua/generator.lua | 1 | 1367 | local plpath = require 'pl.path'
local srcdir = "../gen_src/"
local incdir = "../gen_inc/"
if ( not plpath.isdir(srcdir) ) then plpath.mkdir(srcdir) end
if ( not plpath.isdir(incdir) ) then plpath.mkdir(incdir) end
local gen_code = require("Q/UTILS/lua/gen_code")
local q_qtypes = nil; local bqtypes = ... | mit |
Oliveryo/Interface | AddOns/aux-addon/util/info.lua | 1 | 15458 | module 'aux.util.info'
include 'T'
include 'aux'
local cache = require 'aux.core.cache'
CreateFrame('GameTooltip', 'AuxTooltip', nil, 'GameTooltipTemplate')
AuxTooltip:SetScript('OnTooltipAddMoney', function()
this.money = arg1
end)
do
local inventory_index_map = {
INVTYPE_AMMO = {0},
INVTYPE_HEAD = {1},
IN... | gpl-3.0 |
tboox/xmake | xmake/modules/detect/tools/dmd/has_flags.lua | 1 | 3679 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
mohammadclashclash/seed5 | plugins/invite.lua | 1111 | 1195 | 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 |
NerdWalletOSS/Q | experimental/cuda_files/Q_OPERATORS_F1F2OPF3_lua_arith_generator.lua | 1 | 1198 | local gen_code = require 'Q/UTILS/lua/gen_code'
local plpath = require "pl.path"
local srcdir = "../gen_src/"
local incdir = "../gen_inc/"
if ( not plpath.isdir(srcdir) ) then plpath.mkdir(srcdir) end
if ( not plpath.isdir(incdir) ) then plpath.mkdir(incdir) end
local operator_file = assert(arg[1])
a... | mit |
alfred-bot/phmbot | plugins/remind.lua | 362 | 1875 | local filename='data/remind.lua'
local cronned = load_from_file(filename)
local function save_cron(msg, text,date)
local origin = get_receiver(msg)
if not cronned[date] then
cronned[date] = {}
end
local arr = { origin, text } ;
table.insert(cronned[date], arr)
serialize_to_file(cronned, filename)
re... | gpl-2.0 |
FlightControl-Master/MOOSE | Moose Development/Moose/Ops/RecoveryTanker.lua | 1 | 66090 | --- **Ops** - Recovery tanker for carrier operations.
--
-- Tanker aircraft flying a racetrack pattern overhead an aircraft carrier.
--
-- **Main Features:**
--
-- * Regular pattern update with respect to carrier position.
-- * No restrictions regarding carrier waypoints and heading.
-- * Automatic respawning... | gpl-3.0 |
jie-meng/Lunar | publish/plugins/goto_cocos_js_webpack.lua | 2 | 20213 | local table_ext = require('table_ext')
local file_ext = require('file_ext')
local pattern_class_begin = [[([%w_%.]+)%s*=%s*([%w_%.]+)%.extend%s*%(]]
local pattern_method = [[([%w_]+)%s*:%s*function%s*%((.*)%)]]
local pattern_arrow_method = [[([%w_]+)%s*:%s*%((.*)%)%s*=>]]
local pattern_static_method = [[([%w_%.]+)%s*=... | gpl-2.0 |
tboox/xmake | xmake/modules/devel/git/clean.lua | 1 | 1812 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
TeslaCloud/TTTRewrite | terrortown/entities/entities/ttt_beacon.lua | 1 | 2633 | -- DISABLED: see weapon_ttt_beacon
-- DISABLED
--AddCSLuaFile()
if CLIENT then
-- this entity can be DNA-sampled so we need some display info
ENT.Icon = "vgui/ttt/icon_beacon"
ENT.PrintName = "Beacon"
end
ENT.Type = "anim"
ENT.Model = Model("models/props_lab/reciever01b.mdl")
ENT.CanHavePrints = true
ENT.Ca... | mit |
slayerrensky/luci | applications/luci-app-olsr/luasrc/controller/olsr.lua | 7 | 9511 | module("luci.controller.olsr", package.seeall)
local neigh_table = nil
local ifaddr_table = nil
function index()
local ipv4,ipv6
if nixio.fs.access("/etc/config/olsrd") then
ipv4 = 1
end
if nixio.fs.access("/etc/config/olsrd6") then
ipv6 = 1
end
if not ipv4 and not ipv6 then
return
end
require("luci.mo... | apache-2.0 |
DavidDeSimone/remacs | test/manual/etags/lua-src/allegro.lua | 53 | 6727 | -- ase -- allegro-sprite-editor: the ultimate sprites factory
-- Copyright (C) 2001-2004 by David A. Capello
--
-- Read "LEGAL.txt" for more information.
-- internal routine
local function get_layer_by_name (sprite, layer, name)
if layer.readable == false then
return nil;
end
if layer.name and strcmp (layer... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.