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
LuckyGameCn/LHCocosGame
cocos2d/tests/lua-tests/src/CocoStudioTest/CocoStudioSceneTest/TriggerCode/cons.lua
5
1541
require ("CocoStudio") local NodeInRect = class("NodeInRect") NodeInRect._tag = -1 NodeInRect._origin = nil NodeInRect._size = nil function NodeInRect:ctor() self._tag = -1 self._origin = nil self._size = nil self._origin = cc.p(0, 0) self._size = cc.size(0, 0) end function NodeInRect:init...
mit
leecrest/luv
tests/test-timer.lua
8
2443
return require('lib/tap')(function (test) -- This tests using timers for a simple timeout. -- It also tests the handle close callback and test("simple timeout", function (print, p, expect, uv) local timer = uv.new_timer() local function onclose() p("closed", timer) end local function ontime...
apache-2.0
brahmi2/prosody-modules
mod_limits/mod_limits.lua
31
3206
-- mod_limits: Rate-limiting for Prosody -- Version: Alpha -- Author: Matthew Wild <mwild1@gmail.com> -- Because we deal we pre-authed sessions and streams we can't be host-specific module:set_global(); local filters = require "util.filters"; local throttle = require "util.throttle"; local timer = require "util.timer...
mit
jchuang1977/my_luci
modules/admin-full/luasrc/model/cbi/admin_system/startup.lua
67
2805
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org> Copyright 2010 Manuel Munz <freifunk at somakoma dot de> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with t...
apache-2.0
mixflowtech/logsensor
lib/pflua/src/pf/libpcap.lua
26
2902
module(...,package.seeall) local ffi = require("ffi") local types = require("pf.types") -- Load FFI declarations. local pcap -- The pcap library, lazily loaded. local verbose = os.getenv("PF_VERBOSE"); local MAX_UINT32 = 0xffffffff ffi.cdef[[ typedef struct pcap pcap_t; const char *pcap_lib_version(void); int pcap_...
apache-2.0
TannerRogalsky/love2d_template
game.lua
3
1071
local Game = class('Game', Base):include(Stateful) function Game:initialize(args) Base.initialize(self) for k,v in pairs(args) do self[k] = v end self:gotoState("Loading") end function Game:update(dt) end function Game:draw() end function Game:mousepressed(x, y, button, isTouch) end function Game:mou...
mit
dromozoa/dromozoa-graph
dromozoa/graph/minimize_crossings.lua
1
3295
-- Copyright (C) 2018,2019 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-graph. -- -- dromozoa-graph 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 Licens...
gpl-3.0
ArchShaman/Zero-K
LuaUI/Widgets/mission_objectives.lua
8
12675
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Objectives", desc = "Displays mission objectives.", author = "KingRaptor (L.J. Lim)", ...
gpl-2.0
ArchShaman/Zero-K
effects/lrpc_trail.lua
25
2379
-- vulcanfx return { ["vulcanfx"] = { usedefaultexplosions = false, exhale = { air = true, class = [[CSimpleParticleSystem]], count = 1, ground = true, water = true, properties = { airdrag ...
gpl-2.0
soumith/imagenet-multiGPU.torch
data.lua
1
2027
-- -- Copyright (c) 2014, 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. -- local ffi = requ...
bsd-2-clause
erwincoumans/premake-dev-iphone-xcode4
tests/project/test_vpaths.lua
1
3424
-- -- tests/project/test_vpaths.lua -- Automated test suite for the project support functions. -- Copyright (c) 2011-2012 Jason Perkins and the Premake project -- T.project_vpaths = { } local suite = T.project_vpaths local project = premake5.project -- -- Setup and teardown -- local sln, prj function suite.se...
bsd-3-clause
ArchShaman/Zero-K
LuaRules/Gadgets/CAI/HeatmapHandler.lua
9
8181
--[[ Handles Heatmaps * Use this file to create a heatmap object with a square size. * Can add circles of heat or points. * Is able to track units by unitID and update the heatmap based on their position. --]] local ceil = math.ceil local floor = math.floor local max = math.max local min = math.min local abs = mat...
gpl-2.0
ktosiu/nodemcu-firmware
lua_examples/irsend.lua
88
1803
------------------------------------------------------------------------------ -- IR send module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- -- Example: -- dofile("irsend.lua").nec(4, 0x00ff00ff) -----------------------------------------------------------------------...
mit
LinusU/nn
Parallel.lua
39
3780
local Parallel, parent = torch.class('nn.Parallel', 'nn.Container') function Parallel:__init(inputDimension,outputDimension) parent.__init(self) self.modules = {} self.size = torch.LongStorage() self.inputDimension = inputDimension self.outputDimension = outputDimension end function Parallel:updateOut...
bsd-3-clause
liangjz92/deep_cqa
qieyi/QY_B.lua
1
9902
--[[ ไฝฟ็”จๅŒๆ ทๆœฌ็š„่ฏฏๅทฎ่ฟ›่กŒๆ›ดๆ–ฐCNN๏ผŒ๏ผˆไธคไธชๆ ทๆœฌ่ฎก็ฎ—่ฏฏๅทฎ๏ผŒไป…ๆ›ดๆ–ฐไธ€ไธชๆ ทๆœฌ็š„ๅ‚ๆ•ฐ๏ผ‰ author: liangjz time: 2015-03-23 --]] -------------------- local Model = torch.class('QY_B') function Model: __init(useGPU) self.cfg = { --้…็ฝฎๆ–‡ไปถ vecs = nil, dict = nil, emd = nil, dim = deep_cqa.config.emd_dim, --่ฏๅ‘้‡็š„็ปดๅบฆ gpu = useGPU or false, --ๆ˜ฏๅฆไฝฟ็”จgpuๆจกๅผ margin ...
apache-2.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_chili_spectator_panels.lua
3
31226
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Chili Spectator Panels", desc = "Manages UI panels for displaying team information while spect...
gpl-2.0
brahmi2/prosody-modules
mod_lastlog/mod_lastlog.lua
32
2636
local datamanager = require "util.datamanager"; local jid = require "util.jid"; local time = os.time; local log_ip = module:get_option_boolean("lastlog_ip_address", false); local host = module.host; module:hook("authentication-success", function(event) local session = event.session; if session.username then datama...
mit
amirilk22333322/uzzbot
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempt...
gpl-2.0
gmorishere/bsoeted
bot/utils.lua
26
17219
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
alarouche/premake-core
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...
bsd-3-clause
Fluorohydride/ygopro
premake5.lua
2
9234
-- default global settings BUILD_LUA = true BUILD_EVENT = os.istarget("windows") BUILD_FREETYPE = os.istarget("windows") BUILD_SQLITE = os.istarget("windows") BUILD_IRRLICHT = not os.istarget("macosx") USE_IRRKLANG = true IRRKLANG_PRO = false LUA_LIB_NAME = "lua" -- read settings from command line or environment vari...
gpl-2.0
LinusU/nn
SpatialDropout.lua
33
1453
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...
bsd-3-clause
jchuang1977/my_luci
libs/nixio/docsrc/nixio.bit.lua
171
2044
--- Bitfield operators and mainpulation functions. -- Can be used as a drop-in replacement for bitlib. module "nixio.bit" --- Bitwise OR several numbers. -- @class function -- @name bor -- @param oper1 First Operand -- @param oper2 Second Operand -- @param ... More Operands -- @return number --- Invert given number. ...
apache-2.0
phi-psi/luci
libs/nixio/docsrc/nixio.bit.lua
171
2044
--- Bitfield operators and mainpulation functions. -- Can be used as a drop-in replacement for bitlib. module "nixio.bit" --- Bitwise OR several numbers. -- @class function -- @name bor -- @param oper1 First Operand -- @param oper2 Second Operand -- @param ... More Operands -- @return number --- Invert given number. ...
apache-2.0
erwincoumans/premake-dev-iphone-xcode4
tests/actions/make/test_makesettings.lua
57
1055
-- -- tests/actions/make/test_makesettings.lua -- Tests makesettings lists in generated makefiles. -- Copyright (c) 2011 Jason Perkins and the Premake project -- T.make_settings = { } local suite = T.make_settings local make = premake.make local sln, prj, cfg function suite.setup() _ACTION = "gmake" sln...
bsd-3-clause
ForgedAddons/StayFocused
tekKonfig/tekKonfigButton.lua
6
1708
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Button", 5) if not lib then return end oldminor = oldminor or 0 if oldminor < 5 then local GameTooltip = GameTooltip local function HideTooltip() GameTooltip:Hide() end local function ShowTooltip(self) if self.tiptext then GameTooltip:SetOwner(self, "ANCHOR...
apache-2.0
galnegus/Glaskross
Entities.lua
1
1597
local Signals = require "constants.Signals" local Constants = require "constants.Constants" Entities = {} local _entityArray = {} local _toRemove = {} Signal.register(Signals.ADD_ENTITY, function(entity) _entityArray[entity.id] = entity entity:conception() end) Signal.register(Signals.KILL_ENTITY, function(enti...
mit
ArchShaman/Zero-K
LuaUI/Widgets/chili/Controls/screen.lua
13
7772
Screen = Object:Inherit{ --Screen = Control:Inherit{ classname = 'screen', x = 0, y = 0, width = 0, height = 0, preserveChildrenOrder = true, activeControl = nil, focusedControl = nil, hoveredControl = nil, currentTooltip = nil, _lastHoveredControl = nil, _lastClicked =...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Configs/cai/strategies.lua
20
7579
--[[ example buildTasksMods buildTasksMods = function(buildConfig) buildConfig.robots.factoryByDefId[UnitDefNames['factorycloak'].id].importance = 0 buildConfig.robots.factoryByDefId[UnitDefNames['factoryshield'].id].importance = 1 buildConfig.robots.factoryByDefId[UnitDefNames['factoryveh'].id].importance =...
gpl-2.0
LuckyGameCn/LHCocosGame
cocos2d/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua
17
2518
-- enable log local function doTest() cclog("********************** init value ***********************") -- set default value cc.UserDefault:getInstance():setStringForKey("string", "value1") cc.UserDefault:getInstance():setIntegerForKey("integer", 10) cc.UserDefault:getInstance():setFloatForKey(...
mit
ryanplusplus/xlua
exercises/pov/example.lua
3
1656
local name = 1 local children = 2 local function ancestry(which, node) if which == node[name] then return { node } end for _, child in ipairs(node[children] or {}) do local _ancestry = ancestry(which, child) if _ancestry then table.insert(_ancestry, 1, node) return _ancestry end end end ...
mit
Jobq/vlc-mdc
share/lua/playlist/anevia_streams.lua
112
3664
--[[ $Id$ Parse list of available streams on Anevia Toucan servers. The URI http://ipaddress:554/list_streams.idp describes a list of available streams on the server. Copyright ยฉ 2009 M2X BV Authors: Jean-Paul Saman <jpsaman@videolan.org> This program is free software; you can redistribute it and/or modify ...
gpl-2.0
SeanPackham/Gloves
build/gloves/map.lua
1
3489
local ceil, floor do local _obj_0 = math ceil, floor = _obj_0.ceil, _obj_0.floor end local Map do local _class_0 local _base_0 = { add = function(self, e) self:zone(e) self._entities[e] = e if e.dynamic then self.dynamics[e] = e end e.map = self return e end, ...
mit
lev1976g/NoxicCore
src/scripts/lua/0Misc/0LCF_Includes/LCF_Gameobject.lua
18
2928
--[[ * ArcEmu MMORPG Server * Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/> * Copyright (C) 2008-2010 <http://www.ArcEmu.org/> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Softwa...
agpl-3.0
sinavafa/ERRORTG
plugins/bugzilla.lua
611
3983
do local BASE_URL = "https://bugzilla.mozilla.org/rest/" local function bugzilla_login() local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password print("accessing " .. url) local res,code = https.request( url ) local data = json:decode(res) return data ...
gpl-2.0
nucular/The-Powder-Toy-nuculars-mod
src/lua/socket/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 $ ----------------------------------------------------------------------------- -----------------------------------------------...
gpl-3.0
fuhongxue/skybox
scenes/demo.lua
2
10967
local scene = storyboard.newScene() local app = require('lib.app') local api = app.api local vec3 = require('lib.vec3') local s = 250 local function position3d(v) return s * v.x / v.z + _CX, s * v.y / v.z + _CY end local function dot(group, pos, color) local c = display.newCircle(group, 0, 0, 3) if color ...
mit
phi-psi/luci
applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua
76
5638
--[[ Luci diag - Diagnostics controller module (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 ]]-- module("luci.cont...
apache-2.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_transporting.lua
11
10222
-- $Id: gui_transporting.lua 3171 2008-11-06 09:06:29Z det $ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- file: gui_transporting.lua -- brief: Display the units currently being transported -...
gpl-2.0
telergybot/gpmngr
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
hugohuang1111/quick-ui
src/UISlider.lua
2
17384
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, di...
mit
leafo/sharecart.lua
tests.lua
2
3973
local sharecart = require('sharecart') if not sharecart.valid('.') then error("tests aren't being run from a valid directory") end local cart_data = sharecart.load('.') function setup() cart_data.MapX = 0 cart_data.MapY = 0 cart_data.Misc0 = 0 cart_data.Misc1 = 0 cart_data.Misc2 = 0 cart_data.Misc3 = 0...
mit
scholzd/MoonGen
rfc2544/utils/tikz.lua
9
1993
local tikz = {} tikz.__index = tikz local strStart = [[ \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}]] local strEnd = [[ \end{axis} \end{tikzpicture} \end{document} ]] function escapeString(str) str = str:gsub("([%%\\%{%}#&_%^~])",...
mit
Corvass/BorrowedTime
Libs/AceGUI-3.0-SharedMediaWidgets/Libs/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-...
gpl-3.0
DBReinitialized/PigBot
Source/deps/discordia/voice/opus.lua
3
3581
return function(filename) local ffi = require("ffi") local success, lib = pcall(ffi.load, filename) if not success then return error(lib) end local gc, new, typeof = ffi.gc, ffi.new, ffi.typeof ffi.cdef[[ typedef int16_t opus_int16; typedef int32_t opus_int32; typedef uint16_t opus_uint16; typedef uint32_t opus_uint...
mit
LuaDist2/luasofia
test/make_call_loop.lua
3
4246
------------------------------------------------------------------------------ -- @author Paulo Pizarro <paulo.pizarro@gmail.com> -- @author Tiago Katcipis <tiagokatcipis@gmail.com> -- -- This file is part of Luasofia. -- -- Luasofia is free software: you can redistribute it and/or modify -- it under the terms of the ...
gpl-3.0
jchuang1977/my_luci
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua
76
1096
--[[ Luci statistics - cpu plugin diagram definition (c) 2008 Freifunk Leipzig / 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 http://www.apache...
apache-2.0
brahmi2/prosody-modules
mod_incidents_handling/incidents_handling/incidents_handling.lib.lua
32
16333
-- This contains the auxiliary functions for the Incidents Handling module. -- (C) 2012-2013, Marco Cirillo (LW.Org) local pairs, ipairs, os_date, string, table, tonumber = pairs, ipairs, os.date, string, table, tonumber local dataforms_new = require "util.dataforms".new local st = require "util.stanza" local xmlns_...
mit
Iamgoofball/tcf-gmod
arw/gamemode/client/cl_stamina.lua
4
4928
CreateClientConVar("cl_bur_sprintmod_enablehud",1,true,false) CreateClientConVar("cl_bur_sprintmod_fade",1,true,false) net.Receive("StaminaSpawn", function(len) local ply = LocalPlayer() local MaxStamina = net.ReadFloat() local RegenMul = net.ReadFloat() local DecayMul = net.ReadFloat() ply.BurgerStamin...
agpl-3.0
mixflowtech/logsensor
lib/ljsyscall/syscall/openbsd/c.lua
24
1625
-- This sets up the table of C functions local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string local abi = require ...
apache-2.0
ArchShaman/Zero-K
LuaRules/Gadgets/unit_solar_force_closed.lua
5
1427
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- if not gadgetHandler:IsSyncedCode() then return end -------------------------------------------------------------------------------- ------------------------...
gpl-2.0
KurdyMalloy/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
phi-psi/luci
applications/luci-olsr/luasrc/model/cbi/olsr/olsrdhna.lua
78
1844
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2011 Manuel Munz <freifunk at somakoma dot de> 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
Corvass/BorrowedTime
Locales/deDE.lua
1
5846
-- Generated by Babelfish script, do not add strings manually, only translate existing strings. -- Please make sure to save the file as UTF-8, BUT WITHOUT THE UTF-8 BOM HEADER; ยถ local L = LibStub("AceLocale-3.0"):NewLocale("BorrowedTime", "deDE") if not L then return end -- L["Add a new bar"] = true -- L["Alert sound...
gpl-3.0
phi-psi/luci
libs/web/luasrc/http/protocol/mime.lua
88
2933
--[[ HTTP protocol implementation for LuCI - mime handling (c) 2008 Freifunk Leipzig / 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 http://www....
apache-2.0
yisunfc/Dota2WebAPI
src/player.lua
1
3201
local json = require("json") require("request") require("common") player = {} local function parsePlayer(origin, parsed) local cvsString = { "Private", "Friend Only", "Friends of Friends", "Users Only", "Public", } local personStateString = { "Offline", "Online", "Busy", "Away", "Snooze", "Looking for Trad...
mit
Gixen/ProjectPorcupine
Assets/StreamingAssets/LUA/Furniture.lua
5
27033
------------------------------------------------------- -- Project Porcupine Copyright(C) 2016 Team Porcupine -- This program comes with ABSOLUTELY NO WARRANTY; This is free software, -- and you are welcome to redistribute it under certain conditions; See -- file LICENSE, which is part of this source code package, for ...
gpl-3.0
scholzd/MoonGen
examples/l3-load-latency.lua
5
4412
local mg = require "moongen" local memory = require "memory" local device = require "device" local ts = require "timestamping" local filter = require "filter" local hist = require "histogram" local stats = require "stats" local timer = require "timer" local arp = require "proto.arp" local log = requir...
mit
starius/pasta
src/pasta/views/raw_pasta.lua
1
1038
local Widget Widget = require("lapis.html").Widget local RawPasta do local _class_0 local _parent_0 = Widget local _base_0 = { content = function(self) return raw(self.p_content) end } _base_0.__index = _base_0 setmetatable(_base_0, _parent_0.__base) _class_0 = setmetatable({ __init = fu...
mit
Phanx/oUF
elements/powerprediction.lua
6
4513
--[[ Element: Power Prediction Bar Handles updating and visibility of the power prediction status bars. Widget PowerPrediction - A table containing `mainBar` and `altBar`. Sub-Widgets mainBar - A StatusBar used to represent power cost of spells, that consume your main power, e.g. mana for mages; al...
mit
liangjz92/deep_cqa
context_model/co_sim.lua
1
1345
--[[ ้€š่ฟ‡ๆ–‡ๆœฌ็š„ๅ…ฑ็Žฐๅบฆ๏ผŒ่ฎก็ฎ—้—ฎ้ข˜ๅ’Œ็ญ”ๆกˆไน‹้—ด็š„็›ธไผผๅบฆ ๅฏ่ƒฝ็”จๅˆฐ็š„ๆ•ฐๆฎ๏ผš ๆˆชๆญข่ฏ ๅ…ฑ็Žฐ็Ÿฉ้˜ต๏ผˆไปŽ่ฎญ็ปƒ้›†ไธญๆๅ–ๅพ—ๆฅ๏ผ‰ idf็ปŸ่ฎก็ป“ๆžœ --]] require('math') local CoSim = torch.class('CoSim') function CoSim:__init() -- ๅˆๅง‹ๅŒ–๏ผŒ่ฝฝๅ…ฅๆˆชๆญข่ฏๅ’Œๅ…ฑ็Žฐ็Ÿฉ้˜ต self.co_matrix = torch.load('insurance_pmi.bin') self.bw = torch.load('bilstm.weight') end ----------------------- function CoSim:get_score(questio...
apache-2.0
ArchShaman/Zero-K
LuaRules/Utilities/GetUnitIsBuilding.lua
5
3682
-- $Id:$ ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- -- -- Author: jK @2010 -- License: GPLv2 and later -- -------------------------------------------------------------------------------------...
gpl-2.0
liangjz92/deep_cqa
novel_model/trans4_bkp2.lua
1
13081
--[[ ็ป™่ฏๅ‘้‡็š„่กจ่พพๅŠ tf-idf author: liangjz time: 2015-01-19 --]] -------------------- local Trans4 = torch.class('Trans4') function Trans4: __init(useGPU) self.cfg = { --้…็ฝฎๆ–‡ไปถ vecs = nil, dict = nil, emd = nil, dim = deep_cqa.config.emd_dim, --่ฏๅ‘้‡็š„็ปดๅบฆ gpu = useGPU or false, --ๆ˜ฏๅฆไฝฟ็”จgpuๆจกๅผ margin = 0.009, l2Rate =...
apache-2.0
phi-psi/luci
applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
78
1325
--[[ Luci configuration model for statistics - collectd interface plugin configuration (c) 2008 Freifunk Leipzig / 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 Lic...
apache-2.0
scholzd/MoonGen
rfc2544/benchmarks/latency.lua
9
11321
package.path = package.path .. "rfc2544/?.lua" local standalone = false if master == nil then standalone = true master = "dummy" end local dpdk = require "dpdk" local memory = require "memory" local device = require "device" local ts = require "timestamping" local fil...
mit
ttyz/ProjectPorcupine
Assets/StreamingAssets/LUA/Furniture.lua
1
13616
-- TODO: Figure out the nicest way to have unified defines/enums -- between C# and Lua so we don't have to duplicate anything. ENTERABILITY_YES = 0 ENTERABILITY_NO = 1 ENTERABILITY_SOON = 2 -------------------------------- UTILITY -------------------------------- function Clamp01( value ) if (value > 1) ...
gpl-3.0
liangjz92/deep_cqa
novel_model/trans2.lua
2
9108
--[[ CNN็ป“ๆž„2็š„็ฑปๅฎž็Žฐ๏ผŒไบ‹ๅฎž่ฏๆ˜Ž๏ผŒๅ่ฝฌๆญฃ่ดŸๆ ทๆœฌๅพˆ้‡่ฆ,ๅ› ไธบ่ฎญ็ปƒ่ฟ‡็จ‹ไธญๆทปๅŠ ไบ†l2็บฆๆŸ,ๆ‰€ไปฅ่ฎญ็ปƒๆ˜ฏ้žๅฏน็งฐ็š„ author: liangjz time: 2015-01-17 --]] -------------------- local Trans2 = torch.class('Trans2') function Trans2: __init(useGPU) self.cfg = { --้…็ฝฎๆ–‡ไปถ vecs = nil, dict = nil, emd = nil, dim = deep_cqa.config.emd_dim, --่ฏๅ‘้‡็š„็ปดๅบฆ gpu = useGPU or false, --ๆ˜ฏๅฆ...
apache-2.0
ioiasff/poi
plugins/stats.lua
5
4101
-- Saves the number of messages from a user -- Can check the number of messages with !stats do local NUM_MSG_MAX = 2 local TIME_CHECK = 3 -- seconds 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....
gpl-2.0
ArchShaman/Zero-K
LuaUI/Configs/TeamColorConfig.lua
6
4489
local function Range(input) input[1] = input[1]/255 input[2] = input[2]/255 input[3] = input[3]/255 return input end local colors = { myColor = Range({ 050, 250, 050 }), -- can only be 1 color -- myColor = Range({ 008, 192, 016 }), gaiaColor = Range({ 200, 200, 200 }), -- can only be 1 color allyColors = { ...
gpl-2.0
alarouche/premake-core
tests/actions/vstudio/vc200x/test_project_refs.lua
9
1837
-- -- tests/actions/vstudio/vc200x/test_project_refs.lua -- Validate project references in Visual Studio 200x C/C++ projects. -- Copyright (c) 2011-2012 Jason Perkins and the Premake project -- T.vstudio_vs200x_project_refs = { } local suite = T.vstudio_vs200x_project_refs local vc200x = premake.vstudio.vc200x --...
bsd-3-clause
mit-dci/CryptoKernel
premake5.lua
1
2020
newoption { trigger = "with-docs", description = "Use doxygen to build the docs" } newoption { trigger = "lib-dir", description = "Specify extra directory to look for libraries in", value = "DIR" } newoption { trigger = "include-dir", description = "Specify extra directory to look for...
gpl-3.0
Corvass/BorrowedTime
Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
2
5864
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0 -- Widget created by Yssaril local AceGUI = LibStub("AceGUI-3.0") local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Font" local widgetVersion = 9 local content...
gpl-3.0
ld-test/dromozoa-xml
dromozoa/xml.lua
1
1451
-- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-xml. -- -- dromozoa-xml 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-3.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_chili_facbar.lua
5
19680
------------------------------------------------------------------------------- local version = "v0.053" function widget:GetInfo() return { name = "Chili FactoryBar", desc = version .. " - Chili buildmenu for factories.", author = "CarRepairer (converted from jK's Buildbar)", date ...
gpl-2.0
celeron55/buildat
extensions/__menu/init.lua
1
4589
-- Buildat: extension/__menu/init.lua -- http://www.apache.org/licenses/LICENSE-2.0 -- Copyright 2014 Perttu Ahola <celeron55@gmail.com> local log = buildat.Logger("extension/__menu") local dump = buildat.dump local magic = require("buildat/extension/urho3d").safe local uistack = require("buildat/extension/uistack") lo...
apache-2.0
LuckyGameCn/LHCocosGame
cocos2d/cocos/scripting/lua-bindings/auto/api/Animate.lua
6
1322
-------------------------------- -- @module Animate -- @extend ActionInterval -------------------------------- -- overload function: getAnimation() -- -- overload function: getAnimation() -- -- @function [parent=#Animate] getAnimation -- @param self -- @return Animation#Animation ret (retunr value...
mit
ArchShaman/Zero-K
LuaRules/Gadgets/unit_teleporter.lua
4
28904
function gadget:GetInfo() return { name = "Teleporter", desc = "Implements mass teleporter", author = "Google Frog", date = "29 Feb 2012", license = "GNU GPL, v2 or later", layer = 0, enabled = true -- loaded by default? } end include("LuaRules/Configs/custo...
gpl-2.0
sinavafa/ERRORTG
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
chuckbutler/telegram-bot
plugins/search_youtube.lua
3
1425
do local function get_yt_data (yt_code) local base_url = 'http://gdata.youtube.com/feeds/api/' local url = base_url..'/videos/'..yt_code..'?v=2&alt=jsonc' local res,code = http.request(url) if code ~= 200 then return "HTTP ERROR" end local data = json:decode(res).data return data end local function forma...
gpl-2.0
erwincoumans/premake-dev-iphone-xcode4
tests/base/test_api.lua
1
10432
-- -- tests/base/test_api.lua -- Automated test suite for the project API support functions. -- Copyright (c) 2008-2012 Jason Perkins and the Premake project -- T.api = { } local suite = T.api local sln function suite.setup() sln = solution "MySolution" end -- -- premake.getobject() tests -- function suite...
bsd-3-clause
amirilk22333322/uzzbot
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
ArchShaman/Zero-K
effects/thrower.lua
7
2643
-- thrower_shockwave -- thrower_flash local circleString = "r%.5f y10 -1 x10x10 y10 %d a10 y10 r6.283 y11 -3.1415 a11 y11 -0.5x11x11 y0 0.0417x11x11x11x11 y1 -0.00139x11x11x11x11x11x11 y2 0.0000248015x11x11x11x11x11x11x11x11 y3 -0.000000275573x11x11x11x11x11x11x11x11x11x11 y4 0.00000000208768x11x11x11x11x...
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/unit_cloakfirestate2.lua
5
3429
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Cloak Fire State 2", desc = "Sets units to Hold Fire when cloaked, reverts to original state when d...
gpl-2.0
Jobq/vlc-mdc
share/lua/playlist/pinkbike.lua
97
2080
--[[ $Id$ Copyright ยฉ 2009 the VideoLAN team Authors: Konstantin Pavlov (thresh@videolan.org) 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 opt...
gpl-2.0
liangjz92/deep_cqa
lstm_model/fast_lstm.lua
1
4170
--[[ ไฝฟ็”จTree-LSTMๆจกๅž‹็š„LSTMไปฃ็ ๅฎž็Žฐๆญฃ็กฎ็ญ”ๆกˆๅ’Œ้”™่ฏฏ็ญ”ๆกˆ็š„ๅˆ†็ฑป author: liangjz time: 2015-12-21 --]] require('..') ------------------------- --ๅฎšไน‰ไธ€ไบ›ๅ…จๅฑ€ๅ˜้‡ FastM = {} FastM.vecs = nil FastM.dict = nil FastM.emd = nil FastM.lstm_config ={ in_dim = 300, mem_dim = 30, num_layers = 1, gate_output = true, } ------------------------- function...
apache-2.0
kristiankaufmann/wrk
deps/luajit/src/jit/dis_x86.lua
89
29330
---------------------------------------------------------------------------- -- LuaJIT x86/x64 disassembler module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h --------------------------------------------------------------------------...
apache-2.0
ArchShaman/Zero-K
gamedata/modularcomms/weapons/lightninggun_improved.lua
4
1261
local name = "commweapon_lightninggun_improved" local weaponDef = { name = [[Heavy Lightning Gun]], areaOfEffect = 8, beamTTL = 12, craterBoost = 0, craterMult = 0, customParams = { extra_damage_mult = 3.125, slot = [[5]], mu...
gpl-2.0
ArchShaman/Zero-K
units/hoverskirm.lua
2
3824
unitDef = { unitname = [[hoverskirm]], name = [[Scalpel]], description = [[Skirmisher/Anti-Heavy Hovercraft]], acceleration = 0.0435, activateWhenBuilt = true, brakeRate = 0.205, buildCostMetal = 220, builder = false, buildPic ...
gpl-2.0
ArchShaman/Zero-K
units/planeheavyfighter.lua
5
3991
unitDef = { unitname = [[planeheavyfighter]], name = [[Raptor]], description = [[Air Superiority Fighter]], brakerate = 0.4, buildCostMetal = 300, buildPic = [[planeheavyfighter.png]], canFly = true, canGuard ...
gpl-2.0
calmjm/esp8266
lua/init_remote_controller.lua
1
1402
ABORT_PIN = 5 -- gpio14 LED_PIN = 3 -- gpio0 function startup() wifi.sta.setip({ip="192.168.0.13", netmask="255.255.255.0", gateway="192.168.0.1"}) uart.setup(0, 9600, 8, 0, 1, 1) gpio.mode(ABORT_PIN, gpio.INPUT, gpio.PULLUP) gpio.mode(LED_PIN, gpio.OUTPUT) gpio.write(LED_PIN, gpio.LOW) if gpio...
apache-2.0
ArchShaman/Zero-K
LuaRules/Configs/StartBoxes/TMA-0 v1_1.lua
17
1371
return { [0] = { startpoints = { {5816,3768}, }, boxes = { { {5571,3441}, {6062,3441}, {6062,4096}, {5571,4096}, }, }, }, [1] = { startpoints = { {7700,13189}, }, boxes = { { {7373,12943}, {8028,12943}, {8028,13435}, {7373,13435}, }, }, }, [2] = { ...
gpl-2.0
zaeem998/Bollywood1
en-sopr.lua
7
104172
--[[ # #ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ #:(( # For More Information ....! # Developer : Aziz < @TH3_GHOST > # our channel: @DevPointTeam # Version: 1.1 #:)) #ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ # ]] --...
gpl-2.0
shloid/kiseki-ctf-classic
GameplayScripts/GunSystem/BulletScript.lua
1
2192
---------------------------------------------------------------------------------------------------------------------------------------------------------------- -- BulletScript -- Scripted by clockwork, Modified by shloid (da man!!!) --------------------------------------------------------------------------------------...
mit
mixflowtech/logsensor
src/program/lwaftr/loadtest/loadtest.lua
2
9067
module(..., package.seeall) local engine = require("core.app") local counter = require("core.counter") local config = require("core.config") local pci = require("lib.hardware.pci") local Intel82599 = require("apps.intel.intel_app").Intel82599 local basic_apps = require("apps.basic.basic_apps") local loadgen = require(...
apache-2.0
ashemedai/ProDBG
bin/macosx/tundra/scripts/tundra/syntax/install.lua
28
1133
-- install.lua - Express file copying in unit form. module(..., package.seeall) local nodegen = require "tundra.nodegen" local files = require "tundra.syntax.files" local path = require "tundra.path" local util = require "tundra.util" local depgraph = require "tundra.depgraph" local _mt = nodegen.create_...
mit
liangjz92/deep_cqa
context_model/cov2+cont2.lua
1
8761
--[[ ๅฐ†CNNๆจกๅž‹ๅ’ŒๅŸบไบŽ่ฏๅ…ฑ็Žฐ็š„็ป“ๆžœ็ป“ๅˆ่ตทๆฅ๏ผŒ็œ‹ๅฎž้ชŒ็ป“ๆžœ่ƒฝๅฆๆฏ”ๅ•็บฏ็š„CNN่ฆๆ้ซ˜ ไฝฟ็”จ่ฎญ็ปƒๅฅฝ็š„CNNๆจกๅ—ไฝœไธบๅˆๅง‹ๅŒ–๏ผŒๅช่ฎญ็ปƒlogisticๅฑ‚ author: liangjz time: 2015-1-7 ่ฟ™็งๆ–นๆณ•ไธ่กŒ --]] require('..') local cfg = {} cfg.vecs = nil cfg.dict = nil cfg.emd = nil cfg.dim = deep_cqa.config.emd_dim cfg.gpu = true deep_cqa.ins_meth.load_binary() --ไฟ้™ฉๆ•ฐๆฎ้›†๏ผŒ่ฟ™้‡Œ่ฝฝๅ…ฅๆ˜ฏไธบไบ†่Žทๅพ—ๆต‹่ฏ•้›†ๅ’Œ็ญ”ๆกˆ ---------------------...
apache-2.0
Maxsteam/Test
plugins/weather.lua
274
1531
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' url = url..'&appid=bd82977b86bf27fb59a04b61b6...
gpl-2.0
MNoya/Warchasers
game/dota_addons/warchasers/scripts/vscripts/statcollection/lib/md5.lua
7
9581
local md5 = { _VERSION = "md5.lua 0.5.0", _DESCRIPTION = "MD5 computation in Lua (5.1)", _URL = "https://github.com/kikito/md5.lua", _LICENSE = [[ MIT LICENSE Copyright (c) 2013 Enrique Garcรญa Cota + Adam Baldwin + hanzao + Equi 4 Software Permission is hereby granted, free of char...
gpl-3.0
galnegus/Glaskross
lib/sperm/loveframes/objects/internal/closebutton.lua
3
3487
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2013 Kenny Shields -- --]]------------------------------------------------ -- closebutton class local newobject = loveframes.NewObject("closebutton", "loveframes_object_closebutton", true) --[[----------...
mit
SawyerHood/mal
lua/reader.lua
14
3968
local rex = require('rex_pcre') local string = require('string') local table = require('table') local types = require('types') local throw, Nil, Symbol, List = types.throw, types.Nil, types.Symbol, types.List local M = {} Reader = {} function Reader:new(tokens) local newObj = {tok...
mpl-2.0