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 |
|---|---|---|---|---|---|
luadch/luadch | scripts/etc_blacklist.lua | 1 | 5823 | --[[
etc_blacklist.lua by pulsar
v0.8: by pulsar
- removed "hub.reloadusers()"
- removed "hub.restartscripts()"
v0.7:
- small fix in help function / thx Sopor
v0.6:
- add table lookups
- fix permission
... | gpl-3.0 |
mrvigeo/salib2 | 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 |
puustina/openjam | src/minigameBeachWalk.lua | 1 | 7979 | local results = require "src.results"
local countdown = require "src.countdown"
local anim8 = require "lib.anim8"
local beachWalk = {
name = "Beach Walk",
description = "Collect the clams.",
controls = "LEFT RIGHT",
thumbnail = nil,
-- game specific
over = false,
player = nil,
seaShells = {},
playerSpeedOrig ... | gpl-3.0 |
RuiChen1113/luci | libs/luci-lib-nixio/docsrc/nixio.lua | 151 | 15824 | --- General POSIX IO library.
module "nixio"
--- Look up a hostname and service via DNS.
-- @class function
-- @name nixio.getaddrinfo
-- @param host hostname to lookup (optional)
-- @param family address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param service service name or port (optional)
-- @return ... | apache-2.0 |
Ettercap/ettercap | src/lua/share/scripts/http_requests.lua | 12 | 2720 | ---
--
-- Created by Ryan Linn and Mike Ryan
-- Copyright (C) 2012 Trustwave Holdings, Inc.
description = "Script to show HTTP requsts";
local http = require("http")
local packet = require("packet")
local bin = require("bit")
hook_point = http.hook
packetrule = function(packet_object)
-- If this isn't a tcp pa... | gpl-2.0 |
omid1212/hgbok | plugins/moderation.lua | 336 | 9979 | 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
local username = v.username
data[tostring(m... | gpl-2.0 |
liuxuezhan/skynet | test/testmysql.lua | 18 | 3820 | local skynet = require "skynet"
local mysql = require "skynet.db.mysql"
local function dump(obj)
local getIndent, quoteStr, wrapKey, wrapVal, dumpObj
getIndent = function(level)
return string.rep("\t", level)
end
quoteStr = function(str)
return '"' .. string.gsub(str, '"', '\\"') .. '"'... | mit |
vipteam1/VIPTEAM | plugins/infoeng.lua | 1 | 10422 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ File name : ( #all ) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀
▀▄ ▄▀ ... | gpl-2.0 |
kamichidu/lua-jclass | lib/util/lookahead_queue.lua | 1 | 2514 | local prototype= require 'prototype'
local lookahead_queue= prototype {
default= prototype.assignment_copy,
table= prototype.deep_copy,
use_extra_meta= true,
}
lookahead_queue.elements= {}
function lookahead_queue.from_iterator(iterator)
assert(iterator, 'cannot create from nil value')
local o... | mit |
Habbie/hammerspoon | extensions/mouse/test_mouse.lua | 6 | 1301 | hs.mouse = require("hs.mouse")
function testMouseCount()
assertGreaterThan(0, hs.mouse.count())
assertGreaterThan(0, hs.mouse.count(true))
return success()
end
function testMouseNames()
local names = hs.mouse.names()
assertIsTable(names)
assertIsString(names[1])
return success()
... | mit |
uhvhugvhhbbh545hhhyg/rekjx | plugins/control.lua | 2 | 2481 |
local function run(msg, matches)
if matches[1]:lower() == 'join' and matches[2] and is_admin(msg) then
channel_invite('channel#id'..matches[2], 'user#id'..msg.from.id, ok_cb, false)
end
if matches[1]:lower() == '1m' and matches[2] then
if not is_sudo(msg) then return end
local t... | gpl-2.0 |
Noneatme/mta-lostresources | [gamemodes]/twd/client/CObjectCreator.lua | 1 | 1624 | -- #######################################
-- ## Project: MTA:The Walking Death ##
-- ## Name: ObjectCreator ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
loc... | gpl-2.0 |
Lautitia/newfies-dialer | lua/libs/fsm.lua | 15 | 7426 | -- ==========================================================================================
--
-- Finite State Machine Class for Lua 5.1 & Corona SDK
--
-- Written by Erik Cornelisse, inspired by Luiz Henrique de Figueiredo
-- E-mail: e.cornelisse@gmail.com
--
-- Version 1.0 April 27, 2011
--
-- Class is MIT Lice... | mpl-2.0 |
mms92/wire | lua/wire/stools/vthruster.lua | 9 | 8209 | WireToolSetup.setCategory( "Physics/Force" )
WireToolSetup.open( "vthruster", "Vector Thruster", "gmod_wire_vectorthruster", nil, "Vector Thrusters" )
if ( CLIENT ) then
language.Add( "Tool.wire_vthruster.name", "Vector Thruster Tool (Wire)" )
language.Add( "Tool.wire_vthruster.desc", "Spawns a vector thruster for u... | apache-2.0 |
SammyJames/Rave | Rave.lua | 1 | 4239 | ----------------------------------------------------------
-- Rave - a chat addon
--
-- @author Pawkette ( pawkette.heals@gmail.com )
----------------------------------------------------------
local kAddonName, kVersion = 'Rave', 1.0
local Rave = Rave
local Constants = Rave.Constants
local tinsert ... | mit |
sami2448/sam | plugins/on&off.lua | 2 | 1712 | — Checks if bot was disabled on specific chat
local function is_channel_disabled( receiver )
if not _config.disabled_channels then
return false
end
if _config.disabled_channels[receiver] == nil then
return false
end
return _config.disabled_channels[receiver]
end
local function enable_channel(receiv... | gpl-2.0 |
shkan/telebot7 | plugins/time.lua | 120 | 2804 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
sigma-random/PrefSDK | formats/pdf/definition.lua | 1 | 2670 | local pref = require("pref")
local PdfTypes = require("formats.pdf.types")
local PdfParser = require("formats.pdf.parser")
local DataType = pref.datatype
local PdfFormat = pref.format.create("Portable Document Format", "Documents", "Dax", "1.1b")
function PdfFormat:validate(validator)
validator:checkAscii(0, "%PDF-... | gpl-3.0 |
thenumbernine/hydro-cl-lua | tests/euler fluid equations/plot.lua | 1 | 1246 | #!/usr/bin/env luajit
-- plot the var-ranges.txt created by running the app.lua with 'output variable ranges' set
require 'ext'
local fn = assert((...))
local matrix = require 'matrix'
local _ = range
local ls = file(fn):read():trim():split'\n'
local cols = ls:remove(1):split'\t'
local m = matrix(ls:map(function(l)
... | mit |
mms92/wire | lua/effects/thruster_ring_grow1.lua | 10 | 1652 |
EFFECT.Mat = Material( "effects/select_ring" )
/*---------------------------------------------------------
Initializes the effect. The data is a table of data
which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
local size = 16
self:SetCol... | apache-2.0 |
LuaDist2/luaposix | lib/posix/deprecated.lua | 1 | 31197 | --[[
POSIX library for Lua 5.1, 5.2 & 5.3.
Copyright (C) 2014-2017 Gary V. Vaughan
]]
--[[--
Legacy Lua POSIX bindings.
Undocumented Legacy APIs for compatibility with previous releases.
@module posix.deprecated
]]
local _argcheck = require "posix._argcheck"
local bit = require "bit32"
-- Lua 5.3 has tab... | mit |
mms92/wire | lua/wire/stools/button.lua | 9 | 1719 | WireToolSetup.setCategory( "Input, Output" )
WireToolSetup.open( "button", "Button", "gmod_wire_button", nil, "Buttons" )
if CLIENT then
language.Add( "tool.wire_button.name", "Button Tool (Wire)" )
language.Add( "tool.wire_button.desc", "Spawns a button for use with the wire system." )
language.Add( "tool.wire_but... | apache-2.0 |
emoon/ProDBG | bin/macosx/tundra/scripts/tundra/syntax/files.lua | 20 | 1437 | module(..., package.seeall)
local decl = require "tundra.decl"
local depgraph = require "tundra.depgraph"
local common_blueprint = {
Source = {
Required = true,
Help = "Source filename",
Type = "string",
},
Target = {
Required = true,
Help = "Target filename",
Type = "string",
},
}... | mit |
AlexarJING/space-war | obj/weapons/proton.lua | 1 | 3332 | local proton=Class("proton")
function proton:initialize(parent,x,y,rot)
self.x=x
self.y=y
self.speed=3
self.rot=rot
self.parent=parent
self.r=20
self.life_max=300
self.life=self.life_max
self.cr=0
self.frags={}
self.frag_cd=1
self.frag_time=0
self.frag_max=100
self.frag_speed=5
self.frag_acc=0.1
self.... | apache-2.0 |
thenumbernine/hydro-cl-lua | hydro/eqn/shallow-water.lua | 1 | 10535 | --[[
based off of:
2011 Berger et al - The GeoClaw software for depth-averaged flows with adaptive refinement
with help from:
2016 Titov et al - Development of MOST for Real-Time Tsunami Forecasting
https://en.wikipedia.org/wiki/Shallow_water_equations
--]]
local class = require 'ext.class'
local table = require 'ex... | mit |
MRAHS/SBSS-Pro | bot/utils.lua | 646 | 23489 | 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 |
shkan/telebot3 | bot/utils.lua | 646 | 23489 | 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 |
pinkysnowman/homedecor_modpack | homedecor/tables.lua | 12 | 5672 | -- Various kinds of tables
local S = homedecor.gettext
local materials = {
{"glass","Glass"},
{"wood","Wood"}
}
local tables_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
}
for i in ipairs(materials) do
local m = materials[i][1]
local d = materials[i][2]
local s = nil
if ... | lgpl-3.0 |
GSRMOHAMMAD/forcetg | plugins/google.lua | 3 | 1110 | local function googlethat(query)
local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&"
local parameters = "q=".. (URL.escape(query) or "")
-- Do the request
local res, code = https.request(api..parameters)
if code ~=200 then return nil end
local data = json:decode(res)
local r... | gpl-2.0 |
Justinon/LorePlay | libs/LibAddonMenu-2.0/controls/texture.lua | 7 | 1661 | --[[textureData = {
type = "texture",
image = "file/path.dds",
imageWidth = 64, --max of 250 for half width, 510 for full
imageHeight = 32, --max of 100
tooltip = "Image's tooltip text.", -- or string id or function returning a string (optional)
width = "full", --or "half" (optional)
referen... | artistic-2.0 |
cogwerkz/DiabolicUI | locale/locale-esMX.lua | 2 | 1325 | local _, Engine = ...
local L = Engine:NewLocale("esMX")
if not L then return end
-- actionbar module
---------------------------------------------------------------------
-- keybinds
L["Alt"] = "A"
L["Ctrl"] = "C"
L["Shift"] = "S"
L["NumPad"] = "N"
L["Backspace"] = "BS"
L["Button1"] = "B1"
L["Button2"] = "B2"
L["B... | mit |
jnehl701/ACS | scripts/core/Aliases.lua | 1 | 5527 | echo("Alias file loaded.")
aliases.coreAliases = {
-- Useful for testing stuff
{pattern = "^> (.*)$", handler = function(input, pattern) doInLua(input, pattern) end},
{pattern = "^reload$", handler = function(input, pattern) reloadLua() end},
{pattern = "^reload (%w+)", handler = function(i, p) reloadLua... | gpl-2.0 |
mms92/wire | lua/entities/gmod_wire_expression2/core/compat.lua | 9 | 3207 | -- Functions in this file are retained purely for backwards-compatibility. They should not be used in new code and might be removed at any time.
e2function string number:teamName()
local str = team.GetName(this)
if not str then return "" end
return str
end
e2function number number:teamScore()
return team.GetScore... | apache-2.0 |
mehrpouya81/y | plugins/danbooru.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
omid1212/hgbok | plugins/danbooru.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
asanosoyokaze/skynet | lualib/mongo.lua | 10 | 16372 | local bson = require "bson"
local socket = require "socket"
local socketchannel = require "socketchannel"
local skynet = require "skynet"
local driver = require "mongo.driver"
local md5 = require "md5"
local crypt = require "crypt"
local rawget = rawget
local assert = assert
local table = table
local bson_encode = bso... | mit |
Lautitia/newfies-dialer | lua/libs/tag_replace.lua | 4 | 3193 | --
-- Newfies-Dialer License
-- http://www.newfies-dialer.org
--
-- 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/.
--
-- Copyright (C) 2011-2014 Star2Billing S.L.
--
--... | mpl-2.0 |
emoon/ProDBG | bin/win32/scripts/tundra/syntax/rust-cargo.lua | 3 | 7655 | -- rust-cargo.lua - Support for Rust and Cargo
module(..., package.seeall)
local nodegen = require "tundra.nodegen"
local files = require "tundra.syntax.files"
local path = require "tundra.path"
local util = require "tundra.util"
local depgraph = require "tundra.depgraph"
local native = require "tundra.... | mit |
amirfucker/uzzy_bot | bot/bot.lua | 1 | 7044 | 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 |
cogwerkz/DiabolicUI | modules/unitframes/elements/health.lua | 2 | 4173 | local _, Engine = ...
local Handler = Engine:GetHandler("UnitFrame")
local C = Engine:GetDB("Data: Colors")
local F = Engine:GetDB("Library: Format")
-- Lua API
local _G = _G
local math_floor = math.floor
local pairs = pairs
local tonumber = tonumber
local tostring = tostring
local unpack = unpack
-- WoW API
local Un... | mit |
liangjz92/deep_cqa | util/Yahoo.lua | 1 | 4550 | --[[
Yahoo manner 数据集的warper,用类的形式提供服务
liangjz 2015-3-22
训练集,通过get_sample获得一个三元组
测试集
问题数据,通过
--]]
--require('..')
local cjson = require('cjson')
local DataSet = torch.class('Yahoo') --保险语料库的读取warper
function DataSet:__init(name,negative_size)
local data_file =nil
if name=='train' then
data_file = 'data/yahoo/f... | apache-2.0 |
erwincoumans/premake-dev-iphone-xcode4 | tests/actions/make/test_wiidev.lua | 3 | 1262 | --
-- tests/actions/make/test_wiidev.lua
-- Tests for Wii homebrew support in makefiles.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.make_wiidev = { }
local suite = T.make_wiidev
local make = premake.make
local cpp = premake.make.cpp
local sln, prj, cfg
function suite.setup()
_ACTION ... | bsd-3-clause |
ArchShaman/Zero-K | scripts/cadenza.lua | 16 | 11499 | include "constants.lua"
--------------------------------------------------------------------------------
-- pieces
--------------------------------------------------------------------------------
local base, pelvis, torso = piece("base", "pelvis", "torso")
local rthigh, rleg, rfoot, lthigh, lleg, lfoot = piece("rthigh... | gpl-2.0 |
d9magai/freeciv | dependencies/tolua-5.2/src/bin/lua/define.lua | 14 | 1243 | -- tolua: define class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: define.lua,v 1.3 2009/11/24 16:45:13 fabraham Exp $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provi... | gpl-2.0 |
ArchShaman/Zero-K | LuaRules/Gadgets/unit_carrier_drones.lua | 4 | 31653 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
Paaskehare/SurvivalTD | game/survival_td/scripts/vscripts/gamemode.lua | 1 | 28647 | -- This is the primary barebones gamemode script and should be used to assist in initializing your game mode
-- Set this to true if you want to see a complete debug output of all events/processes done by barebones
-- You can also change the cvar 'barebones_spew' at any time to 1 or 0 for output/no output
BAREBONES_DE... | mit |
erwincoumans/premake-dev-iphone-xcode4 | tests/actions/vstudio/vc200x/test_compiler_block.lua | 1 | 7116 | --
-- tests/actions/vstudio/vc200x/test_compiler_block.lua
-- Validate generation the VCCLCompiler element in Visual Studio 200x C/C++ projects.
-- Copyright (c) 2011-2012 Jason Perkins and the Premake project
--
T.vs200x_compiler_block = { }
local suite = T.vs200x_compiler_block
local vc200x = premake.vstu... | bsd-3-clause |
brahmi2/prosody-modules | mod_swedishchef/mod_swedishchef.lua | 32 | 1690 | -- Copyright (C) 2009 Florian Zeitz
-- Copyright (C) 2009 Matthew Wild
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local trigger_string = module:get_option_string("swedishchef_trigger");
trigger_string = (trigger_string and trigger_string .. " "... | mit |
jchuang1977/my_luci | modules/admin-full/luasrc/controller/admin/index.lua | 79 | 1245 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
mod... | apache-2.0 |
DigitalCrypto/scite-mql | additions/Ctagsdx.lua | 3 | 6325 | -- browse a tags database from SciTE!
-- Set this property:
-- ctags.path.php=<full path to tags file>
-- 1. Multiple tags are handled correctly; a drop-down
-- list is presented
-- 2. There is a full stack of marks available.
-- 3. If ctags.path.php is not defined, will try to find a tags file in the current dir.
if s... | isc |
erwincoumans/premake-dev-iphone-xcode4 | tests/actions/vstudio/vc200x/test_debug_settings.lua | 1 | 2419 | --
-- tests/actions/vstudio/vc200x/test_debugdir.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2012 Jason Perkins and the Premake project
--
T.vstudio_vs200x_debugdir = { }
local suite = T.vstudio_vs200x_debugdir
local vc200x = premake.vstudio.vc200x
local project = premake... | bsd-3-clause |
ArchShaman/Zero-K | scripts/planescout.lua | 5 | 1312 | include 'constants.lua'
include "fixedwingTakeOff.lua"
--------------------------------------------------------------------
-- constants/vars
--------------------------------------------------------------------
local base, nozzle, thrust = piece("base", "nozzle", "thrust")
local smokePiece = {base}
local SIG_CLOAK = ... | gpl-2.0 |
Jobq/vlc-mdc | share/lua/playlist/dailymotion.lua | 19 | 3036 | --[[
Translate Daily Motion video webpages URLs to the corresponding
FLV URL.
$Id$
Copyright © 2007-2011 the VideoLAN team
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 versio... | gpl-2.0 |
alarouche/premake-core | tests/tools/test_snc.lua | 16 | 3478 | --
-- tests/test_snc.lua
-- Automated test suite for the SNC toolset interface.
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
--
local suite = test.declare("tools_snc")
local snc = premake.tools.snc
--
-- Setup/teardown
--
local wks, prj, cfg
function suite.setup()
wks, prj = test.createW... | bsd-3-clause |
rashed8271/bot | lang/italian_lang.lua | 32 | 20741 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
switch-ch/switchdrive-ansible | roles/haproxy/templates/lua/ldapUserLookup.lua | 1 | 1868 | package.cpath = package.cpath .. ";/usr/lib/lua/5.3/?.so";
local lualdap = require "lualdap"
local ldap = nil;
local servers = {"86.119.30.169", "86.119.34.136"}
local server_id = 0;
function connect()
-- "{hostvars[groups['ldap'][0]].inventory_hostname}}",
ldap = assert (lualdap.open_simple (
server... | agpl-3.0 |
brahmi2/prosody-modules | mod_couchdb/couchdb/mod_couchdb.lua | 32 | 2155 |
local http = require "socket.http";
local url = require "socket.url";
local couchapi = module:require("couchdb/couchapi");
local json = module:require("couchdb/json");
local couchdb_url = assert(module:get_option("couchdb_url"), "Option couchdb_url not specified");
local db = couchapi.db(couchdb_url);
local functio... | mit |
ArchShaman/Zero-K | scripts/striderdetriment.lua | 9 | 9561 | include 'constants.lua'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- pieces
local pelvis, torso, head, shouldercannon, shoulderflare = piece('pelvis', 'torso', 'head', 'shouldercannon', 'shoulderfla... | gpl-2.0 |
jokerdevv/Joker-Developer | plugins/msg_checks.lua | 10 | 10753 | --[[
# For More Information ....!
# Developer : Aziz < @devss_bot > #Dev
# our channel: @help_tele
]]
--Begin msg_checks.lua
--Begin pre_process function
local function pre_process(msg)
-- Begin 'RondoMsgChecks' text checks by @rondoozle
if is_chat_msg(msg) or is_super_group(msg) then
if msg and not is_momod(msg... | gpl-2.0 |
jboecker/dcs-witchcraft | WitchcraftExport.lua | 1 | 4752 | -- This is a stripped-down version of witchcraft.lua adapted to work
-- as a backend for the Lua Console within the Export.lua environment.
-- Call this file from export.lua to use the Witchcraft Lua Console
-- in the DCS Export environment.
-- Note that you should not run a mission that calls witchcraft.start() ... | gpl-3.0 |
focusworld/big | plugins/banhammer.lua | 4 | 11920 |
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 |
darkstalker/moonhowl | src/moonhowl/gui/dm_view.lua | 1 | 1353 | local lgi = require "lgi"
local Gtk = lgi.Gtk
local object = require "moonhowl.object"
local ui = require "moonhowl.ui"
local dm_view = object:extend()
function dm_view:_init()
self.icon = ui.image_view:new()
self.handle = Gtk.Box{
id = "dm_view",
spacing = 10,
self.icon.handle,
... | mpl-2.0 |
ashemedai/ProDBG | bin/macosx/tundra/scripts/tundra/boot.lua | 25 | 4138 | module(..., package.seeall)
-- Use "strict" when developing to flag accesses to nil global variables
-- This has very low perf impact (<0.1%), so always leave it on.
require "strict"
local os = require "os"
local platform = require "tundra.platform"
local util = require "tundra.util"
local depgraph = re... | mit |
DBReinitialized/PigBot | Source/deps/discordia/utils/OrderedCache.lua | 4 | 2513 | local Cache = require('./Cache')
local OrderedCache, property, method = class('OrderedCache', Cache)
OrderedCache.__description = "Extention of Cache that maintains object order using a linked list. If the ordered cache is full, adding a new object will discard the oldest object."
function OrderedCache:__init(array, ... | mit |
phi-psi/luci | modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua | 55 | 8246 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... | apache-2.0 |
ryanplusplus/xlua | exercises/food-chain/food-chain_spec.lua | 2 | 4089 | local song = require('food-chain')
describe('food-hain', function ()
it('fly', function ()
local expected = "I know an old lady who swallowed a fly.\nI don't know why she swallowed the fly. Perhaps she'll die.\n"
assert.are.equal(expected, song.verse(1))
end)
it('spider', function ()
local expected... | mit |
gevero/S4 | examples/Liu_OE_17_21897_2009/fig3f.lua | 7 | 1392 | -- Fig. 3f of
-- Victor Liu, Michelle Povinelli, and Shanhui Fan,
-- "Resonance-enhanced optical forces between coupled photonic crystal slabs",
-- Optics Express, Vol. 17, No. 24, 2009
S = S4.NewSimulation()
S:SetLattice({1,0}, {0,0}) -- 1D lattice
S:SetNumG(27)
-- Material definition
S:AddMaterial("Silico... | gpl-2.0 |
erwincoumans/premake-dev-iphone-xcode4 | src/actions/xcode/xcode_common.lua | 1 | 29158 | --
-- xcode_common.lua
-- Functions to generate the different sections of an Xcode project.
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
local xcode = premake.xcode
local tree = premake.tree
--
-- Return the Xcode build category for a given file, based on the file extension.
--
-- @param no... | bsd-3-clause |
piller187/LeadwerksComponentSystem | LcsSample/scripts/GUI/Slider.lua | 1 | 27093 | --Styles
if Style==nil then Style={} end
if Style.Slider==nil then Style.Slider={} end
Style.Slider.Horizontal=1
Style.Slider.Vertical=2
Style.Slider.Scrollbar=4
Style.Slider.Trackbar=8
Style.Slider.Stepper=16
--Initial values
Script.hovered=false
Script.itemheight=20
Script.sliderwidth=19
Script.sliderin... | gpl-3.0 |
ktosiu/nodemcu-firmware | lua_modules/http/http.lua | 89 | 6624 | ------------------------------------------------------------------------------
-- HTTP server module
--
-- LICENCE: http://opensource.org/licenses/MIT
-- Vladimir Dronnikov <dronnikov@gmail.com>
------------------------------------------------------------------------------
local collectgarbage, tonumber, tostring = col... | mit |
ktosiu/nodemcu-firmware | examples/fragment.lua | 55 | 19918 | pwm.setup(0,500,50) pwm.setup(1,500,50) pwm.setup(2,500,50)
pwm.start(0) pwm.start(1) pwm.start(2)
function led(r,g,b) pwm.setduty(0,g) pwm.setduty(1,b) pwm.setduty(2,r) end
wifi.sta.autoconnect(1)
a=0
tmr.alarm( 1000,1,function() if a==0 then a=1 led(50,50,50) else a=0 led(0,0,0) end end)
sv:on("receive", function(s,... | mit |
ArchShaman/Zero-K | effects/gundam_jetflash.lua | 25 | 1649 | -- jetflash
return {
["jetflash"] = {
bitmapmuzzleflame = {
air = true,
class = [[CBitmapMuzzleFlame]],
count = 1,
ground = true,
underwater = 1,
water = true,
properties = {
colormap ... | gpl-2.0 |
hacker44-h44/1456 | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
ArchShaman/Zero-K | units/staticantinuke.lua | 1 | 4067 | unitDef = {
unitname = [[staticantinuke]],
name = [[Antinuke]],
description = [[Strategic Nuke Interception System]],
acceleration = 0,
activateWhenBuilt = true,
brakeRate = 0,
buildCostMetal ... | gpl-2.0 |
ArchShaman/Zero-K | units/chicken_digger_b.lua | 5 | 3435 | unitDef = {
unitname = [[chicken_digger_b]],
name = [[Digger (burrowed)]],
description = [[Burrowing Scout/Raider]],
acceleration = 0.26,
activateWhenBuilt = false,
brakeRate = 0.205,
buildCostEnergy = 0,
buildCostMetal = 0,
builder ... | gpl-2.0 |
galnegus/Glaskross | lib/sperm/loveframes/objects/imagebutton.lua | 3 | 7501 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2013 Kenny Shields --
--]]------------------------------------------------
-- imagebutton object
local newobject = loveframes.NewObject("imagebutton", "loveframes_object_imagebutton", true)
--[[---------... | mit |
sahilshah/openface | training/donkey.lua | 2 | 2989 | -- Source: https://github.com/facebook/fbcunn/blob/master/examples/imagenet/donkey.lua
--
-- Copyright (c) 2014, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of pa... | apache-2.0 |
brahmi2/prosody-modules | mod_onhold/mod_onhold.lua | 32 | 2253 | -- Prosody IM
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
-- Copyright (C) 2009 Jeff Mitchell
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local datamanager = require "util.datamanager";
local jid_bare = requi... | mit |
ytjiang/redis | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
alarouche/premake-core | src/host/lua-5.1.4/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
haima-zju/redis-3.0-annotated | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
erwincoumans/premake-dev-iphone-xcode4 | tests/actions/xcode/test_xcode_dependencies.lua | 20 | 9645 | --
-- tests/actions/xcode/test_xcode_dependencies.lua
-- Automated test suite for Xcode project dependencies.
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
T.xcode3_deps = { }
local suite = T.xcode3_deps
local xcode = premake.xcode
----------------------------------------------------------... | bsd-3-clause |
KurdyMalloy/packages | net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua | 82 | 4185 | -- ------ extra functions ------ --
function ruleCheck() -- determine if rule needs a protocol specified
local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".src_port"))
local destPort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".dest_port"))
if sourcePort ~= "" or d... | gpl-2.0 |
jchuang1977/my_luci | applications/luci-mjpg-streamer/luasrc/model/cbi/mjpg-streamer.lua | 2 | 1432 | --[[
LuCI - Lua Configuration Interface - mjpg-streamer support
Script by oldoldstone@gmail.com
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$
]... | apache-2.0 |
ArchShaman/Zero-K | units/shieldarty.lua | 4 | 3911 | unitDef = {
unitname = [[shieldarty]],
name = [[Racketeer]],
description = [[Disarming Artillery]],
acceleration = 0.25,
brakeRate = 0.75,
buildCostMetal = 350,
buildPic = [[SHIELDARTY.png]],
canGuard =... | gpl-2.0 |
spectras/keyleds | keyledsd/effects/whack-a-mole.lua | 1 | 3017 |
config = {
moleIntervalIncrement = .95,
moleLifetimeIncrement = .98,
startColor = keyleds.config.startColor or tocolor(.5, .5, 0),
endColor = keyleds.config.endColor or tocolor(1, 0, 0),
keys = keyleds.groups[keyleds.config.group] or keyleds.db
}
scoreKeys = {"F1", "F2", "F3", "F4", "F5", "F6", "... | gpl-3.0 |
eigenl/tge | bin/scripts/raycaster/renderer.lua | 1 | 4194 | Renderer = {}
Renderer.castRays = function ()
local w = 80
local h = 25
for x = 0, w-1, 1 do
-- Calculate ray position and direction
local rayColumn = ((2 * x) / w) - 1
local rayPosX = Player.PosX
local rayPosY = Player.PosY
local rayDirX = Player.DirX + Player.PlaneX * rayColumn
local rayDirY = Pl... | mit |
erwincoumans/premake-dev-iphone-xcode4 | tests/test_vs2002_sln.lua | 14 | 1629 | --
-- tests/test_vs2002_sln.lua
-- Automated test suite for Visual Studio 2002 solution generation.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
T.vs2002_sln = { }
local suite = T.vs2002_sln
local sln2002 = premake.vstudio.sln2002
--
-- Configure a solution for testing
--
local sln
function su... | bsd-3-clause |
mixflowtech/logsensor | lib/luajit/src/jit/bc.lua | 78 | 5620 | ----------------------------------------------------------------------------
-- LuaJIT bytecode listing module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
-... | apache-2.0 |
phi-psi/luci | applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua | 85 | 3942 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010-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
htt... | apache-2.0 |
gevero/S4 | examples/Li_JOSA_14_2758_1997/ex1_normal.lua | 7 | 1262 | -- Extension of Example 1A in
-- Lifeng Li,
-- "New formulation of the Fourier modal method for crossed surface-relief gratings"
-- Journal of the Optical Society of America A, Vol. 14, No. 10, p. 2758 (1997)
-- This would be in Fig. 6
S = S4.NewSimulation()
S:SetLattice({2.5,0}, {0,2.5})
S:SetNumG(200)
S:... | gpl-2.0 |
mixflowtech/logsensor | src/program/lisper/dev-env-docker/l2tp.lua | 28 | 7462 | #!snabb/src/snabb snsh
io.stdout:setvbuf'no'
io.stderr:setvbuf'no'
--L2TP IP-over-IPv6 tunnelling program for testing.
local function assert(v, ...)
if v then return v, ... end
error(tostring((...)), 2)
end
local ffi = require'ffi'
local S = require'syscall'
local C = ffi.C
local htons = require'... | apache-2.0 |
mixflowtech/logsensor | lib/ljsyscall/syscall/linux/mips/constants.lua | 24 | 9285 | -- mips specific constants
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
local h = require "syscall.helpers... | apache-2.0 |
danielg4/packages | utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/nat_traffic.lua | 79 | 1251 | local function scrape()
-- documetation about nf_conntrack:
-- https://www.frozentux.net/iptables-tutorial/chunkyhtml/x1309.html
nat_metric = metric("node_nat_traffic", "gauge" )
for e in io.lines("/proc/net/nf_conntrack") do
-- output(string.format("%s\n",e ))
local fields = space_split(e)
local ... | gpl-2.0 |
terry2012/codereason | scripts/valu/and.lua | 3 | 1376 | function onPre(v)
--say that we could have a 32-bit value in any general purpose register
regClass = {}
regClass[CLASS] = GenericRegister
regClass[VALUE] = 21
regClass[WIDTH] = 32
vee.setregclass(v, regClass)
--and then say that we have some other 32-bit value in any general purpose
... | mit |
ArchShaman/Zero-K | units/factoryamph.lua | 3 | 2331 | unitDef = {
unitname = [[factoryamph]],
name = [[Amphbot Factory]],
description = [[Produces Amphibious Bots, Builds at 10 m/s]],
buildCostMetal = Shared.FACTORY_COST,
builder = true,
buildingGroundDecalDecaySpeed = 30,
buildingGroundDecalSizeX = 10,
buildingGrou... | gpl-2.0 |
atatsu/strugglebus | genwiki.lua | 1 | 1338 | package.path = package.path .. ";" .. "./mtmmo/?.lua"
local nodevalues = require("nodevalues")
local constants = require("constants")
local nodes = {}
for k, v in pairs(nodevalues) do
local mod_node = k
local category, exp = unpack(v)
category = constants.SKILLS[category]
local found, _, modname, nod... | bsd-2-clause |
SawyerHood/mal | lua/step5_tco.lua | 12 | 3143 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local Env = require('env')
local core = require('core')
local List, Vector, HashMap = types.List, typ... | mpl-2.0 |
dangersos/fffff | plugins/rss.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
amirquick/quick | plugins/ress.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.