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
dismantl/luci-0.12
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua
141
1054
--[[ netdiscover_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.i1...
apache-2.0
vladimir-kotikov/clink-completions
modules/multicharflags.lua
2
6163
-------------------------------------------------------------------------------- -- Helpers to add multi-character flags to an argmatcher. -- -- This makes it easy to add flags like `dir /o:nge` and be able to provide -- completions on the fly even after `dir /o:ng` has been typed. -- -- local mcf = require('multi...
mit
aruanruan/Atlas
lib/load-multi.lua
39
13282
--[[ $%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
Death15/swatch
plugins/media.lua
297
1590
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
facebokiii/arman
plugins/media.lua
297
1590
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
Ali-2h/wwefucker
plugins/media.lua
297
1590
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
soundsrc/premake-core
modules/vstudio/tests/cs2005/test_output_props.lua
14
1371
-- -- tests/actions/vstudio/cs2005/test_output_props.lua -- Test the target output settings of a Visual Studio 2005+ C# project. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_cs2005_output_props") local dn2005 = p.vstudio.dotnetbase local ...
bsd-3-clause
Ali-2h/wwefucker
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
chegenipapi/sajadchegen
libs/redis.lua
566
1214
local Redis = require 'redis' local FakeRedis = require 'fakeredis' local params = { host = os.getenv('REDIS_HOST') or '127.0.0.1', port = tonumber(os.getenv('REDIS_PORT') or 6379) } local database = os.getenv('REDIS_DB') local password = os.getenv('REDIS_PASSWORD') -- Overwrite HGETALL Redis.commands.hgetall = ...
gpl-2.0
soundsrc/premake-core
modules/vstudio/tests/vc2010/test_floatingpoint.lua
16
1050
--- -- tests/actions/vstudio/vc2010/test_floatingpoint.lua -- Validate handling of vectorextensions() in VS 2010 C/C++ projects. -- -- Created 26 Mar 2015 by Jason Perkins -- Copyright (c) 2015 Jason Perkins and the Premake project --- local p = premake local suite = test.declare("vs2010_vc_floatingpoint") local m ...
bsd-3-clause
RedSnake64/openwrt-luci-packages
applications/luci-app-pbx/luasrc/model/cbi/pbx-users.lua
146
5623
--[[ 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 ...
apache-2.0
FastTM/Fast-Unique
plugins/banhammer.lua
1
6430
local plugin = {} local function get_motivation(msg) if msg.reply then return msg.text:match(("%sban (.+)"):format(config.cmd)) or msg.text:match(("%skick (.+)"):format(config.cmd)) or msg.text:match(("%skick .+\n(.+)"):format(config.cmd)) else if msg.text:find(config.cmd.."ban @%w[%w_]+ ") or msg.text:fin...
gpl-2.0
LaFamiglia/Illarion-Content
monster/race_12_beholder/id_124_deadly_eye.lua
1
1606
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
Inorizushi/DDR-X3
BGAnimations/_ScreenSelectMusic overlay/default.lua
1
16397
local t = Def.ActorFrame {} local st = GAMESTATE:GetCurrentStyle():GetStepsType(); if GAMESTATE:GetPlayMode() == 'PlayMode_Regular' and not Is2ndMIX() then -- TargetScore Bar local function Update(self, _) if GAMESTATE then local song = GAMESTATE:GetCurrentSong() local steps = {} local anyStepsCh...
mit
ninjalulz/forgottenserver
data/talkactions/scripts/reload.lua
1
2180
local reloadTypes = { ["all"] = RELOAD_TYPE_ALL, ["action"] = RELOAD_TYPE_ACTIONS, ["actions"] = RELOAD_TYPE_ACTIONS, ["chat"] = RELOAD_TYPE_CHAT, ["channel"] = RELOAD_TYPE_CHAT, ["chatchannels"] = RELOAD_TYPE_CHAT, ["config"] = RELOAD_TYPE_CONFIG, ["configuration"] = RELOAD_TYPE_CONFIG, ["creaturescript"]...
gpl-2.0
Stimim/hammerspoon
extensions/uielement/init.lua
13
7608
--- === hs.uielement === --- --- A generalized framework for working with OSX UI elements local uielement = require "hs.uielement.internal" local application = {} application.watcher = require "hs.application.watcher" local fnutils = require "hs.fnutils" --- hs.uielement:isApplication() -> bool --- Method --- Return...
mit
bsmr-games/lipsofsuna
data/lipsofsuna/ui/widgets/widget.lua
1
5083
local Class = require("system/class") local Graphics = require("system/graphics") local Interpolation = require("system/math/interpolation") local Widget = require("system/widget") local ipol_time = 0.2 local ipol_path_a = {0,0.1,0.2,0.5,0.8,1,1} local ipol_path_x = {-1,-0.5,-0.25,-0.0125,0,0,0} local UiWidget = Clas...
gpl-3.0
shahabsaf1/copy-infernal
bot/utils.lua
356
14963
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
chelog/brawl
addons/brawl-weapons/lua/cw/shared/attachments/md_csgo_acog.lua
1
3726
local att = {} att.name = "md_csgo_acog" att.displayName = "ACOG M150 RCO Variant" att.displayNameShort = "ACOG" att.aimPos = {"CSGOACOGPos", "CSGOACOGAng"} att.FOVModifier = 15 att.isSight = true att.statModifiers = {OverallMouseSensMult = -0.1} if CLIENT then att.displayIcon = surface.GetTextureID("cw20...
gpl-3.0
soundsrc/premake-core
modules/vstudio/tests/vc200x/test_resource_compiler.lua
16
1315
-- -- tests/actions/vstudio/vc200x/test_resource_compiler.lua -- Validate generation the VCResourceCompilerTool element in Visual Studio 200x C/C++ projects. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vs200x_resource_compiler") local vc200x = p....
bsd-3-clause
ninjalulz/forgottenserver
data/talkactions/scripts/looktype.lua
1
1565
-- keep it ordered local invalidTypes = { 1, 135, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 411, 415, 424, 439, 440, 468, 469, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 501, 518, 519, 5...
gpl-2.0
wanghuan1115/sdkbox-vungle-sample
cpp/cocos2d/plugin/luabindings/auto/api/AgentManager.lua
146
1798
-------------------------------- -- @module AgentManager -- @parent_module plugin -------------------------------- -- -- @function [parent=#AgentManager] getSocialPlugin -- @param self -- @return plugin::ProtocolSocial#plugin::ProtocolSocial ret (return value: cc.plugin::ProtocolSocial) -------------------...
mit
Softwave/UFO_Game
Ufo.lua
1
4760
-- UFO Class -- Require Timer = require "hump.timer" require "helpers" -- Constructor Ufo = {} function Ufo:new(x, y) -- Setup object local ufoData = { xPos = x, yPos = y, lives = 3, speed = 3, alive = true, canShoot = true, facingRight = true, isInvincible = false, isVisible = true } self.__index = self ...
unlicense
299299/Urho3D
Source/ThirdParty/toluapp/src/bin/lua/array.lua
42
6551
-- tolua: array class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1999 -- $Id: array.lua,v 1.1 2000/11/06 22:03:57 celes Exp $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to provide ma...
mit
squadette/vlc
share/lua/playlist/france2.lua
113
2115
--[[ $Id$ Copyright © 2008 the VideoLAN team Authors: Antoine Cellerier <dionoea at videolan dot 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 ...
gpl-2.0
qq779089973/ramod
luci/applications/luci-firewall/luasrc/model/cbi/firewall/zone-details.lua
47
6266
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2010-2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at htt...
mit
yanjunh/luasocket-gyp
src/mime.lua
118
2433
----------------------------------------------------------------------------- -- MIME support for the Lua language. -- Author: Diego Nehab -- Conforming to RFCs 2045-2049 -- RCS ID: $Id: mime.lua,v 1.29 2007/06/11 23:44:54 diego Exp $ ----------------------------------------------------------------------------- ------...
mit
LaFamiglia/Illarion-Content
monster/race_63_bone_dragon/id_632_black.lua
2
1123
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
mohsen9hard/saba
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
adminomega/exterme-orginal
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
SirSepehr/Sepehr
plugins/lyrics.lua
695
2113
do local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs' local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5' local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect' local function getInfo(query) print('Getting info of ' .. query) local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY ...
gpl-2.0
soundsrc/premake-core
binmodules/luasocket/gem/test.lua
37
1081
function readfile(n) local f = io.open(n, "rb") local s = f:read("*a") f:close() return s end lf = readfile("t1lf.txt") os.remove("t1crlf.txt") os.execute("lua t1.lua < t1lf.txt > t1crlf.txt") crlf = readfile("t1crlf.txt") assert(crlf == string.gsub(lf, "\010", "\013\010"), "broken") gt = readfile("t2...
bsd-3-clause
Noltari/luci
modules/luci-base/luasrc/sgi/uhttpd.lua
79
1956
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require "nixio.util" require "luci.http" require "luci.sys" require "luci.dispatcher" require "luci.ltn12" function handle_request(env) exectime = os.clock() local renv = { CONTENT_LENGTH = env.CONTENT_LEN...
apache-2.0
soumith/torch-datasets
dataset/lushio.lua
3
1475
lushio = {} function lushio.read(filename) -- Reads Lush binary formatted matrix and returns it. -- The matrix is stored in 'filename'. -- -- call : x = luahio.readBinaryLushMatrix('my_lush_matrix_file_name'); -- -- Inputs: -- filename : the name of the lush matrix file. (string) -- -- O...
bsd-3-clause
astrofra/amiga-experiments
game-shop-shop-galaxy/python-version/pkg.core/lua/30log.lua
12
3171
local assert, pairs, type, tostring, setmetatable = assert, pairs, type, tostring, setmetatable local baseMt, _instances, _classes, _class = {}, setmetatable({},{__mode='k'}), setmetatable({},{__mode='k'}) local function assert_class(class, method) assert(_classes[class], ('Wrong method call. Expected class:%s.'):forma...
mit
ashkanpj/seedfire
plugins/inrealm.lua
71
25005
-- 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
snabbnfv-goodies/snabbswitch
src/apps/solarflare/solarflare.lua
15
10778
module(...,package.seeall) local lib = require("core.lib") local freelist = require("core.freelist") local packet = require("core.packet") require("apps.solarflare.ef_vi_h") local pci = require("lib.hardware.pci") local ethernet = require("lib.protocol.ethernet") local ffi = require("ffi"...
apache-2.0
RedSnake64/openwrt-luci-packages
modules/luci-mod-freifunk/luasrc/controller/freifunk/remote_update.lua
68
1475
-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.freifunk.remote_update", package.seeall) function index() if not nixio.fs.access("/usr/sbin/remote-update") then return end entry({"admin", "system", "remote_update"}, call("act_re...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/introspect/types/table.lua
1
1542
return { name = "table", equals = function(self, val1, val2) -- TODO end, validate = function(self, val) return type(val) == "table" and not val.class end, write_str = function(self, val) local write_table local write_value = function(v) return self.types_dict["generic"].write_str(self, v) end loca...
gpl-3.0
koeppea/ettercap
src/lua/share/scripts/http_inject2_demo.lua
9
7194
--- -- 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
LaFamiglia/Illarion-Content
quest/bula_glasha_181_galmair.lua
1
88484
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
qq779089973/ramod
luci/applications/luci-asterisk/luasrc/model/cbi/asterisk/phone_sip.lua
80
3813
--[[ LuCI - Lua Configuration Interface Copyright 2008 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- l...
mit
crazyhamedboy/oliver
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
SirSepehr/Sepehr
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
LaFamiglia/Illarion-Content
monster/race_40_wolf/id_403_grey_tail.lua
1
1099
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
qq779089973/ramod
luci/applications/luci-openvpn/luasrc/model/cbi/openvpn-basic.lua
71
3274
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- requ...
mit
vladimir-kotikov/clink-completions
yarn.lua
1
6737
-- preamble: common routines local JSON = require("JSON") -- silence JSON parsing errors function JSON:assert () end -- luacheck: no unused args local w = require('tables').wrap local matchers = require('matchers') local color = require('color') local clink_version = require('clink_version') --- -- Queries config...
mit
soundsrc/premake-core
modules/self-test/self-test.lua
8
1739
--- -- self-test/self-test.lua -- -- An automated test framework for Premake and its add-on modules. -- -- Author Jason Perkins -- Copyright (c) 2008-2016 Jason Perkins and the Premake project. --- local p = premake p.modules.self_test = {} local m = p.modules.self_test m._VERSION = p._VERSION newaction { ...
bsd-3-clause
650ia/RaOne
plugins/banhammer.lua
1085
11557
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
nort-ir/nort
plugins/banhammer.lua
1085
11557
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
teleshadow/shadowbot
plugins/banhammer.lua
1085
11557
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
RedSnake64/openwrt-luci-packages
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
24
2233
-- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.nut",package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) local voltages = { title = "%H: Voltages on UPS \"%pi\"", vlabel = "V", number_format = "%5.1lfV", data = { instances = { ...
apache-2.0
jjmleiro/hue
tools/wrk-scripts/lib/argparse.lua
22
26634
-- The MIT License (MIT) -- Copyright (c) 2013 - 2015 Peter Melnichenko -- 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 --...
apache-2.0
LaFamiglia/Illarion-Content
monster/race_3_elf/id_34_mage.lua
1
1430
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
eagle14/Snippy
plugins/steam.lua
645
2117
-- See https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI do local BASE_URL = 'http://store.steampowered.com/api/appdetails/' local DESC_LENTH = 200 local function unescape(str) str = string.gsub( str, '&lt;', '<' ) str = string.gsub( str, '&gt;', '>' ) str = string.gsub( str, '&quot;', '"' ) str...
gpl-2.0
dameiss/wireshark-aeron
test/lua/verify_globals.lua
36
3492
-- verify_globals.lua -- ignore things that change on different machines or every release -- the following items still have to exist, but their values don't have to match local filter = { -- differences by machine "DATA_DIR", "USER_DIR", "package.cpath", "package.path", "package.loaded", "r...
gpl-2.0
snabbnfv-goodies/snabbswitch
src/lib/watchdog/watchdog.lua
15
1039
module(...,package.seeall) ffi = require("ffi") C = ffi.C -- Watchdog timeout in unit defined by `precision' (just below). timeout = nil -- Watchdog precision. precision = nil -- Set watchdog timeout to mseconds (milliseconds). Does NOT start the -- watchdog. Values for mseconds>1000 are truncated to the next sec...
apache-2.0
snabbnfv-goodies/snabbswitch
lib/pflua/src/pf/optimize.lua
25
33625
module(...,package.seeall) local bit = require('bit') local utils = require('pf.utils') local verbose = os.getenv("PF_VERBOSE"); local expand_arith, expand_relop, expand_bool local set, concat, dup, pp = utils.set, utils.concat, utils.dup, utils.pp -- Pflang's numbers are unsigned 32-bit integers, but sometimes we...
apache-2.0
LuaDist/lrexlib-oniguruma
test/runtest.lua
5
3050
-- See Copyright Notice in the file LICENSE -- See if we have alien, so we can do tests with buffer subjects local ok ok, alien = pcall (require, "alien") if not ok then io.stderr:write ("Warning: alien not found, so cannot run tests with buffer subjects\n") end do local path = "./?.lua;" if package.path:sub(1,...
mit
kimiyoung/review_net
image_caption_online/utils/model_utils.lua
1
8164
local model_utils = {} local net_utils = model_utils function model_utils.combine_all_parameters(...) --[[ like module:getParameters, but operates on many modules ]]-- -- get parameters local networks = {...} local parameters = {} local gradParameters = {} for i = 1, #networks do loca...
mit
dismantl/luci-0.12
modules/admin-full/luasrc/model/cbi/admin_status/processes.lua
85
1448
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
apache-2.0
Noltari/luci
modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
41
5011
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org> -- Copyright 2012 Daniel Golle <dgolle@allnet.de> -- Licensed to the public under the Apache License 2.0. module("luci.controller.failsafe.failsafe", package.seeall) function index() local root = node() if n...
apache-2.0
nort-ir/nort
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
dwdm/moonshine
test/scripts/coercion.lua
4
8580
-------------------------------------------------------------------------- -- Moonshine - a Lua virtual machine. -- -- Email: moonshine@gamesys.co.uk -- http://moonshinejs.org -- -- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved. -- -- Permission is hereby granted, free of charge, to any person obtaining ...
mit
chelog/brawl
addons/brawl-weapons/lua/weapons/khr_m82a3/shared.lua
1
9267
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") SWEP.magType = "srMag" CustomizableWeaponry:registerAmmo(".50 BMG", ".50 BMG Rounds", 12.7, 99) CustomizableWeaponry:registerAmmo(".416 Barrett", ".416 Barrett Rounds", 10.6, 83) if CLIENT then SWEP.DrawCrosshair = false SWEP.Prin...
gpl-3.0
chelog/brawl
addons/brawl-weapons/lua/cw/shared/attachments/md_acog.lua
1
3589
local att = {} att.name = "md_acog" att.displayName = "Trijicon ACOG" att.displayNameShort = "ACOG" att.aimPos = {"ACOGPos", "ACOGAng"} att.FOVModifier = 15 att.isSight = true att.statModifiers = {OverallMouseSensMult = -0.1} if CLIENT then att.displayIcon = surface.GetTextureID("atts/acog") att.descrip...
gpl-3.0
chelog/brawl
addons/brawl-weapons/lua/cw/shared/attachments/bg_makpmext.lua
1
1458
local att = {} att.name = "bg_makpmext" att.displayName = "Extended Magazine" att.displayNameShort = "Ext. Mag" att.statModifiers = {ReloadSpeedMult = -.05} if CLIENT then att.displayIcon = surface.GetTextureID("atts/bg_makpmext") att.description = {[1] = {t = "Increases mag capacity to 14.", c = Customiza...
gpl-3.0
soundsrc/premake-core
binmodules/luasocket/src/mime.lua
149
2487
----------------------------------------------------------------------------- -- MIME support for the Lua language. -- Author: Diego Nehab -- Conforming to RFCs 2045-2049 ----------------------------------------------------------------------------- ----------------------------------------------------------------------...
bsd-3-clause
snabbnfv-goodies/snabbswitch
src/apps/intel/intel10g.lua
7
54367
--- Device driver for the Intel 82599 10-Gigabit Ethernet controller. --- This is one of the most popular production 10G Ethernet --- controllers on the market and it is readily available in --- affordable (~$400) network cards made by Intel and others. --- --- You will need to familiarize yourself with the excellent [...
apache-2.0
yanarsin/yana
bot/seedbot.lua
1
10012
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
soundsrc/premake-core
src/base/string.lua
16
1838
-- -- string.lua -- Additions to Lua's built-in string functions. -- Copyright (c) 2002-2013 Jason Perkins and the Premake project -- -- -- Capitalize the first letter of the string. -- function string.capitalized(self) return self:gsub("^%l", string.upper) end -- -- Returns true if the string has a match for...
bsd-3-clause
darya7476/Dimon
plugins/inrealm.lua
18
24954
-- 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_...
gpl-2.0
LaFamiglia/Illarion-Content
item/paintings.lua
1
8157
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
yanarsin/cnnbot
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
ArianWatch/SportTG
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
crazyhamedboy/oliver
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
bsmr-games/lipsofsuna
data/system/softbody.lua
1
2774
--- Softbody. -- -- Lips of Suna 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. -- -- @module system.softbody -- @alias Soft...
gpl-3.0
radare/radare
api/lua/fuzzer-loop.lua
2
1406
-- -- 2008 th0rpe <nopcode.org> -- -- P0C loop entry -- -- entry_addr = "0x00401050" jump_addr = "0x004010b7" do local ret; local buf_addr; local lebuf_addr; local param_addr; local addr; -- set breakpoint at entry address cmd("!bp "..entry_addr); -- continue execution cmd("!cont"); -...
gpl-2.0
spark0511/blueteambot
plugins/sudo.lua
359
1878
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' yo...
gpl-2.0
jsenellart-systran/OpenNMT
onmt/data/Dataset.lua
3
3690
--[[ Data management and batch creation. Handles data created by `preprocess.lua`. ]] local Dataset = torch.class("Dataset") --[[ Initialize a data object given aligned tables of IntTensors `srcData` and `tgtData`. --]] function Dataset:__init(srcData, tgtData) self.src = srcData.words or srcData.vectors self.s...
mit
RedSnake64/openwrt-luci-packages
applications/luci-app-pbx-voicemail/luasrc/model/cbi/pbx-voicemail.lua
97
6962
--[[ Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com> This file is part of luci-pbx-voicemail. luci-pbx-voicemail 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 ...
apache-2.0
dani-sj/danyal002
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
gwx/tome-grayswandir-weird-wyrmic
data/libs/callback-inflict-effect-0.lua
2
1170
-- Gray's Illusions, for Tales of Maj'Eyal. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is...
gpl-3.0
snabbnfv-goodies/snabbswitch
src/lib/pmu.lua
7
10818
-- pmu.lua: Lua interface to the CPU Performance Monitoring Unit module(..., package.seeall) -- This module counts and reports on CPU events such as cache misses, -- branch mispredictions, utilization of internal CPU resources such -- as execution units, and so on. -- -- Hundreds of low-level counters are available. ...
apache-2.0
teleshadow/shadowbot
bot/utils.lua
494
23873
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0
skatsuta/aerospike-training
book/answers/RecordUDF/Go/udf/basic.lua
9
1121
function get_all_factors(number) -- function definition local factors = {} -- local variable definition for possible_factor=1, math.sqrt(number), 1 do -- for loop local remainder = number%possible_factor -- assignment (% if remainder == 0 then ...
mit
skatsuta/aerospike-training
book/answers/Queries/Go/udf/basic.lua
9
1121
function get_all_factors(number) -- function definition local factors = {} -- local variable definition for possible_factor=1, math.sqrt(number), 1 do -- for loop local remainder = number%possible_factor -- assignment (% if remainder == 0 then ...
mit
skatsuta/aerospike-training
book/answers/Complete/Go/udf/basic.lua
9
1121
function get_all_factors(number) -- function definition local factors = {} -- local variable definition for possible_factor=1, math.sqrt(number), 1 do -- for loop local remainder = number%possible_factor -- assignment (% if remainder == 0 then ...
mit
skatsuta/aerospike-training
book/exercise/RecordUDF/Go/udf/basic.lua
9
1121
function get_all_factors(number) -- function definition local factors = {} -- local variable definition for possible_factor=1, math.sqrt(number), 1 do -- for loop local remainder = number%possible_factor -- assignment (% if remainder == 0 then ...
mit
hnyman/luci
modules/luci-lua-runtime/luasrc/i18n.lua
10
1252
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local tparser = require "luci.template.parser" local util = require "luci.util" local tostring = tostring module "luci.i18n" i18ndir = util.libpath() .. "/i18n/" context = util.threadlocal() default = "en...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/specs/quest.lua
1
1186
--- TODO:doc -- -- Lips of Suna 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. -- -- @module core.specs.quest -- @alias Ques...
gpl-3.0
shmul/mule
indexer.lua
1
3008
--[[ use sqlite3 FTS4 to create a single table, metrics_index with 2 default columns: rowid and content. rowid will hold a 64 bit hash, computed using xxhash content will hold the metric CREATE VIRTUAL TABLE metrics_index USING fts4; INSERT into metrics_index(rowid,content) values (8983,'hola.hop'), (83332,'c...
apache-2.0
LaFamiglia/Illarion-Content
monster/race_0_human/default.lua
1
1037
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
nood32/MEEDOBOT
plugins/tools.lua
1
24491
--[[ --[[ ✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133 ✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133 ✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen ✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy ✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com ✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen ]]-- local SUDO = ...
gpl-2.0
soundsrc/premake-core
modules/vstudio/tests/vc2010/test_excluded_configs.lua
16
1660
-- -- tests/actions/vstudio/vc2010/test_excluded_configs.lua -- Check handling of configurations which have been excluded from the build. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vs2010_excluded_configs") local vc2010 = p.vstudio.vc2010 -- -...
bsd-3-clause
qq779089973/ramod
luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
69
2332
--[[ Luci configuration model for statistics - general collectd 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 License at ...
mit
LaFamiglia/Illarion-Content
monster/race_30_golem/id_306_dimond_golem.lua
1
1116
--[[ Illarion Server 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 Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
RedSnake64/openwrt-luci-packages
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua
68
6587
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local util = require "luci.util" local ip = require "luci.ip" function write_float(self, section, value) local n = tonumber(value) if n ~= nil then return Value.write(self, section, "%.1f" % n) ...
apache-2.0
bsmr-games/lipsofsuna
data/lipsofsuna/core/unlock/chat-commands.lua
1
1790
Main.chat:register_command{ name = "unlock_action", description = "Unlock an action.", pattern = "^/unlock_action (.*)$", permission = "admin", handler = "server", func = function(player, matches) local spec = Main.specs:find_by_name("ActionSpec", matches[1]) if spec then Main.unlocks:unlock("action", matc...
gpl-3.0
qq779089973/ramod
luci/modules/admin-core/luasrc/tools/status.lua
49
5227
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- module(...
mit