repo_name stringlengths 6 78 | path stringlengths 4 206 | copies stringclasses 281
values | size stringlengths 4 7 | content stringlengths 625 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
imashkan/ABCYAGOP | 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 |
Sasu98/Nerd-Gaming-Public | resources/[web]/webstats/stats.lua | 3 | 1385 | registeredStats = {}
stats = {}
nodepos = 1
maxstatrecords = 60 -- 1 hours worth
lastnode = nil
UPDATE_FREQUENCY = 60 -- seconds
statsByResource = {}
setTimer (
function()
local time = getRealTime()
stats[nodepos] = {}
stats[nodepos].time = time.hour .. ":" .. string.format("%.2d", time.minute)
for k... | mit |
LORgames/premake-core | modules/raw/raw_action.lua | 15 | 1696 | local p = premake
p.raw = { }
local raw = p.raw
local gvisited = { }
function raw.workspace(wks)
if not gvisited[wks.global] then
gvisited[wks.global] = true
raw.printTable({ global = wks.global })
end
end
function raw.printTable(t, i)
i = i or 0
placement = raw._createPlacement(t)
raw._printTableRecursive(t... | bsd-3-clause |
delram/yago | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
mamaddeveloper/DeveloperMMD_bot | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
satanevil/eski-creed | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
Sasu98/Nerd-Gaming-Public | resources/NGJobs/criminal/drug_factory_c.lua | 2 | 6452 | exports.customblips:createCustomBlip(2149.34, -1586.64, 15, 15, "assets/images/icon-beaker.png");
exports.customblips:createCustomBlip(2216.16, 2715.12, 15, 15, "assets/images/icon-beaker.png");
--2149.34, -1586.64, 14.34
------------------
-- LS --
------------------
exports.ngwarpmanager:makeWarp ( {
pos = { 215... | mit |
Anarchid/Zero-K | LuaUI/Widgets/init_startpointEloCom_info.lua | 8 | 5822 | local version= "v0.945"
function widget:GetInfo()
return {
name = "Comm-n-Elo Startpos. Info",
desc = version .. " Show Commander information and Rank icons before game start.",
author = "msafwan",
date = "2013 July 3",
license = "GNU GPL, v2 or later",
layer = 0,
e... | gpl-2.0 |
iamgreaser/iceball | pkg/iceball/sniper_rifle/gun_sniper_rifle.lua | 2 | 1682 | --[[
This file is part of Ice Lua Components.
Ice Lua Components is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-3.0 |
Anarchid/Zero-K | LuaRules/Utilities/GetUnitIsBuilding.lua | 7 | 3290 | -- $Id:$
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
--
-- Author: jK @2010
-- License: GPLv2 and later
--
-------------------------------------------------------------------------------------... | gpl-2.0 |
ZKINGBOTZ/KING | 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 |
focusworld/focusantispam | 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 |
SametSisartenep/dotfiles | .config/vis/vis.lua | 1 | 6161 | ---
-- Vis Lua plugin API standard library
-- @module vis
---
-- @type Vis
vis.lexers = {}
--- Map a new motion.
--
-- Sets up a mapping in normal, visual and operator pending mode.
-- The motion function will receive the @{Window} and an initial position
-- (in bytes from the start of the file) as argument and is e... | isc |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/units/unused/armplat.lua | 1 | 1900 | return {
armplat = {
acceleration = 0,
brakerate = 0,
buildcostenergy = 19426,
buildcostmetal = 2667,
builder = true,
buildpic = "ARMPLAT.DDS",
buildtime = 19248,
canmove = true,
category = "ALL PLANT NOTLAND NOTSUB NOWEAPON NOTSHIP NOTAIR NOTHOVER SURFACE",
corpse = "DEAD",
description = "Builds... | gpl-2.0 |
mohammad25253/newplugins | plugins/Location.lua | 185 | 1565 | -- 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 |
Stepets/utf8.lua | charclass/runtime/base.lua | 1 | 3685 | return function(utf8)
local class = {}
local mt = {__index = class}
local utf8gensub = utf8.gensub
function class.new()
return setmetatable({}, mt)
end
function class:invert()
self.inverted = true
return self
end
function class:with_codes(...)
local codes = {...}
self.codes = self.codes or {}
for _, v... | mit |
LORgames/premake-core | modules/gmake2/gmake2_csharp.lua | 12 | 7771 | --
-- gmake2_csharp.lua
-- Generate a C# project makefile.
-- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project
--
local p = premake
local gmake2 = p.modules.gmake2
gmake2.cs = {}
local cs = gmake2.cs
local project = p.project
local config = p.config
local filec... | bsd-3-clause |
Anarchid/Zero-K | LuaUI/Widgets/dbg_frame_grapher.lua | 6 | 2183 | function widget:GetInfo()
return {
name = "Frame Grapher",
desc = "Draw frame time graph in bottom right",
author = "Beherith",
date = "2020",
layer = -10000000000000000000,
enabled = false, -- loaded by default
}
end
------------------------------------------------... | gpl-2.0 |
bugobliterator/ardupilot | libraries/AP_Scripting/examples/esc-usage.lua | 13 | 1311 | -- This script displays ESC usage time (supported only by ToshibaCAN ESCs)
local usage_hours_max = 100 -- maximum safe usage for these ESCs in hours
local usage_sec_max = usage_hours_max*60*60
function update() -- this is the loop which periodically runs
if not arming:is_armed() then -- only run check when disarmed... | gpl-3.0 |
sric0880/unity-framework | tools/build_lua/LuaEncoder/luajit/jit/v.lua | 54 | 5783 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | mit |
Anarchid/Zero-K | LuaUI/i18nlib/i18n/init.lua | 8 | 5797 | local i18n = {}
local store
local locale
local defaultLocale = 'en'
local fallbackLocale = defaultLocale
local path = "LuaUI/i18nlib/i18n/"
local plural = VFS.Include(path .. 'plural.lua')
local interpolate = VFS.Include(path .. 'interpolate.lua')
local variants = VFS.Include(path .. 'variants.lua')
local ve... | gpl-2.0 |
dsohler/xtend_modpack | xfurniture/furniture/walls.lua | 1 | 6531 | local _register = _xtend.mods.xfurniture.register
local _p2r = _xtend.mods.xfurniture.pattern_to_recipe
local _combine = function(first, second)
local result = {}
for key,value in pairs(first) do table.insert(result, value) end
for key,value in pairs(second) do table.insert(result, value) end
return r... | gpl-3.0 |
imashkan/ABCYAGOP | plugins/id.lua | 226 | 4260 | 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, result)
local re... | gpl-2.0 |
satanevil/eski-creed | plugins/id.lua | 226 | 4260 | 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, result)
local re... | gpl-2.0 |
Anarchid/Zero-K | LuaRules/Configs/StartBoxes/Adansonia v4.lua | 8 | 4382 | local boxes = {
[0] = {
boxes = {
{
{3669, 5960},
{2238, 5424},
{2257, 5473},
{2259, 5560},
{2261, 5628},
{2254, 5660},
{2182, 5796},
{2157, 5838},
{2124, 5860},
{2056, 5897},
{2006, 5945},
{1973, 5996},
{1938, 6072},
{1917, 6158},
{1916, 6221},
{194... | gpl-2.0 |
LanceJenkinZA/prosody-modules | mod_benchmark_storage/mod_benchmark_storage.lua | 10 | 5752 | -- mod_benchmark_storage
-- Copyright (C) 2015 Kim Alvefur
--
-- Prime numbers are pretty cool
local gettime = require"socket".gettime;
local sm = require"core.storagemanager";
local um = require"core.usermanager";
local mm = require"core.modulemanager";
local test_data, test_users;
function module.command(arg)
lo... | mit |
ivendrov/nn | Threshold.lua | 42 | 1158 | local Threshold, parent = torch.class('nn.Threshold','nn.Module')
function Threshold:__init(th,v,ip)
parent.__init(self)
self.threshold = th or 1e-6
self.val = v or 0
if (th and type(th) ~= 'number') or (v and type(v) ~= 'number') then
error('nn.Threshold(threshold, value)')
end
-- default for ... | bsd-3-clause |
jerizm/kong | kong/plugins/basic-auth/daos.lua | 7 | 1243 | local singletons = require "kong.singletons"
local crypto = require "kong.plugins.basic-auth.crypto"
local function encrypt_password(password, credential)
-- Don't re-encrypt the password digest on update, if the password hasn't changed
-- This causes a bug when a new password is effectively equal the to previous ... | apache-2.0 |
alessandrostone/ctrlr | Source/Resources/Lua/json4lua/json.lua | 3 | 17174 | -----------------------------------------------------------------------------
-- 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).
-- Pleas... | bsd-3-clause |
NickToony/cc-train-network | holder/main.lua | 1 | 2433 | SIDE_RELEASE_TRAIN = "left"
SIDE_TRAIN_PRESENT = "top"
SIDE_AVAILABLE = "right"
TIMER_RELEASE_TRAIN = 5
status = 0
freedAt = 0
--[[ SETUP ]]
function setup()
print("/-------------------/")
print(" Holding Computer v2")
print("---------------------")
print("Detected type: " .. api_os.getType())
pr... | mit |
lxl1140989/dmsdk | feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk-voice.lua | 80 | 1493 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | gpl-2.0 |
mamaddeveloper/DeveloperMMD_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 |
halolpd/vlc | share/lua/playlist/canalplus.lua | 113 | 3501 | --[[
$Id: $
Copyright (c) 2007 the VideoLAN team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distr... | gpl-2.0 |
wesnoth/wesnoth | data/multiplayer/eras.lua | 6 | 4565 | local T = wml.tag
local res = {}
res.quick_4mp_leaders = function(args)
local make_4mp_leaders_quick = wml.variables["make_4mp_leaders_quick"]
if make_4mp_leaders_quick == nil then
make_4mp_leaders_quick = wesnoth.scenario.mp_settings and (wesnoth.scenario.mp_settings.mp_campaign == "")
end
if not make_4mp_lead... | gpl-2.0 |
wesnoth/wesnoth | data/campaigns/World_Conquest/lua/map/distmap.lua | 11 | 2057 |
----------------------------------------------------------
---- A utility class, to calculate distances of each ----
---- tile to one given tile ----
----------------------------------------------------------
local Distmap = {}
function Distmap:create(w, h)
local o = {}
setmetatable(o, ... | gpl-2.0 |
Anarchid/Zero-K | LuaUI/Widgets/unit_blobshadow.lua | 6 | 7211 | -- $Id: unit_blobshadow.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- author: jK
--
-- Copyright (C) 2007,2009.
-- Licensed under the terms of the GNU GPL, v2... | gpl-2.0 |
titan-lang/titan-v0 | titan-compiler/parser.lua | 1 | 20189 | local parser = {}
local re = require "relabel"
local inspect = require "inspect"
local ast = require "titan-compiler.ast"
local lexer = require "titan-compiler.lexer"
local location = require "titan-compiler.location"
local syntax_errors = require "titan-compiler.syntax_errors"
-- File name of the file that is curre... | mit |
amir2727/teletamir | plugins/water.lua | 2 | 1555 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
location = string.gsub(location," ","+")
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
url = url..'&appid=bd82977b86bf27fb59a04b61b6... | gpl-2.0 |
fegimanam/LNT | 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 |
battle-for-wesnoth/svn | data/ai/lua/generic-rush_engine.lua | 1 | 25425 | return {
init = function(ai)
local generic_rush = {}
-- More generic grunt rush (and can, in fact, be used with other unit types as well)
local H = wesnoth.require "lua/helper.lua"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
... | gpl-2.0 |
MrPolicy/HodTG | plugins/SetMySticker.lua | 2 | 1381 | local function tosticker(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = msg.from.id..'.webp'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
send_document(get_receiver(msg), file, ok_cb, false)
send_large_msg(rece... | gpl-2.0 |
chukong/sdkbox-facebook-sample-v2 | samples/Lua/TestLua/Resources/luaScript/DrawPrimitivesTest/DrawPrimitivesTest.lua | 8 | 3911 |
local SceneIdx = -1
local MAX_LAYER = 2
local background = nil
local labelAtlas = nil
local baseLayer_entry = nil
local s = CCDirector:sharedDirector():getWinSize()
local function getBaseLayer()
local layer = CCLayer:create()
local item1 = CCMenuItemImage:create(s_pPathB1, s_pPathB2)
local item2 = CCMen... | mit |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/units/unused/armdf.lua | 1 | 2314 | return {
armdf = {
acceleration = 0,
brakerate = 0,
buildangle = 4096,
buildcostenergy = 100,
buildcostmetal = 342,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 6,
buildinggrounddecalsizey = 6,
buildinggrounddecaltype = "armdf_aoplane.dds",
buildpic = "ARMDF.DDS",
buildtime = 75... | gpl-2.0 |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/units/unused/corwolv.lua | 1 | 2678 | return {
corwolv = {
acceleration = 0.010999999940395,
brakerate = 0.0098999999463558,
buildcostenergy = 2219,
buildcostmetal = 159,
buildpic = "CORWOLV.DDS",
buildtime = 3254,
canmove = true,
category = "ALL TANK WEAPON NOTSUB NOTAIR NOTHOVER SURFACE",
corpse = "DEAD",
description = "Light Mobile ... | gpl-2.0 |
PichotM/DarkRP | gamemode/modules/doorsystem/sv_interface.lua | 7 | 20694 | DarkRP.doorToEntIndex = DarkRP.stub{
name = "doorToEntIndex",
description = "Get an ENT index from a door index.",
parameters = {
{
name = "index",
description = "The door index",
type = "number",
optional = false
}
},
returns = {
... | mit |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/luarules/gadgets/areaattack.lua | 1 | 2478 | function gadget:GetInfo()
return {
name = "Area Attack",
desc = "Give area attack commands to ground units",
author = "KDR_11k (David Becker)",
date = "2008-01-20",
license = "Public domain",
layer = 1,
enabled = true
}
end
local CMD_AREAATTACK = 39954
if (gadgetHandler:IsSyncedCode()) then
--SYNCED
... | gpl-2.0 |
BarnamehNevisan/ss | plugins/italian_lang.lua | 20 | 18700 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
Anarchid/Zero-K | LuaRules/Configs/StartBoxes/Gehenna Rising 3.lua | 8 | 10999 | local areas = {
{ -- NW 8 A
{2357, 228},
{2531, 285},
{2669, 348},
{2752, 450},
{2806, 589},
{2811, 688},
{2814, 700},
{2817, 791},
{2818, 802},
{2799, 874},
{2798, 889},
{2797, 899},
{2739, 972},
{2732, 984},
{2656, 1041},
{2643, 1049},
{2626, 1060},
{2529, 1105},
{2516, 1113},
... | gpl-2.0 |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/units/unused/corhlt.lua | 1 | 3392 | return {
corhlt = {
acceleration = 0,
brakerate = 0,
buildangle = 4096,
buildcostenergy = 4443,
buildcostmetal = 449,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 4,
buildinggrounddecalsizey = 4,
buildinggrounddecaltype = "corhlt_aoplane.dds",
buildpic = "CORHLT.DDS",
buildtime ... | gpl-2.0 |
SametSisartenep/dotfiles | .config/vis/lexers/ini.lua | 5 | 1271 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
-- Ini LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'ini'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments.
local comment = ... | isc |
Anarchid/Zero-K | LuaUI/Widgets/chili/Controls/screen.lua | 6 | 8975 | --- Screen module
--- Screen fields.
-- Inherits from Object.
-- @see object.Object
-- @table Screen
-- @int[opt = 0] x x position
-- @int[opt = 0] y y position
-- @int[opt = 0] width width
-- @int[opt = 0] height height
-- @tparam control.Control activeControl active control
-- @tparam control.Control focusedControl ... | gpl-2.0 |
LORgames/premake-core | modules/gmake/tests/cpp/test_wiidev.lua | 15 | 1183 | --
-- tests/actions/make/cpp/test_wiidev.lua
-- Tests for Wii homebrew support in makefiles.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("make_wiidev")
local make = p.make
local project = p.project
--
-- Setup
--
local cfg
function suite.se... | bsd-3-clause |
Anarchid/Zero-K | scripts/nanoaim.h.lua | 8 | 2918 | -------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
--
-- Author: jK @ 2010
--
-- How to use:
--
-- 1. Add to the start of your script: include "nanoaim.h.lua"
-- 2. After you define your piec... | gpl-2.0 |
Anarchid/Zero-K | LuaRules/Configs/MetalSpots/Barren.lua | 8 | 1499 | local LARGE_SPOT = 2.09
local MEDIUM_SPOT = 1.75
local SMALL_SPOT = 1.40
local TINY_SPOT = 1.04
return {
spots = {
{x = 1304, z = 2680, metal = MEDIUM_SPOT},
{x = 440, z = 248, metal = TINY_SPOT},
{x = 344, z = 888, metal = TINY_SPOT},
{x = 3992, z = 31... | gpl-2.0 |
LORgames/premake-core | tests/base/test_filename.lua | 32 | 1690 | --
-- tests/base/test_filename.lua
-- Verify generation of project/workspace/rule filenames.
-- Copyright (c) 2008-2014 Jason Perkins and the Premake project
--
local suite = test.declare("project_filename")
local p = premake
--
-- Setup
--
local wks
function suite.setup()
wks = test.createWorkspace()
end... | bsd-3-clause |
chukong/sdkbox-facebook-sample-v2 | samples/Lua/TestLua/Resources/luaScript/RotateWorldTest/RotateWorldTest.lua | 8 | 3356 |
local size = CCDirector:sharedDirector():getWinSize()
local function CreateSpriteLayer()
local layer = CCLayer:create()
local x, y
x = size.width
y = size.height
local sprite = CCSprite:create(s_pPathGrossini)
local spriteSister1 = CCSprite:create(s_pPathSister1)
local spriteSister2 = CCSprite... | mit |
Anarchid/Zero-K | LuaRules/Gadgets/unit_enlarger.lua | 6 | 4575 | function gadget:GetInfo()
return {
name = "Unit Enlarger",
desc = "Scales units physically and graphically",
author = "Rafal",
date = "May 2015",
license = "GNU LGPL, v2.1 or later",
layer = 0,
enabled = false
}
end
---------------------------------------------------------------------------... | gpl-2.0 |
Bew78LesellB/awesome | tests/test-awful-widget-calendar_popup.lua | 10 | 2181 | --- Test for awful.widget.calendar
local runner = require("_runner")
local awful = require("awful")
local calendar = require("awful.widget.calendar_popup")
local wa = awful.screen.focused().workarea
local cmonth = calendar.month()
local cyear = calendar.year()
local current_date = os.date("*t")
local day, month, ye... | gpl-2.0 |
mnemnion/grym | src/walk/deck.lua | 1 | 2733 |
local s = require "status" ()
s.verbose = false
s.chatty = true
local c = require "core/color"
local cAlert = c.color.alert
local Dir = require "walk/directory"
local Doc = require "Orbit/doc"
local Node = require "espalier/node"
local Deck = {}
Deck.__index = Deck
local __Decks... | mit |
githubmereza/creed_plug | 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 |
amir2727/teletamir | 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 |
mohammad4569/matrix | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
delram/yago | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
nimaghorbani/dozdi2 | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
samtaylorblack/black | plugins/banhammer.lua | 13 | 36122 | local function pre_process(msg)
if msg.to.type ~= 'pv' then
chat = msg.to.id
user = msg.from.id
local function check_newmember(arg, data)
test = load_data(_config.moderation.data)
lock_bots = test[arg.chat_id]['settings']['lock_bots']
local hash = "gp_lang:"..arg.chat_id
local lang = redis:get(hash)
if data... | gpl-3.0 |
andwj/oblige-weird | scripts/oblige.lua | 1 | 17378 | ------------------------------------------------------------------------
-- OBLIGE : INTERFACE WITH GUI CODE
------------------------------------------------------------------------
--
-- Oblige Level Maker
--
-- Copyright (C) 2006-2014 Andrew Apted
--
-- This program is free software; you can redistribute it and... | gpl-2.0 |
Mutos/SoC-Test-001 | dat/ai/stationary.lua | 5 | 1717 | --[[
AI for stationary turrets.
--]]
include("dat/ai/include/basic.lua")
control_rate = 2
function create ()
ai.pushtask( "stationary" )
end
function control ()
local task = ai.taskname()
local enemy = ai.getenemy()
if task == "stationary" then
if enemy ~= nil then
ai.pushtas... | gpl-3.0 |
helingping/Urho3D | bin/Data/LuaScripts/Utilities/ScriptCompiler.lua | 29 | 1247 | -- Script to recursively compile lua files located in specified rootFolder to luc (bytecode)
-- Usage: require "LuaScripts/Utilities/LuaScriptCompiler"
-- Set root folder containing lua files to convert
local rootFolder = "Data/LuaScripts/" -- Starting from bin folder
if not fileSystem:DirExists(rootFolder) then log:... | mit |
Adirelle/AdiMoreBars | Widget.lua | 1 | 9397 | --[[
AdiMoreBars - Movable health and power bars.
Copyright 2013-2014 Adirelle (adirelle@gmail.com)
All rights reserved.
This file is part of AdiMoreBars.
AdiMoreBars 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 Foundati... | gpl-3.0 |
aJns/tililoggeri | analysis.lua | 1 | 5377 | local analysis = {}
local tablex = require "pl.tablex"
analysis.year = {}
analysis.month = {}
analysis.day = {}
analysis.current_month = {}
function analysis.init(trans_table)
analysis.year.sums = trans_table.yearly_sums()
analysis.month.sums = trans_table.monthly_sums()
analysis.day.sums = trans_table.dail... | gpl-3.0 |
mnemnion/grym | lib/pl/url.lua | 4 | 1028 | --- Python-style URL quoting library.
--
-- @module pl.url
local url = {}
local function quote_char(c)
return string.format("%%%02X", string.byte(c))
end
--- Quote the url, replacing special characters using the '%xx' escape.
-- @string s the string
-- @bool quote_plus Also escape slashes and replace spaces by p... | mit |
AndyBursh/Factorio-Stdlib | stdlib/data/recipe.lua | 5 | 5314 | --- Recipe module
-- @module Recipe
require 'stdlib/data/data'
Recipe = {}
--- Selects all recipe values where the key matches the selector pattern.
-- The selector pattern is divided into groups. The pattern should have a colon character `:` to denote the selection for each group.
-- <br/>The first group is for the... | isc |
jerizm/kong | kong/api/init.lua | 1 | 3792 | local lapis = require "lapis"
local utils = require "kong.tools.utils"
local responses = require "kong.tools.responses"
local singletons = require "kong.singletons"
local app_helpers = require "lapis.application"
local api_helpers = require "kong.api.api_helpers"
local tablex = require "pl.tablex"
local find = string.... | apache-2.0 |
LORgames/premake-core | modules/gmake/tests/cpp/test_flags.lua | 8 | 3076 | --
-- tests/actions/make/cpp/test_flags.lua
-- Tests compiler and linker flags for Makefiles.
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("make_flags")
local make = p.make
local project = p.project
--
-- Setup
--
local wks, prj
function sui... | bsd-3-clause |
Insurgencygame/LivingDead | TheLivingDeadv0.1.sdd/units/unused/armmark.lua | 1 | 2119 | return {
armmark = {
acceleration = 0.045000001788139,
activatewhenbuilt = true,
brakerate = 0.01799999922514,
buildcostenergy = 1152,
buildcostmetal = 95,
buildpic = "armmark.jpg",
buildtime = 3800,
canattack = false,
canmove = true,
category = "KBOT MOBILE ALL NOTSUB NOWEAPON NOTSHIP NOTAIR NOTHO... | gpl-2.0 |
Anarchid/Zero-K | lups/ParticleClasses/UnitJitter.lua | 8 | 8237 | -- $Id: UnitJitter.lua 4454 2009-04-20 11:45:38Z jk $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local UnitJitter = {}
UnitJitter.__in... | gpl-2.0 |
futzle/MiOS-CombinationSwitch | L_CombinationSwitch1Plugin_HVACSetpointHeat.lua | 1 | 4520 | module ("L_CombinationSwitch1Plugin_HVACSetpointHeat", package.seeall)
local MAIN
local TEMPSETPOINT_SERVICE_ID = "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat"
local TEMPSETPOINT_VARIABLE_SETPOINT = "CurrentSetpoint"
local INDEX_TEMPSETPOINT_DEVICE_ID = "DeviceId"
local INDEX_TEMPSETPOINT_VALUE_LOW = "Low"
loca... | gpl-2.0 |
satanevil/eski-creed | 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 |
Anarchid/Zero-K | LuaRules/Utilities/function_override.lua | 5 | 5835 | -----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-- Overrides some inbuilt spring functions
VFS.Include("LuaRules/Utilities/versionCompare.lua", nil, VFS.GAME)
---------------------------------------... | gpl-2.0 |
Sannis/tarantool | test/big/lua/bitset.lua | 9 | 1175 | local SPACE_NO = 0
local INDEX_NO = 1
function create_space()
local space = box.schema.create_space('tweedledum')
space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
space:create_index('bitset', { type = 'bitset', parts = {2, 'num'}, unique = false })
end
function fill(...... | bsd-2-clause |
sric0880/unity-framework | lua/main/3rd/sproto/test.lua | 26 | 1035 | local sproto = require "sproto"
local core = require "sproto.core"
local print_r = require "print_r"
local sp = sproto.parse [[
.Person {
name 0 : string
id 1 : integer
email 2 : string
.PhoneNumber {
number 0 : string
type 1 : integer
}
phone 3 : *PhoneNumber
}
.AddressBook {
person 0 : *Person(id)
oth... | mit |
Bew78LesellB/awesome | tests/examples/text/gears/object/properties.lua | 6 | 1258 | local gears = require("gears") --DOC_HIDE
-- Create a class for this object. It will be used as a backup source for
-- methods and accessors. It is also possible to set them directly on the
-- object.
local class = {}
function class:get_foo()
print("In get foo", self._foo or "bar")
return self._foo or "bar"
e... | gpl-2.0 |
delram/yago | 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 |
mamaddeveloper/DeveloperMMD_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 |
nimaghorbani/dozdi2 | 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 |
lxl1140989/dmsdk | feeds/luci/applications/luci-pbx/luasrc/model/cbi/pbx-google.lua | 146 | 5490 | --[[
Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com>
This file is part of luci-pbx.
luci-pbx is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
... | gpl-2.0 |
Anarchid/Zero-K | LuaRules/Gadgets/unit_thrower.lua | 6 | 18812 |
function gadget:GetInfo()
return {
name = "Teleport Throw",
desc = "Implements teleportation thrower unit",
author = "Google Frog",
date = "12 Janurary 2018",
license = "GNU GPL, v2 or later",
layer = -1,
enabled = true -- loaded by default?
}
end
--------------------------... | gpl-2.0 |
xpol/lua-pomelo | spec/pomelo_spec.lua | 1 | 9278 | require('busted.runner')()
local sleep = require('system').sleep
local pomelo = require('pomelo')
describe('pomelo', function()
describe('.configure()', function()
it('configure library without args', function()
--pomelo.configure()
end)
it('configure library with options', function()
pomelo... | mit |
ivendrov/nn | SpatialBatchNormalization.lua | 12 | 7102 | --[[
This file implements Batch Normalization as described in the paper:
"Batch Normalization: Accelerating Deep Network Training
by Reducing Internal Covariate Shift"
by Sergey Ioffe, Christian Szegedy
This implementation is useful for inputs coming from convolution l... | bsd-3-clause |
helingping/Urho3D | bin/Data/LuaScripts/16_Chat.lua | 18 | 7649 | -- Chat example
-- This sample demonstrates:
-- - Starting up a network server or connecting to it
-- - Implementing simple chat functionality with network messages
require "LuaScripts/Utilities/Sample"
-- Identifier for the chat network messages
local MSG_CHAT = 32
-- UDP port we will use
local CHA... | mit |
battle-for-wesnoth/svn | data/ai/lua/retreat.lua | 1 | 4877 | --[=[
Functions to support the retreat of injured units
]=]
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local retreat_functions = {}
-- Given a set of units, return one from the set that should retreat and the location to retreat to
-- Return nil if no unit ... | gpl-2.0 |
Sasu98/Nerd-Gaming-Public | resources/NGPlayerFunctions/client/waypoint.lua | 2 | 3108 | local isLocating = false
local WAYPOINTLOC = { }
local DistToPoint = 0
local TRACKELEMENT = nil
function createWaypointLoc ( x, y, z )
TRACKELEMENT = nil
local px, py, pz = getElementPosition ( localPlayer )
local dist = getDistanceBetweenPoints2D ( px, py, x, y )
if ( dist <= 20 ) then
exports.NGMessages:sendCl... | mit |
giftman/Gifts | Lua/moveit/io.lua | 1 | 1055 | --io.output("date")
--replace
--[[
newVersion = 235001
io.write("sin (3) = ",math.sin(3),"\n")
print("hello","Lua");print("Hi")
io.write("hello","Lua");io.write("Hi","\n")
io.input("AndroidManifest.xml")
t = io.read("*all")
t = string.gsub(t,"android:versionCode=\".-\"","android:versionCode=\"".. newVersion .."\"")
io... | apache-2.0 |
Mutos/StarsOfCall-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 |
Sasu98/Nerd-Gaming-Public | resources/[no_ng_tag]/parachute/skydiving_cl.lua | 3 | 8125 | local WARNING_HEIGHT = 300 -- height at which the 'open your parachute' message is shown
local slow_speed = 0.75 -- overall (x,y,z) speed limit after which z_accelerate is used
local accelerate_speed = 0.03 -- forward acceleration speed while holding forward (skydiving)
local z_accelerate = 0.007 -- forward accelerati... | mit |
b1v1r/ironbee | lua/ironbee/waggle/signaturedatabase.lua | 2 | 4860 | #!/usr/bin/lua
--[[--------------------------------------------------------------------------
-- Licensed to Qualys, Inc. (QUALYS) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- QUALYS licenses this fi... | apache-2.0 |
wesnoth/wesnoth | data/campaigns/World_Conquest/lua/map/generator/maritime.lua | 7 | 6120 |
local function generate(length, villages, castle, iterations, size, players, island)
local res = wct_generator_settings_arguments( length, villages, castle, iterations, size, players, island)
res.max_lakes=90
res.min_lake_height=250
res.lake_size=60
res.river_frequency=100
res.temperature_size=7
res.roads=25
... | gpl-2.0 |
Bew78LesellB/awesome | tests/examples/wibox/container/arcchart/rounded_edge.lua | 6 | 3003 | --DOC_HIDE_ALL
local parent = ...
local wibox = require( "wibox" )
local beautiful = require( "beautiful" )
parent:add(wibox.widget {
{
{
markup = "<b>rounded_edge</b> = <i>false</i>",
widget = wibox.widget.textbox
},
... | gpl-2.0 |
focusworld/focusantispam | plugins/admin.lua | 53 | 2402 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
Bew78LesellB/awesome | tests/test-awful-client.lua | 2 | 10711 | local awful = require("awful")
local test_client = require("_client")
local has_spawned = false
local steps = {
function(count)
if count <= 1 and not has_spawned and #client.get() < 2 then
awful.spawn("xterm")
awful.spawn("xterm")
has_spawned = true
elseif #clien... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.