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 |
|---|---|---|---|---|---|
FlightControl-Master/MOOSE | Moose Development/Moose/Tasking/Task_Cargo_Dispatcher.lua | 1 | 40512 | --- **Tasking** - Creates and manages player TASK_CARGO tasks.
--
-- The **TASK_CARGO_DISPATCHER** allows you to setup various tasks for let human
-- players transport cargo as part of a task.
--
-- The cargo dispatcher will implement for you mechanisms to create cargo transportation tasks:
--
-- * As setup by ... | gpl-3.0 |
tboox/xmake | xmake/languages/golang/api.lua | 1 | 1613 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
facebook/learningSimpleAlgorithms | layers/Loss.lua | 2 | 2300 | --[[
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
]]--
-- Com... | bsd-3-clause |
Oliveryo/Interface | AddOns/Cartographer/Libs/AceOO-2.0/AceOO-2.0.lua | 7 | 30305 | --[[
Name: AceOO-2.0
Revision: $Rev: 11577 $
Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
Inspired By: Ace 1.x by Turan (turan@gryphon.com)
Website: http://www.wowace.com/
Documentation: http://www.wowace.com/index.php/AceOO-2.0
SVN: http://svn.wowace.com/root/trunk/... | gpl-3.0 |
NerdWalletOSS/Q | RUNTIME/DEPRECATED/VIRTUAL_VEC/test_virtual_vec.lua | 1 | 7284 | local Q = require 'Q'
local lVector = require 'Q/RUNTIME/lua/lVector'
local c_to_txt = require 'Q/UTILS/lua/C_to_txt'
local ffi = require 'Q/UTILS/lua/q_ffi'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local tests = {}
--[[
tests.t1 = function()
local col1 = Q.mk_col({1, 2, 3, 4}, "I4")
local nX, X, nn_X = col1:... | mit |
kvalium/loveGame | lib/knife/convoke.lua | 7 | 1318 | return function (routine)
local routines = { routine }
local routineIndex = 1
local isFinished = false
local function execute ()
local continueCount = 0
local run
local function continue ()
continueCount = continueCount + 1
return function (...)
... | gpl-3.0 |
tboox/xmake | xmake/modules/lib/detect/has_cxxincludes.lua | 1 | 1707 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
SystemTera/knxd | src/client/lua/test.lua | 11 | 1589 | require ("EIBConnection")
require ("bit")
-- addr2str: Convert an integer to an EIB address string, in the form "1/2/3" or "1.2.3"
function addr2str(a, ga)
str = ""
if (ga == 0) then
str = string.format("%d.%d.%d", bit.rshift(a, 12), bit.band(bit.rshift(a, 8), 0xf), bit.band(a, 0xff))
else
str = string.format("... | gpl-2.0 |
EnglandTeam/EnglandTeamBot | 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 |
slayerrensky/luci | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua | 24 | 2233 | -- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.nut",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
local voltages = {
title = "%H: Voltages on UPS \"%pi\"",
vlabel = "V",
number_format = "%5.1lfV",
data = {
instances = {
... | apache-2.0 |
titansec/openwaf | lib/resty/logger/file_security.lua | 2 | 13787 | -- Copyright (C) 2013-2014 Jiale Zhi (calio), CloudFlare Inc.
--require "luacov"
local concat = table.concat
local tcp = ngx.socket.tcp
local udp = ngx.socket.udp
local timer_at = ngx.timer.at
local ngx_log = ngx.log
local ngx_sleep ... | apache-2.0 |
titansec/openwaf | lib/resty/logger/file_access.lua | 2 | 13787 | -- Copyright (C) 2013-2014 Jiale Zhi (calio), CloudFlare Inc.
--require "luacov"
local concat = table.concat
local tcp = ngx.socket.tcp
local udp = ngx.socket.udp
local timer_at = ngx.timer.at
local ngx_log = ngx.log
local ngx_sleep ... | apache-2.0 |
celarco/ardupilot | libraries/AP_Scripting/applets/ONVIF_Camera_Control.lua | 20 | 1432 |
local counter = 0
local running = 0
local last_pan_cmd = 0.0
local last_tilt_cmd = 0.0
function update()
if onvif and onvif.start and counter >= 100 and running == 0 then
gcs:send_text(0, "onvif starting")
if onvif:start("user","123456","http://10.211.55.3:10000") then
gcs:send_text(0, "onvif starte... | gpl-3.0 |
satta/annot-nf | bin/snap_gff_to_gff3.lua | 4 | 3373 | #!/usr/bin/env gt
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2014 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all co... | isc |
DSUK/OpenRA | mods/d2k/maps/atreides-01b/atreides01b.lua | 18 | 4872 |
HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] =
{
{ "light_inf", "light_inf" }
}
HarkonnenReinforcements["Normal"] =
{
{ "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" },
}
HarkonnenReinforcements["Hard"] =
{
{ "light_inf", "light_inf" },
{ "trike"... | gpl-3.0 |
RamiLego4Game/PixelizerBox-Sandbox | Helpers/loveframes/objects/grid.lua | 13 | 9798 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- get the current require path
local path = string.sub(..., 1, string.len(...) - string.len(".objects.grid"))
local lovefra... | apache-2.0 |
Oliveryo/Interface | AddOns/BigWigs/Raids/MC/Gehennas.lua | 1 | 5924 | ------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Gehennas"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations(... | gpl-3.0 |
tboox/xmake | xmake/core/base/winos.lua | 1 | 3852 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
tboox/xmake | xmake/core/tool/tool.lua | 1 | 5363 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
eagle14/Snippy-robot | 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 |
Oliveryo/Interface | AddOns/BigWigs/Raids/ZG/Renataki.lua | 1 | 6019 | ------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Renataki"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations(... | gpl-3.0 |
iranianhacker40/ARCHON-TEAM | plugins/welcome.lua | 11 | 5698 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
weirdouncle/QSanguosha-For-Hegemony | extension-doc/14-Responsing.lua | 15 | 22422 | --[[
通过前面三个 lua 文件的介绍,相信大家对 AI 的编写已经有了基本的认识。
这一文档将集中介绍与 smart-ai.lua 中第三部分“响应请求”的相关函数和类表。
从这一文档介绍的内容开始,需要为 AI 编写作决策的代码了。
为了让 AI 作出正确的决策,必须给 AI 以足够的信息,其中一个方法就是通过 data 传递数据。
这在 11-Fundamentals.lua 中已经有所提及,下面深入地介绍一下 data 相关的一些内容。
++ data 是什么?
data 是一个 QVariant 对象,这一特殊的类型使得它可以传递任意类型的信息。
可以是一个整数、一张牌,一个使用牌的结构体(CardUseStru... | gpl-3.0 |
moanoto/tab | libs/XMLElement.lua | 569 | 4025 | -- Copyright 2009 Leo Ponomarev. Distributed under the BSD Licence.
-- updated for module-free world of lua 5.3 on April 2 2015
-- Not documented at all, but not interesting enough to warrant documentation anyway.
local setmetatable, pairs, ipairs, type, getmetatable, tostring, error = setmetatable, pairs, ipairs, typ... | gpl-3.0 |
cc122cc/THETETOO2 | plugins/kickall.lua | 18 | 1243 | do
function is_add(msg)-- Check if user is ADD or not
c = load_data("p.db") --thanks to @lua_lang for learn me this function
local var = false
local add = c
for k,v in pairs(add) do
if msg.from.id == tonumber(v) then
var = true
end
end
return var
end
local function run(msg, matches)
if not c then
c... | gpl-2.0 |
tboox/xmake | xmake/core/language/language.lua | 1 | 18311 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Flexibity/luci | modules/admin-full/luasrc/model/cbi/admin_status/processes.lua | 85 | 1448 | --[[
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 |
coopmaster/GalacticTradeMod-Factorio | GalacticTrade_/prototypes/prototypes/entity/trading-chest.lua | 2 | 4170 | data:extend({
{
type = "container",
name = "trading-chest-buy",
icon = "__GalacticTrade__/graphics/icons/trading-chest-buy.png",
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "trading-chest-buy"},
max_health = 100,
corpse = "small-remn... | mit |
alanjcfs/glc-client | util/underscore.lua | 22 | 9838 | -- Copyright (c) 2009 Marcus Irven
--
-- 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, publ... | apache-2.0 |
daurnimator/lpeg_patterns | lpeg_patterns/http/caching.lua | 1 | 1538 | -- RFC 7234
-- Hypertext Transfer Protocol (HTTP/1.1): Caching
local lpeg = require "lpeg"
local core = require "lpeg_patterns.core"
local http_core = require "lpeg_patterns.http.core"
local http_semantics = require "lpeg_patterns.http.semantics"
local uri = require "lpeg_patterns.uri"
local Cc = lpeg.Cc
local Cg = l... | mit |
coopmaster/GalacticTradeMod-Factorio | GalacticTrade_/data-final-fixes.lua | 2 | 1909 | data.raw["gui-style"].default["blank".."_gt_button_style"] =
{
type = "checkbox_style",
parent = "checkbox_style",
width = 38,
height = 45,
hovered_background =
{
filename = "__core__/graphics/gui.png",
priority = "extra-high-no-scale",
width = 35,
height = 35,
x = 185,
y = 0
},
... | mit |
Oliveryo/Interface | AddOns/aux-addon/aux-addon.lua | 1 | 8300 | module 'aux'
include 'T'
local info = require 'aux.util.info'
local money = require 'aux.util.money'
local cache = require 'aux.core.cache'
local history = require 'aux.core.history'
local stack = require 'aux.core.stack'
local post = require 'aux.core.post'
local scan = require 'aux.core.scan'
_G.aux_characters = T... | gpl-3.0 |
Spring-SpringBoard/SpringBoard-Core | scen_edit/view/object/collision_window.lua | 1 | 14482 | SB.Include(Path.Join(SB.DIRS.SRC, 'view/editor.lua'))
CollisionView = Editor:extends{}
CollisionView:Register({
name = "collisionView",
tab = "Objects",
caption = "Collision",
tooltip = "Edit collision volumes",
image = Path.Join(SB.DIRS.IMG, 'boulder-dash.png'),
no_serialize = true,
})
functi... | mit |
padrinoo1/vagir | 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 |
patrikrm13/patix | 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 |
RamiLego4Game/PixelizerBox-Sandbox | Helpers/Loader/json.lua | 10 | 30341 | -- -*- 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... | apache-2.0 |
cc122cc/THETETOO2 | plugins/lock_bot.lua | 7 | 3026 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY MOHAMMED HISHAM ▀▄ ▄▀
▀▄ ▄▀ BY MOHAMMEDHISHAM (@TH3BOSS) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY MOHAMMED HISHAM ▀▄ ▄▀
▀▄ ▄▀ ANTI BOT : منع بوتات ▀▄ ▄▀
▀▄... | gpl-2.0 |
tboox/xmake | xmake/modules/detect/tools/go/has_flags.lua | 1 | 4187 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
aure/Soundpipe | modules/data/fofilt.lua | 2 | 1491 | sptbl["fofilt"] = {
files = {
module = "fofilt.c",
header = "fofilt.h",
example = "ex_fofilt.c",
},
func = {
create = "sp_fofilt_create",
destroy = "sp_fofilt_destroy",
init = "sp_fofilt_init",
compute = "sp_fofilt_compute",
},
params = {
... | mit |
NerdWalletOSS/Q | OPERATORS/INDEX/lua/expander_index.lua | 1 | 2740 | local ffi = require 'Q/UTILS/lua/q_ffi'
local lVector = require 'Q/RUNTIME/lua/lVector'
local qconsts = require 'Q/UTILS/lua/q_consts'
local qc = require 'Q/UTILS/lua/q_core'
local cmem = require 'libcmem'
local Scalar = require 'libsclr'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local to_scalar = r... | mit |
alfred-bot/phmbot | 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 |
zhityer/zhityer7 | 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 |
kaptanblack15/jackspark | 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 |
githubmereza/alilotfi7777 | 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 |
padrinoo1/vagir | 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 |
gmorishere/gm | 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 |
willmoffat/lua-fmt | test/lua-5.3.4-tests/vararg.lua | 13 | 3160 | -- $Id: vararg.lua,v 1.25 2016/11/07 13:11:28 roberto Exp $
-- See Copyright Notice in file all.lua
print('testing vararg')
function f(a, ...)
local arg = {n = select('#', ...), ...}
for i=1,arg.n do assert(a[i]==arg[i]) end
return arg.n
end
function c12 (...)
assert(arg == _G.arg) -- no local 'arg'
loc... | mit |
fredericjoanis/Argorha-Pathfinding | build/build.lua | 5 | 2255 | -- Notes : For windows, msbuild.exe must be in path (ex: C:\Windows\Microsoft.NET\Framework64\v4.0.30319) and VCTargetsPath to something such as C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0
dofile("args.lua")
if isBuildSystem == true then
print("Cleaning all output directories")
os.rmdir("../tmp")
os... | mit |
NerdWalletOSS/Q | OPERATORS/COUNT/test/test_counts.lua | 1 | 2517 | -- FUNCTIONAL
require 'Q/UTILS/lua/strict'
local Q = require 'Q'
local qconsts = require 'Q/UTILS/lua/q_consts'
local tests = {}
-- testing Q.count() to return correct count of a given value
tests.t1 = function()
local tbl = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}
local qtype = "I1"
local value = 100
local... | mit |
zorbathut/logal | descriptor_oal1.1.lua | 1 | 3799 | data = {
-- In order in the al.h file
--[[Enable = {
params = {enum},
enums = {""},
},
Disable = {
params = {enum},
enums = {""},
},
IsEnabled = {
params = {enum},
enums = {""},
returntype = boolean,
},]] -- no valid possibilities
Get = {
{
func = "alGetFloat",
params = {enum},
enums = {"... | bsd-3-clause |
Oliveryo/Interface | AddOns/BigWigs/Plugins/contribute.lua | 1 | 3699 | --[[
by LYQ(Virose / MOUZU)
https://github.com/MOUZU/BigWigs
Oh, so you did find your way to this creepy place.
In case you're really modifying my version I trust in
your respect that you will not touch this one.
The footage analysis and core changes took a lot of
time I could've spen... | gpl-3.0 |
DSUK/OpenRA | mods/d2k/maps/atreides-01a/atreides01a.lua | 18 | 4859 |
HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] =
{
{ "light_inf", "light_inf" }
}
HarkonnenReinforcements["Normal"] =
{
{ "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" },
}
HarkonnenReinforcements["Hard"] =
{
{ "light_inf", "light_inf" },
{ "trike"... | gpl-3.0 |
slayerrensky/luci | modules/luci-mod-rpc/luasrc/jsonrpc.lua | 75 | 1979 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.jsonrpc", package.seeall)
require "luci.json"
function resolve(mod, method)
local path = luci.util.split(method, ".")
for j=1, #path-1 do
i... | apache-2.0 |
dabbler0/seq2seq-comparison | generate-regression-table-sequential.lua | 1 | 3584 | --[[
Compute all of the linear regressions between the given descriptions and their MSEs.
]]
require 'cutorch'
require 'nn'
require 'cunn'
require 'json'
require 'pca'
-- Normalize a sample to have mean 0
function normalize_mean(X)
local N = X:clone()
local w, h = N:size(1), N:size(2)
-- First, get units nor... | mit |
bcreusot/BankManager | Libs/LibAddonMenu-1.0/LibAddonMenu-1.0.lua | 2 | 20067 | local MAJOR, MINOR = "LibAddonMenu-1.0", 8
local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lam then return end --the same or newer version of this lib is already loaded into memory
--UPVALUES--
lam.lastAddedControl = {}
local lastAddedControl = lam.lastAddedControl
local wm = GetWindowManager()
local st... | mit |
tboox/xmake | tests/apis/add_deps/xmake.lua | 1 | 1384 |
target("dep1")
set_kind("static")
add_files("src/*.c")
add_cflags("-DFLAG1")
add_cflags("-DFLAG2", {interface = true})
add_includedirs("inc1", {public = true})
add_defines("TEST1", {public = true})
target("dep2")
set_kind("shared")
add_deps("dep1")
add_files("src/*.c")
add_in... | apache-2.0 |
jclem/google-diff-match-patch | lua/diff_match_patch_test.lua | 264 | 39109 | --[[
* Test Harness for Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser
* Ported to Lua by Duncan Cross
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except... | apache-2.0 |
laarc/lumen | bin/reader.lua | 2 | 4801 | local delimiters = {[";"] = true, ["\n"] = true, [")"] = true, ["("] = true}
local whitespace = {[" "] = true, ["\t"] = true, ["\n"] = true}
local function stream(str, more)
return({more = more, len = _35(str), pos = 0, string = str})
end
local function peek_char(s)
local _id = s
local len = _id.len
local pos =... | bsd-2-clause |
gilzoide/lualvm | src/lua/init.lua | 1 | 1325 | --[[
-- Copyright 2016-2017 Gil Barbosa Reis <gilzoide@gmail.com>
-- This file is part of Lualvm.
--
-- Lualvm 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
-- (a... | lgpl-3.0 |
Hikari-no-Tenshi/android_external_skia | tools/lua/gradients.lua | 15 | 3058 | filename = ""
function sk_scrape_startcanvas(c, fileName)
filename = fileName
end
function sk_scrape_endcanvas(c, fileName)
end
LuaDoubleNearlyZero = 1.0 / bit32.lshift(1.0, 12)
function LuaDoubleNearlyEqual(a, b)
return math.abs(a-b) <= LuaDoubleNearlyZero
end
function bounds(rect)
local width = rec... | bsd-3-clause |
poelzi/ejdb | luaejdb/tools/ldoc/ldoc/parse.lua | 4 | 12350 | -- parsing code for doc comments
local List = require 'pl.List'
local Map = require 'pl.Map'
local stringio = require 'pl.stringio'
local lexer = require 'ldoc.lexer'
local tools = require 'ldoc.tools'
local doc = require 'ldoc.doc'
local Item,File = doc.Item,doc.File
------ Parsing the Source --------------
-- This ... | lgpl-2.1 |
sijones/domoticz | scripts/lua/script_device_demo.lua | 54 | 1870 | -- demo device 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 i... | gpl-3.0 |
codergreen/ValyriaTear | dat/maps/layna_village/layna_village_south_entrance_right_house_map.lua | 4 | 26503 | map_data = {}
-- The number of rows, and columns that compose the map
map_data.num_tile_cols = 32
map_data.num_tile_rows = 24
-- The tilesets definition files used.
map_data.tileset_filenames = {}
map_data.tileset_filenames[1] = "dat/tilesets/building_interior_objects_01.lua"
map_data.tileset_filenames[2] = "dat/tile... | gpl-2.0 |
mahdibagheri/mmb1 | bot/utils.lua | 494 | 23873 | 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 |
codergreen/ValyriaTear | img/sprites/map/enemies/big_slime_idle.lua | 4 | 1057 | -- Sprite animation file descriptor
-- This file will describe the frames used to load the sprite animations
-- This files is following a special format compared to other animation scripts.
local ANIM_SOUTH = vt_map.MapMode.ANIM_SOUTH;
local ANIM_NORTH = vt_map.MapMode.ANIM_NORTH;
local ANIM_WEST = vt_map.MapMode.ANI... | gpl-2.0 |
tboox/xmake | xmake/actions/run/xmake.lua | 1 | 1987 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
hydrays/osrm-backend | profiles/testbot.lua | 1 | 3526 | -- Testbot profile
-- Moves at fixed, well-known speeds, practical for testing speed and travel times:
-- Primary road: 36km/h = 36000m/3600s = 100m/10s
-- Secondary road: 18km/h = 18000m/3600s = 100m/20s
-- Tertiary road: 12km/h = 12000m/3600s = 100m/30s
speed_profile = {
["primary"] = 36,
["secondary"] = 18... | bsd-2-clause |
g0t-ya/XiaoyuBox | luci/model/cbi/admin_network/proto_ppp.lua | 59 | 3761 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local ma... | lgpl-3.0 |
Spring-SpringBoard/SpringBoard-Core | springboard/assets/core/shaders/fog_of_war/fow.lua | 1 | 1083 | local dir = Path.ExtractDir(__path__)
local shader = Shaders.Compile({
vertex = VFS.LoadFile(Path.Join(dir, "fow.vert"), nil, VFS.MOD),
fragment = VFS.LoadFile(Path.Join(dir, "fow.frag"), nil, VFS.MOD),
uniformInt = {
texSampler = 0,
customSampler = 1,
},
uniform = {
customSa... | mit |
NerdWalletOSS/Q | OPERATORS/GROUPBY/test/test_numby.lua | 1 | 2504 | local Q = require 'Q'
local ffi = require 'Q/UTILS/lua/q_ffi'
local qconsts = require 'Q/UTILS/lua/q_consts'
local plfile = require 'pl.file'
local plpath = require 'pl.path'
local Scalar = require 'libsclr'
require 'Q/UTILS/lua/strict'
local tests = {}
tests.t0 = function()
local nb = 2
local col = Q.mk_col({0, ... | mit |
Flexibity/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-res-feature.lua | 80 | 4201 | --[[
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 |
tboox/xmake | xmake/modules/detect/tools/find_zip.lua | 1 | 1696 | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | apache-2.0 |
Oliveryo/Interface | AddOns/BigWigs/Raids/Other/Ysondre.lua | 1 | 2963 | ------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Ysondre"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations("... | gpl-3.0 |
codergreen/ValyriaTear | dat/credits/old_credits.lua | 5 | 6186 | ------------------------------------------------------------------------------[[
-- Filename: credits.lua
--
-- Description: Contains the credits as they are seen on the screen. This file
-- is updated for every release to reflect any new additions or to
-- re-arrange the ordering.
-------------------------------... | gpl-2.0 |
RamiLego4Game/PixelizerBox-Sandbox | Helpers/loveframes/libraries/debug.lua | 19 | 3540 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- get the current require path
local path = string.sub(..., 1, string.len(...) - string.len(".debug"))
local loveframes = r... | apache-2.0 |
FlightControl-Master/MOOSE | Moose Development/Moose/Cargo/Cargo.lua | 1 | 52403 | --- **Cargo** - Management of CARGO logistics, that can be transported from and to transportation carriers.
--
-- ===
--
-- # 1) MOOSE Cargo System.
--
-- #### Those who have used the mission editor, know that the DCS mission editor provides cargo facilities.
-- However, these are merely static objects. Wouldn't it b... | gpl-3.0 |
slayerrensky/luci | libs/luci-lib-nixio/docsrc/README.lua | 62 | 4758 | --- General Information.
module "nixio.README"
--- General error handling information.
-- <ul>
-- <li> Most of the functions available in this library may fail. If any error
-- occurs the function returns <strong>nil or false</strong>, an error code
-- (usually errno) and an additional error message text (if avaialabl... | apache-2.0 |
coopmaster/GalacticTradeMod-Factorio | GalacticTrade_/prototypes/prototypes/technology/trading-chest.lua | 2 | 2535 | data:extend({
{
type = "technology",
name = "tradingtech",
icon = "__GalacticTrade__/graphics/icons/trading-chest-buy.png",
effects =
{
{
type = "unlock-recipe",
recipe = "trading-chest-buy"
},
{
type = "unlock-recipe",
... | mit |
Flexibity/luci | libs/rpcc/luasrc/rpcc.lua | 93 | 2227 | --[[
LuCIRPCc
(c) 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local util = require "luci.ut... | apache-2.0 |
padrinoo/padrino85 | plugins/isup.lua | 741 | 3095 | do
local socket = require("socket")
local cronned = load_from_file('data/isup.lua')
local function save_cron(msg, url, delete)
local origin = get_receiver(msg)
if not cronned[origin] then
cronned[origin] = {}
end
if not delete then
table.insert(cronned[origin], url)
else
for k,v in pairs(cronned[... | gpl-2.0 |
keyidadi/luci | modules/failsafe/luasrc/controller/failsafe/failsafe.lua | 35 | 5206 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
Copyright 2012 Daniel Golle <dgolle@allnet.de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License... | apache-2.0 |
u20024804/torch7 | test/test_writeObject.lua | 56 | 1897 | local myTester = torch.Tester()
local tests = {}
-- checks that an object can be written and unwritten
-- returns false if an error occurs
local function serializeAndDeserialize(obj)
local file = torch.MemoryFile()
file:binary()
local ok, msg = pcall (file.writeObject, file, obj)
myTester:assert(ok, 'err... | bsd-3-clause |
keyidadi/luci | applications/luci-coovachilli/luasrc/model/cbi/coovachilli_radius.lua | 79 | 1768 | --[[
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 |
codergreen/ValyriaTear | img/sprites/map/npcs/npc_girl01_idle.lua | 4 | 1054 | -- Sprite animation file descriptor
-- This file will describe the frames used to load the sprite animations
-- This files is following a special format compared to other animation scripts.
local ANIM_SOUTH = vt_map.MapMode.ANIM_SOUTH;
local ANIM_NORTH = vt_map.MapMode.ANIM_NORTH;
local ANIM_WEST = vt_map.MapMode.ANI... | gpl-2.0 |
fperrad/lua | demo/triangle.lua | 1 | 1064 |
--[[
triangle.lua - Initialize GLUT and render a simple OpenGL animation
$ ./parrot --no-gc languages/lua/lua.pbc languages/lua/demo/triangle.lua
]]
require 'glut'
require 'gl'
function Draw ()
gl.Clear('COLOR_BUFFER_BIT,DEPTH_BUFFER_BIT')
gl.Begin('TRIANGLES')
gl.Color( {1, 0, 0} )
gl.Vertex(... | artistic-2.0 |
AliKhodadad/Dark-Boys | plugins/torrent_search.lua | 411 | 1622 | --[[ NOT USED DUE TO SSL ERROR
-- See https://getstrike.net/api/
local function strike_search(query)
local strike_base = 'http://getstrike.net/api/v2/torrents/'
local url = strike_base..'search/?phrase='..URL.escape(query)
print(url)
local b,c = http.request(url)
print(b,c)
local search = json:decode(b)
v... | gpl-2.0 |
leecrest/luvit | tests/test-tls-connect-simple-twice.lua | 11 | 1173 | require('tap')(function (test)
local fixture = require('./fixture-tls')
local tls = require('tls')
local options = {
cert = fixture.certPem,
key = fixture.keyPem
}
local serverConnected = 0
local clientConnected = 0
test("tls connect simple twice", function()
local server
server = tls.c... | apache-2.0 |
satta/companion | bin/cufflinks_to_hints.lua | 4 | 3065 | #!/usr/bin/env gt
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2015-2016 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in a... | isc |
tboox/xmake | core/xmake.lua | 1 | 1561 | -- project
set_project("xmake")
-- version
set_version("2.2.5", {build = "%Y%m%d%H%M"})
-- set xmake min version
set_xmakever("2.2.3")
-- set warning all as error
set_warnings("all", "error")
-- set language: c99, c++11
set_languages("c99", "cxx11")
-- disable some compiler errors
add_cxflags("-Wno-error=deprecate... | apache-2.0 |
slayerrensky/luci | libs/luci-lib-nixio/docsrc/nixio.Socket.lua | 157 | 6508 | --- Socket Object.
-- Supports IPv4, IPv6 and UNIX (POSIX only) families.
-- @cstyle instance
module "nixio.Socket"
--- Get the local address of a socket.
-- @class function
-- @name Socket.getsockname
-- @return IP-Address
-- @return Port
--- Get the peer address of a socket.
-- @class function
-- @name Socket.getpe... | apache-2.0 |
nilsbrummond/ESO-MailLooter | core/test/TestData3.lua | 1 | 16018 |
MailLooter = MailLooter or {}
local ADDON = MailLooter
ADDON.Core = ADDON.Core or {}
local CORE = ADDON.Core
ADDON.Core.Test = ADDON.Core.Test or {}
local TEST = ADDON.Core.Test
TEST.tests = TEST.tests or {}
--
-- Test Goal... At least one of each type of mail...
-- Basic coverage of all success cases.
... | mit |
a1lu/awesomeWM | lua/mpv.lua | 1 | 2349 | package.path=package.path..";/home/ailu/.config/mpv/?.lua"
local wibox=require("wibox")
local awful=require("awful")
local naughty=require("naughty")
local socket=require("socket")
socket.unix=require("socket.unix")
local pairs=pairs
local string=string
local io=io
local os=os
local assert=assert
module("mpv")
local p... | mit |
Spring-SpringBoard/SpringBoard-Core | scen_edit/state/rectangle_select_state.lua | 1 | 3028 | RectangleSelectState = AbstractState:extends{}
function RectangleSelectState:init(startScreenX, startScreenZ)
AbstractState.init(self)
local _, coords1 = Spring.TraceScreenRay(startScreenX, startScreenZ, true, false, true)
self.startWorldX, self.startWorldY, self.startWorldZ = unpack(coords1)
self.end... | mit |
XeonSquared/PsychOS | exec/nshd.lua | 1 | 1144 | local tA = {...}
local nport = tA[1] or "23"
function nshdw(h,p,s)
spawn("nshdw["..tostring(s).."]",function() log(xpcall(function()
while true do
local sI = os.getenv("sI")
local ev = {event.pull()}
if ev[1] == "net_msg" and ev[2] == h and ev[3] == p then
event.push("key",sI,string.byte(ev[4]:sub(1,1))... | mpl-2.0 |
lhmwzy/vanilla | resty/lua-resty-http-0.06/lib/resty/http_headers.lua | 12 | 1721 | local rawget, rawset, setmetatable =
rawget, rawset, setmetatable
local str_gsub = string.gsub
local str_lower = string.lower
local _M = {
_VERSION = '0.01',
}
-- Returns an empty headers table with internalised case normalisation.
-- Supports the same cases as in ngx_lua:
--
-- headers.content_len... | mit |
mohammadclashclash/info1 | plugins/close_group.lua | 32 | 1646 | 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, ok_cb, true)
end
local function returnids(cb_extra, success, result)
local receiver = cb_extra.receiver
local chat_id = result.id
local chatname = result.print_name
loc... | gpl-2.0 |
celarco/ardupilot | libraries/AP_Scripting/drivers/EFI_HFE.lua | 6 | 9468 | --[[
EFI Scripting backend driver for HFE based on HFEDCN0191 Rev E
--]]
-- Check Script uses a miniumum firmware version
local SCRIPT_AP_VERSION = 4.3
local SCRIPT_NAME = "EFI: HFE CAN"
local VERSION = FWVersion:major() + (FWVersion:minor() * 0.1)
assert(VERSION >= SCRIPT_AP_VERSION, string.format('%s Requ... | gpl-3.0 |
mentor81/kgbot | plugins/pokedex.lua | 626 | 1668 | do
local images_enabled = true;
local function get_sprite(path)
local url = "http://pokeapi.co/"..path
print(url)
local b,c = http.request(url)
local data = json:decode(b)
local image = data.image
return image
end
local function callback(extra)
send_msg(extra.receiver, extra.text, ok_cb, false)
end
lo... | gpl-2.0 |
zhityer/zhityer7 | plugins/pokedex.lua | 626 | 1668 | do
local images_enabled = true;
local function get_sprite(path)
local url = "http://pokeapi.co/"..path
print(url)
local b,c = http.request(url)
local data = json:decode(b)
local image = data.image
return image
end
local function callback(extra)
send_msg(extra.receiver, extra.text, ok_cb, false)
end
lo... | gpl-2.0 |
LibreLabUCM/telegram-bot | plugins/pokedex.lua | 626 | 1668 | do
local images_enabled = true;
local function get_sprite(path)
local url = "http://pokeapi.co/"..path
print(url)
local b,c = http.request(url)
local data = json:decode(b)
local image = data.image
return image
end
local function callback(extra)
send_msg(extra.receiver, extra.text, ok_cb, false)
end
lo... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.