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 |
|---|---|---|---|---|---|
D3vMa3sTrO/superbot | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-2.0 |
masterteam1/Master-plus | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-3.0 |
nightrune/wireshark | test/lua/tvb.lua | 32 | 30608 | ----------------------------------------
-- script-name: tvb.lua
-- This tests the Tvb/TvbRange and proto_add_XXX_item API.
----------------------------------------
------------- general test helper funcs ------------
local FRAME = "frame"
local OTHER = "other"
local total_tests = 0
local function getTotal()
retu... | gpl-2.0 |
deepakjois/ufy | src/ufy/init.lua | 1 | 2114 | local path = require("path")
local ufy = {}
-- Cache ufy’s config directory location.
local ufy_config_dir
-- Location of standalone LuaTeX binary in a regular
-- installation of ufy.
local luatex_program = "luatex"
-- Locate ufy’s config directory.
function ufy.locate_config()
local datafile = require("dataf... | mit |
dianedelallee/Blinn-Phong | premake4.lua | 1 | 3275 | solution "advanced_opengl_imac3_exercises"
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
-- src Exercicse Deferred
project "SyntheseImage"
kind "ConsoleApp"
language "C++"
files { "src/main.cpp", "common/*.hpp", "common/*.cpp", "common/*.h" }
incl... | cc0-1.0 |
DavidIngraham/ardupilot | libraries/AP_Scripting/examples/Aerobatics/Via_Switch/10_loops-and-immelman.lua | 4 | 11279 | -- loops and returns on switch
TRICK_NUMBER = 10 -- selector number recognized to execute trick, change as desired
-- number of loops controlled by AERO_RPT_COUNT, if 0 it will do an immelman instead, trick returns control after executing even if trick id remains 10
local target_vel -- trick specific global variables... | gpl-3.0 |
shreyaspotnis/S4 | modules/Sample2DBox.lua | 7 | 7525 | inspect = require('inspect')
function Sample2DBox(argtable)
if not argtable['Xlim'] then
error('Must provide Xlim table: Xlim = { xmin, xmax }')
end
if not argtable['Ylim'] then
error('Must provide Ylim table: Ylim = { ymin, ymax }')
end
if not argtable['UpdateFunc'] then
error('Must provide UpdateFunc')
en... | gpl-2.0 |
alexandergall/snabbswitch | lib/luajit/testsuite/test/lib/ffi/jit_struct.lua | 6 | 4085 | local ffi = require("ffi")
ffi.cdef[[
typedef struct { int a, b, c; } jit_struct_foo_t;
typedef struct { int a, b, c; } jit_struct_foo2_t;
typedef struct { int a[10]; int b[10]; } jit_struct_sarr_t;
typedef struct jit_struct_chain_t {
struct jit_struct_chain_t *next;
int v;
} jit_struct_chain_t;
]]
do --- iterati... | apache-2.0 |
Danteoriginal/pvpgn-lua | lua/include/string.lua | 7 | 1737 | --[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- Split text into table by delimeter
-- Usage example: string.split("one,two",",")
function string:split(str, sep)
str = str or '%s+'
local st, g ... | gpl-2.0 |
xponen/Zero-K | units/trem.lua | 5 | 6415 | unitDef = {
unitname = [[trem]],
name = [[Tremor]],
description = [[Heavy Saturation Artillery Tank]],
acceleration = 0.05952,
brakeRate = 0.124,
buildCostEnergy = 1500,
buildCostMetal = 1500,
builder = false... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua | 36 | 1043 | --[[
LuCI hd-idle
(c) 2008 Yanira <forum-2008@email.de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
require("nixio.fs")
m = Map... | gpl-2.0 |
pavanky/arrayfire-lua | examples/image_processing/filters.lua | 4 | 7300 | --[[
/*******************************************************
* Copyright (c) 2015, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
************************************************... | bsd-3-clause |
pavanky/arrayfire-lua | examples/graphics/fractal.lua | 4 | 2876 | --[[
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
*****************************************... | bsd-3-clause |
pablo93/TrinityCore | Data/Interface/FrameXML/SparkleFrame.lua | 1 | 5808 | -- YAY FOR SPARKLES~!
SparkleFrame = CreateFrame("FRAME");
local Sparkle = SparkleFrame:CreateTexture();
function Sparkle:New (sparkleFrame, sparkleTemplate)
if ( sparkleFrame.freeSparkles[1] ) then
local sparkle = sparkleFrame.freeSparkles[1];
tremove(sparkleFrame.freeSparkles, 1);
tinsert(sparkleFrame.sparkl... | gpl-2.0 |
xponen/Zero-K | LuaRules/Gadgets/KotH.lua | 1 | 5814 | -- $Id$
-- ZK Version
-- King of the Hill for ModOptions -------------------------------------
-- Set up an empty box on Spring Lobby (other clients might crash) ------
-- Set up the time to control the box in ModOptions --------------------
--------------------------------------------------------------------
functio... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/contrib/luadoc/lua/luadoc/init.lua | 172 | 1333 | -------------------------------------------------------------------------------
-- LuaDoc main function.
-- @release $Id: init.lua,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $
-------------------------------------------------------------------------------
local require = require
local util = require "luadoc.util"
log... | gpl-2.0 |
badboyam/Gp_Helper_bot | plugins/owners.lua | 68 | 12477 |
local function lock_group_namemod(msg, data, target)
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'yes' then
return 'Group name is already locked'
else
data[tostring(target)]['setting... | gpl-2.0 |
alexandergall/snabbswitch | lib/ljsyscall/syscall/linux/arm/ffi.lua | 25 | 1602 | -- arm specific definitions
return {
ucontext = [[
typedef int greg_t, gregset_t[18];
typedef struct sigcontext {
unsigned long trap_no, error_code, oldmask;
unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
unsigned l... | apache-2.0 |
alexandergall/snabbswitch | src/dynasm.lua | 20 | 37543 | ------------------------------------------------------------------------------
-- DynASM. A dynamic assembler for code generation engines.
-- Originally designed and implemented for LuaJIT.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- See below for full copyright notice.
----------------------------... | apache-2.0 |
Xamla/torch-pcl | PointCloud.lua | 1 | 10732 | local ffi = require 'ffi'
local torch = require 'torch'
local utils = require 'pcl.utils'
local pcl = require 'pcl.PointTypes'
local PointCloud = torch.class('pcl.PointCloud', pcl)
local func_by_type = {}
local function init()
local PointCloud_method_names = {
'new',
'clone',
'delete',
'getHeaderSe... | bsd-3-clause |
Xamla/torch-pcl | EuclideanClusterExtraction.lua | 1 | 2736 | local ffi = require 'ffi'
local torch = require 'torch'
local utils = require 'pcl.utils'
local pcl = require 'pcl.PointTypes'
local EuclideanClusterExtraction = torch.class('pcl.EuclideanClusterExtraction', pcl)
local EuclideanClusterExtraction_func_by_type = {}
local function init()
local EuclideanClusterExtracti... | bsd-3-clause |
jackywgw/ntopng_test | scripts/lua/host_top_peers_protocols.lua | 10 | 2411 | --
-- (C) 2014-15-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('application/json')
interface.select(ifname)
host_info = url2hostinfo(_GET)
flows = interface.getFlowPeers(host_info["host"],host_info["vlan... | gpl-3.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/gamemode/spawnmenu/toolpanel.lua | 2 | 2194 |
include( 'controlpanel.lua' )
local PANEL = {}
AccessorFunc( PANEL, "m_TabID", "TabID" )
--[[---------------------------------------------------------
Name: Paint
-----------------------------------------------------------]]
function PANEL:Init()
self.List = vgui.Create( "DCategoryList", self )
self.List:Dock( ... | gpl-2.0 |
kiarash14/spam | plugins/meme.lua | 637 | 5791 | local helpers = require "OAuth.helpers"
local _file_memes = './data/memes.lua'
local _cache = {}
local function post_petition(url, arguments)
local response_body = {}
local request_constructor = {
url = url,
method = "POST",
sink = ltn12.sink.table(response_body),
headers = {},
red... | gpl-2.0 |
xponen/Zero-K | effects/nanobomb.lua | 25 | 1716 | -- nanobomb
return {
["nanobomb"] = {
usedefaultexplosions = false,
groundflash = {
alwaysvisible = false,
circlealpha = 1,
circlegrowth = 10,
flashalpha = 0.5,
flashsize = 100,
ttl = 15,
color = {
[1] = 0,
... | gpl-2.0 |
xponen/Zero-K | units/armrock.lua | 1 | 7015 | unitDef = {
unitname = [[armrock]],
name = [[Rocko]],
description = [[Skirmisher Bot (Direct-Fire)]],
acceleration = 0.32,
brakeRate = 0.2,
buildCostEnergy = 90,
buildCostMetal = 90,
buildPic = [[ARMROCK.png]]... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/gui_group_recall_fix.lua | 6 | 2942 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Default Group Recall Fix",
desc = "Fix to the group recall problem.",
author = "msafwan... | gpl-2.0 |
snail23/snailui | elements/tags.lua | 1 | 3252 | --
-- Copyright (C) 2012-2016 Snail <https://github.com/snail23/snailui/>
--
-- 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 ... | gpl-2.0 |
Xandaros/Starfall | lua/starfall/libs_sh/vectors.lua | 1 | 7142 | SF.Vectors = {}
--- Vector type
-- @shared
local vec_methods, vec_metamethods = SF.Typedef( "Vector" )
local wrap, unwrap = SF.CreateWrapper( vec_metamethods, true, false, debug.getregistry().Vector )
SF.DefaultEnvironment.Vector = function ( ... )
return wrap( Vector( ... ) )
end
SF.Vectors.Wrap = wrap
SF.Vectors.... | bsd-3-clause |
Vermeille/kong | spec/03-plugins/06-jwt/03-access_spec.lua | 3 | 11081 | local cjson = require "cjson"
local helpers = require "spec.helpers"
local fixtures = require "spec.03-plugins.06-jwt.fixtures"
local jwt_encoder = require "kong.plugins.jwt.jwt_parser"
local PAYLOAD = {
iss = nil,
nbf = os.time(),
iat = os.time(),
exp = os.time() + 3600
}
describe("Plugin: jwt (access)", fun... | apache-2.0 |
alexandergall/snabbswitch | src/lib/numa.lua | 2 | 8845 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(...,package.seeall)
-- Call bind_to_cpu(1) to bind the current Snabb process to CPU 1 (for
-- example), to bind its memory to the corresponding NUMA node, to
-- migrate mapped pages to that NUMA node, and to arrange to warn if
-- yo... | apache-2.0 |
dvv/luvit-engine.io | lib/req/codec.lua | 1 | 3068 | local Table = require('table')
local UTF8 = require('unicode').utf8
---
-- Packet types.
--
local packets = {
open = 'o',
close = 'c',
ping = 'p',
pong = 'P',
message = 'm',
error = 'e',
noop = '0',
}
-- provide inverse map, to ease lookup
for k, v in pairs(packets) do packets[v]... | mit |
alexandergall/snabbswitch | lib/luajit/testsuite/test/lib/ffi/ffi_callback.lua | 6 | 4662 |
local ffi = require("ffi")
ffi.cdef[[
void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const uint8_t *, const uint8_t *));
]]
do
local cb = ffi.cast("int (*)(int, int, int)", function(a, b, c)
return a+b+c
end)
assert(cb(10, 99, 13) == 122)
-- Don't compile call to blacklisted functi... | apache-2.0 |
rogerpueyo/luci | modules/luci-base/luasrc/dispatcher.lua | 1 | 34280 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local nixio = require "nixi... | apache-2.0 |
Vermeille/kong | kong/plugins/response-transformer/migrations/cassandra.lua | 12 | 1582 | return {
{
name = "2016-03-10-160000_resp_trans_schema_changes",
up = function(_, _, factory)
local plugins, err = factory.plugins:find_all {name = "response-transformer"}
if err then
return err
end
for _, plugin in ipairs(plugins) do
for _, action in ipairs {"remove"... | apache-2.0 |
xponen/Zero-K | gamedata/modularcomms/weapons/beamlaser.lua | 1 | 2118 | local name = "commweapon_beamlaser"
local weaponDef = {
name = [[Beam Laser]],
areaOfEffect = 12,
beamTime = 0.1,
coreThickness = 0.5,
craterBoost = 0,
craterMult = 0,
customParams = {
slot = [[5]],
muzzleEffectShot =... | gpl-2.0 |
kiarash14/tg5 | plugins/getplug.lua | 13 | 2392 | local function run(msg, matches)
if matches[1] == "getplug" then
local file = matches[2]
if is_sudo(msg) then --sudo only !
local receiver = get_receiver(msg)
send_document(receiver, "./plugins/"..file..".lua", ok_cb, false)
else
return nil
end
end
end
return {
patterns = {... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/chili/Controls/colorbars.lua | 25 | 2469 | --//=============================================================================
Colorbars = Control:Inherit{
classname = "colorbars",
color = {1,1,1,1},
defaultWidth = 100,
defaultHeight = 20,
OnChange = {},
}
local this = Colorbars
local inherited = this.inherited
--//=============================... | gpl-2.0 |
alexandergall/snabbswitch | src/lib/fibers/op.lua | 6 | 5519 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- Concurrent ML operations.
module(..., package.seeall)
local fiber = require('lib.fibers.fiber')
-- A suspension represents an instantiation of an operation that a fiber
-- has to wait on because it can't complete directly. Some other... | apache-2.0 |
adib1380/inviter-2 | plugins/get.lua | 613 | 1067 | local function get_variables_hash(msg)
if msg.to.type == 'chat' then
return 'chat:'..msg.to.id..':variables'
end
if msg.to.type == 'user' then
return 'user:'..msg.from.id..':variables'
end
end
local function list_variables(msg)
local hash = get_variables_hash(msg)
if hash then
local names =... | gpl-2.0 |
RafiB/dotfiles | config/config.symlink/awesome/rc.lua | 1 | 20099 | -- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
awful.autofocus = require("awful.autofocus")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
local menubar = require("menubar")
local vi... | mit |
alexandergall/snabbswitch | src/lib/yang/schema.lua | 1 | 56697 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local lib = require("core.lib")
local mem = require("lib.stream.mem")
local parser = require("lib.yang.parser")
local util = require("lib.yang.util")
local maxpc = require("lib.maxpc")
local function error_with_... | apache-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua | 74 | 3766 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 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$
]]--
lo... | gpl-2.0 |
ioiasff/sosia | 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 |
sullome/km-freeminer-mods | mods/jabber/lib/verse/client.lua | 2 | 6104 | local verse = require "verse";
local stream = verse.stream_mt;
local jid_split = require "util.jid".split;
local adns = require "net.adns";
local lxp = require "lxp";
local st = require "util.stanza";
-- Shortcuts to save having to load util.stanza
verse.message, verse.presence, verse.iq, verse.stanza, verse.reply, v... | gpl-3.0 |
Schwertspize/speedfng | configure.lua | 2 | 12103 |
--[[@GROUP Configuration@END]]--
--[[@FUNCTION
TODO
@END]]--
function NewConfig(on_configured_callback)
local config = {}
config.OnConfigured = function(self)
return true
end
if on_configured_callback then config.OnConfigured = on_configured_callback end
config.options = {}
config.settings = NewSettings()... | gpl-2.0 |
gpedro/forgottenserver | data/spells/scripts/attack/curse.lua | 27 | 1206 | local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition,... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/unit_jumper_jumpOverObstacle.lua | 1 | 20670 | local version = "v0.506"
function widget:GetInfo()
return {
name = "Auto Jump Over Terrain",
desc = version .. " Jumper automatically jump over terrain or buildings if it shorten walk time.",
author = "Msafwan",
date = "4 February 2014",
license = "GNU GPL, v2 or later",
layer... | gpl-2.0 |
xponen/Zero-K | LuaUI/Widgets/game_resource_stats_writer.lua | 17 | 1718 | function widget:GetInfo()
return {
name = "Resource Stat Writer",
desc = "Writes resource statistics to a file at game end.",
author = "Google Frog",
date = "July 11, 2012",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = false -- loaded by default?
}
e... | gpl-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/gamemode/spawnmenu/creationmenu/content/contentsidebar.lua | 1 | 1259 | local PANEL = {}
function PANEL:Init()
self.Tree = vgui.Create( "DTree", self );
self.Tree:SetClickOnDragHover( true );
self.Tree.OnNodeSelected = function( Tree, Node ) hook.Call( "ContentSidebarSelection", GAMEMODE, self:GetParent(), Node ) end
self.Tree:Dock( FILL )
self.Tree:SetBackgroundColor( Color( 240, ... | gpl-2.0 |
Samnsparky/ljswitchboard | switchboard_modules/lua_script_debugger/premade_scripts/oldScripts/1-Wire De-Steeg(fast).lua | 1 | 2894 | --Requires Firmware 1.0161 or newer
function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end
function DS18xx_Start(target_rom)
if target_rom[3] == 0 then
MB.W(5307,0, 0xCC) -- Set to skip ROM
print("rom skip")
else
MB.W(5307,0, 0x55) -- Set to match ROM
e... | mit |
Paradokz/BadRotations | System/engines/HealingEngineCollections.lua | 2 | 7427 | novaEngineTables = { }
-- This is for the Dispel Check, all Debuffs we want dispelled go here
-- valid arguments: stacks = num range = num
novaEngineTables.DispelID = {
{ id = 143579, stacks = 3 }, -- Immersius
{ id = 143434, stacks = 3 }, -- Fallen Protectors
{ id = 144514, stacks = 0 }, -- Norushen
{ id = 144351,... | gpl-3.0 |
vpp-dev/vpp-lua-plugin | lapi-test/example-cli.lua | 1 | 1410 | --[[
/*
* Copyright (c) 2016 Cisco and/or its affiliates.
* 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
*
* Unless required by appl... | apache-2.0 |
kiarash14/tg5 | plugins/calc.lua | 11 | 2732 | -- Function reference: http://mathjs.org/docs/reference/functions/categorical.html
local function mathjs(exp)
local url = 'http://api.mathjs.org/v1/'
url = url..'?expr='..URL.escape(exp)
local b,c = http.request(url)
local text = nil
if c == 200 then
text = '= '..b
elseif c == 400 then
text = b
... | gpl-2.0 |
persiaAziz/trafficserver | lib/luajit/src/jit/dis_ppc.lua | 88 | 20319 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | apache-2.0 |
xponen/Zero-K | LuaRules/Gadgets/unit_transport_speed.lua | 1 | 2558 |
function gadget:GetInfo()
return {
name = "Transport Speed",
desc = "Lowers the speed of transports when they transport large loads.",
author = "Google Frog",
date = "31 August 2012",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true -- loaded by defa... | gpl-2.0 |
Ali021s/Ali021 | plugins/lock_fwd.lua | 9 | 1105 | do
local function pre_process(msg)
--Checking mute
local hash = 'mate:'..msg.to.id
if redis:get(hash) and msg.fwd_from and not is_sudo(msg) and not is_owner(msg) and not is_momod(msg) and not is_admin1(msg) then
delete_msg(msg.id, ok_cb, true)
return "done"
end
... | agpl-3.0 |
xponen/Zero-K | effects/gundam_otaplas.lua | 50 | 48727 | -- miniotaplas_fireball11
-- otaplas_fireball3
-- otaplas_fireball16
-- otaplas_fireball14
-- ota_plas
-- miniotaplas_fireball17
-- otaplas_fireball18
-- otaplas_fireball1
-- otaplas_fireball11
-- miniotaplas_fireball13
-- otaplas_fireball10
-- miniotaplas_fireball16
-- otaplas_fireball13
-- miniotaplas_fireball2
-- ot... | gpl-2.0 |
kiarash14/spam | plugins/domaintools.lua | 359 | 1494 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function check(name)
local api = "https://domainsearch.p.mashape.com/index.php?"... | gpl-2.0 |
alexandergall/snabbswitch | lib/ljsyscall/syscall/libc.lua | 24 | 2992 | -- things that are libc only, not syscalls
-- this file will not be included if not running with libc eg for rump
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs,... | apache-2.0 |
masterteam1/Master-plus | plugins/plugins.lua | 1 | 6494 | 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-3.0 |
infernal1200/infernall | 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 |
nexusstar/dotfiles | neovim/.config/nvim/lua/config/lsp_kind.lua | 1 | 2856 | local M = {}
M.cmp_kind = {
Class = " ",
Color = " ",
Constant = "",
Constructor = " ",
Default = " ",
Enum = "練",
EnumMember = " ",
Event = " ",
Field = "ﰠ ",
File = " ",
Folder = " ",
Function = " ",
Interface = " ",
Keyword = " ",
Method = "ƒ ",
Module = " ",
Operator ... | unlicense |
gpedro/forgottenserver | data/chatchannels/scripts/advertising.lua | 48 | 1220 | function canJoin(player)
return player:getVocation():getId() ~= VOCATION_NONE or player:getAccountType() >= ACCOUNT_TYPE_SENIORTUTOR
end
local CHANNEL_ADVERTISING = 5
local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT)
muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_ADVERTISING)
muted:setPara... | gpl-2.0 |
mbmahdiiii/mbmhdi | 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 |
alexandergall/snabbswitch | lib/ljsyscall/syscall/osx/c.lua | 18 | 1783 | -- This sets up the table of C functions
-- For OSX we hope we do not need many overrides
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,... | apache-2.0 |
D3vMa3sTrO/superbot | plugins/lock_user.lua | 1 | 1106 | --[[
_ _ _ _____ _____ ____ ____
/ \ / \ / \ | ____|___|_ _| /_\ \ / __ \ Đєⱴ 💀: @MaEsTrO_0
/ / \/ / \ / _ \ | _| / __| | | | |_\_/| | | | Đєⱴ 💀: @devmaestr0
/ / \ \/ \ \ / ___ \| |___\__ \ | | | | \ \| |__| | Đєⱴ ฿๏ͳ💀: @iqMaestroBot
/_/ \/ ... | gpl-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/entities/entities/gmod_emitter.lua | 3 | 10259 |
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
ENT.Spawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
local matLight = Material( "sprites/light_ignorez" )
local matBeam = Material( "effects/lamp_beam" )
function ENT:SetupDataTables()
self:NetworkVar( "Float", 0, "Delay" )
self:NetworkVar( "Flo... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/routing/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/plugins.lua | 20 | 1493 | --[[
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 |
dani-sj/daniabbas | plugins/location.lua | 185 | 1565 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
DaanHaaz/love-base | scripts/libs/lurker.lua | 1 | 6560 | --
-- lurker
--
-- Copyright (c) 2015 rxi
--
-- This library is free software; you can redistribute it and/or modify it
-- under the terms of the MIT license. See LICENSE for details.
--
-- Assumes lume is in the same directory as this file
local lume = require((...):gsub("[^/.\\]+$", "lume"))
local lurk... | mit |
xponen/Zero-K | effects/gundam_powerplant_explosion.lua | 25 | 3625 | -- powerplant_explosion
return {
["powerplant_explosion"] = {
electric1 = {
air = true,
class = [[heatcloud]],
count = 3,
ground = true,
water = true,
properties = {
alwaysvisible = true,
he... | gpl-2.0 |
abasshacker/ali | plugins/id.lua | 355 | 2795 | local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, resu... | gpl-2.0 |
rogerpueyo/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... | apache-2.0 |
xponen/Zero-K | units/chicken_tiamat.lua | 4 | 9070 | unitDef = {
unitname = [[chicken_tiamat]],
name = [[Tiamat]],
description = [[Heavy Assault/Riot]],
acceleration = 0.36,
autoheal = 20,
brakeRate = 0.205,
buildCostEnergy = 0,
buildCostMetal = 0,
builder = false,
buil... | gpl-2.0 |
Elanis/SciFi-Pack-Addon-Gamemode | gamemodes/scifipack/entities/weapons/gmod_tool/stools/hydraulic.lua | 4 | 7136 |
TOOL.Category = "Constraints"
TOOL.Name = "#tool.hydraulic.name"
TOOL.ClientConVar[ "group" ] = "37"
TOOL.ClientConVar[ "width" ] = "3"
TOOL.ClientConVar[ "addlength" ] = "100"
TOOL.ClientConVar[ "fixed" ] = "1"
TOOL.ClientConVar[ "speed" ] = "64"
TOOL.ClientConVar[ "material" ] = "cable/rope"
function TOOL:LeftClic... | gpl-2.0 |
nifty-site-manager/nsm | LuaJIT/src/jit/dis_x86.lua | 6 | 33826 | ----------------------------------------------------------------------------
-- LuaJIT x86/x64 disassembler module.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--------------------------------------------------------------------------... | mit |
MRAHS/UBTEST | 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 |
SirNate0/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/doit.lua | 24 | 2028 | -- Generate binding code
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- Last update: Apr 2003
-- $Id: $
-- 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 maintenance, suppor... | mit |
pokorj18/vlc | share/lua/sd/icecast.lua | 10 | 1975 | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Fabio Ritrovato <sephiroth87 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
... | gpl-2.0 |
rogerpueyo/luci | applications/luci-app-radicale2/luasrc/model/cbi/radicale2/logging.lua | 10 | 1503 | -- Licensed to the public under the Apache License 2.0.
local m = Map("radicale2", translate("Radicale 2.x"),
translate("A lightweight CalDAV/CardDAV server"))
local s = m:section(NamedSection, "logging", "section", translate("Logging"))
s.addremove = true
s.anonymous = false
local logging_file = nil
logging... | apache-2.0 |
Canaan-Creative/luci | protocols/ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua | 53 | 2242 | --[[
LuCI - Lua Configuration Interface
Copyright 2011-2012 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
]]--
loc... | apache-2.0 |
adixcompany/self | bot/bot.lua | 1 | 13760 | -- #ArashN0 Self Robot
-- #@adixco
tdcli = dofile('./tg/tdcli.lua')
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
require('./bot/utils')
URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
json = (loadfile "./libs/J... | gpl-3.0 |
merlinblack/Game-Engine-Testbed | scripts/cell.lua | 1 | 1223 | require "lualib"
cell={}
local x = gui.screen.width-300
cell.panel = Widget( gui.mainLayer, x, gui.screen.height-145, 300, 145 )
cell.panel:background( gui.dialogBackground )
cell.text = MarkupText( gui.mainLayer, x+25, gui.screen.height-140, "" )
cell.text2 = MarkupText( gui.mainLayer, x+135, gui.screen.height-140, ""... | mit |
link4all/20170920openwrt | own_files/mt7628/files_tw7628_wifidog/usr/lib/lua/luci/controller/admin/index.lua | 21 | 1141 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.index", package.seeall)
function index()
local root = node()
if not root.target then
root.target = alias("admin")
root.index = true
end
local page = node("admin")
page.... | gpl-2.0 |
link4all/20170920openwrt | own_files/mt7628/files_mifi_ss/usr/lib/lua/luci/controller/admin/index.lua | 21 | 1141 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.index", package.seeall)
function index()
local root = node()
if not root.target then
root.target = alias("admin")
root.index = true
end
local page = node("admin")
page.... | gpl-2.0 |
link4all/20170920openwrt | own_files/ar934x/files_yn9341/usr/lib/lua/luci/controller/admin/index.lua | 21 | 1141 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.index", package.seeall)
function index()
local root = node()
if not root.target then
root.target = alias("admin")
root.index = true
end
local page = node("admin")
page.... | gpl-2.0 |
xuejian1354/barrier_breaker | feeds/luci/protocols/ipv6/luasrc/model/network/proto_4x6.lua | 63 | 1522 | --[[
LuCI - Network model - 6to4, 6in4 & 6rd protocol extensions
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
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 ... | gpl-2.0 |
caoyongfeng0214/nplexpress | npl_mod/express/request.lua | 1 | 5222 | NPL.load("(gl)script/ide/Json.lua");
local httpfile = NPL.load('./httpfile.lua');
local cookie = NPL.load('./cookie.lua');
-- Host localhost:3000
-- rcode 0
-- Connection keep-alive
-- Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
-- Cache-Control max-age=0
-- Accept-Encoding gzip... | lgpl-3.0 |
xponen/Zero-K | LuaRules/Gadgets/CustomUnitShaders/UnitMaterials/1_normalmapping.lua | 17 | 4460 | -- $Id$
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local materials = {
normalMappedS3o = {
shaderDefinitions = {
"#define use_perspective_correct_shadows",
"#define use_nor... | gpl-2.0 |
LuaDist2/evdev | evdev/constants.lua | 2 | 12161 |
local _ENV = {}
if setfenv then
setfenv(1, _ENV)
end
-- Constants for the Linux evdev API
-- created by the gen-constants.lua script from the <linux/input.h> header
-- Event Types
EV_VERSION = 0x010001
EV_SYN = 0x00
EV_KEY = 0x01
EV_REL = 0x02
EV_ABS = 0x03
EV_MSC = 0x04
EV_SW = 0x05
EV_LED = 0x11
EV_SND = 0x12
EV... | mit |
DavidIngraham/ardupilot | libraries/AP_Scripting/examples/param_add.lua | 8 | 1300 | -- example for adding parameters to a lua script
-- the table key must be used by only one script on a particular flight
-- controller. If you want to re-use it then you need to wipe your old parameters
-- the key must be a number between 0 and 200. The key is persistent in storage
local PARAM_TABLE_KEY = 72
-- creat... | gpl-3.0 |
link4all/20170920openwrt | own_files/ar934x/files_zhonglian/usr/lib/lua/luci/sys.lua | 21 | 15277 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local io = require "io"
local os = require "os"
local table = require "table"
local nixio = require "nixio"
local fs = require "nixio.fs"
local uci = require "luci.model.uci"
local luci = {}
l... | gpl-2.0 |
link4all/20170920openwrt | own_files/mt7628/files_wfnt_4g/usr/lib/lua/luci/sys.lua | 21 | 15277 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local io = require "io"
local os = require "os"
local table = require "table"
local nixio = require "nixio"
local fs = require "nixio.fs"
local uci = require "luci.model.uci"
local luci = {}
l... | gpl-2.0 |
link4all/20170920openwrt | own_files/ar934x/files_yn9341_zhongxing/usr/lib/lua/luci/sys.lua | 21 | 15277 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local io = require "io"
local os = require "os"
local table = require "table"
local nixio = require "nixio"
local fs = require "nixio.fs"
local uci = require "luci.model.uci"
local luci = {}
l... | gpl-2.0 |
maxolasersquad/ff_companion | final_fantasy.lua | 1 | 11317 | -- Most of the technical information provided by http://datacrystal.romhacking.net/wiki/Final_Fantasy:RAM_map
bit = require 'bit32'
lgi = require 'lgi'
character = require 'character'
Gtk = lgi.require('Gtk', '3.0')
builder = Gtk.Builder()
builder:add_from_file('main.glade')
window = builder:get_object('window')
loc... | gpl-3.0 |
alexandergall/snabbswitch | src/core/config.lua | 14 | 2514 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- 'config' is a data structure that describes an app network.
module(..., package.seeall)
local lib = require("core.lib")
-- API: Create a new configuration.
-- Initially there are no apps or links.
function new ()
return {
app... | apache-2.0 |
xuejian1354/barrier_breaker | feeds/luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua | 80 | 1153 | --[[
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... | gpl-2.0 |
4aiman/MineClone | mods/WorldEdit/worldedit_infinity/init.lua | 2 | 2754 | local worldedit = {}
local minetest = minetest --local copy of global
local get_pointed = function(pos, nearest, distance)
if distance > 100 then
return false
end
--check for collision with node
local nodename = minetest.get_node(pos).name
if nodename ~= "air"
and nodename ~= "default:water_source"... | lgpl-2.1 |
Moe-/GameJamSimulator | challenge.lua | 1 | 7738 | class "Challenge" {
posx = 0;
posy = 0;
energy = 20;
w = 0;
fightIndex = 0;
nextPlayer = 0;
}
function Challenge:__init(posx, posy)
self.posx = posx
self.posy = posy
self.image = love.graphics.newImage("gfx/challenge.png")
self.bg = love.graphics.newImage("gfx/battle_bg1.png")
self.menu = love.graphics.newI... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.