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 |
|---|---|---|---|---|---|
baishancloud/lua-acid | lib/acid/aws/errorcode.lua | 1 | 5573 | local http_status = require('acid.http.status')
local _M = {
AccessDenied = http_status.Forbidden,
AccountProblem = http_status.Forbidden,
AmbiguousGrantByEmailAddress = http_status.BadRequest,
BadDigest = http_status... | mit |
pSyChOoOo/TeleSeed | .luarocks/share/lua/5.2/luarocks/fetch/svn.lua | 6 | 2055 |
--- Fetch back-end for retrieving sources from Subversion.
--module("luarocks.fetch.svn", package.seeall)
local svn = {}
local unpack = unpack or table.unpack
local fs = require("luarocks.fs")
local dir = require("luarocks.dir")
local util = require("luarocks.util")
--- Download sources for building a rock, using S... | gpl-2.0 |
dacrybabysuck/darkstar | scripts/globals/items/plate_of_ikra_gunkan.lua | 11 | 1458 | -----------------------------------------
-- ID: 5219
-- Item: plate_of_ikra_gunkan
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health 30
-- Magic 10
-- Dexterity 3
-- Mind -2
-- Accuracy % 18
-- Accuracy Cap 28
-- Ranged ACC % 18
-- Ranged ACC Cap 28
----------------------------------... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/zones/Maze_of_Shakhrami/npcs/Rockwell.lua | 9 | 1129 | -----------------------------------
-- Area: Maze of Shakhrami
-- NPC: Rockwell
-- Quest: Your Crystal Ball
-- !pos -18 -13 181 198
-----------------------------------
local ID = require("scripts/zones/Maze_of_Shakhrami/IDs")
require("scripts/globals/npc_util")
require("scripts/globals/quests")
-----------------------... | gpl-3.0 |
X-Plane/XLua | deploy/scripts/test/test.lua | 1 | 4461 | print("Hello World starting")
function aircraft_load()
print("Aircraft loaded!")
end
function aircraft_unload()
print("Aircraft unloading!")
end
function flight_start()
print("Flight init")
end
function flight_crash()
print("Flight crash")
end
function before_physics()
--print("Before physics")
--print(SIM_P... | mit |
xpol/luacheck | src/luacheck/builtin_standards/ngx.lua | 5 | 5556 | local standards = require "luacheck.standards"
local empty = {}
local luajit_string_def = standards.def_fields("byte", "char", "dump", "find", "format", "gmatch",
"gsub", "len", "lower", "match", "rep", "reverse", "sub", "upper")
-- Globals added by lua-nginx-module 0.10.10 in internal definition table format.
--... | mit |
tung/doomrl | bin/lua/levels/containment.lua | 2 | 4562 | -- CONTAINMENT AREA -----------------------------------------------------
register_level "containment_area"
{
name = "Containment Area",
entry = "On level @1 he arrived at the Containment Area.",
welcome = "You enter the Containment Area. You feel something is hidden behind this wall.",
level = 11,
Create = fun... | gpl-2.0 |
martinfelis/ggj15 | states/select_num_players.lua | 1 | 2587 | local SelectNumPlayersClass = {}
function SelectNumPlayersClass:new ()
local newInstance = {
imageobject = love.graphics.newImage("images/story/moon.jpg"),
first = true
}
self.__index = self
return setmetatable(newInstance, self)
end
function SelectNumPlayersClass:leave()
gui.group.default.size[1] = 150
gu... | apache-2.0 |
dacrybabysuck/darkstar | scripts/globals/spells/bluemagic/digest.lua | 11 | 1681 | -----------------------------------------
-- Spell: Digest
-- Steals an enemy's HP. Ineffective against undead
-- Spell cost: 20 MP
-- Monster Type: Amorphs
-- Spell Type: Magical (Dark)
-- Blue Magic Points: 2
-- Stat Bonus: HP-5, MP+5
-- Level: 36
-- Casting Time: 4 seconds
-- Recast Time: 90 seconds
-- Magic Bursts ... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/zones/Ordelles_Caves/npcs/qm3.lua | 9 | 1097 | -----------------------------------
-- Area: Ordelle's Caves
-- NPC: ??? (qm3)
-- Involved in Quest: A Squire's Test II
-- !pos -139 0.1 264 193
-------------------------------------
local ID = require("scripts/zones/Ordelles_Caves/IDs")
require("scripts/globals/keyitems")
-----------------------------------
function... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/globals/spells/bluemagic/flying_hip_press.lua | 12 | 1180 | -----------------------------------------
-- Spell: Flying Hip Press
-- Deals wind damage to enemies within range
-- Spell cost: 125 MP
-- Monster Type: Beastmen
-- Spell Type: Magical (Wind)
-- Blue Magic Points: 3
-- Stat Bonus: AGI+1
-- Level: 58
-- Casting Time: 5.75 seconds
-- Recast Time: 34.5 seconds
-- Magic Bu... | gpl-3.0 |
MrTheSoulz/NerdPack | system/debug.lua | 1 | 1372 | local NeP = NeP
NeP.Debug = {}
NeP.Debug.Enable = false
NeP.Debug.Profiles = {}
NeP.Debug.Profiles.total_usage = 0
NeP.Debug.Profiles.total_average = 0
NeP._G.SetCVar("scriptProfile", NeP.Debug.Enable and "1" or "0")
-- Force lua erros on
NeP._G.SetCVar("scriptErrors", "1")
function NeP.Debug:Add(name, func, subrout... | mit |
multitheftauto/mtasa-blue | utils/buildactions/install_unifont.lua | 1 | 1397 | require 'utils'
premake.modules.install_unifont = {}
-- Config variables
local UNIFONT_BASEURL = "https://github.com/multitheftauto/unifont/releases/download/"
local UNIFONT_DOWNLOAD_FILENAME = "unifont-15.0.01.ttf"
local UNIFONT_FILENAME = "unifont.ttf"
local UNIFONT_PATH = "Shared/data/MTA San Andreas/MTA/cgui"
--... | gpl-3.0 |
MrTheSoulz/NerdPack | Libs/DiesalMenu-1.0/Objects/MenuItem.lua | 6 | 6270 | -- $Id: MenuItem.lua 60 2016-11-04 01:34:23Z diesal2010 $
local DiesalMenu = LibStub('DiesalMenu-1.0')
-- ~~| Libraries |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local DiesalTools = LibStub('DiesalTools-1.0')
local DiesalStyle =... | mit |
25A0/Quadtastic | Quadtastic/exporters/xml.lua | 1 | 2344 | local libquadtastic = require("libquadtastic")
local common = require("common")
local utf8 = require("utf8")
local exporter = {}
-- This is the name under which the exporter will be listed in the menu
exporter.name = "XML"
-- This is the default file extension that will be used when the user does not
-- specify one.
... | mit |
fiskio/dp | examples/conditionalcomputation.lua | 2 | 8092 | require 'dp'
require 'cutorch'
require 'cunn'
require 'cunnx'
--[[command line arguments]]--
cmd = torch.CmdLine()
cmd:text()
cmd:text('Train a Language Model on BillionWords dataset using Conditional Computation : BlockSparse + SoftmaxTree')
cmd:text('Example:')
cmd:text('$> th conditionalcomputation.lua --small --ba... | bsd-3-clause |
birdbrainswagtrain/grid-sdk | src/engine/shared/socket/http/init.lua | 1 | 1237 | --========= Copyright © 2013-2015, Planimeter, All rights reserved. ==========--
--
-- Purpose: Asynchronous HTTP interface
--
--============================================================================--
require( "engine.shared.thread" )
local pairs = pairs
local require = require
local table = t... | mit |
dacrybabysuck/darkstar | scripts/zones/Port_Windurst/npcs/Hakkuru-Rinkuru.lua | 9 | 9010 | -----------------------------------
-- Area: Port Windurst
-- NPC: Hakkuru-Rinkuru
-- Involved In Quest: Making Amends
-- Starts and Ends Quest: Wonder Wands
-- !pos -111 -4 101 240
-----------------------------------
local ID = require("scripts/zones/Port_Windurst/IDs");
require("scripts/globals/settings");
require("... | gpl-3.0 |
AbolDalton/Abolbot | plugins/megagroup.lua | 2 | 98485 | --Begin supergrpup.lua
--Check members #Add supergroup
local function check_member_super(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
if success == 0 then
send_large_msg(receiver, "Promote me to admin first!")
end
for k,v in pairs(result)... | gpl-2.0 |
dacrybabysuck/darkstar | scripts/globals/items/per._snow_cone.lua | 11 | 1087 | -----------------------------------------
-- ID: 6565
-- Item: Persikos Snow Cone
-- Food Effect: 5 minutes, all Races
-----------------------------------------
-- MP +35% (Max. 50 @ 143 Base MP)
-- INT +3
-- [Element: Air]+5
-----------------------------------------
require("scripts/globals/status")
require("scripts/g... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/globals/weaponskills/tachi_fudo.lua | 10 | 1827 | -----------------------------------
-- Tachi: Fudo
-- Great Katana weapon skill
-- Skill Level: N/A
-- Deals double damage. Damage varies with TP. Masamune: Aftermath.
-- Available only when equipped with Masamune (85), Masamune (90), Masamune (95), Hiradennotachi +1 or Hiradennotachi +2.
-- Aligned with Light Gorget, ... | gpl-3.0 |
skogler/GearHelper | libs/LibDBIcon-1.0/LibDBIcon-1.0.lua | 1 | 12073 | --[[
Name: DBIcon-1.0
Revision: $Rev: 34 $
Author(s): Rabbit (rabbit.magtheridon@gmail.com)
Description: Allows addons to register to recieve a lightweight minimap icon as an alternative to more heavy LDB displays.
Dependencies: LibStub
License: GPL v2 or later.
]]
--[[
Copyright (C) 2008-2011 Rabbit
This... | mit |
AbolDalton/Abolbot | plugins/anti_spam.lua | 191 | 5291 | --An empty table for solving multiple kicking problem(thanks to @topkecleon )
kicktable = {}
do
local TIME_CHECK = 2 -- seconds
-- Save stats, ban user
local function pre_process(msg)
-- Ignore service msg
if msg.service then
return msg
end
if msg.from.id == our_id then
return msg
end
-- Save... | gpl-2.0 |
Fir3element/downgrade86 | data/talkactions/scripts/deathlist.lua | 43 | 2176 | local function getArticle(str)
return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a"
end
local function getMonthDayEnding(day)
if day == "01" or day == "21" or day == "31" then
return "st"
elseif day == "02" or day == "22" then
return "nd"
elseif day == "03" or day == "23" then
return "rd"
else
return "t... | gpl-2.0 |
keviner2004/shoot-em-up | Logging.lua | 1 | 1728 | local Logging = {}
Logging.VERBOSE = 2
Logging.DEBUG = 3
Logging.INFO = 4
Logging.WARN = 5
Logging.ERROR = 6
Logging.FATAL = 7
Logging.level = {}
Logging.level[Logging.VERBOSE] = "VERBOSE"
Logging.level[Logging.DEBUG] = "DEBUG"
Logging.level[Logging.INFO] = "INFO"
Logging.level[Logging.WARN] = "WARN"
Logging.level[Log... | mit |
dacrybabysuck/darkstar | scripts/zones/Behemoths_Dominion/mobs/King_Behemoth.lua | 11 | 1784 | -----------------------------------
-- Area: Behemoth's Dominion
-- HNM: King Behemoth
-----------------------------------
local ID = require("scripts/zones/Behemoths_Dominion/IDs")
mixins = {require("scripts/mixins/rage")}
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/... | gpl-3.0 |
Flatlander57/TheImaginedOTClient | modules/client_topmenu/topmenu.lua | 8 | 4232 | -- private variables
local topMenu
local leftButtonsPanel
local rightButtonsPanel
local leftGameButtonsPanel
local rightGameButtonsPanel
-- private functions
local function addButton(id, description, icon, callback, panel, toggle, front)
local class
if toggle then
class = 'TopToggleButton'
else
class = '... | mit |
dacrybabysuck/darkstar | scripts/zones/Vunkerl_Inlet_[S]/Zone.lua | 12 | 1428 | -----------------------------------
--
-- Zone: Vunkerl_Inlet_[S] (83)
--
-----------------------------------
local ID = require("scripts/zones/Vunkerl_Inlet_[S]/IDs");
require("scripts/globals/weather");
require("scripts/globals/status");
-----------------------------------
function onInitialize(zone)
end;
function ... | gpl-3.0 |
waythe/neural-style | neural_style.lua | 6 | 14744 | require 'torch'
require 'nn'
require 'image'
require 'optim'
local loadcaffe_wrap = require 'loadcaffe_wrapper'
--------------------------------------------------------------------------------
local cmd = torch.CmdLine()
-- Basic options
cmd:option('-style_image', 'examples/inputs/seated-nude.jpg',
'Styl... | mit |
shayanchabok007/antispam_yogob | 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 |
22333322/i4bot | 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 |
gaalcaras/dotfiles | mpv/scripts.config/autoload.lua | 1 | 4940 | -- From: https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua
-- This script automatically loads playlist entries before and after the
-- the currently played file. It does so by scanning the directory a file is
-- located in when starting playback. It sorts the directory entries
-- alphabetically, and ... | mit |
dacrybabysuck/darkstar | scripts/zones/Horlais_Peak/bcnms/carapace_combatants.lua | 9 | 1065 | -----------------------------------
-- Carapace Combatants
-- Horlais Peak BCNM30, Sky Orb
-- !additem 1552
-----------------------------------
require("scripts/globals/battlefield")
-----------------------------------
function onBattlefieldInitialise(battlefield)
battlefield:setLocalVar("loot", 1)
end
function o... | gpl-3.0 |
elijah513/Atlas | lib/admin-bak.lua | 37 | 3379 | --[[ $%BEGINLICENSE%$
Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the
License.
This program is dis... | gpl-2.0 |
fgielow/devenserver | data/actions/scripts/other/fluids.lua | 34 | 2434 | local drunk = Condition(CONDITION_DRUNK)
drunk:setParameter(CONDITION_PARAM_TICKS, 60000)
local poison = Condition(CONDITION_POISON)
poison:setParameter(CONDITION_PARAM_DELAYED, true)
poison:setParameter(CONDITION_PARAM_MINVALUE, -50)
poison:setParameter(CONDITION_PARAM_MAXVALUE, -120)
poison:setParameter(CONDITION_PA... | gpl-2.0 |
hamed9898/xxbot | plugins/banhammer.lua | 4 | 11017 | -- data saved to moderation.json
do
-- make sure to set with value that not higher than stats.lua
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 5
local function is_anti_flood(msg)
local data = load_data(_config.moderation.data)
local anti_flood_stat = data[tostring(msg.t... | gpl-2.0 |
dacrybabysuck/darkstar | scripts/globals/items/serving_of_flint_caviar.lua | 11 | 1122 | -----------------------------------------
-- ID: 4276
-- Item: serving_of_flint_caviar
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health 10
-- Magic 10
-- Dexterity 4
-- Mind -1
-- Charisma 4
-----------------------------------------
require("scripts/globals/status")
require("scripts/... | gpl-3.0 |
MrTheSoulz/NerdPack | Libs/LibDispellable-1.0/LibDispellable-1.0.lua | 1 | 12878 | --[[
LibDispellable-1.0 - Test whether the player can really dispell a buff or debuff, given its talents.
Copyright (C) 2009-2013 Adirelle (adirelle@gmail.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are... | mit |
JFonS/Cult | lib/camera.lua | 5 | 5345 | --[[
Copyright (c) 2010-2015 Matthias Richter
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... | gpl-3.0 |
danny200309/annotated_redis_source | 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 |
dacrybabysuck/darkstar | scripts/globals/items/sis_kebabi.lua | 11 | 1375 | -----------------------------------------
-- ID: 5598
-- Item: sis_kebabi
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Strength 6
-- Vitality -2
-- Intelligence -2
-- Attack % 20
-- Attack Cap 70
-- Ranged ATT % 20
-- Ranged ATT Cap 70
-----------------------------------------
require("... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/globals/weaponskills/gale_axe.lua | 10 | 1350 | -----------------------------------
-- Gale Axe
-- Axe weapon skill
-- Skill level: 70
-- Chokes enemy. Duration of effect varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Breeze Gorget.
-- Aligned with the Breeze Belt.
-- Element: Wind
-- Modifiers: STR:30%
-- 100%TP 200%TP 300%TP
-- 1.00 ... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/globals/weaponskills/rudras_storm.lua | 10 | 1927 | -----------------------------------
-- Rudra's Storm
-- Dagger weapon skill
-- Skill level: N/A
-- Deals triple damage and weighs target down (duration: 60s). Damage varies with TP.
-- Aligned with the Aqua Gorget, Snow Gorget & Shadow Gorget.
-- Aligned with the Aqua Belt, Snow Belt & Shadow Belt.
-- Element: None
-- ... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/globals/spells/blind_ii.lua | 12 | 1858 | -----------------------------------------
-- Spell: Blind II
-- caster:getMerit() returns a value which is equal to the number of merit points TIMES the value of each point
-- Blind II value per point is '1' This is a constant set in the table 'merits'
-----------------------------------------
require("scripts/globals/... | gpl-3.0 |
keviner2004/shoot-em-up | sprites/expansion-2@4x.lua | 1 | 3026 | --
-- created with TexturePacker (http://www.codeandweb.com/texturepacker)
--
-- $TexturePacker:SmartUpdate:f6dd79c5d9e21fd1e2a7f0017e70a349:68696f58f3043faa34a91af8c5b61602:4ff0eee65b5b207af942f85a5555b184$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI... | mit |
9ParsonsB/SiriusL2D | core/network/dump.lua | 2 | 7191 | --[[ DataDumper.lua
Copyright (c) 2007 Olivetti-Engineering SA
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, me... | gpl-3.0 |
funkring/gs5 | misc/freeswitch/scripts/dialplan/callthrough.lua | 2 | 5099 | -- CommonModule: Callthrough
--
module(...,package.seeall)
Callthrough = {}
-- Create Callthrough object
function Callthrough.new(self, arg)
arg = arg or {}
object = arg.object or {}
setmetatable(object, self)
self.__index = self
self.log = arg.log
self.database = arg.database
self.record = arg.record
... | mit |
dromozoa/dromozoa-utf8 | dromozoa/utf8/encode.lua | 1 | 2530 | -- Copyright (C) 2017,2020 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-utf8.
--
-- dromozoa-utf8 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,... | gpl-3.0 |
keviner2004/shoot-em-up | ui/FBLoginButton.lua | 1 | 2011 | local Sprite = require("Sprite")
local Text = require("ui.ScaleText")
local Button = require("ui.Button")
local logger = require("logger")
local facebook = require("facebook")
local dbHelper = require("dbHelper")
local TAG = "FBLoginButton"
local FBLoginButton = {}
FBLoginButton.new = function(width, height)
local f... | mit |
Dingf/Icewrack | game/dota_addons/icewrack/scripts/vscripts/timer.lua | 1 | 2575 | --[[
Timers
]]
if IsServer() then
TIMER_THINK_INTERVAL = 0.03
--Full unpack, including nil values
local function funpack(tArgs, nDepth)
if not nDepth then nDepth = 1 end
local nMaxDepth = 0
for k,v in pairs(tArgs) do
if k > nMaxDepth then nMaxDepth = k end
end
if nDepth <= nMaxDepth then
return tArgs[nD... | mit |
fetchbot/nodemcu-firmware | lua_examples/email/read_email_imap.lua | 82 | 4543 | ---
-- Working Example: https://www.youtube.com/watch?v=PDxTR_KJLhc
-- @author Miguel (AllAboutEE.com)
-- @description This example will read the first email in your inbox using IMAP and
-- display it through serial. The email server must provided unecrypted access. The code
-- was tested with an AOL and Time Warner c... | mit |
Dingf/Icewrack | game/dota_addons/icewrack/scripts/vscripts/aam_condition.lua | 1 | 23185 | --[[
Icewrack AAM Conditions
]]
-- 3b HP >= comparisons
-- 3b MP >= comparisons
-- 3b SP >= comparisons
-- 3b Unit class
-- 2b Unit type
-- 3b Unit subtype
-- 1b Unit is alive
-- 1b Unit is already affected
-- 1b Unit is self
-- 2b Unit has debuff
-- 5b Unit status effects
-- 1b Target is a remembered target
-- 3b... | mit |
dacrybabysuck/darkstar | scripts/zones/Eastern_Altepa_Desert/npcs/qm2.lua | 9 | 1389 | -----------------------------------
-- Area: Eastern Altepa Desert
-- NPC: qm2 (???)
-- Involved In Quest: 20 in Pirate Years
-- !pos 47.852 -7.808 403.391 114
-----------------------------------
local ID = require("scripts/zones/Eastern_Altepa_Desert/IDs")
require("scripts/globals/keyitems")
-------------------------... | gpl-3.0 |
gsig/charades-algorithms | torch/opts.lua | 1 | 7830 | --
-- Copyright (c) 2016, 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.
--
local M = { }
f... | bsd-3-clause |
dacrybabysuck/darkstar | scripts/commands/petgodmode.lua | 14 | 2916 | ---------------------------------------------------------------------------------------------------
-- func: petgodmode
-- desc: Toggles god mode on the player's pet, granting them several special abilities.
---------------------------------------------------------------------------------------------------
cmdprops =
... | gpl-3.0 |
baishancloud/lua-acid | lib/test_rangeset.lua | 1 | 5523 | local rangeset = require("acid.rangeset")
function test.new_rangedict(t)
local cases = {
{{{3, 4, "foo"}, {1, 2, "bar"}}, "ValueError", "range must be smaller than next one"},
{{{1, nil, "foo"}, {10, 20, "bar"}}, "ValueError", "range must be smaller than next one"},
{{{1, 2, "foo"}, {2, 3,... | mit |
KittyCookie/skynet | lualib/cluster.lua | 48 | 1257 | local skynet = require "skynet"
local clusterd
local cluster = {}
function cluster.call(node, address, ...)
-- skynet.pack(...) will free by cluster.core.packrequest
return skynet.call(clusterd, "lua", "req", node, address, skynet.pack(...))
end
function cluster.open(port)
if type(port) == "string" then
skynet.... | mit |
dacrybabysuck/darkstar | scripts/zones/Dynamis-Xarcabard/mobs/Animated_Longbow.lua | 9 | 1181 | -----------------------------------
-- Area: Dynamis - Xarcabard
-- Mob: Animated Longbow
-----------------------------------
require("scripts/globals/status");
local ID = require("scripts/zones/Dynamis-Xarcabard/IDs");
-----------------------------------
function onMobEngaged(mob,target)
if (mob:AnimationSub() ... | gpl-3.0 |
avrem/ardupilot | libraries/AP_Scripting/examples/fw_vtol_failsafe.lua | 8 | 4390 | -- This script allows for best effort return for quadplanes
-- on loss of forward motor
-- When an engine failure is detected (RPM and Vibration values drop below a certain threshold), the aircraft will:
-- Send a warning ground station
-- Start prioritizing airspeed completely
-- Glide back towards the home location ... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/zones/Bastok_Markets/npcs/Foss.lua | 11 | 1274 | -----------------------------------
-- Area: Bastok Markets
-- NPC: Foss
-- Starts & Finishes Repeatable Quest: Buckets of Gold
-- !pos -283 -12 -37 235
-----------------------------------
require("scripts/globals/npc_util");
require("scripts/globals/quests");
require("scripts/globals/titles");
function onTrade(player... | gpl-3.0 |
fetchbot/nodemcu-firmware | lua_examples/ucglib/GT_cross.lua | 31 | 1442 | local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component cross...")
local mx, my
disp:setColor(0, 250, 0, 0)
disp:setColor(1, 255, 255, 30)
disp:setColor(2, 220, 235, 10)
disp:setColor(3, 205, 0, 30... | mit |
morgenroth/openwrt-packages | utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/nat_traffic.lua | 79 | 1251 | local function scrape()
-- documetation about nf_conntrack:
-- https://www.frozentux.net/iptables-tutorial/chunkyhtml/x1309.html
nat_metric = metric("node_nat_traffic", "gauge" )
for e in io.lines("/proc/net/nf_conntrack") do
-- output(string.format("%s\n",e ))
local fields = space_split(e)
local ... | gpl-2.0 |
dacrybabysuck/darkstar | scripts/globals/mobskills/slaverous_gale.lua | 11 | 1112 | ---------------------------------------------
-- Slaverous Gale
--
-- Description: Deals earth damage that inflicts Plague and Slow effects on targets in front of the caster
-- Type: Magical (Earth)
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings... | gpl-3.0 |
aqasaeed/hesamsharr | plugins/ingroup.lua | 10 | 39219 | do
-- Check Member
local function check_member_autorealm(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[tostr... | gpl-2.0 |
varunparkhe/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 |
pSyChOoOo/TeleSeed | .luarocks/lib/luarocks/rocks/lua-cjson/2.1.0-1/tests/test.lua | 32 | 17977 | #!/usr/bin/env lua
-- Lua CJSON tests
--
-- Mark Pulford <mark@kyne.com.au>
--
-- Note: The output of this script is easier to read with "less -S"
local json = require "cjson"
local json_safe = require "cjson.safe"
local util = require "cjson.util"
local function gen_raw_octets()
local chars = {}
for i = 0, ... | gpl-2.0 |
aliaz001/aliaz | plugins/tools.lua | 1 | 54734 | --Begin Tools.lua : aliaz003
local SUDO = 282470335 -- put Your ID here! <===
function exi_files(cpath)
local files = {}
local pth = cpath
for k, v in pairs(scandir(pth)) do
table.insert(files, v)
end
return files
end
local function file_exi(name, cpath)
for k,v in pairs(exi_files(cpath)) do
... | gpl-3.0 |
22333322/i4bot | plugins/rss.lua | 700 | 5434 | local function get_base_redis(id, option, extra)
local ex = ''
if option ~= nil then
ex = ex .. ':' .. option
if extra ~= nil then
ex = ex .. ':' .. extra
end
end
return 'rss:' .. id .. ex
end
local function prot_url(url)
local url, h = string.gsub(url, "http://", "")
local... | gpl-2.0 |
TheAncientGoat/cCCommunity-L-VE-Project-Base | libs/hump/timer.lua | 1 | 2545 | --[[
Copyright (c) 2010 Matthias Richter
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, distribu... | mit |
andeandr100/Crumbled-World | Lua/Enviromental/spawnIconMeshBuilder.lua | 1 | 5335 | ----this = SceneNode()
--
--SpawnIconMeshBuilder = {}
--
--function SpawnIconMeshBuilder.initIconBuilder()
-- --set values that will define how the icon will look
-- local scale = 0.8
-- radius = 0.6 * scale
-- innerDropShadowRadius = 0.55 * scale
-- innerRadius = 0.54 * scale
--
-- innerTopColor = Vec3(0.3... | mit |
Squ34k3rZ/SamsBday | Resources/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... | mit |
dacrybabysuck/darkstar | scripts/globals/mobskills/suction.lua | 11 | 1047 | ---------------------------------------------
-- Suction
--
-- Description: Deals damage to a single target. Additional effect: Stun
-- Type: Physical
-- Utsusemi/Blink absorb: 1 shadow
-- Range: Melee
-- Notes: Stun doesn't always occur.
---------------------------------------------
require("scripts/globals/sett... | gpl-3.0 |
TheAncientGoat/cCCommunity-L-VE-Project-Base | goo/objects/colorpick.lua | 2 | 2450 | -------------------------------------------------------------
------ COLOR PICKER.
-------------------------------------------------------------
goo.colorpick = class('goo color picker', goo.object)
goo.colorpick.image = {}
function goo.colorpick:initialize(parent)
super.initialize(self,parent)
self.w = goo.colorpic... | mit |
dacrybabysuck/darkstar | scripts/zones/Windurst_Waters/npcs/Pechiru-Mashiru.lua | 9 | 1097 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Pechiru-Mashiru
-- Involved in Quests: Hat in Hand
-- !pos 162 -2 159 238
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/quests");
require("scripts/globals/titles");
---------------------------------... | gpl-3.0 |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/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
----------------... | gpl-3.0 |
cmingjian/skynet | service/cslave.lua | 5 | 6499 | local skynet = require "skynet"
local socket = require "skynet.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 = {}
... | mit |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/v8/tools/gcmole/gccause.lua | 157 | 2313 | -- Copyright 2011 the V8 project authors. All rights reserved.
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
-- met:
--
-- * Redistributions of source code must retain the above copyright
-- notice, this list of ... | gpl-3.0 |
WhiteVell/Amber | node-v0.10.20/deps/v8/tools/gcmole/gccause.lua | 157 | 2313 | -- Copyright 2011 the V8 project authors. All rights reserved.
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
-- met:
--
-- * Redistributions of source code must retain the above copyright
-- notice, this list of ... | mit |
tung/doomrl | bin/lua/levels/asmosden.lua | 2 | 6886 | -- The Asmos Den --------------------------------------------------------
--[[
local hell
register_level "the_asmos_den"
{
name = "The Asmos Den",
entry = "On level @1 he braved the Asmos Den.",
welcome = "This place reeks of evil, even more so than everywhere else...",
level = 22,
welcome = "You enter Asmos Den... | gpl-2.0 |
Dev-TLN/T_L_N | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-2.0 |
dkogan/notion.xfttest | contrib/scripts/legacy/xinerama_switcher.lua | 3 | 3929 | -- Authors: Martin F. Krafft <madduck@madduck.net>
-- License: Artistic, see http://opensource.org/licenses/artistic-license-1.0
-- Last Changed: 2005.08.14
--
-- xinerama_switcher.lua
--
-- Goes to the frame in the specified direction. If there is no frame in the
-- given direction (the user is trying to move off th... | lgpl-2.1 |
dacrybabysuck/darkstar | scripts/globals/abilities/pets/sand_breath.lua | 11 | 1413 | ---------------------------------------------------
-- Sand Breath
---------------------------------------------------
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/monstertpmoves")
require("scripts/globals/ability")
---------------------------------------------------
... | gpl-3.0 |
shahabsaf12/x | bot/bot.lua | 1 | 6779 | 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 |
MRAHS/Sbss_bot | 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 |
dacrybabysuck/darkstar | scripts/globals/abilities/pets/earthen_fury.lua | 11 | 1195 | ---------------------------------------------------
-- Earthen Fury
---------------------------------------------------
require("/scripts/globals/settings")
require("/scripts/globals/status")
require("/scripts/globals/monstertpmoves")
require("/scripts/globals/magic")
--------------------------------------------------... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/zones/Giddeus/npcs/Uu_Zhoumo.lua | 9 | 1501 | -----------------------------------
-- Area: Giddeus
-- NPC: Uu Zhoumo
-- Involved in Mission 2-3
-- !pos -179 16 155 145
-----------------------------------
require("scripts/globals/keyitems");
require("scripts/globals/missions");
-----------------------------------
function onTrade(player,npc,trade)
if (player... | gpl-3.0 |
funkring/gs5 | misc/freeswitch/scripts/common/perimeter.lua | 2 | 9924 | -- Gemeinschaft 5 module: perimeter class
-- (c) AMOOMA GmbH 2013
--
module(...,package.seeall)
Perimeter = {}
function Perimeter.new(self, arg)
require 'common.str';
require 'common.array';
arg = arg or {}
object = arg.object or {}
setmetatable(object, self);
self.__index = self;
self.log = arg.log... | mit |
dacrybabysuck/darkstar | scripts/zones/Windurst_Woods/npcs/Kororo.lua | 9 | 3043 | -----------------------------------
-- Area: Windurst Woods
-- NPC: Kororo
-- Type: Standard NPC
-- !pos -11.883 -3.75 5.508 241
-- Starts quest: A Greeting Cardian
-- Involved in quests: Lost Chick
-----------------------------------
local ID = require("scripts/zones/Windurst_Woods/IDs")
require("scripts/globals/ques... | gpl-3.0 |
AbolDalton/Abolbot | plugins/instagram.lua | 2 | 3912 | local access_token = "3084249803.280d5d7.999310365c8248f8948ee0f6929c2f02" -- your api key
local function instagramUser(msg, query)
local receiver = get_receiver(msg)
local url = "https://api.instagram.com/v1/users/search?q="..URL.escape(query).."&access_token="..access_token
local jstr, res = https.request(url)
... | gpl-2.0 |
gpedro/otclient | modules/client_options/options.lua | 4 | 7874 | local defaultOptions = {
vsync = false,
showFps = false,
showPing = false,
fullscreen = false,
classicControl = false,
smartWalk = false,
dashWalk = false,
autoChaseOverride = true,
showStatusMessagesInConsole = true,
showEventMessagesInConsole = true,
showInfoMessagesInConsole = true,
showTimes... | mit |
Dingf/Icewrack | game/dota_addons/icewrack/scripts/vscripts/party.lua | 1 | 5539 | --[[
Icewrack Party
]]
if not CParty then
require("ext_entity")
IW_MAX_PARTY_SIZE = 4
--The order in which to place party members by default.
--Technically only the first IW_MAX_PARTY_SIZE members are needed, but we include all of the locations
--for good measure. By default, this creates a loose box formation c... | mit |
vlachoudis/sl4a | lua/json4lua/json/rpc.lua | 21 | 4386 | -----------------------------------------------------------------------------
-- JSONRPC4Lua: JSON RPC client calls over http for the Lua language.
-- json.rpc Module.
-- Author: Craig Mason-Jones
-- Homepage: http://json.luaforge.net/
-- Version: 0.9.10
-- This module is released under the The GNU General Publi... | apache-2.0 |
baishancloud/lua-acid | lib/acid/dbagent/api.lua | 1 | 3532 | local api_util = require('acid.dbagent.api_util')
local arg_util = require('acid.dbagent.arg_util')
local convertor = require('acid.dbagent.convertor')
local model_util = require('acid.dbagent.model_util')
local mysql_util = require('acid.dbagent.mysql_util')
local sql_util = require('acid.dbagent.sql_util')
local upst... | mit |
dacrybabysuck/darkstar | scripts/zones/Cloister_of_Storms/bcnms/trial_by_lightning.lua | 8 | 1535 | -----------------------------------
-- Area: Cloister of Storms
-- BCNM: Trial by Lightning
-----------------------------------
local ID = require("scripts/zones/Cloister_of_Storms/IDs")
require("scripts/globals/battlefield")
require("scripts/globals/keyitems")
require("scripts/globals/quests")
require("scripts/globals... | gpl-3.0 |
dcourtois/premake-core | modules/vstudio/tests/vc2010/test_extension_settings.lua | 16 | 1709 | --
-- tests/actions/vstudio/vc2010/test_extension_settings.lua
-- Check the import extension settings block of a VS 2010 project.
-- Copyright (c) 2014 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vs2010_extension_settings")
local vc2010 = p.vstudio.vc2010
local project = ... | bsd-3-clause |
dacrybabysuck/darkstar | scripts/globals/spells/bluemagic/sudden_lunge.lua | 8 | 1940 | -----------------------------------------
-- Spell: Sudden Lunge
-- Damage varies with TP. Additional effect: "Stun."
-- Spell cost: 18 MP
-- Monster Type: Vermin
-- Spell Type: Physical (Slashing)
-- Blue Magic Points: 4
-- Stat Bonus: HP-5 MP-5 DEX+1 AGI+1
-- Level: 95
-- Casting Time: 0.5 seconds
-- Recast Time: 15 ... | gpl-3.0 |
dacrybabysuck/darkstar | scripts/zones/The_Ashu_Talif/mobs/Yazquhl.lua | 9 | 1052 | -----------------------------------
-- Area: The Ashu Talif (Against All Odds)
-- Mob: Yazquhl
-----------------------------------
require("scripts/globals/status")
local ID = require("scripts/zones/The_Ashu_Talif/IDs")
mixins = {require("scripts/mixins/job_special")}
-----------------------------------
function onMo... | gpl-3.0 |
p00ria/Blacklife-Pouria | plugins/Inrealm.lua | 2 | 25105 | -- data saved to moderation.json
-- check moderation plugin
do
local function create_group(msg)
-- superuser and admins only (because sudo are always has privilege)
if is_sudo(msg) or is_realm(msg) and is_admin(msg) then
local group_creator = msg.from.print_name
create_g... | gpl-2.0 |
ovh/overthebox-feeds | luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 4 | 18927 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2015 OVH <OverTheBox@ovh.net>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local ut = require "luci.util"
local pt = require "luci.tools.proto"
local nw = r... | gpl-3.0 |
kikito/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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.