commit stringlengths 40 40 | old_file stringlengths 6 181 | new_file stringlengths 6 181 | old_contents stringlengths 448 7.17k | new_contents stringlengths 449 7.17k | subject stringlengths 0 450 | message stringlengths 6 4.92k | lang stringclasses 1
value | license stringclasses 12
values | repos stringlengths 9 33.9k |
|---|---|---|---|---|---|---|---|---|---|
a92f296892a7c836e23e84a1a69930dbb0660335 | deployment_scripts/puppet/modules/lma_collector/files/plugins/decoders/rabbitmq.lua | deployment_scripts/puppet/modules/lma_collector/files/plugins/decoders/rabbitmq.lua | -- Copyright 2015 Mirantis, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to ... | -- Copyright 2015 Mirantis, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to ... | Fix parsing errors for RabbitMQ logs | Fix parsing errors for RabbitMQ logs
RabbitMQ logs aren't following good logging guidelines and in
particular, the severity level isn't always mapping the Syslog levels.
This change updates the Lua decoder to cope with these logs.
Change-Id: I4823d0775a5db51ffd1a2e9afe851833c02b420e
| Lua | apache-2.0 | stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector |
2d4cdce2c82b81c8ba05315644168a70d85a0ad4 | luapress/util.lua | luapress/util.lua | -- Luapress
-- File: luapress/util.lua
-- Desc: internal Luapress utilities!
local os = os
local io = io
local print = print
local pairs = pairs
local error = error
local table = table
local string = string
local lfs = require('lfs')
local markdown = require('luapress.lib.markdown')
local template = require('luapres... | -- Luapress
-- File: luapress/util.lua
-- Desc: internal Luapress utilities!
local os = os
local io = io
local print = print
local pairs = pairs
local error = error
local table = table
local string = string
local lfs = require('lfs')
local markdown = require('luapress.lib.markdown')
local template = require('luapres... | Fix RSS template | Fix RSS template
| Lua | mit | w-oertl/Luapress,Fizzadar/Luapress,w-oertl/Luapress,Fizzadar/Luapress |
93d41a0fdbcc687805ebc1247dd806e5af5545c0 | nyagos.d/suffix.lua | nyagos.d/suffix.lua | nyagos.suffixes={}
function suffix(suffix,cmdline)
local suffix=string.lower(suffix)
if string.sub(suffix,1,1)=='.' then
suffix = string.sub(suffix,2)
end
if not nyagos.suffixes[suffix] then
local orgpathext = nyagos.getenv("PATHEXT")
local newext="."..suffix
i... | nyagos.suffixes={}
function suffix(suffix,cmdline)
local suffix=string.lower(suffix)
if string.sub(suffix,1,1)=='.' then
suffix = string.sub(suffix,2)
end
if not nyagos.suffixes[suffix] then
local orgpathext = nyagos.getenv("PATHEXT")
local newext="."..suffix
i... | Fix built-in command suffix | Fix built-in command suffix
| Lua | bsd-3-clause | tsuyoshicho/nyagos,kissthink/nyagos,kissthink/nyagos,tyochiai/nyagos,hattya/nyagos,zetamatta/nyagos,hattya/nyagos,nocd5/nyagos,hattya/nyagos,kissthink/nyagos |
679d474d14257574b1fbe6613cf872161ce25c5f | MMOCoreORB/bin/scripts/screenplays/dungeon/death_watch_bunker/conversations/deathWatchBobaFettConvoHandler.lua | MMOCoreORB/bin/scripts/screenplays/dungeon/death_watch_bunker/conversations/deathWatchBobaFettConvoHandler.lua | local ObjectManager = require("managers.object.object_manager")
deathWatchBobaFettConvoHandler = Object:new { }
function deathWatchBobaFettConvoHandler:runScreenHandlers(conversationTemplate, conversingPlayer, conversingNPC, selectedOption, conversationScreen)
local screen = LuaConversationScreen(conversationScreen)... | local ObjectManager = require("managers.object.object_manager")
deathWatchBobaFettConvoHandler = Object:new { }
function deathWatchBobaFettConvoHandler:runScreenHandlers(conversationTemplate, conversingPlayer, conversingNPC, selectedOption, conversationScreen)
local screen = LuaConversationScreen(conversationScreen)... | [fixed] Bug in Boba Fett convo handler | [fixed] Bug in Boba Fett convo handler
Change-Id: I8bbd30ac6d01618de25f99c605e99c9d0a3f9118
| Lua | agpl-3.0 | Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo |
1489b71b18f0f7565079f93cc1f15b76313adea8 | nvim/lua/config/lspconfig.lua | nvim/lua/config/lspconfig.lua | -- NOTE: see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md
-- see also https://github.com/williamboman/nvim-lsp-installer
-- keymaps
local on_attach = function(client, bufnr)
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option('omnifunc', 'v:lua.vim... | -- NOTE: see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md
-- see also https://github.com/williamboman/nvim-lsp-installer
-- keymaps
local on_attach = function(client, bufnr)
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option('omnifunc', 'v:lua.vim... | fix: issues with null-ls and nvim-lsp-installer | fix: issues with null-ls and nvim-lsp-installer
I'm still working my way through this... I'm beginning to wonder if
null-ls can handle most/all of the LSP things I'd want if I can
configure it as expected... but I'm not sure yet.
| Lua | mit | drmohundro/dotfiles |
d016334dc8ddfeb11fca3e34f3d693cb69212274 | MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_belt_field_05_quest.lua | MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_belt_field_05_quest.lua | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | (Unstable) [Fixed] Ingredient's for Demolitionist's Belt | (Unstable) [Fixed] Ingredient's for Demolitionist's Belt
git-svn-id: e4cf3396f21da4a5d638eecf7e3b4dd52b27f938@6016 c3d1530f-68f5-4bd0-87dc-8ef779617e40
| Lua | agpl-3.0 | lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/... |
d51cf644e0c9b5f9cc11e929b374e9b76a5233b1 | Hydra/sample_config.lua | Hydra/sample_config.lua | hydra.alert("Hydra sample config loaded", 1.5)
-- save the time when updates are checked
function checkforupdates()
updates.check()
settings.set('lastcheckedupdates', os.time())
end
-- show a helpful menu
menu.show(function()
local updatetitles = {[true] = "Install Update", [false] = "Check for Update..."}
... | hydra.alert("Hydra sample config loaded", 1.5)
-- open a repl
hotkey.bind({"cmd", "ctrl", "alt"}, "R", hydra.repl)
-- save the time when updates are checked
function checkforupdates()
updates.check()
settings.set('lastcheckedupdates', os.time())
end
-- show a helpful menu
menu.show(function()
local updatetit... | Move the REPL higher in the sample config, and fix it. | Move the REPL higher in the sample config, and fix it.
| Lua | mit | wsmith323/hammerspoon,lowne/hammerspoon,chrisjbray/hammerspoon,TimVonsee/hammerspoon,Stimim/hammerspoon,hypebeast/hammerspoon,wsmith323/hammerspoon,bradparks/hammerspoon,peterhajas/hammerspoon,trishume/hammerspoon,Hammerspoon/hammerspoon,junkblocker/hammerspoon,lowne/hammerspoon,TimVonsee/hammerspoon,wvierber/hammerspo... |
a801ef55cfff3552f2f5c54c09d85172a90c4bb8 | src/plugins/lua/multimap.lua | src/plugins/lua/multimap.lua | -- Multimap is rspamd module designed to define and operate with different maps
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == nil then
return { str }
end
if maxNb == nil or maxNb < 1 then
maxNb = 0 -- No limit
end
local result = {}
local pat =... | -- Multimap is rspamd module designed to define and operate with different maps
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == nil then
return { str }
end
if maxNb == nil or maxNb < 1 then
maxNb = 0 -- No limit
end
local result = {}
local pat =... | Fix multimap module if there is only one rule for it. | Fix multimap module if there is only one rule for it.
| Lua | apache-2.0 | andrejzverev/rspamd,minaevmike/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,minaevmike/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,amohanta/rspamd,minaevmike/rspamd,amohanta/rspamd,awhitesong/rspamd,andrejzverev/rspamd,minaevmike/rspamd,amohanta/rspamd,andrejzverev/rspamd,amohanta/rspamd,aw... |
a201220ec1736c3db1cb94190b3e7fd6faffee24 | src/api-umbrella/utils/elasticsearch.lua | src/api-umbrella/utils/elasticsearch.lua | local http = require "resty.http"
local is_empty = require("pl.types").is_empty
local json_decode = require("cjson").decode
local json_encode = require "api-umbrella.utils.json_encode"
local server = config["elasticsearch"]["_first_server"]
local _M = {}
function _M.query(path, options)
local httpc = http.new()
... | local http = require "resty.http"
local is_empty = require("pl.types").is_empty
local json_decode = require("cjson").decode
local json_encode = require "api-umbrella.utils.json_encode"
local server = config["elasticsearch"]["_first_server"]
local _M = {}
function _M.query(path, options)
local httpc = http.new()
... | Fix elasticsearch connections over SSL. | Fix elasticsearch connections over SSL.
| Lua | mit | NREL/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,NREL/api-umbrella |
94417bcafc1454cad27dda535a69b7d0a5eb8942 | mods/mobs/npc.lua | mods/mobs/npc.lua |
-- Npc by TenPlus1
mobs.npc_drops = { "farming:meat", "farming:donut", "farming:bread", "default:apple", "default:sapling", "default:junglesapling",
"shields:shield_enhanced_wood", "3d_armor:chestplate_cactus", "3d_armor:boots_bronze",
"default:sword_steel", "default:sword_gold", "default:pick_steel", "def... |
-- Npc by TenPlus1
mobs.npc_drops = { "farming:meat", "farming:donut", "farming:bread", "default:apple", "default:sapling", "default:junglesapling",
"shields:shield_enhanced_wood", "3d_armor:chestplate_cactus", "3d_armor:boots_bronze",
"default:sword_steel", "default:sword_gold", "default:pick_steel", "def... | Fixed NPC taming - Moved code wrongly placed after a merge (last May 22). Solves part of #94 | Fixed NPC taming
- Moved code wrongly placed after a merge (last May 22). Solves part of #94
| Lua | unlicense | sys4-fr/server-minetestforfun,MinetestForFun/server-minetestforfun,Coethium/server-minetestforfun,MinetestForFun/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,Ombridride/minetest-minetestforfun-server,MinetestForFun/minetest-minetestforfun-server,paly2/... |
703774516e84f00dfbea58584bb2d5e913f25fda | luasrc/tests/testMultipleRequire.lua | luasrc/tests/testMultipleRequire.lua | require "totem"
local myTests = {}
local tester = totem.Tester()
function myTests.test_beta()
local N = 10000
local oneRequire = torch.Tensor(N)
local multipleRequire = torch.Tensor(N)
-- Call N in one go
require 'randomkit'
state = torch.getRNGState()
randomkit.gauss(oneRequire)
-- ... | require "totem"
local myTests = {}
local tester = totem.Tester()
function myTests.test_beta()
local N = 10000
local oneRequire = torch.Tensor(N)
local multipleRequire = torch.Tensor(N)
-- Call N in one go
require 'randomkit'
local ignored = torch.rand(1)
local state = torch.getRNGState()
... | Fix test with serial dependency. | Fix test with serial dependency.
- torch.rand() must be called before torch.getRNGState() to ensure the
state is defined.
- Added a 'local' keyword.
| Lua | bsd-3-clause | fastturtle/torch-randomkit,deepmind/torch-randomkit,fastturtle/torch-randomkit,deepmind/torch-randomkit |
0ee0a869ee36d31c9399f9e6c122e2ae0e86cbb9 | BtEvaluator/SensorManager.lua | BtEvaluator/SensorManager.lua | --- .
-- @module SensorManager
WG.SensorManager = WG.SensorManager or (function()
local Utils = VFS.Include(LUAUI_DIRNAME .. "Widgets/BtUtils/root.lua", nil, VFS.RAW_FIRST)
local Logger = Utils.Debug.Logger
local globalData = {} -- table that is persistent among all sensors (and all groups) and can be used to sto... | --- .
-- @module SensorManager
WG.SensorManager = WG.SensorManager or (function()
local Utils = VFS.Include(LUAUI_DIRNAME .. "Widgets/BtUtils/root.lua", nil, VFS.RAW_FIRST)
local Logger = Utils.Debug.Logger
local globalData = {} -- table that is persistent among all sensors (and all groups) and can be used to sto... | Fix of sensors return value refactor | Fix of sensors return value refactor
| Lua | mit | MartinFrancu/BETS |
7fc2b38bc54bcd96bd5a8da4a207ad84c4ec904f | mod_lastlog/mod_lastlog.lua | mod_lastlog/mod_lastlog.lua | local datamanager = require "util.datamanager";
local time = os.time;
local log_ip = module:get_option_boolean("lastlog_ip_address", false);
local host = module.host;
module:hook("authentication-success", function(event)
local session = event.session;
if session.username then
datamanager.store(session.username, h... | local datamanager = require "util.datamanager";
local time = os.time;
local log_ip = module:get_option_boolean("lastlog_ip_address", false);
local host = module.host;
module:hook("authentication-success", function(event)
local session = event.session;
if session.username then
datamanager.store(session.username, h... | mod_lastlog: Fix command | mod_lastlog: Fix command
| Lua | mit | Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules |
b8c7b4af5af07ac6f7eb62dd136116d3366f17c7 | testserver/npc/base/talk.lua | testserver/npc/base/talk.lua | --- Base NPC script for talking NPCs
--
-- This script offers all functions needed to get NPCs to talk.
--
-- Author: Martin Karing
require("base.common")
require("base.messages")
require("base.class")
require("npc.base.basic")
require("npc.base.responses")
module("npc.base.talk", package.seeall)
talkNPC = base.clas... | --- Base NPC script for talking NPCs
--
-- This script offers all functions needed to get NPCs to talk.
--
-- Author: Martin Karing
require("base.common")
require("base.messages")
require("base.class")
require("npc.base.basic")
require("npc.base.responses")
module("npc.base.talk", package.seeall)
talkNPC = base.clas... | Fixed bug in easyNPC talking | Fixed bug in easyNPC talking
| Lua | agpl-3.0 | Baylamon/Illarion-Content,vilarion/Illarion-Content,KayMD/Illarion-Content,LaFamiglia/Illarion-Content,Illarion-eV/Illarion-Content |
bb16266f3c5b923741e064e84973a09eb02378e8 | MMOCoreORB/bin/scripts/mobile/lair/dathomir_reptilian_ancient_flyer_flock_neutral_none.lua | MMOCoreORB/bin/scripts/mobile/lair/dathomir_reptilian_ancient_flyer_flock_neutral_none.lua | dathomir_reptilian_ancient_flyer_flock_neutral_none = Lair:new {
mobiles = {{"ancient_reptilian_flier", 0}},
spawnLimit = 15,
buildingsVeryEasy = {"object/tangible/lair/reptilian_flyer/lair_reptilian_flyer_mountain.iff"},
buildingsEasy = {"object/tangible/lair/reptilian_flyer/lair_reptilian_flyer_mountain.iff"},
b... | dathomir_reptilian_ancient_flyer_flock_neutral_none = Lair:new {
mobiles = {{"ancient_reptilian_flier", 0}},
spawnLimit = 15,
buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_rocks_large_fog_green.iff"},
buildingsEasy = {"object/tangible/lair/base/poi_all_lair_rocks_large_fog_green.iff"},
buildingsMedi... | [fixed] ancient reptilian flier lair. Mantis #4706 | [fixed] ancient reptilian flier lair. Mantis #4706
Change-Id: Ic33b8f041a28e282d9541fa9ae9c39fa58cc9482
| Lua | agpl-3.0 | lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/lege... |
cdd169fc777c6cd2c0335969d02064844aa104bc | xmake/platforms/linux/load.lua | xmake/platforms/linux/load.lua | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | --!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... | fix compiler errors for linux cuda | fix compiler errors for linux cuda
| Lua | apache-2.0 | tboox/xmake,tboox/xmake,tboox/xmake,waruqi/xmake,tboox/xmake,waruqi/xmake,waruqi/xmake,tboox/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,tboox/xmake,tboox/xmake |
4ba2aac15223b704c3a7e9e818e2f97bea7a7ad6 | scripts/cycle.lua | scripts/cycle.lua | require "const"
local function calculate_orientation (self, ori)
local FrameTime = dmz.time.frame_time ()
local result = dmz.matrix.new ()
local dir = ori:transform (const.Forward)
dir:set_y (0)
if not dir:is_zero () then
dir = dir:normalize ()
local heading = const.Forward:get_angle (di... | require "const"
local function calculate_orientation (self, ori)
local FrameTime = dmz.time.frame_time ()
local result = dmz.matrix.new ()
local dir = ori:transform (const.Forward)
dir:set_y (0)
if not dir:is_zero () then
dir = dir:normalize ()
local heading = const.Forward:get_angle (di... | Bugfix: fixes #12 Cycle speed is now reset when game restarts. | Bugfix: fixes #12 Cycle speed is now reset when game restarts.
Signed-off-by: DMZ Develoment <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@dmzdev.org> | Lua | mit | dmzgroup/cycles,shillcock/cycles,shillcock/cycles,dmzgroup/cycles,dmzgroup/cycles,shillcock/cycles,shillcock/cycles,dmzgroup/cycles |
ff700cb87ab9fe12b8fa81f32fcb266a818f4be0 | annc-monitor.lua | annc-monitor.lua | -- Displays announcements in the DFHack console
if active == nil then active = false end
if next_annc_id == nil then next_annc_id = 0 end
if timeout_interval == nil then timeout_interval = 2 end
function set_timeout()
dfhack.timeout(timeout_interval, 'frames', check_announcements)
end
function log(s, color)
... | -- Displays announcements in the DFHack console
if world_loaded == nil then
world_loaded = false
enabled = false
next_annc_id = 0
timeout_interval = 2
end
function set_timeout()
dfhack.timeout(timeout_interval, 'frames', check_announcements)
end
function log(s, color)
dfhack.color(color)
... | Fix handling of existing announcements | Fix handling of existing announcements
| Lua | unlicense | lethosor/dfhack-scripts,PeridexisErrant/lethosor-scripts,DFHack/lethosor-scripts |
5d93eac689f02af3dc98064e106e2d914cf6427b | npc/base/talk.lua | npc/base/talk.lua | --- Base NPC script for talking NPCs
--
-- This script offers all functions needed to get NPCs to talk.
--
-- Author: Martin Karing
-- $Id$
require("base.common")
require("base.messages")
require("base.class")
require("npc.base.basic")
module("npc.base.talk", package.seeall)
talkNPC = base.class.class(function(self,... | --- Base NPC script for talking NPCs
--
-- This script offers all functions needed to get NPCs to talk.
--
-- Author: Martin Karing
-- $Id$
require("base.common")
require("base.messages")
require("base.class")
require("npc.base.basic")
module("npc.base.talk", package.seeall)
talkNPC = base.class.class(function(self,... | Fixed the bug that is likely the reason for all NPCs not working | Fixed the bug that is likely the reason for all NPCs not working
| Lua | agpl-3.0 | vilarion/Illarion-Content,LaFamiglia/Illarion-Content,KayMD/Illarion-Content,Baylamon/Illarion-Content,Illarion-eV/Illarion-Content |
9d1144b21d7a681b9989b9edb03de571b34e089a | mods/homedecor_modpack/fake_fire/init.lua | mods/homedecor_modpack/fake_fire/init.lua | screwdriver = screwdriver or {}
local function start_smoke(pos, node, clicker, chimney)
local this_spawner_meta = minetest.get_meta(pos)
local id = this_spawner_meta:get_int("smoky")
local s_handle = this_spawner_meta:get_int("sound")
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if id ~= 0... | screwdriver = screwdriver or {}
local function start_smoke(pos, node, clicker, chimney)
local this_spawner_meta = minetest.get_meta(pos)
local id = this_spawner_meta:get_int("smoky")
local s_handle = this_spawner_meta:get_int("sound")
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if id ~= 0... | Fixed flint_and_steel's shapeless craft recipe | Fixed flint_and_steel's shapeless craft recipe
| Lua | unlicense | Coethium/server-minetestforfun,LeMagnesium/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,Gael-de-Sailly/minetest-minetestforfun-server,LeMagnesium/minetest-minetestforfun-server,sys4-fr/server-minetestforfun,MinetestForFun/minetest-minetestforfun-server,MinetestForFun/server-minetestforfun,Gae... |
327d69623ab75aafda177f8f1cbc5455b9a7e5e9 | assets/scripts/engine/SceneLoader/SceneLoader.lua | assets/scripts/engine/SceneLoader/SceneLoader.lua | -- Lua Script to load scene files
require 'yaml'
require 'strict'
--result = yaml.load("lua: rocks\npeppers: [ habanero, chipotle, jalapeno ]\n")
--LuaDebug.Log(result.lua)
--LuaDebug.Log(result.peppers[1])
gameObjectMap = {}
function GetString(path)
local file = io.open(path, 'r')
local text = file:read('*... | -- Lua Script to load scene files
require 'yaml'
require 'strict'
--result = yaml.load("lua: rocks\npeppers: [ habanero, chipotle, jalapeno ]\n")
--LuaDebug.Log(result.lua)
--LuaDebug.Log(result.peppers[1])
gameObjectMap = {}
function GetString(path)
local file = io.open(path, 'r')
local text = file:read('*... | Fixed a bug where the Position, Rotation and Scale was not set from the scene file properly. | Fixed a bug where the Position, Rotation and Scale was not set from the scene file properly.
| Lua | mit | NoxHarmonium/spacestationkeeper,NoxHarmonium/spacestationkeeper |
ccfe7fe3c5ddd9b991d308702d8474d1a568fced | lib/switchboard_modules/lua_script_debugger/premade_scripts/benchmarking_tests/speed_test-dac.lua | lib/switchboard_modules/lua_script_debugger/premade_scripts/benchmarking_tests/speed_test-dac.lua | print("Benchmarking Test: Set DAC0 to 2.5V, then 0V as fast as possible.")
--This example will output a waveform at ~13kHz to ~15kHz on DAC0
--Note: Most commonly users should throttle their code execution using the functions:
--"LJ.IntervalConfig(0, 1000)", and "if LJ.CheckInterval(0) then" ...
--The throttle settin... | --[[
Name: speed_test-dac.lua
Desc: This example will output a waveform at ~13kHz to ~15kHz on DAC0
Note: In most cases, users should throttle their code execution using the
functions: "interval_config(0, 1000)", and "if check_interval(0)"
--]]
-- Assign functions locally for faster processing
lo... | Fixed up formatting of the dac speed test | Fixed up formatting of the dac speed test
| Lua | mit | chrisJohn404/ljswitchboard-module_manager,chrisJohn404/ljswitchboard-module_manager,chrisJohn404/ljswitchboard-module_manager |
235b06552d27fa9cd51f83340517115560c1aef4 | vrp/lib/utils.lua | vrp/lib/utils.lua | local modules = {}
function module(rsc, path) -- load a LUA resource file as module
if path == nil then -- shortcut for vrp, can omit the resource parameter
path = rsc
rsc = "vrp"
end
local key = rsc..path
if modules[key] then -- cached module
return table.unpack(modules[key])
else
local f,e... | local modules = {}
function module(rsc, path) -- load a LUA resource file as module
if path == nil then -- shortcut for vrp, can omit the resource parameter
path = rsc
rsc = "vrp"
end
local key = rsc..path
if modules[key] then -- cached module
return table.unpack(modules[key])
else
local f,e... | Fix gunshop issue. | Fix gunshop issue.
| Lua | mit | ImagicTheCat/vRP,ImagicTheCat/vRP |
8ea166a2e636a7ea3d69e668c8262fa4b3d4510c | nvim/lua/config/telescope.lua | nvim/lua/config/telescope.lua | local actions = require('telescope.actions')
require('telescope').setup({
defaults = {
mappings = {
i = {
-- default key binding is <C-c> but I keep forgetting and I hit <esc> twice...
['<esc>'] = actions.close,
},
},
},
pickers = {
oldfiles = {
theme = 'ivy',
},... | local actions = require('telescope.actions')
require('telescope').setup({
defaults = {
mappings = {
i = {
-- default key binding is <C-c> but I keep forgetting and I hit <esc> twice...
['<esc>'] = actions.close,
},
},
},
pickers = {
oldfiles = {
theme = 'ivy',
},... | fix: use mru and normal mode for buffers | fix: use mru and normal mode for buffers
I still have muscle memory with bufexplorer so this feels more natural
to me.
| Lua | mit | drmohundro/dotfiles |
6e2af68c410c3a1b6abd472464b0f97ba93de55a | modules/admin-mini/luasrc/model/cbi/mini/wifi.lua | modules/admin-mini/luasrc/model/cbi/mini/wifi.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | modules/admin-mini: Fixed WLAN client mode | modules/admin-mini: Fixed WLAN client mode
| Lua | apache-2.0 | deepak78/luci,8devices/luci,8devices/luci,8devices/luci,deepak78/luci,8devices/luci,deepak78/luci,deepak78/luci,deepak78/luci,deepak78/luci,deepak78/luci,8devices/luci,deepak78/luci,8devices/luci |
853d1ac167f8acdedf1d0752811d3e586846f30f | premake5.lua | premake5.lua | --
-- Premake script (http://premake.github.io)
--
solution 'luazmq'
configurations {'Debug', 'Release'}
targetdir 'bin'
filter 'configurations:Debug'
defines 'DEBUG'
symbols 'On'
filter 'configurations:Release'
defines 'NDEBUG'
symbols 'On'
optimize 'On... | --
-- Premake script (http://premake.github.io)
--
solution 'luazmq'
configurations {'Debug', 'Release'}
targetdir 'bin'
filter 'configurations:Debug'
defines 'DEBUG'
symbols 'On'
filter 'configurations:Release'
defines 'NDEBUG'
symbols 'On'
opt... | Fix tab space | Fix tab space
| Lua | apache-2.0 | ichenq/lua-zmq |
0da2fb629e72efd794fc396cbab34661e0ca43b7 | floor.lua | floor.lua | --[[
@file floor.lua
@brief OpenComputersのロボットに床を作らせる
@detail
燃料は考慮しない, 貼るブロックはロボットのインベントリ内のものを使う,
robotの下にブロックを配置する
貼り終えたら元の位置,向きに戻る
robotの必要最低限の構成
:Hardware
case(tier1↑)
eeprom
cpu(tier1↑)
memory(tier1↑)
HDD(tier1↑)
screen(tier1↑)
graphic card
keyboard
Inventory Upgrade
:Soft... | --[[
@file floor.lua
@brief OpenComputersのロボットに床を作らせる
@detail
燃料は考慮しない, 貼るブロックはロボットのインベントリ内のものを使う,
robotの下からブロックを配置する
貼り終えたら元の位置,向きに戻る
robotの必要最低限の構成
:Hardware
case(tier1↑)
eeprom
cpu(tier1↑)
memory(tier1↑)
HDD(tier1↑)
screen(tier1↑)
graphic card
keyboard
Inventory Upgrade
:Sof... | fix option r | fix option r
| Lua | mit | iesika/iesika-OCPrograms |
7c12ce0cbb393eb7192f00cc6850be1ac5f9a37b | game/dota_addons/castle_defenders/scripts/vscripts/addon_game_mode.lua | game/dota_addons/castle_defenders/scripts/vscripts/addon_game_mode.lua | -- This is the entry-point to your game mode and should be used primarily to precache models/particles/sounds/etc
require('internal/util')
require('gamemode')
function Precache( context )
--[[
This function is used to precache resources/units/items/abilities that will be needed
for sure in your game and that will... | -- This is the entry-point to your game mode and should be used primarily to precache models/particles/sounds/etc
require('internal/util')
require('gamemode')
function Precache( context )
--[[
This function is used to precache resources/units/items/abilities that will be needed
for sure in your game and that will... | Added Precache for easy and medium creep wave 1 >> 10. bug: First wave, crab and tidehunter spawn. After first boss come out, second wave spawn (game logic should be boss wave out, second save stop spawn (spawn after boss die)) second save, only slark(no other model like sc said (brothers model) | Added Precache for easy and medium creep wave 1 >> 10.
bug: First wave, crab and tidehunter spawn.
After first boss come out, second wave spawn (game logic should be boss wave out, second save stop spawn (spawn after boss die))
second save, only slark(no other model like sc said (brothers model)
| Lua | apache-2.0 | soonyee91/castle_defenders |
51f277c1e3c56e5be976528e9a207753d5af56eb | lua/starfall/libs_sh/color.lua | lua/starfall/libs_sh/color.lua | SF.Color = {}
--- Color type
--@shared
local color_methods, color_metatable = SF.Typedef( "Color" )
local wrap, unwrap = SF.CreateWrapper( color_metatable, true, false, debug.getregistry().Color )
SF.Color.Methods = color_methods
SF.Color.Metatable = color_metatable
SF.Color.Wrap = wrap
SF.Color.Unwrap = unwrap
---... | SF.Color = {}
--- Color type
--@shared
local color_methods, color_metatable = SF.Typedef( "Color" )
local wrap, unwrap = SF.CreateWrapper( color_metatable, true, false, debug.getregistry().Color )
SF.Color.Methods = color_methods
SF.Color.Metatable = color_metatable
SF.Color.Wrap = wrap
SF.Color.Unwrap = unwrap
---... | Fixed Color indexing | Fixed Color indexing
Fixes issue #311
| Lua | bsd-3-clause | Jazzelhawk/Starfall,INPStarfall/Starfall,Ingenious-Gaming/Starfall,Xandaros/Starfall,Jazzelhawk/Starfall,Xandaros/Starfall,Ingenious-Gaming/Starfall,INPStarfall/Starfall |
c4aa481e00910cf9165d55fb71d8eddf70d00eff | scripts/genie.lua | scripts/genie.lua | local BASE_DIR = path.getabsolute("..")
local EXTERN_DIR = path.join(BASE_DIR, "extern")
local OVR_DIR = path.join(EXTERN_DIR, "LibOVR")
local use_ovr = false
solution "lua-bgfx" do
uuid "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942"
configurations { "Debug", "Release" }
platforms { "Native", "x32", "x64" }
start... | local BASE_DIR = path.getabsolute("..")
local EXTERN_DIR = path.join(BASE_DIR, "extern")
local OVR_DIR = path.join(EXTERN_DIR, "LibOVR")
local use_ovr = false
solution "lua-bgfx" do
uuid "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942"
configurations { "Debug", "Release" }
platforms { "Native", "x32", "x64" }
start... | fix build against new bgfx | fix build against new bgfx
| Lua | mit | excessive/lua-bgfx,excessive/lua-bgfx |
a8de6bf219be25eb38536be0fb94ff9ea3908a58 | src/Lua/Searches/expectimax.lua | src/Lua/Searches/expectimax.lua | local currentState = State.new(nil)
currentState.Tiles = {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0
}
math.randomseed(os.time())
currentState.Tiles[math.random(#currentState.Tiles)] = math.random(2)*2
currentState:Print()
function Max_Value(state)
local val = -math.huge
for k, successor i... | local currentState = State.new(nil)
currentState.Tiles = {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0
}
math.randomseed(os.time())
currentState.Tiles[math.random(#currentState.Tiles)] = math.random(2)*2
currentState:Print()
function Max_Value(state)
local val = -math.huge
for k, successor i... | Fixed memory leak | Fixed memory leak
| Lua | mit | ioltuszyk/Slider,ioltuszyk/Slider |
6bc7fc33d890c744e563990f9a76110ea177a91c | src/ubus.lua | src/ubus.lua | #!/usr/bin/lua
-- WANT_JSON
local Ansible = require("ansible")
local ubus = require("ubus")
local json = require("dkjson")
function list(module)
check_parameters(module, {"path"})
local path = module:get_params()['path']
local conn = module:ubus_connect()
local list = {}
local namespaces = conn:objects(... | #!/usr/bin/lua
-- WANT_JSON
local Ansible = require("ansible")
local ubus = require("ubus")
local json = require("dkjson")
function list(module)
check_parameters(module, {"path"})
local path = module:get_params()['path']
local conn = module:ubus_connect()
local list = {}
local namespaces = conn:objects(... | fix uci facts collection | fix uci facts collection
| Lua | agpl-3.0 | noctux/philote,noctux/philote |
0cf237c87d8dfc9e10c435927939b104240532eb | src/cosy/daemon-handler.lua | src/cosy/daemon-handler.lua | local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Library = require "cosy.library"
local Value = require "cosy.value"
Configuration.load {
"cosy.daemon",
"cosy.server",
}
local i18n = I18n.load {
"cosy.daemon",
"cosy.server",
}
i18n._locale = Co... | local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Library = require "cosy.library"
local Value = require "cosy.value"
Configuration.load {
"cosy.daemon",
"cosy.server",
}
local i18n = I18n.load {
"cosy.daemon",
"cosy.server",
}
i18n._locale = Co... | Fix error messages. | Fix error messages.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
d549ad79e19f9c9201e63b7cfcbdf56c243bc893 | build/premake5.lua | build/premake5.lua |
function SetTarget( _configuration, _platform, _basepath )
local platformname = _platform
local archname = _platform
if _platform == "x32" then
platformname = "Win32"
archname = "x86"
end
local strtarget = string.format( "%s/bin/%s_%s/", _basepath, _configuration, platformname )
local strobj = stri... |
function SetTarget( _configuration, _platform, _basepath )
local platformname = _platform
local archname = _platform
if _platform == "x32" then
platformname = "Win32"
archname = "x86"
end
local strtarget = string.format( "%s/bin/%s_%s/", _basepath, _configuration, platformname )
local strobj = stri... | various fixes to premake conf | various fixes to premake conf
| Lua | mit | nsweb/fracstar,nsweb/fracstar |
27f97cdee060e445994ddcfe52912a9581f7b130 | irc/handlers.lua | irc/handlers.lua | local pairs = pairs
local error = error
local tonumber = tonumber
local table = table
module "irc"
handlers = {}
handlers["PING"] = function(o, prefix, query)
o:send("PONG :%s", query)
end
handlers["001"] = function(o, prefix, me)
o.authed = true
o.nick = me
end
handlers["PRIVMSG"] = function(o, prefix, channel... | local pairs = pairs
local error = error
local tonumber = tonumber
local table = table
module "irc"
handlers = {}
handlers["PING"] = function(o, prefix, query)
o:send("PONG :%s", query)
end
handlers["001"] = function(o, prefix, me)
o.authed = true
o.nick = me
end
handlers["PRIVMSG"] = function(o, prefix, channel... | fix possible crash when modes are set | fix possible crash when modes are set
| Lua | mit | GLolol/Crackbot,wolfy1339/WolfyBot,wolfy1339/WolfyBot,Brilliant-Minds/BMNBot-2,wolfy1339/WolfyBot,cracker64/Crackbot,cracker64/Crackbot,Brilliant-Minds/BMNBot-2,GLolol/Crackbot |
37b5f9462e207df9e5f62ee5c2b89df9603f2bb5 | classes/cabook.lua | classes/cabook.lua | local book = require("classes/book")
local plain = require("classes/plain")
local cabook = pl.class(book)
cabook._name = "cabook"
function cabook:_init (options)
book._init(self, options)
self:loadPackage("color")
self:loadPackage("ifattop")
self:loadPackage("leaders")
self:loadPackage("raiselower")
self... | local book = require("classes/book")
local plain = require("classes/plain")
local cabook = pl.class(book)
cabook._name = "cabook"
function cabook:_init (options)
book._init(self, options)
self:loadPackage("color")
self:loadPackage("ifattop")
self:loadPackage("leaders")
self:loadPackage("raiselower")
self... | fix(classes): Setup cabook class to be minimally v0.14.x compliant | fix(classes): Setup cabook class to be minimally v0.14.x compliant
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
38deeb5cbab19386f12db5064d731f6168fa79ea | lua/starfall/libs_sh/time.lua | lua/starfall/libs_sh/time.lua | -------------------------------------------------------------------------------
-- Time library
-------------------------------------------------------------------------------
local timer = timer
--- Deals with time and timers.
-- @shared
local time_library, _ = SF.Libraries.Register("time")
-- ---------------------... | -------------------------------------------------------------------------------
-- Time library
-------------------------------------------------------------------------------
local timer = timer
--- Deals with time and timers.
-- @shared
local time_library, _ = SF.Libraries.Register("time")
-- ---------------------... | Added time.frameTime(). Fixes #96 | Added time.frameTime(). Fixes #96
| Lua | bsd-3-clause | INPStarfall/Starfall,Jazzelhawk/Starfall,Ingenious-Gaming/Starfall,Jazzelhawk/Starfall,Ingenious-Gaming/Starfall,Xandaros/Starfall,INPStarfall/Starfall,Xandaros/Starfall |
8af3698386050fcdf489ac04a9df7df865a778c9 | database/redis.lua | database/redis.lua | -- Copyright (C) Dejiang Zhu (doujiang24)
local redis = require "resty.redis"
local corehelper = require "system.helper.core"
local log_error = corehelper.log_error
local log_debug = corehelper.log_debug
local setmetatable = setmetatable
local unpack = unpack
local get_instance = get_instance
local insert = table.ins... | -- Copyright (C) Dejiang Zhu (doujiang24)
local redis = require "resty.redis"
local corehelper = require "system.helper.core"
local log_error = corehelper.log_error
local log_debug = corehelper.log_debug
local setmetatable = setmetatable
local unpack = unpack
local get_instance = get_instance
local insert = table.ins... | bugfix: no need to fix for pubsub; since lua-resty-redis has apply my patch | bugfix: no need to fix for pubsub; since lua-resty-redis
has apply my patch
| Lua | mit | doujiang24/durap-system |
d8560584341077212a3c990dfcdb24523d58bb1c | demo/xmake.lua | demo/xmake.lua | target("demo")
set_kind("binary")
set_default(false)
set_targetdir("app/")
add_deps("LCUIEx")
add_files("src/*.c")
add_files("src/ui/views/*.c")
add_files("src/ui/helpers/*.c")
add_includedirs("include", "../include", "../../LCUI/include", "../vendor/include")
before_build(function ... | target("demo")
set_kind("binary")
set_default(false)
set_targetdir("app/")
add_deps("LCUIEx")
add_files("src/*.c")
add_files("src/ui/views/*.c")
add_files("src/ui/helpers/*.c")
add_includedirs("include", "../include", "../../LCUI/include", "../vendor/include")
before_build(function ... | fix load dll on windows | fix load dll on windows
| Lua | mit | lc-ui/lcui.css,lc-ui/lcui.css,lc-ui/lcui.css |
e2540b68db76d29cbfe1385c5fcdd8bcfd00fe06 | src/builtin/tactic.lua | src/builtin/tactic.lua | -- Define macros for simplifying Tactic creation
local unary_combinator = function (name, fn) tactic_macro(name, { macro_arg.Tactic }, function (env, t) return fn(t) end) end
local nary_combinator = function (name, fn) tactic_macro(name, { macro_arg.Tactics }, function (env, ts) return fn(unpack(ts)) end) end
local con... | -- Define macros for simplifying Tactic creation
local unary_combinator = function (name, fn) tactic_macro(name, { macro_arg.Tactic }, function (env, t) return fn(t) end) end
local nary_combinator = function (name, fn) tactic_macro(name, { macro_arg.Tactics }, function (env, ts) return fn(unpack(ts)) end) end
local con... | fix(src/builtin/tactic): add default rule set if none is provided | fix(src/builtin/tactic): add default rule set if none is provided
Signed-off-by: Leonardo de Moura <7610bae85f2b530654cc716772f1fe653373e892@microsoft.com>
| Lua | apache-2.0 | leanprover-community/lean,avigad/lean,Kha/lean,Kha/lean,soonhokong/travis_test,rlewis1988/lean,fgdorais/lean,fpvandoorn/lean2,eigengrau/lean,soonhokong/lean-osx,UlrikBuchholtz/lean,johoelzl/lean,leanprover/lean,fpvandoorn/lean2,avigad/lean,digama0/lean,soonhokong/lean,sp3ctum/lean,rlewis1988/lean,dselsam/lean,johoelzl/... |
d7632b6e5af6c481a2d45919d5a3952eb9b5a38e | triggerfield/galmair_guard_rules.lua | triggerfield/galmair_guard_rules.lua | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | fix bug allowing perpetual quest | fix bug allowing perpetual quest
| Lua | agpl-3.0 | vilarion/Illarion-Content,KayMD/Illarion-Content,Baylamon/Illarion-Content,Illarion-eV/Illarion-Content |
66c21609870294075d707d9331f9c16b529fa952 | mod_websocket/mod_websocket.lua | mod_websocket/mod_websocket.lua | -- Prosody IM
-- Copyright (C) 2012 Florian Zeitz
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
module:set_global();
local add_filter = require "util.filters".add_filter;
local sha1 = require "util.hashes".sha1;
local base64 = require "util.encod... | -- Prosody IM
-- Copyright (C) 2012 Florian Zeitz
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
module:set_global();
local add_filter = require "util.filters".add_filter;
local sha1 = require "util.hashes".sha1;
local base64 = require "util.encod... | mod_websocket: Fix require to work with lua-bitop (Thanks István and Zash) | mod_websocket: Fix require to work with lua-bitop (Thanks István and Zash)
| Lua | mit | Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules |
9725e96257b10f5a0b577ff1e142b5fc1ae4adf5 | xmake.lua | xmake.lua |
-- version
set_version("1.5.1")
-- set warning all as error
set_warnings("all", "error")
-- set language: c99, c++11
set_languages("c99", "cxx11")
-- add defines to config.h
add_defines_h("$(prefix)_OS_$(OS)")
-- add undefines to config.h
add_undefines_h("$(prefix)_TRACE_INFO_ONLY")
add_undefines_h("$(prefix)_EXC... |
-- version
set_version("1.5.1")
-- set warning all as error
set_warnings("all", "error")
-- set language: c99, c++11
set_languages("c99", "cxx11")
-- add defines to config.h
add_defines_h("$(prefix)_OS_$(OS)")
-- add undefines to config.h
add_undefines_h("$(prefix)_TRACE_INFO_ONLY")
add_undefines_h("$(prefix)_EXC... | fix strict-aliasing error for gcc | fix strict-aliasing error for gcc
| Lua | apache-2.0 | tboox/tbox,tboox/tbox,waruqi/tbox,waruqi/tbox |
3490d048863b84de46f5c7c19422301f9a834602 | entity/player.lua | entity/player.lua | local Player = {}
Player.__index = Player
local PULL_LENGTH2 = 300 * 300;
local PULL_FORCE = 300;
local PLAYER_FORCE = 5000;
local PLAYER_DAMPENING = 10;
local PLAYER_DENSITY = 10;
local PLAYER_HITPOINTS = 100;
local BALL_DAMAGE = 10;
local radius = 16;
Player.category = 1;
Player.mask = -1;
funct... | local Player = {}
Player.__index = Player
local PULL_LENGTH2 = 300 * 300;
local PULL_FORCE = 600;
local PLAYER_FORCE = 5000;
local PLAYER_DAMPENING = 10;
local PLAYER_DENSITY = 10;
local PLAYER_HITPOINTS = 100;
local BALL_DAMAGE = 10;
local radius = 16;
Player.category = 1;
Player.mask = -1;
funct... | Fixed stuff | Fixed stuff
| Lua | mit | GuiSim/pixel |
ecd590f04481136a42d6064d400713017e854f17 | src/cli/db.lua | src/cli/db.lua | #!/usr/bin/env lua
local Faker = require "kong.tools.faker"
local Migrations = require "kong.tools.migrations"
local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
local IO = require "kong.tools.io"
local lapp = require("lapp")
local args = lapp(string.format([[
Migrations, seeding of th... | #!/usr/bin/env lua
local Faker = require "kong.tools.faker"
local Migrations = require "kong.tools.migrations"
local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
local IO = require "kong.tools.io"
local lapp = require("lapp")
local args = lapp(string.format([[
Migrations, seeding of th... | fix: migrations list when 0 migraitons run. Fix #104 | fix: migrations list when 0 migraitons run. Fix #104
| Lua | apache-2.0 | Kong/kong,shiprabehera/kong,ind9/kong,vzaramel/kong,xvaara/kong,streamdataio/kong,beauli/kong,salazar/kong,rafael/kong,isdom/kong,isdom/kong,ind9/kong,akh00/kong,rafael/kong,icyxp/kong,ejoncas/kong,jebenexer/kong,kyroskoh/kong,streamdataio/kong,ejoncas/kong,Kong/kong,li-wl/kong,Vermeille/kong,Kong/kong,ajayk/kong,vzara... |
20dd1f895710403b6b887b77a78ecdd7a969ea4f | core/ext/key_commands_std.lua | core/ext/key_commands_std.lua | -- Copyright 2007-2008 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
---
-- Defines the key commands used by the Textadept key command manager.
-- For non-ascii keys, see textadept.keys for string aliases.
-- This set of key commands is pretty standard among other text editors.
module('textadept.key_commands... | -- Copyright 2007-2008 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
---
-- Defines the key commands used by the Textadept key command manager.
-- For non-ascii keys, see textadept.keys for string aliases.
-- This set of key commands is pretty standard among other text editors.
module('textadept.key_commands... | Fixed some conflicting key commands; core/ext/key_commands_std.lua | Fixed some conflicting key commands; core/ext/key_commands_std.lua
| Lua | mit | jozadaquebatista/textadept,jozadaquebatista/textadept |
ebed90e5a6f358e375a8efd0c57c29f4dca59331 | core/src/lua-cjson/xmake.lua | core/src/lua-cjson/xmake.lua | target("lua-cjson")
set_kind("static")
set_warnings("all")
add_deps("luajit")
if is_plat("windows") then
set_languages("c89")
end
add_files("lua-cjson/*.c|fpconv.c")
-- Use internal strtod() / g_fmt() code for performance and disable multi-thread
add_defines("NDEBUG", "USE_INTER... | target("lua-cjson")
set_kind("static")
set_warnings("all")
add_deps("luajit")
if is_plat("windows") then
set_languages("c89")
end
add_files("lua-cjson/*.c|fpconv.c")
-- Use internal strtod() / g_fmt() code for performance and disable multi-thread
add_defines("NDEBUG", "USE_INTER... | fix compile errors for vs2013 | fix compile errors for vs2013
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
6f74268546ae4eee537c5acc21aa4c8fa03be55f | otouto/plugins/pokemon-go.lua | otouto/plugins/pokemon-go.lua | -- For some reason you can't have an é in variable names. :(
local pokemon_go = {}
local utilities = require('otouto.utilities')
pokemon_go.command = 'pokego <team>'
function pokemon_go:init(config)
pokemon_go.triggers = utilities.triggers(self.info.username, config.cmd_pat)
:t('pokego', true):t('pokégo', true... | -- For some reason you can't have an é in variable names. :(
local pokemon_go = {}
local utilities = require('otouto.utilities')
pokemon_go.command = 'pokego <team>'
function pokemon_go:init(config)
pokemon_go.triggers = utilities.triggers(self.info.username, config.cmd_pat)
:t('pokego', true):t('pokégo', true... | Fix your database serialization, Drew | Fix your database serialization, Drew | Lua | agpl-3.0 | bb010g/otouto,Brawl345/Brawlbot-v2,topkecleon/otouto,barreeeiroo/BarrePolice |
bd525446571232ebbd39f7428b27ef07cd8df258 | core/gui.lua | core/gui.lua | -- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local gui = _G.gui
-- LuaDoc is in core/.gui.lua.
function gui.check_focused_buffer(buffer)
if type(buffer) ~= 'table' or not buffer.doc_pointer then
error(locale.ERR_BUFFER_EXPECTED, 2)
elseif gui.focused_doc_pointer ~= buffer.doc_point... | -- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local gui = _G.gui
-- LuaDoc is in core/.gui.lua.
function gui.check_focused_buffer(buffer)
if type(buffer) ~= 'table' or not buffer.doc_pointer then
error(locale.ERR_BUFFER_EXPECTED, 2)
elseif gui.focused_doc_pointer ~= buffer.doc_point... | Fix switch buffers dialog bug when cancelling; core/gui.lua | Fix switch buffers dialog bug when cancelling; core/gui.lua
| Lua | mit | jozadaquebatista/textadept,jozadaquebatista/textadept |
f2264da43cd521bd64e687c91bc7b94c3e28e7b3 | applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua | applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua | -- Copyright 2016 Hannu Nyman
-- Copyright 2017 Dirk Brenken (dev@brenken.org)
-- This is free software, licensed under the Apache License, Version 2.0
local sys = require("luci.sys")
local util = require("luci.util")
local data = util.ubus("service", "get_data", "name", "adblock") or { }
local dnsFile1 = sys.exec("fi... | -- Copyright 2016 Hannu Nyman
-- Copyright 2017 Dirk Brenken (dev@brenken.org)
-- This is free software, licensed under the Apache License, Version 2.0
local sys = require("luci.sys")
local util = require("luci.util")
local data = util.ubus("service", "get_data", "name", "adblock") or { }
local dnsFile1 = sys.exec("fi... | luci-app-adblock: small fixes in overview tab | luci-app-adblock: small fixes in overview tab
* mute stderr in syscalls
* better suspend/resume button handling
Signed-off-by: Dirk Brenken <34c6fceca75e456f25e7e99531e2425c6c1de443@brenken.org> | Lua | apache-2.0 | kuoruan/luci,981213/luci-1,openwrt-es/openwrt-luci,kuoruan/lede-luci,chris5560/openwrt-luci,aa65535/luci,artynet/luci,taiha/luci,Wedmer/luci,taiha/luci,shangjiyu/luci-with-extra,kuoruan/luci,lbthomsen/openwrt-luci,shangjiyu/luci-with-extra,remakeelectric/luci,Noltari/luci,shangjiyu/luci-with-extra,rogerpueyo/luci,shang... |
0ec2de4572348feff705d187eaf398eda8d80cfe | util/print-network-table.lua | util/print-network-table.lua | #!/usr/bin/env th
require 'torch'
require 'nn'
require 'dpnn'
torch.setdefaulttensortype('torch.FloatTensor')
local cmd = torch.CmdLine()
cmd:text()
cmd:text('Print network table.')
cmd:text()
cmd:text('Options:')
cmd:option('-modelDef', '/home/bamos/repos/openface/models/openface/nn4.small2.def.lua', 'Path to mode... | #!/usr/bin/env th
require 'torch'
require 'nn'
require 'dpnn'
torch.setdefaulttensortype('torch.FloatTensor')
local cmd = torch.CmdLine()
cmd:text()
cmd:text('Print network table.')
cmd:text()
cmd:text('Options:')
cmd:option('-modelDef', '/home/bamos/repos/openface/models/openface/nn4.small2.def.lua', 'Path to mode... | Fix luacheck warning. | Fix luacheck warning.
| Lua | apache-2.0 | Alexx-G/openface,francisleunggie/openface,nmabhi/Webface,cmusatyalab/openface,nmabhi/Webface,xinfang/face-recognize,francisleunggie/openface,nmabhi/Webface,xinfang/face-recognize,Alexx-G/openface,nmabhi/Webface,Alexx-G/openface,cmusatyalab/openface,nhzandi/openface,nhzandi/openface,francisleunggie/openface,xinfang/face... |
044f59c38cdf54a42b5d9cdaf6670d8281d3d294 | mod_post_msg/mod_post_msg.lua | mod_post_msg/mod_post_msg.lua | module:depends"http"
local jid_split = require "util.jid".split;
local jid_prep = require "util.jid".prep;
local msg = require "util.stanza".message;
local test_password = require "core.usermanager".test_password;
local b64_decode = require "util.encodings".base64.decode;
local formdecode = require "net.http".formdeco... | module:depends"http"
local jid_split = require "util.jid".split;
local jid_prep = require "util.jid".prep;
local msg = require "util.stanza".message;
local test_password = require "core.usermanager".test_password;
local b64_decode = require "util.encodings".base64.decode;
local formdecode = require "net.http".formdeco... | mod_post_msg: Fix indentation | mod_post_msg: Fix indentation
| Lua | mit | Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules |
4b4bc0dde2bbe33547593d393e4fbba94686aa39 | profiles/examples/postgis.lua | profiles/examples/postgis.lua |
-- This example shows how to query external data stored in PostGIS when processing ways.
-- This profile assumes that OSM data has been imported to PostGIS using imposm to a db
-- with the name 'imposm', the default user and no password. It assumes areas with
-- landusage=* was imported to the table osm_landusages, ... |
-- This example shows how to query external data stored in PostGIS when processing ways.
-- This profile assumes that OSM data has been imported to PostGIS using imposm to a db
-- with the name 'imposm', the default user and no password. It assumes areas with
-- landusage=* was imported to the table osm_landusages, ... | Fix postgis lua example | Fix postgis lua example
Fixes #1573.
| Lua | bsd-2-clause | arnekaiser/osrm-backend,hydrays/osrm-backend,deniskoronchik/osrm-backend,beemogmbh/osrm-backend,felixguendling/osrm-backend,hydrays/osrm-backend,neilbu/osrm-backend,frodrigo/osrm-backend,hydrays/osrm-backend,KnockSoftware/osrm-backend,bjtaylor1/osrm-backend,arnekaiser/osrm-backend,neilbu/osrm-backend,Project-OSRM/osrm-... |
488857a3ddb2919b8fee88142b650db377a1c773 | server.lua | server.lua | -- https://github.com/szym/display
-- Copyright (c) 2015, Szymon Jakubczak (MIT License)
-- Forwards any data POSTed to /events to an event-stream at /events.
-- Serves files from /static otherwise.
local turbo = require('turbo')
local subscribers = {}
function postEvent(data)
for k, v in pairs(subscribers) do
... | -- https://github.com/szym/display
-- Copyright (c) 2015, Szymon Jakubczak (MIT License)
-- Forwards any data POSTed to /events to an event-stream at /events.
-- Serves files from /static otherwise.
local turbo = require('turbo')
local subscribers = {}
function postEvent(data)
for k, v in pairs(subscribers) do
... | Work around max_buffer_size bug in TurboLua. | Work around max_buffer_size bug in TurboLua.
Also, default to localhost listening.
| Lua | mit | szym/display,szym/display,szym/display,szym/display,soumith/display,soumith/display,soumith/display,soumith/display |
c0c3d8f6b471e17d05ef26d903448b99bc4ea1c2 | spec/plugins/logging_spec.lua | spec/plugins/logging_spec.lua | local IO = require "kong.tools.io"
local utils = require "kong.tools.utils"
local cjson = require "cjson"
local stringy = require "stringy"
local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local STUB_GET_URL = spec_helper.STUB_GET_URL
local TCP_PORT = 20777
local U... | local IO = require "kong.tools.io"
local utils = require "kong.tools.utils"
local cjson = require "cjson"
local stringy = require "stringy"
local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local STUB_GET_URL = spec_helper.STUB_GET_URL
local TCP_PORT = 20777
local U... | fixing logging spec | fixing logging spec
| Lua | apache-2.0 | peterayeni/kong,paritoshmmmec/kong,bbalu/kong,sbuettner/kong,Skyscanner/kong,vmercierfr/kong,chourobin/kong,ChristopherBiscardi/kong,skynet/kong,wakermahmud/kong,AnsonSmith/kong |
d853a52528a7f56a702d964e6c36d8528b02fe8c | OS/DiskOS/APIS/RamUtils.lua | OS/DiskOS/APIS/RamUtils.lua | --RAM Utilities.
--Variabes.
local sw,sh = screenSize()
--Localized Lua Library
local unpack = unpack
local floor, ceil, min = math.floor, math.ceil, math.min
local strChar, strByte = string.char, string.byte
local lshift, rshift, bor, band = bit.lshift, bit.rshift, bit.bor, bit.band
--The API
local RamUtils = {}
R... | --RAM Utilities.
--Variabes.
local sw,sh = screenSize()
--Localized Lua Library
local unpack = unpack
local floor, ceil, min = math.floor, math.ceil, math.min
local strChar, strByte = string.char, string.byte
local lshift, rshift, bor, band = bit.lshift, bit.rshift, bit.bor, bit.band
--The API
local RamUtils = {}
R... | Bugfixes in RamUtils.imgToBin + RamUtils.mapToBin | Bugfixes in RamUtils.imgToBin + RamUtils.mapToBin | Lua | mit | RamiLego4Game/LIKO-12 |
6bec98b05129fdee91f3153ac3e426c12b183d89 | world/Plugins/Docker/docker.lua | world/Plugins/Docker/docker.lua | -- local PLUGIN = nil
Ground = 63
DContainer = {displayed = false, x = 0, z = 0, name="",id="",imageRepo="",imageTag=""}
CONTAINER_START_X = 0
CONTAINER_OFFSET_X = -6
CONTAINER_START_Z = 4
Containers = {}
SignsToUpdate = {}
function startContainer(id,name,imageRepo,imageTag)
x = 0
for i=0, table.getn(Container... | -- local PLUGIN = nil
Ground = 63
DContainer = {displayed = false, x = 0, z = 0, name="",id="",imageRepo="",imageTag=""}
CONTAINER_START_X = 0
CONTAINER_OFFSET_X = -6
CONTAINER_START_Z = 4
Containers = {}
SignsToUpdate = {}
function updateSigns(World)
for i=1,table.getn(SignsToUpdate)
do
sign = SignsToUp... | Fixed signs update | Fixed signs update
| Lua | apache-2.0 | stevesloka/kubecraft,johnmccabe/dockercraft,nyasukun/openstackcraft,gdevillele/dockercraft,docker/dockercraft,nyasukun/openstackcraft,johnmccabe/dockercraft,johnmccabe/dockercraft,nyasukun/openstackcraft,stevesloka/kubecraft,gdevillele/dockercraft,stevesloka/kubecraft,gdevillele/dockercraft,docker/dockercraft |
9b09c2c39bf7f67cfbd57b3068d9c75a411129f8 | mod_storage_gdbm/mod_storage_gdbm.lua | mod_storage_gdbm/mod_storage_gdbm.lua | -- mod_storage_gdbm
-- Copyright (C) 2014 Kim Alvefur
--
-- This file is MIT/X11 licensed.
--
-- Depends on lgdbm:
-- http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#lgdbm
local gdbm = require"gdbm";
local path = require"util.paths";
local lfs = require"lfs";
local uuid = require"util.uuid".generate;
local seriali... | -- mod_storage_gdbm
-- Copyright (C) 2014 Kim Alvefur
--
-- This file is MIT/X11 licensed.
--
-- Depends on lgdbm:
-- http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#lgdbm
local gdbm = require"gdbm";
local path = require"util.paths";
local lfs = require"lfs";
local uuid = require"util.uuid".generate;
local seriali... | mod_storage_gdbm: Fix traceback if query is nil or no metadata exists | mod_storage_gdbm: Fix traceback if query is nil or no metadata exists
| Lua | mit | Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules |
9e711e51488636636a601b09ac3ad8953877a779 | fusion/stdlib/functional.lua | fusion/stdlib/functional.lua | --- Module for "functional" iterators and functions.
-- @module fusion.stdlib.functional
local unpack = unpack or table.unpack -- luacheck: ignore 113
--- Return an iterator over a value if possible or the value passed.
-- Possible value types can be strings and any object with __pairs or __ipairs
-- metadata.
-- @tpa... | --- Module for "functional" iterators and functions.
-- @module fusion.stdlib.functional
local unpack = unpack or table.unpack -- luacheck: ignore 113
--- Return an iterator over a value if possible or the value passed.
-- Possible value types can be strings and any object with __pairs or __ipairs
-- metadata.
-- @tpa... | functional: fix logic error with sum(), any(), and all() | functional: fix logic error with sum(), any(), and all()
| Lua | mit | RyanSquared/FusionScript |
4c6a891c04c3bab5deac158869e76b17651bfe6c | mod_register_url/mod_register_url.lua | mod_register_url/mod_register_url.lua | -- Registration Redirect module for Prosody
--
-- Redirects IP addresses not in the whitelist to a web page to complete the registration.
local st = require "util.stanza";
function reg_redirect(event)
local ip_wl = module:get_option("registration_whitelist") or { "127.0.0.1" };
local url = module:get_option("regis... | -- Registration Redirect module for Prosody
--
-- Redirects IP addresses not in the whitelist to a web page to complete the registration.
local st = require "util.stanza";
function reg_redirect(event)
local ip_wl = module:get_option("registration_whitelist") or { "127.0.0.1" };
local url = module:get_option("regis... | mod_register_url: minor fix. | mod_register_url: minor fix.
| Lua | mit | prosody-modules/import,drdownload/prosody-modules,softer/prosody-modules,iamliqiang/prosody-modules,mmusial/prosody-modules,olax/prosody-modules,NSAKEY/prosody-modules,syntafin/prosody-modules,NSAKEY/prosody-modules,olax/prosody-modules,amenophis1er/prosody-modules,vince06fr/prosody-modules,drdownload/prosody-modules,e... |
703465cb6ad521389b8c64052bcf24f45ec92aec | states/game.lua | states/game.lua | local Scene = require 'entities.scene'
local Dynamo = require 'entities.scenes.dynamo'
local Sprite = require 'entities.sprite'
local Bit = require 'bit'
local game = {}
function game:init()
self.dynamo = Dynamo:new()
self.scene = Scene:new()
self.catalogs = {
art = require 'catalogs.art',
}... | local Scene = require 'entities.scene'
local Dynamo = require 'entities.scenes.dynamo'
local Sprite = require 'entities.sprite'
local Bit = require 'bit'
local game = {}
function game:init()
self.dynamo = Dynamo:new()
self.scene = Scene:new()
self.catalogs = {
art = require 'catalogs.art',
}... | Fix game freeze when ship is filled | Fix game freeze when ship is filled
| Lua | mit | Nuthen/ludum-dare-39 |
136a73e503dfc92c2d9dc350854708b02ff88548 | test/integration/integration_spec.lua | test/integration/integration_spec.lua | describe('integration', function()
local port = '7070'
local url = 'http://localhost:' .. port
local executeCommand = function(command)
local handle = io.popen(command .. ' -s ' .. url)
local result = handle:read('*a')
handle:close()
return result
end
it('should return correct headers', fun... | describe('integration', function()
local port = '7070'
local url = 'http://localhost:' .. port
local executeCommand = function(command)
local handle = io.popen(command .. ' -s ' .. url)
local result = handle:read('*a')
handle:close()
return result
end
it('should return correct headers', fun... | fix problem with integration tests | fix problem with integration tests
| Lua | mit | EvandroLG/pegasus.lua |
3e89e853ba2e65800e3e127d4a195fb6b412c012 | task/train.lua | task/train.lua | local image = require 'image'
local nn = require 'nn'
local optim = require 'optim'
local tnt = require 'torchnet'
local function parse_args(args)
local op = xlua.OptionParser("dataset_creator.lua -c|--csv=CSV -d|--dir=DIR"
.. "[-p|--pattern ptrn] OUTPUT_FILE")
op:option{
"--train",
... | local image = require 'image'
local nn = require 'nn'
local optim = require 'optim'
local tnt = require 'torchnet'
local function parse_args(args)
local op = xlua.OptionParser("dataset_creator.lua -c|--csv=CSV -d|--dir=DIR"
.. "[-p|--pattern ptrn] OUTPUT_FILE")
op:option{
"--train",
... | Fix BatchNorm layer ordering + adding the last one | Fix BatchNorm layer ordering + adding the last one
| Lua | mit | MatejNikl/incremental_learning |
59805bebcbddd8567a40eebb0117303359249a72 | mock/component/InputListener.lua | mock/component/InputListener.lua | module 'mock'
--[[
each InputScript will hold a listener to responding input sensor
filter [ mouse, keyboard, touch, joystick ]
]]
function installInputListener( self, option )
option = option or {}
local inputDevice = option['device'] or mock.getDefaultInputDevice()
local refuseMockUpInput = option['no_moc... | module 'mock'
--[[
each InputScript will hold a listener to responding input sensor
filter [ mouse, keyboard, touch, joystick ]
]]
function installInputListener( self, option )
option = option or {}
local inputDevice = option['device'] or mock.getDefaultInputDevice()
local refuseMockUpInput = option['no_moc... | [mock]adding joystick support for osx host; [yaka]fix item using in meow store | [mock]adding joystick support for osx host; [yaka]fix item using in meow store
| Lua | mit | tommo/mock |
c35797f6aeae0ab019a059e2955f0e990b65bd0c | SpatialMatching.lua | SpatialMatching.lua | local SpatialMatching, parent = torch.class('nn.SpatialMatching', 'nn.Module')
function SpatialMatching:__init(maxw, maxh, full_output)
-- If full_output is false, output is computed on elements of the first input
-- for which all the possible corresponding elements exist in the second input
-- In addition, i... | local SpatialMatching, parent = torch.class('nn.SpatialMatching', 'nn.Module')
function SpatialMatching:__init(maxw, maxh, full_output)
-- If full_output is false, output is computed on elements of the first input
-- for which all the possible corresponding elements exist in the second input
-- In addition, i... | Fix bug in SpatialMatching | Fix bug in SpatialMatching
| Lua | mit | clementfarabet/lua---nnx |
970882fff2c6d7f45b61c5b690d6e0f8068ebc86 | modules/dokpro.lua | modules/dokpro.lua | local htmlparser = require'htmlparser'
local trim = function(s)
if not s then return nil end
return s:match('^()%s*$') and '' or s:match('^%s*(.*%S)')
end
local wordClass = {
f = 'substantiv',
m = 'substantiv',
n = 'substantiv',
a = 'adjektiv',
v = 'verb',
}
local removeDuplicates = function(tbl)
local don... | local htmlparser = require'htmlparser'
local trim = function(s)
if not s then return nil end
return s:match('^()%s*$') and '' or s:match('^%s*(.*%S)')
end
local wordClass = {
f = 'substantiv',
m = 'substantiv',
n = 'substantiv',
a = 'adjektiv',
v = 'verb',
}
local removeDuplicates = function(tbl)
local don... | dokpro: fixes | dokpro: fixes
| Lua | mit | torhve/ivar2,torhve/ivar2,torhve/ivar2 |
11d5ce43802b0e92b321aeb1d37d2f7ecc4ab0d8 | himan-scripts/CB-TCU-cloud.lua | himan-scripts/CB-TCU-cloud.lua | --Round to natural number
function round(n)
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
end
--Main program
--
local MU = level(HPLevelType.kMaximumThetaE,0)
local HL = level(HPLevelType.kHeightLayer,500,0)
local HG = level(HPLevelType.kHeight,0)
EL500 = luatool:FetchWithType(current_time, HL, param("EL-H... | --Round to natural number
function round(n)
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
end
--Main program
--
local MU = level(HPLevelType.kMaximumThetaE,0)
local HL = level(HPLevelType.kHeightLayer,500,0)
local HG = level(HPLevelType.kHeight,0)
EL500 = luatool:FetchWithType(current_time, HL, param("EL-H... | CB-TCU bugfix | CB-TCU bugfix
| Lua | mit | fmidev/himan,fmidev/himan,fmidev/himan |
fb1c495a4c976fdd24f4b7df7b7b4a120acf7e94 | modules/corelib/ui/tooltip.lua | modules/corelib/ui/tooltip.lua | -- @docclass
g_tooltip = {}
-- private variables
local toolTipLabel
local currentHoveredWidget
-- private functions
local function moveToolTip(tooltip)
if not tooltip:isVisible() or tooltip:getOpacity() < 0.1 then return end
local pos = g_window.getMousePosition()
pos.y = pos.y + 1
local xdif = g_window.getS... | -- @docclass
g_tooltip = {}
-- private variables
local toolTipLabel
local currentHoveredWidget
-- private functions
local function moveToolTip(first)
if not first and (not toolTipLabel:isVisible() or toolTipLabel:getOpacity() < 0.1) then return end
local pos = g_window.getMousePosition()
pos.y = pos.y + 1
lo... | Fix minor tooltip bug | Fix minor tooltip bug
| Lua | mit | kwketh/otclient,EvilHero90/otclient,dreamsxin/otclient,dreamsxin/otclient,gpedro/otclient,EvilHero90/otclient,Cavitt/otclient_mapgen,Cavitt/otclient_mapgen,gpedro/otclient,gpedro/otclient,Radseq/otclient,Radseq/otclient,kwketh/otclient,dreamsxin/otclient |
00f865b217bef67624845e0593e70c3d3e3da848 | scripts/genie.lua | scripts/genie.lua |
solution "UtilsCollection"
location (path.join("../.project/", _ACTION))
language "C++"
configurations { "Debug", "Release" }
platforms { "x32", "x64" }
objdir ("../.build/".._ACTION)
defines { "_CRT_SECURE_NO_WARNINGS" }
project "ResourceEmbedder"
uuid "fecff87e-9cc0-4134-a2b5-6ef0e73... |
solution "UtilsCollection"
location (path.join("../.project/", _ACTION))
language "C++"
configurations { "Debug", "Release" }
platforms { "x32", "x64" }
objdir ("../.build/".._ACTION)
defines { "_CRT_SECURE_NO_WARNINGS" }
project "ResourceEmbedder"
uuid "fecff87e-9cc0-4134-a2b5-6ef0e73... | Add prefix "_64" in filename to 64 bits build | Add prefix "_64" in filename to 64 bits build
| Lua | mit | thennequin/UtilsCollection,thennequin/UtilsCollection |
a1564096ec639e7541fd0e0fdc80fd5b267df4b1 | pud/ui/Tooltip.lua | pud/ui/Tooltip.lua | local Class = require 'lib.hump.class'
local Frame = getClass 'pud.ui.Frame'
local Text = getClass 'pud.ui.Text'
local Bar = getClass 'pud.ui.Bar'
-- Tooltip
--
local Tooltip = Class{name='Tooltip',
inherits=Frame,
function(self, ...)
Frame.construct(self, ...)
self:setDepth(5)
self._margin = 0
self._show = ... | local Class = require 'lib.hump.class'
local Frame = getClass 'pud.ui.Frame'
local Text = getClass 'pud.ui.Text'
local Bar = getClass 'pud.ui.Bar'
-- Tooltip
--
local Tooltip = Class{name='Tooltip',
inherits=Frame,
function(self, ...)
Frame.construct(self, ...)
self._margin = 0
self:setDepth(5)
self:hide()
... | fix tooltip spacing and margins to use element sizes | fix tooltip spacing and margins to use element sizes
| Lua | mit | scottcs/wyx |
e74603f51b1ebe8b30b11aef3df709ae678ad28f | httplib.lua | httplib.lua | local utils=require("utils")
local M = {
proxy=nil,
proxyport=nil,
M_GET="GET",
M_POST="POST",
M_PUT="PUT"
}
function M.geturl(arg)
local addr=arg.host
local path=arg.path
if path==nil then path="/" end
local resp=""
local method = M.M_GET
if arg.method ~= nil then met... | local utils=require("utils")
local M = {
proxy=nil,
proxyport=nil,
M_GET="GET",
M_POST="POST",
M_PUT="PUT"
}
-- Build and return a table of the http response data
function M.parseHttpResponse (req)
local res = {}
res.headers = {}
local first = nil
local key, v, strt_ndx, end_ndx
lo... | httplib parses server response fixed bug in table concatenation fixed bug in proxy port | httplib parses server response
fixed bug in table concatenation
fixed bug in proxy port
| Lua | lgpl-2.1 | positron96/esp8266-bootconfig |
097cc43514fc1ede75cdc86a170613b302f8dcd1 | src/lua/utils.lua | src/lua/utils.lua | -- functions used by different modules
function split(str, delim)
local ret = {}
local last_end = 1
local s, e = str:find(delim, 1)
while s do
if s ~= 1 then
cap = str:sub(last_end, e-1)
table.insert(ret, cap)
end
last_end = e+1
s, e = str:find(delim, last_end)
end
if last_end <= #str then
cap ... | -- functions used by different modules
function split(str, delim)
local ret = {}
local last_end = 1
local s, e = str:find(delim, 1)
while s do
cap = str:sub(last_end, e-1)
table.insert(ret, cap)
last_end = e+1
s, e = str:find(delim, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
ta... | Fix path splitting for absolute path | Fix path splitting for absolute path
The absolute path was not split correctly and generated a relative path.
| Lua | mpl-2.0 | nabilbendafi/haka,lcheylus/haka,lcheylus/haka,haka-security/haka,nabilbendafi/haka,LubyRuffy/haka,haka-security/haka,Wingless-Archangel/haka,lcheylus/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,LubyRuffy/haka |
efe11b2a4260b39792435f0846a26ff952b10ee3 | testbed/units.lua | testbed/units.lua | require "tundra.syntax.glob"
-- Used to generate the moc cpp files as needed for .h that uses Q_OBJECT
DefRule {
Name = "MocGeneration",
Pass = "GenerateSources",
Command = "$(QT5)/bin/moc $(<) -o $(@)",
Blueprint = {
Source = { Required = true, Type = "string", Help = "Input filename", },
OutName = { Requir... | require "tundra.syntax.glob"
-- Used to generate the moc cpp files as needed for .h that uses Q_OBJECT
DefRule {
Name = "MocGeneration",
Pass = "GenerateSources",
Command = "$(QT5)/bin/moc $(<) -o $(@)",
Blueprint = {
Source = { Required = true, Type = "string", Help = "Input filename", },
OutName = { Requir... | Fix bad merge of units.lua | Fix bad merge of units.lua
| Lua | mit | emoon/ProDBG,kondrak/ProDBG,ashemedai/ProDBG,v3n/ProDBG,SlNPacifist/ProDBG,emoon/ProDBG,kondrak/ProDBG,ashemedai/ProDBG,RobertoMalatesta/ProDBG,RobertoMalatesta/ProDBG,SlNPacifist/ProDBG,RobertoMalatesta/ProDBG,SlNPacifist/ProDBG,v3n/ProDBG,kondrak/ProDBG,ashemedai/ProDBG,emoon/ProDBG,RobertoMalatesta/ProDBG,emoon/ProD... |
62cd2078d541bc8addcec9e0499cc8776dad9c51 | onmt/modules/DBiEncoder.lua | onmt/modules/DBiEncoder.lua | --[[ DBiEncoder is a deep bidirectional Sequencer used for the source language.
--]]
local DBiEncoder, parent = torch.class('onmt.DBiEncoder', 'nn.Container')
local options = {}
function DBiEncoder.declareOpts(cmd)
onmt.BiEncoder.declareOpts(cmd)
cmd:setCmdLineOptions(options)
end
--[[ Create a deep bidirecti... | --[[ DBiEncoder is a deep bidirectional Sequencer used for the source language.
--]]
local DBiEncoder, parent = torch.class('onmt.DBiEncoder', 'nn.Container')
local options = {}
function DBiEncoder.declareOpts(cmd)
onmt.BiEncoder.declareOpts(cmd)
cmd:setCmdLineOptions(options)
end
--[[ Create a deep bidirecti... | Fix DBiEncoder padding masking | Fix DBiEncoder padding masking
| Lua | mit | monsieurzhang/OpenNMT,jsenellart/OpenNMT,da03/OpenNMT,da03/OpenNMT,jsenellart-systran/OpenNMT,jungikim/OpenNMT,jungikim/OpenNMT,OpenNMT/OpenNMT,jsenellart-systran/OpenNMT,da03/OpenNMT,monsieurzhang/OpenNMT,OpenNMT/OpenNMT,jsenellart/OpenNMT,monsieurzhang/OpenNMT,jsenellart-systran/OpenNMT,OpenNMT/OpenNMT,jsenellart/Ope... |
dcf768b496b272ae2a21735abc26312eef12efc9 | CCLib/src/java/lang/native/HashMap.lua | CCLib/src/java/lang/native/HashMap.lua | natives["java.util.HashMap"] = natives["java.util.HashMap"] or {}
local tables = {}
natives["java.util.HashMap"]["putHash(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;"] = function(this, key, hash, value)
tables[this] = tables[this] or {}
local bucket = tables[this][hash]
local previous = ... | natives["java.util.HashMap"] = natives["java.util.HashMap"] or {}
local tables = {}
natives["java.util.HashMap"]["putHash(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;"] = function(this, key, hash, value)
tables[this] = tables[this] or {}
local bucket = tables[this][hash]
local previous = ... | Fixed saving of changed buckets. Broken by pervious commit | Fixed saving of changed buckets. Broken by pervious commit
| Lua | mit | Team-CC-Corp/JVML-JIT,apemanzilla/JVML-JIT |
b9174f708bc8af38343cf709daa819550fbac32e | spec/parser.lua | spec/parser.lua | describe('Test the parser', function()
local ini = require 'ini'
it('basic test', function()
assert.same({'a_key', 'this is the value for this set'}, ini.parse('a_key = this is the value for this set'))
assert.same({'this_is_a_section_test'}, ini.parse('[this_is_a_section_test]'))
asser... | describe('Test the parser', function()
local ini = require 'ini'
it('basic test', function()
assert.same({'a_key', 'this is the value for this set'}, ini.parse('a_key = this is the value for this set'))
assert.same({'this_is_a_section_test'}, ini.parse('[this_is_a_section_test]'))
asser... | Fix inverted expeted and passed value | Fix inverted expeted and passed value
| Lua | mit | lzubiaur/ini.lua |
bc313ec8d6d8d7d70b6e85a9546c937c0dd18d24 | state/loadmenu.lua | state/loadmenu.lua |
--[[--
LOAD MENU STATE
----
Display the load menu.
--]]--
local st = RunState.new()
local mt = {__tostring = function() return 'RunState.loadmenu' end}
setmetatable(st, mt)
local InputCommandEvent = getClass 'wyx.event.InputCommandEvent'
local LoadMenuUI = getClass 'wyx.ui.LoadMenu... |
--[[--
LOAD MENU STATE
----
Display the load menu.
--]]--
local st = RunState.new()
local mt = {__tostring = function() return 'RunState.loadmenu' end}
setmetatable(st, mt)
local InputCommandEvent = getClass 'wyx.event.InputCommandEvent'
local LoadMenuUI = getClass 'wyx.ui.LoadMenu... | fix load button crash when no file selected | fix load button crash when no file selected
| Lua | mit | scottcs/wyx |
8e82d024ca0136b6b849910fd48c18a3de42eb16 | share/lua/sd/appletrailers.lua | share/lua/sd/appletrailers.lua | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Ilkka Ollakka <ileoo 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
(at yo... | --[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Ilkka Ollakka <ileoo 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
(at yo... | appletrailers: fix arturl, seems that appletrailers-page changed littlebit | appletrailers: fix arturl, seems that appletrailers-page changed littlebit
| Lua | lgpl-2.1 | vlc-mirror/vlc,vlc-mirror/vlc-2.1,vlc-mirror/vlc-2.1,xkfz007/vlc,xkfz007/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2,xkfz007/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc,jomanmuk/vlc-2.2,krichter722/vlc,jomanmuk/vlc-2.2,krichter722/vlc,vlc-mirror/vlc,krichter722/vlc,jomanmuk/vlc-2.1,kric... |
cff7314fc5934961c4b5d5a385ff309884acc035 | defaut/Guerrier.lua | defaut/Guerrier.lua | Ovale.defaut["WARRIOR"] =
[[
#Spells
Define(BATTLESHOUT 6673)
SpellAddBuff(BATTLESHOUT BATTLESHOUT=120)
Define(BATTLESTANCE 2457)
Define(BERSERKERRAGE 18499)
Define(BERSERKERSTANCE 2458)
Define(BLADESTORM 46924)
Define(BLOODTHIRST 23881)
SpellInfo(BLOODTHIRST cd=3)
Define(CHARGE 100)
Define(CLEAVE 845)
SpellInfo(CLE... | Ovale.defaut["WARRIOR"] =
[[
#Spells
Define(BATTLESHOUT 6673)
SpellAddBuff(BATTLESHOUT BATTLESHOUT=120)
Define(BATTLESTANCE 2457)
Define(BERSERKERRAGE 18499)
Define(BERSERKERSTANCE 2458)
Define(BLADESTORM 46924)
Define(BLOODTHIRST 23881)
SpellInfo(BLOODTHIRST cd=3)
Define(CHARGE 100)
Define(CLEAVE 845)
SpellInfo(CLE... | warrior: sunder armor fix | warrior: sunder armor fix
git-svn-id: b2bb544abab4b09d60f88077ac82407cb244c9c9@278 d5049fe3-3747-40f7-a4b5-f36d6801af5f
| Lua | mit | eXhausted/Ovale,eXhausted/Ovale,ultijlam/ovale,ultijlam/ovale,ultijlam/ovale,eXhausted/Ovale,Xeltor/ovale |
b5d9a838d0c8cb4df83bf606eb56c69b64c75002 | src/loader/src/LoaderUtils.lua | src/loader/src/LoaderUtils.lua | ---
-- @module LoaderUtils
-- @author Quenty
local loader = script.Parent
local BounceTemplateUtils = require(script.Parent.BounceTemplateUtils)
local GroupInfoUtils = require(script.Parent.GroupInfoUtils)
local PackageInfoUtils = require(script.Parent.PackageInfoUtils)
local ScriptInfoUtils = require(script.Parent.Sc... | ---
-- @module LoaderUtils
-- @author Quenty
local loader = script.Parent
local BounceTemplateUtils = require(script.Parent.BounceTemplateUtils)
local GroupInfoUtils = require(script.Parent.GroupInfoUtils)
local PackageInfoUtils = require(script.Parent.PackageInfoUtils)
local ScriptInfoUtils = require(script.Parent.Sc... | fix: Ensure loader injects itself | fix: Ensure loader injects itself
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
a9e96868ef8302fc7f4743b32cc1d362f5f6d473 | hostinfo/init.lua | hostinfo/init.lua | --[[
Copyright 2014 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | --[[
Copyright 2014 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | fix(hostinfo/init): Only populate the HOST_INFO_TYPES array with types valid on the host OS. This is sent down to ele for get types. Solves issue #583 | fix(hostinfo/init): Only populate the HOST_INFO_TYPES array with types valid on the host OS. This is sent down to ele for get types. Solves issue #583
| Lua | apache-2.0 | virgo-agent-toolkit/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent |
dc22370cf1092ed7043d1cc1cda3ab0ec34bc91c | frontend/ui/geometry.lua | frontend/ui/geometry.lua | --[[
2D Geometry utilities
all of these apply to full rectangles { x = ..., y = ..., w = ..., h = ... }
some behaviour is defined for points { x = ..., y = ... }
some behaviour is defined for dimensions { w = ..., h = ... }
just use it on simple tables that have x, y and/or w, h
or define your own types using this a... | --[[
2D Geometry utilities
all of these apply to full rectangles { x = ..., y = ..., w = ..., h = ... }
some behaviour is defined for points { x = ..., y = ... }
some behaviour is defined for dimensions { w = ..., h = ... }
just use it on simple tables that have x, y and/or w, h
or define your own types using this a... | bugfix: intersected geom should be initiated with a fresh copy of self | bugfix: intersected geom should be initiated with a fresh copy of self
| Lua | agpl-3.0 | Hzj-jie/koreader,NiLuJe/koreader-base,apletnev/koreader-base,houqp/koreader-base,koreader/koreader-base,houqp/koreader-base,frankyifei/koreader-base,apletnev/koreader-base,robert00s/koreader,Frenzie/koreader-base,NiLuJe/koreader-base,Frenzie/koreader-base,chrox/koreader,ashang/koreader,NiLuJe/koreader,koreader/koreader... |
af0ab62bac717a76b883531ba257e52d5c41322c | util/dataforms.lua | util/dataforms.lua |
module "dataforms"
local xmlns_forms = 'jabber:x:data';
local form_t = {};
local form_mt = { __index = form_t };
function new(layout)
return setmetatable(layout, form_mt);
end
local form_x_attr = { xmlns = xmlns_forms };
function form_t.form(layout, data)
local form = st.tag("x", form_x_attr);
for n, field in ... | local setmetatable = setmetatable;
local pairs, ipairs = pairs, ipairs;
local st = require "util.stanza";
module "dataforms"
local xmlns_forms = 'jabber:x:data';
local form_t = {};
local form_mt = { __index = form_t };
function new(layout)
return setmetatable(layout, form_mt);
end
local form_x_attr = { xmlns = xm... | util.dataforms: Fixed to actually work, mostly | util.dataforms: Fixed to actually work, mostly
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
bcf740199b94d728e9852279d53a3fb5c3042751 | src/http/adapters/nginx/base.lua | src/http/adapters/nginx/base.lua | local mixin = require 'core.mixin'
local Request = require 'http.request'
local ResponseWriter = require 'http.response'
local json_decode
do
local json = require 'core.encoding.json'
json_decode = json.decode
end
mixin(ResponseWriter, {
get_status_code = function(self)
return self.ngx.status
... | local mixin = require 'core.mixin'
local Request = require 'http.request'
local ResponseWriter = require 'http.response'
local json_decode
do
local json = require 'core.encoding.json'
json_decode = json.decode
end
mixin(ResponseWriter, {
get_status_code = function(self)
return self.ngx.status
... | Fixed json content type check in parse body of nginx request adapter. | Fixed json content type check in parse body of nginx request adapter.
| Lua | mit | akornatskyy/lucid |
d65f4bb1ca63f045cca64d48d233e5ca2a7b9625 | test/dev-app/controllers/test.lua | test/dev-app/controllers/test.lua | local session = require "sailor.session"
local validation = require "valua"
local form = require "sailor.form"
local test = {}
function test.index(page)
local stringVariable = 'this variable is being passed from a controller to a view!'
local anotherVar = 2342 -- this one too! \o/
page:write("Here we ar... | local session = require "sailor.session"
local validation = require "valua"
local form = require "sailor.form"
local sailor = require "sailor"
local test = {}
function test.index(page)
local stringVariable = 'this variable is being passed from a controller to a view!'
local anotherVar = 2342 -- this one too! \o/... | Fixing require of sailor | Fixing require of sailor
| Lua | mit | mpeterv/sailor,noname007/sailor,jeary/sailor,sailorproject/sailor,felipedaragon/sailor,ignacio/sailor,Etiene/sailor,mpeterv/sailor,Etiene/sailor,felipedaragon/sailor,ignacio/sailor |
ad66c0bc257bea3476e279d815f36b9eb231a887 | projects/premake5.lua | projects/premake5.lua | newoption({
trigger = "gmcommon",
description = "Sets the path to the garrysmod_common (https://bitbucket.org/danielga/garrysmod_common) directory",
value = "path to garrysmod_common dir"
})
local gmcommon = _OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON")
if gmcommon == nil then
error("you didn't provide a path... | newoption({
trigger = "gmcommon",
description = "Sets the path to the garrysmod_common (https://bitbucket.org/danielga/garrysmod_common) directory",
value = "path to garrysmod_common dir"
})
local gmcommon = _OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON")
if gmcommon == nil then
error("you didn't provide a path... | Further testing of fixes. | Further testing of fixes.
This time, reordered links according to luasec makefile.
| Lua | bsd-3-clause | danielga/gmod_luasec |
4a6c8223a06325e0286ca4d7f79e954565d77828 | xmake/core/main.lua | xmake/core/main.lua | --!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... | --!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... | fix show help with theme | fix show help with theme
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
a8c18287863826467f2fdc6666f89b63b7b9e391 | lualib/skynet/sharetable.lua | lualib/skynet/sharetable.lua | local skynet = require "skynet"
local service = require "skynet.service"
local core = require "skynet.sharetable.core"
local function sharetable_service()
local skynet = require "skynet"
local core = require "skynet.sharetable.core"
local matrix = {} -- all the matrix
local files = {} -- filename : matrix
local ... | local skynet = require "skynet"
local service = require "skynet.service"
local core = require "skynet.sharetable.core"
local function sharetable_service()
local skynet = require "skynet"
local core = require "skynet.sharetable.core"
local matrix = {} -- all the matrix
local files = {} -- filename : matrix
local ... | fix #1011 | fix #1011
| Lua | mit | xcjmine/skynet,xcjmine/skynet,icetoggle/skynet,cloudwu/skynet,xjdrew/skynet,hongling0/skynet,cloudwu/skynet,wangyi0226/skynet,JiessieDawn/skynet,ag6ag/skynet,pigparadise/skynet,sanikoyes/skynet,xcjmine/skynet,icetoggle/skynet,pigparadise/skynet,jxlczjp77/skynet,icetoggle/skynet,jxlczjp77/skynet,JiessieDawn/skynet,hongl... |
da0fe31443df586198c1265d08deb5458017e664 | mods/boats/init.lua | mods/boats/init.lua | --
-- Helper functions
--
local function is_water(pos)
local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, "water") ~= 0
end
local function get_sign(i)
if i == 0 then
return 0
else
return i / math.abs(i)
end
end
local function get_velocity(v, yaw, y)
local x = -math.sin(yaw) * v
lo... | --
-- Helper functions
--
local function is_water(pos)
local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, "water") ~= 0
end
local function get_sign(i)
if i == 0 then
return 0
else
return i / math.abs(i)
end
end
local function get_velocity(v, yaw, y)
local x = -math.sin(yaw) * v
lo... | Boats: Raise collisionbox top surface to fix boat behaviour | Boats: Raise collisionbox top surface to fix boat behaviour
Lowering the top surface to be level with the boat top somehow
causes the boat to fall through world if underwater. Revert to
previous position that is needed for correct behaviour
| Lua | lgpl-2.1 | evrooije/beerarchy,evrooije/beerarchy,evrooije/beerarchy |
f868b9d4be8987adc3b5dc43c69ff33d36d49c62 | modules/hmi_connection.lua | modules/hmi_connection.lua | local json = require("json")
local module = { mt = { __index = { } } }
function module.mt.__index:Connect()
self.connection:Connect()
end
local resultCodes =
{
SUCCESS = 0,
UNSUPPORTED_REQUEST = 1,
UNSUPPORTED_RESOURCE = 2,
DISALLOWED = 3,
REJECTED = 4,
ABORTED = 5,
IGNORED = 6,
RETRY = 7,
IN_USE ... | local json = require("json")
local module = { mt = { __index = { } } }
function module.mt.__index:Connect()
self.connection:Connect()
end
local resultCodes =
{
SUCCESS = 0,
UNSUPPORTED_REQUEST = 1,
UNSUPPORTED_RESOURCE = 2,
DISALLOWED = 3,
REJECTED = 4,
ABORTED = 5,
IGNORED = 6,
RETRY = 7,
IN_USE ... | Fix SendResponse in case params come nil | Fix SendResponse in case params come nil
If params value is nil then it should be skipped
| Lua | bsd-3-clause | aderiabin/sdl_atf,aderiabin/sdl_atf,aderiabin/sdl_atf |
f26e62dcc00cc340ffd3cc0b4cb4f676c63b53e5 | pairwise/src/lua/example.lua | pairwise/src/lua/example.lua |
-- This is an example of how an "all pairs" run could be achieved with
-- Lua script.
-- The pairwise executable automatically looks for a coroutine named
-- "pair_generator" in any Lua script, so by so naming the coroutine
-- you don't need to specify a different function name.
-- You can define arbitrary globals t... |
-- This is an example of how an "all pairs" run could be achieved with
-- Lua script.
-- The pairwise executable automatically looks for a coroutine named
-- "pair_generator" in any Lua script, so by so naming the coroutine
-- you don't need to specify a different function name.
-- The 'pairwise' executable looks fo... | fixed one_versus_all Lua example | fixed one_versus_all Lua example
| Lua | mit | IlyaLab/kramtools,IlyaLab/kramtools,IlyaLab/kramtools,IlyaLab/kramtools,IlyaLab/kramtools,IlyaLab/kramtools |
84949253a57b43d510f572903c85cc06171205c7 | src/premake4.lua | src/premake4.lua | -- Procedurally Generated Transitional Audio Build --
target_dir = path.getabsolute("../bin/") .. "/"
local sdks_dir = (path.getabsolute("../../SDKs/") .. "/")
local ogg_dir = (sdks_dir .. "libogg-1.3.2/")
local vorbis_dir = (sdks_dir .. "libvorbis-1.3.4/")
local oalwrapper_dir = (sdks_dir .. "OALWrapper/")
local oal... | -- Procedurally Generated Transitional Audio Build --
target_dir = path.getabsolute("../bin/") .. "/"
local sdks_dir = (path.getabsolute("../../SDKs/") .. "/")
local ogg_dir = (sdks_dir .. "libogg-1.3.2/")
local vorbis_dir = (sdks_dir .. "libvorbis-1.3.4/")
local oalwrapper_dir = (sdks_dir .. "OALWrapper/")
local oal... | Fixed premake script for OSX. | Fixed premake script for OSX.
| Lua | mit | PGTA/PGTA,PGTA/PGTA,PGTA/PGTA |
d7b87e6a3e955d335c1ad9d7581a1fe3bb6e3538 | tests/sample.lua | tests/sample.lua | local cutil = require "cutil"
function filter_spec_chars(s)
local ss = {}
for k = 1, #s do
local c = string.byte(s,k)
if not c then break end
if c<192 then
if (c>=48 and c<=57) or (c>= 65 and c<=90) or (c>=97 and c<=122) then
table.insert(ss, string.char(c))
end
elseif c<224 then
k =... | local cutil = require "cutil"
function filter_spec_chars(s)
local ss = {}
local k = 1
while true do
if k > #s then break end
local c = string.byte(s,k)
if not c then break end
if c<192 then
if (c>=48 and c<=57) or (c>= 65 and c<=90) or (c>=97 and c<=122) then
table.insert(ss, string.char(c... | bugfix | bugfix
temporary variables ( k ) do not work | Lua | mit | chenweiqi/lua-cutil |
fa40d4c925f47780de0d032c6acf5c1df0abb1c8 | conf/srv_router.lua | conf/srv_router.lua | local resolver = require "resty.dns.resolver"
function abort(reason, code)
ngx.status = code
ngx.say(reason)
return code
end
function log(msg)
ngx.log(ngx.ERR, msg, "\n")
end
-- log("Checking if it's in the " .. #domains .." known domains")
-- for k,domain in pairs(domains) do
-- log(" - " .... | local resolver = require "resty.dns.resolver"
function abort(reason, code)
ngx.status = code
ngx.say(reason)
return code
end
function log(msg)
ngx.log(ngx.ERR, msg, "\n")
end
-- log("Checking if it's in the " .. #domains .." known domains")
-- for k,domain in pairs(domains) do
-- log(" - " .... | Fix vlipco/srv-router#4 | Fix vlipco/srv-router#4
| Lua | mit | bankofse/proxy |
25bc09033220b7cfdef98ceca596ed0b1285eaa7 | vrp/lib/utils.lua | vrp/lib/utils.lua | -- https://github.com/ImagicTheCat/vRP
-- MIT license (see LICENSE or vrp/vRPShared.lua)
-- This file define global tools required by vRP and vRP extensions.
-- side detection
SERVER = IsDuplicityVersion()
CLIENT = not SERVER
local modules = {}
-- load a lua resource file as module (for a specific side)
-- rsc: res... | -- https://github.com/ImagicTheCat/vRP
-- MIT license (see LICENSE or vrp/vRPShared.lua)
-- This file define global tools required by vRP and vRP extensions.
-- side detection
SERVER = IsDuplicityVersion()
CLIENT = not SERVER
local modules = {}
-- load a lua resource file as module (for a specific side)
-- rsc: res... | Improve/fix module function. | Improve/fix module function.
| Lua | mit | ImagicTheCat/vRP,ImagicTheCat/vRP |
2f47f94d1a79c15ee14ff77dcd8df609544353ed | src/plugins/core/preferences/panels/menubar.lua | src/plugins/core/preferences/panels/menubar.lua | --- === plugins.core.preferences.panels.menubar ===
---
--- Menubar Preferences Panel
--------------------------------------------------------------------------------
--
-- EXTENSIONS:
--
--------------------------------------------------------------------------------
local require = require
-------------------------... | --- === plugins.core.preferences.panels.menubar ===
---
--- Menubar Preferences Panel
--------------------------------------------------------------------------------
--
-- EXTENSIONS:
--
--------------------------------------------------------------------------------
local require = require
-------------------------... | #650 | #650
- Fixed @stickler-ci issues
| Lua | mit | fcpxhacks/fcpxhacks,CommandPost/CommandPost,CommandPost/CommandPost,fcpxhacks/fcpxhacks,CommandPost/CommandPost |
dbaddabf2b40ce2ff35066a75ea264c439c7cd44 | lunamark/reader/html.lua | lunamark/reader/html.lua | local htmlparser = require("lunamark.htmlparser")
local entities = require("lunamark.entities")
local function lookup_attr(node, name)
if node.attr then
for _,x in ipairs(t) do
if x.name == name then
return convert_entities(x.value)
end
end
end
end
local function convert_entities(s)
... | local htmlparser = require("lunamark.htmlparser")
local entities = require("lunamark.entities")
local function convert_entities(s)
return s:gsub("&#[Xx](%x+);", entities.hex_entity):gsub("&#(%d+);", entities.dec_entity):gsub("&(%a+);", entities.char_entity)
end
local function lookup_attr(node, name)
if node.attrs... | Fixed lookup_attr in html reader. | Fixed lookup_attr in html reader.
| Lua | mit | tst2005/lunamark,tst2005/lunamark,jgm/lunamark,jgm/lunamark,simoncozens/lunamark,tst2005/lunamark,simoncozens/lunamark,simoncozens/lunamark,jgm/lunamark |
792fdac116094300841f85fbce55636d874eae7e | module/util/groupids.lua | module/util/groupids.lua | --[[!
\file
\brief Es un módulo que permite crear grupos de ids y comprobar si una id
está en alguno de estos grupos. Los grupos pueden agruparse paara formar grupos
más complejos, con operadores de negación y or.
]]
loadModule("util/class");
loadModule("util/math/range");
loadModule("util/checkutils");
loadModul... | --[[!
\file
\brief Es un módulo que permite crear grupos de ids y comprobar si una id
está en alguno de estos grupos. Los grupos pueden agruparse paara formar grupos
más complejos, con operadores de negación y or.
]]
loadModule("util/class");
loadModule("util/math/range");
loadModule("util/checkutils");
loadModul... | Arreglado bug en el módulo util/groupids | Arreglado bug en el módulo util/groupids
| Lua | mit | morfeo642/mta_plr_server |
e473ad9d8e3f043ed28b13e8b77ea3e2a1b4a581 | src/lua-factory/sources/grl-lastfm-cover.lua | src/lua-factory/sources/grl-lastfm-cover.lua | --[[
* Copyright (C) 2015 Bastien Nocera.
*
* Contact: Bastien Nocera <hadess@hadess.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1 of
* the License, or (at yo... | --[[
* Copyright (C) 2015 Bastien Nocera.
*
* Contact: Bastien Nocera <hadess@hadess.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1 of
* the License, or (at yo... | Revert "lua-factory: port grl-lastfm-cover.lua to the new lua system" | Revert "lua-factory: port grl-lastfm-cover.lua to the new lua system"
This reverts commit fbb244ee962ddcf483dc4c6adec30de6c2616436.
But keeps grl.fetch callback as function instead of string
https://bugzilla.gnome.org/show_bug.cgi?id=763046
| Lua | lgpl-2.1 | GNOME/grilo-plugins,jasuarez/grilo-plugins,MikePetullo/grilo-plugins,MikePetullo/grilo-plugins,jasuarez/grilo-plugins,GNOME/grilo-plugins,grilofw/grilo-plugins,grilofw/grilo-plugins,MikePetullo/grilo-plugins |
9b35d6ace8284d29439ed56617efb5e07e61145b | packages/color-fonts.lua | packages/color-fonts.lua | local ot = SILE.require("core/opentype-parser")
SILE.shapers.harfbuzzWithColor = pl.class({
_base = SILE.shapers.harfbuzz,
shapeToken = function (self, str, options)
if not options.family then return {} end
local face = SILE.font.cache(options, SILE.shaper.getFace)
local font = ot.parseFont(... | local ot = SILE.require("core/opentype-parser")
SILE.shapers.harfbuzzWithColor = pl.class({
_base = SILE.shapers.harfbuzz,
shapeToken = function (self, str, options)
if not options.family then return {} end
local face = SILE.font.cache(options, SILE.shaper.getFace)
local font = ot.parseFont(... | fix(packages): Correctly handle color fonts on TTB pages | fix(packages): Correctly handle color fonts on TTB pages
I'm not sure if top-to-bottom was even supported way back in 2015, but
@khaledhosny didn't take it into account when implementing
`color-fonts.lua`.
This closes #1171.
| Lua | mit | alerque/sile,alerque/sile,alerque/sile,alerque/sile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.