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 |
|---|---|---|---|---|---|
jkeywo/KFactorioMods | k-ruins_0.1.1/prototypes/world-tree.lua | 1 | 6388 | -- add data for entities
local _tree_cluster = table.deepcopy( data.raw["tree"]["tree-01"] )
_tree_cluster.name = "tree-cluster"
data:extend(
{
_tree_cluster,
{
type = "item",
name = "fertiliser",
icon = "__base__/graphics/icons/green-bush-mini.png",
flags = {"goes-to-main-inventory"},
subgroup... | mit |
vvw/waifu2x | lib/minibatch_adam.lua | 35 | 1780 | require 'optim'
require 'cutorch'
require 'xlua'
local function minibatch_adam(model, criterion,
train_x,
config, transformer,
input_size, target_size)
local parameters, gradParameters = model:getParameters()
config = config or {}
local sum_loss = 0
local count_loss = 0
local ... | mit |
jazzyb/lambdatk | sequence.lua | 1 | 4255 | -- Define Sequence class and methods
Sequence = {}
local function _init_seq_methods (seq)
seq.concat = Sequence.concat
seq.copy = Sequence.copy
seq.filter = Sequence.filter
seq.map = Sequence.map
seq.prepend = Sequence.prepend
seq.reduce = Sequence.reduce
seq.reverse = Sequence.reverse
... | mit |
KlonZK/Zero-K | gamedata/modularcomms/weapons/aalaser.lua | 5 | 1227 | local name = "commweapon_aalaser"
local weaponDef = {
name = [[Anti-Air Laser]],
areaOfEffect = 12,
beamDecay = 0.736,
beamTime = 0.01,
beamttl = 15,
canattackground = false,
coreThickness = 0.5,
craterBoost ... | gpl-2.0 |
EntranceJew/Simple-Tiled-Implementation | init.lua | 9 | 1323 | --- Simple and fast Tiled map loader and renderer.
-- @module sti
-- @author Landon Manning
-- @copyright 2015
-- @license MIT/X11
local STI = {
_LICENSE = "MIT/X11",
_URL = "https://github.com/karai17/Simple-Tiled-Implementation",
_VERSION = "0.14.1.12",
_DESCRIPTION = "Simple Tiled Implementation... | mit |
tunneff/tef | deps/lzmq/examples/utils.lua | 16 | 1150 | local zmq = require "lzmq"
io.stdout:setvbuf"no"
function printf(...) return print(string.format(...)) end
function print_msg(title, data, err, ...)
print(title)
if data then -- data
if type(data) == 'table' then
for _, msg in ipairs(data) do
printf("[%.4d] %s", #msg, msg)
en... | lgpl-3.0 |
KlonZK/Zero-K | ModOptions.lua | 1 | 18655 |
-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $
-- Custom Options Definition Table format
-- NOTES:
-- - using an enumerated table lets you specify the options order
--
-- These keywords must be lowercase for LuaParser to read them.
--
-- key: the string used in the script.txt
-- name: ... | gpl-2.0 |
KlonZK/Zero-K | LuaUI/Configs/marking_menu_menu_armcom.lua | 6 | 3784 | local menu_armcom = {
items = {
{
angle = 0,
unit = "cormex",
label = "Economy",
items = {
{
angle = 45,
unit = "cafus"
},
{
angle= 90,
unit = "armfus",
},
{
angle= 135,
unit = "geo",
},
--{
-- angle = -... | gpl-2.0 |
ms2008/lor | lib/lor/lib/middleware/session.lua | 2 | 6231 | local type, xpcall = type, xpcall
local traceback = debug.traceback
local string_sub = string.sub
local string_len = string.len
local http_time = ngx.http_time
local ngx_time = ngx.time
local ck = require("resty.cookie")
local utils = require("lor.lib.utils.utils")
local aes = require("lor.lib.utils.aes")
local base64 ... | mit |
ds4ww/lurs | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
annulen/premake-dev-rgeary | tests/base/test_path.lua | 2 | 6951 | --
-- tests/base/test_path.lua
-- Automated test suite for the action list.
-- Copyright (c) 2008-2010 Jason Perkins and the Premake project
--
T.path = { }
local suite = T.path
--
-- path.getabsolute() tests
--
function suite.getabsolute_ReturnsCorrectPath_OnMissingSubdir()
local expected = path.translate(os.... | bsd-3-clause |
Black-Nine/anti-spbot | libs/redis.lua | 566 | 1214 | local Redis = require 'redis'
local FakeRedis = require 'fakeredis'
local params = {
host = os.getenv('REDIS_HOST') or '127.0.0.1',
port = tonumber(os.getenv('REDIS_PORT') or 6379)
}
local database = os.getenv('REDIS_DB')
local password = os.getenv('REDIS_PASSWORD')
-- Overwrite HGETALL
Redis.commands.hgetall = ... | gpl-2.0 |
turanszkij/WickedEngine | Tests/test_script.lua | 1 | 2228 | -- Wicked Engine Test Framework lua script
backlog_post("Begin script: test_script.lua");
-- Load a model:
local parent = LoadModel("../Content/models/teapot.wiscene");
LoadModel("../Content/models/cameras.wiscene");
-- Load camera sample script:
dofile("../Content/scripts/camera_animation_repeat.lua");
ToggleCamer... | mit |
KlonZK/Zero-K | LuaUI/camain.lua | 7 | 4795 | -- $Id: camain.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: main.lua
-- brief: the entry point from gui.lua, relays call-ins to the widget manager
-... | gpl-2.0 |
KlonZK/Zero-K | features/corpses/chicken_eggs.lua | 17 | 4627 | -- $Id$
local eggDefs = {}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local defaultEgg = {
description = [[Egg]],
blocking = false,
damage = 10000,
reclaimable = true,
energy ... | gpl-2.0 |
findstr/mmorpg-demo | server/scene-src/aoi.lua | 1 | 1778 | local c = require "aoi.c"
local const = require "const"
local M = {}
local AOI
local USER_X = {}
local USER_Z = {}
local USER_FILTER = {}
local npc_watch = {}
local function update_user(id, x, z, enter, leave)
local e, l = c.update(AOI, id, x, z, enter, leave)
for i = 1, e do
local x = enter[i]
if x >= const.UID... | mit |
iamgreaser/seabase | pkg/base/lib/timer.lua | 1 | 1104 | --[[
Copyright (C) 2013 Ben "GreaseMonkey" Russell & contributors
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpo... | gpl-2.0 |
complynx/nodemcu-IoT | lua_modules/base64/base64.lua | 60 | 1224 | -- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <alexthkloss@web.de>
-- licensed under the terms of the LGPL2
local moduleName = ...
local M = {}
_G[moduleName] = M
-- character table string
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-- encoding
function M.enc(data)
return ((data... | mit |
annulen/premake | src/base/_foundation.lua | 1 | 5004 | ---
-- Base definitions required by all the other scripts.
-- @copyright 2002-2013 Jason Perkins and the Premake project
---
premake = {}
premake.modules = {}
premake.tools = {}
premake.extensions = premake.modules
-- Keep track of warnings that have been shown, so they don't get shown twice
local _warnings =... | bsd-3-clause |
ArthurF5/tfs1.0 | data/migrations/14.lua | 55 | 1362 | function onUpdateDatabase()
print("> Updating database to version 15 (moving groups to data/XML/groups.xml)")
db.query("ALTER TABLE players DROP FOREIGN KEY players_ibfk_2")
db.query("DROP INDEX group_id ON players")
db.query("ALTER TABLE accounts DROP FOREIGN KEY accounts_ibfk_1")
db.query("DROP INDEX group_id ... | gpl-2.0 |
m2q1n9/lua | tests/calls.lua | 4 | 9359 | -- $Id: calls.lua,v 1.57 2015/03/04 13:09:38 roberto Exp $
print("testing functions and calls")
local debug = require "debug"
-- get the opportunity to test 'type' too ;)
assert(type(1<2) == 'boolean')
assert(type(true) == 'boolean' and type(false) == 'boolean')
assert(type(nil) == 'nil'
and type(-3) == 'number'... | mit |
aceforeverd/vimrc | lua/aceforeverd/plugins/tree.lua | 1 | 1226 | -- Copyright (C) 2022 Ace <teapot@aceforeverd.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 3 of the License, or
-- (at your option) any later version.
--
-- This pr... | gpl-3.0 |
rockneurotiko/telegram-bot | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
ollpu/telegram-bot | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
KlonZK/Zero-K | units/factoryhover.lua | 4 | 3816 | unitDef = {
unitname = [[factoryhover]],
name = [[Hovercraft Platform]],
description = [[Produces Hovercraft, Builds at 10 m/s]],
acceleration = 0,
brakeRate = 0,
buildCostEnergy = 600,
buildCostMetal = 600,
builder = true,
buildoptions = {
[[co... | gpl-2.0 |
XxMTxX/XxMTxX | plugins/supergroup1.lua | 3 | 76689 | --Begin supergrpup.lua
--Check members #Add supergroup
local function check_member_super(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
if success == 0 then
send_large_msg(receiver, "Promote me to admin first!")
end
for k,v in pair... | gpl-2.0 |
ids1024/naev | dat/missions/common.lua | 13 | 4395 | --[[
Common Lua Mission framework
--]]
-- The common function table.
common = {}
--[[
COMBAT TIER STUFF
--]]
--[[
@brief Calculates the mission combat tier.
Calculations are done with ally and enemy values at the instance where they
are highest. To calculate the enemy/ally ratings you us... | gpl-3.0 |
iamgreaser/seabase | pkg/base/widget/drawobj.lua | 1 | 1453 | --[[
Copyright (C) 2013 Ben "GreaseMonkey" Russell & contributors
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpo... | gpl-2.0 |
KlonZK/Zero-K | effects/missiletrail.lua | 11 | 42654 | -- missiletrailredsmall
-- missiletrailred
-- missiletrailyellow
-- missiletrailgreen
-- torptrailpurple
-- missiletrailblue
-- missiletrailbluebig
-- moderatortrail
-- chainsawtrail
-- cruisetrail
-- tactrail
-- napalmtrail
-- seismictrail
-- bigemptrail
-- emptrail
-- disarmtrail
-- raventrail
-- banishertrail
-- bdt... | gpl-2.0 |
annulen/premake-dev-rgeary | src/base/api.lua | 1 | 48312 |
--
-- api.lua
-- Implementation of the solution, project, and configuration APIs.
-- Copyright (c) 2002-2012 Jason Perkins and the Premake project
--
premake.api = {}
local api = premake.api
local globalContainer = premake5.globalContainer
--
-- Here I define all of the getter/setter functions as metadata. The ... | bsd-3-clause |
jkeywo/KFactorioMods | k-nineworlds_0.0.0/stdlib/data/data.lua | 11 | 2357 | --- Data module
-- @module Data
require 'stdlib/core'
require 'stdlib/string'
require 'stdlib/table'
Data = {}
--- Selects all data 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.
... | mit |
focusworld/biig | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
KlonZK/Zero-K | scripts/amphassault.lua | 3 | 11141 | include "constants.lua"
local base, body, turret, torpedo = piece('base', 'body', 'turret', 'torpedo')
local rbarrel1, rbarrel2, lbarrel1, lbarrel2, rflare, lflare, mflare = piece('rbarrel1', 'rbarrel2', 'lbarrel1', 'lbarrel2', 'rflare', 'lflare', 'mflare')
local rfleg, rffoot, lfleg, lffoot, rbleg, rbfoot, lbleg, lbf... | gpl-2.0 |
rockneurotiko/telegram-bot | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
aqasaeed/megazeus | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
henry4k/LittleTanks | gamera.lua | 1 | 5831 | -- gamera.lua v1.0.1
-- Copyright (c) 2012 Enrique García Cota
-- 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,... | mit |
KlonZK/Zero-K | LuaUI/Widgets/chili/Skins/Robocracy/skin.lua | 15 | 5736 | --//=============================================================================
--// Skin
local skin = {
info = {
name = "Robocracy",
version = "0.3",
author = "jK",
}
}
--//=============================================================================
--//
skin.general = {
focusColor = {1.0,... | gpl-2.0 |
mbattersby/LiteMount | Libs/AceDB-3.0/AceDB-3.0.lua | 18 | 24717 | --- **AceDB-3.0** manages the SavedVariables of your addon.
-- It offers profile management, smart defaults and namespaces for modules.\\
-- Data can be saved in different data-types, depending on its intended usage.
-- The most common data-type is the `profile` type, which allows the user to choose
-- the active profi... | gpl-2.0 |
KlonZK/Zero-K | scripts/corpyro.lua | 4 | 10294 | local base = piece 'base'
local low_head = piece 'low_head'
local up_head = piece 'up_head'
local tank = piece 'tank'
local firept = piece 'firept'
local l_leg = piece 'l_leg'
local l_shin = piece 'l_shin'
local l_foot = piece 'l_foot'
local l_pist1 = piece 'l_pist1'
local l_pist2 = piece 'l_pist2'
local l_je... | gpl-2.0 |
KlonZK/Zero-K | LuaUI/Widgets/unit_auto_group.lua | 4 | 11127 | local versionNum = '3.031'
function widget:GetInfo()
return {
name = "Auto Group",
desc = "v".. (versionNum) .." Alt+0-9 sets autogroup# for selected unit type(s). Newly built units get added to group# equal to their autogroup#. Alt BACKQUOTE (~) remove units. Type '/luaui autogroup help' for help or view setti... | gpl-2.0 |
Kamshak/LibK | lua/libk/3rdparty/glib/net/layer2/outboundsplitpacket.lua | 2 | 1304 | local self = {}
GLib.Net.Layer2.OutboundSplitPacket = GLib.MakeConstructor (self)
function self:ctor (id, data)
self.Id = id
self.Data = data
self.EncodedData = data
self.EncodedLength = #self.EncodedData
self.ChunkSize = 0
self.ChunkCount = 0
self.NextChunk = 1
end
function self:GetId ()
return sel... | mit |
finnoleary/love-edit | main.lua | 1 | 1589 | require 'editor'
function love.load()
love.keyboard.setKeyRepeat(true)
screen_width = love.window.getWidth()
screen_height = love.window.getHeight()
variables()
require 'vi'
require 'norm'
editor:switch_mode(norm)
love.graphics.setBackgroundColor(33, 11, 22)
editor:load_init_file()
end
function variables() ... | lgpl-2.1 |
XxMTxX/XxMTxX | plugins/Reply.lua | 2 | 1671 | -- made by { @Mouamle }
do
ws = {}
rs = {}
-- some examples of how to use this :3
ws[1] = "مرحبا" -- msg
rs[1] = "مراحب" -- reply
ws[2] = "شلونك" -- msg
rs[2] = "تمام وانت" -- reply
ws[3] = "دووم" -- msg
rs[3] = "تسلم" -- reply
ws[4] = "شكو ماكو" -- msg
rs[4] = "ماكو غير الضوجة" -- reply
-- ... | gpl-2.0 |
CSS98/csgroup | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
KlonZK/Zero-K | LuaRules/Configs/MetalSpots/Brazillian_Battlefield_Remake_V2.lua | 17 | 1550 | return {
spots = {
{x = 3265, z = 363, metal = 1.8},
{x = 3140, z = 105, metal = 1.8},
{x = 3744, z = 484, metal = 1.8},
{x = 3607, z = 647, metal = 1.8},
{x = 3153, z = 4019, metal = 1.8},
{x = 3185, z = 3811, metal = 1.8},
{x = 3980, z = 3224, metal = 1.8},
{x = 3733, z = 3033, metal = 1.8},
{x = 770, z = 394... | gpl-2.0 |
morynicz/pyroshark | test/lua/common_sets.lua | 35 | 13691 | -- See Copyright Notice in the file LICENSE
-- This file should contain only test sets that behave identically
-- when being run with pcre or posix regex libraries.
local luatest = require "luatest"
local N = luatest.NT
local function norm(a) return a==nil and N or a end
local function get_gsub (lib)
return lib.g... | gpl-2.0 |
EvolSknaht/cqui | Assets/UI/Screens/techtree.lua | 1 | 72405 | -- ===========================================================================
-- TechTree
-- Tabs set to 4 spaces retaining tab.
--
-- The tech "Index" is the internal ID the gamecore used to track the tech.
-- This value is essentially the database (db) row id minus 1 since it's 0 based.
-- (e.g., TECH_MINING h... | mit |
aedansilver/wowlikearcemuold | src/scripts/lua/Lua/Stable Scripts/Outland/Sethekk Halls/BOSS_SethekkHalls_Syth.lua | 30 | 2322 | function Syth_HealthCheckA(Unit)
if Unit:GetHealthPct() < 75 and Didthat == 0 then
Unit:SpawnCreature(19204, -143.9, 162.9, 0, 0, 18, 36000000);
Unit:SpawnCreature(19204, -136.8, 174.3, 0, 0, 18, 36000000);
Unit:SpawnCreature(19204, -142.6, 183.7, 0, 0, 18, 36000000);
Didthat = 1
else
end
end
function Syth_... | agpl-3.0 |
DipColor/joon12 | plugins/banhammer.lua | 1085 | 11557 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
LoPhatKao/EggstraClucks | monsters/ground/feedstate.lua | 2 | 5188 | -------------------------------------------------
feedState = {}
-------------------------------------------------
function feedState.enter()
if hasTarget() then return nil end
if creature ~= nil and creature.isTamed() and self.feedCooldown ~= nil then
local delta = os.time() - self.feedCooldown
local co... | apache-2.0 |
lawnight/skynet | test/testmysql.lua | 28 | 3810 | local skynet = require "skynet"
local mysql = require "mysql"
local function dump(obj)
local getIndent, quoteStr, wrapKey, wrapVal, dumpObj
getIndent = function(level)
return string.rep("\t", level)
end
quoteStr = function(str)
return '"' .. string.gsub(str, '"', '\\"') .. '"'
end
... | mit |
ld-test/split | test/test-special-cases.lua | 3 | 1518 | #!/usr/bin/env lua
local t = require 'tapered'
package.path = '../src/?.lua;' .. package.path
local split = require 'split'.split
local s, got
-- First special case: split on an empty string returns each character, one
-- at a time.
s = 'foo'
got = split(s, '')
t.is(#got, 3, "split('foo', '') should have three items.... | bsd-3-clause |
KlonZK/Zero-K | LuaRules/Gadgets/unit_stealth.lua | 7 | 6694 | -- $Id: unit_stealth.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- THIS ISN'T THE ORIGINAL! (it contains a bugfix by jK)
--
-- file: unit_stealth.lua
-- bri... | gpl-2.0 |
hacker44-h44/original | plugins/steam.lua | 645 | 2117 | -- See https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI
do
local BASE_URL = 'http://store.steampowered.com/api/appdetails/'
local DESC_LENTH = 200
local function unescape(str)
str = string.gsub( str, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
zzzaidddddd/zzaiddd | plugins/kickal.lua | 1 | 1225 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ (@zzaiddd) : المطور ▀▄ ▄▀
▀▄ ▄▀ (@zzzaiddd) : قناة ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄▀▀▄▄... | gpl-2.0 |
DipColor/joon12 | bot/seedbot.lua | 1 | 10019 | 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")
VERSION = '1.0'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
retu... | gpl-2.0 |
caa-dev-apps/libcef_v2 | LuaJIT-2.0.0-beta8/dist/share/luajit-2.0.0-beta8/jit/v.lua | 2 | 5403 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2011 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
-----------------------------------------------------------------------... | mit |
aedansilver/wowlikearcemuold | src/scripts/lua/LuaBridge/0Misc/0LCF_Includes/LCF_Taxi_Packet_etc.lua | 13 | 1698 | --[[
* ArcEmu MMORPG Server
* Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
* Copyright (C) 2008-2010 <http://www.ArcEmu.org/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Softwa... | agpl-3.0 |
jkeywo/KFactorioMods | k-core_0.1.0/prototypes/targeters.lua | 1 | 1780 | local function create_targeter(data)
local _name = data.name
return {
type = "item",
name = _name,
icon = data.sprite..".png",
flags = {"goes-to-quickbar"},
order = "a[".._name.."]",
place_result = (data.type and data.type == "target" and _name) or nil,
stack_size = 2
}
end
local func... | mit |
jkeywo/KFactorioMods | spaceex_plus_bobs_0.1.0/prototypes/recipe/recipe-updates.lua | 1 | 4692 | local function try_replace( recipe, from, ... )
for i, to in ipairs({...}) do
if data.raw.item[to.name or to] or data.raw.fluid[to.name or to] or data.raw.module[to.name or to] then
bobmods.lib.replace_recipe_item(recipe, from, to)
return true
end
end
return false
end
local function try_add... | mit |
ms2008/lor | spec/cases/path_pattern_2_spec.lua | 2 | 1567 | before_each(function()
lor = _G.lor
app = lor({
debug = false
})
Request = _G.request
Response = _G.response
req = Request:new()
res = Response:new()
count = 0
match = 1
app:get("/all", function(req, res, next)
count = 1
end)
local testRouter = lor:Rout... | mit |
mohammadclashclash/telefree | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
annulen/premake | tests/actions/vstudio/sln2005/test_header.lua | 5 | 1349 | --
-- tests/actions/vstudio/sln2005/test_header.lua
-- Validate generation of Visual Studio 2005+ solution header.
-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_sln2005_header")
local sln2005 = premake.vstudio.sln2005
--
-- Setup
--
local sln, prj
funct... | bsd-3-clause |
KlonZK/Zero-K | effects/theora.lua | 18 | 3147 | -- theora_pillar
-- transtheora_pillar
-- transtheora
-- theora
return {
["theora_pillar"] = {
rocks = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater ... | gpl-2.0 |
aqasaeed/megazeus | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
MOSAVI17/XYZ | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
rastin45/catybot | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
DarkAngel39/Events | WorldPvP/Zone_NA_pvp.lua | 1 | 5849 | local SPLL_TOKEN_ALLIANCE = 33005
local SPLL_TOKEN_HORDE = 33004
local SPLL_CAPTURE_BUFF = 33795
local NA_CREDIT_MARKER = 24867
local NA_GUARDS_MAX = 15
local NA_BUFF_ZONE = 3518
local NA_HALAA_GRAVEYARD_ZONE = 3518
local NA_RESPAWN_TIME = 3600000
local WORLDSTATE_UI_HORDE_GUARDS_SHOW = 2503
local WORLDSTATE_UI_ALLIA... | agpl-3.0 |
alimashmamali/fff | plugins/rae.lua | 15 | 1313 | 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 |
KlonZK/Zero-K | LuaRules/Gadgets/lavarise.lua | 5 | 5752 | if not (gadgetHandler:IsSyncedCode()) then
return
end
function gadget:GetInfo()
return {
name = "lavarise",
desc = "gayly hot",
author = "Adapted from knorke's gadget by jseah",
date = "Feb 2011, 2011; May 2012",
license = "weeeeeee iam on horse",
layer = -3,
enab... | gpl-2.0 |
AdamGagorik/darkstar | scripts/zones/Wajaom_Woodlands/mobs/Hydra.lua | 6 | 1292 | -----------------------------------
-- Area: Wajaom Woodlands
-- MOB: Hydra
-- @pos -282 -24 -1 51
-----------------------------------
require("scripts/globals/titles");
-----------------------------------
-- onMobSpawn Action
-----------------------------------
function onMobSpawn(mob)
end;
function onMobFight(mo... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Abyssea-Konschtat/Zone.lua | 33 | 1801 | -----------------------------------
--
-- Zone: Abyssea - Konschtat
--
-----------------------------------
-- Research
-- EventID 0x0400-0x0405 aura of boundless rage
-- EventID 0x0800-0x0883 The treasure chest will disappear is 180 seconds menu.
-- EventID 0x0884 Teleport?
-- EventID 0x0885 DEBUG Menu
--------------... | gpl-3.0 |
mynameiscraziu/karizma | 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 |
hadirahimi1380/-AhRiMaN- | 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 |
AdamGagorik/darkstar | scripts/zones/Sacrarium/Zone.lua | 19 | 3611 | -----------------------------------
--
-- Zone: Sacrarium (28)
--
-----------------------------------
package.loaded["scripts/zones/Sacrarium/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/settings");
require("scripts/zones/Sacrarium/TextIDs");
-------... | gpl-3.0 |
pczarn/kollos | components/main/kollos/location.lua | 2 | 3912 | --[[
location object prototype for the Kollos project
according to
https://github.com/rns/kollos-luif-doc/blob/master/etc/internals.md
--]]
--[[
The blob name. Required. Archetypally a file name, but not all locations
will be in files. Blob name must be suitable for appearing in messages.
start() and end() --... | mit |
Wiladams/cream | ovs/lib/util.lua | 1 | 16416 | local ffi = require("ffi")
local bit = require("bit")
local band, bor, rshift = bit.band, bit.bor, bit.rshift;
local bitutils = require("bitutils")
--[[
#include <arpa/inet.h>
#include "compiler.h"
#include "openvswitch/types.h"
#include "openvswitch/util.h"
--]]
local Lib_util = ffi.load("openvswitch")
ffi.cdef[[... | mit |
AdamGagorik/darkstar | scripts/zones/Valkurm_Dunes/npcs/Tsunashige_IM.lua | 13 | 3317 | -----------------------------------
-- Area: Valkurm Dunes
-- NPC: Tsunashige, I.M.
-- Outpost Conquest Guards
-- @pos 139.394 -7.885 100.384 103
-----------------------------------
package.loaded["scripts/zones/Valkurm_Dunes/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conquest");
re... | gpl-3.0 |
ModMountain/hash.js | plugins/lua/user_modules/fn/list.lua | 4 | 3123 | f = f or {}
f.mt = f.mt or {}
f.mt.list = f.mt.list or {}
f.list = function (t)
t = t or {}
local list = { array = {} }
setmetatable (list, f.mt.list)
for i = 1, #t do
list [i] = t [i]
end
return list
end
f.map = function (mapF, r, ...) mapF = f.toFunction (mapF) if mapF ... | cc0-1.0 |
AdamGagorik/darkstar | scripts/zones/Wajaom_Woodlands/npcs/Watisa.lua | 32 | 1643 | -----------------------------------
-- Area: Wajaom Woodlands
-- NPC: Watisa
-- Type: Chocobo Renter
-- @pos -201 -11 93 51
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/keyitems");
-----------------------------------
-- onTrade Action
---------------------------... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Nashmau/npcs/Jajaroon.lua | 13 | 1671 | -----------------------------------
-- Area: Nashmau
-- NPC: Jajaroon
-- Standard Merchant NPC
-----------------------------------
package.loaded["scripts/zones/Nashmau/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Nashmau/TextIDs");
require("scripts/globals/shop");
---------------------... | gpl-3.0 |
sjznxd/lc-20130204 | modules/rpc/luasrc/controller/rpc.lua | 70 | 4443 | --[[
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 |
Mr-Pi/nodemcu-extended-httpserver | httpserver/server.lua | 1 | 1342 | -- vim: ts=4 sw=4
--
-- httpserver main module
require "console"
require "config"
Handler = require "httpserver/handler"
local cb={}
local server
function cb.start()
console.log("starting httpserver")
server=net.createServer(net.TCP, 30)
server:listen(config.get("http.port"), function(socket)
local handler=Hand... | mit |
kanaka/raft.js | research_class/pgfplots/tex/generic/pgfplots/lua/pgfplots/binary.lua | 4 | 1660 |
-- Attention: functions in this file are part of the backend driver.
-- They are supposed to work back with Lua 5.1 .
-- Note that most of the 'lua backend' requires Lua 5.2 (currently)
pgfplotsGetLuaBinaryStringFromCharIndicesChunkSize = 7000;
if unpack == nil then
-- LUA 0.76 renamed unpack to table.unpack
pgfpl... | mpl-2.0 |
AdamGagorik/darkstar | scripts/zones/Lower_Jeuno/npcs/_l07.lua | 13 | 1554 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Streetlamp
-- Involved in Quests: Community Service
-- @zone 245
-- @pos -45.148 0 -47.279
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settin... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Nashmau/npcs/Awaheen.lua | 13 | 1903 | -----------------------------------
-- Area: Nashmau
-- NPC: Awaheen
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Nashmau/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Nashmau/TextIDs");
-----------------------------------
-- onTrade Action
-----... | gpl-3.0 |
Hostle/luci | modules/luci-mod-admin-mini/luasrc/model/cbi/mini/system.lua | 78 | 2244 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.sys")
require("luci.sys.zoneinfo")
require("luci.tools.webadmin")
require("luci.util")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device li... | apache-2.0 |
TrurlMcByte/docker-prosody | etc/prosody-modules/mod_muc_access_control/mod_muc_access_control.lua | 1 | 1783 | local st = require "util.stanza";
local jid = require "util.jid";
local nodeprep = require "util.encodings".stringprep.nodeprep;
local unprepped_access_lists = module:get_option("muc_access_lists", {});
local access_lists = {};
-- Make sure all input is prepped
for unprepped_room_name, unprepped_list in pairs(unprepp... | mit |
DigitalPulseSoftware/NazaraEngine | xmake.lua | 1 | 8843 | local modules = {
Audio = {
Deps = {"NazaraCore"},
Packages = {"dr_wav", "libflac", "libvorbis", "minimp3"},
Custom = function ()
add_packages("openal-soft", {links = {}}) -- Don't link OpenAL (it will be loaded dynamically)
end
},
Core = {
Custom = function ()
add_headerfiles("include/(Nazara/*.hpp)... | mit |
Snazz2001/fbcunn | test/test_OneBitDataParallel.lua | 9 | 3011 | require('fb.luaunit')
require('fbtorch')
require('fbcunn')
require('fbnn')
local TU = require('test.test_Util')
local fboptim = require('fboptim')
local function dp()
return nn.OneBitDataParallel(
1,
{momentum_rate=1.0, adagrad_learning_rate=1.0, min_elements=20}
)
end
function testDataParall... | bsd-3-clause |
neechbear/colloquy | src/lists.lua | 1 | 42679 | -- lists
-- table layout:
--
-- lists[listname] = {
-- listname = "capitalised list name",
-- description = "description of the list",
-- owner = "who owns this list, and is always a list master",
-- created = "when this list was created",
-- flags = "flags - O = open, L = locked, P = permanent, A = anonymou... | mit |
AdamGagorik/darkstar | scripts/zones/Tavnazian_Safehold/npcs/Nivorajean.lua | 13 | 1063 | -----------------------------------
-- Area: Tavnazian Safehold
-- NPC: Nivorajean
-- Type: Standard NPC
-- @zone: 26
-- @pos 15.890 -22.999 13.322
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Tavnazian_Safehold/TextIDs"] = nil;
-... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/PsoXja/npcs/_09c.lua | 13 | 2831 | -----------------------------------
-- Area: Pso'Xja
-- NPC: _09c (Stone Gate)
-- Notes: Spawns Gargoyle when triggered
-- @pos 290.000 -1.925 -18.400 9
-----------------------------------
package.loaded["scripts/zones/PsoXja/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/PsoXja/TextIDs... | gpl-3.0 |
aquileia/wesnoth | data/lua/on_event.lua | 4 | 1309 | local utils = wesnoth.require "lua/wml-utils.lua"
-- registers an event handler. note that, like all lua variables this is not persitent in savefiles,
-- so you have to call this function from a toplevel lua tag or from a preload event.
-- It is also not possible to use this for first_time_only=yes events.
local event... | gpl-2.0 |
AdamGagorik/darkstar | scripts/zones/Sealions_Den/mobs/Tenzen.lua | 6 | 1169 | -----------------------------------
-- Area: Sealion den
-- NPC: Tenzen
-----------------------------------
-----------------------------------
-- onMobSpawn
-----------------------------------
function onMobSpawn(mob)
end;
-----------------------------------
-- onMobEngaged
-----------------------------------
fun... | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/items/plate_of_sole_sushi.lua | 16 | 1699 | -----------------------------------------
-- ID: 5149
-- Item: plate_of_sole_sushi
-- Food Effect: 30Min, All Races
-----------------------------------------
-- HP 20
-- Strength 5
-- Dexterity 6
-- Accuracy % 15
-- Ranged ACC % 15
-- Sleep Resist 5
-----------------------------------------
require("scripts/globals/st... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Valkurm_Dunes/npcs/Stone_Monument.lua | 13 | 1273 | -----------------------------------
-- Area: Valkurm Dunes
-- NPC: Stone Monument
-- Involved in quest "An Explorer's Footsteps"
-- @pos -311.299 -4.420 -138.878 103
-----------------------------------
package.loaded["scripts/zones/Valkurm_Dunes/TextIDs"] = nil;
-----------------------------------
require("scri... | gpl-3.0 |
AdamGagorik/darkstar | scripts/globals/mobskills/Dragon_Breath.lua | 34 | 1375 | ---------------------------------------------
-- Dragon Breath
--
-- Description: Deals Fire damage to enemies within a fan-shaped area.
-- Type: Breath
-- Utsusemi/Blink absorb: Ignores shadows
-- Range: Unknown cone
-- Notes: Used only by Fafnir, Nidhogg, Cynoprosopi, and Wyrm. Because of the high damage output... | gpl-3.0 |
ObsidianGuardian/xenia | tools/build/scripts/platform_files.lua | 4 | 1511 | include("build_paths.lua")
include("util.lua")
local function match_platform_files(base_path, base_match)
files({
base_path.."/"..base_match..".h",
base_path.."/"..base_match..".c",
base_path.."/"..base_match..".cc",
base_path.."/"..base_match..".cpp",
base_path.."/"..base_match..".inc",
})
r... | bsd-3-clause |
AdamGagorik/darkstar | scripts/globals/items/istiridye.lua | 18 | 1404 | -----------------------------------------
-- ID: 5456
-- Item: Istiridye
-- Food Effect: 5Min, Mithra only
-----------------------------------------
-- Dexterity -5
-- Vitality 4
-- Defense +17.07%
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.