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
MeTheFlea/flare
premake5.lua
1
1356
solution( "flare" ) location( "_project/%{_ACTION}" ) configurations{ "Debug", "OptimisedDebug", "Release" } project( "flare" ) kind( "ConsoleApp" ) language( "C++" ) targetdir( "bin/%{cfg.buildcfg}" ) debugdir( "_project/.." ) files{ "src/**.cpp", "src/**.c", "src/**.h", "include/flare/**.h" } vpaths{ ["*...
mit
yangboz/bugfree-bugfixes
CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua
1
3487
-------------------------------- -- @module cc -------------------------------------------------------- -- the cc Scale9Sprite -- @field [parent=#cc] Scale9Sprite#Scale9Sprite Scale9Sprite preloaded module -------------------------------------------------------- -- the cc Control -- @field [parent=#cc] Control#Contr...
mit
Khriskh/ygopro-core-client
premake/freetype/premake4.lua
2
1463
project "freetype" kind "StaticLib" includedirs { "include" } defines { "FT2_BUILD_LIBRARY" } files { "src/autofit/autofit.c", "src/base/ftbase.c", "src/base/ftbbox.c", "src/base/ftbdf.c", "src/base/ftbitmap.c", "src/base/ftcid.c", ...
gpl-2.0
cloudkick/ck-agent
extern/luasocket/samples/cddb.lua
56
1415
local socket = require("socket") local http = require("socket.http") if not arg or not arg[1] or not arg[2] then print("luasocket cddb.lua <category> <disc-id> [<server>]") os.exit(1) end local server = arg[3] or "http://freedb.freedb.org/~cddb/cddb.cgi" function parse(body) local lines = string.gfind(bo...
apache-2.0
Jennal/cocos2dx-3.2-qt
tools/cocos2d-console/plugins/plugin_luacompile/bin/lua/jit/bc.lua
78
5606
---------------------------------------------------------------------------- -- LuaJIT bytecode listing module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -...
mit
yangboz/bugfree-bugfixes
CocosJSGame/frameworks/js-bindings/cocos2d-x/external/lua/luajit/src/src/jit/bc.lua
78
5606
---------------------------------------------------------------------------- -- LuaJIT bytecode listing module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -...
mit
cailyoung/CommandPost
src/extensions/cp/apple/finalcutpro/main/Inspector/ColorInspector/ColorBoard.lua
1
3483
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- F I N A L C U T P R O A P I -- -----------------------------------------------------------------------------...
mit
rlcevg/Zero-K
scripts/corcrw.lua
5
8485
include 'constants.lua' include 'letsNotFailAtTrig.lua' -- by MergeNine -- shortcuts local GetUnitPosition = Spring.GetUnitPosition local SpawnCEG = Spring.SpawnCEG local GetGroundHeight = Spring.GetGroundHeight --pieces local Base = piece "Base" local RearTurretSeat = piece "RearTurretSeat" local RearTurret = piece...
gpl-2.0
drmingdrmer/mysql-proxy-xp
tests/suite/base/t/lm3.lua
4
1033
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/torchx/AliasMultinomial.lua
2
2896
-- ref.: https://hips.seas.harvard.edu/blog/2013/03/03/the-alias-method-efficient-sampling-with-many-discrete-outcomes/ local AM = torch.class("torch.AliasMultinomial") function AM:__init(probs) self.J, self.q = self:setup(probs) end function AM:setup(probs) assert(probs:dim() == 1) local K = probs:nElement...
mit
EmmyLua/IntelliJ-EmmyLua
src/main/resources/std/Lua50/debug.lua
2
7814
-- Copyright (c) 2018. tangzx(love.tangzx@qq.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may not -- use this file except in compliance with the License. You may obtain a copy of -- the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law ...
apache-2.0
Codex-NG/forgottenserver
data/talkactions/scripts/add_skill.lua
35
1716
local function getSkillId(skillName) if skillName == "club" then return SKILL_CLUB elseif skillName == "sword" then return SKILL_SWORD elseif skillName == "axe" then return SKILL_AXE elseif skillName:sub(1, 4) == "dist" then return SKILL_DISTANCE elseif skillName:sub(1, 6) == "shield" then return SKILL_S...
gpl-2.0
mrbangi/xsher
plugins/owners.lua
5
12737
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
Jennal/cocos2dx-3.2-qt
tests/lua-tests/src/VideoPlayerTest/VideoPlayerTest.lua
2
6298
require("experimentalConstants") local visibleRect = cc.Director:getInstance():getOpenGLView():getVisibleRect() local centerPos = cc.p(visibleRect.x + visibleRect.width / 2,visibleRect.y + visibleRect.height /2) local function VideoPlayerTest() local layer = cc.Layer:create() --createTestLayer("VideoPlayerTest...
mit
stas2z/openwrt-witi
package/luci/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd6.lua
68
16296
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require("luci.tools.webadmin") local fs = require "nixio.fs" local util = require "luci.util" local ip = require "luci.ip" local has_ipip = fs.glob("/etc/mo...
gpl-2.0
SneakyB/iceball
pkg/rakiru/flamethrower/gun_flamethrower.lua
4
7945
--[[ This file is derived from a 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 ...
gpl-3.0
Unrepentant-Atheist/mame
3rdparty/genie/tests/test_string.lua
84
1550
-- -- tests/test_string.lua -- Automated test suite for the new string functions. -- Copyright (c) 2008 Jason Perkins and the Premake project -- T.string = { } -- -- string.endswith() tests -- function T.string.endswith_ReturnsTrue_OnMatch() test.istrue(string.endswith("Abcdef", "def")) end function T.strin...
gpl-2.0
ViolyS/RayUI_VS
Interface/AddOns/Skada/lib/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
59
2966
--[[----------------------------------------------------------------------------- InlineGroup Container Simple container widget that creates a visible "box" with an optional title. -------------------------------------------------------------------------------]] local Type, Version = "InlineGroup", 21 local AceGUI = Li...
mit
cxiao/chdkptp-old
lua/lbufutil.lua
6
4963
--[[ Copyright (C) 2010-2011 <reyalp (at) gmail dot com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITH...
gpl-2.0
MOSAVI17/BosstG
bot/seedbot.lua
2
10176
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 = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
gpl-2.0
notcake/glib
lua/glib/lua/reflection/stacktrace.lua
1
3517
local self = {} GLib.Lua.StackTrace = GLib.MakeConstructor (self) function self:ctor (levelCount, frameOffset, stackCaptureOptions) levelCount = levelCount or math.huge frameOffset = frameOffset or 0 frameOffset = 4 + frameOffset stackCaptureOptions = stackCaptureOptions or GLib.Lua.StackCaptureOptions.None...
gpl-3.0
stas2z/openwrt-witi
package/luci/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
68
1180
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.disk", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) return { { title = "%H: Disk I/O operations on %pi", vlab...
gpl-2.0
yangboz/bugfree-bugfixes
CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Twirl.lua
7
1485
-------------------------------- -- @module Twirl -- @extend Grid3DAction -- @parent_module cc -------------------------------- -- @function [parent=#Twirl] setAmplitudeRate -- @param self -- @param #float float -------------------------------- -- @function [parent=#Twirl] getAmplitudeRate -- @param self -...
mit
stas2z/openwrt-witi
feeds/routing/luci-app-cjdns/luasrc/controller/cjdns.lua
10
2652
module("luci.controller.cjdns", package.seeall) cjdns = require "cjdns/init" dkjson = require "dkjson" function index() if not nixio.fs.access("/etc/config/cjdns") then return end entry({"admin", "services", "cjdns"}, cbi("cjdns/overview"), _("cjdns")).dependent = true entry({"admin", "services", "cjdns", ...
gpl-2.0
Jeffyrao/nn
SpatialContrastiveNormalization.lua
63
1444
local SpatialContrastiveNormalization, parent = torch.class('nn.SpatialContrastiveNormalization','nn.Module') function SpatialContrastiveNormalization:__init(nInputPlane, kernel, threshold, thresval) parent.__init(self) -- get args self.nInputPlane = nInputPlane or 1 self.kernel = kernel or torch.Tensor(9...
bsd-3-clause
dromozoa/dromozoa-regexp
dromozoa/regexp/syntax_tree/to_nfa.lua
3
2448
-- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-regexp. -- -- dromozoa-regexp 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, ...
gpl-3.0
EliHar/Pattern_recognition
torch1/extra/penlight/lua/pl/types.lua
5
4838
---- Dealing with Detailed Type Information -- Dependencies `pl.utils` -- @module pl.types local utils = require 'pl.utils' local types = {} --- is the object either a function or a callable object?. -- @param obj Object to check. function types.is_callable (obj) return type(obj) == 'function' or getm...
mit
SneakyB/iceball
pkg/base/citygen/lecomm/gencells.lua
4
5689
--[[ 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
mrjon1/kpbot
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
rlcevg/Zero-K
scripts/hoveraa.lua
1
3491
local base = piece 'base' local body = piece 'body' local turret = piece 'turret' local wake1 = piece 'wake1' local wake2 = piece 'wake2' local wake3 = piece 'wake3' local wake4 = piece 'wake4' local wake5 = piece 'wake5' local wake6 = piece 'wake6' local wake7 = piece 'wake7' local wake8 = piece 'wake8' loc...
gpl-2.0
EmmyLua/IntelliJ-EmmyLua
src/main/resources/std/Lua53/debug.lua
6
9495
-- Copyright (c) 2018. tangzx(love.tangzx@qq.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may not -- use this file except in compliance with the License. You may obtain a copy of -- the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law ...
apache-2.0
medialab-prado/Interactivos-15-Ego
minetest-ego/games/adventuretest/mods/flowers/init.lua
1
6228
-- Minetest 0.4 mod: default -- See README.txt for licensing and other information. -- Map Generation dofile(minetest.get_modpath("flowers").."/mapgen.lua") -- Aliases for original flowers mod minetest.register_alias("flowers:flower_dandelion_white", "flowers:dandelion_white") minetest.register_alias("flowers:flower_...
mit
Jeffyrao/nn
SpatialConvolution.lua
27
4452
local SpatialConvolution, parent = torch.class('nn.SpatialConvolution', 'nn.Module') function SpatialConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.nOutputPlane = nOutputPlane self.kW = kW ...
bsd-3-clause
medialab-prado/Interactivos-15-Ego
minetest-ego/mods/minetest-mod-mesecons-master/mesecons_delayer/init.lua
13
5674
-- Function that get the input/output rules of the delayer local delayer_get_output_rules = function(node) local rules = {{x = 0, y = 0, z = 1}} for i = 0, node.param2 do rules = mesecon.rotate_rules_left(rules) end return rules end local delayer_get_input_rules = function(node) local rules = {{x = 0, y = 0, z ...
mit
rlcevg/Zero-K
LuaRules/Gadgets/unit_script.lua
7
24489
-- Author: Tobi Vollebregt --[[ Please, think twice before editing this file. Compared to most gadgets, there are some complex things going on. A good understanding of Lua's coroutines is required to make nontrivial modifications to this file. In other words, HERE BE DRAGONS =) Known issues: - {Query,AimFrom,Aim,Fi...
gpl-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/PartialLinear.lua
10
3827
local PartialLinear, Module = torch.class('nn.PartialLinear', 'nn.Module') --[[ PartialLinear is a Linear layer that allows the user to a set a collection of column indices. When the column indices are set, the layer will behave like a Linear layer that only has those columns. Meanwhile, all parameters are preserved,...
mit
rlcevg/Zero-K
effects/babette.lua
25
4072
-- babette -- smoke_babette -- burst_babette return { ["babette"] = { boom = { air = true, class = [[CExpGenSpawner]], count = 20, ground = true, water = true, properties = { delay = [[5 i1]...
gpl-2.0
Amadiro/obtuse-tanuki
tools/rotate.lua
2
1532
local cpml = require "cpml" local function move_entity(key, orientation, scale) if key == "kp4" then orientation.x = orientation.x - 1 end if key == "kp6" then orientation.x = orientation.x + 1 end if key == "kp8" then orientation.y = orientation.y - 1 end if key == "kp2" then orientation.y = orientation.y + 1 end...
mit
soumith/cudnn.torch
test/test_rnn.lua
1
20519
--[[ -- Tests the implementation of RNN binding using the cudnn v5 library. Cross-check the checksums with cudnn reference -- sample checksums. -- ]] require 'cudnn' require 'cunn' local ffi = require 'ffi' local errcheck = cudnn.errcheck local cudnntest = torch.TestSuite() local mytester local tolerance = 1000 f...
bsd-2-clause
ViolyS/RayUI_VS
Interface/AddOns/RayUI/modules/raid/tags.lua
2
3898
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("Raid") local RA = _Raid local _, ns = ... local RayUF = ns.oUF RayUF.Tags.Methods["RayUFRaid:name"] = function(u, r) local name = UnitName(u) local ...
mit
AliKhodadad/Telebot
bot/creed.lua
1
15517
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
rlcevg/Zero-K
LuaRules/Gadgets/unit_transport_ai_buttons.lua
10
9075
-- $Id: unit_transport_ai_buttons.lua 3986 2009-02-22 01:56:11Z licho $ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function gadget:GetInfo() return { name = "TransportAIbuttons", desc ...
gpl-2.0
yangboz/bugfree-bugfixes
CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua
7
1294
-------------------------------- -- @module FadeOutTRTiles -- @extend TiledGrid3DAction -- @parent_module cc -------------------------------- -- @function [parent=#FadeOutTRTiles] turnOnTile -- @param self -- @param #vec2_table vec2 -------------------------------- -- @function [parent=#FadeOutTRTiles] turn...
mit
delram/seed7
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
Mhdl80/daredevil_mental99
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
Jennal/cocos2dx-3.2-qt
cocos/scripting/lua-bindings/auto/api/RotateBy.lua
6
1032
-------------------------------- -- @module RotateBy -- @extend ActionInterval -- @parent_module cc -------------------------------- -- @overload self, float, float, float -- @overload self, float, float -- @overload self, float, vec3_table -- @function [parent=#RotateBy] create -- @param s...
mit
ViolyS/RayUI_VS
Interface/AddOns/RayUI/libs/oUF/elements/tags.lua
1
20987
-- Credits: Vika, Cladhaire, Tekkub --[[ # Element: Tags Provides a system for text-based display of information by binding a tag string to a font string widget which in turn is tied to a unit frame. ## Widget A FontString to hold a tag string. Unlike other elements, this widget must not have a preset name. ## Note...
mit
zhulin0001/bian8
user.lua
1
1350
require "base" User = class() function User:ctor(userid) self.userid = userid self.cards = {} self.isActive = false end function User:addCard(card) self.cards[#self.cards+1] = card print('玩家 ' .. self.userid .. ' 获得牌:' .. card:description()) print('玩家 ' .. self.userid .. ' 的手牌是:') self:sh...
apache-2.0
iownall555/MineFix
mods/mfbase/farming/functions.lua
4
20332
local tick_time = 20 -- 20 default local tick_chance = 4 -- 4 default local check_water_nearby = function(pos) local water_found = false local node = minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z}).name if node == "default:water_source" or node == "default:water_flowing" then water_found = true end if...
agpl-3.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nnx/Probe.lua
6
1843
local Probe, parent = torch.class('nn.Probe', 'nn.Module') function Probe:__init(name,display) parent.__init(self) self.name = name or 'unnamed' self.display = display nn._ProbeTimer = nn._ProbeTimer or torch.Timer() end function Probe:updateOutput(input) self.output = input local legend = '<' .. se...
mit
sbreuss/packages
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua
80
4829
-- ------ extra functions ------ -- function ruleCheck() -- determine if rules needs a proper protocol configured uci.cursor():foreach("mwan3", "rule", function (section) local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. section[".name"] .. ".src_port")) local destPort = ut.trim(sys.exec("...
gpl-2.0
aqasaeed/fix
plugins/invite.lua
3
2150
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'L\'utente è bannato.') elseif is_gbanned(result.id) then -- Ig...
gpl-2.0
joaocc/ta3d-git
src/ta3d/mods/ta3d/scripts/corraid.lua
2
6024
-- CORRAID createUnitScript("corraid") __this:piece( "base", "body", "turret", "sleeve", "barrel", "firepoint", "tracks1", "tracks2", "tracks3", "tracks4", "wheels1", "wheels2", "wheels3", "wheels4", "wheels5" ) __this.moving = false __this.once = 0 __this.animCount = 0 -- Signal definitions loca...
gpl-2.0
stas2z/openwrt-witi
package/luci/libs/luci-lib-nixio/docsrc/nixio.File.lua
173
4457
--- Large File Object. -- Large file operations are supported up to 52 bits if the Lua number type is -- double (default). -- @cstyle instance module "nixio.File" --- Write to the file descriptor. -- @class function -- @name File.write -- @usage <strong>Warning:</strong> It is not guaranteed that all data -- in the bu...
gpl-2.0
medialab-prado/Interactivos-15-Ego
minetest-ego/games/adventuretest/mods/handle_schematics/analyze_mts_file.lua
4
8849
--[[ taken from src/mg_schematic.cpp: Minetest Schematic File Format All values are stored in big-endian byte order. [u32] signature: 'MTSM' [u16] version: 3 [u16] size X [u16] size Y [u16] size Z For each Y: [u8] slice probability value ...
mit
antispambot2/telesers-cliBot
plugins/ingroup.lua
371
44212
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
stas2z/openwrt-witi
package/luci/applications/luci-app-pbx/luasrc/model/cbi/pbx.lua
146
4360
--[[ 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
rlcevg/Zero-K
LuaRules/Configs/MetalSpots/Barren.lua
11
1519
return { spots = { {x = 1304, z = 2680, metal = 1.7523200511932}, {x = 440, z = 248, metal = 1.0419199466705}, {x = 344, z = 888, metal = 1.0419199466705}, {x = 3992, z = 3176, metal = 1.7590396404266}, {x = 104, z = 3448, metal = 1.39583...
gpl-2.0
kevinr/cuberite
Server/Plugins/HookNotify/HookNotify.lua
22
2130
-- HookNotify.lua --[[ Implements the entire plugin NOTE: This plugin is not meant for production servers. It is used mainly by developers to verify that things are working properly when implementing Cuberite features. Do not enable this plugin on production servers! This plugin logs a notification for each hook th...
apache-2.0
Amadiro/obtuse-tanuki
server_login.lua
2
1287
require "love.filesystem" require "love.timer" require "thread-print" require "settings" Signal = require "hump.signal" local tiny = require "tiny" local world = tiny.world() local output = love.thread.getChannel("output") local command = love.thread.getChannel("server-command") local function error_print...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/argcheck/usage.lua
4
4734
local env = require 'argcheck.env' local sdascii pcall(function() sdascii = require 'sundown.ascii' end) local usage = {} local function generateargp(rules) local txt = {} for idx, rule in ipairs(rules) do local isopt = rule.opt or rule.default ~= nil or rules.defauta or rule.defaultf ...
mit
jdhk94/darkrpmodification
lua/darkrp_customthings/categories.lua
3
1152
--[[----------------------------------------------------------------------- Categories --------------------------------------------------------------------------- The categories of the default F4 menu. Please read this page for more information: http://wiki.darkrp.com/index.php/DarkRP:Categories In case that page can...
mit
sbreuss/packages
net/smartsnmpd/files/mibs/interfaces.lua
158
4833
-- -- This file is part of SmartSNMP -- Copyright (C) 2014, Credo Semiconductor Inc. -- -- 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 optio...
gpl-2.0
Unrepentant-Atheist/mame
3rdparty/genie/src/actions/vstudio/vs2010_vcxproj.lua
3
37567
-- -- vs2010_vcxproj.lua -- Generate a Visual Studio 2010 C/C++ project. -- Copyright (c) 2009-2011 Jason Perkins and the Premake project -- premake.vstudio.vc2010 = { } local vc2010 = premake.vstudio.vc2010 local vstudio = premake.vstudio local function vs2010_config(prj) _p(1,'<ItemGroup Label="ProjectConfig...
gpl-2.0
Amadiro/obtuse-tanuki
libs/quickie/group.lua
15
4523
--[[ Copyright (c) 2012 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
mit
ArashFaceBook/Super-Infernal
plugins/Boobs.lua
150
1613
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
AliKhodadad/Telebot
plugins/Boobs.lua
150
1613
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
joaocc/ta3d-git
src/ta3d/scripts/game/default.lua
3
2797
#include "signals.lh" killed = {} for i = 0, nb_players() - 1 do killed[ i ] = false end text_print( -320, -240, "Good luck commander!" ) timer = time() cleared = false end_signal = {} signal_sent = {} player_timer = {} for i = 0, 9 do end_signal[i] = 0 signal_sent[i] = false player_timer[i] = time() end for i ...
gpl-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/SpatialDropout.lua
11
1576
local SpatialDropout, Parent = torch.class('nn.SpatialDropout', 'nn.Module') function SpatialDropout:__init(p) Parent.__init(self) self.p = p or 0.5 self.train = true self.noise = torch.Tensor() end function SpatialDropout:updateOutput(input) self.output:resizeAs(input):copy(input) if self.train the...
mit
EliHar/Pattern_recognition
torch1/extra/nn/L1Penalty.lua
16
1128
local L1Penalty, parent = torch.class('nn.L1Penalty','nn.Module') --This module acts as an L1 latent state regularizer, adding the --[gradOutput] to the gradient of the L1 loss. The [input] is copied to --the [output]. function L1Penalty:__init(l1weight, sizeAverage, provideOutput) parent.__init(self) self...
mit
anholt/ValyriaTear
dat/debug/debug_battle.lua
3
1349
function BootBattleTest() print("BootBattleTest"); GlobalManager:AddCharacter(BRONANN); GlobalManager:AddCharacter(KALYA); GlobalManager:AddCharacter(SYLVE); GlobalManager:AddCharacter(THANIS); GlobalManager:AddToInventory(1, 10); GlobalManager:AddToInventory(1003, 10); local bronann ...
gpl-2.0
ZyX-I/luassert
spec/stub_spec.lua
4
7964
local match = require 'luassert.match' describe("Tests dealing with stubs", function() local test = {} before_each(function() test = {key = function() return "derp" end} end) it("checks to see if stub keeps track of arguments", function() stub(test, "key") test.key("derp") assert....
mit
Jennal/cocos2dx-3.2-qt
external/lua/luasocket/http.lua
45
12330
----------------------------------------------------------------------------- -- HTTP/1.1 client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ---------------------------------------------------------------------...
mit
Amadiro/obtuse-tanuki
avatar.lua
2
1324
local basexx = require "basexx" local avatar = {} function avatar.decode(avatar) assert(avatar) local data = avatar:sub(avatar:find(","),-1) local fd = love.filesystem.newFileData(data, "avatar.png", "base64") local im = love.graphics.newImage(love.image.newImageData(fd), {mipmaps=true, srgb=true}) im:setF...
mit
gmorishere/seedhelp
plugins/all.lua
264
4202
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
stas2z/openwrt-witi
package/luci/applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua
28
2106
-- Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com> -- Licensed to the public under the Apache License 2.0. local dsp = require "luci.dispatcher" local nixio = require "nixio" m = Map("ocserv", translate("OpenConnect VPN")) if m.uci:get("ocserv", "config", "auth") == "plain" then --[[Users]]-...
gpl-2.0
ViolyS/RayUI_VS
Interface/AddOns/RayUI/libs/cargBags/mixins-add/layouts.lua
2
2514
--[[ cargBags: An inventory framework addon for World of Warcraft Copyright (C) 2010 Constantin "Cargor" Schomburg <xconstruct@gmail.com> cargBags 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 ver...
mit
Unrepentant-Atheist/mame
3rdparty/genie/tests/actions/codeblocks/codeblocks_files.lua
21
1664
-- -- tests/actions/codeblocks/codeblocks_files.lua -- Validate generation of files block in CodeLite C/C++ projects. -- Copyright (c) 2011 Jason Perkins and the Premake project -- T.codeblocks_files = { } local suite = T.codeblocks_files local codeblocks = premake.codeblocks -- -- Setup -- local sln, prj f...
gpl-2.0
EliHar/Pattern_recognition
torch1/extra/nn/VolumetricMaxPooling.lua
8
2286
local VolumetricMaxPooling, parent = torch.class('nn.VolumetricMaxPooling', 'nn.Module') VolumetricMaxPooling.__version = 2 function VolumetricMaxPooling:__init(kT, kW, kH, dT, dW, dH, padT, padW, padH) parent.__init(self) dT = dT or kT dW = dW or kW dH = dH or kH self.kT = kT self.kH = kH self...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/pl/luabalanced.lua
49
8024
--- Extract delimited Lua sequences from strings. -- Inspired by Damian Conway's Text::Balanced in Perl. <br/> -- <ul> -- <li>[1] <a href="http://lua-users.org/wiki/LuaBalanced">Lua Wiki Page</a></li> -- <li>[2] http://search.cpan.org/dist/Text-Balanced/lib/Text/Balanced.pm</li> -- </ul> <br/> -- <pre class=example...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/JoinTable.lua
10
2072
local JoinTable, parent = torch.class('nn.JoinTable', 'nn.Module') function JoinTable:__init(dimension, nInputDims) parent.__init(self) self.size = torch.LongStorage() self.dimension = dimension self.gradInput = {} self.nInputDims = nInputDims end function JoinTable:_getPositiveDimension(input) loca...
mit
notcake/glib
lua/glib/lua/lua.lua
1
7608
function GLib.Lua.AddressOf (object) local addressString = string.format ("%p", object) if addressString == "NULL" then return 0 end return tonumber (addressString) end function GLib.Lua.CreateShadowGlobalTable () local globalShadowTable = GLib.Lua.CreateShadowTable (_G) globalShadowTable.timer.Adjust = GLib.N...
gpl-3.0
cailyoung/CommandPost
src/plugins/core/menu/top.lua
1
1284
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- T O P -- -----------------------------------------------------------------------------...
mit
stas2z/openwrt-witi
package/luci/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
68
1143
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. m = Map("luci_statistics", translate("TCPConns Plugin Configuration"), translate( "The tcpconns plugin collects informations about open tcp " .. "connections on selected ports." )) -- ...
gpl-2.0
EliHar/Pattern_recognition
torch1/exe/luajit-rocks/luarocks/src/luarocks/fs/lua.lua
7
27577
--- Native Lua implementation of filesystem and platform abstractions, -- using LuaFileSystem, LZLib, MD5 and LuaCurl. -- module("luarocks.fs.lua") local fs_lua = {} local fs = require("luarocks.fs") local cfg = require("luarocks.cfg") local dir = require("luarocks.dir") local util = require("luarocks.util") local p...
mit
notcake/glib
lua/glib/net/layer2/layer2.lua
2
2551
local channels = GLib_Net_Layer2_GetChannels and GLib_Net_Layer2_GetChannels () or {} GLib.Net.Layer2.Channels = channels function GLib_Net_Layer2_GetChannels () return channels end --[[ Events: ChannelRegistered (Channel channel) Fired when a channel has been registered. ChannelUnregistered (Channel channel...
gpl-3.0
ViolyS/RayUI_VS
Interface/AddOns/RayUI/modules/infobar/infobar_honor.lua
1
1661
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("InfoBar") local IF = _InfoBar local function Honor_OnUpdate(self) if UnitLevel("player") < 110 then self:SetText(HONOR_LEVEL_LABEL:gsub("%%d","")....
mit
tinixx/ettercap
src/lua/share/scripts/tcp_session_demo.lua
9
7193
--- -- Copyright (C) Ryan Linn and Mike Ryan -- -- 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. -- --...
gpl-2.0
AlexMili/torch-dataframe
specs/utils/ntwrk_implementation_spec.lua
1
11913
require 'lfs' -- Ensure the test is launched within the specs/ folder assert(string.match(lfs.currentdir(), "specs")~=nil, "You must run this test in specs folder") local initial_dir = lfs.currentdir() -- Go to specs folder while (not string.match(lfs.currentdir(), "/specs$")) do lfs.chdir("..") end local specs_d...
mit
ViolyS/RayUI_VS
Interface/AddOns/RayUI/libs/oUF/events.lua
1
4548
local parent, ns = ... local oUF = ns.oUF local Private = oUF.Private local argcheck = Private.argcheck local error = Private.error local frame_metatable = Private.frame_metatable -- Original event methods local registerEvent = frame_metatable.__index.RegisterEvent local registerUnitEvent = frame_metatable.__index.Re...
mit
AlexMili/torch-dataframe
specs/dataframe/subsets_and_batches_spec.lua
1
14738
require 'lfs' -- Ensure the test is launched within the specs/ folder assert(string.match(lfs.currentdir(), "specs")~=nil, "You must run this test in specs folder") local initial_dir = lfs.currentdir() -- Go to specs folder while (not string.match(lfs.currentdir(), "/specs$")) do lfs.chdir("..") end local specs_d...
mit
Amadiro/obtuse-tanuki
thread-print.lua
2
3007
-- Relay console output to main thread. local output = love.thread.getChannel("output") console = {} -- From: https://raw.githubusercontent.com/alexander-yakushev/awesompd/master/utf8.lua local utf8 = {} function utf8.charbytes(s, i) -- argument defaults i = i or 1 local c = string.byte(s, i) -- determine bytes...
mit
ToxicFrog/lpc
lib/lpix.lua
1
1276
require "util.io" local lpix = {} local errors = { err2 = "Invalid username/password"; err3 = "Not an image"; err4 = "File too large"; } function lpix.upload(user, pass, filename, gallery) gallery = gallery or "Default" assert(user and pass and filename, "lpix.upload: too few arguments") lo...
mit
medialab-prado/Interactivos-15-Ego
minetest-ego/games/adventuretest/mods/lantern/init.lua
1
11515
-- Lantern-Mod by RHR for Minetest 0.49 -- -- register nodes: minetest.register_node("lantern:lantern", { description = "Lantern", drawtype = "nodebox", tiles = {"lantern_tb.png","lantern_tb.png","lantern.png","lantern.png","lantern.png","lantern.png"}, paramtype = "light", sunlight_propagates = true, light_sour...
mit
CECteam/CECteam
plugins/google.lua
722
1037
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
rlcevg/Zero-K
LuaUI/utility_two.lua
17
1410
-- Utility function for ZK -- Will try to read LUA content from target file and create BACKUP if have a successful read (in user's Spring folder) OR DELETE them if have a failure read -- This prevent corrupted file from being used. -- Note: currently only a "table" is considered a valid file function CheckLUAFileAndBa...
gpl-2.0
rlcevg/Zero-K
scripts/destroyer.lua
11
3243
include "constants.lua" local base, turret, sleeves = piece("base", "turret", "sleeves") local wake1, wake2 = piece("wake1", "wake2") local barrel1, barrel2, flare1, flare2 = piece("barrel1", "barrel2", "flare1", "flare2") local gunPieces = { [0] = {barrel = barrel1, flare = flare1}, [1] = {barrel = barrel2, flare ...
gpl-2.0
notcake/glib
lua/glib/properties/properties.lua
2
2973
function GLib.PropertyGetter (self, property) self [property.GetterName] = function (self) return self [property.Name] end end function GLib.PropertySetter (self, property) self [property.SetterName] = function (self, value) self [property.Name] = value return self end end function GLib.PropertySetterWithCa...
gpl-3.0
aqasaeed/fix
plugins/stats.lua
3
3785
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
joaocc/ta3d-git
src/ta3d/mods/ta3d/scripts/corfav.lua
2
5798
-- CORFAV createUnitScript("corfav") __this:piece( "base", "body", "turret", "sleeve", "barrel", "firepoint1", "firepoint2", "firepoint3", "exhaust", "wheel1", "wheel2", "wheel3", "wheel4", "wheel5", "wheel6", "sensor1", "sensor2", "sensor3", "sensor4", "sensor5", "sensor6", "sensor7", "sensor8" ) __th...
gpl-2.0