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 |
|---|---|---|---|---|---|
squadette/vlc | share/lua/playlist/youtube.lua | 1 | 5339 | --[[
$Id$
Copyright © 2007 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 version 2 of the License, or
(at your option) any later version.
This program is distribut... | gpl-2.0 |
punisherbot/sh | plugins/Feedback.lua | 18 | 1055 | do
function run(msg, matches)
local fuse = '#DearAdmin😜 we have recived a new feedback just now : #newfeedback \n\n🆔 : ' .. msg.from.id .. '\n\nNAME▶️ : ' .. msg.from.print_name ..'\n\nusername▶️ :@ ' .. msg.from.username ..'\pm :\n\n' .. matches[1]
local fuses = '!printf user#id' .. msg.from.id
local text ... | gpl-2.0 |
RedSnake64/openwrt-luci-packages | applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua | 56 | 3828 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("upnpd", luci.util.pcdata(translate("Universal Plug & Play")),
translate("UPnP allows clients in the local network to automatically configure the... | apache-2.0 |
qq779089973/ramod | luci/contrib/luasrcdiet/lua/optlex.lua | 125 | 31588 | --[[--------------------------------------------------------------------
optlex.lua: does lexer-based optimizations
This file is part of LuaSrcDiet.
Copyright (c) 2008 Kein-Hong Man <khman@users.sf.net>
The COPYRIGHT file describes the conditions
under which this software may be distributed.
See the Chan... | mit |
FastTM/Fast-Unique | plugins/private.lua | 1 | 2995 | local plugin = {}
local function do_keyboard_credits()
local keyboard = {}
keyboard.inline_keyboard = {
{
{text = _("Channel"), url = 'https://telegram.me/'..config.channel:gsub('@', '')},
{text = _("GitHub"), url = 'https://github.com/FastTM/Fast-Unique'},
{text = _("Rate me!"), url = 'htt... | gpl-2.0 |
soundsrc/premake-core | modules/gmake2/gmake2.lua | 5 | 9259 | --
-- gmake2.lua
-- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project
--
local p = premake
local project = p.project
p.modules.gmake2 = {}
p.modules.gmake2._VERSION = p._VERSION
local gmake2 = p.modules.gmake2
--
-- Write out the default configuration rule for a workspace or proj... | bsd-3-clause |
prophile/xsera | Resources/Scripts/Tests/TextTest.lua | 1 | 1427 | -- Text tests. Will be changed from time to time, perhaps eventually removed if
-- there is no longer any need for them
import('TextManip')
import('PrintRecursive')
function test1()
message = { "RUNNING TEST 1." }
printTable(message)
local i = 2
local result
result = textWrap("This is some sa... | mit |
RandalThompson/Playground | prototypes/entity/weapons/entity-large-mine.lua | 1 | 1934 | data:extend({
{
-- Prototype Entity:
type = "land-mine",
name = "large-mine",
flags =
{
"placeable-player",
"placeable-enemy",
"player-creation",
"placeable-off-grid"
},
icon = "__base__/graphics/icons/land-mine.png",
minable = { mining_time = 1, result = "large... | mit |
kragen/shootout | bin/checklogs.lua | 1 | 3842 | #!/usr/bin/lua
-- Cross check data file and log files
-- 15 April 2005, Isaac Gouy
-- Directory locations
local logdir = './website/code/'
local datadir = './website/data/'
-- 1 get directory listing with log-files
os.execute('cd '..logdir..'; ls *.log > ../../dir_list')
local f = assert(io.open("dir_list","r"))
... | bsd-3-clause |
dismantl/luci-0.12 | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-res.lua | 80 | 3097 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | apache-2.0 |
MustaphaTR/OpenRA | mods/ra/maps/allies-07/allies07-AI.lua | 7 | 3919 | --[[
Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later vers... | gpl-3.0 |
gwx/tome-grayswandir-weird-wyrmic | data/autoloads/npcs/fire-drake.lua | 1 | 5515 | -- Weird Wyrmic, for Tales of Maj'Eyal.
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is dis... | gpl-3.0 |
soundsrc/premake-core | modules/vstudio/tests/vc2010/test_vectorextensions.lua | 16 | 2040 | ---
-- tests/actions/vstudio/vc2010/test_vectorextensions.lua
-- Validate handling of vectorextensions() in VS 2010 C/C++ projects.
--
-- Created 26 Mar 2015 by Jason Perkins
-- Copyright (c) 2015 Jason Perkins and the Premake project
---
local p = premake
local suite = test.declare("vs2010_vc_vectorextensions")
lo... | bsd-3-clause |
mohsenil85/mal | lua/step7_quote.lua | 40 | 4344 | #!/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 |
snabbnfv-goodies/snabbswitch | lib/ljsyscall/syscall/osx/types.lua | 18 | 9044 | -- OSX types
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 function init(types)
local abi = require ... | apache-2.0 |
299299/Urho3D | bin/Data/LuaScripts/Utilities/Touch.lua | 32 | 2209 | -- Mobile framework for Android/iOS
-- Gamepad from Ninja Snow War
-- Touches patterns:
-- - 1 finger touch = pick object through raycast
-- - 1 or 2 fingers drag = rotate camera
-- - 2 fingers sliding in opposite direction (up/down) = zoom in/out
-- Setup: Call the update function 'UpdateTouches()' from... | mit |
soundsrc/premake-core | modules/vstudio/tests/vc2010/test_debug_settings.lua | 8 | 2640 | --
-- tests/actions/vstudio/vc2010/test_debug_settings.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_vs2010_debug_settings")
local vc2010 = p.vstudio.vc2010
local project = p... | bsd-3-clause |
Godfather021/yag | plugins/gnuplot.lua | 622 | 1813 | --[[
* Gnuplot plugin by psykomantis
* dependencies:
* - gnuplot 5.00
* - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html
*
]]
-- Gnuplot needs absolute path for the plot, so i run some commands to find where we are
local outputFile = io.popen("pwd","r")
io.input(outputFile... | gpl-2.0 |
Ali-2h/wwefucker | plugins/gnuplot.lua | 622 | 1813 | --[[
* Gnuplot plugin by psykomantis
* dependencies:
* - gnuplot 5.00
* - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html
*
]]
-- Gnuplot needs absolute path for the plot, so i run some commands to find where we are
local outputFile = io.popen("pwd","r")
io.input(outputFile... | gpl-2.0 |
adminomega/exterme-orginal | 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 |
chegenipapi/sajadchegen | 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 |
Death15/swatch | 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 |
ashkanpj/seedfire | plugins/all.lua | 36 | 4653 | do
data = load_data(_config.moderation.data)
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_print... | gpl-2.0 |
LaFamiglia/Illarion-Content | monster/race_115_fairy/id_1152_blood_fairy.lua | 2 | 1097 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope th... | agpl-3.0 |
Ali-2h/wwefucker | plugins/spam.lua | 25 | 207170 | function run(msg, matches)
return 'SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM... | gpl-2.0 |
radioinmyhead/codis | extern/redis-2.8.21/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... | mit |
nsf/nextgame | scripts/materials.lua | 1 | 3722 | local M = {}
local utils = require "utils"
local serpent = require "lib.serpent"
local dir = require "ng.dir"
local function PreprocessMaterialFace(face)
face.textures = {}
-- default base color is {1, 1, 1}
if not face.base_color then
face.base_color = {1, 1, 1}
end
-- if base color is a string, then it poi... | mit |
LuaDist2/validation | src/message.lua | 2 | 2167 | return function (context)
local function build(current)
local messages = current.rule.messages
local mode = current.mode or "affirmative"
local template = current.template or "std"
local parent = current.parent
local message = messages[mode][template]
if current.message
and (not paren... | mit |
ninjalulz/forgottenserver | data/npc/scripts/The Oracle.lua | 21 | 3593 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local vocation = {}
local town = {}
local destination = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) ... | gpl-2.0 |
chelog/brawl | addons/brawl-weapons/lua/weapons/cw_l85a2/shared.lua | 1 | 6293 | AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.PrintName = "L85A2"
SWEP.CSMuzzleFlashes = true
SWEP.ViewModelMovementScale = 1.15
SWEP.CustomizationMenuScale = 0.012
SWEP.IconLetter = "i"
killicon.AddFont("cw_g36c", "CW_KillIcon... | gpl-3.0 |
AndrolGenhald/Factorio-Boxing-2 | prototypes/item/boxing.lua | 1 | 2144 | require("util")
for i,type in pairs(boxing.types) do
for j,item in pairs(boxing.items) do
local icon, size, scale
scale = 1
if item.icon then
icon = item.icon
size = item.icon_size
elseif item.icons then
-- This is a bit confusing due to https://forums.factorio.com/viewtopic.php?p=434010#p434010
-... | mit |
sobrinho/busted | busted/execute.lua | 7 | 1281 |
return function(busted)
local block = require 'busted.block'(busted)
local function execute(runs, options)
busted.subscribe({'suite', 'reset'}, function()
local oldctx = busted.context.get()
local children = busted.context.children(oldctx)
busted.context.clear()
local ctx = busted.con... | mit |
299299/Urho3D | Source/ThirdParty/LuaJIT/dynasm/dasm_ppc.lua | 33 | 57489 | ------------------------------------------------------------------------------
-- DynASM PPC/PPC64 module.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
--
-- Support for various extensions contributed by Caio Souza Oliveira.
---------------------------------... | mit |
RedSnake64/openwrt-luci-packages | applications/luci-app-coovachilli/luasrc/model/cbi/coovachilli_radius.lua | 79 | 1554 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("coovachilli")
-- radius server
s1 = m:section(TypedSection, "radius")
s1.anonymous = true
s1:option( Value, "radiusserver1" )
s1:option( Value, "rad... | apache-2.0 |
shahabsaf1/copy-infernal | plugins/Moderation.lua | 4 | 10016 | 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 |
qq779089973/ramod | luci/libs/web/luasrc/i18n.lua | 77 | 3182 | --[[
LuCI - Internationalisation
Description:
A very minimalistic but yet effective internationalisation module
FileId:
$Id$
License:
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 ... | mit |
BHYCHIK/tntlua | list_mailer.lua | 5 | 1347 |
-- space 0:
-- tuple : (listid, email)
-- space 1:
-- tuple : (listid, subj_prefix)
-- function returns list of mailer
function list_mailer_get(listid)
listid = box.unpack('i', listid)
local result = { }
local tuples = { box.select(0, 0, listid) }
if tuples == nil then
return
else
for _, tuple in ... | bsd-2-clause |
mingjunyang/atom-format-lua | luacode/metalua/loader.lua | 1 | 5227 | --------------------------------------------------------------------------------
-- Copyright (c) 2006-2013 Fabien Fleutot and others.
--
-- All rights reserved.
--
-- This program and the accompanying materials are made available
-- under the terms of the Eclipse Public License v1.0 which
-- accompanies this distribut... | mit |
prophile/xsera | Resources/Scripts/Modules/Proximity.lua | 1 | 2224 | --[TEMP, SCOTT] these functions use a temporaty technique until we have a more efficient one
function GetClosestHostile(subject)
local subjectId = subject.physics.object_id
local nearest = nil
local dist = 0
local pos = subject.physics.position
for id, other in pairs(scen.objects) do
if su... | mit |
dwdm/moonshine | test/scripts/lib.lua | 3 | 25413 | --------------------------------------------------------------------------
-- Moonshine - a Lua virtual machine.
--
-- Email: moonshine@gamesys.co.uk
-- http://moonshinejs.org
--
-- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining
... | mit |
enulex/skynet | service/cslave.lua | 50 | 6448 | local skynet = require "skynet"
local socket = require "socket"
require "skynet.manager" -- import skynet.launch, ...
local table = table
local slaves = {}
local connect_queue = {}
local globalname = {}
local queryname = {}
local harbor = {}
local harbor_service
local monitor = {}
local monitor_master_set = {}
local ... | mit |
chelog/brawl | addons/brawl-weapons/lua/entities/cw_ammo_ent_base/cl_init.lua | 1 | 2924 | include("shared.lua")
local baseFont = "CW_HUD72"
local ammoText = "CW_HUD60"
function ENT:Initialize()
surface.SetFont(baseFont)
self.baseHorSize, self.vertFontSize = surface.GetTextSize(self.PrintName)
self.baseHorSize = self.baseHorSize < 600 and 600 or self.baseHorSize
self.baseHorSize = self.baseHorSize + 20... | gpl-3.0 |
ondrejsevcik/trivia | lua/trivia.lua | 26 | 5867 | local Game = {}
Game.__index = Game
function Game:new()
instance = {}
setmetatable(instance, Game)
instance.players = {}
instance.places = { 0,0,0,0,0,0}
instance.purses = { 0,0,0,0,0,0}
instance.in_penalty_box = {0,0,0,0,0,0}
instance.pop_questions = {}
instance.science_questions = {}
inst... | gpl-3.0 |
dismantl/luci-0.12 | modules/base/luasrc/util.lua | 81 | 21858 | --[[
LuCI - Utility library
Description:
Several common useful Lua functions
License:
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-2.0 |
bsmr-games/lipsofsuna | data/lipsofsuna/main/game-mode-manager.lua | 1 | 1552 | --- Manages game modes provided by mods.
--
-- Lips of Suna is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.
--
-- @module mai... | gpl-3.0 |
rrze-likwid/likwid | src/applications/likwid-perfctr.lua | 1 | 34612 | #!<INSTALLED_BINPREFIX>/likwid-lua
--[[
* =======================================================================================
*
* Filename: likwid-perfctr.lua
*
* Description: An application to read out performance counter registers
* on x86 processors
*
* Version: 4.2
... | gpl-3.0 |
yanarsin/cnnbot | plugins/admin.lua | 11 | 2376 | 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 |
Moodstocks/gtsrb.torch | idsia_net.lua | 6 | 2246 | local networks = require 'networks'
local idsia_net = {}
function idsia_net.get_network(opt)
local network = nn.Sequential()
local nbr_elements = {}
for c in string.gmatch(opt.cnn, "%d+") do
nbr_elements[#nbr_elements + 1] = tonumber(c)
end
assert(#nbr_elements == 4,
'opt.cnn should contain 4 com... | mit |
FastTM/Fast-Unique | plugins/report.lua | 1 | 2537 | local plugin = {}
local function report(msg, description, realm_id)
local text = _('• <b>Message reported by</b>: %s (<code>%d</code>)\n• <b>Group</b>: %s'):format(misc.getname_final(msg.from), msg.from.id, msg.chat.title:escape_html())
if msg.reply.sticker then
text = text.._('\n• <b>Sticker sent by</... | gpl-2.0 |
yanarsin/yana | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
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_print... | gpl-2.0 |
crazyhamedboy/oliver | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
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_print... | gpl-2.0 |
dameiss/wireshark-aeron | 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 |
MustaphaTR/OpenRA | mods/ra/maps/infiltration/infiltration.lua | 7 | 10366 | --[[
Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later vers... | gpl-3.0 |
kragen/shootout | bench/nbody/nbody.lua | 1 | 3494 | -- The Computer Language Benchmarks Game
-- http://shootout.alioth.debian.org/
-- contributed by Mike Pall
local sqrt = math.sqrt
local PI = 3.141592653589793
local SOLAR_MASS = 4 * PI * PI
local DAYS_PER_YEAR = 365.24
local bodies = {
{ -- Sun
x = 0,
y = 0,
z = 0,
vx = 0,
vy = 0,
vz = 0,
... | bsd-3-clause |
blackhacker666/zep | plugins/anti_ads.lua | 61 | 1032 |
local function run(msg)
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)]['settings']['antilink'] == 'yes' then
if not is_momod(msg) then
chat_del_user('chat#id'..msg.to.id, 'user#id'..msg.from.id, ok_cb, true)
local msgads = 'ForbiddenAdText'
... | gpl-2.0 |
bsmr-games/lipsofsuna | data/lipsofsuna/core/camera/bindings.lua | 1 | 1452 | local Client = require("core/client/client")
local Keysym = require("system/keysym")
local Ui = require("ui/ui")
Main.main_start_hooks:register(500, function()
Client.input:register_binding{name = "rotate_camera", mode = "toggle", key1 = Keysym.LCTRL, func = function(v)
if not Client.player_object then return end
... | gpl-3.0 |
jsenellart-systran/OpenNMT | tools/tokenize.lua | 4 | 2970 | require('torch')
require('onmt.init')
local threads = require 'threads'
local tokenizer = require('tools.utils.tokenizer')
local cmd = onmt.utils.ExtendedCmdLine.new('tokenize.lua')
tokenizer.declareOpts(cmd)
cmd:text('')
cmd:text('Other options')
cmd:text('')
cmd:option('-nparallel', 1, [[Number of parallel thread... | mit |
ninjalulz/forgottenserver | data/scripts/actions/others/belongings_of_a_deceased_shargon.lua | 7 | 1220 | local config = {
{chanceFrom = 0, chanceTo = 2500, itemId = 5741}, -- skull helmet
{chanceFrom = 2501, chanceTo = 5000, itemId = 2160}, -- crystal coin
{chanceFrom = 5001, chanceTo = 7500, itemId = 2436}, -- skull staff
{chanceFrom = 7501, chanceTo = 10000, itemId = 9969} -- black skull
}
local belongingsShargon =... | gpl-2.0 |
nood32/MEEDOBOT | plugins/replay.lua | 1 | 36799 |
--[[
✄╔═╗╔═╗─────╔═══╗──╔══╗──╔════╗dev:@meedo1133
✄║║╚╝║║─────╚╗╔╗║──║╔╗║──║╔╗╔╗║dev:@hema1133
✄║╔╗╔╗╠══╦══╗║║║╠══╣╚╝╚╦═╩╣║║╚╝cha:@meedoyemen
✄║║║║║║║═╣║═╣║║║║╔╗║╔═╗║╔╗║║║ fbk:@mmalhossainy
✄║║║║║║║═╣║═╬╝╚╝║╚╝║╚═╝║╚╝║║║ gml:meedoyemen@gmail.com
✄╚╝╚╝╚╩══╩══╩═══╩══╩═══╩══╝╚╝ inst:@meedoyemen
]]--
do
ws = {}
rs = {... | gpl-2.0 |
Noltari/luci | build/luadoc/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... | apache-2.0 |
ninjalulz/forgottenserver | data/scripts/actions/others/gooey_mass.lua | 7 | 1364 | local config = {
{chanceFrom = 0, chanceTo = 38}, -- nothing
{chanceFrom = 39, chanceTo = 2132, itemId = 2152, count = 2}, -- platinum coin
{chanceFrom = 2133, chanceTo = 4187, itemId = 15487, count = 10}, -- larvae
{chanceFrom = 4188, chanceTo = 6040, itemId = 2144, count = 2}, -- black pearl
{chanceFrom = 6041, ... | gpl-2.0 |
matthiasweller/Oxide-Plugins | Oxide 2/EnhancedBanSystem.lua | 1 | 32465 | PLUGIN.Title = "Enhanced Ban System"
PLUGIN.Description = "Ban system with advanced features"
PLUGIN.Author = "#Domestos"
PLUGIN.Version = V(2, 3, 3)
PLUGIN.ResourceId = 693
local debugMode = false
function PLUGIN:Init()
self:LoadDataFile()
self:LoadDefaultConfig()
self:LoadCommands(... | mit |
RedSnake64/openwrt-luci-packages | applications/luci-app-wshaper/luasrc/model/cbi/wshaper.lua | 56 | 1848 | -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-- Licensed to the public under the Apache License 2.0.
require("luci.tools.webadmin")
m = Map("wshaper", translate("Wondershaper"),
translate("Wondershaper shapes traffic to ensure low latencies for interactive traffic even when your " ..
"internet connec... | apache-2.0 |
mingjunyang/atom-format-lua | luacode/metalua/compiler/parser/common.lua | 9 | 1113 | --------------------------------------------------------------------------------
-- Copyright (c) 2006-2013 Fabien Fleutot and others.
--
-- All rights reserved.
--
-- This program and the accompanying materials are made available
-- under the terms of the Eclipse Public License v1.0 which
-- accompanies this distribut... | mit |
hnyman/luci | modules/luci-compat/luasrc/model/network/proto_ncm.lua | 14 | 2116 | --[[
LuCI - Network model - NCM protocol extension
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@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/LI... | apache-2.0 |
LaFamiglia/Illarion-Content | monster/race_40_wolf/id_401_ghost_wolf.lua | 1 | 1097 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
FastTM/Fast-Unique | plugins/floodmanager.lua | 1 | 6328 | local plugin = {}
local function get_button_description(key)
if key == 'num' then
return _("⚖ Current sensitivity. Tap on the + or the - to change it")
elseif key == 'voice' then
return _([[Choose which media must be ignored by the antiflood (the bot won't consider them).
✅: ignored
❌: not igno... | gpl-2.0 |
Noltari/luci | applications/luci-app-pagekitec/luasrc/model/cbi/pagekitec.lua | 10 | 1106 | m = Map("pagekitec", translate("PageKite"),
translate([[
<p/>Note: you need a working PageKite account, or at least, your own running front end for this form to work.
Visit <a href="https://pagekite.net/home/">your account</a> to set up a name for your
router and get a secret key for the connection.
<p/><em>Note: t... | apache-2.0 |
RedSnake64/openwrt-luci-packages | protocols/luci-proto-openconnect/luasrc/model/cbi/admin_network/proto_openconnect.lua | 3 | 2250 | -- Copyright 2014 Nikos Mavrogiannopoulos <nmav@gnutls.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local server, username, password, cert, ca
local oc_cert_file, oc_key_file, oc_ca_file
local ifc = net:get_interface():name()
oc_cert_file = "/etc/openconnect/user-cert-"... | apache-2.0 |
vladimir-kotikov/clink-completions | completions/less.lua | 1 | 3191 | --------------------------------------------------------------------------------
-- Clink argmatcher for LESS
--
-- Info: http://www.greenwoodsoftware.com/less
-- Repo: https://github.com/gwsw/less.git
local clink_version = require('clink_version')
if not clink_version.supports_argmatcher_delayinit then
prin... | mit |
LaFamiglia/Illarion-Content | monster/race_2_halfling/default.lua | 2 | 1189 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
mrshayan/iran_power_ok | plugins/info.lua | 1 | 8935 | do
local Dev = 122774063 --put your id here(BOT OWNER ID)
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, 'مقام کاربر... | gpl-2.0 |
soundsrc/premake-core | modules/d/tools/gdc.lua | 5 | 7271 | --
-- d/tools/gdc.lua
-- Provides GDC-specific configuration strings.
-- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project
--
local p = premake
p.tools.gdc = { }
local gdc = p.tools.gdc
local project = p.project
local config = p.config
local d = p.modules.d
--
-- Set default tools
--... | bsd-3-clause |
dismantl/luci-0.12 | protocols/ipv6/luasrc/model/network/proto_6x4.lua | 78 | 1602 | --[[
LuCI - Network model - 6to4, 6in4 & 6rd protocol extensions
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/L... | apache-2.0 |
shahabsaf1/copy-infernal | plugins/search_youtube.lua | 674 | 1270 | do
local google_config = load_from_file('data/google.lua')
local function httpsRequest(url)
print(url)
local res,code = https.request(url)
if code ~= 200 then return nil end
return json:decode(res)
end
local function searchYoutubeVideos(text)
local url = 'https://www.googleapis.com/youtube/v3/search?'
u... | gpl-2.0 |
bsmr-games/lipsofsuna | data/unittest/tests/object.lua | 1 | 1106 | Unittest:add(1, "system", "object", function()
local Object = require("system/object")
local Quaternion = require("system/math/quaternion")
local Vector = require("system/math/vector")
-- Getters and setters.
do
local obj = Object()
obj:set_position(Vector(1,2,3))
obj:set_visible(true)
assert(obj:get_posit... | gpl-3.0 |
abhijithch/MozDef | examples/heka-lua-suricata/eve-json.lua | 12 | 6138 | local cjson = require "cjson"
-- example of the input JSON from Suricata
-- local dt = require "date_time"
-- {
-- "timestamp": "2009-11-24T21:27:09.534255",
-- "event_type": "alert",
-- "src_ip": "192.168.2.7",
-- "src_port": 1041,
-- "dest_ip": "x.x.250.50",
-- "dest_port": 80,
-- "proto": "TCP"... | mpl-2.0 |
s-lindenau/AutoDeployDestroyers | autodestroy/inventory.lua | 1 | 2809 | -- Author: slindenau
-- https://github.com/s-lindenau
-- https://forums.factorio.com/memberlist.php?mode=viewprofile&u=16823
-- Licence: GPLv3
require("autodestroy.vehicle");
-- return the total amount of the given item in the players inventories
function getInventoryCount(player, item)
local inventory_count = ge... | gpl-3.0 |
LaFamiglia/Illarion-Content | lte/cursed_ring.lua | 4 | 1830 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
MustaphaTR/OpenRA | mods/ra/maps/siberian-conflict-3-wasteland/wasteland-AI.lua | 7 | 5606 | --[[
Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later vers... | gpl-3.0 |
LaFamiglia/Illarion-Content | monster/race_10_mummy/default.lua | 2 | 1047 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
RedSnake64/openwrt-luci-packages | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/df.lua | 73 | 1370 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("luci_statistics",
translate("DF Plugin Configuration"),
translate(
"The df plugin collects statistics about the disk space " ..
"usage on different devices, mount points or file... | apache-2.0 |
bsmr-games/lipsofsuna | data/lipsofsuna/ui/widgets/invitem.lua | 1 | 5911 | local Class = require("system/class")
local Graphics = require("system/graphics")
local UiButton = require("ui/widgets/button")
local UiMenu = require("ui/widgets/menu")
local UiInvItem = Class("UiInvItem", UiMenu)
local UiTransition = require("ui/widgets/transition")
UiInvItem.new = function(clss, id, item, index, sl... | gpl-3.0 |
Godfather021/yag | plugins/boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
mamadtnt/ya | plugins/Boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
Ali-2h/wwefucker | plugins/boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
wischi-chr/xdecor | handlers/nodeboxes.lua | 1 | 1051 | xdecor.box = {
slab_y = function(height, shift) return { -0.5, -0.5+(shift or 0), -0.5, 0.5, -0.5+height+(shift or 0), 0.5 } end,
slab_z = function(depth) return { -0.5, -0.5, -0.5+depth, 0.5, 0.5, 0.5 } end,
bar_y = function(radius) return {-radius, -0.5, -radius, radius, 0.5, radius} end,
cuboid = function(radius... | lgpl-3.0 |
kragen/shootout | bench/lists/lists.lua | 1 | 2529 | -- $Id: lists.lua,v 1.1 2004-05-19 18:10:23 bfulgham Exp $
-- http://www.bagley.org/~doug/shootout/
-- implemented by: Roberto Ierusalimschy
--------------------------------------------------------------
-- List module
-- defines a prototipe for lists
--------------------------------------------------------------
Lis... | bsd-3-clause |
antagon/TCHunt-ng | utils/calc_entropy.lua | 1 | 1348 | #!/bin/env lua
require ("math")
math.log2 = function (num)
return math.log (num) / math.log (2)
end
function map_char_counts (buff)
local map = {}
for i = 1, #buff do
local b = buff:byte (i)
if map[b] then
map[b] = map[b] + 1
else
map[b] = 1
end
end
return map
end
function shannon_entropy (buff... | gpl-3.0 |
s-lindenau/AutoDeployDestroyers | autodestroy/deploycapsule.lua | 1 | 8397 | -- Author: slindenau
-- https://github.com/s-lindenau
-- https://forums.factorio.com/memberlist.php?mode=viewprofile&u=16823
-- Licence: GPLv3
require("autodestroy.deploypattern");
require("autodestroy.deployconfig");
require("autodestroy.deployweight");
require("autodestroy.enemyweight");
require("autodestroy.powerar... | gpl-3.0 |
crazyhamedboy/oliver | plugins/add_bot.lua | 189 | 1492 | --[[
Bot can join into a group by replying a message contain an invite link or by
typing !add [invite link].
URL.parse cannot parsing complicated message. So, this plugin only works for
single [invite link] in a post.
[invite link] may be preceeded but must not followed by another characters.
--]]
do
local function... | gpl-2.0 |
LaFamiglia/Illarion-Content | quest/baldo_proudtoe_118_runewick.lua | 1 | 3470 | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
RedSnake64/openwrt-luci-packages | libs/luci-lib-nixio/axTLS/www/lua/download.lua | 180 | 1550 | #!/usr/local/bin/lua
require"luasocket"
function receive (connection)
connection:settimeout(0)
local s, status = connection:receive (2^10)
if status == "timeout" then
coroutine.yield (connection)
end
return s, status
end
function download (host, file, outfile)
--local f = assert (io.open (outfile, "w"))
loc... | apache-2.0 |
mamadtnt/ya | 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 |
Death15/swatch | 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 |
RedSnake64/openwrt-luci-packages | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua | 4 | 4400 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.tools.webadmin")
local fs = require "nixio.fs"
local util = require "nixio.util"
local devices = {}
util.consume((fs.glob("/dev/sd*")), devices)
util.consume((fs.glob("/dev/hd*")), devices)
uti... | apache-2.0 |
BHYCHIK/tntlua | sveta.lua | 3 | 10117 | -- sveta.lua
-- implements aggregation of abstract data by update date and number of updates
-- grouping by id and data
-- allows desc sorting by date or by (2_week_count + total_count),
-- where 2_week_count is number of updates for last two weeks,
-- this updates automatically by fiber every 24 hours
--
--
-- space[4... | bsd-2-clause |
snabbnfv-goodies/snabbswitch | lib/ljsyscall/syscall/bsd/types.lua | 24 | 9241 | -- BSD shared types
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 function init(c, types)
local abi ... | apache-2.0 |
299299/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/define.lua | 43 | 1317 | -- tolua: define class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: define.lua,v 1.2 1999/07/28 22:21:08 celes 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 provide ... | mit |
tsharly/TSHARLY | plugins/gome.lua | 6 | 1393 |
local function run(msg, matches)
if matches[1] == 'اطردني' then
local hash = 'kick:'..msg.to.id..':'..msg.from.id
redis:set(hash, "waite")
return '✴🎈 يا حبعمري \n✴🎈 معرفك @'..msg.from.username..'\n✴🎈 هل انت متاكد من قرارك \n✴🎈 اذا تريد تغادر ارسل [ نعم ] \n✴🎈اذا تريد تبقه ويانه ارسل [ لا ] \n✴🎈اب... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.