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 |
|---|---|---|---|---|---|
ludc/csream | binaries/run_bream.lua | 1 | 17667 | require 'svm'
require 'nn'
require 'csream'
----- READ DATA from libSVM (using .train, .test and .validation files)
function readFromLibSVMs(filename,default_value)
if (default_value==nil) then default_value=0 end
print("Loading training file : "..filename..".train")
local dataset=svm.ascread(filename..".train... | gpl-3.0 |
deepak78/new-luci | applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-app.lua | 137 | 15546 | cbimap = Map("asterisk", "asterisk", "")
module = cbimap:section(TypedSection, "module", "Modules", "")
module.anonymous = true
app_alarmreceiver = module:option(ListValue, "app_alarmreceiver", "Alarm Receiver Application", "")
app_alarmreceiver:value("yes", "Load")
app_alarmreceiver:value("no", "Do Not Load")
app_al... | apache-2.0 |
lcheylus/haka | doc/user/workshop/blurring-the-web.lua | 3 | 1256 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local http = require('protocol/http')
local rem = require('regexp/pcre')
http.install_tcp_rule(80)
local pattern = ... | mpl-2.0 |
loringmoore/The-Forgotten-Server | data/spells/scripts/party/train.lua | 15 | 1869 | local combat = createCombatObject()
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, COND... | gpl-2.0 |
unfrindLi/bot | bot/utils.lua | 473 | 24167 | 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 |
qweru/Moon | bot/utils.lua | 473 | 24167 | 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 |
JamesWilko/GoonMod | GoonMod/mods/custom_colours/flashlight_player_weapon.lua | 1 | 6048 |
-- Mod Definition
local Mod = class( BaseMod )
Mod.id = "CustomWeaponFlashlight"
Mod.Name = "Custom Flashlight Colour - Players"
Mod.Desc = "Modify the color of flashlights attached to your weapons"
Mod.Requirements = {}
Mod.Incompatibilities = {}
Hooks:Add("GoonBaseRegisterMods", "GoonBaseRegisterMutators_" .. Mod.i... | mit |
frodrigo/osrm-backend | profiles/test.lua | 3 | 2031 | -- Enable calling our lua profile code directly from the lua command line,
-- which makes it easier to debug.
-- We simulate the normal C++ environment by defining the required globals and functions.
-- Usage:
-- > cd profiles
-- > lua5.1 debug.lua
-- for more convenient printing of tables
local pprint = require('li... | bsd-2-clause |
deepak78/new-luci | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/interface.lua | 68 | 1060 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.sys")
m = Map("luci_statistics",
translate("Interface Plugin Configuration"),
translate(
"The interface plugin collects traffic statistics on " ..
"selected interfaces."
... | apache-2.0 |
blackteamgourd/Black__Team | plugins/ingroup.lua | 202 | 31524 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
... | gpl-2.0 |
osgcc/ryzom | ryzom/common/data_common/r2/r2_ui_displayers.lua | 3 | 24809 | -----------------
-----------------
-- DISPLAYERS --
-----------------
-----------------
-- Displayer are objects attached to instance in the scenario
-- They react to modification events (creations of new objects such as nps, groups ...)
-- and update their display accordingly
-- There is zero or one displayer attac... | agpl-3.0 |
airsalliance/gateway_implementation_demo | proxy_configs/get_token.lua | 1 | 2106 | local cjson = require 'cjson'
local redis = require 'resty.redis'
local ts = require 'threescale_utils'
local red = redis:new()
function check_client_secret(client_id, secret)
local res = ngx.location.capture("/_threescale/client_secret_matches",
{ vars = { client_id = client_id }})
local real_secret = res.b... | mit |
peterfox/proxmark3 | client/lualibs/hf_reader.lua | 20 | 5955 | --[[
THIS IS WORK IN PROGREESS, very much not finished.
This library utilises other libraries under the hood, but can be used as a generic reader for 13.56MHz tags.
]]
local reader14443A = require('read14a')
local cmds = require('commands')
local TIMEOUT = 1000
local function sendToDevice(command, ignoreresponse)
... | gpl-2.0 |
krstal/CrYsTaL | crystal/utils.lua | 74 | 30284 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.l... | gpl-2.0 |
ld-test/lua-parser | lua-parser/parser.lua | 2 | 27459 | --[[
This module implements a parser for Lua 5.2 with LPeg,
and generates an Abstract Syntax Tree in the Metalua format.
For more information about Metalua, please, visit:
https://github.com/fab13n/metalua-parser
block: { stat* }
stat:
`Do{ stat* }
| `Set{ {lhs+} {expr+} } -- lhs1, lhs2... = e1... | mit |
emptyrivers/WeakAuras2 | WeakAurasTemplates/TriggerTemplatesData.lua | 1 | 368686 | local WeakAuras = WeakAuras
local L = WeakAuras.L
local GetSpellInfo, tinsert, GetItemInfo, GetSpellDescription, C_Timer, Spell = GetSpellInfo, tinsert, GetItemInfo, GetSpellDescription, C_Timer, Spell
-- The templates tables are created on demand
local templates =
{
class = { },
race = {
Human = {},
... | gpl-2.0 |
MmxBoy/Metal-bot | 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 |
xinjuncoding/skynet | lualib/mqueue.lua | 115 | 1798 | -- This is a deprecated module, use skynet.queue instead.
local skynet = require "skynet"
local c = require "skynet.core"
local mqueue = {}
local init_once
local thread_id
local message_queue = {}
skynet.register_protocol {
name = "queue",
-- please read skynet.h for magic number 8
id = 8,
pack = skynet.pack,
u... | mit |
samuelctabor/ardupilot | libraries/AP_Scripting/examples/param_get_set_test.lua | 15 | 2308 | -- This script is a test of param set and get
local count = 0
-- for fast param acess it is better to get a param object,
-- this saves the code searching for the param by name every time
local VM_I_Count = Parameter()
if not VM_I_Count:init('SCR_VM_I_COUNT') then
gcs:send_text(6, 'get SCR_VM_I_COUNT failed')
end
-... | gpl-3.0 |
osgcc/ryzom | ryzom/common/data_common/r2/r2_ui_tools.lua | 3 | 6897 | ----------
-- TOOL --
----------
-- Manage display of current selected tool into the ui
------------------------------------------------------------------------------------------------------------
-- base Name for the tool bar in the ui
local toolBarPath = "ui:interface:r2ed_toolbar:"
local geoToolPath = "ui:interf... | agpl-3.0 |
MmxBoy/mmxanti2 | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
vzaramel/kong | kong/tools/faker.lua | 4 | 3209 | local Object = require "classic"
local Faker = Object:extend()
function Faker:new(dao_factory)
self.dao_factory = dao_factory
end
-- Generate a fake entity.
-- @param `type` Type of the entity to generate.
-- @return An valid entity (a table) complying to the defined schema.
function Faker:fake_entity(type... | apache-2.0 |
vorbi123/larnog | 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 |
mamadantimageeee/antimage | 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 |
cjshmyr/OpenRA | mods/d2k/maps/atreides-03b/atreides03b-AI.lua | 2 | 1514 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/applications/luci-coovachilli/luasrc/model/cbi/coovachilli_network.lua | 11 | 1695 | --[[
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... | gpl-2.0 |
kaumanns/DeepKaspar | src/lua/deprecated/train_old.lua | 1 | 15714 |
--[[
This file trains a character-level multi-layer RNN on text data
Code is based on implementation in
https://github.com/oxford-cs-ml-2015/practical6
but modified to have multi-layer support, GPU support, as well as
many other common model/optimization bells and whistles.
The practical6 code is in turn based on
... | mit |
m-creations/openwrt | feeds/luci/modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua | 74 | 1261 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.mini.index", package.seeall)
function index()
local root = node()
if not root.lock then
root.target = alias("mini")
root.index =... | gpl-2.0 |
m-creations/openwrt | feeds/luci/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/system.lua | 78 | 2244 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.sys")
require("luci.sys.zoneinfo")
require("luci.tools.webadmin")
require("luci.util")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device li... | gpl-2.0 |
drystone/plugin-rabbitmq | index.lua | 1 | 6029 | local boundary = require("boundary")
local timer = require("timer")
local http = require("http")
local json = require("json")
local fs = require("fs")
local authKey, stats, conversions, requests, param
-- base64
-- encoding username and password for basic auth
function base64(data)
local b='ABCDEFGHIJKLMNOPQRSTUV... | apache-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua | 12 | 1087 | --[[
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: smap_devinfo.lua 5448 2009-10... | gpl-2.0 |
m-creations/openwrt | feeds/luci/modules/luci-base/luasrc/ltn12.lua | 84 | 8954 | --[[
LuaSocket 2.0.2 license
Copyright � 2004-2007 Diego Nehab
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... | gpl-2.0 |
attila-lendvai/openwrt-packages-feed | net/luci-app-clamav/files/model/cbi/clamav-cbi.lua | 100 | 6776 | --[[
LuCI ClamAV module
Copyright (C) 2015, Itus Networks, Inc.
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
Author: Marko Ratkaj <marko.ratkaj@sar... | gpl-2.0 |
aryajur/luarocks | src/luarocks/type_check.lua | 14 | 11451 | --- Type-checking functions.
-- Functions and definitions for doing a basic lint check on files
-- loaded by LuaRocks.
--module("luarocks.type_check", package.seeall)
local type_check = {}
package.loaded["luarocks.type_check"] = type_check
local cfg = require("luarocks.cfg")
local deps = require("luarocks.deps")
type... | mit |
spark51/spark_robot | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
m-creations/openwrt | feeds/routing/bird-openwrt/bird6-openwrt/src/model/bgp_proto.lua | 7 | 9952 | --[[
Copyright (C) 2014 - Eloi Carbó Solé (GSoC2014)
BGP/Bird integration with OpenWRT and QMP
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) a... | gpl-2.0 |
m-creations/openwrt | feeds/routing/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/advanced.lua | 18 | 2129 | --[[
Copyright (C) 2011 Pau Escrich <pau@dabax.net>
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.
Th... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/libs/ipkg/luasrc/model/ipkg.lua | 3 | 5555 | --[[
LuCI - Lua Configuration Interface
(c) 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
(c) 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.apach... | gpl-2.0 |
fwmechanic/k_edit | pdconv.lua | 1 | 3873 | --
-- Copyright 2015 by Kevin L. Goodwin [fwmechanic@gmail.com]; All rights reserved
--
-- This file is part of K.
--
-- K 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 Licen... | gpl-3.0 |
rollokb/tsdemuxer | xupnpd/src/plugins/staff/xupnpd_orttv.lua | 6 | 2630 | -- smorygo.philipp at gmail.com
-- Licensed under GNU GPL version 2
-- https://www.gnu.org/licenses/gpl-2.0.html
-- Uses 'si' parameter of http://www.1tv.ru/sprojects/si=5685
-- config example
-- feeds =
-- {
-- { "orttv", "5685", "Пусть говорят" },
-- }
function orttv_updatefeed(feed,friendly_name)
local rc... | mit |
weitjong/Urho3D | bin/Data/LuaScripts/48_Hello3DUI.lua | 19 | 9612 | -- A 3D UI demonstration based on the HelloGUI sample. Renders UI alternatively
-- either to a 3D scene object using UIComponent, or directly to the backbuffer.
require "LuaScripts/Utilities/Sample"
local window = nil
local dragBeginPosition = IntVector2(0, 0)
local textureRoot = nil
local current = nil
local renderO... | mit |
golgote/neturl | tests/url_test.lua | 1 | 8962 | #!/usr/bin/env lua
require 'Test.More'
local url = require 'net.url'
local s
local q
plan(134)
local u = url.parse("http://www.example.com")
u.query.net = "url"
is("http://www.example.com/?net=url", tostring(u), "Test new query variable")
u.query.net = "url 2nd try"
is("net=url%202nd%20try", tostring(u.query), "Te... | mit |
MmxBoy/test2 | plugins/reddit.lua | 11 | 1605 | do
local function run(msg, matches)
-- comment this line if you want reddit.lua works in private message.
if not is_chat_msg(msg) then return nil end
if is_chat_msg(msg) then
thread_limit = 5
else
thread_limit = 8
end
if matches[1] then
if matches[1]:match('^r/') then
... | gpl-2.0 |
werpat/MoonGen | rfc2544/benchmarks/backtoback.lua | 9 | 13123 | 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 filter ... | mit |
vzaramel/kong | spec/plugins/key-auth/access_spec.lua | 1 | 7260 | local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local cjson = require "cjson"
local STUB_GET_URL = spec_helper.STUB_GET_URL
local STUB_POST_URL = spec_helper.STUB_POST_URL
describe("Authentication Plugin", function()
setup(function()
spec_helper.prepare_db()... | apache-2.0 |
vzaramel/kong | spec/plugins/rate-limiting/daos_spec.lua | 7 | 3636 | local spec_helper = require "spec.spec_helpers"
local timestamp = require "kong.tools.timestamp"
local uuid = require "uuid"
local env = spec_helper.get_env()
local dao_factory = env.dao_factory
local ratelimiting_metrics = dao_factory.ratelimiting_metrics
describe("Rate Limiting Metrics", function()
local api_id =... | apache-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/libs/nixio/lua/nixio/util.lua | 179 | 5824 | --[[
nixio - Linux I/O library for lua
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
local... | gpl-2.0 |
cjshmyr/OpenRA | mods/cnc/maps/gdi03/gdi03.lua | 7 | 4075 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
deepak78/new-luci | applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | 16 | 15065 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool", package.seeall)
require("luci.statistics.datatree")
require("luci.statistics.rrdtool.colors")
require("luci.statistics.i18n")
require("luci.model.uci")
requi... | apache-2.0 |
mofax/cardpeek | dot_cardpeek_dir/scripts/lib/strict.lua | 17 | 1194 | ------------------------------------------------------------
-- NOTE: This file was taken from the LUA 5.1 distribution
-- It is public domain
------------------------------------------------------------
--
-- strict.lua
-- checks uses of undeclared global variables
-- All global variables must be 'declared' thr... | gpl-3.0 |
masterweb121/telegram-bot | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
spark51/spark_robot | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
Eugene-Ye/fanclub | app/routes/comment.lua | 1 | 3792 | local pairs = pairs
local ipairs = ipairs
local ssplit = string.split
local tconcat = table.concat
local tinsert = table.insert
local lor = require("lor.index")
local utils = require("app.libs.utils")
local user_model = require("app.model.user")
local topic_model = require("app.model.topic")
local comment_model = requi... | mit |
superwow/mangos-tbc | dep/recastnavigation/RecastDemo/premake4.lua | 82 | 3551 | --
-- premake4 file to build RecastDemo
-- http://industriousone.com/premake
--
local action = _ACTION or ""
local todir = "Build/" .. action
solution "recastnavigation"
configurations {
"Debug",
"Release"
}
location (todir)
-- extra warnings, no exceptions or rtti
flags {
"ExtraWarnings",
"FloatFast"... | gpl-2.0 |
xordspar0/synthein | src/world/shipparts/hull.lua | 1 | 2079 | local Draw = require("world/draw")
local PhysicsReferences = require("world/physicsReferences")
local Hull = class()
function Hull:__create(imageName, maxHealth)--, connectableSides)
self.health = maxHealth
self.maxHealth = maxHealth
self.isDestroyed = false
local userData = {}
userData.draw = Draw.createPar... | gpl-3.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/contrib/luadoc/lua/luadoc/util.lua | 93 | 5826 | -------------------------------------------------------------------------------
-- General utilities.
-- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $
-------------------------------------------------------------------------------
local posix = require "nixio.fs"
local type, table, string, io, as... | gpl-2.0 |
pavel-odintsov/snabbswitch | src/core/counter.lua | 13 | 3265 | -- counter.lua - Count discrete events for diagnostic purposes
--
-- This module provides a thin layer for representing 64-bit counters
-- as shared memory objects.
--
-- Counters let you efficiently count discrete events (packet drops,
-- etc) and are accessible as shared memory from other processes such
-- as monito... | apache-2.0 |
ImagicTheCat/vRP | vrp/lib/ELProfiler.lua | 1 | 6895 | -- https://github.com/ImagicTheCat/ELProfiler
-- MIT license (see LICENSE or src/ELProfiler.lua)
--[[
MIT License
Copyright (c) 2019 ImagicTheCat
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 w... | mit |
rkunze/openwrt-packages | net/acme/files/acme-cbi.lua | 20 | 3086 | --[[
LuCI - Lua Configuration Interface
Copyright 2016 Toke Høiland-Jørgensen <toke@toke.dk>
# 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... | gpl-2.0 |
emptyrivers/WeakAuras2 | WeakAuras/BuffTrigger2.lua | 1 | 101601 | --[[ BuffTrigger2.lua
This file contains the "aura2" trigger for buffs and debuffs. It is intended to replace
the buff trigger old BuffTrigger at some future point
It registers the BuffTrigger table for the trigger type "aura2" and has the following API:
Add(data)
Adds an aura, setting up internal data structures for... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/libs/lucid-rpc/luasrc/lucid/rpc.lua | 52 | 1197 | --[[
LuCI - Lua Development Framework
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]
local re... | gpl-2.0 |
amohanta/rspamd | src/plugins/lua/hfilter.lua | 2 | 15558 | --[[
Copyright (c) 2011-2015, Vsevolod Stakhov <vsevolod@highsecure.ru>
Copyright (c) 2013-2015, Alexey Savelyev <info@homeweb.ru>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of s... | bsd-2-clause |
cjshmyr/OpenRA | mods/cnc/maps/nod03a/nod03a.lua | 7 | 2864 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
Ennea/eUI | eActionBindings/libs/LibKeyBound-1.0/Locale-esES.lua | 2 | 2368 | --[[
LibKeyBound-1.0 localization file
Spanish by StiviS
--]]
if (GetLocale() ~= "esES") then
return
end
local REVISION = 90000 + tonumber(string.match("$Revision: 92 $", "%d+"))
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
return
end
LibKeyBoundLocale10 = {
REVISION = REVISION;
... | mit |
emptyrivers/WeakAuras2 | WeakAuras/SubRegionTypes/Border.lua | 1 | 2303 | if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local default = function(parentType)
local options = {
border_visible = true,
border_color = {1, 1, 1, 1},
border_edge = "Square Full White",
b... | gpl-2.0 |
Murfalo/game-off-2016 | modules/ModIrresistable.lua | 1 | 1295 | local ModIrresistable = Class.create("ModIrresistable", Entity)
ModIrresistable.dependencies = {"ModPartEmitter", "ModInteractive"}
ModIrresistable.trackFunctions = {"onCollide"}
-- ModIrresistable.removable = true
function ModIrresistable:create()
-- self:addEmitter("fire" , "assets/spr/fire.png")
-- self:setRando... | mit |
deepak78/new-luci | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/network.lua | 20 | 2738 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("luci_statistics",
translate("Network Plugin Configuration"),
translate(
"The network plugin provides network based communication between " ..
"different collectd instances. Coll... | apache-2.0 |
CtopCsUtahEdu/chill-dev | examples/cuda-chill/coo.lua | 1 | 2599 | init("spmv.cpp", "spmv", 0)
dofile("cudaize.lua")
NNZ=1666
N=494
Ti = 1024
Tj = 256
Tk = 32
PAD_FACTOR=64
TILE_FACTOR_FOR_2ND_LEVEL = Tj
segment = "c.i"
shared_memory=1
NO_PAD=0
ASSIGN_THEN_ACCUMULATE=1
stmt_to_reduce = {}
--flatten loop levels 1 and 2 with NNZ being uninterpreted omega function name
first_kernel = co... | gpl-3.0 |
atelierbram/syntax-highlighting | docs/archive/atelier-schemes/output/textadept/base16-atelierdune-dark.lua | 2 | 4203 | -- Atelier Dune theme for Textadept
-- Theme author: Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
-- Base16 (https://github.com/chriskempson/base16)
-- Build with Base16 Builder (https://github.com/chriskempson/base16-builder)
-- Repository: https://github.com/rgieseke/ta-themes
... | mit |
topkecleon/otouto | otouto/plugins/admin/deadmin.lua | 1 | 1277 | --[[
deadmin.lua
Copyright 2018 topkecleon <drew@otou.to>
This code is licensed under the GNU AGPLv3. See /LICENSE for details.
]]--
local utilities = require('otouto.utilities')
local autils = require('otouto.autils')
local P = {}
function P:init(bot)
self.triggers = utilities.triggers(bot.info.user... | agpl-3.0 |
KNIGHTTH0R/uzz | bot/utils.lua | 2 | 15094 | 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 |
jozadaquebatista/textadept | modules/ansi_c/init.lua | 1 | 6584 | -- Copyright 2007-2015 Mitchell mitchell.att.foicica.com. See LICENSE.
local M = {}
--[[ This comment is for LuaDoc.
---
-- The ansi_c module.
-- It provides utilities for editing C code.
--
-- ## Key Bindings
--
-- + `Shift+Enter` (`⇧↩` | `S-Enter`)
-- Add ';' to the end of the current line and insert a newline.
m... | mit |
emptyrivers/WeakAuras2 | WeakAuras/Libs/LibDeflate/LibDeflate.lua | 5 | 119252 | --[[--
LibDeflate 1.0.0-release <br>
Pure Lua compressor and decompressor with high compression ratio using
DEFLATE/zlib format.
@file LibDeflate.lua
@author Haoqian He (Github: SafeteeWoW; World of Warcraft: Safetyy-Illidan(US))
@copyright LibDeflate <2018> Haoqian He
@license GNU General Public License Version 3 or ... | gpl-2.0 |
masterweb121/telegram-bot | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- 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 |
attila-lendvai/openwrt-packages-feed | utils/luci-app-lxc/files/controller/lxc.lua | 77 | 2909 | --[[
LuCI LXC module
Copyright (C) 2014, Cisco Systems, Inc.
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
Author: Petar Koretic <petar.koretic@sart... | gpl-2.0 |
deepak78/new-luci | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua | 50 | 4887 | -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local nw = require "luci.model.network"
local fw = require "luci.model.firewall"
local uci = require "luci.model.uci".cursor()
local http = require "luci.http"
local iw = lu... | apache-2.0 |
xinjuncoding/skynet | examples/login/msgagent.lua | 58 | 1165 | local skynet = require "skynet"
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
unpack = skynet.tostring,
}
local gate
local userid, subid
local CMD = {}
function CMD.login(source, uid, sid, secret)
-- you may use secret to make a encrypted data stream
skynet.error(string.format("%s is lo... | mit |
Ennea/eUI | eActionBars/libs/LibKeyBound-1.0/Locale-ruRU.lua | 2 | 2731 | --[[
KeyBound localization file
Russian by ?
--]]
if (GetLocale() ~= "ruRU") then
return
end
local REVISION = 90000 + tonumber(string.match("$Revision: 92 $", "%d+"))
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
return
end
LibKeyBoundLocale10 = {
REVISION = REVISION;
Enabled = '... | mit |
xinjuncoding/skynet | test/testpipeline.lua | 27 | 1255 | local skynet = require "skynet"
local redis = require "redis"
local conf = {
host = "127.0.0.1",
port = 6379,
db = 0
}
local function read_table(t)
local result = { }
for i = 1, #t, 2 do result[t[i]] = t[i + 1] end
return result
end
skynet.start(function()
local db = redis.connect(conf)
db.pipelini... | mit |
pavel-odintsov/snabbswitch | src/lib/protocol/tcp.lua | 5 | 4120 | module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local header = require("lib.protocol.header")
local ipsum = require("lib.checksum").ipsum
local tcp_header_t = ffi.typeof[[
struct {
uint16_t src_port;
uint16_t dst_port;
uint32_t seq;
uint32_t ... | apache-2.0 |
m-creations/openwrt | feeds/luci/modules/luci-base/luasrc/sys/iptparser.lua | 47 | 9515 | --[[
Iptables parser and query library
(c) 2008-2009 Jo-Philipp Wich <jow@openwrt.org>
(c) 2008-2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:... | gpl-2.0 |
mofax/cardpeek | dot_cardpeek_dir/scripts/lib/en1545.lua | 16 | 7123 | --
-- This file is part of Cardpeek, the smartcard reader utility.
--
-- Copyright 2009-2013 by 'L1L1'
--
-- Cardpeek 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
-- (a... | gpl-3.0 |
osgcc/ryzom | ryzom/common/data_common/r2/r2_ui_lua_inspector.lua | 3 | 7548 |
------------------------------------------------------------------------------------------------------------
-- Create interface for inspecting a lua table
-- The resultat is displayedin a tree control in the UI
-- Also support display of reflected objects (interface group & widgets etc.)
-- TODO place this elsewhere... | agpl-3.0 |
sajjad94/ASD_KARBALA | plugins/en-plugins.lua | 6 | 6817 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY SAJJAD NOORI ▀▄ ▄▀
▀▄ ▄▀ BY SAJAD NOORI (@SAJJADNOORI) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY SAJJAD NOORI ▀▄ ▄▀
▀▄ ▄▀ plugins : تفعيل الملفات ▀▄ ▄▀
▀▄▀... | gpl-2.0 |
pavel-odintsov/snabbswitch | src/lib/checksum.lua | 8 | 8063 | module(...,package.seeall)
-- This module exposes the interface:
-- checksum.ipsum(pointer, length, initial) => checksum
--
-- pointer is a pointer to an array of data to be checksummed. initial
-- is an unsigned 16-bit number in host byte order which is used as
-- the starting value of the accumulator. The result ... | apache-2.0 |
frodrigo/osrm-backend | profiles/testbot.lua | 2 | 4221 | -- Testbot profile
-- Moves at fixed, well-known speeds, practical for testing speed and travel times:
-- Primary road: 36km/h = 36000m/3600s = 100m/10s
-- Secondary road: 18km/h = 18000m/3600s = 100m/20s
-- Tertiary road: 12km/h = 12000m/3600s = 100m/30s
TrafficSignal = require("lib/traffic_signal")
api_version =... | bsd-2-clause |
otland/forgottenserver | data/scripts/actions/others/surprise_cube.lua | 7 | 2266 | local config = {
{chanceFrom = 0, chanceTo = 1450, itemId = 2152, count = 5}, -- platinum coin
{chanceFrom = 1451, chanceTo = 2850, itemId = 18421}, -- green crystal fragment
{chanceFrom = 2851, chanceTo = 3950, itemId = 18419}, -- cyan crystal fragment
{chanceFrom = 3951, chanceTo = 5050, itemId = 18420}, -- red c... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/libs/sys/luasrc/sys/zoneinfo/tzdata.lua | 4 | 16812 | --[[
LuCI - Autogenerated Zoneinfo Module
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.sys.zoneinfo.tzdata"
TZ = {
{ 'Africa/Abi... | gpl-2.0 |
ziz/solarus | quests/zsdx/data/enemies/bubble.lua | 2 | 1739 | -- Bubble: an invincible enemy that moves in diagonal directions and bounces against walls.
-- It removes life and magic points from the hero.
last_direction8 = 0
-- The enemy appears: set its properties
function event_appear()
sol.enemy.set_life(1)
sol.enemy.set_damage(2)
sol.enemy.set_magic_damage(4)
sol.e... | gpl-3.0 |
deepak78/new-luci | protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua | 72 | 2039 | -- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ipaddr, peeraddr, ip6addr, tunnelid, username, password
local defaultroute, metric, ttl, mtu
ipaddr = s:taboption("general", Value, "ipaddr",
translate("Local IPv4 ad... | apache-2.0 |
m-creations/openwrt | feeds/luci/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua | 72 | 2039 | -- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ipaddr, peeraddr, ip6addr, tunnelid, username, password
local defaultroute, metric, ttl, mtu
ipaddr = s:taboption("general", Value, "ipaddr",
translate("Local IPv4 ad... | gpl-2.0 |
deepak78/new-luci | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua | 57 | 1951 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.processes", package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
return {
{
title = "%H: Processes",
vlabel = "Proce... | apache-2.0 |
antoniuslin/canvas-lms | lib/canvas/request_throttle/increment_bucket.lua | 43 | 1169 | local cache_key = KEYS[1]
local amount = tonumber(ARGV[1])
local current_time = tonumber(ARGV[2])
local outflow = tonumber(ARGV[3])
local maximum = tonumber(ARGV[4])
-- Our modified leaky bucket algorithm is explained in lib/canvas/request_throttle.rb
local leak = function(count, last_touched, current_time, outflow)
... | agpl-3.0 |
Crazy-Duck/junglenational | game/dota_addons/junglenational/scripts/vscripts/libraries/abilities/containers_lua_targeting.lua | 1 | 6190 | containers_lua_targeting = class({})
--------------------------------------------------------------------------------
function containers_lua_targeting:GetBehavior()
local result = CustomNetTables:GetTableValue("containers_lua", tostring(self:entindex()))
if not result then return self.BaseClass.GetBehavior(self) ... | mit |
xinjuncoding/skynet | lualib/dns.lua | 23 | 8758 | --[[
lua dns resolver library
See https://github.com/xjdrew/levent/blob/master/levent/dns.lua for more detail
-- resource record type:
-- TYPE value and meaning
-- A 1 a host address
-- NS 2 an authoritative name server
-- MD 3 a mail destination (Obsolete - use MX... | mit |
JodliDev/DsMMO | mod_client/scripts/widgets/levelbadge.lua | 1 | 2467 | local Badge = require "widgets/badge"
local UIAnim = require "widgets/uianim"
local ImageButton = require "widgets/imagebutton"
local Action_levels = require "widgets/action_levels"
local LevelBadge = Class(Badge, function(self, t, owner)
Badge._ctor(self, t, owner)
self._action_levels = nil
--local t = self:... | apache-2.0 |
cjshmyr/OpenRA | mods/ra/maps/soviet-06b/soviet06b.lua | 7 | 4629 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
alirezanile/Newsha | bot/nod32bot.lua | 1 | 11894 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '2'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return... | gpl-2.0 |
topkecleon/otouto | otouto/plugins/admin/filterer.lua | 1 | 1978 | --[[
filterer.lua
Copyright 2018 topkecleon <drew@otou.to>
This code is licensed under the GNU AGPLv3. See /LICENSE for details.
]]--
local bindings = require('extern.bindings')
local autils = require('otouto.autils')
local utilities = require('otouto.utilities')
local rot13 = require('otouto.rot13')
loca... | agpl-3.0 |
m-creations/openwrt | feeds/luci/applications/luci-app-ddns/luasrc/controller/ddns.lua | 29 | 7451 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2013 Manuel Munz <freifunk at somakoma dot de>
-- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed to the public under the Apache License 2.0.
module("luci.c... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.