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 |
|---|---|---|---|---|---|
lvshiling/U3DTerrainEditor | Bin/TerrainEditorData/LuaScripts/terraineditheightbrush.lua | 2 | 9524 | -- Terrain editor height edit brush
TerrainBrush=ScriptObject()
function bias(b,v)
return math.pow(v, math.log(b)/math.log(0.5))
end
function quintic_blend(t)
return t*t*t*(t*(t*6-15)+10);
end
function TerrainBrush:Start()
end
function TerrainBrush:Update(dt)
end
function TerrainBrush:ApplyBrush(terr... | mit |
ScegfOd/wesnoth | data/ai/micro_ais/cas/ca_bottleneck_attack.lua | 4 | 3171 | local AH = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "lua/helper.lua"
local ca_bottleneck_attack = {}
function ca_bottleneck_attack:evaluation(cfg, data)
local attackers = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "filter_adjacent", {
{ "filter_s... | gpl-2.0 |
yaohuang2005/ntopng-json-rabbitmq-python-analysis | scripts/lua/inc/sankey.lua | 1 | 9115 | --
-- (C) 2014 - ntop.org
--
ifstats = interface.getStats()
print [[
<div id = "alert_placeholder"></div>
<style>
#chart {
height: 380px;
}
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
}
.node text {
pointer-events: none;
text-shadow: 0 1px 0 #fff;
}
.link {
fill: none... | gpl-3.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua | 18 | 1219 |
--------------------------------
-- @module PhysicsJointMotor
-- @extend PhysicsJoint
-- @parent_module cc
--------------------------------
-- Set the relative angular velocity.
-- @function [parent=#PhysicsJointMotor] setRate
-- @param self
-- @param #float rate
-- @return PhysicsJointMotor#PhysicsJointMotor self ... | mit |
roboxt/api | languages.lua | 9 | 2528 | local config = require 'config'
local strings = {} -- internal array with translated strings
-- Evaluates the Lua's expression
local function eval(str)
return load('return ' .. str)()
end
-- Parses the file with translation and returns a table with English strings as
-- keys and translated strings as values. The ke... | gpl-2.0 |
kennyballou/blingbling | superproperties.lua | 2 | 13994 | --@author cedlemo
---Centralize theming values for blingbling widgets
--Users can create a theme.blingbling table in theirs theme.lua and defines some values for theirs widgets.
--@module blingbling.superproperties
local beautiful = require("beautiful")
local function init(path)
beautiful.init(path)
end
local blingbl... | gpl-2.0 |
EvilHero90/otclient | modules/game_questlog/questlog.lua | 12 | 2511 | questLogButton = nil
questLineWindow = nil
function init()
g_ui.importStyle('questlogwindow')
g_ui.importStyle('questlinewindow')
questLogButton = modules.client_topmenu.addLeftGameButton('questLogButton', tr('Quest Log'), '/images/topbuttons/questlog', function() g_game.requestQuestLog() end)
connect(g_game... | mit |
maikerumine/nuclear_holocaust | mods/protector/admin.lua | 5 | 1089 |
protector.removal_names = ""
minetest.register_chatcommand("delprot", {
params = "",
description = "Remove Protectors near players with names provided (separate names with spaces)",
privs = {server = true},
func = function(name, param)
if not param or param == "" then
minetest.chat_send_player(name,
"P... | lgpl-2.1 |
skyuplam/dotfiles | nvim/nvim/lua/_/telescope.lua | 1 | 5485 | local has_telescope, telescope = pcall(require, 'telescope')
local M = {}
local previewers = require('telescope.previewers')
local builtin = require('telescope.builtin')
local Job = require('plenary.job')
-- Ignore binary files
local new_maker = function(filepath, bufnr, opts)
opts = opts or {}
filepath = vim.f... | mit |
FreeBlues/neko8 | libs/asm-lua/include/assemble.lua | 1 | 2216 |
local mklabel = function(name, value)
_ASM.label = _ASM.label + 1
_ASM.labels[name] = _ASM.label
return string.format('_D[%d]=%s', _ASM.label, value or '')
end
local mkext = function(name)
_ASM.externs[name] = _ASM.label
return '-- extern ' .. name
end
local comp = {}
comp['do'] = {pattern = 'do'... | mit |
joeyhng/nn | SparseLinear.lua | 12 | 7194 | local THNN = require 'nn.THNN'
local SparseLinear, parent = torch.class('nn.SparseLinear', 'nn.Module')
local NO_LAST_INPUT = 0
local ONE_LAST_INPUT = 1
local ACC_MULTIPLE_TIMES = 2
function SparseLinear:__init(inputSize, outputSize, doGradInput)
parent.__init(self)
self.weightDecay = 0
self.doGradInput = d... | bsd-3-clause |
maikerumine/nuclear_holocaust | mods/default/furnace.lua | 2 | 8627 |
--
-- Formspecs
--
local function active_formspec(fuel_percent, item_percent)
local formspec =
"size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[current_name;src;2.75,0.5;1,1;]"..
"list[current_name;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[l... | lgpl-2.1 |
warreee/Algorithm-Implementations | Roman_Numerals/Lua/Yonaba/roman.lua | 26 | 1408 | -- Roman numerals encoding/decoding implementation
-- See: http://en.wikipedia.org/wiki/Roman_numerals
-- Roman numerals translation set for encoding
local romans = {
{1000, "M"}, {900, "CM"}, {500, "D"}, {400, "CD"},
{100, "C"}, {90, "XC"}, {50, "L"}, {40, "XL"},
{10, "X"}, {9, "IX"}, {5, "V"}, {4, ... | mit |
PavlosMelissinos/densecap | extract_features.lua | 4 | 3124 | require 'torch'
require 'nn'
require 'image'
require 'hdf5'
require 'densecap.DenseCapModel'
local utils = require 'densecap.utils'
local box_utils = require 'densecap.box_utils'
local cmd = torch.CmdLine()
-- Model options
cmd:option('-checkpoint',
'data/models/densecap/densecap-pretrained-vgg16.t7')
cmd:option(... | mit |
hongling0/skynet | test/testcoroutine.lua | 8 | 1278 | local skynet = require "skynet"
-- You should use skynet.coroutine instead of origin coroutine in skynet
local coroutine = require "skynet.coroutine"
local profile = require "skynet.profile"
local function status(co)
repeat
local status = coroutine.status(co)
print("STATUS", status)
skynet.sleep(100)
until sta... | mit |
micahmumper/naev | dat/missions/pirate/hitman.lua | 5 | 4501 | --[[
Pirate Hitman
Corrupt Merchant wants you to destroy competition
Author: nloewen
--]]
-- Localization, choosing a language if naev is translated for non-english-speaking locales.
lang = naev.lang()
if lang == "es" then
else -- Default to English
-- Bar information
bar_desc = "You see a shifty lo... | gpl-3.0 |
SimMeters/Inerthya | XPLANE11/FlyWithLua/Scripts/XPL11.lua | 1 | 19494 | ------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2020, SimMeters.
-- All rights reserved. Released under the BSD license.
-- XPL11.lua 1.0 01/01/2020 (Generic Export/Import Script on FlyWithLua)
-- Redistribution and use in source... | bsd-3-clause |
rolandoislas/Googol-Feud | src/gui/Button.lua | 1 | 2460 | Button = {}
Button.__index = Button
setmetatable(Button, {
__call = function (cls, ...)
return cls.create(...)
end,
})
local function contains(self, x, y)
return x >= self.x and x <= self.x + self.width and y >= self.y and y <= self.y + self.height
end
function Button:draw()
if not self.visible then retu... | gpl-2.0 |
yaohuang2005/ntopng-json-rabbitmq-python-analysis | scripts/lua/sprobe_flow_data.lua | 2 | 3792 | --
-- (C) 2014 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
require "flow_utils"
require "voip_utils"
require "sqlite_utils"
sendHTTPHeader('text/json')
flow_key = _GET["flow_key"]
if(flow_key == nil) then
flow = nil
else... | gpl-3.0 |
lukasc-ch/nn | DotProduct.lua | 5 | 1231 | local DotProduct, parent = torch.class('nn.DotProduct', 'nn.Module')
function DotProduct:__init()
parent.__init(self)
self.gradInput = {torch.Tensor(), torch.Tensor()}
end
function DotProduct:updateOutput(input)
local input1, input2 = input[1], input[2]
if input1:dim() == 1 then
-- convert non bat... | bsd-3-clause |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua | 4 | 8614 |
--------------------------------
-- @module TMXMapInfo
-- @parent_module cc
--------------------------------
--
-- @function [parent=#TMXMapInfo] setCurrentString
-- @param self
-- @param #string currentString
-- @return TMXMapInfo#TMXMapInfo self (return value: cc.TMXMapInfo)
-----------------------------... | mit |
deeepaaa/get-climbing | logic/TEsound.lua | 6 | 8108 | --- TEsound v1.3, a simplified sound system for Love 2D
-- @author Ensayia (Ensayia@gmail.com) & Taehl (SelfMadeSpirit@gmail.com)
TEsound = {} -- Namespace
TEsound.channels = {} -- This holds the currently playing sound channels
TEsound.volumeLevels = {} -- Volume levels that multiply the volumes of sounds with tho... | gpl-3.0 |
xXX-mRx-XXx/xxXxx | plugins/en-me.lua | 15 | 1553 | do
local function joker(msg, matches)
if is_sudo(msg) then
local text = "✅- انت مطور في الكون ".."\n".."🆔- ايدك/ج : "..msg.from.id.."\n".."🔖- اسمك/ج : "..msg.from.first_name.."\n".."🔤- المعرف : @"..msg.from.username.."\n".."🌐- اسم الكروب "..msg.to.title --@DevPointTeam
return reply_msg(msg.id, t... | gpl-2.0 |
yaohuang2005/ntopng-json-rabbitmq-python-analysis | scripts/lua/iface_ports_list.lua | 2 | 1952 | --
-- (C) 2013-14 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
interface.find(ifname)
host = _GET["host"]
flows_stats = interface.getFlowsInfo()
client_ports = { }
server_por... | gpl-3.0 |
warreee/Algorithm-Implementations | Bellman_Ford_Search/Lua/Yonaba/bellmanford_test.lua | 26 | 1717 | -- Tests for dijkstra.lua
local BellmanFord = require 'bellmanford'
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 same(t, p, comp)
for k,v in ipairs(t) do
if not comp(v, p[k]) then return false end
en... | mit |
peterayeni/kong | kong/plugins/mashape-analytics/buffer.lua | 8 | 8431 | -- ALF buffer module
--
-- This module contains a buffered array of ALF objects. When the buffer is full (max number of entries
-- or max payload size), it is converted to a JSON payload and moved a queue of payloads to be
-- sent to the server.
--
-- 1 buffer of ALFs (gets flushed once it reached the mmax size)
-- 1 q... | apache-2.0 |
rnby-mike/mal | lua/step2_eval.lua | 40 | 2090 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local List, Vector, HashMap = types.List, types.Vector, types.HashMap
-- read
function READ(str)
... | mpl-2.0 |
joeyhng/nn | DepthConcat.lua | 11 | 4722 | ------------------------------------------------------------------------
--[[ DepthConcat ]]--
-- Concatenates the output of Convolutions along the depth dimension
-- (nOutputFrame). This is used to implement the DepthConcat layer
-- of the Going deeper with convolutions paper :
-- http://arxiv.org/pdf/1409.4842v1.pdf
... | bsd-3-clause |
joeyhng/nn | CMulTable.lua | 22 | 1350 |
local CMulTable, parent = torch.class('nn.CMulTable', 'nn.Module')
function CMulTable:__init()
parent.__init(self)
self.gradInput = {}
end
function CMulTable:updateOutput(input)
self.output:resizeAs(input[1]):copy(input[1])
for i=2,#input do
self.output:cmul(input[i])
end
return self.output
e... | bsd-3-clause |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/script/cocosdenshion/AudioEngine.lua | 62 | 2666 | if nil == cc.SimpleAudioEngine then
return
end
--Encapsulate SimpleAudioEngine to AudioEngine,Play music and sound effects.
local M = {}
function M.stopAllEffects()
cc.SimpleAudioEngine:getInstance():stopAllEffects()
end
function M.getMusicVolume()
return cc.SimpleAudioEngine:getInstance():getMusicVolume(... | mit |
rnby-mike/mal | lua/step4_if_fn_do.lua | 40 | 2896 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local Env = require('env')
local core = require('core')
local List, Vector, HashMap = types.List, typ... | mpl-2.0 |
ahmadname12/animus1999 | plugins/ingroup.lua | 156 | 60323 | 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.peer_id
if member_id ~= our_id then
-- Group configuration
data[... | gpl-2.0 |
taestone/opennmt_merge | test/onmt/BridgeTest.lua | 8 | 1937 | require('onmt.init')
local tester = ...
local bridgeTest = torch.TestSuite()
function bridgeTest.inconsistentNumStates()
tester:assertError(function () onmt.Bridge('copy', 500, 2, 500, 3) end)
end
function bridgeTest.inconsistentHiddenSize()
tester:assertError(function () onmt.Bridge('copy', 500, 2, 400, 2) end... | mit |
neiljp/NEILBot | config_ircbot.lua | 1 | 1238 | local me="ESPTestn"
irc = {
nick = me ,
suffixes = { '_','__'} ,
channels = {"#57Ntest","#57N"} ,
server = "chat.freenode.net" ,
port = 6667 ,
join_message = nil ,
reconnect_time = 60 , -- seconds before trying to reconnect to server
alarm_tmr = 3 , -- alarm timer to use internally (to reconnect to ser... | bsd-2-clause |
maikerumine/nuclear_holocaust | mods/farming/blueberry.lua | 3 | 2727 |
--= Blueberries
minetest.register_craftitem("farming:blueberries", {
description = "Blueberries",
inventory_image = "farming_blueberries.png",
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
end,
on_use = minetest.item_eat... | lgpl-2.1 |
excessive/love-against-humanity | client/gamestates/title.lua | 1 | 6466 | local Timer = require "libs.hump.timer"
local IRC = require "libs.libirc"
local title = {}
function title:check_version()
-- TODO
end
function title:connect()
local settings = require "settings"
settings.nick = self.text_fields["name"].GetText()
self.irc = IRC(settings)
if self.irc:connect() then... | mit |
ScegfOd/wesnoth | data/ai/micro_ais/cas/ca_messenger_escort_move.lua | 4 | 3508 | 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 MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local messenger_next_waypoint = wesnoth.require "ai/micro_ais/cas/ca_messenger_f_next_waypoint.lua"
lo... | gpl-2.0 |
aderiabin/sdl_atf | modules/launch.lua | 1 | 1406 | require ("atf.util")
declare_opt("-c", "--config-file", RequiredArgument, "Config file")
declare_long_opt("--mobile-connection", RequiredArgument, "Mobile connection IP")
declare_long_opt("--mobile-connection-port", RequiredArgument, "Mobile connection port")
declare_long_opt("--hmi-connection", RequiredArgument, "HMI... | bsd-3-clause |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/ParticleData.lua | 8 | 1027 |
--------------------------------
-- @module ParticleData
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ParticleData] release
-- @param self
-- @return ParticleData#ParticleData self (return value: cc.ParticleData)
--------------------------------
--
-- @function [parent=#P... | mit |
micahmumper/naev | dat/missions/zalek/zlk_cargorun.lua | 3 | 7490 | --[[
Za'lek Cargo Run. adapted from Drunkard Mission
]]--
include "dat/scripts/numstring.lua"
-- Bar Description
bar_desc = "You see a drunkard at the bar mumbling about how he was so close to getting his break."
-- Mission Details
misn_title = "Za'lek Shipping Delivery"
misn_reward = "A handsome payment."
misn_des... | gpl-3.0 |
bitonp/mysql-lua-logging | lua/apr.lua | 1 | 11724 | --[[
Lua source code for the Lua/APR binding.
Author: Peter Odding <peter@peterodding.com>
Last Change: December 7, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
This Lua script is executed on require("apr"), loads the binary module using
require("apr.core"), defines several library functio... | mit |
andronmobi/vlc-parrot-asteroid | share/lua/playlist/appletrailers.lua | 88 | 3309 | --[[
Translate trailers.apple.com video webpages URLs to the corresponding
movie URL
$Id$
Copyright © 2007-2010 the VideoLAN team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either ve... | gpl-2.0 |
lvshiling/U3DTerrainEditor | Bin/OldFilters/testfractal.lua | 2 | 1466 | return
{
name="Test Perlin Fractals",
description="Create a mottled dirt/grass terrain.",
options=
{
{name="Frequency", type="value", value=8},
{name="Num Octaves", type="value", value=9},
{name="Gain", type="value", value=0.5},
{name="Seed", type="value", value=12345},
{name="Use Mask?", type="flag", val... | mit |
ABIZBOT/5 | plugins/tophoto.lua | 8 | 1047 | local function tophoto(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'system/adv/stickers/'..msg.from.id..'.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
send_photo(get_receiver(msg), file, ok_cb, false)
... | gpl-2.0 |
asamy45/forgottenmapeditor | modules/corelib/const.lua | 1 | 6264 | -- @docconsts @{
AnchorNone = 0
AnchorTop = 1
AnchorBottom = 2
AnchorLeft = 3
AnchorRight = 4
AnchorVerticalCenter = 5
AnchorHorizontalCenter = 6
LogDebug = 0
LogInfo = 1
LogWarning = 2
LogError = 3
LogFatal = 4
MouseFocusReason = 0
KeyboardFocusReason = 1
ActiveFocusReason = 2
OtherFocusReason = 3
AutoFocusNone = 0... | mit |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua | 17 | 2015 |
--------------------------------
-- @module ClippingRectangleNode
-- @extend Node
-- @parent_module cc
--------------------------------
-- brief Get whether the clipping is enabled or not.<br>
-- return Whether the clipping is enabled or not. Default is true.
-- @function [parent=#ClippingRectangleNode] isClippingEna... | mit |
LingJiJian/Unity_i18n | Assets/ToLua/Lua/UnityEngine/RaycastHit.lua | 15 | 1918 | --------------------------------------------------------------------------------
-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com
-- All rights reserved.
-- Use, modification and distribution are subject to the "MIT License"
-----------------------------------------------------------------... | mit |
LuaDist2/hprose | src/hprose/common.lua | 3 | 4180 | --[[
/**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | mit |
micahmumper/naev | dat/missions/neutral/pirbounty_alive.lua | 10 | 6415 | --[[
Alive Pirate Bounty
Copyright 2014, 2015 Julian Marchant
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version... | gpl-3.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/Event.lua | 8 | 1315 |
--------------------------------
-- @module Event
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Checks whether the event has been stopped.<br>
-- return True if the event has been stopped.
-- @function [parent=#Event] isStopped
-- @param self
-- @return bool#bool ret (return value: bool)
... | mit |
ABIZBOT/5 | plugins/info.lua | 9 | 22341 | local function callback_reply(extra, success, result)
--icon & rank ------------------------------------------------------------------------------------------------
userrank = "Member"
if is_vip(msg) then
userrank = "VIP ⭐⭐⭐⭐"
send_document(org_chat_id,"./icons/7.webp", ok_cb, false)
elseif is_sudo(result) then... | gpl-2.0 |
andronmobi/vlc-parrot-asteroid | share/lua/sd/frenchtv.lua | 111 | 1356 | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Fabio Ritrovato <sephiroth87 at videolan dot org>
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
... | gpl-2.0 |
RussellHaley/lua-game-stats | lib/instrumentation.lua | 1 | 5405 | --- Instrumentation.
-- Creates a new persistence table for running values and data sets based on an lmdb database
-- The current implementation is somewhat restricted to simple key value pairs.
-- There are two update methodoldies:
-- 1)Persist the entire table at the same time or
-- 2)Persiste a single key value item... | bsd-3-clause |
wjdeclan/stansbury-computer-graphics | ClientGame/Resources/Scripts/autocomplete.lua | 1 | 3232 | ------------------------------------------------------------------------------
-- Copyright (C) 2008-2014, Shane Liesegang
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redist... | bsd-3-clause |
jwalsh/mal | lua/printer.lua | 45 | 1770 | local string = require('string')
local table = require('table')
local types = require('types')
local utils = require('utils')
local M = {}
function M._pr_str(obj, print_readably)
local _r = print_readably
if utils.instanceOf(obj, types.Symbol) then
return obj.val
elseif types._list_Q(obj) then
... | mpl-2.0 |
hongling0/skynet | lualib/skynet.lua | 5 | 25533 | -- read https://github.com/cloudwu/skynet/wiki/FAQ for the module "skynet.core"
local c = require "skynet.core"
local skynet_require = require "skynet.require"
local tostring = tostring
local coroutine = coroutine
local assert = assert
local pairs = pairs
local pcall = pcall
local table = table
local next = next
local ... | mit |
FreeBlues/neko8 | libs/asm-lua/include/parseline.lua | 1 | 2261 |
local ex = {
{type = 'do', pattern = 'do', out = {}},
{type = 'end', pattern = 'end', out = {}},
{type = 'loop', pattern = 'loop', out = {}},
{type = 'label', pattern = '([%a%d_%-]+)%s*:', out = {'name'}},
{type = 'section', pattern = 'section %.([%a%d_%-]+)', out = {'name'}},
{type = 'if', pat... | mit |
qj739/BadRotations | System/LootManager.lua | 3 | 5124 | -- Sell Greys Macros
SLASH_Greys1 = "/grey"
SLASH_Greys2 = "/greys"
function SlashCmdList.Greys(msg, editbox)
SellGreys()
end
function SellGreys()
for bag = 0, 4 do
for slot = 1, GetContainerNumSlots(bag) do
local item = GetContainerItemLink(bag,slot)
if item then
-- Is it grey quality item?
if string... | gpl-3.0 |
alpha-team/smart_gourd_final | plugins/youtube.lua | 644 | 1722 | 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
function get_yt_data (yt_code)
local url = 'https://www.googleapis.com/yo... | gpl-2.0 |
maikerumine/nuclear_holocaust | mods/protector/doors_chest.lua | 2 | 17171 |
-- Since the doors mod has changed in the latest daily builds I have taken the
-- WTFPL licenced code from the old doors mod and included an edited version
-- of it within this mod for local use.
-- Registers a door
function register_door(name, def)
def.groups.not_in_creative_inventory = 1
local box = {{-0.5, -0.5... | lgpl-2.1 |
rayNymous/annot-player | lib/luaresolver/lua/luascript/sitelist/bilibili.lua | 5 | 15418 | -- bilibili.lua
-- 2011/12/6
require "lalib"
require "login"
--[[parse single bilibili url]]
function getTaskAttribute_bilibili ( str_url, str_tmpfile, pDlg, isNeedLogin, bSubOnly)
clib.debug("bilibili: enter")
local IsAutoLogin;
if g_bilibili_login then
IsAutoLogin = SUCCESS;
else
IsAutoLogin = FAILU... | gpl-3.0 |
forhappy/zklua | docs/zklua.lua | 1 | 48016 | ---Lua binding of Apache Zookeeper.
---signature of a watcher function.
--
--There are two ways to receive watch notifications: legacy and watcher object.
--The legacy style, an application wishing to receive events from ZooKeeper must
--first implement a function with this signature and pass a pointer to the
--functi... | bsd-3-clause |
hnakamur/luvit-sax | tests/parseName.lua | 1 | 1511 | local exports = {}
local string = require("string")
local sax = require("../sax")
exports["parseName1"] = function (test)
local parser = sax.NameParser:new()
local nameEventCount = 0
parser:on("name", function(name)
nameEventCount = nameEventCount + 1
test.equal(name, "a")
end)
parser:react("a")
t... | mit |
warreee/Algorithm-Implementations | Best_First_Search/Lua/Yonaba/handlers/point_graph_handler.lua | 182 | 2492 | -- A point graph handler
-- This handler is devised for waypoints graphs.
-- Waypoints are locations represented via labelled nodes
-- and are connected with edges having a positive weight.
-- It assumes edges are symmetric, that is if an edge exists
-- between a and b, weight(a -> b) == weight(b -> a)
local PATH = ... | mit |
coderstudy/luarocks | win32/pe-parser.lua | 20 | 18148 | ---------------------------------------------------------------------------------------
-- Lua module to parse a Portable Executable (.exe , .dll, etc.) file and extract metadata.
--
-- NOTE: numerical information is extracted as strings (hex) to prevent numerical overflows in
-- case of 64 bit fields (bit/flag fields)... | mit |
maikerumine/nuclear_holocaust | mods/hudbars/init.lua | 2 | 17424 | local S
if (minetest.get_modpath("intllib")) then
S = intllib.Getter()
else
S = function ( s ) return s end
end
hb = {}
hb.hudtables = {}
-- number of registered HUD bars
hb.hudbars_count = 0
-- table which records which HUD bar slots have been “registered” so far; used for automatic positioning
hb.registered_slo... | lgpl-2.1 |
asamy45/forgottenmapeditor | modules/mapeditor_search/search.lua | 1 | 3497 | SearchModule = {}
local searchModule
local searchWindow
local searchWidget
local searchWindowButton
local searchText
local searchList
local foundItemsList
local lastSearch
function SearchModule.init()
searchWindow = g_ui.displayUI('searchWindow.otui')
searchWindow:hide()
searchText = searchWindow:getChildBy... | mit |
micahmumper/naev | dat/ai/include/atk_generic.lua | 8 | 5937 | --[[
-- Generic attack functions
--]]
--[[
-- Required initialization function
--]]
function atk_generic_init ()
mem.atk_think = atk_generic_think
mem.atk = atk_generic
end
--[[
-- Mainly manages targetting nearest enemy.
--]]
function atk_generic_think ()
local enemy = ai.getenemy()
local t... | gpl-3.0 |
yaohuang2005/ntopng-json-rabbitmq-python-analysis | scripts/lua/inc/sprobe.lua | 3 | 4585 | --
-- (C) 2014 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
print [[
<script type="text/javascript">
var m = [20, 120, 20, 120],
w = ]] print(width) print[[ - m[1] - m[3],
h = ]] print(height) print[[ - m[0] - m[2... | gpl-3.0 |
biohazardlover/ROer | DataConverter/Data/Thai/skillinfolist.lua | 1 | 215384 | -- Decompiled using luadec 2.2 GBK r120 from http://luadec.googlecode.com
-- Command line: skillinfolist.lub
SKILL_INFO_LIST = {
[SKID.SN_WINDWALK] = {"SN_WINDWALK"; SkillName = "Wind Walker", MaxLv = 10,
SpAmount = {46, 52, 58, 64, 70, 76, 82, 88, 94, 100}, bSeperateLv = true,
AttackRange = {1, 1, 1, 1, 1, 1, 1, 1... | mit |
andronmobi/vlc-parrot-asteroid | share/lua/playlist/jamendo.lua | 105 | 3112 | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Fabio Ritrovato <sephiroth87 at videolan dot org>
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
... | gpl-2.0 |
xXX-mRx-XXx/xxXxx | plugins/commands.lua | 14 | 36269 | 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_admin1(msg) then
local group_creator = msg.from.print_name
create_group_chat (group_creator, group_name, ok_cb, false)
return 'New Group [ '..string.gsub(group... | gpl-2.0 |
alpha-team/smart_gourd_final | plugins/weather.lua | 351 | 1443 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= 200 then return nil end
local weather = ... | gpl-2.0 |
noah/awesome | partials/06_widgets.lua | 1 | 10218 | local wibox = require("wibox")
local vicious = require("vicious")
local calendar = require("calendar")
vicious.contrib = require("vicious.contrib")
gnarly.util = require("gnarly.util")
local chomp = gnarly.util.chomp
local log = gnarly.util.log
-- {{{ Wibox
-- Create widgets
-- mytextclock = awful.widget.textc... | mit |
CaptainCN/QCEditor | cocos2d/external/lua/luasocket/script/socket/mbox.lua | 89 | 2648 | local _M = {}
if module then
mbox = _M
end
function _M.split_message(message_s)
local message = {}
message_s = string.gsub(message_s, "\r\n", "\n")
string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end)
string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end)
... | mit |
defaltboy/Teledefalt | plugins/invite.lua | 393 | 1225 | do
local function callbackres(extra, success, result) -- Callback for res_user in line 27
local user = 'user#id'..result.id
local chat = 'chat#id'..extra.chatid
if is_banned(result.id, extra.chatid) then -- Ignore bans
send_large_msg(chat, 'User is banned.')
elseif is_gbanned(result.id) then -- I... | gpl-2.0 |
maikerumine/nuclear_holocaust | mods/handle_schematics/build_chest_preview_image.lua | 3 | 7105 |
build_chest.preview_image_draw_tile = function( content_id, image, x, z, dx, dz, tile_nr )
if( not( image )) then
local node_name = minetest.get_name_from_content_id( content_id );
if( not( node_name )) then
return '';
end
local node_def = minetest.registered_nodes[ node_name ];
if( not( node_def )) the... | lgpl-2.1 |
ahmadname12/animus1999 | plugins/block.lua | 2 | 2938 | --[[
$ :)
-- - ( #ANIMUS ) - --
$ :)
-- - ( @ahmadnamed ) - --
$ :)
--Channel-( @ahmadnameddd )--
$ :)
]]--
local function addword(msg, name)
local hash = 'chat:'..msg.to.id..':badword'
redis:hset(hash, name, 'newword')
return "âï¸âï¸ ØªÙÛÙ
Ù
ÙÙÙØ¹ ÙÙØ°Ù Ù²ÚµÙÚ©ÙÚµÙÙ
Ø© ÙÙÛ§ ... | gpl-2.0 |
micahmumper/naev | dat/missions/empire/longdistanceshipping/emp_longdistancecargo2.lua | 3 | 3194 | --[[
Second diplomatic mission to Dvaered space that opens up the Empire long-distance cargo missions.
Author: micahmumper
]]--
include "dat/scripts/numstring.lua"
include "dat/scripts/jumpdist.lua"
lang = naev.lang()
if lang == "es" then
-- not translated atm
else -- default english
bar_desc = "Lieute... | gpl-3.0 |
hfjgjfg/creed3 | plugins/plugins.lua | 285 | 6096 | do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins folder
local function plugin_exists( ... | gpl-2.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua | 18 | 5278 |
--------------------------------
-- @module TMXTiledMap
-- @extend Node
-- @parent_module ccexp
--------------------------------
-- Set object groups. <br>
-- param groups An object groups.
-- @function [parent=#TMXTiledMap] setObjectGroups
-- @param self
-- @param #array_table groups
-- @return experimental::TMXTi... | mit |
micahmumper/naev | dat/missions/sirius/heretic/heretic3.lua | 9 | 10584 | --[[misn title - the assault]]
--[[in this mission, the wringer is assaulted by a full assault fleet
sent in by the threatened sirius. the player attempts to defend,
when is instead ordered back to the wringer to escape sirius controlled
space. thanks to nloewen and viashimo for help!]]
include "dat/scripts/numst... | gpl-3.0 |
peterayeni/kong | kong/api/route_helpers.lua | 20 | 1124 | local stringy = require "stringy"
local _M = {}
function _M.get_hostname()
local f = io.popen ("/bin/hostname")
local hostname = f:read("*a") or ""
f:close()
hostname = string.gsub(hostname, "\n$", "")
return hostname
end
function _M.parse_status(value)
local result = {}
local parts = stringy.split(val... | apache-2.0 |
jcjohnson/densecap | densecap/LocalizationLayer.lua | 4 | 23968 | require 'torch'
require 'nn'
require 'densecap.modules.OurCrossEntropyCriterion'
require 'densecap.modules.BilinearRoiPooling'
require 'densecap.modules.ReshapeBoxFeatures'
require 'densecap.modules.ApplyBoxTransform'
require 'densecap.modules.InvertBoxTransform'
require 'densecap.modules.BoxSamplerHelper'
require 'de... | mit |
ignacio/luarocks | src/luarocks/path.lua | 18 | 14950 |
--- LuaRocks-specific path handling functions.
-- All paths are configured in this module, making it a single
-- point where the layout of the local installation is defined in LuaRocks.
--module("luarocks.path", package.seeall)
local path = {}
local dir = require("luarocks.dir")
local cfg = require("luarocks.cfg")
lo... | mit |
amoad/amoad-cocos2dx-module | AMoAdCocos2dxModuleDemo/cocos2d/plugin/luabindings/auto/api/FacebookAgent.lua | 130 | 1488 |
--------------------------------
-- @module FacebookAgent
-- @parent_module plugin
--------------------------------
-- brief Notifies the events system that the app has launched & logs an activatedApp event.
-- @function [parent=#FacebookAgent] activateApp
-- @param self
--------------------------------
--... | mit |
lukasc-ch/cunn | DataParallelTable.lua | 1 | 19569 | local gpuLocalCopyBuffers = {}
local baseGpuIndex = 1 -- A constant
-- *****************************************************************************
-- Helper Functions
-- *****************************************************************************
-- queryGPUDeviceId - Function to query a tensor or table for the
--... | bsd-3-clause |
BanKnight/Light | scripts/light2d/programs/Program.lua | 1 | 1258 | local gl = require "gl"
local Program = class("Program")
function Program:ctor()
self.id = 0
self.name = ""
self._uniforms = {}
self._attributes = {}
end
function Program:add_uniform(name,tp)
self._uniforms[name] = tp
end
function Program:add_attribute(tp,name)
self._attributes[tp] = name
end
function Pro... | gpl-3.0 |
JMCGameDev/gamecode4 | Assets/Scripts/TeapotBrains.lua | 44 | 2897 | --========================================================================
-- TeapotBrains.lua : Base class for teapot brains
--
-- Part of the GameCode4 Application
--
-- GameCode4 is the sample application that encapsulates much of the source code
-- discussed in "Game Coding Complete - 4th Edition" by Mike McS... | lgpl-3.0 |
micahmumper/naev | dat/missions/neutral/spacefamily.lua | 11 | 11707 | --[[
-- This is the mission part of the shipwrecked Space Family mission, started from a random event.
-- See dat/events/neutral/shipwreck.lua
--]]
-- localization stuff, translators would work here
lang = naev.lang()
if lang == "es" then
else -- default english
shipname = "August" --The ship will have a unique nam... | gpl-3.0 |
jwalsh/mal | lua/step4_if_fn_do.lua | 12 | 2930 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local Env = require('env')
local core = require('core')
local List, Vector, HashMap = types.List, typ... | mpl-2.0 |
maikerumine/nuclear_holocaust | mods/cottages/UNUSED/nodes_roof.lua | 5 | 7442 | -- Boilerplate to support localized strings if intllib mod is installed.
local S = cottages.S
---------------------------------------------------------------------------------------
-- roof parts
---------------------------------------------------------------------------------------
-- a better roof than the normal st... | lgpl-2.1 |
Ali-2h/sokutbot | plugins/Expire.lua | 47 | 1782 | local filename='data/expire.lua'
local cronned = load_from_file(filename)
local function save_cron(msg, text,date)
local origin = get_receiver(msg)
if not cronned[date] then
cronned[date] = {}
end
local arr = { origin, text } ;
table.insert(cronned[date], arr)
serialize_to_file(cronned, filename)
re... | gpl-2.0 |
hoelzro/lua-term | term/init.lua | 1 | 1760 | -- Copyright (c) 2009 Rob Hoelz <rob@hoelzro.net>
--
-- 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, m... | mit |
ocornut/bgfx | scripts/genie.lua | 4 | 8348 | --
-- Copyright 2010-2015 Branimir Karadzic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
newoption {
trigger = "with-amalgamated",
description = "Enable amalgamated build.",
}
newoption {
trigger = "with-ovr",
description = "Enable OculusVR integration.",
}
newoption {
tr... | bsd-2-clause |
warreee/Algorithm-Implementations | Depth_First_Search/Lua/Yonaba/handlers/linear_handler.lua | 182 | 1721 | -- A linear boundless 1D space map handler
-- This handler is devised for 1-directional continuous space, where
-- nodes are represented with consecutive integer values: 0, 1, 2, etc.
-- Similar to a range (interval) with no bounds.
-- i.e., the path from 5 to 0 would be 5, 4, 3, 2, 1, 0.
local PATH = (...):gsub('han... | mit |
warreee/Algorithm-Implementations | A_Star_Search/Lua/Yonaba/handlers/linear_handler.lua | 182 | 1721 | -- A linear boundless 1D space map handler
-- This handler is devised for 1-directional continuous space, where
-- nodes are represented with consecutive integer values: 0, 1, 2, etc.
-- Similar to a range (interval) with no bounds.
-- i.e., the path from 5 to 0 would be 5, 4, 3, 2, 1, 0.
local PATH = (...):gsub('han... | mit |
ahmadname12/animus1999 | plugins/invite.lua | 197 | 1336 | do
local function callbackres(extra, success, result)
--vardump(result)
local user = 'user#id'..result.peer_id
local chat = 'chat#id'..extra.chatid
local channel = 'channel#id'..extra.chatid
if is_banned(result.id, extra.chatid) then
send_large_msg(chat, 'User is banned.')
send_large_msg(c... | gpl-2.0 |
shayanchabok555/newbot_shayan0099 | plugins/trivia.lua | 647 | 6784 | do
-- Trivia plugin developed by Guy Spronck
-- Returns the chat hash for storing information
local function get_hash(msg)
local hash = nil
if msg.to.type == 'chat' then
hash = 'chat:'..msg.to.id..':trivia'
end
if msg.to.type == 'user' then
hash = 'user:'..msg.from.id..':trivia'
end
return hash
en... | gpl-2.0 |
deplinenoise/tundra | scripts/tundra/scanner.lua | 28 | 1488 | module(..., package.seeall)
local util = require "tundra.util"
local native = require "tundra.native"
local _scanner_mt = {}
setmetatable(_scanner_mt, { __index = _scanner_mt })
local cpp_scanner_cache = {}
local generic_scanner_cache = {}
function make_cpp_scanner(paths)
local key = table.concat(paths, '\0')
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.