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
EliHar/Pattern_recognition
torch1/extra/nn/Cosine.lua
19
5784
local Cosine, parent = torch.class('nn.Cosine', 'nn.Module') function Cosine:__init(inputSize,outputSize) parent.__init(self) self.weight = torch.Tensor(outputSize,inputSize) self.gradWeight = torch.Tensor(outputSize,inputSize) self:reset() end function Cosine:reset(stdv) if stdv then stdv =...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/luarocks/doc.lua
14
5076
--- Module implementing the LuaRocks "doc" command. -- Shows documentation for an installed rock. --module("luarocks.doc", package.seeall) local doc = {} package.loaded["luarocks.doc"] = doc local util = require("luarocks.util") local show = require("luarocks.show") local path = require("luarocks.path") local dir = r...
mit
pillowthief/moonridge
lib/jumper/core/assert.lua
1
2547
-- Various assertion function for API methods argument-checking if (...) then -- Dependancies local _PATH = (...):gsub('%.core.assert$','') local Utils = require ('lib/jumper/core/utils') -- Local references local lua_type = type local floor = math.floor local concat = table.concat local next = next local p...
mit
ZyX-I/luassert
src/languages/nl.lua
6
1453
local s = require('say') s:set_namespace('nl') s:set("assertion.same.positive", "Verwachtte objecten die vergelijkbaar zijn.\nAangeboden:\n%s\nVerwachtte:\n%s") s:set("assertion.same.negative", "Verwachtte objecten die niet vergelijkbaar zijn.\nAangeboden:\n%s\nVerwachtte niet:\n%s") s:set("assertion.equals.positive...
mit
cailyoung/CommandPost
src/extensions/cp/apple/finalcutpro/main/Browser.lua
1
7035
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- F I N A L C U T P R O A P I -- -----------------------------------------------------------------------------...
mit
rlcevg/Zero-K
LuaUI/i18nlib/spec/i18n_interpolate_spec.lua
21
2228
require 'spec.fixPackagePath' local interpolate = require 'i18n.interpolate' describe('i18n.interpolate', function() it("exists", function() assert_equal('function', type(interpolate)) end) it("performs standard interpolation via string.format", function() assert_equal("My name is John, I am 13", inter...
gpl-2.0
kindy/ltp
ltp.lua
1
4887
#!/usr/bin/env lua -- -- Copyright 2007-2009 Savarese Software Research Corporation. -- -- 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.savarese.com/software/ApacheLicen...
apache-2.0
EliHar/Pattern_recognition
torch1/pkg/torch/torchcwrap.lua
7
17895
local wrap = require 'cwrap' local types = wrap.types types.Tensor = { helpname = function(arg) if arg.dim then return string.format("Tensor~%dD", arg.dim) else return "Tensor" end end, declare = function(arg...
mit
cloudkick/ck-agent
extern/luasocket/src/socket.lua
146
4061
----------------------------------------------------------------------------- -- LuaSocket helper module -- Author: Diego Nehab -- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $ ----------------------------------------------------------------------------- -----------------------------------------------...
apache-2.0
stas2z/openwrt-witi
package/luci/applications/luci-app-vnstat/luasrc/model/cbi/vnstat.lua
78
1816
-- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local utl = require "luci.util" local sys = require "luci.sys" local fs = require "nixio.fs" local nw = require "luci.model.network" local dbdir, line for line in io.lines("/etc/vnstat.conf") do dbdir ...
gpl-2.0
anholt/ValyriaTear
dat/maps/layna_forest/layna_forest_south_west_map.lua
4
94595
map_data = {} -- The number of rows, and columns that compose the map map_data.num_tile_cols = 64 map_data.num_tile_rows = 48 -- The tilesets definition files used. map_data.tileset_filenames = {} map_data.tileset_filenames[1] = "dat/tilesets/wood_tileset.lua" -- The map grid to indicate walkability. 0 is walkable, ...
gpl-2.0
medialab-prado/Interactivos-15-Ego
minetest-ego/games/adventuretest/mods/bucket/init.lua
4
5189
-- Minetest 0.4 mod: bucket -- See README.txt for licensing and other information. local LIQUID_MAX = 8 --The number of water levels when liquid_finite is enabled minetest.register_alias("bucket", "bucket:bucket_empty") minetest.register_alias("bucket_water", "bucket:bucket_water") minetest.register_alias("bucket_la...
mit
Ashkanovich/jitsu-king
plugins/banhammer.lua
214
11956
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
rlcevg/Zero-K
LuaUI/Widgets/gui_highlight_geos.lua
6
2920
function widget:GetInfo() return { name = 'Highlight Geos', desc = 'Highlights geothermal spots when in metal map view', author = 'Niobium, modified by GoogleFrog', version = '1.0', date = 'Mar, 2011', license = 'GNU GPL, v2 or later', layer = 0, enabled = true, -- loaded...
gpl-2.0
Jennal/cocos2dx-3.2-qt
cocos/scripting/lua-bindings/auto/api/NodeReader.lua
7
1601
-------------------------------- -- @module NodeReader -- @parent_module ccs -------------------------------- -- @function [parent=#NodeReader] setJsonPath -- @param self -- @param #string str -------------------------------- -- @function [parent=#NodeReader] createNode -- @param self -- @param #string str...
mit
EliHar/Pattern_recognition
torch1/extra/nn/THNN.lua
10
3673
local ffi = require 'ffi' local THNN = {} local generic_THNN_h = require 'nn.THNN_h' -- strip all lines starting with # -- to remove preprocessor directives originally present -- in THNN.h generic_THNN_h = generic_THNN_h:gsub("\n#[^\n]*", "") generic_THNN_h = generic_THNN_h:gsub("^#[^\n]*\n", "") -- THGenerator stru...
mit
cailyoung/CommandPost
src/extensions/cp/apple/finalcutpro/ids/v/10.3.2.lua
1
2616
return { LogicPlugins = { PitchShifter = "Pitch Shifter II", }, CommandEditor = { KeyDetailPanel = "_NS:273", SaveButton = "_NS:50", }, ExportDialog = { BackgroundImage = "_NS:17", }, MediaImporter = { MainPanel = "_NS:39", }, ColorBoard = { ColorBoard = "Color Boar...
mit
ViolyS/RayUI_VS
Interface/AddOns/Skada/lib/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
65
4515
--[[----------------------------------------------------------------------------- DropdownGroup Container Container controlled by a dropdown on the top. -------------------------------------------------------------------------------]] local Type, Version = "DropdownGroup", 21 local AceGUI = LibStub and LibStub("AceGUI-...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/MultiMarginCriterion.lua
11
1615
local THNN = require 'nn.THNN' local MultiMarginCriterion, parent = torch.class('nn.MultiMarginCriterion', 'nn.Criterion') function MultiMarginCriterion:__init(p, weights, margin) assert(p == nil or p == 1 or p == 2, 'only p=1 and p=2 supported') self.p = p or 1 self.margin = margin or 1.0 parent.__init(se...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nnx/test-all.lua
3
28626
local nnxtest = {} local precision = 1e-5 local mytester -- you can easily test specific units like this: -- th -lnnx -e "nnx.test{'MultiSoftMax'}" -- th -lnnx -e "nnx.test{'SoftMaxTree', 'Balance'}" function nnxtest.SpatialPadding() local fanin = math.random(1,3) local sizex = math.random(4,16) local size...
mit
notcake/glib
lua/glib/stage1.lua
1
13854
if GLib then return end GLib = {} function GLib.AddCSLuaFile (path) end function GLib.AddCSLuaFolder (folder) end function GLib.AddCSLuaFolderRecursive (folder) end function GLib.AddCSLuaPackFile (path) end function GLib.AddCSLuaPackFolder (folder) end function GLib.AddCSLuaPackFolderRecursive (folder) end fu...
gpl-3.0
mohammmadmtf/teleagent
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
EliHar/Pattern_recognition
torch1/extra/penlight/tests/test-seq.lua
8
1439
local input = require 'pl.input' local seq = require 'pl.seq' local asserteq = require('pl.test').asserteq local utils = require 'pl.utils' local stringio = require 'pl.stringio' local unpack = utils.unpack local L = utils.string_lambda local S = seq.list local C = seq.copy local C2 = seq.copy2 asserteq (seq.sum(inp...
mit
rlcevg/Zero-K
scripts/factoryplane.lua
16
4552
include "constants.lua" local spGetUnitTeam = Spring.GetUnitTeam --pieces local base = piece "base" local bay = piece "bay" local narm1 = piece "narm1" local nano1 = piece "nano1" local emit1 = piece "emit1" local arm1b = piece "arm1b" local arm1 = piece "arm1" local arm1top = piece "arm1top" local arm1bot = piece "...
gpl-2.0
rlcevg/Zero-K
LuaUI/Widgets/map_draw_blocker.lua
17
9188
function widget:GetInfo() return { name = "Map Draw Blocker", desc = "blocks map draws from spamers", author = "SirMaverick", date = "2010", license = "GNU GPL, v2 or later", layer = 0, enabled = false, } end local GetPlayerList = Spring.GetPlayerList local GetPlayerInfo = S...
gpl-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/signal/complex.lua
5
5270
--[[ All functions in here expect either a 2D Nx2 Complex tensor ]]-- local complex = {} function complex.angle(h) return torch.atan2(h[{{},2}],h[{{},1}]) end function complex.exp(h) local out = h:clone() local real = h[{{},1}] local imag = h[{{},2}] out[{{},1}] = torch.exp(real):cmul(torch.cos(ima...
mit
rlcevg/Zero-K
effects/nuke_150.lua
25
15829
-- nuke_150_seacloud -- nuke_150_landcloud_ring -- nuke_150_landcloud -- nuke_150_landcloud_topcap -- nuke_150_landcloud_cap -- nuke_150_seacloud_topcap -- nuke_150_seacloud_ring -- nuke_150 -- nuke_150_seacloud_cap -- nuke_150_seacloud_pillar -- nuke_150_landcloud_pillar return { ["nuke_150_seacloud"] = { usede...
gpl-2.0
omid1212/ccd
plugins/media.lua
376
1679
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
stas2z/openwrt-witi
feeds/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
DrFR0ST/Human-Apocalypse
lib/shine/dmg.lua
8
4822
--[[ The MIT License (MIT) Copyright (c) 2015 Josef Patoprsty 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, me...
mit
Satoshi-t/Re-SBS
lang/zh_CN/Package/NostalgiaPackage.lua
1
17736
-- translation for Nostalgia Package return { ["nostalgia"] = "怀旧卡牌", ["moon_spear"] = "银月枪X", [":moon_spear"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:你的回合外,每当你使用或打出了一张黑色牌时,你可以使用一张【杀】", ["@moon-spear-slash"] = "【银月枪】效果被触发,你可以使用一张【杀】", ["nostal_general"] = "怀旧-测试", ["nostal_standard"] = "怀旧-标准", ["nostal...
gpl-3.0
jaxfrank/UnamedFactorioMod
prototypes/technology.lua
1
5127
data:extend ({ { type = "technology", name = "character-logistic-slots-5", icon = "__base__/graphics/technology/character-logistic-slots.png", effects = { { type = "character-logistic-slots", modifier = 5 } }, prerequisites = {"character-logistic-slots-4"}, ...
mit
Jennal/cocos2dx-3.2-qt
cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua
6
1907
-------------------------------- -- @module TMXObjectGroup -- @extend Ref -- @parent_module cc -------------------------------- -- @function [parent=#TMXObjectGroup] setPositionOffset -- @param self -- @param #vec2_table vec2 -------------------------------- -- @function [parent=#TMXObjectGroup] getProperty...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/luarocks/persist.lua
15
6911
--- Utility module for loading files into tables and -- saving tables into files. -- Implemented separately to avoid interdependencies, -- as it is used in the bootstrapping stage of the cfg module. --module("luarocks.persist", package.seeall) local persist = {} package.loaded["luarocks.persist"] = persist local util...
mit
EliHar/Pattern_recognition
torch1/extra/cudnn/convert.lua
1
1741
-- modules that can be converted to nn seamlessly local layer_list = { 'BatchNormalization', 'SpatialBatchNormalization', 'SpatialConvolution', 'SpatialCrossMapLRN', 'SpatialFullConvolution', 'SpatialMaxPooling', 'SpatialAveragePooling', 'ReLU', 'Tanh', 'Sigmoid', 'SoftMax', 'LogSoftMax', 'Vol...
mit
Jennal/cocos2dx-3.2-qt
tests/lua-tests/src/PerformanceTest/PerformanceSpriteTest.lua
14
16145
local kMaxNodes = 50000 local kBasicZOrder = 10 local kNodesIncrease = 250 local TEST_COUNT = 7 local s = cc.Director:getInstance():getWinSize() ----------------------------------- -- For test functions ----------------------------------- local function performanceActions(sprite) sprite:setPosition(cc.p(math.mod(ma...
mit
avdimdv/proxmark3
client/lualibs/read14a.lua
4
4250
--[[ This is a library to read 14443a tags. It can be used something like this local reader = require('read14a') result, err = reader.read1443a() if not result then print(err) return end print(result.name) --]] -- Loads the commands-library local cmds = require('commands') local TIMEOUT = 2000 -- Shouldn't ...
gpl-2.0
Jennal/cocos2dx-3.2-qt
cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua
7
1400
-------------------------------- -- @module PhysicsJointRotarySpring -- @extend PhysicsJoint -- @parent_module cc -------------------------------- -- @function [parent=#PhysicsJointRotarySpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- -- @f...
mit
yangboz/bugfree-bugfixes
CocosJSGame/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/script/bitExtend.lua
14
1614
-- bit operation bit = bit or {} bit.data32 = {} for i=1,32 do bit.data32[i]=2^(32-i) end function bit._b2d(arg) local nr=0 for i=1,32 do if arg[i] ==1 then nr=nr+bit.data32[i] end end return nr end function bit._d2b(arg) arg = arg >= 0 and arg or (0xFFFFFFFF + a...
mit
rlcevg/Zero-K
LuaRules/Configs/MetalSpots/SpringMountainDelta.lua
17
4246
return { spots = { {x = 7368, z = 5688, metal = 1.8013601303101}, {x = 3000, z = 3240, metal = 1.4149597883224}, {x = 4600, z = 7416, metal = 1.4151902198792}, {x = 4744, z = 2728, metal = 1.4163403511047}, {x = 6312, z = 2536, metal = 1.4163397550583}, {x = 3992, z = 5352, metal = 1.4165700674057}, {x =...
gpl-2.0
Amadiro/obtuse-tanuki
libs/winapi/bitmap.lua
2
6375
--proc/gdi/bitmap: windows bitmap API (submodule required by gdi). --Written by Cosmin Apreutesei. Public Domain. setfenv(1, require'winapi') --constants for the biCompression field BI_RGB = 0 BI_RLE8 = 1 BI_RLE4 = 2 BI_BITFIELDS = 3 BI_JPEG = 4 BI_PNG = 5 DIB_RGB_COLORS = 0 DIB_PAL...
mit
rlcevg/Zero-K
LuaUI/Widgets/chili/Handlers/skinhandler.lua
16
4757
--//============================================================================= --// Theme SkinHandler = {} --//============================================================================= --// load shared skin utils local SkinUtilsEnv = {} setmetatable(SkinUtilsEnv,{__index = getfenv()}) VFS.Include(CHILI_DIRNAM...
gpl-2.0
lynx-seu/skynet
service/multicastd.lua
47
5408
local skynet = require "skynet" local mc = require "multicast.core" local datacenter = require "datacenter" local harbor_id = skynet.harbor(skynet.self()) local command = {} local channel = {} local channel_n = {} local channel_remote = {} local channel_id = harbor_id local NORET = {} local function get_address(t, i...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/SpatialBatchNormalization.lua
20
1353
--[[ This file implements Batch Normalization as described in the paper: "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift" by Sergey Ioffe, Christian Szegedy This implementation is useful for inputs coming from convolution l...
mit
ironbee/ironbee-qa
tests/debuglog.lua
1
3308
-- ========================================================================= -- ========================================================================= -- Licensed to Qualys, Inc. (QUALYS) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional informatio...
apache-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/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
linkdd/cream-browser
example/rc.lua
1
2697
-- Load Cream-Browser's API require ("cream") -- keybindings local state = { all = { cream.state.all }, noedit = { cream.state.normal, cream.state.embed, cream.state.caret } } -- exit Cream-Browser cream.keys.map (state.all, { }, "zz", function (w) cream.util.quit () en...
mit
medialab-prado/Interactivos-15-Ego
minetest-ego/games/adventuretest/mods/handle_schematics/save_restore.lua
3
2617
-- reserve the namespace save_restore = {} -- TODO: if this gets more versatile, add sanity checks for filename -- TODO: apart from allowing filenames, schems/<filename> also needs to be allowed -- TODO: save and restore ought to be library functions and not implemented in each individual mod! save_restore.save_dat...
mit
Ashkanovich/jitsu-king
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
rlcevg/Zero-K
units/cordoom.lua
1
8380
unitDef = { unitname = [[cordoom]], name = [[Doomsday Machine]], description = [[Medium Range Defense Fortress - Requires 50 Power (Main Gun)]], acceleration = 0, activateWhenBuilt = true, armoredMultiple ...
gpl-2.0
ikstream/Minstrel-Blues
measurement/minstrel-measurement/parsers/wpa_supplicant.lua
2
4003
require ('parsers/parsers') local pprint = require ('pprint') WpaSupplicant = { ssid = nil , priority = nil , mode = nil , key_mgmt = nil , psk = nil , auth_alg = nil , proto = nil , group = nil ...
gpl-2.0
MOSAVI17/BosstG
plugins/inpm.lua
1114
3008
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
rlcevg/Zero-K
LuaUI/Configs/decoration_handler_defs.lua
12
8036
-- only level 1 is needed, rest can be autogenerated local commtypeTable = { ["1"] = { -- armcom ["0"] = { -- level back = { { piece = "torso", height = 10, width = 10, rotation = 180, rotVector = {0,1,0}, offset = {0, 0, -13}, alpha = 0.6, }, }, chest = { { ...
gpl-2.0
rlcevg/Zero-K
LuaRules/Configs/MetalSpots/Altair_Crossing_v3.lua
38
1516
return { spots = { {x = 3864, z = 2136, metal = 2.2}, {x = 888, z = 4024, metal = 1}, {x = 3944, z = 184, metal = 1}, {x = 568, z = 1928, metal = 2.2}, {x = 1528, z = 1560, metal = 2.6}, {x = 3640, z = 2056, metal = ...
gpl-2.0
Satoshi-t/Re-SBS
lua/ai/boss-ai.lua
1
3280
sgs.ai_skill_playerchosen.bossdidong = function(self, targets) self:sort(self.enemies) for _, enemy in ipairs(self.enemies) do if enemy:faceUp() then return enemy end end end sgs.ai_skill_playerchosen.bossluolei = function(self, targets) self:sort(self.enemies) for _, enemy in ipairs(self.enemies) do if self:...
gpl-3.0
rlcevg/Zero-K
LuaRules/Configs/MetalSpots/Grts_Messa_008.lua
17
1312
return { spots = { -- Four metal spots in center {x = 6162, z = 6750, metal = 3}, {x = 5546, z = 6128, metal = 3}, {x = 6138, z = 5562, metal = 3}, {x = 6747, z = 6152, metal = 3}, -- 12 starting spots (2x3 on each side) {x = 1093, z = 9286, metal = 3}, {x = 1174, z = 7125, metal = 3}, {x = 1208, z =...
gpl-2.0
jimmyharris/luaposix
examples/signal.lua
8
1447
local sig = require "posix.signal" local unistd = require "posix.unistd" local syswait = require "posix.sys.wait" local function go (fn, ...) local cpid = unistd.fork () if cpid == 0 then -- run function as child unistd._exit (fn (...) or 0) else return cpid end end local verbose = #arg > 0 loca...
mit
notcake/glib
lua/glib/userid.lua
1
1387
local singleplayerId = nil function GLib.GetEveryoneId () return "Everyone" end if SERVER then function GLib.GetLocalId () return "Server" end elseif CLIENT then function GLib.GetLocalId () if not LocalPlayer or not LocalPlayer ().SteamID then return "STEAM_0:0:0" end return LocalPlayer ...
gpl-3.0
stanfordnlp/treelstm
relatedness/TreeLSTMSim.lua
10
7240
--[[ Semantic relatedness prediction using Tree-LSTMs. --]] local TreeLSTMSim = torch.class('treelstm.TreeLSTMSim') function TreeLSTMSim:__init(config) self.mem_dim = config.mem_dim or 150 self.learning_rate = config.learning_rate or 0.05 self.emb_learning_rate = config.emb_learning_rate or 0.0 ...
gpl-2.0
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/MaskedSelect.lua
17
2507
local unpack = unpack or table.unpack local MaskedSelect, parent = torch.class('nn.MaskedSelect', 'nn.Module') --[[ Sets the provided mask value for the module. ]] function MaskedSelect:__init() parent.__init(self) self._maskIndices = torch.LongTensor() self._maskIndexBuffer = torch.LongTensor() self._maskInd...
mit
Jeffyrao/nn
Reshape.lua
42
1801
local Reshape, parent = torch.class('nn.Reshape', 'nn.Module') function Reshape:__init(...) parent.__init(self) local arg = {...} self.size = torch.LongStorage() self.batchsize = torch.LongStorage() if torch.type(arg[#arg]) == 'boolean' then self.batchMode = arg[#arg] table.remove(arg, #arg...
bsd-3-clause
Amadiro/obtuse-tanuki
libs/winapi/listboxclass.lua
2
2614
--oo/listbox: standard listbox control. --Written by Cosmin Apreutesei. Public Domain. setfenv(1, require'winapi') require'winapi.controlclass' require'winapi.itemlist' require'winapi.listbox' LBItemList = class(ItemList) function LBItemList:add(i,s) if not s then i,s = nil,i end if i then ListBox_InsertString(...
mit
tnarik/malmo
Malmo/test/LuaTests/test_argument_parser.lua
2
1918
-- -------------------------------------------------------------------------------------------------- -- Copyright (c) 2016 Microsoft Corporation -- -- 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 th...
mit
hnakamur/luv_fiber_example
wait.lua
6
1308
local coroutine = require('coroutine') local debug = require 'debug' local fiber = {} function fiber.new(block) return function (callback) local paused local co = coroutine.create(block) local function formatError(err) local stack = debug.traceback(co, tostring(err)) if type(err) == "table" then ...
mit
Mehranhpr/spam
plugins/plugins.lua
325
6164
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( ...
gpl-2.0
EliHar/Pattern_recognition
torch1/exe/luajit-rocks/luajit-2.0/src/jit/dump.lua
4
19566
---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -...
mit
DrFR0ST/Human-Apocalypse
conf.lua
1
2616
function love.conf(t) t.identity = nil -- The name of the save directory (string) --t.version = "0.1" -- The LÖVE version this game was made for (string) t.console = false -- Attach a console (boolean, Windows only) t.window.title = "Human-Apocalypse" ...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/nn/MM.lua
17
2812
--[[ Module to perform matrix multiplication on two minibatch inputs, producing a minibatch. ]] local MM, parent = torch.class('nn.MM', 'nn.Module') --[[ The constructor takes two optional arguments, specifying whether or not transpose any of the input matrices before perfoming the multiplication. ]] functi...
mit
EliHar/Pattern_recognition
torch1/install/share/lua/5.1/tds/vec.lua
4
6372
local ffi = require 'ffi' local tds = require 'tds.env' local elem = require 'tds.elem' local C = tds.C -- vec-independent temporary buffers local val__ = C.tds_elem_new() ffi.gc(val__, C.tds_elem_free) local vec = {} local NULL = not jit and ffi.C.NULL or nil local mt = {} function mt:insert(...) local lkey, lv...
mit
AlexMili/torch-dataframe
specs/dataframe/missing_data_spec.lua
1
1990
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
drmingdrmer/mysql-proxy-xp
lib/admin.lua
3
2741
--[[ $%BEGINLICENSE%$ Copyright (c) 2008, 2009, 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
gvx/space
shipgraphics/light_scout.lua
1
1570
return { {width=1.5,-0.305,-0.419,-0.347,-0.417,-0.352,-0.208,-0.295,-0.003,-0.224,0.162,-0.115,0.34,-0.043,0.342}, {width=1.5,0.103,-0.69,-0.109,-0.689}, {width=1.5,0.082,-0.626,-0.083,-0.624}, {width=1.5,-0.342,-0.627,-0.517,-0.626}, {width=1.5,-0.318,-0.692,-0.539,-0.694}, {width=1.5,-0.31,-0.057,-0.686,-0.288,-1,-0...
mit
paladiyom/paladerz
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
anshkumar/yugioh-glaze
assets/script/c41753322.lua
3
3301
--竜脚獣ブラキオン function c41753322.initial_effect(c) --cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_DECK) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) ...
gpl-2.0
Arashbrsh/kings-BOT
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
aminsa2000/perfect
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
paladiyom/paladerz
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
anshkumar/yugioh-glaze
assets/script/c35686187.lua
3
1145
--断頭台の惨劇 function c35686187.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHANGE_POS) e1:SetCondition(c35686187.condition) e1:SetTarget(c35686187.target) e1:SetOperation(c35686187.activate) c:RegisterEffect(e1) en...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c75886890.lua
3
3138
--ヴァイロン・スフィア function c75886890.initial_effect(c) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(75886890,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EV...
gpl-2.0
Mordonus/RaidOps
RaidOps/EPGP.lua
1
45534
----------------------------------------------------------------------------------------------- -- Client Lua Script for RaidOps -- Copyright (c) Piotr Szymczak 2015 dogier140@poczta.fm. ----------------------------------------------------------------------------------------------- local DKP = Apollo.GetAddon("RaidOp...
gpl-2.0
TETOO2020/THETETOO_A8
plugins/aboasola.lua
6
1124
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY tetoo ▀▄ ▄▀ ▀▄ ▄▀ BY nmore (@l_l_lo) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY l_l_ll ▀▄ ▄▀ ▀▄ ▄▀ broadcast : مـعرفي ▀▄ ▄▀ ▀▄▀▀▄▄▀▀▄▄▀▄▄▀▀▄▄▀...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c66540884.lua
7
1243
--トリック・デーモン function c66540884.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(66540884,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCode(EVENT_T...
gpl-2.0
ryoenji/libgdx
demos/pax-britannica/pax-britannica-android/assets/data/scripts/easy_enemy_production.lua
5
2312
local SCRIPTED_ACTIONS = { { 'fighter', 'fighter', 'fighter', 'fighter', 'bomber' }, { 'fighter', 'fighter', 'fighter', 'bomber' }, { 'fighter', 'fighter', 'bomber' }, { 'fighter', 'fighter', 'fighter', 'frigate' } } local action_ind...
apache-2.0
Hooodini/HooECS
spec/engine_system_spec.lua
1
10763
package.path = package.path .. ";./?.lua;./?/init.lua;./init.lua" local HooECS = require('HooECS') HooECS.initialize({ globals = true }) describe('Engine', function() local UpdateSystem, DrawSystem, MultiSystem, Component1, Component2 local entity, entity2, entity3 local testSystem, engine setup(func...
mit
anshkumar/yugioh-glaze
assets/script/c68191243.lua
6
1508
--黒蠍団召集 function c68191243.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(c68191243.con) e1:SetTarget(c68191243.tg) e1:SetOperation(c68191243.op) c:RegisterEffect(e1) end function...
gpl-2.0
Mordonus/RaidOps
MasterLootDependency/MasterLootDependency.lua
2
31109
----------------------------------------------------------------------------------------------- -- Client Lua Script for Masterloot -- Copyright (c) NCsoft. All rights reserved ----------------------------------------------------------------------------------------------- --dsfdsfsd require "Window" require "Apollo" re...
gpl-2.0
zwhfly/openwrt-luci
contrib/luadoc/lua/luadoc/taglet/standard/tags.lua
93
5221
------------------------------------------------------------------------------- -- Handlers for several tags -- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $ ------------------------------------------------------------------------------- local luadoc = require "luadoc" local util = require "luadoc.util"...
apache-2.0
aqasaeed/me
plugins/stats.lua
866
4001
do -- Returns a table with `name` and `msgs` local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_prin...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c61257789.lua
3
3779
--スターダスト・ドラゴン/バスター function c61257789.initial_effect(c) c:EnableReviveLimit() --Cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1)...
gpl-2.0
leereilly/hawkthorne-journey
src/vendor/AdvTiledLoader/Tile.lua
3
2502
--------------------------------------------------------------------------------------------------- -- -= Tile =- --------------------------------------------------------------------------------------------------- -- Setup local assert = assert local Tile = {} Tile.__index = Tile -- Creates a new tile and returns it....
mit
WAKAMAZU/sile_fe
lua-libraries/repl/plugins/autoreturn.lua
7
1364
-- Copyright (c) 2011-2014 Rob Hoelz <rob@hoelz.ro> -- -- 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
anshkumar/yugioh-glaze
assets/script/c4404099.lua
3
1636
--海底に潜む深海竜 function c4404099.initial_effect(c) --add counter local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(4404099,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:S...
gpl-2.0
ynohtna92/SheepTag
game/dota_addons/sheeptag/scripts/vscripts/libraries/popups.lua
9
5511
local popup = {} POPUP_SYMBOL_PRE_PLUS = 0 POPUP_SYMBOL_PRE_MINUS = 1 POPUP_SYMBOL_PRE_SADFACE = 2 POPUP_SYMBOL_PRE_BROKENARROW = 3 POPUP_SYMBOL_PRE_SHADES = 4 POPUP_SYMBOL_PRE_MISS = 5 POPUP_SYMBOL_PRE_EVADE = 6 POPUP_SYMBOL_PRE_DENY = 7 POPUP_SYMBOL_PRE_ARROW = 8 POPUP_SYMBOL_POST_EXCLAMATION = 0 POPUP_SYMBOL_POST...
gpl-2.0
freifunk-gluon/luci
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua
141
1038
--[[ smap_devinfo - SIP Device Information (c) 2009 Daniel Dickinson Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- require("luci.i18n") re...
apache-2.0
anshkumar/yugioh-glaze
assets/script/c25642998.lua
9
1264
--ポセイドン・ウェーブ function c25642998.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(c25642998.condition) e1:SetTarget(c25642998.target) e1:SetOpera...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c7076131.lua
3
1272
--ロスト・ネクスト function c7076131.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(c7076131.target) e1:SetOperation(c7076131.activate) c:RegisterEffect(e1) ...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c55624610.lua
3
1569
--スクラップ・ハンター function c55624610.initial_effect(c) --destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(55624610,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:S...
gpl-2.0
anshkumar/yugioh-glaze
assets/script/c34475451.lua
3
1312
--工作列車シグナル・レッド function c34475451.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(34475451,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c344...
gpl-2.0
assassinboy208/eagleTG
plugins/id.lua
226
4260
local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, result) local re...
gpl-2.0
johnparker007/mame
scripts/src/osd/windows.lua
5
7475
-- license:BSD-3-Clause -- copyright-holders:MAMEdev Team --------------------------------------------------------------------------- -- -- windows.lua -- -- Rules for the building for Windows -- --------------------------------------------------------------------------- dofile("modules.lua") function maintarge...
gpl-2.0