repo_name stringlengths 6 78 | path stringlengths 4 206 | copies stringclasses 281
values | size stringlengths 4 7 | content stringlengths 625 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
ckaotik/ckaosCraft | libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua | 4 | 56631 | --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 1089 2013-09-13 14:32:35Z nevcairiel $
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 58
local AceConfigDialog, oldminor = LibStub... | bsd-3-clause |
telematin/telematinweb | 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 |
sina99/sina | 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 |
trompetin17/wxFormBuilder-Atlas | sdk/tinyxml/ticpp.lua | 3 | 4632 | --*****************************************************************************
--* Author: RJP Computing <rjpcomputing@gmail.com>
--* Date: 01/21/2008
--* Version: 1.02
--* Copyright (C) 2008 RJP Computing
--*
--* Permission is hereby granted, free of charge, to any person obtaining a copy of
--* this softwar... | gpl-2.0 |
adib1380/BotiSmylife | 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 |
graydon/monotone | tests/automate_lua/__driver__.lua | 1 | 2294 |
mtn_setup()
check(get("test.lua"))
function equalRecursive(left, right)
if (type(left) ~= type(right)) then
L("type mismatch: ", type(left), " vs ", type(right), "\n")
return false
end
if (type(left) == "table") then
for k,v in ipairs(left) do
-- a not existing key is ... | gpl-2.0 |
pgl/prat | services/patterns.lua | 2 | 4842 | ---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2008 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public Licen... | gpl-3.0 |
mega9/GTW-RPG | [misc]/modshop/colorpicker/picker_client.lua | 3 | 9608 | sw, sh = guiGetScreenSize()
preHex = false
pickerTable = {}
colorPicker = {}
colorPicker.__index = colorPicker
function openPicker(id, start, title)
if id and not pickerTable[id] then
pickerTable[id] = colorPicker.create(id, start, title)
pickerTable[id]:updateColor()
return true
end
return false
en... | gpl-3.0 |
longmian/skynet | lualib/snax.lua | 59 | 3683 | local skynet = require "skynet"
local snax_interface = require "snax.interface"
local snax = {}
local typeclass = {}
local interface_g = skynet.getenv("snax_interface_g")
local G = interface_g and require (interface_g) or { require = function() end }
interface_g = nil
skynet.register_protocol {
name = "snax",
id =... | mit |
Star2Billing/newfies-dialer | lua/playarea/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 |
drandell/btmn | Libraries/lovelyMoon.lua | 1 | 2762 | --[[
-- LövelyMoon stateManager - slight tweaks by myself purely for my own clarity.
-- Made by Davidobot
--]]
lovelyMoon = {}
function lovelyMoon.update(dt)
for index, state in pairs(stateManager.states) do
if state and state._enabled and state.update then
local newState = state:update(dt)
... | gpl-3.0 |
noa/nn | Euclidean.lua | 24 | 5711 | local Euclidean, parent = torch.class('nn.Euclidean', 'nn.Module')
function Euclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- state
self.gradInput:resize(inputSize)
self.output:resize(o... | bsd-3-clause |
focusworld/focus | plugins/id.lua | 226 | 4260 | 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, result)
local re... | gpl-2.0 |
pgl/prat | modules/Paragraph.lua | 2 | 5947 | ---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2007 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public Lice... | gpl-3.0 |
nuvie/nuvie | data/scripts/common/lang.lua | 2 | 1054 |
local lang
local lang_en
local game_type = config_get_game_type()
local lang_selected = config_get_language()
function lang_init(lang_type)
if lang_type ~= "intro" then
lang_type = "game"
end
lang_en = nuvie_load(string.lower(game_type).."/lang/en/"..lang_type..".lua")
if lang_en == nil then
... | gpl-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[race]/race_progress/defaultSettings.lua | 4 | 1656 | ---
-- Defines the default settings for the progress bar
-- which can be changed by each player indivudally via
-- the GUI.
--
-- @author driver2
-- @copyright 2009-2010 driver2
--
-- Recent changes:
-- 2010-02-09: Added toggleSettingsGuiKey, commented out unused settings
defaultSettings = {
["enabled"] = false,
["... | mit |
apemanzilla/JVML-JIT | CCLib/src/java/lang/native/Throwable.lua | 2 | 1028 | natives["java.lang.Throwable"] = natives["java.lang.Throwable"] or {}
natives["java.lang.Throwable"]["fillInStackTrace()Ljava/lang/Throwable;"] = function(this)
local stackTrace = newArray(getArrayClass("[Ljava.lang.StackTraceElement;"), 0)
local lStackTrace = getStackTrace()
stackTrace[4] = #lStackTrace -... | mit |
spark051/bt.bot | 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 |
cere-bro/telegram-bot | 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 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/src/base/io.lua | 7 | 1503 | --
-- io.lua
-- Additions to the I/O namespace.
-- Copyright (c) 2008-2009 Jason Perkins and the Premake project
--
--
-- Prepare to capture the output from all subsequent calls to io.printf(),
-- used for automated testing of the generators.
--
function io.capture()
io.captured = ''
end
--
-- Returns the... | gpl-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[race]/race/editor_support_server.lua | 4 | 5993 | --
-- editor_support_server.lua
--
function isEditor()
-- see if editor resource running
if g_IsEditor == nil then
local editorRes = getResourceFromName( "editor" )
g_IsEditor = editorRes and getResourceState( editorRes ) == 'running'
outputDebug ( "Server: Is editor " .. tostring(g_IsEditor == true) )
end
... | mit |
Scoth42/rfkasm | fceux-2.2.2-win32/luaScripts/MegamanII-LaserEyes.lua | 3 | 18150 | SCRIPT_TITLE = "Mega Man 2 LASER EYES"
SCRIPT_VERSION = "1.0"
require "m_utils"
m_require("m_utils",0)
--[[
Mega Man 2 LASER EYES
version 1.0 by miau
Visit http://morphcat.de/lua/ for the most recent version and other scripts.
Controls
Press select to fire a laser from Mega Man's eyes aimed at the closest object.... | gpl-2.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/base/test_tree.lua | 63 | 2786 | --
-- tests/base/test_tree.lua
-- Automated test suite source code tree handling.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
T.tree = { }
local suite = T.tree
local tree = premake.tree
--
-- Setup/teardown
--
local tr, nodes
function suite.setup()
tr = tree.new()
nodes = { }
end
... | gpl-2.0 |
icetoggle/skynet | service/gate.lua | 16 | 2079 | local skynet = require "skynet"
local gateserver = require "snax.gateserver"
local watchdog
local connection = {} -- fd -> connection : { fd , client, agent , ip, mode }
local forwarding = {} -- agent -> connection
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
}
local handler = {}
function... | mit |
ntop/ntopng | scripts/lua/modules/alert_definitions/flow/alert_flow_tcp_no_data_exchanged.lua | 1 | 1584 | --
-- (C) 2019-22 - ntop.org
--
-- ##############################################
local flow_alert_keys = require "flow_alert_keys"
-- Import the classes library.
local classes = require "classes"
-- Make sure to import the Superclass!
local alert = require "alert"
-- ##############################################
... | gpl-3.0 |
ac-minetest/smart_mobs | sandmonster.lua | 1 | 1049 |
-- Sand Monster by PilzAdam
mobs:register_mob("mobs:sand_monster", {
type = "monster",
passive = false,
attack_type = "dogfight",
reach = 2,
damage = 1,
hp_min = 4,
hp_max = 20,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
mesh = "mobs_sand_monster.b3d",
textures = {
{"m... | mit |
HertzDevil/MGCInts | src/mgcints/music/linker.lua | 1 | 3739 | -- 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/.
--- A linker that facilitates inserting streams into a binary file.
-- @classmod Music.Linker
-- @alias cls
local cls... | mpl-2.0 |
numo16/wesnoth | data/ai/micro_ais/cas/ca_protect_unit_move.lua | 26 | 3509 | local H = wesnoth.require "lua/helper.lua"
local LS = wesnoth.require "lua/location_set.lua"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local function get_protected_units(cfg)
local units = {}
for _,id in ipairs(cfg.id) do
table.insert(units, ... | gpl-2.0 |
graydon/monotone | tests/exchanging_work_via_netsync_sent_notes/__driver__.lua | 1 | 1888 | -- Test note_netsync_*_sent hooks
--
-- Similar to
-- ../exchanging_work_via_netsync,_with_notes/__driver__.lua, but here
-- we do "push" instead of "pull".
include("common/netsync.lua")
mtn_setup()
netsync.setup_with_notes()
revs = {}
remove("_MTN")
check(mtn2("setup", "--branch=testbranch"), 0, nil, nil)
function ... | gpl-2.0 |
maikerumine/aftermath | mods/vehicles/init.lua | 2 | 74240 | -- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
vehicles = {}
dofile(minetest.get_modpath("vehicles").."/api.lua")
--very laggy and buggy flight
-- minetest.register_globalstep(function(dtime)
-- for _, player in ipairs(minetest.g... | lgpl-2.1 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/base/test_table.lua | 14 | 1035 | --
-- tests/base/test_table.lua
-- Automated test suite for the new table functions.
-- Copyright (c) 2008-2010 Jason Perkins and the Premake project
--
T.table = { }
local suite = T.table
--
-- table.contains() tests
--
function suite.contains_OnContained()
t = { "one", "two", "three" }
test.istrue( table.... | gpl-2.0 |
mtyzaq/extra | luci/applications/luci-vsftpd/luasrc/model/cbi/vsftpd/general.lua | 11 | 4092 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2014 HackPascal <hackpascal@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://ww... | gpl-2.0 |
Scoth42/rfkasm | fceux-2.2.2-win32/luaScripts/Rewinder.lua | 3 | 2411 | -- NES Braidulator VERSION 1
--(C) Antony Lavelle 2009 got_wot@hotmail.com http://www.the-exp.net
-- A Lua script that allows 'Braid' style time reversal for Nes games being run in FCEUX
--'Braid' is copyright Jonathan Blow, who is not affiliated with this script, but you should all buy his game because it's... | gpl-2.0 |
mohammadclashclash/mehdi002 | 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 |
RockySeven3161/Unknown8765 | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
nsimplex/snailking | scripts/snailking/wicker/utils/string.lua | 2 | 1130 | --[[
Copyright (C) 2013 simplex
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.
This program is distributed in the hope that ... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/notifications/recipients.lua | 1 | 37092 | --
-- (C) 2017-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/pools/?.lua;" .. package.path
local json = require "dkjson"
local alert_severities = require "alert_severities"
local alert_consts = require "alert_consts"
local alert_entities = require "alert_entities... | gpl-3.0 |
RadioactiveMonkey/InflateGame | Inflate/bullet.lua | 1 | 2610 | class = require 'middleclass'
Bullet = class("Bullet")
function Bullet:initialize( x , y , ang , ratio , speed , dam , friendly )
self.position = Vector2:new( x , y )
self.size = Vector2:new( 15 * ( 1 + dam / 10 ) , 15 * ( 1 + dam / 10 ) )
self.offset = Vector2:new( self.size.x / 2 , self.size.y / 2 )
self.Bullet... | mit |
Bierbuikje/Mr.Green-MTA-Resources | resources/[race]/race/_joiner_client.lua | 4 | 5671 | --
-- joiner_client.lua
--
-- see joiner.lua for details
--
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
addEvent('onClientPlayerJoining') -- Pre join
addEvent('onClientPlayerJoined') -- Post join
g_JoinedPlayers = {} -- List of joined players maintained at the clien... | mit |
cmangos/mangos-cata | dep/recastnavigation/RecastDemo/premake4.lua | 82 | 3551 | --
-- premake4 file to build RecastDemo
-- http://industriousone.com/premake
--
local action = _ACTION or ""
local todir = "Build/" .. action
solution "recastnavigation"
configurations {
"Debug",
"Release"
}
location (todir)
-- extra warnings, no exceptions or rtti
flags {
"ExtraWarnings",
"FloatFast"... | gpl-2.0 |
caohongtao/quick-cocos-demo | src/framework/cc/Registry.lua | 23 | 1841 |
local Registry = class("Registry")
Registry.classes_ = {}
Registry.objects_ = {}
function Registry.add(cls, name)
assert(type(cls) == "table" and cls.__cname ~= nil, "Registry.add() - invalid class")
if not name then name = cls.__cname end
assert(Registry.classes_[name] == nil, string.format("Registry.ad... | apache-2.0 |
noa/nn | LookupTable.lua | 23 | 2654 | local LookupTable, parent = torch.class('nn.LookupTable', 'nn.Module')
LookupTable.__version = 4
function LookupTable:__init(nIndex, nOutput)
parent.__init(self)
self.weight = torch.Tensor(nIndex, nOutput)
self.gradWeight = torch.Tensor(nIndex, nOutput):zero()
self:reset()
end
function LookupTable:back... | bsd-3-clause |
lemones/dotfiles | home/.config/awesome/req/battery.lua | 1 | 2340 | -- Battery
-- ( fontawesome )
local wibox = require("wibox")
local awful = require("awful")
local naughty = require("naughty")
local noisy = [['/home/lemones/bin/batpercent']]
awful.spawn.easy_async(noisy, function(stdout, stderr, reason, exit_code)
naughty.notify { text = stdout }
end)
batwidget = wibox.... | gpl-3.0 |
hatninja/SphealBot | commands/FC.lua | 1 | 2704 | local bot = ...
local fc = {
category = "Chat",
description = "Store your friend codes!",
users = {
},
consoles = {
["3DS"] = {
pattern = "%d%d%d%d%-%d%d%d%d%-%d%d%d%d"
},
["NNID"] = {
pattern = "^[0-9a-zA-Z_]+$"
},
["SW"] = {
pattern = "%d%d%d%d%-%d%d%d%d%-%d%d%d%d"
},
},
}
function fc:... | gpl-3.0 |
graydon/monotone | tests/workspace_migration/basic.lua | 1 | 1065 | ---- If you change this code, you will have to regenerate all of the
---- "basic-N" workspaces.
return {
min_format = 1,
creator =
function ()
check(mtn("setup", "-b", "basicbranch", "basic-current"))
chdir("basic-current")
addfile("testfile1", "blah blah\n")
addfile("testfile2", "asdfas dfsa\n")
... | gpl-2.0 |
corbinmunce/domoticz | dzVents/runtime/tests/testEventHelpersStorage.lua | 19 | 25650 | _G._ = require 'lodash'
local GLOBAL = false
local LOCAL = true
_G.TESMODE = true
--package.path = package.path .. ";../?.lua"
local scriptPath = ''
package.path = package.path .. ";../?.lua;" .. scriptPath .. '/?.lua;../device-adapters/?.lua;./data/?.lua;./generated_scripts/?.lua'
local Time = require('Time')
local ... | gpl-3.0 |
icetoggle/skynet | service/service_provider.lua | 10 | 2242 | local skynet = require "skynet"
local provider = {}
local function new_service(svr, name)
local s = {}
svr[name] = s
s.queue = {}
return s
end
local svr = setmetatable({}, { __index = new_service })
function provider.query(name)
local s = svr[name]
if s.queue then
table.insert(s.queue, skynet.response())
... | mit |
adib1380/BotiSmylife | 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 |
Mortezarohandeh1/hack_shop2bot | 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 |
dalab/deep-ed | utils/optim/adagrad_mem.lua | 1 | 1867 | -- Memory optimized implementation of optim.adagrad
--[[ ADAGRAD implementation for SGD
ARGS:
- `opfunc` : a function that takes a single input (X), the point of
evaluation, and returns f(X) and df/dX
- `x` : the initial point
- `state` : a table describing the state of the optimizer; after each
call... | apache-2.0 |
graydon/monotone | examples/display_branches.lua | 1 | 2619 | -- Lua snippet to display what branches were affected by revisions and certs
-- that came into the database. It will display each branch name and the
-- amount of times they each appeared.
-- I integrate it into my ~/.monotone/monotonerc
-- /Richard Levitte
--
-- Released as public domain
do
netsync_branches = {}
... | gpl-2.0 |
caohongtao/quick-cocos-demo | runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/cocos/extension/DeprecatedExtensionEnum.lua | 40 | 1369 |
_G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS
_G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS
_G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE
_G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN
_G.CCControlEventTouchDragInside = cc.CONTROL_... | apache-2.0 |
ntop/ntopng | scripts/lua/rest/v1/get/interface/l7/stats.lua | 2 | 2774 | --
-- (C) 2013-21 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local rest_utils = require("rest_utils")
local stats_utils = require("stats_utils")
--
-- Read statistics about nDPI application protocols on an interface
--... | gpl-3.0 |
xianjiec/nn | WeightedMSECriterion.lua | 22 | 1259 | local WeightedMSECriterion, parent = torch.class('nn.WeightedMSECriterion','nn.MSECriterion')
function WeightedMSECriterion:__init(w)
parent.__init(self)
self.weight = w:clone()
end
function WeightedMSECriterion:updateOutput(input,target)
self.buffer = self.buffer or input.new()
self.buffer:resizeAs(input... | bsd-3-clause |
ASantosVal/vlc-extension-trials | share/lua/intf/dumpmeta.lua | 98 | 2125 | --[==========================================================================[
dumpmeta.lua: dump a file's meta data on stdout/stderr
--[==========================================================================[
Copyright (C) 2010 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
Th... | gpl-2.0 |
telematin/telematinweb | plugins/admin.lua | 53 | 2402 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
pgl/prat | modules/AddonMessages.lua | 2 | 4962 | ---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2007 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public Lice... | gpl-3.0 |
Scoth42/rfkasm | fceux-2.2.2-win32/luaScripts/SMB3-RainbowRiding.lua | 3 | 14509 | SCRIPT_TITLE = "Super Mario Bros. 3 Rainbow Riding"
SCRIPT_VERSION = "0.1"
require "m_utils"
m_require("m_utils",0)
--[[
Super Mario Bros. 3 Rainbow Riding
version 0.1 by miau
Visit http://morphcat.de/lua/ for the most recent version and other scripts.
This script turns smb3 into a new game very similar to Kirby's ... | gpl-2.0 |
deveNovar/DEveNovar | plugins/meunfoo.lua | 3 | 1535 |
do
local function run(msg, matches)
if matches[1] == 'موقعي' then
if is_sudo(msg) then
send_document(get_receiver(msg), "./files/me/sudo.webp", ok_cb, false)
return "∬💛✨ֆاَٰنٍٰتّٰ∬❖🌞🎶﴾ مٍٰطَُِوٍّرِٰֆ 💸😾⋮ هَٰہۧاَٰذَْاَٰ اَٰلْٰبٌِٰوٍّتّٰ"
elseif is_admin1(msg) then
send_document(get_... | gpl-2.0 |
adib1380/BotiSmylife | plugins/anti-spam12.lua | 7 | 2439 | local NUM_MSG_MAX = 12 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 12
local function kick_user(user_id, chat_id)
local chat = 'chat#id'..chat_id
local user = 'user#id'..user_id
chat_del_user(chat, user, function (data, success, result)
if success ~= 1 then
local text = 'I can\'t... | gpl-2.0 |
ryosua/IST-331-Lab | config.lua | 1 | 2789 | if string.sub(system.getInfo("model"),1,4) == "iPad" then
application =
{
launchPad = false,
content =
{
width = 360,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
... | mit |
mohammad8/123456 | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- seconds
local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name.... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/stats_utils.lua | 1 | 2386 | --
-- (C) 2020-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require("lua_utils")
-- Stats Utils is a module with some utilities to manipolate statistics data
local stats_utils = {
-- Upper bounds to get severity for the export drops
... | gpl-3.0 |
huangleiBuaa/CenteredWN | models/old_r_CWN_BN_NS.lua | 1 | 5897 | --[[
--
--*********************************************************************************************
--Note: this model is based on the original residual network implemented by facebook: https://github.com/facebook/fb.resnet.torch
--
-- Copyright (c) 2016, Facebook, Inc.
-- All rights reserved.
--
-- This source ... | bsd-2-clause |
graydon/monotone | tests/automate_set_drop_attribute/__driver__.lua | 1 | 1819 |
mtn_setup()
-- path / arg checks
check(mtn("automate", "set_attribute"), 1, false, true)
check(qgrep("wrong argument count", "stderr"))
check(mtn("automate", "set_attribute", "too", "many", "many", "args"), 1, false, true)
check(qgrep("wrong argument count", "stderr"))
check(mtn("automate", "drop_attribute"), 1, fal... | gpl-2.0 |
millerlogic/ludebot | lua/gamearmleg.lua | 1 | 115392 | -- Copyright 2012-2014 Christopher E. Miller
-- License: GPLv2, see LICENSE file.
-- irccmd irc.freenode.net armleg "-input:RUN=$RUN {1+}" -load=gamearmleg.lua
require("serializer")
require("bot")
require("timers")
require("eventlog")
local gamechan = "#clowngames" -- Can be overridden via armleg.dat
local Time... | gpl-2.0 |
Star2Billing/newfies-dialer | lua/libs/getopt.lua | 5 | 1467 | -- getopt, POSIX style command line argument parser
-- param arg contains the command line arguments in a standard table.
-- param options is a string with the letters that expect string values.
-- returns a table where associated keys are true, nil, or a string value.
-- The following example styles are supported
-- ... | mpl-2.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/test_string.lua | 84 | 1550 | --
-- tests/test_string.lua
-- Automated test suite for the new string functions.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
T.string = { }
--
-- string.endswith() tests
--
function T.string.endswith_ReturnsTrue_OnMatch()
test.istrue(string.endswith("Abcdef", "def"))
end
function T.strin... | gpl-2.0 |
maikerumine/aftermath | mods/flowers/init.lua | 4 | 7757 | -- Minetest 0.4 mod: default
-- See README.txt for licensing and other information.
-- Namespace for functions
flowers = {}
-- Map Generation
dofile(minetest.get_modpath("flowers") .. "/mapgen.lua")
--
-- Flowers
--
-- Aliases for original flowers mod
minetest.register_alias("flowers:flower_rose", "flowers:ro... | lgpl-2.1 |
felipeprov/premake-core | tests/tools/test_gcc.lua | 3 | 10761 | --
-- tests/test_gcc.lua
-- Automated test suite for the GCC toolset interface.
-- Copyright (c) 2009-2013 Jason Perkins and the Premake project
--
local suite = test.declare("tools_gcc")
local gcc = premake.tools.gcc
local project = premake.project
--
-- Setup/teardown
--
local sln, prj, cfg
function suite.... | bsd-3-clause |
krattai/noo-ebs | docs/zeroMQ-guide2/examples/Lua/mdbroker.lua | 2 | 11586 | --
-- Majordomo Protocol broker
-- A minimal implementation of http://rfc.zeromq.org/spec:7 and spec:8
--
-- Author: Robert G. Jakabosky <bobby@sharedrealm.com>
--
require"zmq"
require"zmq.poller"
require"zmsg"
require"zhelpers"
require"mdp"
local tremove = table.remove
-- We'd normally pull these from config dat... | bsd-2-clause |
PicassoCT/Journeywar | gamedata/explosions/unitOnFire.lua | 1 | 5620 | -- electric_explosion
return {
["unitonfire"] = {
poof02 = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 0.2,
alw... | gpl-3.0 |
FlightControl-Master/MOOSE_MISSIONS | CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua | 1 | 3594 | ---
-- Name: CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed
-- Author: FlightControl
-- Date Created: 06 February 2017
--
-- # Situation:
--
-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute.
-- After 1 minute, the command center orders the Su-25T to engage the zone and ex... | gpl-3.0 |
b03605079/darkstar | scripts/zones/The_Celestial_Nexus/bcnms/celestial_nexus.lua | 13 | 1989 | -----------------------------------
-- Area: The Celestial Nexus
-- Name: The Celestial Nexus (ZM16)
-----------------------------------
package.loaded["scripts/zones/The_Celestial_Nexus/TextIDs"] = nil;
-------------------------------------
require("scripts/globals/titles");
require("scripts/globals/missions");
requi... | gpl-3.0 |
PicassoCT/Journeywar | units/journey/tigLilDecoy.lua | 1 | 1224 | local unitName = "tiglildecoy"
local unitDef = {
name = "Tiger Lily",
Description = "close Combatant with nano-structure solvent drenched Blades <Assault>",
objectName = "tigLil.s3o",
script = "tiglilscript.lua",
buildPic = "jtiglil.png",
decoyFor = "jtiglil",
--cost
buildCostMetal = 100,
buildCostEnergy = 0,... | gpl-3.0 |
bakpakin/heroku-buildpack-moonmint | heroku/share/lua/5.1/luarocks/upload.lua | 9 | 3014 |
local upload = {}
local util = require("luarocks.util")
local fetch = require("luarocks.fetch")
local pack = require("luarocks.pack")
local cfg = require("luarocks.cfg")
local Api = require("luarocks.upload.api")
util.add_run_function(upload)
upload.help_summary = "Upload a rockspec to the public rocks repository."
... | mit |
PicassoCT/Journeywar | units/centrail/cRailGun.lua | 1 | 1258 | local unitName = "cRailGun"
local unitDef = {
name = "Railgun",
objectName = "cRailGun.s3o",
description= "powerfull, longrange base Defenses.<Long Range Defense Building>",
script ="cRailGund.lua",
buildPic = "crailgun.png",
RadarDistance = 25,
SightDistance = 200,
buildCostMet... | gpl-3.0 |
PicassoCT/Journeywar | gamedata/explosions/burn.lua | 1 | 2852 | -- burn
return {
["burn"] = {
glow = {
air = true,
class = [[heatcloud]],
count = 1,
ground = true,
water = true,
properties = {
alwaysvisible = true,
heat = 3,
heatfal... | gpl-3.0 |
b03605079/darkstar | scripts/zones/Aht_Urhgan_Whitegate/npcs/Tsih_Kolgimih.lua | 38 | 1045 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Tsih Kolgimih
-- Type: Event Scene Replayer
-- @pos -143.000 0.999 11.000 50
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/... | gpl-3.0 |
Aquanim/Zero-K | LuaUI/Widgets/chili/Controls/window.lua | 6 | 2083 | --- Window module
--- Window fields.
-- Inherits from Control.
-- @see control.Control
-- @table Window
Window = Control:Inherit{
classname = 'window',
resizable = true,
draggable = true,
bringToFrontOnClick = true,
noFont = true,
minWidth = 50,
minHeight = 50,
defaultWidth = 400,
defaultHeight = 300,
}
l... | gpl-2.0 |
PicassoCT/Journeywar | scripts/jMobileDNACraddleScript.lua | 1 | 12039 | include "createCorpse.lua"
include "lib_OS.lua"
include "lib_UnitScript.lua"
include "lib_Animation.lua"
include "lib_Build.lua"
local piecesTable = {}
center = piece "center"
piecesTable[#piecesTable + 1] = {}
piecesTable[#piecesTable] = center
fclvl23DS = piece "fclvl2.3DS"
piecesTable[#piecesTable + 1] = {}
piece... | gpl-3.0 |
virtualopensystems/snabbswitch | src/program/snabbnfv/fuzz/fuzz.lua | 15 | 5108 | module(...,package.seeall)
local lib = require("core.lib")
local usage = require("program.snabbnfv.fuzz.README_inc")
function run (args)
if #args ~= 2 then print(usage) main.exit(1) end
local spec_path, output_path = unpack(args)
local conf = fuzz_connective_ports(lib.load_conf(spec_path))
lib.store_conf... | apache-2.0 |
b03605079/darkstar | scripts/zones/Temenos/mobs/Enhanced_Dragon.lua | 17 | 1286 | -----------------------------------
-- Area: Temenos Central 1floor
-- NPC: Enhanced_Dragon
-----------------------------------
package.loaded["scripts/zones/Temenos/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Temenos/TextIDs");
-----------... | gpl-3.0 |
b03605079/darkstar | scripts/globals/weaponskills/heavy_swing.lua | 30 | 1339 | -----------------------------------
-- Heavy Swing
-- Staff weapon skill
-- Skill Level: 5
-- Deacription:Delivers a single-hit attack. Damage varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Thunder Gorget.
-- Aligned with the Thunder Belt.
-- Element: None
-- Modifiers: STR:30%
-- 100%TP... | gpl-3.0 |
kkvskkkk/NPLRuntime | Server/trunk/LuaJIT-2.1/src/jit/dump.lua | 43 | 20112 | ----------------------------------------------------------------------------
-- LuaJIT compiler dump module.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-... | gpl-2.0 |
TorstenC/esp8266-devkit | Espressif/examples/nodemcu-firmware/lua_modules/lm92/lm92.lua | 52 | 2140 | -- ******************************************************
-- LM92 module for ESP8266 with nodeMCU
--
-- Written by Levente Tamas <levente.tamas@navicron.com>
--
-- GNU LGPL, see https://www.gnu.org/copyleft/lesser.html
-- ******************************************************
-- Module Bits
local moduleName = ...
loca... | gpl-3.0 |
Aquanim/Zero-K | LuaRules/Gadgets/unit_timeslow.lua | 5 | 9633 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Time slow v2",
desc = "Time slow Weapon",
author = "Google Frog , (MidKnight mad... | gpl-2.0 |
p1-nico/lua-log | lua/log/writer/net/zmq/_private/impl.lua | 4 | 1497 | local Log = require "log"
local Z = require "log.writer.net.zmq._private.compat"
local zmq, zthreads = Z.zmq, Z.threads
local zstrerror, zassert = Z.strerror, Z.assert
local ETERM = Z.ETERM
local zconnect, zbind = Z.connect, Z.bind
local log_ctx
local function context(ctx)
-- we have to use same cont... | mit |
xpol/luarocks | src/luarocks/fs.lua | 9 | 2139 |
--- Proxy module for filesystem and platform abstractions.
-- All code using "fs" code should require "luarocks.fs",
-- and not the various platform-specific implementations.
-- However, see the documentation of the implementation
-- for the API reference.
local pairs = pairs
local fs = {}
package.loaded["luarocks.f... | mit |
b03605079/darkstar | scripts/zones/Bastok_Markets_[S]/npcs/Karlotte.lua | 38 | 1069 | ----------------------------------
-- Area: Bastok Markets [S]
-- NPC: Karlotte
-- Type: Item Deliverer
-- @pos -191.646 -8 -36.349 87
-----------------------------------
package.loaded["scripts/zones/Bastok_Markets_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Bastok_Markets_[S]... | gpl-3.0 |
stone-jin/avbot | extension/luascript/libs/lua_libraries/json/decode/composite.lua | 7 | 4463 | --[[
Licensed according to the included 'LICENSE' document
Author: Thomas Harning Jr <harningt@gmail.com>
]]
local pairs = pairs
local type = type
local lpeg = require("lpeg")
local util = require("json.decode.util")
local jsonutil = require("json.util")
local rawset = rawset
local assert = assert
local tostring ... | agpl-3.0 |
b03605079/darkstar | scripts/zones/Windurst_Waters_[S]/npcs/Ozzmo-Mazmo.lua | 38 | 1053 | -----------------------------------
-- Area: Windurst Waters (S)
-- NPC: Ozzmo-Mazmo
-- Type: Standard NPC
-- @zone: 94
-- @pos -61.677 -13.311 106.400
--
-- Auto-Script: Requires Verification (Verified by Brawndo)
-----------------------------------
package.loaded["scripts/zones/Windurst_Waters_[S]/TextIDs"] = n... | gpl-3.0 |
arychen/GlobalCall | feeds/luci/applications/luci-app-asterisk/luasrc/model/cbi/asterisk/dialplan_out.lua | 68 | 3021 | -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local ast = require("luci.asterisk")
local function find_outgoing_contexts(uci)
local c = { }
local h = { }
-- uci:foreach("asterisk", "dialplan",
-- function(s)
-- if not h[s['.name']] then
-- c[#c+1]... | gpl-2.0 |
evandroomiix/miixbot | bot.lua | 3 | 2985 | HTTP = require('socket.http')
HTTPS = require('ssl.https')
URL = require('socket.url')
JSON = require('dkjson')
version = '3.2'
bot_init = function() -- The function run when the bot is started or reloaded.
config = dofile('config.lua') -- Load configuration file.
dofile('bindings.lua') -- Load Telegram bindings.
... | gpl-2.0 |
stars2014/quick-ng | cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua | 61 | 1351 | if nil == cc.Control then
return
end
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of CCControl will be deprecated end
local CCControlDeprecated = { }
function CCControlDeprecated.ad... | mit |
thesrinivas/rakshak | rakshak-probe/userspace/elasticsearch-lua/src/elasticsearch/endpoints/Indices/DeleteTemplate.lua | 2 | 1890 | -------------------------------------------------------------------------------
-- Importing modules
-------------------------------------------------------------------------------
local IndicesEndpoint = require "elasticsearch.endpoints.Indices.IndicesEndpoint"
--------------------------------------------------------... | gpl-2.0 |
PicassoCT/Journeywar | gamedata/explosions/jvaryfootrail.lua | 1 | 7398 | -- missile_explosion
return {
["jvaryfootrail"] = {
bitmapmuzzleflame = {
air = true,
class = [[CBitmapMuzzleFlame]],
count = 1,
ground = true,
underwater = 1,
water = true,
... | gpl-3.0 |
PicassoCT/Journeywar | gamedata/explosions/volcanoflames.lua | 1 | 1397 | --lowest part of the fire
return {
["volcanoflames"] = {
volcaNosstra = {
air = true,
class = [[heatcloud]],
count = 1,
ground = true,
water = true,
properties = {
alwaysvisible = true,
... | gpl-3.0 |
imashkan/telefire | plugins/invite.lua | 299 | 1025 | -- Invite other user to the chat group.
-- Use !invite name User_name or !invite id id_number
-- The User_name is the print_name (there are no spaces but _)
do
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local user = matches[2]
-- Use... | gpl-2.0 |
b03605079/darkstar | scripts/globals/mobskills/Gregale_Wing.lua | 6 | 1241 | ---------------------------------------------
-- Gregale Wing
--
-- Description: An icy wind deals Ice damage to enemies within a very wide area of effect. Additional effect: Paralyze
-- Type: Magical
-- Utsusemi/Blink absorb: Wipes shadows
-- Range: 30' radial.
-- Notes: Used only by Jormungand and Isgebi... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.