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 |
|---|---|---|---|---|---|
xponen/Zero-K | scripts/armnanotc.lua | 2 | 1668 | include "constants.lua"
include "nanoaim.h.lua"
--pieces
local body = piece "body"
local aim = piece "aim"
local emitnano = piece "emitnano"
--local vars
local smokePiece = { piece "aim", piece "body" }
local nanoPieces = { piece "aim" }
local nanoTurnSpeedHori = 0.5 * math.pi
local nanoTurnSpeedVert = 0.1 * math.pi... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua | 78 | 7996 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
lo... | gpl-2.0 |
xponen/Zero-K | LuaRules/Gadgets/unit_timeslow.lua | 1 | 8138 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Time slow v2",
desc = "Time slow Weapon",
author = "Google Frog , (MidKnight mad... | gpl-2.0 |
keesklopt/matrix | profiles/car.lua | 1 | 6551 | -- Begin of globals
require("lib/access")
barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["entrance"] = true}
access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_vehicle"] = true, ["vehicle"] = tru... | agpl-3.0 |
hugohuang1111/quick-framework | src/cc/Registry.lua | 23 | 1841 |
local Registry = class("Registry")
Registry.classes_ = {}
Registry.objects_ = {}
function Registry.add(cls, name)
assert(type(cls) == "table" and cls.__cname ~= nil, "Registry.add() - invalid class")
if not name then name = cls.__cname end
assert(Registry.classes_[name] == nil, string.format("Registry.ad... | mit |
alexandergall/snabbswitch | lib/ljsyscall/syscall/openbsd/fcntl.lua | 24 | 1202 | -- OpenBSD fcntl
-- TODO incomplete, lots missing
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 funct... | apache-2.0 |
link4all/20170920openwrt | own_files/mt7628/files_wfnt_4g/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 |
ArashFaceBook/InfernalTG | plugins/dic.lua | 31 | 1662 | --[[
-- Translate text using Google Translate.
-- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello
--]]
do
function translate(source_lang, target_lang, text)
local path = "http://translate.google.com/translate_a/single"
-- URL query parameters
local pa... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/contrib/luadoc/lua/luadoc/util.lua | 93 | 5826 | -------------------------------------------------------------------------------
-- General utilities.
-- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $
-------------------------------------------------------------------------------
local posix = require "nixio.fs"
local type, table, string, io, as... | gpl-2.0 |
anvilvapre/OpenRA | mods/ra/maps/soviet-06a/soviet06a-AI.lua | 19 | 3128 | IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
IdlingUnits = function()
local lazyUnits = enemy.GetGroundAttackers()
Utils.Do(lazyUnits, function(unit)
Trigger.OnDamaged(unit, function()
Trigger.ClearAll(unit)
Trigger.AfterDelay(0, function() IdleHunt(unit) end)
... | gpl-3.0 |
xponen/Zero-K | LuaRules/Gadgets/astar.lua | 25 | 7226 | ---------------------------------------------------------------------
--[[
author: quantum
GPL v2 or later
http://www.policyalmanac.org/games/aStarTutorial.htm
http://en.wikipedia.org/wiki/A*_search_algorithm
use: override IsBlocked, GetDistance, etc and run aStar.GetPath
-- example -----------------------------... | gpl-2.0 |
xponen/Zero-K | effects/gundam_prettypop.lua | 26 | 1976 | -- prettypop
return {
["prettypop"] = {
groundflash = {
air = true,
alwaysvisible = true,
circlealpha = 0.0,
circlegrowth = 8,
flashalpha = 0.9,
flashsize = 20,
ground = true,
ttl = 17,
... | gpl-2.0 |
alastair-robertson/awesome | lib/gears/protected_call.lua | 4 | 1797 | ---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2016 Uli Schlachter
-- @release @AWESOME_VERSION@
-- @module gears.protected_call
---------------------------------------------------------------------------
local gdebug = require("gears.debug")
local t... | gpl-2.0 |
alastair-robertson/awesome | lib/wibox/widget/textclock.lua | 3 | 1814 | ---------------------------------------------------------------------------
--- Text clock widget.
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @classmod wibox.widget.textclock
-------------------------------------------------------------------... | gpl-2.0 |
nwf/nodemcu-firmware | app/lua53/host/tests/strings.lua | 7 | 13415 | -- $Id: strings.lua,v 1.87 2016/12/21 19:23:02 roberto Exp $
-- See Copyright Notice in file all.lua
print('testing strings and string library')
local maxi, mini = math.maxinteger, math.mininteger
local function checkerror (msg, f, ...)
local s, err = pcall(f, ...)
assert(not s and string.find(err, msg))
end
... | mit |
rogerpueyo/luci | modules/luci-base/luasrc/sys.lua | 4 | 13380 | -- 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... | apache-2.0 |
Xamla/torch-pcl | KdTree.lua | 1 | 2444 | local ffi = require 'ffi'
local torch = require 'torch'
local utils = require 'pcl.utils'
local pcl = require 'pcl.PointTypes'
local KdTree = torch.class('pcl.KdTree', pcl)
local func_by_type = {}
local function init()
local KdTreeFLANN_method_names = {
'new',
'clone',
'delete',
'setInputCloud',
... | bsd-3-clause |
Poyer/Anchor-BoT | plugins/danbooru.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
alexandergall/snabbswitch | lib/ljsyscall/syscall/openbsd/types.lua | 24 | 9707 | -- OpenBSD 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 |
xponen/Zero-K | LuaUI/Widgets/gui_replace_cloak_con_order.lua | 12 | 2136 |
function widget:GetInfo()
return {
name = "Replace Cloak Con Orders",
desc = "Prevents constructor accidental decloak in enemy territory by replacing Repair, Reclaim and Rez with Move. .\n\nNOTE:Use command menu or command hotkeys to override.",
author = "GoogleFrog",
date = "13 Au... | gpl-2.0 |
infernal1200/infernall | plugins/banhammer.lua | 294 | 10470 | local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id)... | gpl-2.0 |
Vermeille/kong | spec/03-plugins/04-cors/01-access_spec.lua | 3 | 4538 | local helpers = require "spec.helpers"
local cjson = require "cjson"
describe("Plugin: cors (access)", function()
local client
setup(function()
assert(helpers.start_kong())
client = helpers.proxy_client()
local api1 = assert(helpers.dao.apis:insert {
request_host = "cors1.com",
upstream_ur... | apache-2.0 |
xponen/Zero-K | LuaUI/Widgets/cmd_state_reverse_toggle.lua | 12 | 1055 | function widget:GetInfo()
return {
name = "State Reverse Toggle",
desc = "Makes multinary states reverse toggleable",
author = "Google Frog",
date = "Oct 2, 2009",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true -- loaded by default?
}
end
local s... | gpl-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | lua/entities/sw_reta2actis/init.lua | 1 | 4420 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:SpawnFunction( ply,tr )
local ent = ents.Create("sw_reta2actis") --SpaceShip entity
ent:SetPos( tr.HitPos + Vector(0,0,40))
ent:Spawn()
ent:Activate()
return ent
end
function ENT:Initialize()
self.MaxHealth = 1000
self... | gpl-2.0 |
sandsmark/vlc-kio | share/lua/intf/dumpmeta.lua | 98 | 2125 | --[==========================================================================[
dumpmeta.lua: dump a file's meta data on stdout/stderr
--[==========================================================================[
Copyright (C) 2010 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
Th... | gpl-2.0 |
Schaka/gladdy | Libs/LibStub/LibStub.lua | 184 | 1367 | -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVI... | mit |
swichers/LootSounds | Libs/LibStub/LibStub.lua | 184 | 1367 | -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVI... | apache-2.0 |
4aiman/MineClone | mods/hardened_clay/init.lua | 2 | 1973 | local init = os.clock()
local clay = {}
clay.dyes = {
{"white", "White", "white"},
{"grey", "Grey", "dark_grey"},
{"silver", "Light Gray", "grey"},
{"black", "Black", "black"},
{"red", "Red", "red"},
{"yellow", "Yellow", "yellow"},
{"green", "Green"... | lgpl-2.1 |
xponen/Zero-K | LuaUI/Widgets/chili/Controls/textbox.lua | 12 | 2553 | TextBox = Control:Inherit{
classname = "textbox",
padding = {0,0,0,0},
text = "line1\nline2",
autoHeight = true, --// sets height to text size, useful for embedding in scrollboxes
autoObeyLineHeight = true, --// (needs autoHeight) if true, autoHeight will obey the lineHeight (-> texts with the same li... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua | 36 | 3895 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id: init.lua... | gpl-2.0 |
xponen/Zero-K | units/chickenlandqueen.lua | 1 | 14833 | unitDef = {
unitname = [[chickenlandqueen]],
name = [[Chicken Queen]],
description = [[Clucking Hell!]],
acceleration = 1,
autoHeal = 0,
brakeRate = 1,
buildCostEnergy = 0,
buildCostMetal = 0,
builder ... | gpl-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/entities/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 |
swichers/LootSounds | Libs/AceEvent-3.0/AceEvent-3.0.lua | 50 | 4772 | --- AceEvent-3.0 provides event registration and secure dispatching.
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
--
-- **AceEvent-3.0** can be embeded into your addon, either explicit... | apache-2.0 |
alastair-robertson/awesome | lib/awful/rules.lua | 2 | 15523 | ---------------------------------------------------------------------------
--- Apply rules to clients at startup.
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @module awful.rules
----------------------------------------------------------------... | gpl-2.0 |
alexandergall/snabbswitch | src/lib/yang/value.lua | 6 | 5402 | -- Use of this source code is governed by the Apache 2.0 license; see
-- COPYING.
module(..., package.seeall)
local util = require("lib.yang.util")
local ipv4 = require("lib.protocol.ipv4")
local ipv6 = require("lib.protocol.ipv6")
local ffi = require("ffi")
local bit = require("bit")
local ethernet = require("lib.pro... | apache-2.0 |
Xandaros/Starfall | lua/starfall/libs_sh/builtins.lua | 1 | 12191 | -------------------------------------------------------------------------------
-- Builtins.
-- Functions built-in to the default environment
-------------------------------------------------------------------------------
local dgetmeta = debug.getmetatable
--- Built in values. These don't need to be loaded; they are... | bsd-3-clause |
Vermeille/kong | kong/plugins/basic-auth/api.lua | 4 | 1897 | local crud = require "kong.api.crud_helpers"
local utils = require "kong.tools.utils"
return {
["/consumers/:username_or_id/basic-auth/"] = {
before = function(self, dao_factory, helpers)
crud.find_consumer_by_username_or_id(self, dao_factory, helpers)
self.params.consumer_id = self.consumer.id
e... | apache-2.0 |
Feilkin/cyberpunk | engine/tools/navmesher/outfile.lua | 1 | 160529 | return {
height = 100,
layers = { {
data = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | mit |
xponen/Zero-K | scripts/cormak.lua | 1 | 10255 | include 'constants.lua'
local base = piece 'base'
local pelvis = piece 'pelvis'
local torso = piece 'torso'
local emit = piece 'emit'
local fire = piece 'fire'
local Lleg = piece 'lleg'
local Rleg = piece 'rleg'
local lowerLleg = piece 'lowerlleg'
local lowerRleg = piece 'lowerrleg'
local Lfoot = piece 'lfoot... | gpl-2.0 |
DreamHacks/dreamdota | DreamWarcraft/Build Tools/MPQFixEngine/lua/json/decode/calls.lua | 3 | 3241 | --[[
Licensed according to the included 'LICENSE' document
Author: Thomas Harning Jr <harningt@gmail.com>
]]
local lpeg = require("lpeg")
local tostring = tostring
local pairs, ipairs = pairs, ipairs
local next, type = next, type
local error = error
local util = require("json.decode.util")
local buildCall = require... | mit |
sullome/km-freeminer-mods | mods/hunger/init.lua | 2 | 2969 | hunger = {}
hunger.MAX = 8*60*60*100
hunger.conf = {
-- Order is important
[1] = {bound = 1*60*60*100, timer_limit = 5*60*100, text = "ะั ะพัะตะฝั ะณะพะปะพะดะฝั."},
[2] = {bound = 3*60*60*100, timer_limit = 20*60*100, text = "ะั ะฝะตะผะฝะพะณะพ ะณะพะปะพะดะฝั."},
[3] = {bound = 7*60*60*100, timer_limit = -1, text = "ะั ัััั."... | gpl-3.0 |
AnySDK/Sample_JSB | frameworks/js-bindings/cocos2d-x/plugin/luabindings/auto/api/FacebookAgent.lua | 16 | 1731 |
--------------------------------
-- @module FacebookAgent
-- @parent_module plugin
--------------------------------
-- brief Notifies the events system that the app has launched & logs an activatedApp event.
-- @function [parent=#FacebookAgent] activateApp
-- @param self
--------------------------------
--... | mit |
mortezamosavy999/monster | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- seconds
local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name.... | gpl-2.0 |
anvilvapre/OpenRA | mods/ra/maps/monster-tank-madness/monster-tank-madness.lua | 10 | 14601 | AlliedUnits =
{
{ delay = 0, types = { "1tnk", "1tnk", "2tnk", "2tnk" } },
{ delay = DateTime.Seconds(3), types = { "e1", "e1", "e1", "e3", "e3" } },
{ delay = DateTime.Seconds(7), types = { "e6" } }
}
ReinforceBaseUnits = { "1tnk", "1tnk", "2tnk", "arty", "arty" }
CivilianEvacuees = { "c1", "c2", "c5", "c7", "c8" }... | gpl-3.0 |
kernelsauce/turbo | examples/cookie.lua | 12 | 1061 | --- Turbo.lua Cookie usage example
--
-- 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 requi... | apache-2.0 |
kernelsauce/turbo | turbo/fs.lua | 12 | 2093 | --- Turbo.lua file system 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 require... | apache-2.0 |
DreamHacks/dreamdota | DreamWarcraft/Build Tools/MPQFixEngine/lua/oil/kernel/base/Connector.lua | 6 | 5381 | --------------------------------------------------------------------------------
------------------------------ ##### ## ------------------------------
------------------------------ ## ## # ## ------------------------------
------------------------------ ## ## ## ## ---------------------------... | mit |
nwf/nodemcu-firmware | lua_modules/bh1750/bh1750_Example2.lua | 7 | 1765 | -- ***************************************************************************
-- BH1750 Example Program for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-30
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***********************************************************************... | mit |
qskycolor/wax | lib/stdlib/helpers/cache.lua | 19 | 1993 | wax.cache = {}
setmetatable(wax.cache, wax.cache)
-- Returns contents of cache keys
-- key: string # value for cache
-- maxAge: number (optional) # max age of file in seconds
function wax.cache.get(key, maxAge)
local path = wax.cache.pathFor(key)
if not wax.filesystem.isFile(path) then return nil end
if ... | mit |
DaanHaaz/love-base | scripts/libs/autobatch.lua | 1 | 5280 | --
-- autobatch.lua
--
-- Copyright (c) 2016 rxi
--
-- This library is free software; you can redistribute it and/or modify it
-- under the terms of the MIT license. See LICENSE for details.
--
local autobatch = { _version = "0.0.0" }
setmetatable(autobatch, { __index = love.graphics })
-- Use a local ref... | mit |
xponen/Zero-K | LuaRules/Configs/MetalSpots/haunteddowns.lua | 17 | 4541 | return {
spots = {
{x = 3240, z = 904, metal = 1.3},
{x = 7128, z = 4088, metal = 1.3},
{x = 3112, z = 3272, metal = 1.3},
{x = 8424, z = 4216, metal = 1.3},
{x = 4808, z = 1688, metal = 1.3},
{x = 312, z = 4888, met... | gpl-2.0 |
D3vMa3sTrO/superbot | plugins/helpall.lua | 1 | 9034 | --[[
_ _ _ _____ _____ ____ ____
/ \ / \ / \ | ____|___|_ _| /_\ \ / __ \ ฤัโฑด ๐: @MaEsTrO_0
/ / \/ / \ / _ \ | _| / __| | | | |_\_/| | | | ฤัโฑด ๐: @devmaestr0
/ / \ \/ \ \ / ___ \| |___\__ \ | | | | \ \| |__| | ฤัโฑด เธฟเนอณ๐: @iqMaestroBot
/_/ \/ ... | gpl-2.0 |
alexandergall/snabbswitch | src/apps/lwaftr/lwaftr.lua | 2 | 47737 | module(..., package.seeall)
local bt = require("apps.lwaftr.binding_table")
local constants = require("apps.lwaftr.constants")
local lwdebug = require("apps.lwaftr.lwdebug")
local lwutil = require("apps.lwaftr.lwutil")
local checksum = require("lib.checksum")
local datagram = require("lib.protocol.datagram")
local et... | apache-2.0 |
Paradokz/BadRotations | System/engines/HealingEngine.lua | 3 | 21447 | --[[---------------------------------------------------------------------------------------------------
-----------------------------------------Bubba's Healing Engine--------------------------------------]]
if not metaTable1 then
-- localizing the commonly used functions while inside loops
local getDistance,tinse... | gpl-3.0 |
xponen/Zero-K | units/corbhmth.lua | 1 | 5825 | unitDef = {
unitname = [[corbhmth]],
name = [[Behemoth]],
description = [[Plasma Battery - Requires 50 Power]],
acceleration = 0,
activateWhenBuilt = true,
brakeRate = 0,
buildAngle ... | gpl-2.0 |
MRAHS/UBTEST | plugins/face.lua | 641 | 3073 | local https = require("ssl.https")
local ltn12 = require "ltn12"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function request(imageUrl)
local api_key = mashape.api_key
if api_key:isempt... | gpl-2.0 |
nifty-site-manager/nsm | LuaJIT/dynasm/dasm_arm64.lua | 1 | 35195 | ------------------------------------------------------------------------------
-- DynASM ARM64 module.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _... | mit |
xponen/Zero-K | LuaUI/Widgets/chili/Controls/font.lua | 17 | 6639 | --//=============================================================================
Font = Object:Inherit{
classname = 'font',
font = "FreeSansBold.otf",
size = 12,
outlineWidth = 3,
outlineWeight = 3,
shadow = false,
outline = false,
color = {1,1,1,1},
out... | gpl-2.0 |
lambd0x/Awesome-wm-Funtoo-GreenInfinity | awesome/vicious/widgets/cpu_freebsd.lua | 4 | 1758 | -- {{{ Grab environment
local helpers = require("vicious.helpers")
local tonumber = tonumber
local setmetatable = setmetatable
local math = { floor = math.floor }
local string = { gmatch = string.gmatch }
-- }}}
-- Cpu: provides CPU usage for all available CPUs/cores
-- vicious.widgets.cpu_freebsd
local cpu_freebsd =... | gpl-2.0 |
nwf/nodemcu-firmware | app/lua53/host/tests/math.lua | 7 | 24284 | -- $Id: math.lua,v 1.78 2016/11/07 13:11:28 roberto Exp $
-- See Copyright Notice in file all.lua
print("testing numbers and math lib")
local minint = math.mininteger
local maxint = math.maxinteger
local intbits = math.floor(math.log(maxint, 2) + 0.5) + 1
assert((1 << intbits) == 0)
assert(minint == 1 << (intbits -... | mit |
Canaan-Creative/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... | apache-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/entities/weapons/gmod_tool/cl_viewscreen.lua | 3 | 2076 |
local matScreen = Material( "models/weapons/v_toolgun/screen" )
local txBackground = surface.GetTextureID( "models/weapons/v_toolgun/screen_bg" )
-- GetRenderTarget returns the texture if it exists, or creates it if it doesn't
local RTTexture = GetRenderTarget( "GModToolgunScreen", 256, 256 )
surface.CreateFont( "... | gpl-2.0 |
xponen/Zero-K | units/armsonar.lua | 1 | 3870 | unitDef = {
unitname = [[armsonar]],
name = [[Sonar Station]],
description = [[Locates Water Units]],
acceleration = 0,
activateWhenBuilt = true,
bmcode = [[0]],
brakeRate = 0,
buildAngle = 8192,
buildCostEnergy = 40,
buildCostMetal = 4... | gpl-2.0 |
xponen/Zero-K | units/gorg.lua | 2 | 12594 | unitDef = {
unitname = [[gorg]],
name = [[Jugglenaut]],
description = [[Heavy Assault Strider]],
acceleration = 0.0552,
brakeRate = 0.1375,
buildCostEnergy = 12000,
buildCostMetal = 12000,
builder = false,
... | gpl-2.0 |
hashbang/hashvtt | lib/timer.lua | 27 | 6224 | --[[
Copyright (c) 2010-2013 Matthias Richter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | mit |
warriorhero/black_wolf_2016 | plugins/stats.lua | 236 | 3989 | 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 |
alexandergall/snabbswitch | src/program/packetblaster/lwaftr/lwaftr.lua | 6 | 14456 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local engine = require("core.app")
local config = require("core.config")
local timer = require("core.timer")
local pci = require("lib.hardware.pci")
local ethernet = require("lib.protocol.ethern... | apache-2.0 |
jjimenezg93/ai-pathfinding | moai/src/lua-modules/moai/url.lua | 4 | 1345 | --==============================================================
-- Copyright (c) 2010-2011 Zipline Games, Inc.
-- All Rights Reserved.
-- http://getmoai.com
--==============================================================
----------------------------------------------------------------
-- url.lua - version 1.0 Beta... | mit |
Vermeille/kong | kong/plugins/ldap-auth/access.lua | 3 | 3848 | local responses = require "kong.tools.responses"
local constants = require "kong.constants"
local cache = require "kong.tools.database_cache"
local ldap = require "kong.plugins.ldap-auth.ldap"
local match = string.match
local ngx_log = ngx.log
local request = ngx.req
local ngx_error = ngx.ERR
local ngx_debug = ngx.DEB... | apache-2.0 |
anvilvapre/OpenRA | mods/ra/maps/soviet-01/soviet01.lua | 28 | 2150 | Yaks = { "yak", "yak", "yak" }
Airfields = { Airfield1, Airfield2, Airfield3 }
InsertYaks = function()
local i = 1
Utils.Do(Yaks, function(yakType)
local start = YakEntry.CenterPosition + WVec.New(0, (i - 1) * 1536, Actor.CruiseAltitude(yakType))
local dest = StartJeep.Location + CVec.New(0, 2 * i)
local yak =... | gpl-3.0 |
pjulien/flatbuffers | tests/namespace_test/NamespaceC/TableInC.lua | 12 | 1513 | -- automatically generated by the FlatBuffers compiler, do not modify
-- namespace: NamespaceC
local flatbuffers = require('flatbuffers')
local TableInC = {} -- the module
local TableInC_mt = {} -- the class metatable
function TableInC.New()
local o = {}
setmetatable(o, {__index = TableInC_mt})
return o... | apache-2.0 |
Schaka/gladdy | Modules/Auras.lua | 1 | 14168 | local pairs = pairs
local GetSpellInfo = GetSpellInfo
local CreateFrame = CreateFrame
local Gladdy = LibStub("Gladdy")
local L = Gladdy.L
local Auras = Gladdy:NewModule("Auras", nil, {
auraFontSize = 16,
auraFontColor = {r = 1, g = 1, b = 0, a = 1}
})
function Auras:Initialise()
self.frames = {}
sel... | mit |
jackywgw/ntopng_test | scripts/lua/inc/change_user_password_form.lua | 10 | 2983 | print [[
<style type='text/css'>
.largegroup {
width:500px
}
</style>
<div id="password_dialog" tabindex="-1" >
<h3 id="password_dialog_label">Change ]] print(_SESSION["user"]) print [[ Password <span id="password_dialog_title"></span></h3>
<div id="password_alert_placeholder"></div>
<script>
password_alert... | gpl-3.0 |
DavidIngraham/ardupilot | libraries/AP_Scripting/examples/protected_call.lua | 22 | 1154 | -- this shows how to protect against faults in your scripts
-- you can wrap your update() call (or any other call) in a pcall()
-- which catches errors, allowing you to take an appropriate action
-- example main loop function
function update()
local t = 0.001 * millis():tofloat()
gcs:send_text(0, string.format(... | gpl-3.0 |
DigitalVeer/Lua-Snippets | FunctionalProgrammingLua.lua | 2 | 1307 | local Signal = {
meta = {}
}
insert = table.insert
local SignalLibrary = {
Event = function (name)
return function(callPerWait)
local Bool = Instance.new("BoolValue"); Bool.Value = false;
return { ["connect"] = function() Bool.Value = true end,
["Wait"] = coroutine.wrap(function()
local orig = Bool.Valu... | mit |
Poyer/Anchor-BoT | 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 |
mortezamosavy999/monster | 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 |
xponen/Zero-K | LuaUI/Widgets/gfx_outline.lua | 1 | 10198 | -- $Id: gfx_outline.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: gfx_outline.lua
-- brief: Displays a nice cartoon like outline around units
-- aut... | gpl-2.0 |
alexandergall/snabbswitch | src/lib/lpm/lpm.lua | 9 | 3780 | module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
ffi.cdef([[
void free(void *ptr);
void *malloc(int size);
]])
LPM = {}
function LPM:new()
return setmetatable({ alloc_map = {} }, { __index = self })
end
function LPM:alloc (name, ctype, count, idx)
local id... | apache-2.0 |
DreamHacks/dreamdota | DreamWarcraft/Build Tools/MPQFixEngine/lua/socket.lua | 146 | 4061 | -----------------------------------------------------------------------------
-- LuaSocket helper module
-- Author: Diego Nehab
-- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------... | mit |
harvardnlp/NAMAS | summary/util.lua | 9 | 1617 | --
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Alex... | bsd-3-clause |
Xandaros/Starfall | lua/starfall/libraries.lua | 1 | 2649 | ---------------------------------------------------------------------
-- SF Global Library management
---------------------------------------------------------------------
SF.Libraries = {}
SF.Libraries.libraries = {}
SF.Libraries.hooks = {}
--- Place to store local libraries
-- @name SF.Libraries.Local
-- @class ta... | bsd-3-clause |
DreamHacks/dreamdota | DreamWarcraft/Build Tools/MPQFixEngine/lua/oil/arch/corba/client.lua | 6 | 1097 | local pairs = pairs
local port = require "oil.port"
local component = require "oil.component"
local arch = require "oil.arch" --[[VERBOSE]] local verbose = require "oil.verbose"
module "oil.arch.corba.client"
OperationRequester = component.Template{
requests = p... | mit |
link4all/20170920openwrt | own_files/mt7628/files_mifi_ss/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 |
link4all/20170920openwrt | own_files/mt7628/files_zigbee/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 |
nifty-site-manager/nsm | LuaJIT/src/jit/dis_ppc.lua | 6 | 20301 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | mit |
TeamTop/Uor | plugins/en-banhammer.lua | 7 | 16299 | --[[
#
#ููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููู
#:((
# For More Information ....!
# Developer : Aziz < @TH3_GHOST >
# our channel: @DevPointTeam
# Version: 1.1
#:))
#ูููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููููู
#
]]
lo... | gpl-2.0 |
rogerpueyo/luci | applications/luci-app-vnstat/luasrc/model/cbi/vnstat.lua | 78 | 1816 | -- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local utl = require "luci.util"
local sys = require "luci.sys"
local fs = require "nixio.fs"
local nw = require "luci.model.network"
local dbdir, line
for line in io.lines("/etc/vnstat.conf") do
dbdir ... | apache-2.0 |
xponen/Zero-K | units/spherecloaker.lua | 1 | 3911 | unitDef = {
unitname = [[spherecloaker]],
name = [[Eraser]],
description = [[Cloaker/Jammer Walker]],
acceleration = 0.25,
activateWhenBuilt = true,
brakeRate = 0.25,
buildCostEnergy = 600,
buildCostMetal = 600,
buil... | gpl-2.0 |
sullome/km-freeminer-mods | mods/clothes/init.lua | 2 | 6569 | clothes = {}
clothes.privilege = "clothes"
clothes.chatcommand = "clothes"
clothes.privilege_desc = "ะ ะฐะทัะตัะฐะตั ะธะทะผะตะฝััั ัะตะบััััั ะพะดะตะถะดั ั ะฟัะตะดะผะตัะฐ " ..
"(ะบะพะผะฐะฝะดะฐ /" .. clothes.chatcommand .. ")"
clothes.command_desc = [[ะะพะฑะฐะฒะปัะตั ัะตะบััััั ะพะดะตะถะดั ะฒ ัะพะพัะฒะตัััะฒัััะตะต ะฟะพะปะต ะผะตัะฐะดะฐัั ั ะฟัะตะดะผะตัะฐ ะฒ ััะบะต.
<action> โ "s... | gpl-3.0 |
vavrusa/ljdns | dns/dnssec.lua | 1 | 12853 | local ffi = require('ffi')
local utils = require('dns.utils')
local dns = require('dns')
local lib = utils.clib('dnssec', {2, 3, 4, 5})
assert(lib, 'libdnssec not found, install libknot >= 2.3.0')
ffi.cdef [[
/* crypto.h */
void dnssec_crypto_init(void);
void dnssec_crypto_cleanup(void);
/* error.h */
const char *dns... | bsd-2-clause |
xponen/Zero-K | effects/babette.lua | 25 | 4072 | -- babette
-- smoke_babette
-- burst_babette
return {
["babette"] = {
boom = {
air = true,
class = [[CExpGenSpawner]],
count = 20,
ground = true,
water = true,
properties = {
delay = [[5 i1]... | gpl-2.0 |
LuaDist2/lrexlib-gnu | test/common_sets.lua | 9 | 14050 | -- See Copyright Notice in the file LICENSE
-- This file should contain only test sets that behave identically
-- when being run with pcre or posix regex libraries.
local luatest = require "luatest"
local N = luatest.NT
local unpack = unpack or table.unpack
local function norm(a) return a==nil and N or a end
local ... | mit |
xponen/Zero-K | gamedata/modularcomms/weapons/multistunner.lua | 5 | 1340 | local name = "commweapon_multistunner"
local weaponDef = {
name = [[Multi-Stunner]],
areaOfEffect = 144,
avoidFeature = false,
burst = 16,
burstRate = 0.1875,
commandFire = true,
customParams = {
muzzleEffectFire =... | gpl-2.0 |
merlinblack/Game-Engine-Testbed | media/src/dejavu_sans_book_14.lua | 1 | 10867 | font={
size=14,
lineheight=22,
spacelength=6,
monowidth=18,
baseline=18,
letterspacing=0,
range={ start=32, finish=126},
glyphs={},
kerning={},
verticalOffset={}
}
-- Code, X, Y, W, H, Advance
font.glyphs[32]={ 1, 16, 1, 1, 6}
font.glyphs[33]={ 2, 2, 3, 15, 8}
font.glyphs[34]={ 5, 2, 6, 6, 9}
font.glyphs[35]=... | mit |
Zephruz/citadelshock | entities/entities/cis_basestructure/init.lua | 1 | 2058 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:Activate()
self:SetModel(self.StructureMdl)
self:SetUseType(SIMPLE_USE)
self:SetCollisionGroup( COLLISION_GROUP_NONE )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetSolid( SOLID_V... | mit |
alastair-robertson/awesome | lib/awful/util.lua | 3 | 17974 | ---------------------------------------------------------------------------
--- Utility module for awful
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008 Julien Danjou
-- @release @AWESOME_VERSION@
-- @module awful.util
---------------------------------------------------------------------------... | gpl-2.0 |
youprofit/h2o | deps/klib/lua/klib.lua | 42 | 20155 | --[[
The MIT License
Copyright (c) 2011, Attractive Chaos <attractor@live.co.uk>
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 th... | mit |
merlinblack/Game-Engine-Testbed | scripts/main.lua | 1 | 3190 | require 'scheduler'
require 'keys'
require 'gui/gui'
require 'autocomplete'
require 'events'
function version()
message( '%@14%' .. Engine.versionString()..'\n\n' )
end
local old_dofile = dofile
function dofile( f )
if f == nil then
print 'stdin dofile tomfoolery not availible.'
return
end... | mit |
jllacuna/docker-vim | nvim/config/nvim/lua/user/gitsigns.lua | 1 | 3527 | local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
vim.notify "gitsigns not found"
return
end
gitsigns.setup {
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.