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 |
|---|---|---|---|---|---|
imeteora/cocos2d-x-3.x-Qt | tests/lua-tests/src/MenuTest/MenuTest.lua | 16 | 18464 | local kTagMenu = 1
local kTagMenu0 = 0
local kTagMenu1 = 1
local MID_CALLBACK = 1000
local MID_CALLBACK2 = 1001
local MID_DISABLED = 1002
local MID_ENABLE = 1003
local MID_CONFIG = 1004
local MID_QUIT = 1005
local MID_OPACITY = 1006
local MID_ALIGN = 1007
local MID_C... | gpl-2.0 |
PAC3-Server/ServerContent | lua/notagain/aowl/commands/play.lua | 2 | 1506 | AddCSLuaFile()
if SERVER then
API_YT_SEARCH_URL = "https://www.googleapis.com/youtube/v3/search?key=%s&part=id&type=video&q=%s"
API_YT_KEY = file.Read("translation_key.txt")
local function RequestYTSearch( q, c )
local url = string.format( API_YT_SEARCH_URL, API_YT_KEY, q )
url = string.Replace( url, " ", "%20... | mit |
sutt0n/essentialmode-mysql | client/main.lua | 1 | 2245 | --[[
-- @author smuttoN
-- @website www.github.com/sutt0n
-- @date 5/22/2017
--]]
-- first join
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if NetworkIsSessionStarted() then
TriggerServerEvent("es:firstJoinProper")
return
end
end
end)
local oldPos
Citizen.CreateThread(function()
whi... | gpl-3.0 |
christopherjwang/rackspace-monitoring-agent | hostinfo/disk.lua | 1 | 1382 | --[[
Copyright 2014 Rackspace
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 agreed to in writing, software
dis... | apache-2.0 |
Germanunkol/GridCars | lib/punchUI/inputBlock.lua | 4 | 4847 |
local PATH = (...):match("(.-)[^%.%/]+$")
local class = require( PATH .. "middleclass" )
local TextBlock = require( PATH .. "textBlock" )
local col = require(PATH .. "colors")
local COLORS, COLORS_INACTIVE = col[1], col[2]
col = nil
local InputBlock = TextBlock:subclass("InputBlock")
function InputBlock:initialize( ... | mit |
rafael/kong | kong/plugins/mashape-analytics/handler.lua | 5 | 2842 | -- Analytics plugin handler.
--
-- How it works:
-- Keep track of calls made to configured APIs on a per-worker basis, using the ALF format
-- (alf_serializer.lua) and per-API buffers. `:access()` and `:body_filter()` are implemented to record some properties
-- required for the ALF entry.
--
-- When an API buffer is f... | apache-2.0 |
UB12/wnww | plugins/invite.lua | 47 | 1193 | 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 |
CarabusX/Zero-K | scripts/chickenflyerqueen.lua | 5 | 7346 | include "constants.lua"
local spGetUnitHealth = Spring.GetUnitHealth
--pieces
local body, head, tail, leftWing1, rightWing1, leftWing2, rightWing2 = piece("body","head","tail","lwing1","rwing1","lwing2","rwing2")
local leftThigh, leftKnee, leftShin, leftFoot, rightThigh, rightKnee, rightShin, rightFoot = piece("lthig... | gpl-2.0 |
amirmrbad/superbot | plugins/lock_link.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 |
hacker44-h44/hacker44-spamer36 | 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 |
ReclaimYourPrivacy/cloak-luci | build/luadoc/luadoc/taglet/standard/tags.lua | 46 | 5543 | -------------------------------------------------------------------------------
-- Handlers for several tags
-- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $
-------------------------------------------------------------------------------
local luadoc = require "luadoc"
local util = require "luadoc.util"... | apache-2.0 |
lunjesse/GaW4-bot | Fire Attack (Classic).lua | 1 | 1588 | memory.usememorydomain("Combined WRAM")
function move_fire(dest)
local player = memory.readbyte(0x03C130)
local hit = memory.readbyte(0x03C132)
-- console.log(dest)
if (player == dest) then
if (hit == 0) then joypad.set({A = true}) return end
else
if (player == 0 and dest == 1) then joypad.set({Right = true})
... | mit |
kbara/snabb | 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 |
CarabusX/Zero-K | LuaRules/Configs/StartBoxes/TheHunters-v3.lua | 17 | 1313 | return {
[0] = {
startpoints = {
{860,451},
},
boxes = {
{
{819,410},
{901,410},
{901,492},
{819,492},
},
},
},
[1] = {
startpoints = {
{7496,7578},
},
boxes = {
{
{7455,7537},
{7537,7537},
{7537,7619},
{7455,7619},
},
},
},
[2] = {
startpoints = ... | gpl-2.0 |
Adirelle/AdiBags | widgets/ItemButton.lua | 1 | 17463 | --[[
AdiBags - Adirelle's bag addon.
Copyright 2010-2021 Adirelle (adirelle@gmail.com)
All rights reserved.
This file is part of AdiBags.
AdiBags 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 ... | gpl-3.0 |
create-bot/mybot | plugins/all.lua | 1 | 4199 | do
data = load_data(_config.moderation.data)
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_print... | gpl-2.0 |
CarabusX/Zero-K | effects/solange.lua | 7 | 1941 | -- solange
-- solange_pillar
return {
["solange"] = {
nw = {
air = true,
class = [[CExpGenSpawner]],
count = 150,
ground = true,
water = true,
underwater = true,
properties = {
delay ... | gpl-2.0 |
houqp/koreader-base | ffi/blitbuffer.lua | 1 | 66239 | --[[--
Generic blitbuffer/GFX stuff that works on memory buffers
@module ffi.blitbuffer
--]]
local bit = require("bit")
local ffi = require("ffi")
local util = require("ffi/util")
local C = ffi.C
-- we will use this extensively
local floor = math.floor
local ceil = math.ceil
local min = math.min
local rshift = bit.r... | agpl-3.0 |
tgp1994/LiquidRP-tgp1994 | gamemode/modules/chat/sv_chatcommands.lua | 1 | 2055 | /*---------------------------------------------------------
Talking
---------------------------------------------------------*/
local function GroupMsg(ply, args)
if args == "" then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
return ""
end
local DoSay = function(text)
if text == ... | gpl-3.0 |
yinjun322/ejoy2d | examples/ex01.lua | 19 | 1027 | local ej = require "ejoy2d"
local fw = require "ejoy2d.framework"
local pack = require "ejoy2d.simplepackage"
pack.load {
pattern = fw.WorkDir..[[examples/asset/?]],
"sample",
}
local obj = ej.sprite("sample","cannon")
local turret = obj.turret
-- set position (-100,0) scale (0.5)
obj:ps(-100,0,0.5)
local obj2 = ... | mit |
dmccuskey/lua-megaphone | spec/lua_megaphone_spec.lua | 1 | 4330 | --====================================================================--
-- spec/lua_megaphone_spec.lua
--
-- Testing for lua-megaphone using Busted
--====================================================================--
package.path = './dmc_lua/?.lua;' .. package.path
--==========================================... | mit |
CarabusX/Zero-K | LuaUI/Widgets/api_preselection.lua | 6 | 6971 | function widget:GetInfo()
return {
name = "Pre-Selection Handler",
desc = "Utility Functions for handling units in selection box and under selection cursor",
author = "Shadowfury333",
date = "Jan 6th, 2016",
license = "GPLv2",
version = "1",
layer = 1000,
enabled = true, --... | gpl-2.0 |
CarabusX/Zero-K | LuaRules/Gadgets/Include/GetNukeIntercepted.lua | 6 | 1569 | local atan = math.atan
local cos = math.cos
local sin = math.sin
local pi = math.pi
local sqrt = math.sqrt
-- Unit (antinuke) position, Projectile (nuke silo) position, Target position
local function GetNukeIntercepted(ux, uz, px, pz, tx, tz, radiusSq)
-- Translate projectile position to the origin.
ux, uz, tx, tz,... | gpl-2.0 |
junkblocker/hammerspoon | extensions/_coresetup/test_coresetup.lua | 5 | 3503 | function testOSExit()
assertIsEqual("function", type(hs._exit))
assertIsEqual(hs._exit, os.exit)
return success()
end
function testConfigDir()
assertIsString(hs.configdir)
assertTrue(hs.configdir ~= "")
return success()
end
function testDocstringsJSONFile()
assertIsString(hs.docstrings_json_file)
as... | mit |
PeqNP/GameKit | src/royal/AdVendor.lua | 1 | 2856 | --
-- Manages which tiers can be presented.
--
-- @todo Filter adunits and tiers to have the highest paid tiers displayed first.
-- @todo Add a 'stylize' parameter that is used to style the button being presented.
--
-- @copyright Upstart Illustration LLC. All rights reserved.
--
local ClickableAdUnit = require("royal... | mit |
luciouskami/YDWE | Development/Component/plugin/w3x2lni/script/gui/old/plugin.lua | 2 | 3210 | fs = require 'bee.filesystem'
require 'utility'
local root = fs.current_path():remove_filename()
local plugin_path = root / 'plugin'
local function load_one_plugin(path)
local plugin = assert(load(io.load(path), '@'..path:string(), 't', _ENV))()
return {
path = path:stem():string(),
name = plug... | gpl-3.0 |
luohancfd/FluidDynamicTools | Thermo_Chemical_Properties/Molecule_Properties/RawData/I2.lua | 1 | 1648 | -- Author: Rowan J. Gollan
-- Date: 30-Oct-2008
-- diatomic iodine
I2 = {}
I2.M = {
value = 253.8089400e-3,
units = 'kg/mol',
description = 'molecular mass',
reference = 'molecular weight from CEA2'
}
I2.atomic_constituents = {I=2}
I2.charge = 0
I2.gamma = {
value = 1.4,
units = 'non-dimensional',... | gpl-3.0 |
CarabusX/Zero-K | LuaUI/Widgets/unit_icons.lua | 6 | 9615 | -------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Unit Icons",
desc = "v0.033 Shows icons above units",
author = "CarRepairer a... | gpl-2.0 |
PAC3-Server/ServerContent | lua/notagain/essential/libraries/debug_traceback2.lua | 2 | 5299 | local function tostringx(obj)
local t = type(obj)
if obj == NULL then
return t .. "(NULL)"
elseif t == "string" then
if obj:find("\n", nil, true) then
obj = obj:gsub("\n", "\\n"):sub(0,50) .. "..."
end
return '"' .. obj .. '"'
elseif t == "Player" then
return "Player("..obj:UserID()..") -- " .. obj:N... | mit |
rainfiel/skynet | test/testbson.lua | 12 | 1411 | local bson = require "bson"
sub = bson.encode_order( "hello", 1, "world", 2 )
local function tbl_next(...)
print("--- next.a", ...)
local k, v = next(...)
print("--- next.b", k, v)
return k, v
end
local function tbl_pairs(obj)
return tbl_next, obj.__data, nil
end
local obj_a = {
__data = {
[1] = 2,
[3] = ... | mit |
Bpalkmim/LadyLuck | Tests/tests.lua | 1 | 1243 | -- @module Test
-- @file tests.lua
-- @author Bernardo Pinto de Alkmim
-- @creation 2016/04/11
-- @description Este arquivo é responsável por rodar os testes de IO
-- (e quaisquer outros que sejam necessários).
-- @version 0.8
package.path = package.path .. ";../Dice/dice.lua"
local testsDice = require("testsDice")
pa... | gpl-3.0 |
mattyx14/otxserver | data/monster/bosses/zoralurk.lua | 2 | 4637 | local mType = Game.createMonsterType("Zoralurk")
local monster = {}
monster.description = "Zoralurk"
monster.experience = 30000
monster.outfit = {
lookType = 12,
lookHead = 0,
lookBody = 98,
lookLegs = 86,
lookFeet = 94,
lookAddons = 0,
lookMount = 0
}
monster.health = 55000
monster.maxHealth = 55000
monster.r... | gpl-2.0 |
bobkersten/domoticz | scripts/lua/script_time_demo.lua | 55 | 1932 | -- demo time script
-- script names have three name components: script_trigger_name.lua
-- trigger can be 'time' or 'device', name can be any string
-- domoticz will execute all time and device triggers when the relevant trigger occurs
--
-- copy this script and change the "name" part, all scripts named "demo" are ign... | gpl-3.0 |
tgp1994/LiquidRP-tgp1994 | entities/weapons/weapon_real_base_pistol/shared.lua | 1 | 1586 | -- Read the weapon_real_base if you really want to know what each action does
if (SERVER) then
AddCSLuaFile("shared.lua")
end
if (CLIENT) then
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = false
SWEP.ViewModelFOV = 60
SWEP.ViewModelFlip = true
end
/*---------------------------------------------------------
M... | gpl-3.0 |
asiftastos/Yamac | scripts/genie.lua | 2 | 2218 | ROOT_DIR = path.getabsolute("..")
BUILD_DIR = path.join(ROOT_DIR, "build")
LIBS_DIR = path.join(ROOT_DIR, "libs")
-- Clean action.
if _ACTION == "clean" then
os.rmdir(BUILD_DIR)
os.rmdir(LIBS_DIR)
os.exit(1)
end
solution "habiwoodext"
configurations {
"Debug",
"Release"
}
pl... | mit |
CarabusX/Zero-K | LuaRules/Configs/StartBoxes/Rage_v1.lua | 17 | 2366 | return {
[0] = {
startpoints = {
{870,3635},
},
boxes = {
{
{512,3277},
{1229,3277},
{1229,3994},
{512,3994},
},
},
},
[1] = {
startpoints = {
{9574,5990},
},
boxes = {
{
{9216,5632},
{9933,5632},
{9933,6349},
{9216,6349},
},
},
},
[2] = {
startpo... | gpl-2.0 |
luohancfd/FluidDynamicTools | Thermo_Chemical_Properties/Molecule_Properties/RawData/H2O.lua | 1 | 5422 | -- Collater: Rowan J. Gollan
-- Date: 30-Mar-2009
H2O = {}
H2O.M = {
value = 18.01528e-3,
units = 'kg/mol',
description = 'molecular mass',
reference = 'CEA2::thermo.inp'
}
H2O.atomic_constituents = {H=2,O=1}
H2O.charge = 0
H2O.gamma = {
value = 1.329,
units = 'non-dimensional',
description = 'rat... | gpl-3.0 |
mattyx14/otxserver | data/monster/quests/cults_of_tibia/bosses/malkhar_deathbringer_stop.lua | 2 | 2153 | local mType = Game.createMonsterType("Malkhar Deathbringer Stop")
local monster = {}
monster.name = "Malkhar Deathbringer"
monster.description = "Malkhar Deathbringer"
monster.experience = 0
monster.outfit = {
lookType = 134,
lookHead = 19,
lookBody = 94,
lookLegs = 41,
lookFeet = 57,
lookAddons = 0,
lookMount ... | gpl-2.0 |
fo369/luci-1505 | applications/luci-app-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua | 141 | 1031 | --[[
smap_devinfo - SIP Device Information
(c) 2009 Daniel Dickinson
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$
]]--
require("luci.i18n")
re... | apache-2.0 |
luciouskami/YDWE | Development/Component/plugin/w3x2lni/script/gui/new/common_attribute.lua | 3 | 3987 | local gui = require 'yue.gui'
local function BindValue(t, data, bind, name, func)
if t.bind and t.bind[name] then
bind[name] = data:bind(t.bind[name], function()
func(bind[name]:get())
end)
func(bind[name]:get())
else
if t[name] ~= nil then
func(t[name])
... | gpl-3.0 |
jucor/lua-sci | fmin/_diffevol.lua | 1 | 4988 | --------------------------------------------------------------------------------
-- Differential evolution algorithm module.
--
-- Copyright (C) 2011-2013 Stefano Peluchetti. All rights reserved.
--
-- Features, documention and more: http://www.scilua.org .
--
-- This file is part of the SciLua library, which is... | mit |
dbltnk/macro-prototype | PhaseManager.lua | 1 | 8780 | -- PhaseManager
PhaseManager = Sprite:extend
{
class = "PhaseManager",
props = {"gameId", "x", "y", "width", "height", "phase", "round", "round_start_time", "round_end_time", "next_xp_reset_time"},
sync_high = {"fakeHours", "fakeDays"},
phase = "init_needed", -- "init_needed", "warmup", "playing", "after"
round ... | mit |
Germanunkol/GridCars | network/client.lua | 2 | 6835 |
local BASE = (...):match("(.-)[^%.]+$")
local socket = require("socket")
local User = require( BASE .. "user" )
local CMD = require( BASE .. "commands" )
local utility = require( BASE .. "utility" )
local Client = {}
Client.__index = Client
local userList = {}
local numberOfUsers = 0
local partMessage = ""
local... | mit |
tenplus1/ethereal | food.lua | 1 | 5628 |
local S = ethereal.intllib
-- Banana (Heals one heart when eaten)
minetest.register_node("ethereal:banana", {
description = S("Banana"),
drawtype = "torchlike",
tiles = {"banana_single.png"},
inventory_image = "banana_single.png",
wield_image = "banana_single.png",
paramtype = "light",
sunlight_propagates = tr... | mit |
clementfarabet/nn | Parallel.lua | 39 | 3780 | local Parallel, parent = torch.class('nn.Parallel', 'nn.Container')
function Parallel:__init(inputDimension,outputDimension)
parent.__init(self)
self.modules = {}
self.size = torch.LongStorage()
self.inputDimension = inputDimension
self.outputDimension = outputDimension
end
function Parallel:updateOut... | bsd-3-clause |
CarabusX/Zero-K | effects/sumo.lua | 7 | 3226 | return {
["sumosmoke"] = {
muzzlesmoke = {
air = true,
class = [[CSimpleParticleSystem]],
count = 6,
ground = true,
water = true,
properties = {
airdrag = 0.8,
colormap = [[0.... | gpl-2.0 |
CarabusX/Zero-K | LuaUI/Widgets/cmd_customformations2.lua | 4 | 42934 | function widget:GetInfo()
return {
name = "CustomFormations2",
desc = "Dragged commands follow the wobbly line instead of treating it as a line segment",
author = "Niobium, modified by Skasi", -- Based on 'Custom Formations' by jK and gunblob
version = "v3.4", -- With modified dot drawing from v... | gpl-2.0 |
garrysmodlua/wire | lua/wire/stools/hologrid.lua | 8 | 2091 | WireToolSetup.setCategory( "Visuals/Holographic" )
WireToolSetup.open( "hologrid", "HoloGrid", "gmod_wire_hologrid", nil, "HoloGrids" )
if CLIENT then
language.Add( "tool.wire_hologrid.name", "Holographic Grid Tool (Wire)" )
language.Add( "tool.wire_hologrid.desc", "The grid to aid in holographic projections" )
TOO... | apache-2.0 |
ReclaimYourPrivacy/cloak-luci | modules/luci-base/luasrc/model/network.lua | 8 | 33786 | -- Copyright 2009-2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local type, next, pairs, ipairs, loadfile, table
= type, next, pairs, ipairs, loadfile, table
local tonumber, tostring, math = tonumber, tostring, math
local require = require
local nxo = require "nixio... | apache-2.0 |
jucor/lua-sci | quad/_dblexp_precomputed.lua | 1 | 17605 | --------------------------------------------------------------------------------
-- Precomputed abscissas and weights for double exponential quadrature method.
--
-- Copyright (C) 2011-2013 Stefano Peluchetti. All rights reserved.
--
-- Features, documention and more: http://www.scilua.org .
--
-- This file is p... | mit |
mattyx14/otxserver | data/scripts/talkactions/god/add_skill.lua | 2 | 1979 | local function getSkillId(skillName)
if skillName == "club" then
return SKILL_CLUB
elseif skillName == "sword" then
return SKILL_SWORD
elseif skillName == "axe" then
return SKILL_AXE
elseif skillName:sub(1, 4) == "dist" then
return SKILL_DISTANCE
elseif skillName:sub(1, 6) == "shield" then
return SKILL_S... | gpl-2.0 |
mattyx14/otxserver | data/monster/humanoids/troll.lua | 2 | 2920 | local mType = Game.createMonsterType("Troll")
local monster = {}
monster.description = "a troll"
monster.experience = 20
monster.outfit = {
lookType = 15,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 15
monster.Bestiary = {
class = "Humanoid",
race ... | gpl-2.0 |
mnemnion/loon | src/mods/peg/core-rules.lua | 1 | 1231 | -- Core Syntax Rules
-- A collection of useful regular patterns
local lpeg = require "lpeg"
local epeg = require "peg/epeg"
local match = lpeg.match -- match a pattern against a string
local P = lpeg.P -- match a string literally
local S = lpeg.S -- match anything in a set
local R = epeg.R -- match anything in a r... | mit |
bullno1/Akuma | premake4.lua | 1 | 1172 | solution "Akuma"
configurations {"Develop"}
location "build"
project "Akuma"
kind "ConsoleApp"
language "C++"
targetdir "bin"
files {
"src/**.h",
"src/main.cpp",
"src/Simulator.cpp",
"src/Input.cpp",
"src/FileWatcher/FileWatcher.cpp"
}
includedirs {
"src",
os.getenv("MOAI_INCLUDE")
... | mit |
nitheeshkl/kln_awesome | awesome_3.4/themes/redhalo/theme.lua | 1 | 5141 | -- redhalo, awesome3 theme
--{{{ Main
require("awful.util")
theme = {}
home = os.getenv("HOME")
config = "/home/kln/.config/awesome"
shared = "/home/kln/.config/awesome"
--config = awful.util.getdir("config")
--shared = "/usr/share/awesome"
if not awful.util.file_readable(shared ... | gpl-2.0 |
amirhosein2233/uzzbot | 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 |
CarabusX/Zero-K | LuaUI/savetable.lua | 6 | 3715 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: savetable.lua
-- brief: a human friendly table writer
-- author: Dave Rodgers
--
-- Copyright (C) 2007.
-- Licensed under the terms of ... | gpl-2.0 |
mattyx14/otxserver | data/chatchannels/scripts/help.lua | 2 | 3074 | local CHANNEL_HELP = 7
local storage = 456112
local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT)
muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP)
muted:setParameter(CONDITION_PARAM_TICKS, 3600000)
function onSpeak(player, type, message)
local playerAccountType = player:getAccountType()
... | gpl-2.0 |
mattyx14/otxserver | data/scripts/spells/monster/gaz'haragoth_summon.lua | 2 | 1039 | local spell = Spell("instant")
function spell.onCastSpell(creature, var)
local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 5, 5, 5, 5)
local check = 0
if #t ~= nil then
for i = 1, #t do
spectator = t[i]
if spectator:getName() == "Minion Of Gaz'haragoth" then
... | gpl-2.0 |
CarabusX/Zero-K | scripts/commrecon.lua | 4 | 15880 | include "constants.lua"
include "JumpRetreat.lua"
--------------------------------------------------------------------------------
-- pieces
--------------------------------------------------------------------------------
local base = piece 'base'
local pelvis = piece 'pelvis'
local turret = piece 'turret'
local torso... | gpl-2.0 |
mattyx14/otxserver | data/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua | 2 | 2997 | local mType = Game.createMonsterType("Izcandar the Banished")
local monster = {}
monster.description = "Izcandar the Banished"
monster.experience = 6900
monster.outfit = {
lookType = 1137,
lookHead = 19,
lookBody = 95,
lookLegs = 76,
lookFeet = 38,
lookAddons = 2,
lookMount = 0
}
monster.health = 7600
monster.... | gpl-2.0 |
mumuqz/luci | protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua | 47 | 3692 | -- 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 |
fo369/luci-1505 | protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua | 72 | 2039 | -- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ipaddr, peeraddr, ip6addr, tunnelid, username, password
local defaultroute, metric, ttl, mtu
ipaddr = s:taboption("general", Value, "ipaddr",
translate("Local IPv4 ad... | apache-2.0 |
nitheeshkl/kln_awesome | awesome_3.5/lain/layout/centerfair.lua | 1 | 5802 |
--[[
Licensed under GNU General Public License v2
* (c) 2014, projektile
* (c) 2013, Luke Bonham
* (c) 2010, Nicolas Estibals
* (c) 2010-2012, Peter Hofmann
... | gpl-2.0 |
nilsbrummond/ESO-CrystalFragment | CrystalFragmentsPassive.lua | 1 | 7427 | --
-- Crystal Fragment Passive
--
-- github.com/nilsbrummond/ESO-CrystalFragments
--
-- Detects the effect 'Crystal Fragment Passive' which grants the
-- next use of 'Crystal Fragment' as an instant cast ability.
--
-- The default game indicator of the passive effect is glowing purple
-- hands on the player.
--
-- T... | mit |
houqp/koreader-base | spec/unit/png_spec.lua | 1 | 1659 | local ffi = require("ffi")
local BB = require("ffi/blitbuffer")
local Png = require("ffi/png")
describe("Png module", function()
it("should write bitmap to png file", function()
local re, ok
local fn = os.tmpname()
local w, h = 400, 600
local bb = BB.new(w, h, BB.TYPE_BBRGB32)
... | agpl-3.0 |
PAC3-Server/ServerContent | lua/notagain/jrpg/libraries/client/draw_skewed_rect.lua | 2 | 5874 | local rect_mesh = {}
for i = 1, 6 do
rect_mesh[i] = {x = 0, y = 0, u = 0, v = 0}
end
local mesh = _G.mesh
local mesh_Begin = mesh.Begin
local mesh_Position = mesh.Position
local mesh_TexCoord = mesh.TexCoord
local mesh_Color = mesh.Color
local mesh_AdvanceVertex = mesh.AdvanceVertex
local mesh_End = mesh.End
local ... | mit |
mattyx14/otxserver | data/monster/quests/the_dream_courts/mind-wrecking_dream.lua | 2 | 2832 | local mType = Game.createMonsterType("Mind-Wrecking Dream")
local monster = {}
monster.description = "a mind-wrecking dream"
monster.experience = 5500
monster.outfit = {
lookType = 300,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 3900
monster.maxHeal... | gpl-2.0 |
clementfarabet/nn | SpatialDropout.lua | 33 | 1453 | local SpatialDropout, Parent = torch.class('nn.SpatialDropout', 'nn.Module')
function SpatialDropout:__init(p)
Parent.__init(self)
self.p = p or 0.5
self.train = true
self.noise = torch.Tensor()
end
function SpatialDropout:updateOutput(input)
self.output:resizeAs(input):copy(input)
if self.train the... | bsd-3-clause |
mattyx14/otxserver | data/monster/bosses/diseased_fred.lua | 2 | 3334 | local mType = Game.createMonsterType("Diseased Fred")
local monster = {}
monster.description = "a diseased Fred"
monster.experience = 300
monster.outfit = {
lookType = 299,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 1100
monster.maxHealth = 1100
mon... | gpl-2.0 |
mumuqz/luci | libs/luci-lib-nixio/docsrc/nixio.bit.lua | 171 | 2044 | --- Bitfield operators and mainpulation functions.
-- Can be used as a drop-in replacement for bitlib.
module "nixio.bit"
--- Bitwise OR several numbers.
-- @class function
-- @name bor
-- @param oper1 First Operand
-- @param oper2 Second Operand
-- @param ... More Operands
-- @return number
--- Invert given number.
... | apache-2.0 |
mattyx14/otxserver | data/monster/quests/cults_of_tibia/orc_cult_minion.lua | 2 | 2716 | local mType = Game.createMonsterType("Orc Cult Minion")
local monster = {}
monster.description = "an orc cult minion"
monster.experience = 850
monster.outfit = {
lookType = 50,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 1507
monster.Bestiary = {
cl... | gpl-2.0 |
mattyx14/otxserver | data/monster/quests/bigfoots_burden/humorless_fungus.lua | 2 | 2913 | local mType = Game.createMonsterType("Humorless Fungus")
local monster = {}
monster.description = "a humorless fungus"
monster.experience = 0
monster.outfit = {
lookType = 517,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.health = 2500
monster.maxHealth = 2500... | gpl-2.0 |
CarabusX/Zero-K | units/tankriot.lua | 3 | 3992 | return { tankriot = {
unitname = [[tankriot]],
name = [[Ogre]],
description = [[Heavy Riot Support Tank]],
acceleration = 0.132,
brakeRate = 0.516,
buildCostMetal = 500,
builder = false,
buildPic = [[tankriot.png]],
canGuar... | gpl-2.0 |
imeteora/cocos2d-x-3.x-Qt | tests/lua-tests/src/TouchesTest/Paddle.lua | 5 | 2575 | require "extern"
require "src/VisibleRect"
Paddle = class("Paddle", function(texture)
return cc.Sprite:createWithTexture(texture)
end)
Paddle.__index = Paddle
local kPaddleStateGrabbed = 0
local kPaddleStateUngrabbed = 1
Paddle._state = kPaddleStateGrabbed
function Paddle:rect()
local s = self:getTexture... | gpl-2.0 |
kbara/snabb | lib/ljsyscall/syscall/netbsd/nr.lua | 24 | 9205 | -- NetBSD syscall numbers
local nr = {
SYS = {
syscall = 0,
exit = 1,
fork = 2,
read = 3,
write = 4,
open = 5,
close = 6,
compat_50_wait4 = 7,
compat_43_ocreat = 8,
link = 9,
unlink = 10,
chdir = 12,
fchdir = 13,
compat_50_mknod = 14,
chmod = 15,
chown = 16,
["break"] = 17,
compat... | apache-2.0 |
kbara/snabb | lib/ljsyscall/syscall/linux/nl.lua | 18 | 36273 | -- modularize netlink code as it is large and standalone
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
loca... | apache-2.0 |
tgp1994/LiquidRP-tgp1994 | gamemode/modules/language/sh_english.lua | 1 | 20517 | -- DO NOT edit this file!
local english = {
-- Admin things
need_admin = "You need admin privileges in order to be able to %s",
need_sadmin = "You need super admin privileges in order to be able to %s",
no_privilege = "You don't have the right privileges to perform this action",
no_jail_pos = "No jail position",
... | gpl-3.0 |
Links7094/nwf | npl_mod/nwf/resty/template/html.lua | 14 | 1235 | local template = require "resty.template"
local setmetatable = setmetatable
local escape = template.escape
local concat = table.concat
local pairs = pairs
local type = type
local function tag(name, content, attr)
local r, a, content = {}, {}, content or attr
r[#r + 1] = "<"
r[#r + 1] = name
if attr the... | mit |
yinjun322/ejoy2d | ejoy2d/sprite.lua | 3 | 3226 | local debug = debug
local c = require "ejoy2d.sprite.c"
local pack = require "ejoy2d.spritepack"
local shader = require "ejoy2d.shader"
local richtext = require "ejoy2d.richtext"
local setmetatable = setmetatable
local method = c.method
local method_fetch = method.fetch
local method_test = method.test
local method_fet... | mit |
garrysmodlua/wire | lua/wire/stools/consolescreen.lua | 9 | 1033 | WireToolSetup.setCategory( "Visuals/Screens" )
WireToolSetup.open( "consolescreen", "Console Screen", "gmod_wire_consolescreen", nil, "Screens" )
if CLIENT then
language.Add( "tool.wire_consolescreen.name", "Console Screen Tool (Wire)" )
language.Add( "tool.wire_consolescreen.desc", "Spawns a console screen" )
TOO... | apache-2.0 |
rainfiel/skynet | lualib/dns.lua | 23 | 8758 | --[[
lua dns resolver library
See https://github.com/xjdrew/levent/blob/master/levent/dns.lua for more detail
-- resource record type:
-- TYPE value and meaning
-- A 1 a host address
-- NS 2 an authoritative name server
-- MD 3 a mail destination (Obsolete - use MX... | mit |
aqasaeed/sparta | plugins/bugzilla.lua | 611 | 3983 | do
local BASE_URL = "https://bugzilla.mozilla.org/rest/"
local function bugzilla_login()
local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password
print("accessing " .. url)
local res,code = https.request( url )
local data = json:decode(res)
return data
... | gpl-2.0 |
CarabusX/Zero-K | LuaUI/Configs/customCmdTypes.lua | 2 | 11038 | -- This is the list of name ("action name") related to unit command. This name won't work using command line (eg: /fight, won't activate FIGHT command) but it can be binded to a key (eg: /bind f fight, will activate FIGHT when f is pressed)
-- In reverse, one can use Spring.GetActionHotkey(name) to get the key binded t... | gpl-2.0 |
Undeadsewer/M.O.RE | Melee Overhaul REvamped/lua/copmovement.lua | 1 | 6447 | function CopMovement:add_dismemberment( part , variant )
self._dismemberments = self._dismemberments or {}
self._dismemberments[ part ] = true
if variant then
self._dismemberments.variant = variant
end
self._unit:set_extension_update_enabled( Idstring( "movement" ) , true )
end
Hooks:PreHook( CopMovement ... | gpl-3.0 |
Suprcheese/Vehicle-Wagon | stdlib/log/logger.lua | 8 | 4009 | --- Logger module
-- @module Logger
Logger = {}
--- Creates a new logger object.<p>
-- In debug mode, the logger writes immediately. Otherwise the loggers buffers lines.
-- The logger flushes after 60 seconds has elapsed since the last message.
-- <p>
-- When loggers are created, a table of options may be specified. ... | mit |
MeshGeometry/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/function.lua | 25 | 14265 | -- tolua: function class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: $
-- 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 maintenance, support, updates,
-- enhancement... | mit |
mattyx14/otxserver | data/scripts/spells/monster/terofar_skill_reducer_1.lua | 2 | 1183 | local combat = {}
for i = 1, 10 do
combat[i] = Combat()
combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 15000)
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i)
condition:setParameter(CONDITION_... | gpl-2.0 |
CarabusX/Zero-K | gamedata/modularcomms/weapons/clusterbomb.lua | 6 | 1464 | local name = "commweapon_clusterbomb"
local weaponDef = {
name = [[Cluster Bomb]],
accuracy = 200,
avoidFeature = false,
avoidNeutral = false,
areaOfEffect = 160,
burst = 2,
burstRate = 0.033,
commandFire ... | gpl-2.0 |
ldrumm/libbeemo | tests/testingunit.lua | 1 | 23314 | #!/usr/bin/env lua
TestingUnit = setmetatable({},
{
__call = function(self, ...)
local test_table = {
--[[this table value should be considered immutable as it is used
for table discovery]]
is_testing_unit = true,
fixtures = {},
_assertion_failu... | lgpl-2.1 |
mattyx14/otxserver | data/monster/undeads/gravedigger.lua | 2 | 3837 | local mType = Game.createMonsterType("Gravedigger")
local monster = {}
monster.description = "a gravedigger"
monster.experience = 950
monster.outfit = {
lookType = 558,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 975
monster.Bestiary = {
class = "Un... | gpl-2.0 |
rafael/kong | spec/plugins/rate-limiting/schema_spec.lua | 10 | 1279 | local schemas = require "kong.dao.schemas_validation"
local validate_entity = schemas.validate_entity
local plugin_schema = require "kong.plugins.rate-limiting.schema"
describe("Rate Limiting schema", function()
it("should be invalid when no config is being set", function()
local config = {}
local valid, _... | apache-2.0 |
mattyx14/otxserver | data/monster/magicals/blue_djinn.lua | 2 | 3670 | local mType = Game.createMonsterType("Blue Djinn")
local monster = {}
monster.description = "a blue djinn"
monster.experience = 215
monster.outfit = {
lookType = 80,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}
monster.raceId = 80
monster.Bestiary = {
class = "Magica... | gpl-2.0 |
mojo2012/factorio-mojo-resource-processing | prototypes/recipe/ore-processing/ore-copper.lua | 1 | 2076 | -- reset original iron plate recipe
data.raw["recipe"]["copper-plate"] = nil
data:extend({
{ -- ore materials
type = "recipe",
name = "ore-copper-crushed",
category = "ore-crusher",
subgroup = "copper",
energy_required = 3,
icon = "__mojo-resource-processing__/graphics/icons/ore... | gpl-3.0 |
dinodeck/rpg_conversation_graph | nwn_dialog_advanced/code/combat_events/CESlash.lua | 10 | 3716 | CESlash = {}
CESlash.__index = CESlash
function CESlash:Create(state, owner, def, targets)
local this =
{
mState = state,
mOwner = owner,
mDef = def,
mFinished = false,
mCharacter = state.mActorCharMap[owner],
mTargets = targets,
mIsFinished = false
}... | mit |
williamhogman/dsv-gamejam16 | hump/gamestate.lua | 14 | 3533 | --[[
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 |
rafael/kong | kong/api/routes/apis.lua | 7 | 2490 | local crud = require "kong.api.crud_helpers"
local syslog = require "kong.tools.syslog"
local constants = require "kong.constants"
return {
["/apis/"] = {
GET = function(self, dao_factory)
crud.paginated_set(self, dao_factory.apis)
end,
PUT = function(self, dao_factory)
crud.put(self.params,... | apache-2.0 |
junkblocker/hammerspoon | extensions/redshift/init.lua | 5 | 20133 | --- === hs.redshift ===
---
--- Inverts and/or lowers the color temperature of the screen(s) on a schedule, for a more pleasant experience at night
---
--- Usage:
--- ```
--- -- make a windowfilterDisable for redshift: VLC, Photos and screensaver/login window will disable color adjustment and inversion
--- local wfReds... | mit |
UB12/wnww | plugins/inrealm.lua | 850 | 25085 | -- data saved to moderation.json
-- check moderation plugin
do
local function create_group(msg)
-- superuser and admins only (because sudo are always has privilege)
if is_sudo(msg) or is_realm(msg) and is_admin(msg) then
local group_creator = msg.from.print_name
create_g... | gpl-2.0 |
CarabusX/Zero-K | LuaRules/Gadgets/Include/LuaShader.lua | 10 | 13124 | local UNIFORM_TYPE_MIXED = 0 -- includes arrays; float or int
local UNIFORM_TYPE_INT = 1 -- includes arrays
local UNIFORM_TYPE_FLOAT = 2 -- includes arrays
local UNIFORM_TYPE_FLOAT_MATRIX = 3
local glGetUniformLocation = gl.GetUniformLocation
local glUseShader = gl.UseShader
local glActiveShader... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.