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 |
|---|---|---|---|---|---|
SweetherTM/Sweether-Cli | 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 |
samijon/anti | 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 |
ryanplusplus/xlua | exercises/tournament/tournament_spec.lua | 3 | 6025 | local tournament = require 'tournament'
describe('tournament', function()
it('should generate standings for a complete competition', function()
local results = {
'Allegoric Alaskans;Blithering Badgers;win',
'Devastating Donkeys;Courageous Californians;draw',
'Devastating Donkeys;Allegoric Alask... | mit |
chuckbutler/telegram-bot | plugins/img_google.lua | 3 | 1027 | do
function getGoogleImage(text)
local text = URL.escape(text)
local api = "https://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&q="
local res, code = http.request(api..text)
if code ~= 200 then return nil end
local google = json:decode(res)
if google.responseStatus ~= 200 then
return n... | gpl-2.0 |
LinusU/nn | hessian.lua | 33 | 15791 | ----------------------------------------------------------------------
-- hessian.lua: this file appends extra methods to modules in nn,
-- to estimate diagonal elements of the Hessian. This is useful
-- to condition learning rates individually.
----------------------------------------------------------------------
nn.... | bsd-3-clause |
golem1381/golem_b | 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 |
LinusU/nn | SpatialUpSamplingNearest.lua | 36 | 1914 | local SpatialUpSamplingNearest, parent = torch.class('nn.SpatialUpSamplingNearest', 'nn.Module')
--[[
Applies a 2D up-sampling over an input image composed of several input planes.
The upsampling is done using the simple nearest neighbor technique.
The Y and X dimensions are assumed to be the last 2 tensor dimension... | bsd-3-clause |
lowne/hammerspoon | extensions/drawing/color/init.lua | 6 | 24586 | local module = require("hs.drawing.color.internal")
--- === hs.drawing.color ===
---
--- Additions to hs.drawing which provide access to the system color lists and a wider variety of ways to represent color within Hammerspoon.
---
--- Color is represented within Hammerspoon as a table containing keys which tell Hammer... | mit |
jchuang1977/my_luci | libs/nixio/docsrc/nixio.TLSSocket.lua | 173 | 2926 | --- TLS Socket Object.
-- TLS Sockets contain the underlying socket and context in the fields
-- "socket" and "context".
-- @cstyle instance
module "nixio.TLSSocket"
--- Initiate the TLS handshake as client with the server.
-- @class function
-- @name TLSSocket.connect
-- @usage This function calls SSL_connect().
-- @... | apache-2.0 |
ld-test/concurrentlua | src/concurrent/message.lua | 2 | 1028 | -- Submodule for passing messages.
module('concurrent._message', package.seeall)
require 'cltime'
mailboxes = {} -- Mailboxes associated with processes.
-- Sends a messages to a process, actually, inserts it to the destination
-- mailbox. Returns true if successful and false otherwise.
function sen... | mit |
ArchShaman/Zero-K | scripts/striderhub.lua | 10 | 1369 | include "constants.lua"
include "nanoaim.h.lua"
--pieces
local body = piece "body"
local aim = piece "aim"
local emitnano = piece "emitnano"
--local vars
local smokePiece = { piece "aim", piece "body" }
local nanoPieces = { piece "aim" }
local nanoTurnSpeedHori = 0.5 * math.pi
local nanoTurnSpeedVert = 0.3 * math.pi... | gpl-2.0 |
rashed8271/bot | lang/spanish_lang.lua | 32 | 20518 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
mixflowtech/logsensor | lib/pflua/src/pf/types.lua | 22 | 2148 | module(...,package.seeall)
local ffi = require("ffi")
-- PCAP file format: http://wiki.wireshark.org/Development/LibpcapFileFormat/
ffi.cdef[[
struct pcap_file {
/* file header */
uint32_t magic_number; /* magic number */
uint16_t version_major; /* major version number */
uint16_t version_minor; /... | apache-2.0 |
Maxsteam/Test | 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, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
ioiasff/poi | 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, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
galnegus/Glaskross | gamestate/Menu.lua | 1 | 1561 | local MenuList = require "gui.menu.MenuList"
local World = require "World"
local Constants = require "constants.Constants"
menu = {}
function menu:init()
self.collider = HC.new() -- don't use HC in menu or else game objects will try to collide with this
self._menuList = MenuList()
self._menuList:add("start", f... | mit |
ArchShaman/Zero-K | LuaRules/Gadgets/unit_jumpjets.lua | 2 | 21183 | function gadget:GetInfo()
return {
name = "Jumpjets",
desc = "Gives units the jump ability",
author = "quantum",
date = "May 14, 2008", --last update 2015-05-05
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true,
}
end
if (not gadgetHandler:IsSyncedCode()) then return end
... | gpl-2.0 |
DBReinitialized/PigBot | Source/deps/discordia/voice/AudioStream.lua | 3 | 2029 | local Stopwatch = require('../utils/Stopwatch')
local constants = require('./constants')
local timer = require('timer')
local max = math.max
local sleep = timer.sleep
local running, resume, yield = coroutine.running, coroutine.resume, coroutine.yield
local SILENCE = constants.SILENCE
local PCM_LEN = constants.PCM_LEN... | mit |
mixflowtech/logsensor | 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 |
galnegus/Glaskross | lib/sperm/loveframes/skins/Snap/color.lua | 5 | 3421 | local meta = {__index = function(table, key)
local value = getfenv(0)[key]
rawset(table, key, value)
return value
end}
local env = setmetatable({},meta)
setfenv(1, env)
-- // Additional math functions // --
local function clamp(low, n, high) return math.min(math.max(low, n), high) end
-- // Color converting // --
... | mit |
erwincoumans/premake-dev-iphone-xcode4 | tests/test_platforms.lua | 59 | 1601 | --
-- tests/test_platforms.lua
-- Automated test suite for platform handling functions.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
T.platforms = { }
local testmap = { Native="Win32", x32="Win32", x64="x64" }
local sln, r
function T.platforms.setup()
sln = solution "MySolution"
configura... | bsd-3-clause |
brahmi2/prosody-modules | mod_idlecompat/mod_idlecompat.lua | 35 | 1149 | -- Last User Interaction in Presence via Last Activity compatibility module
-- http://xmpp.org/extensions/xep-0319.html
-- http://xmpp.org/extensions/xep-0012.html
-- Copyright (C) 2014 Tobias Markmann
--
-- This file is MIT/X11 licensed.
local st = require "util.stanza";
local datetime = require "util.datetime";
loc... | mit |
brahmi2/prosody-modules | mod_rawdebug/mod_rawdebug.lua | 32 | 1337 | module:set_global();
local tostring = tostring;
local filters = require "util.filters";
local def_env = module:shared("admin_telnet/env");
local rawdebug_enabled = module:shared("sessions");
local full_sessions = prosody.full_sessions;
local log = module._log;
local rawdebug = {};
def_env.rawdebug = rawdebug;
local... | mit |
MNoya/Warchasers | game/dota_addons/warchasers/scripts/vscripts/sounds.lua | 1 | 2844 | --EmitGlobalSound(string a) --[[Returns:void Play named sound for all players]]
--StartSoundEvent(string a, handle b) --[[Returns:void Start a sound event]]
--StopSoundEvent(string a, handle b) --[[Returns:void Stops a sound event ]]
--Entity:StopSound(string soundName) --[[Returns:void Stops a named sound playing fro... | gpl-3.0 |
acmiyaguchi/data-pipeline | hindsight/input/telemetry_s3_bootstrap.lua | 2 | 6978 | -- 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/.
--[[
## Heka S3 telemetry data input plugin bootstrapper
This plugin:
1. retrieves a list of files from S3 matching... | mpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/api_chili_docking.lua | 5 | 13551 | local version = "v1.001"
function widget:GetInfo()
return {
name = "Chili Docking",
desc = version .." Provides docking and position saving for chili windows",
author = "Licho",
date = "@2010",
license = "GNU GPL, v2 or later",
layer = 50,
experimental = false,
... | gpl-2.0 |
amirquick/quick | 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 |
amirilk22333322/uzzbot | 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 |
bbohling/keys | VSCOKeys.lrdevplugin/halfway_server/copas.lua | 11 | 11779 | -------------------------------------------------------------------------------
-- Copas - Coroutine Oriented Portable Asynchronous Services
--
-- A dispatcher based on coroutines that can be used by TCP/IP servers.
-- Uses LuaSocket as the interface with the TCP/IP stack.
--
-- Authors: Andre Carregal and Javier Guerr... | gpl-2.0 |
alarouche/premake-core | tests/actions/vstudio/vc200x/test_debug_settings.lua | 9 | 2450 | --
-- tests/actions/vstudio/vc200x/test_debugdir.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_vs200x_debugdir")
local vc200x = premake.vstudio.vc200x
local project = premake.project
--
-- Se... | bsd-3-clause |
mertnuhoglu/dotfiles | .hammerspoon/init.lua | 1 | 5759 | local hyper = {"shift", "cmd", "alt"}
local zyper = {"shift", "alt"}
local zyperc = {"shift", "alt", "ctrl"}
local leftCorner = {"cmd", "ctrl", "shift"}
-----------------------------------------------
-- hyper d for left one half window
-----------------------------------------------
hs.hotkey.bind(hyper, "2... | cc0-1.0 |
piller187/LeadwerksComponentSystem | LcsSample/scripts/Objects/Physics/ImpactNoise.lua | 1 | 1609 | --[[-------------------------------------------------------------------
This is a simple script to provide an impact sound for a physically
interactive object.
]]---------------------------------------------------------------------
Script.soundfile1=""--path "Sound 1" "Wac file (*.wav):wav|Sound"
Script.soun... | gpl-3.0 |
jchuang1977/my_luci | applications/luci-asterisk/luasrc/asterisk.lua | 80 | 18044 | --[[
LuCI - Lua Configuration Interface
Asterisk PBX interface library
Copyright 2009 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/licen... | apache-2.0 |
blueluna/luaowt | logging/file.lua | 1 | 1312 | -------------------------------------------------------------------------------
-- Saves logging information in a file
--
-- @author Thiago Costa Ponte (thiago@ideais.com.br)
--
-- @copyright 2004-2011 Kepler Project
--
-------------------------------------------------------------------------------
require"logging"
l... | mit |
zaeem998/Bollywood1 | 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 |
telergybot/gpmngr | 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 |
d9magai/freeciv | data/multiplayer/script.lua | 2 | 5742 | -- Freeciv - Copyright (C) 2007 - The Freeciv Project
-- 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, or (at your option)
-- any later version.
--
-- This program ... | gpl-2.0 |
qyli/test | lualib/redis.lua | 5 | 5083 | local skynet = require "skynet"
local socket = require "socket"
local socketchannel = require "socketchannel"
local int64 = require "int64"
local table = table
local string = string
local redis = {}
local command = {}
local meta = {
__index = command,
-- DO NOT close channel in __gc
}
---------- redis response
loc... | mit |
bungle/lua-resty-session | lib/resty/session/ciphers/aes.lua | 1 | 2792 | local aes = require "resty.aes"
local setmetatable = setmetatable
local tonumber = tonumber
local ceil = math.ceil
local var = ngx.var
local sub = string.sub
local rep = string.rep
local HASHES = aes.hash
local CIPHER_MODES = {
ecb = "ecb",
cbc = "c... | bsd-2-clause |
starius/pasta | src/pasta/views/index.lua | 1 | 3228 | local Widget
Widget = require("lapis.html").Widget
local filesize = require("filesize")
local config = require("lapis.config").get()
local Index
do
local _class_0
local _parent_0 = Widget
local _base_0 = {
content = function(self)
return form({
method = "POST",
action = self:url_for("cre... | mit |
jchuang1977/my_luci | modules/admin-full/luasrc/controller/admin/system.lua | 24 | 10499 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-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... | apache-2.0 |
mixflowtech/logsensor | src/apps/lwaftr/binding_table.lua | 2 | 23862 | -- AFTR Binding Table
--
-- A binding table is a collection of softwires (tunnels). One endpoint
-- of the softwire is in the AFTR and the other is in the B4. A
-- softwire provisions an IPv4 address (or a part of an IPv4 address) to
-- a customer behind a B4. The B4 arranges for all IPv4 traffic to be
-- encapsulat... | apache-2.0 |
ArchShaman/Zero-K | LuaRules/Gadgets/dbg_profiler.lua | 4 | 16893 | -- $Id: dbg_profiler.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Profiler",
desc = "",
author =... | gpl-2.0 |
jchuang1977/my_luci | protocols/ipv6/luasrc/model/cbi/admin_network/proto_hnet.lua | 40 | 1492 | --[[
LuCI - Lua Configuration Interface
Copyright 2013 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
]]--
local map... | apache-2.0 |
brahmi2/prosody-modules | mod_saslauth_muc/mod_saslauth_muc.lua | 32 | 5541 | --
-- mod_saslauth_muc
-- This module implements http://xmpp.org/extensions/inbox/remote-auth.html for Prosody's MUC component
--
-- In your config:
-- Component "conference.example.com" "muc"
-- modules_enabled = { "saslauth_muc" };
--
--
local timeout = 60; -- SASL timeout in seconds
-- various imports
lo... | mit |
PrimeNumb/SimulationCraft-Addon-Extended | Simulationcraft/core.lua | 1 | 16141 | local _, Simulationcraft = ...
Simulationcraft = LibStub("AceAddon-3.0"):NewAddon(Simulationcraft, "Simulationcraft", "AceConsole-3.0", "AceEvent-3.0")
local OFFSET_ITEM_ID = 1
local OFFSET_ENCHANT_ID = 2
local OFFSET_GEM_ID_1 = 3
local OFFSET_GEM_ID_2 = 4
local OFFSET_GEM_ID_3 = 5
local OFFSET_GEM_ID_4 = 6
... | gpl-3.0 |
ashemedai/ProDBG | bin/win32/scripts/tundra/tools/dotnet.lua | 28 | 1125 | module(..., package.seeall)
local frameworkDir = "c:\\Windows\\Microsoft.NET\\Framework"
local defaultFrameworkVersion = "v3.5"
function apply(env, options)
tundra.unitgen.load_toolset("generic-dotnet", env)
local version = options and assert(options.Version) or defaultFrameworkVersion
env:set_external_env_var... | mit |
DigitalCrypto/scite-mql | api/additions/UpdateStatusBar.lua | 2 | 2631 | ------------------------------------------------------------------------------------------------------
-- UpdateStatusBar.lua --
--[[--------------------------------------------------------------------------------------------------
-- --
-- Description (Requires: Script Manage... | isc |
abasshacker/abas0 | plugins/plugins.lua | 134 | 6165 | 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 |
focusworld/big | 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 |
ktosiu/nodemcu-firmware | lua_examples/webap_toggle_pin.lua | 70 | 1202 | wifi.setmode(wifi.SOFTAP);
wifi.ap.config({ssid="test",pwd="12345678"});
gpio.mode(1, gpio.OUTPUT)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive", function(client,request)
local buf = "";
local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP")... | mit |
hugohuang1111/quick-ui | src/UILoadingBar.lua | 3 | 3713 |
--[[
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 |
piller187/LeadwerksComponentSystem | LcsSample/scripts/GUI/Button.lua | 1 | 6006 | --Styles
if Style==nil then Style={} end
if Style.Button==nil then Style.Button={} end
Style.Button.Push=8
Style.Button.Checkbox=2
Style.Button.Radio=3
Style.Button.OK=4
Style.Button.Cancel=5
--Style.Button.Label=16
--Default values
Script.pushed=false
Script.hovered=false
Script.textindent=4
Script.chec... | gpl-3.0 |
mixflowtech/logsensor | src/program/snabbvmx/nexthop/nexthop.lua | 2 | 1709 | module(..., package.seeall)
local S = require("syscall")
local ethernet = require("lib.protocol.ethernet")
local ffi = require("ffi")
local lib = require("core.lib")
local lwutil = require("apps.lwaftr.lwutil")
local shm = require("core.shm")
local file_exists = lwutil.file_exists
local macaddress_t = ffi.typeof[[
s... | apache-2.0 |
gmorishere/bsoeted | plugins/ingroup.lua | 11 | 27638 | do
local name_log = user_print_name(msg.from)
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
... | gpl-2.0 |
kesac/libtsl | libtsl/data.lua | 1 | 2197 | --[[
Copyright (c) 2012, 2015 Kevin Sacro
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 |
ArchShaman/Zero-K | LuaRules/Gadgets/mex_spot_finder.lua | 5 | 14088 |
function gadget:GetInfo()
return {
name = "Metalspot Finder Gadget",
desc = "Finds metal spots",
author = "Niobium, modified by Google Frog",
version = "v1.1",
date = "November 2010",
license = "GNU GPL, v2 or later",
layer = -math.huge + 5,
enabled = true
}
end
---------... | gpl-2.0 |
brahmi2/prosody-modules | mod_s2soutinjection/mod_s2soutinjection.lua | 32 | 1798 | local st = require"util.stanza";
local new_ip = require"util.ip".new_ip;
local new_outgoing = require"core.s2smanager".new_outgoing;
local bounce_sendq = module:depends"s2s".route_to_new_session.bounce_sendq;
local s2sout = module:depends"s2s".route_to_new_session.s2sout;
local injected = module:get_option("s2s_connec... | mit |
phi-psi/luci | protocols/ppp/luasrc/model/cbi/admin_network/proto_ppp.lua | 59 | 3761 | --[[
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
]]--
local ma... | apache-2.0 |
crazyboy11/orgbot | bot/utils.lua | 50 | 23977 | 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 |
amirilk22333322/uzzbot | bot/bot.lua | 2 | 7086 | 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 = '0.14.6'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
r... | gpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/gui_news_ticker.lua | 2 | 14906 | function widget:GetInfo()
return {
name = "News Ticker",
desc = "v1.012 Keeps you up to date on important battlefield events",
author = "KingRaptor",
date = "July 26, 2009",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = false -- loaded by default?
}
end
include("Widgets/COFCTools/ExportUtilit... | gpl-2.0 |
Lymia/CivV_Mod2DLC | src/patch/ui/hooks/common/protocol_resetleaders.lua | 3 | 1418 | -- Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.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, co... | mit |
ArchShaman/Zero-K | units/dynrecon1.lua | 5 | 2805 | unitDef = {
unitname = [[dynrecon1]],
name = [[Recon Commander]],
description = [[High Mobility Commander]],
acceleration = 0.25,
activateWhenBuilt = true,
brakeRate = 0.45,
buildCostMetal = 1200,
buildDistance = 144,
builder ... | gpl-2.0 |
jchuang1977/my_luci | applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config.lua | 80 | 1274 | --[[
LuCI - Lua Configuration Interface
(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.controller.l... | apache-2.0 |
ArchShaman/Zero-K | Objects3d/pw_mine3.dae.lua | 13 | 1325 | return {
--pieces = {
-- base = {
-- offset = {0.00, 0.00, 0.00},
--
-- fusionsphere = {
-- offset = {0.00, 95.77, 0.00},
--
-- coolerb1 = {
-- offset = {-24.65, 0.00, 24.65},
--
-- },
-- coolerb2 = {
-- offset = {24.65, 0.00, 24.65},
--
-- },
-- coolerb3 = {
-- offse... | gpl-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua | 3 | 1326 |
--------------------------------
-- @module TurnOffTiles
-- @extend TiledGrid3DAction
--------------------------------
-- @function [parent=#TurnOffTiles] turnOnTile
-- @param self
-- @param #cc.Vec2 vec2
--------------------------------
-- @function [parent=#TurnOffTiles] turnOffTile
-- @param self
-- @pa... | mit |
abasshacker/abas0 | plugins/Moderator_Gp.lua | 37 | 37415 | 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 |
DevFalcon/Falcon | bot/bot.lua | 1 | 7210 | 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'
bot_token = "HERE" -- توكن بوتك
send_api = "https://api.telegram.org/bot"..bot_token
sudo_id = 123841760 -- ايدي المطور
http = require('socket.http')
https = re... | gpl-3.0 |
dangersos/fffff | plugins/isup.lua | 741 | 3095 | do
local socket = require("socket")
local cronned = load_from_file('data/isup.lua')
local function save_cron(msg, url, delete)
local origin = get_receiver(msg)
if not cronned[origin] then
cronned[origin] = {}
end
if not delete then
table.insert(cronned[origin], url)
else
for k,v in pairs(cronned[... | gpl-2.0 |
goblinr/omim | 3party/pugixml/scripts/premake4.lua | 128 | 2376 | -- Reset RNG seed to get consistent results across runs (i.e. XCode)
math.randomseed(12345)
local static = _ARGS[1] == 'static'
local action = premake.action.current()
if string.startswith(_ACTION, "vs") then
if action then
-- Disable solution generation
function action.onsolution(sln)
sln.vstudio_configs = p... | apache-2.0 |
db260179/openwrt-bpi-r1-packages | utils/yunbridge/files/usr/lib/lua/luci/sha256.lua | 106 | 5170 | --
-- Code merged by gravityscore at http://pastebin.com/gsFrNjbt
--
-- Adaptation of the Secure Hashing Algorithm (SHA-244/256)
-- Found Here: http://lua-users.org/wiki/SecureHashAlgorithm
--
-- Using an adapted version of the bit library
-- Found Here: https://bitbucket.org/Boolsheet/bslf/src/1ee664885805/bit.... | gpl-2.0 |
ArchShaman/Zero-K | scripts/chickenwurm.lua | 2 | 4453 | include "constants.lua"
--pieces
local mbody, fbody, bbody, head, tail = piece("mbody","fbody","bbody","head","tail")
local rsack, rblade, lsack, lblade, fire = piece("rsack","rblade","lsack","lblade","fire")
local smokePiece = {}
--constants
local digSpeed = 2
local digRotate = 0.6
--variables
local isMoving = fal... | gpl-2.0 |
kesac/libtsl | libtsl/audio.lua | 1 | 5665 | --[[
Copyright (c) 2012-2013 Kevin Sacro
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, dis... | mit |
ioiasff/poi | plugins/service_entergroup.lua | 355 | 3585 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
jchuang1977/my_luci | applications/luci-coovachilli/luasrc/model/cbi/coovachilli_radius.lua | 79 | 1768 | --[[
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 |
ArchShaman/Zero-K | LuaRules/Configs/StartBoxes/La Isla Bonita v1.lua | 11 | 10857 | return {
[0] = {
boxes = {
{
{1263.7261962891, 4462.94921875},
{1487.1788330078, 3647.4599609375},
{1520.2166748047, 3626.3115234375},
{1574.6970214844, 3623.0493164063},
{1648.0367431641, 3647.6628417969},
{1697.0388183594, 3687.5895996094},
{1744.1103515625, 3742.0385742188},
{17... | gpl-2.0 |
Mahdimatrix/mamshotax | 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 |
RamiLego4Game/CCRedirection | CCR/CCR.lua | 1 | 15417 | --CCRedirection by : RamiLego4Game--
--Clearing Screen--
term.setBackgroundColor(colors.black)
term.setTextColor(colors.white)
term.clear()
--Vars--
local homeD = "/CCR/"
shell.run(homeD.."bg")
term.setTextColor(colors.white)
if not fs.exists(homeD.."Levels") then
error("Please Change homeD to the Game Path")
end
i... | unlicense |
bmscoordinators/FFXI-Server | scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua | 10 | 7402 | -----------------------------------
--
-- Zone: Alzadaal_Undersea_Ruins (72)
--
-----------------------------------
package.loaded["scripts/zones/Alzadaal_Undersea_Ruins/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Alzadaal_Undersea_Ruins/TextIDs");
require("scripts/globals/missions");
re... | gpl-3.0 |
leecrest/luacrypto | tests/pkeytest.lua | 6 | 2217 | crypto = require 'crypto'
assert(crypto.pkey, "crypto.pkey is unavaliable")
local RSA_PUBLIC_KEY = [[
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAIy7sjJXo3ePWF1PZ81DelW1E
4VphWD+VPBzT8oCYY9dViJ4lszW/t5LX0IYAm+veuJyF5ffkAeeOWvI7vCg+5s3b
l9QqXgU8izuiXD0W6Wfm0YUU9VLGiFWnyTHpvZwqhnqmSEFCqPh+bWshCn/... | mit |
bmscoordinators/FFXI-Server | scripts/globals/spells/bluemagic/blastbomb.lua | 26 | 1800 | -----------------------------------------
-- Spell: Blastbomb
-- Deals fire damage to enemies within area of effect. Additional effect: "Bind"
-- Spell cost: 36 MP
-- Monster Type: Beastmen
-- Spell Type: Magical (Fire)
-- Blue Magic Points: 2
-- Stat Bonus: STR+1
-- Level: 18
-- Casting Time: 2.25 seconds
-- Recast Ti... | gpl-3.0 |
Shayan123456/botttttt10 | plugins/spammer.lua | 86 | 65983 | local function run(msg)
if msg.text == "[!/]killwili" then
return "".. [[
kose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack shod left bede\nkose nanat hack sh... | gpl-2.0 |
bmscoordinators/FFXI-Server | scripts/zones/Windurst_Woods/npcs/Ominous_Cloud.lua | 14 | 6595 | -----------------------------------
-- Area: Windurst Woods
-- NPC: Ominous Cloud
-- Type: Traveling Merchant NPC
-- @zone 241
-- @pos -20.632 -3.939 -40.554
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = ni... | gpl-3.0 |
accorp/lua-5.1-stuff | eml-parser/tests.lua | 1 | 2285 | --
-- EML Parser Tests
--
local eml_parser = require "eml-parser"
local path = arg[0]:gsub("\\", "/"):match("^(.+)/[^/]+$") or "."
local out = io.open(path .. "/output", "wb")
local cmp_line = function (a,b) return a:lower() < b:lower() end
local function out_headers(headers)
local list = {}
for _, h... | unlicense |
bmscoordinators/FFXI-Server | scripts/zones/Port_San_dOria/npcs/Coribalgeant.lua | 17 | 1405 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Coribalgeant
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Port_San_dOria/TextIDs");
require("scripts/globals/quests");... | gpl-3.0 |
bmscoordinators/FFXI-Server | scripts/zones/LaLoff_Amphitheater/npcs/qm1_3.lua | 17 | 2450 | -----------------------------------
-- Area: LaLoff_Amphitheater
-- NPC: Shimmering Circle (BCNM Entrances)
-------------------------------------
package.loaded["scripts/zones/LaLoff_Amphitheater/TextIDs"] = nil;
package.loaded["scripts/globals/bcnm"] = nil;
-------------------------------------
require("scripts/glob... | gpl-3.0 |
bmscoordinators/FFXI-Server | scripts/zones/The_Shrine_of_RuAvitau/mobs/Defender.lua | 19 | 2481 | -----------------------------------
-- Area: The Shrine of Ru'Avitau
-- MOB: Defender
-----------------------------------
require("scripts/globals/groundsofvalor");
-----------------------------------
-- onMobInitialize Action
-----------------------------------
function onMobInitialize(mob)
end;
-----------------... | gpl-3.0 |
colesbury/nn | ClassNLLCriterion.lua | 5 | 2460 | local THNN = require 'nn.THNN'
local ClassNLLCriterion, parent = torch.class('nn.ClassNLLCriterion', 'nn.Criterion')
function ClassNLLCriterion:__init(weights, sizeAverage)
parent.__init(self)
if sizeAverage ~= nil then
self.sizeAverage = sizeAverage
else
self.sizeAverage = true
end
i... | bsd-3-clause |
laarc/lumen-contrib | bin/reader.lua | 2 | 4801 | local delimiters = {[";"] = true, ["\n"] = true, [")"] = true, ["("] = true}
local whitespace = {[" "] = true, ["\t"] = true, ["\n"] = true}
local function stream(str, more)
return({more = more, len = _35(str), pos = 0, string = str})
end
local function peek_char(s)
local _id = s
local len = _id.len
local pos =... | bsd-2-clause |
bmscoordinators/FFXI-Server | scripts/globals/items/uberkuchen.lua | 12 | 1562 | -----------------------------------------
-- ID: 5615
-- Item: uberkuchen
-- Food Effect: 4Hrs, All Races
-----------------------------------------
-- HP 10
-- MP % 3 (cap 15)
-- Intelligence 3
-- HP Recovered While Healing 2
-- MP Recovered While Healing 1
-----------------------------------------
require("scripts/gl... | gpl-3.0 |
blackops97/KING_TELE | 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 |
Shayan123456/botttttt10 | 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 |
mohammad25253/teamking | 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 |
bmscoordinators/FFXI-Server | scripts/zones/Silver_Sea_route_to_Al_Zahbi/npcs/Yahliq.lua | 14 | 1222 | -----------------------------------
-- Area: Silver Sea route to Al Zahbi
-- NPC: Yahliq
-- Type: Guild Merchant: Fishing Guild
-- @pos 4.986 -2.101 -12.026 59
-----------------------------------
package.loaded["scripts/zones/Silver_Sea_route_to_Al_Zahbi/TextIDs"] = nil;
-----------------------------------
require("... | gpl-3.0 |
ChannelIQ/qless-java | src/main/resources/tag.lua | 1 | 3547 | -- tag(0, ('add' | 'remove'), jid, now, tag, [tag, ...])
-- tag(0, 'get', tag, [offset, [count]])
-- tag(0, 'top', [offset, [count]])
-- ------------------------------------------------------------------------------------------------------------------
-- Accepts a jid, 'add' or 'remove', and then a list of tags
-- to e... | mit |
bmscoordinators/FFXI-Server | scripts/zones/Bastok_Markets_[S]/npcs/Porter_Moogle.lua | 14 | 1546 | -----------------------------------
-- Area: Bastok Markets [S]
-- NPC: Porter Moogle
-- Type: Storage Moogle
-- @zone 87
-- @pos TODO
-----------------------------------
package.loaded["scripts/zones/Bastok_Markets_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Bastok_Marke... | gpl-3.0 |
ashkanpj/fire-creed | plugins/banhammer.lua | 33 | 12751 | 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 |
ColonelThirtyTwo/Building-Generator | main.lua | 1 | 3205 |
math.randomseed(os.time())
local ffi = require "ffi"
local SCREEN_W, SCREEN_H = 1600, 900
local W, H, D = 30, 6, 3
local lj_glfw = require "glfw"
local bit = require "bit"
local Room = require "room"
local gl, glc, glu, glfw = lj_glfw.libraries()
lj_glfw.init()
local window = lj_glfw.Window(SCREEN_W, SCREEN_H, "Bu... | unlicense |
bmscoordinators/FFXI-Server | scripts/zones/Yuhtunga_Jungle/npcs/Mupia_RK.lua | 14 | 3332 | -----------------------------------
-- Area: Yuhtunga Jungle
-- NPC: Mupia, R.K.
-- Border Conquest Guards
-- @pos -241.334 -1 478.602 123
-----------------------------------
package.loaded["scripts/zones/Yuhtunga_Jungle/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/conquest");
require... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.