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 |
|---|---|---|---|---|---|
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua | 2 | 1291 |
--------------------------------
-- @module EaseQuadraticActionInOut
-- @extend ActionEase
-- @parent_module cc
--------------------------------
--
-- @function [parent=#EaseQuadraticActionInOut] create
-- @param self
-- @param #cc.ActionInterval action
-- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut r... | gpl-3.0 |
dmccuskey/dmc-gestures | examples/gesture-pan-basic/dmc_corona/dmc_states_mix.lua | 29 | 3816 | --====================================================================--
-- dmc_corona/dmc_states_mix.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
Permission is hereby gra... | mit |
heysion/prosody-modules | mod_limit_auth/mod_limit_auth.lua | 31 | 1377 | -- mod_limit_auth
local st = require"util.stanza";
local new_throttle = require "util.throttle".create;
local period = math.max(module:get_option_number(module.name.."_period", 30), 0);
local max = math.max(module:get_option_number(module.name.."_max", 5), 1);
local tarpit_delay = module:get_option_number(module.nam... | mit |
m2fan/ss | plugins/webshot.lua | 919 | 1473 | local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
method = "GET",
sink = ltn12.sink.table(response_body),
header... | gpl-2.0 |
badboyam/crazy_bot | plugins/time.lua | 771 | 2865 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
Djabbz/nn | SpatialDivisiveNormalization.lua | 39 | 5171 | local SpatialDivisiveNormalization, parent = torch.class('nn.SpatialDivisiveNormalization','nn.Module')
function SpatialDivisiveNormalization:__init(nInputPlane, kernel, threshold, thresval)
parent.__init(self)
-- get args
self.nInputPlane = nInputPlane or 1
self.kernel = kernel or torch.Tensor(9,9):fill(... | bsd-3-clause |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/technic/technic/init.lua | 1 | 1424 | -- Minetest 0.4.7 mod: technic
-- namespace: technic
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
--[[
2017-01-06 modified by MrCerealGuy <mrcerealguy@gmx.de>
exit if mod is deactivated
--]]
if core.skip_mod("technic") then return end
local load_start = os.clock()
technic = rawget(_G, "technic") or {}
t... | gpl-3.0 |
heysion/prosody-modules | mod_storage_ldap/ldap/vcard.lib.lua | 40 | 5035 | -- vim:sts=4 sw=4
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2012 Rob Hoelz
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local st = require 'util.stanza';
local VCARD_NS = 'vc... | mit |
mahdisudo/best | plugins/stats.lua | 866 | 4001 | do
-- Returns a table with `name` and `msgs`
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_prin... | gpl-2.0 |
xing634325131/Luci-0.11.1 | libs/nixio/docsrc/nixio.lua | 151 | 15824 | --- General POSIX IO library.
module "nixio"
--- Look up a hostname and service via DNS.
-- @class function
-- @name nixio.getaddrinfo
-- @param host hostname to lookup (optional)
-- @param family address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param service service name or port (optional)
-- @return ... | apache-2.0 |
xingshuo/frame_sync_model | server/globaldefines.lua | 1 | 2378 | local Skynet = require "lualib.local_skynet"
GAME_FIGHTER_WAR = 1001
GGameConfig = {
[GAME_FIGHTER_WAR] = {
frame_rate = 50, --times of per second
ping_interval = 1000, --ms
},
}
ACTION_ENTER = 1
ACTION_LEAVE = 2
ACTION_ATTACK = 3
ACTION_MOVE = 4
local ostime = os.time
function GetSecond()
... | mit |
ahmadreza5251/terojanbot | plugins/id.lua | 355 | 2795 | 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..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, resu... | gpl-2.0 |
McGlaspie/mvm | lua/mvm/Hud/GUIShotgunDisplay.lua | 1 | 4853 | // ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. =======
//
// lua\GUIShotgunDisplay.lua
//
// Created by: Max McGuire (max@unknownworlds.com)
//
// Displays the ammo counter for the shotgun.
//
// ========= For more information, visit us at http://www.unknownworlds.com ======... | gpl-3.0 |
coronalabs/plugins-source-gamenetwork-google | Corona-gemwars/sprites-1x.lua | 1 | 1906 | --
-- created with TexturePacker (http://www.codeandweb.com/texturepacker)
--
-- $TexturePacker:SmartUpdate:ceb5655d19921868929dae6efaa35799$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetInfo:getSheet() )
-- local sprite = display.newSprite( myImageSheet... | mit |
ananay/vice-players | Vendor/CEGUI/cegui/src/ScriptingModules/LuaScriptModule/support/tolua++bin/lua/module.lua | 7 | 1526 | -- tolua: module class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: module.lua 1004 2006-02-27 13:03:20Z lindquist $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide ... | gpl-3.0 |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/drops/init.lua | 1 | 3748 | --[[
2017-06-11 modified by MrCerealGuy <mrcerealguy@gmx.de>
exit if mod is deactivated
--]]
if core.skip_mod("itemdrop") then return end
local age = 1 --how old an item has to be before collecting
local radius_magnet = 2.5 --radius of item magnet
local player_collect_height = 1.3 --added... | gpl-3.0 |
cod3hulk/dotfiles | nvim/lua/user/which-key.lua | 1 | 9922 | -- local wk = require("which-key")
-- wk.register({
-- f = {
-- name = "find",
-- f = { "<cmd>Telescope find_files<cr>", "Find File" },
-- b = { "<cmd>Telescope buffers<cr>", "Find Buffers" },
-- r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File"},
-- g = { "<cmd>Telescope live_grep<cr>", "G... | gpl-2.0 |
coronalabs/plugins-source-gamenetwork-google | Corona-gemwars/game-logic.lua | 1 | 9365 | local self = {}
local json = require "json"
-- class variables
self._spriteSheet = nil
self._displayGroup = nil
self._listener = nil
-- localized variables
local DW = display.contentWidth
local DH = display.contentHeight
self.overlay = nil
local globalScale = 1
if display.contentScaleX <= 0.6 then
globalScale = ... | mit |
SLAPaper/MCGC | MCGC/ygoLib.lua | 2 | 78200 | -- =====debug类=====
Debug = { }
function Debug.AddCard(code, owner, player, location, seq, pos, proc)
-- 添加卡片,将卡号为code的卡片的持有者设置为owner,以表示形式pos放置在player的场上位于location上序号为seq的格子处
-- 【必须】
--[[
int code
int owner
int player
int location
int seq
int pos
--]]
... | mit |
judos/robotMiningSite | source/control/migration_0_2_3.lua | 1 | 1076 |
function migration_0_2_3()
-- migrate data to new variables
-- Entities are invalid since type has changed -> search them and replace again in schedule
-- Current relevant data:
-- global.robotMiningSite.schedule[tick][idEntity] = $entity
-- global.robotMiningSite.entityData[idEntity] = { name=$name, ... }
inf... | gpl-3.0 |
neg-serg/notion | ioncore/ioncore_misc.lua | 7 | 2578 | --
-- ion/share/ioncore_misc.lua
--
-- Copyright (c) Tuomo Valkonen 2004-2009.
--
-- See the included file LICENSE for details.
--
local group_tmpl = { type="WGroupWS" }
local default_tmpl = { switchto=true }
local empty = { type="WGroupWS", managed={} }
local layouts={
empty = empty,
default = empty,
}
-... | lgpl-2.1 |
logzero/ValyriaTear | dat/battles/desert_cave_battle_anim.lua | 3 | 3539 | -- Desert cave scripted animation
local ns = {}
setmetatable(ns, {__index = _G})
desert_cave_battle_anim = ns;
setfenv(1, ns);
-- Animation members
local rock_id = -1;
local fog_id = -1;
local anim_ids = {};
-- Fog related members
local fog_x_position = 300.0;
local fog_origin_x_position = 300.0;
local fog_y_positio... | gpl-2.0 |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/ethereal/strawberry.lua | 1 | 3321 |
local S = ethereal.intllib
-- Strawberry (can also be planted as seed)
minetest.register_craftitem("ethereal:strawberry", {
description = S("Strawberry"),
inventory_image = "strawberry.png",
wield_image = "strawberry.png",
groups = {food_strawberry = 1, food_berry = 1, flammable = 2},
on_place = function(itemsta... | gpl-3.0 |
spixi/wesnoth | data/lua/functional.lua | 4 | 2431 | -- This file implements equivalents of various higher-order WFL functions
local functional = {}
function functional.filter(input, condition)
local filtered_table = {}
for _,v in ipairs(input) do
if condition(v) then
table.insert(filtered_table, v)
end
end
return filtered_... | gpl-2.0 |
khanasbot/Avatar_Bot | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
parsa13881/serverbot | plugins/location.lua | 93 | 1704 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
crazyboy11/bot122 | plugins/cpu.lua | 244 | 1893 | function run_sh(msg)
name = get_name(msg)
text = ''
-- if config.sh_enabled == false then
-- text = '!sh command is disabled'
-- else
-- if is_sudo(msg) then
-- bash = msg.text:sub(4,-1)
-- text = run_bash(bash)
-- else
-- text = name .. ' you... | gpl-2.0 |
dmccuskey/dmc-gestures | examples/gesture-memtest/dmc_corona/lib/dmc_lua/lua_patch.lua | 44 | 7239 | --====================================================================--
-- lua_patch.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2014-2015 David McCuskey
Permission is hereby granted, free ... | mit |
dmccuskey/dmc-gestures | examples/gesture-pinch-basic/dmc_corona/lib/dmc_lua/lua_patch.lua | 44 | 7239 | --====================================================================--
-- lua_patch.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2014-2015 David McCuskey
Permission is hereby granted, free ... | mit |
hfjgjfg/persianguard75 | plugins/cpu.lua | 244 | 1893 | function run_sh(msg)
name = get_name(msg)
text = ''
-- if config.sh_enabled == false then
-- text = '!sh command is disabled'
-- else
-- if is_sudo(msg) then
-- bash = msg.text:sub(4,-1)
-- text = run_bash(bash)
-- else
-- text = name .. ' you... | gpl-2.0 |
Spesiel/LuckysDashboard | @Resources/VarFileInit.lua | 1 | 2925 | ------- Metadata --------------------------------------------------------------
-- VarFileInit
-- Author: Lucky Penny
-- Description: Creates all variables files with default values.
-- License: Creative Commons BY-NC-SA 3.0
-- Version: 0.0.3
--
-- Initialize(): As described
--------------------------------------------... | unlicense |
T3hArco/skeyler-gamemodes | Sassilization/entities/effects/paralyze/init.lua | 1 | 2224 | local matLight = Material( "models/shiny" )
local matRefract = Material( "models/spawn_effect" )
function EFFECT:Init( data )
local ent = Unit:Unit(data:GetScale())
if ( ent == NULL ) then return end
self.Time = data:GetMagnitude()
self.LifeTime = CurTime() + self.Time
self.ParentEntity = ent
en... | bsd-3-clause |
McGlaspie/mvm | lua/mvm/bots/CommanderBrain.lua | 1 | 6283 | //----------------------------------------
//
//----------------------------------------
Script.Load("lua/mvm/bots/PlayerBrain.lua")
local gDebug = false
//----------------------------------------
// Utility funcs
//----------------------------------------
function GetRandomBuildPosition(techId, aroundPos, maxDis... | gpl-3.0 |
T3hArco/skeyler-gamemodes | Sassilization/gamemode/server/buildings.lua | 1 | 12087 | --------------------
-- Sassilization
-- By Sassafrass / Spacetech / LuaPineapple
--------------------
local HULL_BUILDER
hook.Add( "InitPostEntity", "Load_queryphys", function()
HULL_BUILDER = ents.Create("prop_physics")
HULL_BUILDER:SetSolid( SOLID_NONE )
HULL_BUILDER:SetCollisionGroup( COLLISION_GROUP... | bsd-3-clause |
pydsigner/naev | dat/snd/music.lua | 10 | 6708 |
--[[
-- music will get called with a string parameter indicating status
-- valid parameters:
-- load - game is loading
-- land - player landed
-- takeoff - player took off
-- combat - player just got a hostile onscreen
-- idle - current playing music ran out
]]--
last = "idle"
-- Faction-specific songs... | gpl-3.0 |
pirate/snabbswitch | src/lib/json.lua | 29 | 10286 | -- JSON4Lua: JSON encoding / decoding support for the Lua language.
-- json Module.
-- Author: Craig Mason-Jones
-- Homepage: http://json.luaforge.net/
-- Version: 0.9.40
-- This module is released under the MIT License (MIT).
--
-- NOTE: This is only the decode functionality ripped out from JSON4Lua.
-- See: https://g... | apache-2.0 |
xing634325131/Luci-0.11.1 | modules/niu/luasrc/model/cbi/niu/wireless/ap.lua | 51 | 1406 | local cursor = require "luci.model.uci".cursor()
if not cursor:get("wireless", "ap") then
cursor:section("wireless", "wifi-iface", "ap",
{device = "_", doth = "1", _niu = "1", mode = "ap"})
cursor:save("wireless")
end
local function deviceroute(self)
cursor:unload("wireless")
local d = cursor:get("wireless", "a... | apache-2.0 |
salorium/awesome | lib/wibox/layout/stack.lua | 3 | 4327 | ---------------------------------------------------------------------------
-- A stacked layout.
--
-- This layout display widgets on top of each other. It can be used to overlay
-- a `wibox.widget.textbox` on top of a `awful.widget.progressbar` or manage
-- "pages" where only one is visible at any given moment.
--
-- ... | gpl-2.0 |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua | 11 | 1045 |
--------------------------------
-- @module TransitionSlideInR
-- @extend TransitionSlideInL
-- @parent_module cc
--------------------------------
-- Creates a transition with duration and incoming scene.<br>
-- param t Duration time, in seconds.<br>
-- param scene A given scene.<br>
-- return A autoreleased Transit... | gpl-3.0 |
McGlaspie/mvm | lua/mvm/bots/TestBots.lua | 1 | 1103 | //=============================================================================
//
// lua/bots/TestBot.lua
//
// Created by Max McGuire (max@unknownworlds.com)
// Copyright (c) 2011, Unknown Worlds Entertainment, Inc.
//
// This class is a simple bot that runs back and forth along a line for testing.
//
//=============... | gpl-3.0 |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua | 2 | 5983 |
--------------------------------
-- @module SkeletonRenderer
-- @extend Node,BlendProtocol
-- @parent_module sp
--------------------------------
--
-- @function [parent=#SkeletonRenderer] setTimeScale
-- @param self
-- @param #float scale
-- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonR... | gpl-3.0 |
pydsigner/naev | dat/ai/include/atk_drone.lua | 6 | 5707 | --[[This file contains the attack profiles by ship type.
--commonly used range and condition-based attack patterns are found in another file
--Think functions for determining who to attack are found in another file
--]]
-- Initializes the drone
function atk_drone_init ()
mem.atk_think = atk_drone_think
mem.atk ... | gpl-3.0 |
SnarkyClark/luapgsql | test.lua | 1 | 4103 | package.cpath = "./?.so"
require("pgsql")
db = {
dbname = "postgres",
user = "pgsql",
connect_timeout = 5
}
print("\nRunning tests...")
passed = true
if passed then
print("--connect")
local info = ''
-- we shall move this next line to C soon...
for k, v in pairs(db) do info = string.format("%s%s=%s ", info,... | bsd-2-clause |
stepjam/PyRep | pyrep/backend/simAddOnScript_PyRep.lua | 1 | 13066 | -- Additional PyRep functionality. To be placed in the CoppeliaSim root directory.
function sysCall_init()
end
function sysCall_cleanup()
end
function sysCall_addOnScriptSuspend()
end
function sysCall_addOnScriptResume()
end
function sysCall_nonSimulation()
end
function sysCall_beforeMainScript()... | mit |
salorium/awesome | tests/examples/shims/screen.lua | 2 | 2646 | local gears_obj = require("gears.object")
local screen, meta = awesome._shim_fake_class()
screen.count = 1
local function create_screen(args)
local s = gears_obj()
-- Copy the geo in case the args are mutated
local geo = {
x = args.x ,
y = args.y ,
width = args... | gpl-2.0 |
T3hArco/skeyler-gamemodes | deathrun/gamemode/player_class/player_deathrun.lua | 1 | 1541 | ----------------------------
-- Deathrun --
-- Created by Skeyler.com --
----------------------------
AddCSLuaFile()
DEFINE_BASECLASS("player_default")
local PLAYER = {}
PLAYER.DisplayName = "Deathrun Player"
PLAYER.WalkSpeed = 250 -- How fast to move when not running
PLAYER.RunSpeed = 25... | bsd-3-clause |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ControlButton.lua | 6 | 14222 |
--------------------------------
-- @module ControlButton
-- @extend Control
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ControlButton] isPushed
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the title label to use fo... | gpl-3.0 |
githubtelebot/Telebot | plugins/invite2.lua | 8 | 1206 | 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, 'کاربر بن است')
elseif is_gbanned(result.id) then -- Ignore glo... | gpl-2.0 |
hadirahimi1380/speedbot | bot/utils.lua | 646 | 23489 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
T3hArco/skeyler-gamemodes | Sassilization/entities/entities/building_gate/init.lua | 1 | 3862 | --------------------
-- Sassilization
-- By Sassafrass / Spacetech / LuaPineapple
--------------------
AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.OpenSound = Sound("buttons/lever4.wav")
ENT.CloseSound = Sound("buttons/lever6.wav")
ENT.AutomaticFrameAdvance = true
util.AddNetworkString( "PlayG... | bsd-3-clause |
xing634325131/Luci-0.11.1 | libs/sys/luasrc/sys/zoneinfo/tzoffset.lua | 72 | 3904 | --[[
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.tzoffset"
OFFSET = {
gmt =... | apache-2.0 |
CodeLiners/Silcom-Kernel | mod/prog.lua | 1 | 1087 | function prog_execute(file, mode, uid, term, parent, args, env, name)
name = name or file
data = vfs.readAll(file)
if data:sub(1,2) == "#!" then
-- script
local ip = ""
while true do
local c = data:sub(1, 1)
if c == LF then break end
ip = ip..c
... | bsd-3-clause |
ominux/nn | test.lua | 5 | 159454 | -- you can easily test specific units like this:
-- th -lnn -e "nn.test{'LookupTable'}"
-- th -lnn -e "nn.test{'LookupTable', 'Add'}"
nn.hessian.enable()
local mytester = torch.Tester()
local jac
local sjac
local precision = 1e-5
local expprecision = 1e-4
local nntest = {}
local function equal(t1, t2, msg)
if (... | bsd-3-clause |
nuintun/payday2 | extras/mods/npc-weapons-customization/Weapons/scar_npc.lua | 1 | 9445 | log("scar_npc loaded")
Hooks:Add("LocalizationManagerPostInit", "NPCWeap_scar_Localization", function(loc)
LocalizationManager:add_localized_strings({
["random"] = "Random",
["scar_none"] = "None",
--Barrels
["scar_g_barrel_short"] = "Short",
["scar_g_barrel_medium"] = "Medium",
["scar_g_barre... | mit |
wcjscm/JackGame | src/cocos/cocos2d/DrawPrimitives.lua | 98 | 12024 |
local dp_initialized = false
local dp_shader = nil
local dp_colorLocation = -1
local dp_color = { 1.0, 1.0, 1.0, 1.0 }
local dp_pointSizeLocation = -1
local dp_pointSize = 1.0
local SHADER_NAME_POSITION_U_COLOR = "ShaderPosition_uColor"
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
lo... | gpl-3.0 |
OpenRA/OpenRA | mods/d2k/maps/harkonnen-01b/harkonnen01b.lua | 14 | 5015 | --[[
Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later vers... | gpl-3.0 |
dmccuskey/dmc-gestures | examples/gesture-pinch-basic/dmc_corona/dmc_gestures/core/gesture.lua | 10 | 14803 | --====================================================================--
-- dmc_corona/dmc_gesture/core/gesture.lua
--
-- Documentation:
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
Permission is hereby granted, free of charge,... | mit |
dmccuskey/dmc-gestures | examples/gesture-multigesture-simultaneous/dmc_corona/dmc_gestures/core/gesture.lua | 10 | 14803 | --====================================================================--
-- dmc_corona/dmc_gesture/core/gesture.lua
--
-- Documentation:
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
Permission is hereby granted, free of charge,... | mit |
xing634325131/Luci-0.11.1 | modules/admin-mini/luasrc/controller/mini/system.lua | 5 | 6712 | --[[
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 |
McGlaspie/mvm | lua/mvm/ReadyRoomPlayer.lua | 1 | 2226 |
Script.Load("lua/mvm/ScoringMixin.lua")
Script.Load("lua/MarineVariantMixin.lua")
Script.Load("lua/Mixins/BaseMoveMixin.lua")
Script.Load("lua/Mixins/GroundMoveMixin.lua")
Script.Load("lua/Mixins/JumpMoveMixin.lua")
Script.Load("lua/Mixins/CrouchMoveMixin.lua")
Script.Load("lua/Mixins/LadderMoveMixin.lua")
Script.Load... | gpl-3.0 |
pirate/snabbswitch | src/core/counter.lua | 13 | 3265 | -- counter.lua - Count discrete events for diagnostic purposes
--
-- This module provides a thin layer for representing 64-bit counters
-- as shared memory objects.
--
-- Counters let you efficiently count discrete events (packet drops,
-- etc) and are accessible as shared memory from other processes such
-- as monito... | apache-2.0 |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/WorldEdit/worldedit/visualization.lua | 1 | 3955 | --- Functions for visibly hiding nodes
-- @module worldedit.visualization
minetest.register_node("worldedit:placeholder", {
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
diggable = false,
pointable = false,
walkable = false,
groups = {not_in_creative_inventory=1},
})
--- Hides all node... | gpl-3.0 |
xing634325131/Luci-0.11.1 | libs/sgi-cgi/luasrc/sgi/cgi.lua | 13 | 2301 | --[[
LuCI - SGI-Module for CGI
Description:
Server Gateway Interface for CGI
FileId:
$Id: cgi.lua 6535 2010-11-23 01:02:21Z soma $
License:
Copyright 2008 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... | apache-2.0 |
McGlaspie/mvm | lua/mvm/Hud/GUIMineDisplay.lua | 1 | 3589 | // ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. =====
//
// lua\GUIMineDisplay.lua
//
// Created by: Andreas Urwalek (andi@unknownworlds.com)
//
// Displays the current number of bullets and clips for the ammo counter on a bullet weapon
//
// ========= For more information, v... | gpl-3.0 |
spixi/wesnoth | data/lua/helper.lua | 2 | 8301 | --! #textdomain wesnoth
local helper = {}
local wml_actions = wesnoth.wml_actions
--! Returns an iterator over all the sides matching a given filter that can be used in a for-in loop.
function helper.get_sides(cfg)
local function f(s)
local i = s.i
while i < #wesnoth.sides do
i = i + 1
if wesnoth.match_si... | gpl-2.0 |
amirkingred/telejian | plugins/anti-flood.lua | 281 | 2422 | local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 5
local function kick_user(user_id, chat_id)
local chat = 'chat#id'..chat_id
local user = 'user#id'..user_id
chat_del_user(chat, user, function (data, success, result)
if success ~= 1 then
local text = 'I can\'t k... | gpl-2.0 |
OpenRA/OpenRA | mods/ra/maps/fall-of-greece-2-evacuation/evacuation-AI.lua | 7 | 3468 | --[[
Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later vers... | gpl-3.0 |
payday-restoration/restoration-mod | lua/sc/units/player_team/logics/teamailogicdisabled.lua | 1 | 2127 | function TeamAILogicDisabled._upd_enemy_detection(data)
data.t = TimerManager:game():time()
local my_data = data.internal_data
local delay = CopLogicBase._upd_attention_obj_detection(data, AIAttentionObject.REACT_SURPRISED, nil)
local new_attention, new_prio_slot, new_reaction = TeamAILogicIdle._get_priority_attent... | agpl-3.0 |
AlexanderMatveenko/omim | 3party/osrm/osrm-backend/profiles/bicycle.lua | 59 | 12992 | require("lib/access")
require("lib/maxspeed")
-- Begin of globals
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true }
access_tag_whitelist ... | apache-2.0 |
nuintun/payday2 | extras/mods/npc-weapons-customization/Weapons/benelli_npc.lua | 1 | 7284 | log("benelli_npc loaded")
Hooks:Add("LocalizationManagerPostInit", "NPCWeap_benelli_Localization", function(loc)
LocalizationManager:add_localized_strings({
["random"] = "Random",
["benelli_none"] = "None",
--Barrels
["benelli_g_barrel_std"] = "Standard",
["benelli_g_barrel_short"] = "Short",
... | mit |
phunculist/dotfiles | .config/vis/themes/phunculist.lua | 1 | 1142 | -- Monotone color scheme
local lexers = vis.lexers
lexers.STYLE_DEFAULT = 'default'
lexers.STYLE_NOTHING = 'default'
lexers.STYLE_CLASS = ''
lexers.STYLE_COMMENT = 'fore:#6e6e6e,italics'
lexers.STYLE_CONSTANT = ''
lexers.STYLE_DEFINITION = ''
lexers.STYLE_ERROR = 'fore:red'
lexers.STYLE_FUNCTION = ''
lexers.STYLE_KEYW... | mit |
McGlaspie/mvm | lua/mvm/TechData.lua | 1 | 133838 | // ======= Copyright (c) 2003-2012, Unknown Worlds Entertainment, Inc. All rights reserved. =======
//
// lua\TechData.lua
//
// Created by: Charlie Cleveland (charlie@unknownworlds.com)
//
// A "database" of attributes for all units, abilities, structures, weapons, etc. in the game.
// Shared between client and s... | gpl-3.0 |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua | 2 | 9069 |
--------------------------------
-- @module AudioEngine
-- @parent_module ccexp
--------------------------------
--
-- @function [parent=#AudioEngine] lazyInit
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the current playback position of an audio ins... | gpl-3.0 |
khanasbot/Avatar_Bot | 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 |
oUF-wow/oUF | elements/raidtargetindicator.lua | 10 | 2510 | --[[
# Element: Raid Target Indicator
Handles the visibility and updating of an indicator based on the unit's raid target assignment.
## Widget
RaidTargetIndicator - A `Texture` used to display the raid target icon.
## Notes
A default texture will be applied if the widget is a Texture and doesn't have a texture se... | mit |
CodeLiners/Silcom-Kernel | mod/io_old.lua | 1 | 4333 | local function getPID()
return thread_get(thread_getRunning()).pid
end
on("load",
function()
registerHook("io_stdout", function(text)
local pid = getPID()
process_set(pid, "stdoutbuff", process_get(pid).stdoutbuff..text)
end)
registerHook("io_stdin", function(mo... | bsd-3-clause |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Animation.lua | 11 | 6377 |
--------------------------------
-- @module Animation
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... <br>
-- return The times the animation is going to loop.
-- @function ... | gpl-3.0 |
pfgithub/liquid-science | prototypes/resource/data.lua | 1 | 1671 | local function autoplace_settings(name, coverage)
local ret = {
control = name,
sharpness = 1,
richness_multiplier = 1500,
richness_multiplier_distance_bonus = 20,
richness_base = 500,
coverage = coverage,
peaks = {
{
noise_layer = name,
noise_octaves_difference = -1.... | mit |
McGlaspie/mvm | lua/mvm/SprintMixin.lua | 1 | 8125 |
Script.Load("lua/SprintMixin.lua")
// Max duration of sprint
SprintMixin.kMaxSprintTime = 4 //12 --FIXME This doesn't do shit apparently...
// Rate at which max sprint time comes back when not sprinting (multiplier x time)
SprintMixin.kSprintRecoveryRate = .5 // 1
// Must have this much energy to start sprint
Sp... | gpl-3.0 |
haider1984/-1 | plugins/en-addsudo.lua | 5 | 1472 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY SAJJAD NOORI ▀▄ ▄▀
▀▄ ▄▀ BY SAJAD NOORI (@SAJJADNOORI) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY SAJJAD NOORI ▀▄ ▄▀
▀▄ ▄▀ ADD SUDO : اضافه مطور ▀▄ ▄▀
▀▄▀... | gpl-2.0 |
pydsigner/naev | docs/ai/examples/attacked.lua | 19 | 1323 | --[[
-- Based on when pilot is hit by something, then will attempt to retaliate
--]]
-- triggered when pilot is hit by something
function attacked ( attacker )
task = ai.taskname()
if task ~= "attack" and task ~= "runaway" then
-- some taunting
taunt( attacker )
-- now pilot fights back
... | gpl-3.0 |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/snow/src/abms.lua | 1 | 6864 | --[[
2017-09-21 modified by MrCerealGuy <mrcerealguy@gmx.de>
replaced nodeupdate(pos) (deprecated) with minetest.check_for_falling(pos)
--]]
-- Added to change dirt_with_snow to dirt if covered with blocks that don't let
-- light through (sunlight_propagates) or have a light paramtype and
-- liquidtype combination.... | gpl-3.0 |
MrCerealGuy/Stonecraft | games/stonecraft_game/mods/technic/technic/machines/LV/water_mill.lua | 1 | 3498 | -- A water mill produces LV EUs by exploiting flowing water across it
-- It is a LV EU supplier and fairly low yield (max 180EUs)
-- It is a little over half as good as the thermal generator.
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_alias("water_mill", "t... | gpl-3.0 |
wcjscm/JackGame | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua | 11 | 1440 |
--------------------------------
-- @module ParticleFireworks
-- @extend ParticleSystemQuad
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ParticleFireworks] init
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [... | gpl-3.0 |
McGlaspie/mvm | lua/mvm/GrenadeThrower.lua | 1 | 1086 |
Script.Load("lua/Weapons/Marine/GrenadeThrower.lua")
local function MvM_ThrowGrenade( self, player )
if Server or (Client and Client.GetIsControllingPlayer()) then
local viewCoords = player:GetViewCoords()
local eyePos = player:GetEyePos()
local startPointTrace = Shared.TraceCapsule(eye... | gpl-3.0 |
rbavishi/vlc-2.2.1 | share/lua/playlist/pluzz.lua | 105 | 3740 | --[[
$Id$
Copyright © 2011 VideoLAN
Authors: Ludovic Fauvet <etix at l0cal dot com>
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 l... | lgpl-2.1 |
dreadmullet/JC2-MP-Racing | server/sCourseManager.lua | 1 | 2314 | class("CourseManager")
-- Each CourseManager is tied to a course manifest.
function CourseManager:__init(manifestPath)
self.manifestPath = manifestPath
self.courseNames = {}
self:LoadManifest()
self:Randomize()
self.currentIndex = 1
end
function CourseManager:GetNextCourseName()
return self.courseNames[self... | mit |
T3hArco/skeyler-gamemodes | Sassilization/gamemode/modules/unit/server/commands/attackmove.lua | 1 | 1694 | ----------------------------------------
-- Sassilization
-- Shared Unit Module
-- http://sassilization.com
-- By Spacetech & Sassafrass
----------------------------------------
local CMD = {}
CMD.attack = true
CMD.move = true
function CMD:Init( TargetPos )
self.pos = TargetPos
end
function ... | bsd-3-clause |
heysion/prosody-modules | mod_couchdb/couchdb/couchapi.lib.lua | 32 | 2213 |
local setmetatable = setmetatable;
local pcall = pcall;
local type = type;
local t_concat = table.concat;
local print = print;
local socket_url = require "socket.url";
local http = require "socket.http";
local ltn12 = require "ltn12";
--local json = require "json";
local json = module:require("couchdb/js... | mit |
xing634325131/Luci-0.11.1 | applications/luci-pbx/luasrc/model/cbi/pbx-advanced.lua | 29 | 14365 | --[[
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 |
rgujju/NexIDE | firmware/tools/utils.lua | 48 | 11997 | -- Generic utility functions
module( ..., package.seeall )
local lfs = require "lfs"
local sf = string.format
-- Taken from Lake
dir_sep = package.config:sub( 1, 1 )
is_os_windows = dir_sep == '\\'
-- Converts a string with items separated by 'sep' into a table
string_to_table = function( s, sep )
if type( s ) ~= ... | gpl-3.0 |
Djabbz/nn | MixtureTable.lua | 15 | 5612 | local MixtureTable, parent = torch.class('nn.MixtureTable', 'nn.Module')
function MixtureTable:__init(dim)
parent.__init(self)
self.dim = dim
self.size = torch.LongStorage()
self.batchSize = 0
self.size2 = torch.LongStorage()
self.backwardSetup = false
self.gradInput = {}
end
function MixtureTabl... | bsd-3-clause |
panozzaj/ufo2000 | extensions/terrain-airfield/air.lua | 2 | 3897 | AddXcomTerrain {
Name = "Airfield",
Tiles = {
"$(xcom)/terrain/blanks.*",
"$(tftd)/terrain/port01.*",
"$(tftd)/terrain/port02.*",
"$(xcom)/terrain/plane.*",
"$(xcom)/terrain/xbase2.*"
},
Maps = {
"$(extension)/air00.map",
"$(extension)/air01.map",
"$(extension)/air02.map",
"$(extension)/air03.map"... | gpl-2.0 |
T3hArco/skeyler-gamemodes | sslobby/entities/entities/slot_machine/init.lua | 1 | 2281 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
resource.AddFile("sound/testslot/jackpot.mp3")
resource.AddFile("sound/testslot/pull_lever.mp3")
resource.AddFile("sound/testslot/spinning_1.mp3")
resource.AddFile("sound/testslot/spinning_3.mp3")
resource.AddFile("sound/testslot/spinning_3.... | bsd-3-clause |
5620j/taylor-bot | bot/taylor-bot.lua | 1 | 13910 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
local f = assert(io.popen('/usr/bin/git describe --tags', 'r'))
VERSION = assert(f:read('*a'))
f:close()
-- This function is ... | gpl-2.0 |
hugomg/lullaby | lullaby/sax.lua | 1 | 5227 | local Exports = {}
local yield = coroutine.yield
-------------------
--SAX Stream events
-------------------
-- string, list[{string,string}] -> Evt
local function StartEvent(tagname, attrs)
assert(type(attrs) == 'table')
return {evttype='START', tagname=tagname, attrs=attrs or{}}
end
-- string -> Evt
local fun... | mit |
heysion/prosody-modules | mod_privilege/mod_privilege.lua | 16 | 15855 | -- XEP-0356 (Privileged Entity)
-- Copyright (C) 2015 Jérôme Poisson
--
-- This module is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- Some parts come from mod_remote_roster (module by Waqas Hussain and Kim Alvefur, see https://code.google.com/p/prosody-modules/)
-... | mit |
wcjscm/JackGame | frameworks/cocos2d-x/plugin/luabindings/auto/api/lua_cocos2dx_pluginx_auto_api.lua | 146 | 1793 | --------------------------------
-- @module plugin
--------------------------------------------------------
-- the plugin PluginProtocol
-- @field [parent=#plugin] PluginProtocol#PluginProtocol PluginProtocol preloaded module
--------------------------------------------------------
-- the plugin PluginManager
-- @fi... | gpl-3.0 |
rgujju/NexIDE | firmware/lua_examples/ucglib/GT_text.lua | 30 | 1039 | local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component text...")
local x, y, w, h, i
local m
disp:setColor(0, 80, 40, 0)
disp:setColor(1, 60, 0, 40)
disp:setColor(2, 20, 0, 20)
disp:setColo... | gpl-3.0 |
dmccuskey/dmc-gestures | examples/gesture-pan-move/dmc_corona/lib/dmc_lua/lua_e4x.lua | 47 | 18011 | --====================================================================--
-- lua_e4x.lua
--
-- Documentation: http://docs.davidmccuskey.com/display/docs/lua_e4x.lua
--====================================================================--
--[[
The MIT License (MIT)
Copyright (C) 2014 David McCuskey. All Rights Reserve... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.