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 |
|---|---|---|---|---|---|
maikerumine/aftermath | mods/aftermath/sky.lua | 2 | 1077 |
aftermath = {}
local path = minetest.get_modpath("aftermath")
--Version 0.2
--by emperor_genshin
--modified for ESM game by: maikerumine
--https://forum.minetest.net/viewtopic.php?f=9&t=13775&hilit=[mod]skybox
--The skybox for space, feel free to change it to however you like.
local spaces... | lgpl-2.1 |
ntop/ntopng | scripts/lua/modules/check_definitions/interface/periodic_activity_not_executed.lua | 1 | 1644 | --
-- (C) 2019-22 - ntop.org
--
local alert_consts = require("alert_consts")
local alerts_api = require("alerts_api")
local checks = require("checks")
local script = {
-- Script category
category = checks.check_categories.internals,
severity = alert_consts.get_printable_severities().warning,
hooks = {},
g... | gpl-3.0 |
ntop/ntopng | attic/scripts/lua/rest/v1/get/alert/severity/counters.lua | 2 | 1643 | --
-- (C) 2013-21 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local json = require ("dkjson")
local tracker = require("tracker")
local alert_utils = require "alert_utils"
local alert_consts = require "alert_consts"
local... | gpl-3.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/src/actions/vstudio/vs2005_solution.lua | 7 | 3222 | --
-- vs2005_solution.lua
-- Generate a Visual Studio 2005 or 2008 solution.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
function premake.vs2005_solution(sln)
io.eol = '\r\n'
-- Precompute Visual Studio configurations
sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
-- Mark the ... | gpl-2.0 |
mushuanli/wsue | AI/marioAI.lua | 1 | 41045 | -- https://pastebin.com/ZZmSNaHX
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level,
-- and put a ... | gpl-3.0 |
ntop/ntopng | doc/src/api/lua_c/interface/interface_ndpi.lua | 2 | 1621 | --! @brief Convert a nDPI protocol id to a protocol name
--! @param proto the protocol id to convert
--! @return the protocol name on success, nil otherwise.
function interface.getnDPIProtoName(int proto)
--! @brief Convert a protocol name to the corresponding nDPI protocol id
--! @param proto the protocol name to con... | gpl-3.0 |
maikerumine/aftermath | mods/xpanes/init.lua | 2 | 4715 |
local function is_pane(pos)
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
end
local function connects_dir(pos, name, dir)
local aside = vector.add(pos, minetest.facedir_to_dir(dir))
if is_pane(aside) then
return true
end
local connects_to = minetest.registered_nodes[name].connects_to... | lgpl-2.1 |
wujf/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 |
jeffreykegler/kollos | components/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 |
ildar-shaimordanov/tea-set | etc/Far3/Profile/Macros/scripts/Editor.BlockIndent.lua | 1 | 3966 |
-- http://forum.farmanager.com/viewtopic.php?f=15&t=7703
-- http://evil-programmers.googlecode.com/svn/trunk/BlockIndent/BlockIndent.lua
--[[
Block Indent for Far Manager
Version: 2.1
Copyright (C) 2001 Alex Yaroslavsky
This program is free software; you can redistribute it and/or modify
i... | mit |
mrbangi/mr-bangi | plugins/info.lua | 1 | 5595 | --[[
Print user identification/informations by replying their post or by providing
their username or print_name.
!info <text> is the least reliable because it will scan trough all of members
and print all member with <text> in their print_name.
chat_info can be displayed on group, send it into PM, or save as file then ... | gpl-2.0 |
zhtlancer/vicious | contrib/pulse.lua | 10 | 3033 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, MrMagne <mr.magne@yahoo.fr>
-- * (c) 2010, Mic92 <jthalheim@gmail.com>
---------------------------------------------------
-- {{{ Grab environment
local type = type
local tonumber = tonumber
local i... | gpl-2.0 |
maikerumine/aftermath | mods/mg_villages/spawn_player.lua | 3 | 1441 |
local function spawnplayer(player)
if( minetest.setting_get("static_spawnpoint")) then
return;
end
-- make sure the village types are initialized
if( not( mg_villages.village_types )) then
mg_villages.init_weights();
end
local noise1 = minetest.get_perlin(12345, 6, 0.5, 256)
local min_dist = math.huge
l... | lgpl-2.1 |
Miigon/luvit | tests/test-ustring.lua | 1 | 2642 | --[[
Copyright 2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | apache-2.0 |
nsimplex/snailking | scripts/snailking/wicker/utils/io.lua | 2 | 2510 | --[[
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 |
dani-sj/extremenod | plugins/time.lua | 94 | 3004 | -- 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 |
ildar-shaimordanov/tea-set | etc/Far3/Profile/Macros/scripts/Common.ViewUserScreen.lua | 1 | 3428 | local Info = Info or package.loaded.regscript or function(...) return ... end --luacheck: ignore 113/Info
local nfo = Info { _filename or ...,
name = "Ctrl+O ultimate";
description = "View UserScreen from any area";
version = "0.3"; --http://semver.org/lang/ru/
author = "jd";
url = "ht... | mit |
mohammad8/123456 | bot/bot.lua | 4 | 6818 | 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 |
ntop/ntopng | scripts/lua/modules/prefs_dump_utils.lua | 1 | 6762 | --
-- (C) 2014-22 - ntop.org
--
-- This file contains the description of all functions
-- used to serialize ntopng runtime preferences to disk
-- or restore them from disk
local dirs = ntop.getDirs()
local os_utils = require "os_utils"
local prefs_reload_utils = require "prefs_reload_utils"
local prefs_factory_reset_... | gpl-3.0 |
ntop/ntopng | scripts/lua/modules/check_definitions/flow/unexpected_smtp.lua | 1 | 1534 | --
-- (C) 2019-22 - ntop.org
--
local checks = require("checks")
local alerts_api = require "alerts_api"
local alert_consts = require("alert_consts")
local flow_alert_keys = require "flow_alert_keys"
local UNEXPECTED_SCRIPTS_ENABLED_CACHE_KEY = "ntopng.cache.checks.unexpected_scripts_enabled"
-- ####################... | gpl-3.0 |
caohongtao/quick-cocos-demo | runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/cocos/cocostudio/CocoStudio.lua | 39 | 9065 |
if not json then
require "cocos.cocos2d.json"
end
ccs = ccs or {}
require "cocos.cocostudio.StudioConstants"
function ccs.sendTriggerEvent(event)
local triggerObjArr = ccs.TriggerMng.getInstance():get(event)
if nil == triggerObjArr then
return
end
for i = 1, table.getn(triggerObjArr) d... | apache-2.0 |
vikas17a/Algorithm-Implementations | Successive_Over_Relaxation/Lua/Yonaba/sor.lua | 26 | 1264 | -- Successive Over Relaxation algorithm implementation
-- See : http://en.wikipedia.org/wiki/Successive_over-relaxation
-- Creates a vector of values
local function vector(len, v)
local x = {}
for i = 1, len do x[i] = v end
return x
end
-- Computes the norm of a given vector
local function norm(v)
local n = 0... | mit |
Fawk/CleanUI | modules/units/unit.lua | 1 | 14850 | local A, L = unpack(select(2, ...))
local E, T, Units, media = A.enum, A.Tools, A.Units, LibStub("LibSharedMedia-3.0")
--[[ Blizzard ]]
local CreateFrame = CreateFrame
local UnitName = UnitName
local UnitClass = UnitClass
local UnitIsPlayer = UnitIsPlayer
local UnitHealth = UnitHealth
local UnitPower = UnitPower
local... | gpl-3.0 |
pinghe/nginx-openresty-windows | LuaJIT-2.1-20150622/src/jit/dis_ppc.lua | 78 | 20318 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | bsd-2-clause |
FelixMaxwell/ReDead | gamemode/shared.lua | 1 | 3417 |
GM.Name = "ReDead"
GM.Author = "twoski"
GM.Email = ""
GM.Website = ""
GM.TeamBased = true
CreateConVar( "sv_redead_max_zombies", "60", { FCVAR_ARCHIVE, FCVAR_NOTIFY, FCVAR_SERVER_CAN_EXECUTE }, "Controls the amount of zombie NPCs that can be spawned at any time. (def 45)" )
CreateConVar( "sv_redead_zombies... | mit |
vikas17a/Algorithm-Implementations | Hamming_Weight/Lua/Yonaba/hamming_weight.lua | 27 | 1422 | -- Hamming weight implementation
-- See: http://en.wikipedia.org/wiki/Hamming_weight
-- Assertion test for the bitwise implementation being used
local function checkBitImplementation(bit)
local msg = 'Failed testing bitwise implementation'
assert(bit.bnot ~= nil, msg)
assert(bit.lshift ~= n... | mit |
sdw2330976/luaer | src/tutorial/methods.lua | 1 | 5542 | --[[
基本函数库为lua内置的函数库,不需要额外装载
--]]
--[[
assert(v[,message]) 相当于C的断言 当表达式v返回为nil或者false时触发错误 message为错误消息 默认为"assertion fail!"
]]--
assert(1 == 0,"Math error")
--[[
collectgarbage(opt[,arg])
垃圾收集器的通用接口 用于操作垃圾收集器
参数:
opt:操作方法标识
"stop":停止垃圾收集器
"restart":重启垃圾收集器
"collect":执行一次全垃圾收集循环
"count":返回当前Lu... | apache-2.0 |
dangowrt/packages | net/prosody/files/prosody.cfg.lua | 147 | 7257 | -- Prosody Example Configuration File
--
-- Information on configuring Prosody can be found on our
-- website at http://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
-- when you have finished by running: luac -p prosody.cfg.lua
-- If there are any errors, it will let you know... | gpl-2.0 |
zhtlancer/vicious | contrib/dio.lua | 16 | 2210 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local ipairs = ipairs
local setmetatable = setmetatable
local table = { insert = table.inser... | gpl-2.0 |
Star2Billing/newfies-dialer | lua/libs/session.lua | 4 | 3110 | --
-- 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-2015 Star2Billing S.L.
--
--... | mpl-2.0 |
caohongtao/quick-cocos-demo | src/cocos/cocosbuilder/CCBReaderLoad.lua | 79 | 5530 | ccb = ccb or {}
function CCBReaderLoad(strFilePath,proxy,owner)
if nil == proxy then
return nil
end
local ccbReader = proxy:createCCBReader()
local node = ccbReader:load(strFilePath)
local rootName = ""
--owner set in readCCBFromFile is proxy
if nil ~= owner then
--C... | apache-2.0 |
lizh06/premake-4.x | src/tools/dotnet.lua | 4 | 2038 | --
-- dotnet.lua
-- Interface for the C# compilers, all of which are flag compatible.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
premake.dotnet = { }
premake.dotnet.namestyle = "windows"
--
-- Translation of Premake flags into CSC flags
--
local flags =
{
FatalWarning = "/warnaser... | bsd-3-clause |
ntop/ntopng | scripts/lua/modules/toasts/defined_toasts.lua | 1 | 8040 | --
-- (C) 2020 - ntop.org
--
local page_utils = require("page_utils")
local predicates = require("predicates_defined_toasts")
-- Placeholder for pages/excluded, subpages/excluded tables
local EMPTY_PAGES = {}
local pages = page_utils.menu_entries
--- Define a new toast is easy, here is 3 steps to follow:
--- 1) choo... | gpl-3.0 |
marcoskwkm/snesbot | lua/snes9x_dump.lua | 2 | 1469 | --[[
Script to dump input from snes9x movie files
--]]
file, err = io.open("s9x_input.dump", "wb");
if not file then
error("Can't open output file: " .. err);
end
current_input = 0;
local input_table={}
current_frame = 0;
running = 1;
emu.registerafter (function (dump_input)
current_frame = current_... | gpl-2.0 |
ntop/ntopng | doc/src/api/lua_c/ntop/ntop_users.lua | 2 | 4184 | --! @brief Get ntopng users information.
--! @return ntopng users information.
function ntop.getUsers()
--! @brief Add a new ntopng user.
--! @param username the user name to add.
--! @param full_name a descriptive user name.
--! @param password the user password.
--! @param host_role the user group, should be "unpriv... | gpl-3.0 |
Scoth42/rfkasm | fceux-2.2.2-win32/luaScripts/PunchOutChallenge.lua | 3 | 10068 | --Mike Tyson's Punch Out!!
--Intended to Challenge the PROs!
--adelikat
local NumStars = 0x0342
local UntilStar = 0x0347 --Number of punches to land until Mac can get a star
local NumHearts = 0x0321 --Number of hearts, single digit
local NumHearts10 = 0x0322 --Number of hearts, 10's digit
local CurrentRoundA = 0x00... | gpl-2.0 |
ac-minetest/smart_mobs | rat.lua | 1 | 1150 |
-- Rat by PilzAdam
mobs:register_mob("mobs:rat", {
type = "animal",
passive = true,
hp_min = 1,
hp_max = 4,
armor = 200,
collisionbox = {-0.2, -1, -0.2, 0.2, -0.8, 0.2},
visual = "mesh",
mesh = "mobs_rat.b3d",
textures = {
{"mobs_rat.png"},
{"mobs_rat2.png"},
},
makes_footstep_sound = false,
sounds = ... | mit |
spam2017/delete_tg | libs/serpent.lua | 31 | 8016 | local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License
local c, d = "Paul Kulchenko", "Lua serializer and pretty printer"
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'}
local badtype = {thread = true, userdata = true, cdata = true}
lo... | gpl-3.0 |
guorendong/iridium-browser-ubuntu | third_party/skia/tools/lua/skia.lua | 207 | 1863 | -- Experimental helpers for skia --
function string.startsWith(String,Start)
return string.sub(String,1,string.len(Start))==Start
end
function string.endsWith(String,End)
return End=='' or string.sub(String,-string.len(End))==End
end
Sk = {}
function Sk.isFinite(x)
return x * 0 == 0
end
----------------... | bsd-3-clause |
cis542/VR_Wall | PongGame2/glsdk/glload/codegen/_MakeInclExtFile.lua | 5 | 7527 | --[[ The function, MakeInclExtFile, will create a header file containing the enums, extension test values, and the list of function pointers for all OpenGL extensions. It will create a C and C++ version
It takes these parameters:
- the name of the output file. Without the path.
- the specData, as formatted by LoadLuaS... | epl-1.0 |
ntop/ntopng | scripts/lua/modules/xmlSimple.lua | 2 | 5805 | -- module(..., package.seeall)
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
--
-- xml.lua - XML parser for use with the Corona SDK.
--
-- version: 1.2
--
-- CHANGELOG:
--
-- 1.2 - Created new structur... | gpl-3.0 |
LuaDist2/lunamark | lunamark/writer/xml.lua | 5 | 1499 | -- (c) 2009-2011 John MacFarlane. Released under MIT license.
-- See the file LICENSE in the source for details.
--- Generic XML writer for lunamark.
-- It extends [lunamark.writer.generic] and is extended by
-- [lunamark.writer.html] and [lunamark.writer.docbook].
local M = {}
local generic = require("lunamark.writ... | mit |
ntop/ntopng | scripts/lua/modules/alert_store/all_alert_store.lua | 1 | 13817 | --
-- (C) 2021-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path
-- Import the classes library.
local classes = require "classes"
require "lua_utils"
... | gpl-3.0 |
rigeirani/a | 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 |
sparrow8332/CQUI_Community-Edition | Assets/UI/Popups/mappinpopup.lua | 7 | 17666 | ----------------------------------------------------------------
-- MapPinPopup
--
-- Popup used for creating and editting map pins.
----------------------------------------------------------------
include( "PlayerTargetLogic" );
include ("ToolTipHelper");
-------------------------------------------------------------... | mit |
eaufavor/AwesomeWM-powerarrow-dark | collision/max.lua | 1 | 6486 | local capi = {screen=screen,client=client}
local wibox = require("wibox")
local awful = require("awful")
local cairo = require( "lgi" ).cairo
local color = require( "gears.color" )
local beautiful = require( "beautiful" )
local surface = require( "gears.surface" )
local pango = requir... | apache-2.0 |
staltz/telegram-bot | plugins/twitter.lua | 2 | 2057 | local OAuth = require "OAuth"
local consumer_key = config.twitter.consumer_key
local consumer_secret = config.twitter.consumer_secret
local access_token = config.twitter.access_token
local access_token_secret = config.twitter.access_token_secret
local client = OAuth.new(consumer_key, consumer_secret, {
RequestTok... | gpl-2.0 |
caohongtao/quick-cocos-demo | src/framework/cc/components/ui/BasicLayoutProtocol.lua | 20 | 3735 |
local Component = cc.Component
local BasicLayoutProtocol = class("BasicLayoutProtocol", Component)
local MAX = 999999
function BasicLayoutProtocol:ctor()
BasicLayoutProtocol.super.ctor(self, "BasicLayoutProtocol")
end
function BasicLayoutProtocol:getLayoutSize()
if self.layoutSize_ then
return self.... | apache-2.0 |
shadowmourne/vicious | widgets/fs.lua | 8 | 1681 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
-- * (c) 2009, Lucas de Vries <lucas@glacicle.com>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { p... | gpl-2.0 |
ekapujiw2002/nodemcu-firmware | lua_modules/bh1750/bh1750.lua | 89 | 1372 | -- ***************************************************************************
-- BH1750 module for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-22
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***************************************************************************
loca... | mit |
icetoggle/skynet | service/launcher.lua | 9 | 4124 | local skynet = require "skynet"
local core = require "skynet.core"
require "skynet.manager" -- import manager apis
local string = string
local services = {}
local command = {}
local instance = {} -- for confirm (function command.LAUNCH / command.ERROR / command.LAUNCHOK)
local launch_session = {} -- for command.QUERY,... | mit |
lizh06/premake-4.x | tests/baking/test_merging.lua | 57 | 2096 | --
-- tests/baking/test_merging.lua
-- Verifies different field types are merged properly during baking.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.baking_merging = { }
local suite = T.baking_merging
--
-- Setup code
--
local sln, prj, cfg
function suite.setup()
sln = solution "MySolution... | bsd-3-clause |
vikas17a/Algorithm-Implementations | Memoization/Lua/Yonaba/memoize_test.lua | 26 | 1080 | -- Tests for memoize.lua
local memoize = require 'memoize'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end
local... | mit |
ckaotik/ckaosCraft | libs/Unfit-1.0/Unfit-1.0.lua | 1 | 5708 | --[[
Copyright 2011-2017 João Cardoso
Unfit is distributed under the terms of the GNU General Public License (Version 3).
As a special exception, the copyright holders of this library give you permission to embed it
with independent modules to produce an addon, regardless of the license terms of these
independent modul... | bsd-3-clause |
mbmahdiiii/m | plugins/admin.lua | 230 | 6382 | 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 |
caohongtao/quick-cocos-demo | src/app/layers/HubLayer.lua | 1 | 9755 | local score = 0
local deepth = 0
HubLayer = class("HubLayer", function()
return display.newLayer("HubLayer")
end)
local UP_BAR = {
texture = "ui/topbar.png",
x = display.left,
y = display.top-3,
align = display.LEFT_TOP,
pause = {
normal = "ui/stopup.png",
pressed = "ui/stop... | apache-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[race]/race/nametags.lua | 3 | 10502 | nametag = {}
local nametags = {}
local g_screenX,g_screenY = guiGetScreenSize()
local bHideNametags, bOnlyHealthBar = false, false
enableCustomNametags = false
-- Vanilla nametag values --
NAMETAG_SCALE = 0.3 --Overall adjustment of the nametag, use this to resize but constrain proportions
NAMETAG_ALPHA_DISTANCE = 50 ... | mit |
vikas17a/Algorithm-Implementations | Bogobogosort/Lua/Yonaba/bogobogosort_test.lua | 27 | 1996 | -- Tests for bogobogosort.lua
local bogobogosort = require 'bogobogosort'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end... | mit |
ntop/ntopng | scripts/lua/modules/alert_definitions/flow/alert_dns_data_exfiltration.lua | 1 | 1559 | --
-- (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 |
adib1380/BotiSmylife | plugins/meme.lua | 637 | 5791 | local helpers = require "OAuth.helpers"
local _file_memes = './data/memes.lua'
local _cache = {}
local function post_petition(url, arguments)
local response_body = {}
local request_constructor = {
url = url,
method = "POST",
sink = ltn12.sink.table(response_body),
headers = {},
red... | gpl-2.0 |
focusworld/focus | plugins/meme.lua | 637 | 5791 | local helpers = require "OAuth.helpers"
local _file_memes = './data/memes.lua'
local _cache = {}
local function post_petition(url, arguments)
local response_body = {}
local request_constructor = {
url = url,
method = "POST",
sink = ltn12.sink.table(response_body),
headers = {},
red... | gpl-2.0 |
MPogoda/dotfiles | neovim/lua/plugin/completion.lua | 1 | 1538 | local cmp = require('cmp')
local lspkind = require('lspkind')
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'luasnip' },
{ name = 'buf... | mit |
mohammadspemmer/mamad | plugins/id.lua | 1 | 50656 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://assets-cdn.github.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href=... | gpl-3.0 |
mamadtnt/um | 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 |
numo16/wesnoth | data/ai/micro_ais/cas/ca_zone_guardian.lua | 26 | 5275 | local H = wesnoth.require "lua/helper.lua"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "lua/location_set.lua"
local function get_guardian(cfg)
local filter = cfg.filter or { id = cfg.id }
local guardian = AH.get_units_with_moves {
side = wesnoth.current.side,
{ ... | gpl-2.0 |
caohongtao/quick-cocos-demo | src/framework/cc/components/Component.lua | 23 | 1247 |
local Component = class("Component")
function Component:ctor(name, depends)
self.name_ = name
self.depends_ = checktable(depends)
end
function Component:getName()
return self.name_
end
function Component:getDepends()
return self.depends_
end
function Component:getTarget()
return self.target_
en... | apache-2.0 |
maikerumine/aftermath | mods/mobs_fallout/esnpc.lua | 2 | 37717 | --mobs_fallout v0.0.4
--maikerumine
--made for Extreme Survival game
--dofile(minetest.get_modpath("mobs_fallout").."/api.lua")
--REFERENCE
--function (mod_name_here):spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
mobs.npc_drops = { "citys... | lgpl-2.1 |
numo16/wesnoth | data/campaigns/tutorial/lua/character_selection.lua | 22 | 2203 | -- #textdomain wesnoth-tutorial
-- Allows the player to choose whether they want to play Konrad or Li’sar
-- for the tutorial
local helper = wesnoth.require "lua/helper.lua"
local T = helper.set_wml_tag_metatable {}
local wml_actions = wesnoth.wml_actions
local _ = wesnoth.textdomain "wesnoth-tutorial"
function wml_... | gpl-2.0 |
graydon/monotone | tests/automate_get_file,_automate_get_file_of/__driver__.lua | 1 | 1523 |
mtn_setup()
fileid = "4cbd040533a2f43fc6691d773d510cda70f4126a"
writefile("expected", "blah\n")
addfile("foo", "blah\n")
check(mtn("commit", "--date=2005-05-21T12:30:51",
"--branch=testbranch", "--message=blah-blah"), 0, false, false)
rev1 = base_revision()
--
-- get_file tests
--
-- check that a correc... | gpl-2.0 |
noa/nn | TemporalConvolution.lua | 44 | 1670 | local TemporalConvolution, parent = torch.class('nn.TemporalConvolution', 'nn.Module')
function TemporalConvolution:__init(inputFrameSize, outputFrameSize, kW, dW)
parent.__init(self)
dW = dW or 1
self.inputFrameSize = inputFrameSize
self.outputFrameSize = outputFrameSize
self.kW = kW
self.dW = dW
... | bsd-3-clause |
flily/lua-performance | src/init.lua | 1 | 1162 |
local M = {
cases = {},
index = {},
all_names = {},
}
function M.load(name)
local m = require(name)
local l = #M.cases
if "table" ~= type(m) then
error(string.format("Invalid data type returned from test '%s', a table is required.", name))
end
if nil == m.name then
er... | bsd-2-clause |
vikas17a/Algorithm-Implementations | Quick_Sort/Lua/Yonaba/quick_sort.lua | 27 | 1335 | -- (In-place) Quicksort implementation
-- See : http://en.wikipedia.org/wiki/Quicksort#In-place_version
-- Partitions a portion of a list
local function partition(list, comp, left, right, pivot_index)
local pivot_value = list[pivot_index]
list[pivot_index], list[right] = list[right], list[pivot_index]
local store_i... | mit |
Miigon/luvit | tests/test-net-connect-handle-econnrefused.lua | 11 | 1147 | --[[
Copyright 2012-2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | apache-2.0 |
FelixMaxwell/ReDead | gamemode/vgui/vgui_goodmodelpanel.lua | 1 | 4467 | /* _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_) sucks shit
*/
local PANEL = {}
AccessorFunc( PANEL, "m_fAnimSpeed", "AnimSpeed" )
A... | mit |
Bierbuikje/Mr.Green-MTA-Resources | resources/[gameplay]/gcshop/items/trials/gctrials_c.lua | 3 | 9251 | -- Credit to http://community.multitheftauto.com/index.php?p=resources&s=details&id=430
local minus = false
local plus = false
local bikes = { ['NRG-500']=true, ['PCJ-600']=true, ['FCR-900']=true, ['BF-400']=true, ['Sanchez']=true }
-------------
-- Loading --
-------------
function loadGCTrials( bool, settings )
... | mit |
maikerumine/aftermath | mods/farming/carrot.lua | 3 | 4480 |
--= Carrot (Original textures from PixelBox texture pack)
-- https://forum.minetest.net/viewtopic.php?id=4990
minetest.register_craftitem("farming:carrot", {
description = "Carrot",
inventory_image = "farming_carrot.png",
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, ... | lgpl-2.1 |
pgl/prat | modules/Alias.lua | 2 | 17181 | ---------------------------------------------------------------------------------
--
-- 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 |
graydon/monotone | tests/rosterify_handles_.mt-ignore_files/__driver__.lua | 1 | 1218 |
mtn_setup()
writefile("foo", "foo")
writefile("bar", "bar")
-- the first db has a single rev, containing a file ".mt-ignore", with
-- contents "foo". rosterify should turn it into .mtn-ignore.
remove("test.db")
check(get("ignore-1.db.dump", "stdin"))
check(mtn("db", "load"), 0, false, false, true)
check(mtn("db", ... | gpl-2.0 |
ckaotik/ckaosCraft | libs/LibOptionsGenerate-1.0.lua | 2 | 16113 | local MAJOR, MINOR = 'LibOptionsGenerate-1.0', 24
local lib = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
-- GLOBALS: _G, type, pairs, ipairs, wipe, strsplit
local SharedMedia = LibStub('LibSharedMedia-3.0', true)
local AceDBScopes = {'global', 'profile', 'char', 'realm', 'factionrealm', 'faction', 'c... | bsd-3-clause |
xianjiec/nn | ConcatTable.lua | 10 | 3681 | local ConcatTable, parent = torch.class('nn.ConcatTable', 'nn.Container')
function ConcatTable:__init()
parent.__init(self)
self.modules = {}
self.output = {}
end
function ConcatTable:updateOutput(input)
for i=1,#self.modules do
self.output[i] = self:rethrowErrors(self.modules[i], i, 'updateOutput',... | bsd-3-clause |
ntop/ntopng | scripts/lua/modules/notifications/endpoints.lua | 1 | 19838 | --
-- (C) 2019-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/recipients/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/toasts/?.lua;" .. package.path
... | gpl-3.0 |
graydon/monotone | tests/automate_leaves/__driver__.lua | 1 | 1120 |
mtn_setup()
-- A
-- |\
-- B C
-- \|
-- D
-- ^testbranch
-- ^otherbranch
revs = {}
check(mtn("automate", "leaves"), 0, 0, false)
addfile("testfile", "blah blah")
commit()
revs.a = base_revision()
check(mtn("automate", "leaves"), 0, true, false)
check(trim(readfile("stdout")) == revs.a)
writefile("testfile", "... | gpl-2.0 |
neo-umbrella/neo-umbrella | plugins/ingroup.lua | 202 | 31524 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
... | gpl-2.0 |
nimaghorbani/nimabot | plugins/ingroup.lua | 202 | 31524 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
... | gpl-2.0 |
alirezanile/last-slept | plugins/ingroup.lua | 202 | 31524 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
... | gpl-2.0 |
Banderi/OpenTomb | scripts/gameflow/TR3_gold.lua | 2 | 2643 | -- Gameflow Script for OpenTomb
-- Game: Tomb Raider: III Gold
-- Version: 1.0
-- By: Lwmte
------------------------------------------------------------------------------------------------------------------------------------------------------
gameflow_paths[GAME_3_5].numlevels = 6;
----------------------------------... | lgpl-3.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[gameplay]/gcshop/horns/horns_c.lua | 1 | 22855 | local screenWidth, screenHeight = guiGetScreenSize()
downloadHornList = {}
hornsTable = {
[1] = "Birdo-geluidje",
[2] = "Boo-gebulder",
[3] = "Come on! - Wario",
[4] = "Dry Bones-gegiechel",
[5] = "Hatsjwao! Oh sorry.. - Luigi",
[6] = "Hey Stinky! - Mario",
[7] = "Mushroom! - Toadette",
[8] = "Peach-annoy",
[... | mit |
vrum/rlTut | libtcod/lua/samples_lua.lua | 2 | 14410 | #!/usr/bin/lua
dofile "libtcodlua.lua"
SAMPLE_SCREEN_WIDTH = 46
SAMPLE_SCREEN_HEIGHT = 20
SAMPLE_SCREEN_X = 20
SAMPLE_SCREEN_Y = 10
tcod.console.setCustomFont("data/fonts/consolas10x10_gs_tc.png", tcod.Greyscale + tcod.LayoutTCOD)
tcod.console.initRoot(80,50,"libtcod lua sample", false, tcod.SDL)
root=libtcod.TCODCons... | mit |
ntop/ntopng | scripts/lua/modules/alert_definitions/other/alert_list_download_succeeded.lua | 1 | 1445 | --
-- (C) 2019-22 - ntop.org
--
-- ##############################################
local other_alert_keys = require "other_alert_keys"
-- Import the classes library.
local classes = require "classes"
-- Make sure to import the Superclass!
local alert = require "alert"
local alert_entities = require "alert_entities"
-... | gpl-3.0 |
maikerumine/aftermath | mods/minetest-we/worldedit/wand.lua | 2 | 1648 | minetest.register_tool("worldedit:wand", {
description = "WorldEdit wand tool. Left-click to set the 1st position, Right-click to set the 2nd position.",
groups = {},
inventory_image = "worldedit_wand.png",
wield_image = "",
wield_scale = {x=1,y=1,z=1},
stack_max = 1, -- there is no need to have more than one
li... | lgpl-2.1 |
Miigon/luvit | deps/core.lua | 3 | 9434 | --[[
Copyright 2014 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | apache-2.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/src/actions/vstudio/vs2010_vcxproxj.lua | 6 | 19730 |
premake.vstudio.vs10_helpers = { }
local vs10_helpers = premake.vstudio.vs10_helpers
function vs10_helpers.remove_relative_path(file)
file = file:gsub("%.%.\\",'')
file = file:gsub("%.\\",'')
return file
end
function vs10_helpers.file_path(file)
file = vs10_helpers.remove_relative_path(file)
local... | gpl-2.0 |
zhtlancer/vicious | contrib/rss.lua | 18 | 1741 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2009, olcc
--
-- This is now a standalone RSS reader for awesome:
-- * http://github.com/olcc/aware
---------------------------------------------------
-- {{{ Grab environment
local pairs = pairs
local io... | gpl-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[admin]/admin/admin_definitions.lua | 7 | 2408 | --[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* admin_definitions.lua
*
* Original File by lil_Toady
*
**************************************]]
_DEBUG = false
_version = '1.3.1'
_root = getRootElement()
if ( getLocalPlayer ) then
_local = getLocalPlayer()
else
_local = getResourceRo... | mit |
lemones/dotfiles | home/.config/awesome/lain/util/init.lua | 1 | 4695 | --[[
Lain
Layouts, widgets and utilities for Awesome WM
Utilities section
Licensed under GNU General Public License v2
* (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
local awful = require("awful")
local sqrt = math.sqrt
local pairs = pairs
loc... | gpl-3.0 |
CoolMan119/HousePost | client.lua | 1 | 1684 | -- HousePost Client
-- Made by houseofkraft
-- Functions
if term.isColor() == false then
printError("HousePost requires a Advanced Computer!")
error()
end
local function findServer()
rednet.broadcast("serverlookup")
id, message = rednet.receive(1)
if message == "sucess" then
return tostring(id)
else
... | mit |
ntop/ntopng | scripts/lua/modules/check_definitions/network/egress.lua | 1 | 1176 | --
-- (C) 2019-22 - ntop.org
--
local alerts_api = require("alerts_api")
local alert_consts = require("alert_consts")
local checks = require("checks")
local script = {
-- Script category
category = checks.check_categories.network,
default_enabled = false,
severity = alert_consts.get_printable_severities().er... | gpl-3.0 |
RockySeven3161/Unknown8765 | 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 |
noa/nn | MarginRankingCriterion.lua | 43 | 1963 | local MarginRankingCriterion, parent = torch.class('nn.MarginRankingCriterion', 'nn.Criterion')
function MarginRankingCriterion:__init(margin)
parent.__init(self)
margin=margin or 1
self.margin = margin
self.gradInput = {torch.Tensor(1), torch.Tensor(1)}
end
function MarginRankingCriterion:updateOutput... | bsd-3-clause |
sparrow8332/CQUI_Community-Edition | Assets/UI/civ6common.lua | 2 | 43691 | ------------------------------------------------------------------------------
-- Common LUA support functions specific to Civilization 6
------------------------------------------------------------------------------
include( "ToolTipHelper" );
-- ====================================================================... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.