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 |
|---|---|---|---|---|---|
kingjan123/TiagoBot | plugins/english_lang.lua | 4 | 19707 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-3.0 |
keidax/awesome | awesomerc.lua | 1 | 18599 | -- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = r... | gpl-2.0 |
zzamboni/hammerspoon | extensions/console/init.lua | 8 | 6180 | --- === hs.console ===
---
--- Some functions for manipulating the Hammerspoon console.
---
--- These functions allow altering the behavior and display of the Hammerspoon console. They should be considered experimental, but have worked well for me.
-- make sure NSColor conversion tools are installed
require("hs.drawi... | mit |
Cloudef/darkstar | scripts/zones/Northern_San_dOria/npcs/Machella.lua | 5 | 1120 | -----------------------------------
-- Area: Northern San d'Oria
-- NPC: Machella
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Northern_San_dOria/TextIDs");
require("scripts/globals/... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Bastok_Mines/npcs/Neigepance.lua | 5 | 1303 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Neigepance
-- Standard Merchant NPC
-----------------------------------
require("scripts/globals/shop");
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Bastok_Mines/TextIDs");
-----... | gpl-3.0 |
Cloudef/darkstar | scripts/globals/mobskills/mangle.lua | 37 | 1070 | ---------------------------------------------
-- Mangle
-- Family: Qutrub
-- Description: Deals damage in a threefold attack to targets in a fan-shaped area of effect.
-- Type: Physical
-- Utsusemi/Blink absorb: 3 shadows
-- Range: Front cone
-- Notes: Used only when wielding their initial sword, or the dagger o... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Apollyon/mobs/Troglodyte_Dhalmel.lua | 22 | 1385 | -----------------------------------
-- Area: Apollyon NE
-- NPC: Troglodyte Dhalmel
-----------------------------------
package.loaded["scripts/zones/Apollyon/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Apollyon/TextIDs");
----------------------... | gpl-3.0 |
Cloudef/darkstar | scripts/commands/despawnmob.lua | 22 | 1062 | ---------------------------------------------------------------------------------------------------
-- func: despawnmob <mobid-optional>
-- desc: Despawns the given mob <t> or mobID)
---------------------------------------------------------------------------------------------------
cmdprops =
{
permission = 1,
... | gpl-3.0 |
tst2005googlecode/fbclient | lua/fbclient/decimal_lgmp.lua | 2 | 1946 | --[=[
lgmp binding for gmp decimal number support
df(lo,hi,scale) -> d; to be used with getdecimal()
sdf(d,scale) -> lo,hi; to be used with setdecimal()
gmp_meta -> the metatable of all gmp numbers
isgmp(x) -> true|false; the gmp library should provide this but since it doesn't...
xsqlvar:getgmp() -> d
xsql... | mit |
fredericjoanis/buildsystem | extern/premake/scripts/release.lua | 16 | 4584 | --
-- Prepare a new Premake release. This is still incomplete and some manual
-- work is needed to get everything packaged up. See RELEASE.txt in this
-- folder for the full checklist.
--
-- Info on using Mercurial to manage releases:
-- http://hgbook.red-bean.com/read/managing-releases-and-branchy-development.html
... | mit |
rfernand/telegram-bot | plugins/steam.lua | 645 | 2117 | -- See https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI
do
local BASE_URL = 'http://store.steampowered.com/api/appdetails/'
local DESC_LENTH = 200
local function unescape(str)
str = string.gsub( str, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
we20/wez | plugins/steam.lua | 645 | 2117 | -- See https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI
do
local BASE_URL = 'http://store.steampowered.com/api/appdetails/'
local DESC_LENTH = 200
local function unescape(str)
str = string.gsub( str, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
MinetestForFun/server-minetestforfun | minetestforfun_game/mods/farming/coffee.lua | 12 | 3642 |
local S = farming.intllib
-- coffee
minetest.register_craftitem("farming:coffee_beans", {
description = S("Coffee Beans"),
inventory_image = "farming_coffee_beans.png",
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
end,
})
... | unlicense |
DARKRPISSHITFIXTHISUPDATE/DarkRP | gamemode/modules/fadmin/fadmin/playeractions/ragdoll/cl_init.lua | 11 | 2236 | FAdmin.StartHooks["Ragdoll"] = function()
FAdmin.Access.AddPrivilege("Ragdoll", 2)
FAdmin.Commands.AddCommand("Ragdoll", nil, "<Player>", "[normal/hang/kick]")
FAdmin.Commands.AddCommand("UnRagdoll", nil, "<Player>")
FAdmin.ScoreBoard.Player:AddActionButton(function(ply)
if ply:FAdmin_GetGlobal... | mit |
foxostro/CheeseTesseract | premake.lua | 1 | 2009 | project.name = "CheeseTesseract"
project.config["Debug"].bindir = "bin/" .. OS .. "_Debug"
project.config["Release"].bindir = "bin/" .. OS .. "_Release"
-- Main Game Application -----------------------------------------------------
package = newpackage()
package.name = "MainApp"
package.kind = "exe"
package.langua... | mit |
jsfdez/premake-core | tests/actions/vstudio/cs2005/projectelement.lua | 9 | 1601 | --
-- tests/actions/vstudio/cs2005/projectelement.lua
-- Validate generation of <Project/> element in Visual Studio 2005+ .csproj
-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_cs2005_projectelement")
local cs2005 = premake.vstudio.cs2005
--
-- Setup
--
lo... | bsd-3-clause |
Cloudef/darkstar | scripts/commands/reloadglobal.lua | 22 | 1337 | ---------------------------------------------------------------------------------------------------
-- func: reloadglobal
-- desc: Attempt to reload specified global lua without a restart.
--
-- Use with caution, some files (like player.lua) can
-- possibly cause problems if you reload them using this.
-- This command ... | gpl-3.0 |
rlk/electro | examples/vortex/vortex-full.lua | 1 | 12310 |
button = 0
dx = 0
dy = 0
dz = 0
wx = 0
wy = 0
wz = 0
show_lines = true
magnitude = 250
track = false
-------------------------------------------------------------------------------
fly = false
fly_px = 0
fly_py = 0
fly_pz = 0
fly_xx = 0
fly_xy = 0
fly_xz = 0
fly_yx = 0
fly_yy = 0
fly_yz = 0
fly_zx = 0
fly_zy =... | gpl-2.0 |
Cloudef/darkstar | scripts/zones/Ilrusi_Atoll/Zone.lua | 5 | 1033 | -----------------------------------
--
-- Zone: Ilrusi_Atoll
-- zone 55
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Ilrusi_Atoll/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Ilrusi_Atoll/TextIDs");
require("scripts/globals/settin... | gpl-3.0 |
DARKRPISSHITFIXTHISUPDATE/DarkRP | gamemode/modules/workarounds/sh_workarounds.lua | 3 | 11076 | -- Shared part
/*---------------------------------------------------------------------------
Sound crash glitch
---------------------------------------------------------------------------*/
local entity = FindMetaTable("Entity")
local EmitSound = entity.EmitSound
function entity:EmitSound(sound, ...)
if not sound ... | mit |
Owlies/server | test/testcoroutine.lua | 24 | 1214 | local skynet = require "skynet"
-- You should use skynet.coroutine instead of origin coroutine in skynet
local coroutine = require "skynet.coroutine"
local profile = require "profile"
local function status(co)
repeat
local status = coroutine.status(co)
print("STATUS", status)
skynet.sleep(100)
until status == ... | mit |
Cloudef/darkstar | scripts/zones/Aht_Urhgan_Whitegate/npcs/Sharin-Garin.lua | 5 | 1638 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Sharin-Garin
-- Type: Adventurer's Assistant
-- !pos 122.658 -1.315 33.001 50
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/be... | gpl-3.0 |
szagoruyko/fblualib | fblualib/ffivector/fb/ffivector/init.lua | 4 | 9360 | --
-- Copyright (c) 2014, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- This class i... | bsd-3-clause |
sssemil/cjdns | contrib/lua/cjdns/router.lua | 40 | 3083 | -- Cjdns admin module for Lua
-- Written by Philip Horger
-- hacked up dumpTable, switchpinger, peerstats
-- and other oddities by William Fleurant
common = require 'cjdns/common'
RouterFunctions = {}
RouterFunctions.__index = RouterFunctions
common.RouterFunctions = RouterFunctions
function RouterFunctions.new(ai, c... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Throne_Room/npcs/_4l3.lua | 66 | 1207 | -----------------------------------
-- Area: Throne Room
-- NPC: Ore Door
-------------------------------------
require("scripts/globals/bcnm");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
if (TradeBCNM(player,player:getZoneID... | gpl-3.0 |
nivertech/duktape | tests/perf/test-reg-load.lua | 12 | 1793 | local function test()
local t
local r0 = 123.0
local r1 = 123.1
local r2 = 123.2
local r3 = 123.3
local r4 = 123.4
local r5 = 123.5
local r6 = 123.6
local r7 = 123.7
local r8 = 123.8
local r9 = 123.9
for i=1,1e7 do
t = r0
t = r1
t = r2
t =... | mit |
Cloudef/darkstar | scripts/zones/Temenos/mobs/Pee_Qoho_the_Python.lua | 28 | 1584 | -----------------------------------
-- Area: Temenos
-- NPC:
-----------------------------------
package.loaded["scripts/zones/Temenos/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Temenos/TextIDs");
-----------------------------------
-- onMobSpaw... | gpl-3.0 |
dddaaaddd/teleseed_super | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
Cloudef/darkstar | scripts/zones/North_Gustaberg/npcs/qm2.lua | 4 | 1092 | -----------------------------------
-- Area: North Gustaberg
-- NPC: qm2 (???)
-- Involved in Quest "As Thick As Thieves"
-- !pos -232.924 99.107 442.990 106
-----------------------------------
package.loaded["scripts/zones/North_Gustaberg/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Nor... | gpl-3.0 |
Cloudef/darkstar | scripts/globals/items/bowl_of_sutlac_+1.lua | 2 | 1129 | -----------------------------------------
-- ID: 5578
-- Item: Bowl of Sutlac
-- Food Effect: 4 Hrs, All Races
-----------------------------------------
-- TODO: Group Effect
-- HP +10
-- MP +10
-- INT +2
-- HP Recovered while healing +1
-- MP Recovered while healing +1
-----------------------------------------
require... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Port_Jeuno/npcs/Illauvolahaut.lua | 5 | 1252 | -----------------------------------
-- Area: Port Jeuno
-- NPC: Illauvolahaut
-- @zone 246
-- !pos -12 8 54
-----------------------------------
package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require... | gpl-3.0 |
ii02ii/Saqt_Token | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-3.0 |
we20/wez | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
Cloudef/darkstar | scripts/zones/Throne_Room/bcnms/where_two_paths_converge.lua | 7 | 1683 | ------------------------------------
-- Area: Throne Room
-- Name: Mission 9-2
-- !pos -111 -6 0 165
-----------------------------------
package.loaded["scripts/zones/Throne_Room/TextIDs"] = nil;
-------------------------------------
require("scripts/zones/Throne_Room/TextIDs");
require("scripts/globals/keyitems");
req... | gpl-3.0 |
fredericjoanis/buildsystem | build/build.lua | 5 | 2255 | -- Notes : For windows, msbuild.exe must be in path (ex: C:\Windows\Microsoft.NET\Framework64\v4.0.30319) and VCTargetsPath to something such as C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0
dofile("args.lua")
if isBuildSystem == true then
print("Cleaning all output directories")
os.rmdir("../tmp")
os... | mit |
pcchenxi/baseline | baselines/ppo1/environment/centauro_server.lua | 1 | 24618 | local lfs = require("lfs")
full_path = lfs.currentdir()
path = ";"..string.sub(full_path, 1, -5).."baseline/baselines/ppo1/environment/?.lua"
-- print(path)
package.path=package.path .. path
require("common_functions")
require("ompl_functions")
require("robot_control")
-- simSetThreadSwitchTiming(2)
-- simExtRemoteA... | mit |
rastin45/botrider12 | plugins/sudo.lua | 359 | 1878 | function run_sh(msg)
name = get_name(msg)
text = ''
-- if config.sh_enabled == false then
-- text = '!sh command is disabled'
-- else
-- if is_sudo(msg) then
-- bash = msg.text:sub(4,-1)
-- text = run_bash(bash)
-- else
-- text = name .. ' yo... | gpl-2.0 |
woshihuo12/UnityHello | UnityHello/Assets/ToLua/Lua/UnityEngine/Color.lua | 6 | 5819 | --------------------------------------------------------------------------------
-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com
-- All rights reserved.
-- Use, modification and distribution are subject to the "MIT License"
-----------------------------------------------------------------... | mit |
ryangmor/myrep | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
spark051/bt.bot | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
vikas17a/Algorithm-Implementations | Factorial/Lua/Yonaba/factorial_test.lua | 27 | 1336 | -- Tests for factorial.lua
local fact = require 'factorial'
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
loca... | mit |
vikas17a/Algorithm-Implementations | Radix_Sort/Lua/Yonaba/radix_sort_test.lua | 27 | 1369 | -- Tests for radix_sort.lua
local radix_sort = require 'radix_sort'
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
loca... | mit |
caohongtao/quick-cocos-demo | src/app/layers/QuestLayer.lua | 1 | 1066 | local DataManager = require("app.DataManager")
local QuestLayer = class("QuestLayer", function()
return display.newLayer("QuestLayer")
end)
function QuestLayer:ctor()
cc(self):addComponent("components.behavior.EventProtocol"):exportMethods()
-- 开始游戏按键
cc.ui.UIPushButton.new({normal="ui/cong... | apache-2.0 |
pinghe/nginx-openresty-windows | lua-resty-lock-0.04/lib/resty/lock.lua | 35 | 4451 | -- Copyright (C) Yichun Zhang (agentzh)
local ffi = require "ffi"
local ffi_new = ffi.new
local shared = ngx.shared
local sleep = ngx.sleep
local shdict_mt
local debug = ngx.config.debug
local setmetatable = setmetatable
local getmetatable = getmetatable
local tonumber = tonumber
local _M = { _VERSION = '0.04' }
lo... | bsd-2-clause |
flily/lua-performance | src/name-length.lua | 1 | 2492 | #!/usr/bin/lua
local states = {
"alabama", "alaska", "arizona", "arkansas",
"california", "colorado", "connecticut", "delaware",
"florida", "georgia", "hawaii", "idaho",
"illinois", "indiana", "iowa", "kansas",
... | bsd-2-clause |
ntop/ntopng | scripts/lua/inc/ebpf_flows_stats.lua | 1 | 5913 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local graph_utils = require "graph_utils"
require "flow_utils"
local page_utils = require("page_utils")
local tcp_flow_state_utils = require("tcp_flow_state_... | gpl-3.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[gameplay]/gc/database.lua | 2 | 7532 | local gcData = {
host = get"*gcshop.host",
username = get("*gcshop.user"),
password = get("*gcshop.pass"),
database = "mrgreen_gc",
gcTable = "green_coins"
}
local forumData = {
host = get"*gcshop.host",
username = get("*gcshop.user"),
password = get("*gcshop.pass"),
database = "mr... | mit |
sparrow8332/CQUI_Community-Edition | Assets/UI/Popups/techciviccompletedpopup.lua | 2 | 15904 | -- ===========================================================================
-- Popups when a Tech or Civic are completed
-- ===========================================================================
include("TechAndCivicSupport"); -- (Already includes Civ6Common and InstanceManager) PopulateUnlockablesForTech, Pop... | mit |
Junxx/Totem_Infomation | Manatide.lua | 1 | 2345 | --[[--------------------------------------------------------------------
Totem Information
Display Totems CD on say Chat...
Written by Junxx EU-Khaz'goroth <addons@colordesigns.de>
http://wow.curseforge.com/addons/totems-infomation/
----------------------------------------------------------------------]]
local ADD... | gpl-3.0 |
vikas17a/Algorithm-Implementations | Burrows_Wheeler_Transform/Lua/Yonaba/bwt_test.lua | 26 | 1111 | -- Tests for bwt.lua
local bwt = require 'bwt'
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 status = ok... | mit |
nimaghorbani/nimabot | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/alert_definitions/other/alert_too_many_drops.lua | 1 | 2318 | --
-- (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 |
sparrow8332/CQUI_Community-Edition | Assets/UI/techandcivicsupport.lua | 2 | 28770 | -- ===========================================================================
-- Support functions for formatting of Tech and Civic areas which are used
-- within their "Choosers" and their panel version within the "World Tracker"
-- ===========================================================================
include(... | mit |
rigeirani/a | plugins/banhammer.lua | 1085 | 11557 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/connectivity_utils.lua | 1 | 1811 | --
-- (C) 2021-22 - ntop.org
--
--
-- This module is used at startup to check if
-- ntopng can freely access the Internet
--
local connectivity_utils = {}
-- #################################
connectivity_utils.DEFAULT_URL = "https://github.com"
-- Check internet connectivity
-- @return true on success, false othe... | gpl-3.0 |
maikerumine/aftermath | mods/mg_villages/init.lua | 3 | 2909 |
-- reserve namespace for the villages
mg_villages = {}
mg_villages.all_villages = {}
mg_villages.mg_generated_map = {}
mg_villages.anz_villages = 0;
mg_villages.modpath = minetest.get_modpath( "mg_villages");
mg_villages.DEBUG_LEVEL_NONE = -1 -- -1: disable all printed messages
mg_villages.DEBUG_LEVEL_NORMAL ... | lgpl-2.1 |
ntop/ntopng | scripts/lua/modules/alert_definitions/other/alert_port_mac_disappeared.lua | 1 | 2597 | --
-- (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 |
zhrtz/vicious | contrib/ossvol.lua | 17 | 1394 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
... | gpl-2.0 |
xianjiec/nn | PReLU.lua | 22 | 1417 | local PReLU, parent = torch.class('nn.PReLU','nn.Module')
function PReLU:__init(nOutputPlane)
parent.__init(self)
-- if no argument provided, use shared model (weight is scalar)
self.nOutputPlane = nOutputPlane or 0
self.weight = torch.Tensor(nOutputPlane or 1):fill(0.25)
self.gradWeight = torch.Tensor(... | bsd-3-clause |
maikerumine/aftermath | mods/cottages/adaptions.lua | 7 | 4717 | -- some games may not have the default nodes;
-- change this so that craft receipes work!
-- used for: anvil, hammer, barrel, steel hatch, stove pipe, wagon wheel, handmill.
cottages.craftitem_steel = "default:steel_ingot";
-- used for: hammer, wood+steel hatch, fence gate, bed, table, bench, shelf,
-- washi... | lgpl-2.1 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[gameplay]/mrgreen-settings/s_social.lua | 4 | 1457 | function join_setSerial()
setElementData( source, "pser", getPlayerSerial( source ), true )
end
addEventHandler ( "onPlayerJoin", root, join_setSerial )
function start_setSerial()
for f,u in pairs(getElementsByType( "player" )) do
if not hasObjectPermissionTo(u, "function.kickPlayer") then
setElementData( u, "p... | mit |
xianjiec/nn | ClassNLLCriterion.lua | 6 | 1967 | local THNN = require 'nn.THNN'
local ClassNLLCriterion, parent = torch.class('nn.ClassNLLCriterion', 'nn.Criterion')
function ClassNLLCriterion:__init(weights, sizeAverage)
parent.__init(self)
if sizeAverage ~= nil then
self.sizeAverage = sizeAverage
else
self.sizeAverage = true
end
i... | bsd-3-clause |
graydon/monotone | tests/importing_cvs_with_vendor_imports_and_branches/__driver__.lua | 1 | 1167 |
mtn_setup()
-- See makerepo.sh on how this repository was created.
check(get("cvs-repository"))
writefile("file1.1", "version 1 of test file1\n")
writefile("file1.2", "version 2 of test file1\n")
writefile("file2.0", "version 0 of test file2\n")
writefile("file2.1", "version 1 of test file2\n")
writefile("changelo... | gpl-2.0 |
maikerumine/aftermath | mods/hbhunger/hunger.lua | 2 | 18252 | -- Keep these for backwards compatibility
function hbhunger.save_hunger(player)
hbhunger.set_hunger_raw(player)
end
function hbhunger.load_hunger(player)
hbhunger.get_hunger_raw(player)
end
-- wrapper for minetest.item_eat (this way we make sure other mods can't break this one)
local org_eat = core.do_item_eat
core.... | lgpl-2.1 |
strukturag/vlc-2.2 | share/lua/modules/common.lua | 48 | 4964 | --[[ This code is public domain (since it really isn't very interesting) ]]--
module("common",package.seeall)
-- Iterate over a table in the keys' alphabetical order
function pairs_sorted(t)
local s = {}
for k,_ in pairs(t) do table.insert(s,k) end
table.sort(s)
local i = 0
return function () i = ... | gpl-2.0 |
fhchina/soui | demo/uires/lua/test.lua | 2 | 4098 | win = nil;
tid = 0;
gamewnd = nil;
gamecanvas = nil;
players = {};
flag_win = nil;
coins_all = 100; --ÏÖÓÐ×ʽð
coins_bet = {0,0,0,0} --ÏÂ×¢½ð¶î
bet_rate = 4; --ÅâÂÊ
prog_max = 200; --×î´ó²½Êý
prog_all = {0,0,0,0} --ÂíÆ¥½ø¶È
function on_init(args)
--³õʼ»¯È«¾Ö¶ÔÏó
win = toHostWnd(args.sender);
gamewnd = win:GetRo... | mit |
Brajanowski/Behind-Society | assets/gameplay/abode_graphics.lua | 1 | 6734 | AbodeGraphics = {}
local home_clouds = {}
local home_room_visibility = 0.0
local home_room_showing = false
AbodeGraphics.Init = function(id)
if id == nil then
return
end
if id == 0 then
AbodeGraphics.HomeInit()
elseif id == 1 then
AbodeGraphics.GarageInit()
elseif id == 2 then
AbodeGraphi... | apache-2.0 |
mesosphere-mergebot/dcos | packages/adminrouter/extra/src/lib/auth/open.lua | 2 | 5702 | local authcommon = require "auth.common"
local jwt = require "resty.jwt"
local util = require "util"
local AUTH_TOKEN_VERIFICATION_KEY = nil
local key_file_path = os.getenv("AUTH_TOKEN_VERIFICATION_KEY_FILE_PATH")
if key_file_path == nil then
ngx.log(ngx.WARN, "AUTH_TOKEN_VERIFICATION_KEY_FILE_PATH not set.")
e... | apache-2.0 |
SQbQxeKd3JHD8/simple_ConTeXt | scripts/parse_btx.lua | 2 | 6131 | local to_dict = require("table_to_dict")
local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
local C, Ct, match = lpeg.C, lpeg.Ct, lpeg.match
local bibtex
do
local end_of_string = P(-1)
local space = S(" \t")
local line = S("\r\n\f\v")
local equal = P("=")
local at = P("@")
local hash = P("#"... | mit |
caohongtao/quick-cocos-demo | runtime/ios/PrebuiltRuntimeLua.app/src/framework/display.lua | 6 | 53860 | --[[
Copyright (c) 2011-2014 chukong-inc.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | apache-2.0 |
mega9/GTW-RPG | [misc]/scoreboard/dxscoreboard_exports.lua | 5 | 10338 | MAX_PRIRORITY_SLOT = 500
scoreboardColumns = {
{ ["name"] = "ID", ["width"] = 20, ["friendlyName"] = "ID", ["priority"] = 1 },
{ ["name"] = "name", ["width"] = 200, ["friendlyName"] = "Name", ["priority"] = 2 },
{ ["name"] = "fps", ["width"] = 30, ["friendlyName"] = "FPS", ["priority"] = 3 },
{ ["name"] = "country... | gpl-3.0 |
blr246/midi-machine | lua/mid/data.lua | 1 | 6998 | --[
-- Function to manipulate MID data.
--
-- (c) 2014 Brandon L. Reiss
--]
require "lfs"
require "util"
require "test_util"
require "mid/event"
local get_len_check_expected = event.get_len_check_expected
local string_to_int = util.string_to_int
local int_to_string = util.int_to_string
local string_io = util.string... | bsd-3-clause |
nsimplex/snailking | scripts/snailking/prefabs/snailking.lua | 1 | 3391 | --@@ENVIRONMENT BOOTUP
local _modname = assert( (assert(..., 'This file should be loaded through require.')):match('^[%a_][%w_%s]*') , 'Invalid path.' )
module( ..., require(_modname .. '.booter') )
--@@END ENVIRONMENT BOOTUP
local assets=
{
Asset("ANIM", "anim/" .. TheMod:GetConfig("SNAILKING_BUILD") .. ".zip"),
A... | gpl-2.0 |
ryangmor/myrep | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
delram/seed3 | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
irandevtelegramrobots/sudorobot | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
rigeirani/a | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
dani-sj/extremenod | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/alert_definitions/flow/alert_ndpi_dns_large_packet.lua | 1 | 1128 | --
-- (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 |
maikerumine/aftermath | mods/minetest-we/worldedit_shortcommands/init.lua | 3 | 2228 | --provides shorter names for the commands in `worldedit_commands`
--returns true if command could not be aliased, false otherwise
worldedit.alias_chatcommand = function(alias, original_command)
if not minetest.chatcommands[original_command] then
minetest.log("error", "worldedit_shortcommands: original command " .. ... | lgpl-2.1 |
ntop/ntopng | scripts/lua/rest/v2/delete/all/alerts.lua | 1 | 1267 | --
-- (C) 2013-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
local alert_utils = require "alert_utils"
local alert_consts = require "alert_consts"
... | gpl-3.0 |
ac-minetest/smart_mobs | mese_monster.lua | 1 | 2234 |
-- Mese Monster by Zeg9
mobs:register_mob("mobs:mese_monster", {
type = "monster",
passive = false,
damage = 3,
attack_type = "shoot",
shoot_interval = 0.5,
arrow = "mobs:mese_arrow",
shoot_offset = 2,
hp_min = 10,
hp_max = 25,
armor = 80,
collisionbox = {-0.5, -1.5, -0.5, 0.5, 0.5, 0.5},
visual = "mesh",... | mit |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/test_vs2008_sln.lua | 7 | 1574 | --
-- tests/test_vs2008_sln.lua
-- Automated test suite for Visual Studio 2008 solution generation.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
T.vs2008_sln = { }
--
-- Configure a solution for testing
--
local sln
function T.vs2008_sln.setup()
_ACTION = "vs2008"
sln = solution "MySolution... | gpl-2.0 |
mbmahdiiii/m | plugins/stats.lua | 1 | 3977 | 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 |
VikramShetty/google-diff-match-patch | lua/diff_match_patch_test.lua | 264 | 39109 | --[[
* Test Harness for Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser
* Ported to Lua by Duncan Cross
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except... | apache-2.0 |
sdowsland/google-diff-match-patch | lua/diff_match_patch_test.lua | 264 | 39109 | --[[
* Test Harness for Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser
* Ported to Lua by Duncan Cross
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except... | apache-2.0 |
ASantosVal/vlc-extension-trials | share/lua/sd/assembleenationale.lua | 91 | 8388 | --[[
$Id$
Copyright © 2012 VideoLAN and AUTHORS
Authors: François Revol <revol at free dot fr>
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 op... | gpl-2.0 |
gajop/chiliui | luaui/chili/chili/headers/autolocalizer.lua | 1 | 3811 | ---------------------------------------------------------------------------
--
-- Lua Namespace Localizer
--
-- author: jK (2009)
--
-- License: GPLv2
--
-- Info:
-- overrides VFS.Include with a function that autolocalize the used namespaces
--
-- Settings
local maxLocals = 50
local namespaces = {
{"... | gpl-2.0 |
MOSAVI17/Security2 | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
vikas17a/Algorithm-Implementations | Radix_Sort/Lua/Yonaba/radix_sort.lua | 27 | 1612 | -- Radix sort algorithm
-- See: http://en.wikipedia.org/wiki/Radix_sort
-- Inspired from : http://stackoverflow.com/questions/7757063/radix-sort-not-working-in-lua
-- Applies transformation function on a list
local function apply(list, f)
local t = {}
for k,v in ipairs(list) do t[k] = f(v) end
return t
end
-- Gets... | mit |
mbmahdiiii/m | bot/utils.lua | 494 | 23873 | 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 |
ezietsman/app.setupfiles | conky/rings/conky/rings-v1.2.1.lua | 1 | 11114 | --[[
Ring Meters by londonali1010 (2009)
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement near the end of the sc... | mit |
eaufavor/AwesomeWM-powerarrow-dark | extern/notifications/init.lua | 1 | 7488 | local wibox = require("wibox")
local beautiful = require("beautiful")
local radical = require("radical")
local awful = require("awful")
local naughty = require("naughty")
local cairo = require("lgi").cairo
local color = require("gears.color")
local pango = require("lgi").Pango
local pang... | apache-2.0 |
exosite-garage/clp_sensorhub_support | Handle_SHT21_Data.lua | 1 | 3261 | -- Title: "Handle SHT21 Data"
-- Type: Lua Exosite Platform script
-- Description:
-- This script will take data from Connected LaunchPad reported for the
-- Sensor Hub Boosterpack's SHT21 sensor and put it into individual dataports
-- The data is reported in a json formatted string originally.
--
-- Tiva C Series D... | bsd-3-clause |
Bierbuikje/Mr.Green-MTA-Resources | resources/[web]/irc/scripts/commands.lua | 4 | 3140 | ---------------------------------------------------------------------
-- Project: irc
-- Author: MCvarial
-- Contact: mcvarial@gmail.com
-- Version: 1.0.0
-- Date: 31.10.2010
---------------------------------------------------------------------
------------------------------------
-- Commands
-------------------------... | mit |
ntop/ntopng | scripts/lua/containers_stats.lua | 1 | 1747 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local page_utils = require("page_utils")
sendHTTPContentTypeHeader('text/html')
page_utils.set_active_menu_entry(page_utils.menu_entries.containers)
dofil... | gpl-3.0 |
dalab/deep-ed | data_gen/gen_p_e_m/gen_p_e_m_from_wiki.lua | 1 | 3015 | -- Generate p(e|m) index from Wikipedia
-- Run: th data_gen/gen_p_e_m/gen_p_e_m_from_wiki.lua -root_data_dir $DATA_PATH
cmd = torch.CmdLine()
cmd:option('-root_data_dir', '', 'Root path of the data, $DATA_PATH.')
cmd:text()
opt = cmd:parse(arg or {})
assert(opt.root_data_dir ~= '', 'Specify a valid root_data_dir path ... | apache-2.0 |
Planimeter/lgameframework | lib/lanes.lua | 3 | 22280 | --
-- LANES.LUA
--
-- Multithreading and -core support for Lua
--
-- Authors: Asko Kauppi <akauppi@gmail.com>
-- Benoit Germain <bnt.germain@gmail.com>
--
-- History: see CHANGES
--
--[[
===============================================================================
Copyright (C) 2007-10 Asko Kauppi <akauppi@... | mit |
eaufavor/AwesomeWM-powerarrow-dark | extern/vicious/widgets/gmail.lua | 1 | 2289 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local type = type
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatab... | apache-2.0 |
rigeirani/a | plugins/antisquig.lua | 27 | 1167 | -- Put this at the very top of your plugin list, even before blacklist.lua.
antisquig = {}
local triggers = {
'[\216-\219][\128-\191]'
}
local action = function(msg)
local moddat = load_data('moderation.json')
if not moddat[msg.chat.id_str] then
return true
end
if moddat[msg.chat.id_str][msg.from.id_str] ... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.