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 |
|---|---|---|---|---|---|---|---|---|---|
0141ed07de34b89d5a709d1d33515292abfb07b3 | kong/db/migrations/core/007_140_to_200.lua | kong/db/migrations/core/007_140_to_200.lua | return {
postgres = {
up = [[
-- If migrating from 1.x, the "path_handling" column does not exist yet.
-- Create it with a default of 'v1' to fill existing rows, then change the default.
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "routes" ADD "path_handling" TEXT DEFAULT 'v1';
EX... | return {
postgres = {
up = [[
-- If migrating from 1.x, the "path_handling" column does not exist yet.
-- Create it with a default of 'v1' to fill existing rows, then change the default.
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "routes" ADD "path_handling" TEXT DEFAULT 'v1';
EX... | hotfix(db) avoid non-reentrant operation in C* migration | hotfix(db) avoid non-reentrant operation in C* migration
| Lua | apache-2.0 | Kong/kong,Kong/kong,Kong/kong |
11ff544594f4fceae45a885657921251ab7fa5d9 | deps/semver.lua | deps/semver.lua | exports.name = "creationix/semver"
exports.version = "1.0.2"
local parse, normalize, match
-- Make the module itself callable
setmetatable(exports, {
__call = function (_, ...)
return match(...)
end
})
function parse(version)
if not version then return end
return
assert(tonumber(string.match(version, "... | exports.name = "creationix/semver"
exports.version = "1.0.2"
local parse, normalize, match
-- Make the module itself callable
setmetatable(exports, {
__call = function (_, ...)
return match(...)
end
})
function parse(version)
if not version then return end
return
assert(tonumber(string.match(version, "... | fix the f==c | fix the f==c
| Lua | apache-2.0 | 1yvT0s/lit,lduboeuf/lit,zhaozg/lit,kidaa/lit,DBarney/lit,kaustavha/lit,luvit/lit,james2doyle/lit,squeek502/lit |
8c726c0bc3299d709f33a5285d5163aba8d1f169 | agents/monitoring/tests/check/apache.lua | agents/monitoring/tests/check/apache.lua | local async = require('async')
local fs = require('fs')
local testUtil = require('monitoring/default/util/test')
local path = require('path')
local fmt = require('string').format
local ApacheCheck = require('monitoring/default/check').ApacheCheck
local PORT = 32321
local HOST = '127.0.0.1'
local exports = {}
export... | local async = require('async')
local fs = require('fs')
local testUtil = require('monitoring/default/util/test')
local path = require('path')
local fmt = require('string').format
local ApacheCheck = require('monitoring/default/check').ApacheCheck
local PORT = 32321
local HOST = '127.0.0.1'
local exports = {}
export... | fix pathing for win32 porting team | fix pathing for win32 porting team
| Lua | apache-2.0 | kans/zirgo,kans/zirgo,kans/zirgo |
b06cf642f861f9687b8017325289ccab06d0e083 | examples/gridify.lua | examples/gridify.lua | --
-- draw some grids
--
screen_width = WIDTH
screen_height = HEIGHT
screen_w_center = screen_width / 2
screen_h_center = screen_height / 2
colors = {}
colors = { {r=255, g=0, b=255, a=1},
{r=0, g=0, b=255, a=1},
{r=255, g=0, b=0, a=1},
{r=0, g=255, b=0, a... | --
-- draw some grids
--
screen_width = WIDTH
screen_height = HEIGHT
screen_w_center = screen_width / 2
screen_h_center = screen_height / 2
colors = {}
colors = { {r=255, g=0, b=255, a=1},
{r=0, g=0, b=255, a=1},
{r=255, g=0, b=0, a=1},
{r=0, g=255, b=0, a... | Fixup of gridifuy.lua sample. | Fixup of gridifuy.lua sample.
| Lua | bsd-2-clause | seclorum/load81,seclorum/load81,seclorum/load81,seclorum/load81,seclorum/load81 |
88061b323e756cb2a3d49ab300dc802a82ec1f2e | frontend/gettext.lua | frontend/gettext.lua | local DEBUG = require("dbg")
local GetText = {
translation = {},
current_lang = "C",
dirname = "l10n",
textdomain = "koreader"
}
local GetText_mt = {
__index = {}
}
function GetText_mt.__call(gettext, string)
return gettext.translation[string] or string
end
local function c_escape(what)
... | local DEBUG = require("dbg")
local GetText = {
translation = {},
current_lang = "C",
dirname = "l10n",
textdomain = "koreader"
}
local GetText_mt = {
__index = {}
}
function GetText_mt.__call(gettext, string)
return gettext.translation[string] or string
end
local function c_escape(what)
... | strip encoding suffix in locale name like zh_CN.utf8 So that we can automatically change to language defined in the LANGUAGE or LANG env variable. | strip encoding suffix in locale name like zh_CN.utf8
So that we can automatically change to language defined in
the LANGUAGE or LANG env variable.
| Lua | agpl-3.0 | noname007/koreader,frankyifei/koreader,mwoz123/koreader,robert00s/koreader,koreader/koreader,NiLuJe/koreader,Frenzie/koreader,Markismus/koreader,lgeek/koreader,NiLuJe/koreader,chrox/koreader,apletnev/koreader,koreader/koreader,poire-z/koreader,ashhher3/koreader,houqp/koreader,ashang/koreader,Hzj-jie/koreader,NickSavage... |
9aebe9c6d0e29ba7d1c4c7aeba48826eaa0019a6 | mods/soundset/init.lua | mods/soundset/init.lua | minetest.log("action","[mod soundset] Loading...")
soundset = {}
soundset.file = minetest.get_worldpath() .. "/sounds_config.txt"
soundset.gainplayers = {}
soundset.tmp = {}
local function save_sounds_config()
local input = io.open(soundset.file, "w")
if input then
input:write(minetest.serialize(soundset.gainpla... | minetest.log("action","[mod soundset] Loading...")
soundset = {}
soundset.file = minetest.get_worldpath() .. "/sounds_config.txt"
soundset.gainplayers = {}
soundset.tmp = {}
local function save_sounds_config()
local input = io.open(soundset.file, "w")
if input then
input:write(minetest.serialize(soundset.gainpla... | try to fix error https://github.com/MinetestForFun/server-minetestforfun-creative/issues/34 | try to fix error https://github.com/MinetestForFun/server-minetestforfun-creative/issues/34
| Lua | unlicense | MinetestForFun/server-minetestforfun-creative,MinetestForFun/server-minetestforfun-creative,MinetestForFun/server-minetestforfun-creative |
a8ba7f80b3a302860e9a936f132800798258f6f7 | vrp/modules/money.lua | vrp/modules/money.lua | local lang = vRP.lang
-- Money module, wallet/bank API
-- The money is managed with direct SQL requests to prevent most potential value corruptions
-- the wallet empty itself when respawning (after death)
MySQL.createCommand("vRP/money_tables", [[
CREATE TABLE IF NOT EXISTS vrp_user_moneys(
user_id INTEGER,
walle... | local lang = vRP.lang
-- Money module, wallet/bank API
-- The money is managed with direct SQL requests to prevent most potential value corruptions
-- the wallet empty itself when respawning (after death)
MySQL.createCommand("vRP/money_tables", [[
CREATE TABLE IF NOT EXISTS vrp_user_moneys(
user_id INTEGER,
walle... | Money save more robust fixe. | Money save more robust fixe.
| Lua | mit | ImagicTheCat/vRP,ImagicTheCat/vRP |
f8c748759a3e471eb69d288ea43818ccbdfe6584 | lua/geohash.lua | lua/geohash.lua | local GeoHash = {}
--[[
-- Private Attributes
]]--
local _map = {}
_map['0'] = '00000'
_map['1'] = '00001'
_map['2'] = '00010'
_map['3'] = '00011'
_map['4'] = '00100'
_map['5'] = '00101'
_map['6'] = '00110'
_map['7'] = '00111'
_map['8'] = '01000'
_map['9'] =... | local GeoHash = {}
--[[
-- Private Attributes
]]--
local _map = {}
_map['0'] = '00000'
_map['1'] = '00001'
_map['2'] = '00010'
_map['3'] = '00011'
_map['4'] = '00100'
_map['5'] = '00101'
_map['6'] = '00110'
_map['7'] = '00111'
_map['8'] = '01000'
_map['9'] =... | Fixed issue with precision of digits and hash length | Fixed issue with precision of digits and hash length
If precision isn't specified it is set to the longest number of decimals
in either latitude or longitude specified.
| Lua | mit | dauer/geohash,dauer/geohash,irr/geohash,irr/geohash |
481d86366753a35d900ac52714c24184657a9a7a | libs/weblit-static.lua | libs/weblit-static.lua | exports.name = "creationix/weblit-static"
exports.version = "0.3.2"
exports.dependencies = {
"creationix/mime@0.1.2",
"creationix/hybrid-fs@0.1.1",
}
exports.description = "The auto-headers middleware helps Weblit apps implement proper HTTP semantics"
exports.tags = {"weblit", "middleware", "http"}
exports.license ... | exports.name = "creationix/weblit-static"
exports.version = "0.3.3"
exports.dependencies = {
"creationix/mime@0.1.2",
"creationix/hybrid-fs@0.1.1",
}
exports.description = "The auto-headers middleware helps Weblit apps implement proper HTTP semantics"
exports.tags = {"weblit", "middleware", "http"}
exports.license ... | weblit-static@0.3.3 - fix autoindex path | weblit-static@0.3.3 - fix autoindex path
| Lua | mit | zhaozg/weblit |
ae9fc21ddb2f81a4a7ce1647bf7a66ccf6daa5fd | nvim/lua/plugins/lsp.lua | nvim/lua/plugins/lsp.lua | ---
-- Global Config
---
local lspconfig = require("lspconfig")
local lsp_defaults = {
flags = {
debounce_text_changes = 150,
},
capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()),
on_attach = function(client, bufnr)
vim.api.nvim_exec_autocmds("User", { patt... | ---
-- Global Config
---
local lspconfig = require("lspconfig")
local lsp_defaults = {
flags = {
debounce_text_changes = 150,
},
capabilities = require("cmp_nvim_lsp").default_capabilities(),
on_attach = function(client, bufnr)
vim.api.nvim_exec_autocmds("User", { pattern = "LspAttached" })
end,
}
lspconfig.... | fix the deprecation issue raised by cmp-nvim-lsp | fix the deprecation issue raised by cmp-nvim-lsp
| Lua | mit | zhyu/dotfiles |
87e6336d3de64a2be25074d90874674b3c4bfa0a | pud/ui/TextEntry.lua | pud/ui/TextEntry.lua | local Class = require 'lib.hump.class'
local Text = getClass 'pud.ui.Text'
local KeyboardEvent = getClass 'pud.event.KeyboardEvent'
local string_len = string.len
local string_sub = string.sub
local format = string.format
-- TextEntry
-- A text frame that gathers keyboard input.
local TextEntry = Class{name='TextEntry... | local Class = require 'lib.hump.class'
local Text = getClass 'pud.ui.Text'
local KeyboardEvent = getClass 'pud.event.KeyboardEvent'
local string_len = string.len
local string_sub = string.sub
local format = string.format
-- TextEntry
-- A text frame that gathers keyboard input.
local TextEntry = Class{name='TextEntry... | fix backspace deleting newline + char (now just newline) | fix backspace deleting newline + char (now just newline)
| Lua | mit | scottcs/wyx |
26bcea8f3f9e17d9d8b58c36f7ac13f1bcb10d42 | src/apps/rate_limiter/rate_limiter.lua | src/apps/rate_limiter/rate_limiter.lua | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local app = require("core.app")
local link = require("core.link")
local config = require("core.config")
local packet = require("core.packet")
local timer = require("core.timer")
local counter = require("core.cou... | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local app = require("core.app")
local link = require("core.link")
local config = require("core.config")
local packet = require("core.packet")
local timer = require("core.timer")
local counter = require("core.cou... | apps.rate_limiter: fix selftest | apps.rate_limiter: fix selftest
| Lua | apache-2.0 | eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb |
0edf1cca29b0e19538e43902b432a765dfb0a72a | frontend/ui/language.lua | frontend/ui/language.lua | -- high level wrapper module for gettext
local UIManager = require("ui/uimanager")
local InfoMessage = require("ui/widget/infomessage")
local _ = require("gettext")
local Language = {}
function Language:changeLanguage(lang_locale)
_.changeLang(lang_locale)
G_reader_settings:saveSetting("language", lang_local... | -- high level wrapper module for gettext
local UIManager = require("ui/uimanager")
local InfoMessage = require("ui/widget/infomessage")
local _ = require("gettext")
local Language = {}
function Language:changeLanguage(lang_locale)
_.changeLang(lang_locale)
G_reader_settings:saveSetting("language", lang_local... | Minor fix in the sorting in language.lua | Minor fix in the sorting in language.lua
See https://github.com/koreader/koreader/pull/2662#issuecomment-287855474 | Lua | agpl-3.0 | NiLuJe/koreader,Markismus/koreader,koreader/koreader,Frenzie/koreader,lgeek/koreader,mihailim/koreader,mwoz123/koreader,NiLuJe/koreader,Hzj-jie/koreader,pazos/koreader,houqp/koreader,poire-z/koreader,apletnev/koreader,Frenzie/koreader,robert00s/koreader,poire-z/koreader,koreader/koreader |
38c74fda27049d38dd045809e3b655aa17dfb66d | lua/application.lua | lua/application.lua | require "variables"
globalHeaders = "Host: " .. apiHost .. "\r\nAuthorization: Bearer " .. auth_token .. "\r\nContent-Type: application/json\r\n"
for i,sensor in pairs(sensors) do
gpio.mode(sensor.gpioPin, gpio.INPUT, gpio.PULLUP)
sensor.state = gpio.read(sensor.gpioPin)
gpio.trig(sensor.gpioPin, "both", funct... | require "variables"
globalHeaders = "Host: " .. apiHost .. "\r\nAuthorization: Bearer " .. auth_token .. "\r\nContent-Type: application/json\r\n"
-- Iterate through each configured sensor (from variables.lua) and set up trigger on its corresponding pin
for i,sensor in pairs(sensors) do
gpio.mode(sensor.gpioPin, gpi... | fix queueing bug; add some explanitory comments | fix queueing bug; add some explanitory comments
| Lua | mit | heythisisnate/nodemcu-smartthings |
6f7b7fb6466541e3f9d5c40b96bce8257b89474e | lua/plugins/dap.lua | lua/plugins/dap.lua | local exepath = require'utils.files'.exepath
local load_module = require'utils.helpers'.load_module
local getcwd = require'utils.files'.getcwd
local dap = load_module'dap'
if not dap then
return false
end
local set_autocmd = require'neovim.autocmds'.set_autocmd
local set_command = require'neovim.command... | local exepath = require'utils.files'.exepath
local load_module = require'utils.helpers'.load_module
local getcwd = require'utils.files'.getcwd
local dap = load_module'dap'
if not dap then
return false
end
local set_autocmd = require'neovim.autocmds'.set_autocmd
local set_command = require'neovim.command... | fix: Dap map conflict | fix: Dap map conflict
| Lua | mit | Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim |
e2e016f251d281c9f83b8ad116c54a3b3815a7b6 | hammerspoon/smart_modifier_keys.lua | hammerspoon/smart_modifier_keys.lua | -- Make the modifiers keys smarter:
-- Tap ctrl -> esc.
-- Tap shift -> switch input method.
-- Whether ctrl and shift is being pressed alone.
local ctrlPressed = 0
local shiftPressed = 0
hs.eventtap.new({hs.eventtap.event.types.flagsChanged}, function(e)
local modifiers = e:getFlags()
local events_to_post = ... | -- Make the modifiers keys smarter:
-- Tap ctrl -> esc.
-- Tap shift -> switch input method.
-- Whether ctrl and shift is being pressed alone.
local ctrlPressed = false
local shiftPressed = false
local prevModifiers = {}
local log = hs.logger.new('smart_modifier_keys','debug')
hs.eventtap.new({hs.eventtap.event.typ... | [hs] Fix smart_modifier_keys | [hs] Fix smart_modifier_keys
| Lua | mit | raulchen/dotfiles,raulchen/dotfiles |
3bf73017c5ff25dcef26e7be87b0872e79ba54ef | src/main.lua | src/main.lua | push = require('lib/push/push')
lt = require('lib/lovetoys/lovetoys')
lt.initialize({
globals = true,
debug = true
})
debug = false
State = require('lib/State')
Stack = require('lib/StackHelper')
Vector = require('lib/vector')
local Resources = require('lib/Resources')
require('lib/tables')
require("component... | push = require('lib/push/push')
lt = require('lib/lovetoys/lovetoys')
lt.initialize({
globals = true,
debug = true
})
debug = false
State = require('lib/State')
Stack = require('lib/StackHelper')
Vector = require('lib/vector')
local Resources = require('lib/Resources')
require('lib/tables')
require("component... | Fix image names | Fix image names
| Lua | mit | alexd2580/igjam2016,alexd2580/igjam2016 |
702479c177411cf6fc7d5e3b10c69854615281c8 | mod_register_json/mod_register_json.lua | mod_register_json/mod_register_json.lua | -- Expose a simple servlet to handle user registrations from web pages
-- via JSON.
--
-- A Good chunk of the code is from mod_data_access.lua by Kim Alvefur
-- aka Zash.
local usermanager = require "core.usermanager";
local b64_decode = require "util.encodings".base64.decode;
local json_decode = require "util.json".d... | -- Expose a simple servlet to handle user registrations from web pages
-- via JSON.
--
-- A Good chunk of the code is from mod_data_access.lua by Kim Alvefur
-- aka Zash.
local jid_prep = require "util.jid".prep;
local jid_split = require "util.jid".split;
local usermanager = require "core.usermanager";
local b64_deco... | mod_register_json: Failed at JSON successful decode check, fixed with a code refactor. | mod_register_json: Failed at JSON successful decode check, fixed with a code refactor.
| Lua | mit | mardraze/prosody-modules,cryptotoad/prosody-modules,1st8/prosody-modules,vince06fr/prosody-modules,amenophis1er/prosody-modules,asdofindia/prosody-modules,olax/prosody-modules,mmusial/prosody-modules,vince06fr/prosody-modules,cryptotoad/prosody-modules,NSAKEY/prosody-modules,drdownload/prosody-modules,heysion/prosody-m... |
61d57b4b55c2a942b11b66047e05eba36f00c6c4 | server/scene-src/db.lua | server/scene-src/db.lua | local core = require "silly.core"
local env = require "silly.env"
local zproto = require "zproto"
local property = require "protocol.property"
local redis = require "redis"
local format = string.format
local tunpack = table.unpack
local M = {}
local dbproto = zproto:parse [[
idcount {
.id:integer 1
.count:intege... | local core = require "silly.core"
local env = require "silly.env"
local zproto = require "zproto"
local property = require "protocol.property"
local redis = require "redis"
local format = string.format
local tunpack = table.unpack
local M = {}
local dbproto = zproto:parse [[
idcount {
.id:integer 1
.count:intege... | bugfix: scene-src/db.lua incorrect dirty_flag | bugfix: scene-src/db.lua incorrect dirty_flag
| Lua | mit | findstr/mmorpg-demo,findstr/mmorpg-demo |
c95f54dc56b7fac9143291bc816d99abb5f48859 | lua/entities/gmod_wire_cameracontroller.lua | lua/entities/gmod_wire_cameracontroller.lua | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Camera Controller"
ENT.WireDebugName = "Camera Controller"
if CLIENT then return end -- No more client
function ENT:Initialize()
self.BaseClass.Initialize(self)
self.Outputs = WireLib.CreateOutputs( self, { "On", "X", "Y", "Z", "XYZ [... | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Camera Controller"
ENT.WireDebugName = "Camera Controller"
if CLIENT then return end -- No more client
function ENT:Initialize()
self.BaseClass.Initialize(self)
self.Outputs = WireLib.CreateOutputs( self, { "On", "X", "Y", "Z", "XYZ [... | Cam Controller: Stopped changing FOV if Zoom hasn't been set Fixes #437 | Cam Controller: Stopped changing FOV if Zoom hasn't been set
Fixes #437
| Lua | apache-2.0 | CaptainPRICE/wire,wiremod/wire,NezzKryptic/Wire,mitterdoo/wire,plinkopenguin/wiremod,rafradek/wire,dvdvideo1234/wire,bigdogmat/wire,immibis/wiremod,Python1320/wire,thegrb93/wire,notcake/wire,sammyt291/wire,garrysmodlua/wire,mms92/wire,Grocel/wire |
533b3872ff3deec820ee7f10da913b2adc46f080 | scen_edit/view/fields/numeric_field.lua | scen_edit/view/fields/numeric_field.lua | SCEN_EDIT.Include(SCEN_EDIT_VIEW_FIELDS_DIR .. "string_field.lua")
NumericField = StringField:extends{}
function NumericField:Update(source)
local v = string.format(self.format, self.value)
if source ~= self.editBox and not self.editBox.state.focused then
self.editBox:SetText(v)
end
if source ~... | SCEN_EDIT.Include(SCEN_EDIT_VIEW_FIELDS_DIR .. "string_field.lua")
NumericField = StringField:extends{}
function NumericField:Update(source)
local v = string.format(self.format, self.value)
if source ~= self.editBox and not self.editBox.state.focused then
self.editBox:SetText(v)
end
if source ~... | fix numeric field editbox value not being converted to text on init (causing crash); fix https://github.com/Spring-SpringBoard/SpringBoard-Core/issues/111 | fix numeric field editbox value not being converted to text on init (causing crash); fix https://github.com/Spring-SpringBoard/SpringBoard-Core/issues/111
| Lua | mit | Spring-SpringBoard/SpringBoard-Core,Spring-SpringBoard/SpringBoard-Core |
ae4dc14c8133bdce302282ac649d4060adc1c413 | game/scripts/vscripts/heroes/hero_saitama/limiter.lua | game/scripts/vscripts/heroes/hero_saitama/limiter.lua | LinkLuaModifier("modifier_saitama_limiter_autocast", "heroes/hero_saitama/limiter.lua", LUA_MODIFIER_MOTION_NONE)
saitama_limiter = class({
GetIntrinsicModifierName = function() return "modifier_saitama_limiter_autocast" end,
})
function saitama_limiter:GetManaCost()
return self:GetCaster():GetMaxMana() * self:GetS... | LinkLuaModifier("modifier_saitama_limiter_autocast", "heroes/hero_saitama/limiter.lua", LUA_MODIFIER_MOTION_NONE)
saitama_limiter = class({
GetIntrinsicModifierName = function() return "modifier_saitama_limiter_autocast" end,
})
function saitama_limiter:GetManaCost()
return self:GetCaster():GetMaxMana() * self:GetS... | fix(abilities): Saitama - Limiter autocast cancels abilities in cast phase (#169) | fix(abilities): Saitama - Limiter autocast cancels abilities in cast phase (#169)
| Lua | mit | ark120202/aabs |
ad0993e72f71f4241427f9a85335e1a9a2e0b4f5 | modules/vim/installed-config/plugin/cmp.lua | modules/vim/installed-config/plugin/cmp.lua | local cmp = require'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scrol... | local cmp = require'cmp'
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<C-b>'] = cmp.map... | Fix crash in cmp.lua | Fix crash in cmp.lua
| Lua | mit | justinhoward/dotfiles,justinhoward/dotfiles |
283e4c33f4b54f0553b8b5374df616c866738475 | files/default/balancer.lua | files/default/balancer.lua | -- Note: This really shouldn't be delivered via a chef cookbook
-- this is a basic example meant for learning purposes
local _M = {}
local json = require "cjson"
local http = require "resty.http"
local upstreams = {}
local state = {}
local refresh_interval = 30
-- private
local function refresh(premature)
if prem... | -- Note: This really shouldn't be delivered via a chef cookbook
-- this is a basic example meant for learning purposes
local _M = {}
local json = require "cjson"
local http = require "resty.http"
local upstreams = {}
local state = {}
local refresh_interval = 30
-- private
local function refresh(premature)
if prem... | actually fix the issue | actually fix the issue
| Lua | apache-2.0 | sigil66/nginx-consul-cookbook,sigil66/nginx-consul-cookbook |
f3663c636bc34653606ff2469b86b9254725962d | src/CppParser/premake5.lua | src/CppParser/premake5.lua | clang_msvc_flags =
{
"/wd4146", "/wd4244", "/wd4800", "/wd4345",
"/wd4355", "/wd4996", "/wd4624", "/wd4291",
"/wd4251",
"/wd4141", -- 'inline' : used more than once
}
if not (string.starts(action, "vs") and not os.is("windows")) then
project "CppSharp.CppParser"
kind "SharedLib"
language "C++"
SetupN... | clang_msvc_flags =
{
"/wd4146", "/wd4244", "/wd4800", "/wd4345",
"/wd4355", "/wd4996", "/wd4624", "/wd4291",
"/wd4251",
"/wd4141", -- 'inline' : used more than once
}
if not (string.starts(action, "vs") and not os.is("windows")) then
project "CppSharp.CppParser"
kind "SharedLib"
language "C++"
SetupN... | Force the pre-C++11 ABI when compiling the parser library on Linux platforms. | Force the pre-C++11 ABI when compiling the parser library on Linux platforms.
Hopefully fixes a long-standing compatibility issue caused by the C++11 ABI switch on GCC5.
Fixes https://github.com/mono/CppSharp/issues/655.
| Lua | mit | zillemarco/CppSharp,mohtamohit/CppSharp,inordertotest/CppSharp,mono/CppSharp,mohtamohit/CppSharp,genuinelucifer/CppSharp,mohtamohit/CppSharp,mono/CppSharp,u255436/CppSharp,genuinelucifer/CppSharp,genuinelucifer/CppSharp,ddobrev/CppSharp,inordertotest/CppSharp,u255436/CppSharp,u255436/CppSharp,zillemarco/CppSharp,zillem... |
01d04250c291b183b658b37b7557f662c9f61225 | frontend/settings.lua | frontend/settings.lua | DocSettings = {}
function DocSettings:getHistoryPath(fullpath)
local i = #fullpath - 1
-- search for last slash
while i > 0 do
if fullpath:sub(i,i) == "/" then
break
end
i = i - 1
end
-- construct path to configuration file in history dir
local filename = fullpath:sub(i+1, -1)
local basename = fullpath... | DocSettings = {}
function DocSettings:getHistoryPath(fullpath)
local i = #fullpath - 1
-- search for last slash
while i > 0 do
if fullpath:sub(i,i) == "/" then
break
end
i = i - 1
end
-- construct path to configuration file in history dir
local filename = fullpath:sub(i+1, -1)
local basename = fullpath... | Fix bug #119. | Fix bug #119.
| Lua | agpl-3.0 | NiLuJe/koreader,koreader/koreader,poire-z/koreader,apletnev/koreader,ashhher3/koreader,NickSavage/koreader,NiLuJe/koreader,poire-z/koreader,mwoz123/koreader,koreader/koreader,mihailim/koreader,chihyang/koreader,ashang/koreader,pazos/koreader,Hzj-jie/koreader,Frenzie/koreader,chrox/koreader,robert00s/koreader,noname007/... |
91a6e8828f75dc9de22d195f56b9cd80122c88d1 | hymn/inputhandler.lua | hymn/inputhandler.lua | local Class = require "shared.middleclass"
local GameMath = require "shared.gamemath"
local InputHandler = Class "InputHandler"
local EntityStatics = require "hymn.staticdata.entitystatics"
function InputHandler:initialize(logicCore)
self.logicCore = logicCore
self.translate = GameMath.Vector2:new(0, 0)
end
l... | local Class = require "shared.middleclass"
local GameMath = require "shared.gamemath"
local InputHandler = Class "InputHandler"
local EntityStatics = require "hymn.staticdata.entitystatics"
function InputHandler:initialize(logicCore)
self.logicCore = logicCore
self.translate = GameMath.Vector2:new(0, 0)
end
l... | Fix: mouse dragging | Fix: mouse dragging
| Lua | mit | ExcelF/project-navel |
75b2552c23daf90982414c658d0eace5a9d5081a | quest/valandil_elensar_69_wilderness.lua | quest/valandil_elensar_69_wilderness.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... | #102 Fix Elstree Forest III | #102 Fix Elstree Forest III
| Lua | agpl-3.0 | KayMD/Illarion-Content,Illarion-eV/Illarion-Content,vilarion/Illarion-Content |
f5de20271a00714f8ab700767ec622dffdbcb4ae | src/pf/lang.lua | src/pf/lang.lua | module("pf.lang",package.seeall)
local function skip_whitespace(str, pos)
while pos <= #str and str:match('^%s', pos) do
pos = pos + 1
end
return pos
end
local punctuation = {
'(', ')', '[', ']', '!', '!=', '<', '<=', '>', '>=', '=',
'+', '-', '*', '/', '%', '&', '|', '^', '&&', '||'
}
for k, v i... | module("pf.lang",package.seeall)
local function skip_whitespace(str, pos)
while pos <= #str and str:match('^%s', pos) do
pos = pos + 1
end
return pos
end
local punctuation = {
'(', ')', '[', ']', '!', '!=', '<', '<=', '>', '>=', '=',
'+', '-', '*', '/', '%', '&', '|', '^', '&&', '||', '<<', '>>'
... | Working lexer | Working lexer
* src/pf/lang.lua: Add larger lexer tests, and fix bugs.
| Lua | apache-2.0 | mpeterv/pflua,SnabbCo/pflua |
b18962929b6f54d342c84e0ea9be38c29b60a513 | lualib/http/httpd.lua | lualib/http/httpd.lua | local table = table
local httpd = {}
local http_status_msg = {
[100] = "Continue",
[101] = "Switching Protocols",
[200] = "OK",
[201] = "Created",
[202] = "Accepted",
[203] = "Non-Authoritative Information",
[204] = "No Content",
[205] = "Reset Content",
[206] = "Partial Content",
[300] = "Multiple Choices"... | local table = table
local httpd = {}
local http_status_msg = {
[100] = "Continue",
[101] = "Switching Protocols",
[200] = "OK",
[201] = "Created",
[202] = "Accepted",
[203] = "Non-Authoritative Information",
[204] = "No Content",
[205] = "Reset Content",
[206] = "Partial Content",
[300] = "Multiple Choices"... | bugfix: chunked mode | bugfix: chunked mode
| Lua | mit | Zirpon/skynet,jiuaiwo1314/skynet,felixdae/skynet,kebo/skynet,ypengju/skynet_comment,kyle-wang/skynet,korialuo/skynet,lynx-seu/skynet,cpascal/skynet,zhoukk/skynet,lawnight/skynet,pigparadise/skynet,your-gatsby/skynet,longmian/skynet,Markal128/skynet,yinjun322/skynet,felixdae/skynet,nightcj/mmo,MetSystem/skynet,leezhongs... |
6fe833c9dc45914a693c2f381e33ed0a78cd241a | src/lluv/qless/utils.lua | src/lluv/qless/utils.lua | local function prequire(...)
local ok, mod = pcall(require, ...)
if not ok then return nil, mod end
return mod, ...
end
local uuid = require "uuid"
local sha1 = require "bgcrypto.sha1"
local socket = require "socket"
local json = require "cjson"
local uv = require "lluv"
... | local function prequire(...)
local ok, mod = pcall(require, ...)
if not ok then return nil, mod end
return mod, ...
end
local uuid = require "uuid"
local sha1 = require "bgcrypto.sha1"
local socket = require "socket"
local json = require "cjson"
local uv = require "lluv"
... | Fix. posix.getpid returns table instead of integer. | Fix. posix.getpid returns table instead of integer.
| Lua | mit | moteus/lua-lluv-qless |
e08dd1a31907dd52c861c2ecd2ef265257d01ea1 | mods/a_addons/mobs_mc/heads.lua | mods/a_addons/mobs_mc/heads.lua | --MC Heads for minetest
--maikerumine
minetest.register_node( "mobs_mc:creeper_head", {
description = "Creeper Head-W.I.P.",
tiles = {
"bones_top.png",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"mobs_creeper.png"
},
paramtype2 = "facedir",
node_box = {
type = "fix... | --MC Heads for minetest
--maikerumine
minetest.register_node( "mobs_mc:creeper_head", {
description = "Creeper Head-W.I.P.",
tiles = {
"bones_top.png",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"mobs_creeper.png"
},
paramtype2 = "facedir",
node_box = {
type = "fix... | Heads fix size | Heads fix size
| Lua | lgpl-2.1 | maikerumine/grieftest |
87cffe16106952e20be67ed105e5c1a7cc9f0675 | lib/px/pxnginx.lua | lib/px/pxnginx.lua | -- Copyright © 2016 PerimeterX, Inc.
-- Permission is hereby granted, free of charge, to any
-- person obtaining a copy of this software and associated
-- documentation files (the "Software"), to deal in the
-- Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publis... | -- Copyright © 2016 PerimeterX, Inc.
-- Permission is hereby granted, free of charge, to any
-- person obtaining a copy of this software and associated
-- documentation files (the "Software"), to deal in the
-- Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publis... | Fixed content-type bug | Fixed content-type bug
| Lua | mit | PerimeterX/perimeterx-nginx-plugin |
3d05fbd55b9755c428aa72e834bf9a556baad571 | heka/sandbox/decoders/http_edge_decoder.lua | heka/sandbox/decoders/http_edge_decoder.lua | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-- See https://wiki.mozilla.org/CloudServices/DataPipeline/HTTPEdgeServerSpecification
require "cjson"
require "lpeg... | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-- See https://wiki.mozilla.org/CloudServices/DataPipeline/HTTPEdgeServerSpecification
require "cjson"
require "lpeg... | Remove the IP address PII | Remove the IP address PII
https://bugzilla.mozilla.org/show_bug.cgi?id=1143818
| Lua | mpl-2.0 | mreid-moz/data-pipeline,mozilla-services/data-pipeline,nathwill/data-pipeline,mozilla-services/data-pipeline,mozilla-services/data-pipeline,acmiyaguchi/data-pipeline,mreid-moz/data-pipeline,nathwill/data-pipeline,acmiyaguchi/data-pipeline,sapohl/data-pipeline,kparlante/data-pipeline,mozilla-services/data-pipeline,whd/d... |
38d2d6cc96de74d8d6112e599226b16cce523409 | modules/farming_module.lua | modules/farming_module.lua | ------------------------------------------------------------
-- Copyright (c) 2016 tacigar
-- https://github.com/tacigar/maidroid
------------------------------------------------------------
local _aux = maidroid.modules._aux
local state = {
walk = 0,
punch = 1,
plant = 2,
walk_to_plant = 3,
walk_to_soil = ... | ------------------------------------------------------------
-- Copyright (c) 2016 tacigar
-- https://github.com/tacigar/maidroid
------------------------------------------------------------
local _aux = maidroid.modules._aux
local state = {
walk = 0,
punch = 1,
plant = 2,
walk_to_plant = 3,
walk_to_soil = ... | Fix farming module | Fix farming module
| Lua | lgpl-2.1 | tacigar/maidroid |
0641936cd7800e0ec27f953566e9ad7d2f743529 | xmake/plugins/show/lists/toolchains.lua | xmake/plugins/show/lists/toolchains.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 toolchains | fix show toolchains
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
02fd4231619211af0c66913036e3e85f1463e7e7 | test_scripts/RC/GetInteriorVehicleDataCapabilities/008.lua | test_scripts/RC/GetInteriorVehicleDataCapabilities/008.lua | ---------------------------------------------------------------------------------------------------
-- RPC: GetInteriorVehicleDataCapabilities
-- Script: 008
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local commonRC = require('te... | ---------------------------------------------------------------------------------------------------
-- RPC: GetInteriorVehicleDataCapabilities
-- Script: 008
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local commonRC = require('te... | Fix empty array sending | Fix empty array sending
The problem is that PTU generated by current script have
moduleType value {} which is not correct and this is a reason
of PTU failure. The correct one is [].
This commit solves this issue.
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
6ca51f40ee7343698d7c79b4e8e222d4250490f8 | lexers/dmd.lua | lexers/dmd.lua | -- Copyright 2006-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- D LPeg lexer.
-- Heavily modified by Brian Schott (SirAlaran).
local l = lexer
local token, style, color, word_match = l.token, l.style, l.color, l.word_match
local P, R, S = l.lpeg.P, l.lpeg.R, l.lpeg.S
module(...)
-- Whitespace.
local ws =... | -- Copyright 2006-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- D LPeg lexer.
-- Heavily modified by Brian Schott (SirAlaran).
local l = lexer
local token, style, color, word_match = l.token, l.style, l.color, l.word_match
local P, R, S = l.lpeg.P, l.lpeg.R, l.lpeg.S
module(...)
-- Whitespace.
local ws =... | Fixed multi-line delimited strings and token strings; lexers/dmd.lua Thanks to Brian Schott. | Fixed multi-line delimited strings and token strings; lexers/dmd.lua
Thanks to Brian Schott.
| Lua | mit | rgieseke/scintillua |
cd930a21562c6309bb884cd0f4d6cdbd3763e02b | OS/DiskOS/Programs/help.lua | OS/DiskOS/Programs/help.lua | --Liko12 Help System !
if select(1,...) == "-?" then
printUsage(
"help","Displays the help info",
"help Topics","Displays help topics list",
"help <topic>", "Displays a help topic"
)
return
end
local lume = require("Libraries.lume")
local helpPATH = "C:/Help/"
local function nextPath()
if helpPATH... | --Liko12 Help System !
if select(1,...) == "-?" then
printUsage(
"help","Displays the help info",
"help Topics","Displays help topics list",
"help <topic>", "Displays a help topic"
)
return
end
local lume = require("Libraries.lume")
local helpPATH = "C:/Help/"
local function nextPath()
if helpPATH... | my fault, fix a new made bug in `help` | my fault, fix a new made bug in `help`
Former-commit-id: 2c49c8b06fa18c6a036a982ad6f38c7622785692 | Lua | mit | RamiLego4Game/LIKO-12 |
8b808db61e712f62817e0a25590db4bb320f6e8b | packages/pullquote.lua | packages/pullquote.lua | SILE.require("packages/color")
SILE.require("packages/raiselower")
SILE.require("packages/rebox")
SILE.registerCommand("pullquote:font", function (_, _)
end, "The font chosen for the pullquote environment")
SILE.registerCommand("pullquote:author-font", function (_, _)
SILE.settings.set("font.style", "italic")
end, ... | SILE.require("packages/color")
SILE.require("packages/raiselower")
SILE.require("packages/rebox")
SILE.registerCommand("pullquote:font", function (_, _)
end, "The font chosen for the pullquote environment")
SILE.registerCommand("pullquote:author-font", function (_, _)
SILE.settings.set("font.style", "italic")
end, ... | fix(packages): Align pullquote ending mark with outside margin | fix(packages): Align pullquote ending mark with outside margin
This will be a change in rendering but seems to have been the intention
all along, the way glues and reboxing were implemented was just bogus.
With this the opening and closing marks are both aligned to the
surrounding r/lmargin instead of the opening bein... | Lua | mit | alerque/sile,alerque/sile,alerque/sile,alerque/sile |
3e087518594c6104fd19c133062de1f202780d4d | UCDdetective/client.lua | UCDdetective/client.lua | local skins = {1, 2, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 66, 67, 68, 70, 71, 72, 73, 78, 79, 80, 81, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, ... | local skins = {1, 2, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 66, 67, 68, 70, 71, 72, 73, 78, 79, 80, 81, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, ... | UCDdetective | UCDdetective
- Fixed shit still being here when you got another job
| Lua | mit | nokizorque/ucd,nokizorque/ucd |
da9ddd0c17ded24eb2b3ee3fab74af5913a557ea | lua/entities/starfall_screen/cl_init.lua | lua/entities/starfall_screen/cl_init.lua | include('shared.lua')
ENT.RenderGroup = RENDERGROUP_OPAQUE
include("starfall/SFLib.lua")
assert(SF, "Starfall didn't load correctly!")
local context = SF.CreateContext(nil, nil, nil, nil, SF.Libraries.CreateLocalTbl{"render"})
surface.CreateFont("Starfall_ErrorFont", {
font = "arial",
size = 26,
weight = 200
})
... | include('shared.lua')
ENT.RenderGroup = RENDERGROUP_OPAQUE
include("starfall/SFLib.lua")
assert(SF, "Starfall didn't load correctly!")
local context = SF.CreateContext(nil, nil, nil, nil, SF.Libraries.CreateLocalTbl{"render"})
surface.CreateFont("Starfall_ErrorFont", {
font = "arial",
size = 26,
weight = 200
})
... | Fix CodeSent error | Fix CodeSent error
Fixes #45
| Lua | bsd-3-clause | Jazzelhawk/Starfall,INPStarfall/Starfall,Jazzelhawk/Starfall,INPStarfall/Starfall,Ingenious-Gaming/Starfall,Xandaros/Starfall,Xandaros/Starfall,Ingenious-Gaming/Starfall |
a330b77ef9b015bec1826e5866bd16f1f4d99b0f | scen_edit/view/main_window/general_panel.lua | scen_edit/view/main_window/general_panel.lua | GeneralPanel = AbstractMainWindowPanel:extends{}
function GeneralPanel:init()
self:super("init")
self.control:AddChild(Button:New {
height = 80,
width = 80,
caption = '',
tooltip = "Save scenario",
OnClick = {
function()
local dir = FilePanel.lastDir or SCEN_EDIT_EXAMPLE_DIR_RAW_FS
sfd... | GeneralPanel = AbstractMainWindowPanel:extends{}
function GeneralPanel:init()
self:super("init")
self.control:AddChild(Button:New {
height = 80,
width = 80,
caption = '',
tooltip = "Save scenario",
OnClick = {
function()
local dir = FilePanel.lastDir or SCEN_EDIT_EXAMPLE_DIR_RAW_FS
sfd... | fixed archive reloading (97.0+) | fixed archive reloading (97.0+)
| Lua | mit | Spring-SpringBoard/SpringBoard-Core,Spring-SpringBoard/SpringBoard-Core |
eb0f68c31367e676889cb529a679fdeefbd40540 | bhop/gamemode/shared.lua | bhop/gamemode/shared.lua | ---------------------------
-- Bunny Hop --
-- Created by xAaron113x --
---------------------------
GM.Name = "Bunny Hop"
GM.Author = "xAaron113x"
GM.Email = "xaaron113x@gmail.com"
GM.Website = "aaron113.pw"
GM.TeamBased = false
DeriveGamemode("ssbase")
DEFINE_BASECLASS("gamemode_ss... | ---------------------------
-- Bunny Hop --
-- Created by xAaron113x --
---------------------------
GM.Name = "Bunny Hop"
GM.Author = "xAaron113x"
GM.Email = "xaaron113x@gmail.com"
GM.Website = "aaron113.pw"
GM.TeamBased = false
DeriveGamemode("ssbase")
DEFINE_BASECLASS("gamemode_ss... | fix 4 a map. twerk dat committ like a miley | fix 4 a map.
twerk dat committ like a miley
| Lua | bsd-3-clause | T3hArco/skeyler-gamemodes |
83658d928d4076e431f30c830659095f100ba916 | bin/batchTomo.lua | bin/batchTomo.lua | #!/usr/bin/env lua
--[[===========================================================================#
# This is a program to run tomoAuto in batch to align and reconstruct a large #
# number of raw image stacks. #
#---------------------------------------------------------... | #!/usr/bin/env lua
--[[===========================================================================#
# This is a program to run tomoAuto in batch to align and reconstruct a large #
# number of raw image stacks. #
#---------------------------------------------------------... | fixed problem with package path | fixed problem with package path
| Lua | mit | DustinMorado/tomoauto |
b74bc541dcb7dc50ad4541ae13602829d871412f | src/_premake_main.lua | src/_premake_main.lua | --
-- _premake_main.lua
-- Script-side entry point for the main program logic.
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
--
local shorthelp = "Type 'premake5 --help' for help"
local versionhelp = "premake5 (Premake Build Script Generator) %s"
-- Load the collection of core scripts, req... | --
-- _premake_main.lua
-- Script-side entry point for the main program logic.
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
--
local shorthelp = "Type 'premake5 --help' for help"
local versionhelp = "premake5 (Premake Build Script Generator) %s"
-- Load the collection of core scripts, req... | fixed issue #264 | fixed issue #264
| Lua | bsd-3-clause | resetnow/premake-core,LORgames/premake-core,resetnow/premake-core,PlexChat/premake-core,kankaristo/premake-core,bravnsgaard/premake-core,premake/premake-core,jstewart-amd/premake-core,Zefiros-Software/premake-core,mandersan/premake-core,grbd/premake-core,prapin/premake-core,alarouche/premake-core,aleksijuvani/premake-c... |
4f9e25956bbb6ef308e22741fae63220d5535265 | src/single-dir.lua | src/single-dir.lua | -- lua-round-up, Gather all dependencies of Lua module together
-- Copyright (C) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
local function fileExists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
local fun... | -- lua-round-up, Gather all dependencies of Lua module together
-- Copyright (C) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
local function fileExists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
local fun... | fix path separators for Windows | fix path separators for Windows
See https://ci.appveyor.com/project/starius/single-dir-lua/build/0.0.1.7-test/job/22lhmcj4kl08ft3h#L756
| Lua | mit | starius/single-dir.lua |
3feb451242fcec87fbf34d9b478e97903e3a7cbb | src/lib/yang/value.lua | src/lib/yang/value.lua | -- Use of this source code is governed by the Apache 2.0 license; see
-- COPYING.
module(..., package.seeall)
local util = require("lib.yang.util")
local ipv4 = require("lib.protocol.ipv4")
local ipv6 = require("lib.protocol.ipv6")
local ffi = require("ffi")
local bit = require("bit")
local ethernet = require("lib.pro... | -- Use of this source code is governed by the Apache 2.0 license; see
-- COPYING.
module(..., package.seeall)
local util = require("lib.yang.util")
local ipv4 = require("lib.protocol.ipv4")
local ipv6 = require("lib.protocol.ipv6")
local ffi = require("ffi")
local bit = require("bit")
local ethernet = require("lib.pro... | Fix error while parsing ipv4 and ipv6 prefix | Fix error while parsing ipv4 and ipv6 prefix
| Lua | apache-2.0 | snabbco/snabb,SnabbCo/snabbswitch,Igalia/snabb,eugeneia/snabb,snabbco/snabb,SnabbCo/snabbswitch,eugeneia/snabb,alexandergall/snabbswitch,Igalia/snabbswitch,snabbco/snabb,Igalia/snabb,snabbco/snabb,Igalia/snabbswitch,SnabbCo/snabbswitch,eugeneia/snabb,Igalia/snabb,alexandergall/snabbswitch,Igalia/snabb,SnabbCo/snabbswit... |
3455b31dab5f0831e496f1166b91a345aa0c1346 | examples/bbs/engine.lua | examples/bbs/engine.lua | local print = print
local pcall = pcall
local coroutine = coroutine
local ui = require 'ui'
module 'engine'
local STATE = {}
function run(conn, engine)
while true do
-- Get a message from the Mongrel2 server
local good, request = pcall(conn.recv_json, conn)
if good then
local... | local print = print
local pcall = pcall
local coroutine = coroutine
local ui = require 'ui'
module 'engine'
local STATE = {}
function run(conn, engine)
while true do
-- Get a message from the Mongrel2 server
local good, request = pcall(conn.recv_json, conn)
if good then
local... | Fixed bug where the STATE entry for a connection wouldn't be cleared if an error occured. | Fixed bug where the STATE entry for a connection wouldn't be cleared if an error occured. | Lua | bsd-3-clause | ged/mongrel2,ged/mongrel2,ged/mongrel2,ged/mongrel2 |
4bee474c39279d9418470a12f21bc432f5e3b51f | Farming/harvest.lua | Farming/harvest.lua | local args = {...}
local delay = 20
local direction -- 0 = Right, 1 = Left
local minFuelLevel = 200
function checkArgs()
if #args == 3 then
if string.lower(args[3]) == "left" then
direction = 1
elseif string.lower(args[3]) == "right" then
direction = 0
end
else
print("Usage: <command> <... | local args = {...}
local delay = 20
local direction -- 0 = Right, 1 = Left
local minFuelLevel = 200
function checkArgs()
if #args == 3 then
if string.lower(args[3]) == "left" then
direction = 1
elseif string.lower(args[3]) == "right" then
direction = 0
end
else
print("Usage: <command> <... | Some minor fixes for harvest.lua | Some minor fixes for harvest.lua
| Lua | unlicense | Carlgo11/computercraft |
40f9b44e8a2036b2f04be1a649847fd00d26775a | lua/framework/graphics/model.lua | lua/framework/graphics/model.lua | --=========== Copyright © 2018, Planimeter, All rights reserved. =============--
--
-- Purpose:
--
--============================================================================--
require( "class" )
local assimp = require( "assimp" )
local ffi = require( "ffi" )
local bit = require( "bit" )
local GL = requir... | --=========== Copyright © 2018, Planimeter, All rights reserved. =============--
--
-- Purpose:
--
--============================================================================--
require( "class" )
local assimp = require( "assimp" )
local ffi = require( "ffi" )
local bit = require( "bit" )
local GL = requir... | Update `model` constructor | Update `model` constructor
* Pass file extension hint to assimp
* Fix passing NULL pointer to processNode
| Lua | mit | Planimeter/lgameframework,Planimeter/lgameframework,Planimeter/lgameframework |
6232ad6b4e9c23d737b82f974c5e042871742cb2 | Modules/Utility/os.lua | Modules/Utility/os.lua | -- to use: local os = require(this_script)
-- @author Narrev
-- Please message Narrev (on Roblox) for any functionality you would like added
--[[
This extends the os table to include os.date! It functions just like Lua's built-in os.date, but with a few additions.
Note: Padding can be toggled by inserting a '_' like... | -- to use: local os = require(this_script)
-- @author Narrev
-- Please message Narrev (on Roblox) for any functionality you would like added
--[[
This extends the os table to include os.date! It functions just like Lua's built-in os.date, but with a few additions.
Note: Padding can be toggled by inserting a '_' like... | Fixed calculation error | Fixed calculation error
Previous algorithm wasn't working properly but it's fixed now :D | Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
c1a3794f9890d54f1c649500f2f9e32d1bcf3651 | layout-a5trim.lua | layout-a5trim.lua | CASILE.layout = "a5trim"
local class = SILE.documentState.documentClass
SILE.documentState.paperSize = SILE.paperSizeParser("135mm x 195mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
... | CASILE.layout = "a5trim"
local class = SILE.documentState.documentClass
SILE.documentState.paperSize = SILE.paperSizeParser("135mm x 195mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
... | Fix hack to mark link positios for verse index even though not linking | Fix hack to mark link positios for verse index even though not linking
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
34dc3884e7cacababba7573e1c9d8277298bed09 | models/upload.lua | models/upload.lua | --- A basic lower upload API
--
module(..., package.seeall)
require 'posix'
local Model = require 'bamboo.model'
local Form = require 'bamboo.form'
local function calcNewFilename(oldname)
-- separate the base name and extense name of a filename
local main, ext = oldname:match('^(.+)(%.%w+)$')
-- check if exists ... | --- A basic lower upload API
--
module(..., package.seeall)
require 'posix'
local Model = require 'bamboo.model'
local Form = require 'bamboo.form'
local function calcNewFilename(oldname)
-- separate the base name and extense name of a filename
local main, ext = oldname:match('^(.+)(%.%w+)$')
-- check if exists ... | fix some bugs in models/upload.lua | fix some bugs in models/upload.lua
Signed-off-by: Daogang Tang <6435653d2db08e7863743a16df53ecbb301fb4b0@gmail.com>
| Lua | bsd-3-clause | daogangtang/bamboo,daogangtang/bamboo |
d65d5cbee4215856c77aff5c16b82acba3ab030c | focuspoints.lrdevplugin/CanonDelegates.lua | focuspoints.lrdevplugin/CanonDelegates.lua | --[[
Copyright 2016 Joshua Musselwhite, Whizzbang 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... | --[[
Copyright 2016 Joshua Musselwhite, Whizzbang 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... | Corrected to direction on the Y axis for Canon cameras Fixed a special case for Canon EOS 5D | Corrected to direction on the Y axis for Canon cameras
Fixed a special case for Canon EOS 5D
| Lua | apache-2.0 | philmoz/Focus-Points,philmoz/Focus-Points,project802/Focus-Points,musselwhizzle/Focus-Points,rderimay/Focus-Points,project802/Focus-Points,musselwhizzle/Focus-Points,project802/Focus-Points,mkjanke/Focus-Points,mkjanke/Focus-Points,project802/Focus-Points,rderimay/Focus-Points |
a5c4754cfae6afa08440b960785233fd144e9af4 | examples/remove_by_id.lua | examples/remove_by_id.lua | #!/usr/bin/env lua
local gumbo = require "gumbo"
local serialize = require "gumbo.serialize.html"
--- Iterate an element node recursively and remove any descendant element
--- with the specified id attribute.
local function remove_element_by_id(base, id)
local function search_and_remove(node, n)
if node[n]... | #!/usr/bin/env lua
local gumbo = require "gumbo"
local serialize = require "gumbo.serialize.html"
--- Iterate an element node recursively and remove any descendant element
--- with the specified id attribute.
local function remove_element_by_id(base, id)
local function search_and_remove(node, n)
if node[n]... | Fix argument checking in examples/remove_by_id.lua | Fix argument checking in examples/remove_by_id.lua
| Lua | apache-2.0 | craigbarnes/lua-gumbo,craigbarnes/lua-gumbo,craigbarnes/lua-gumbo |
9781fa18186223e864722bb4de755d5940a22ffa | lua/filetypes/cmake.lua | lua/filetypes/cmake.lua | local executable = require'utils'.files.executable
local mkdir = require'utils'.files.mkdir
local is_dir = require'utils'.files.is_dir
local is_file = require'utils'.files.is_file
local link = require'utils'.files.link
local set_command = require'neovim.commands'.set_command
local jobs = require'jobs'
local echomsg =... | local executable = require'utils'.files.executable
local mkdir = require'utils'.files.mkdir
local is_dir = require'utils'.files.is_dir
local is_file = require'utils'.files.is_file
local link = require'utils'.files.link
local set_command = require'neovim.commands'.set_command
local jobs = require'jobs'
local echomsg =... | fix: open qf on failed cmake build | fix: open qf on failed cmake build
| Lua | mit | Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim |
a2cd0d992775fe39fc98a6c1a3ca867d407ba68c | scheduled/factionLeader.lua | scheduled/factionLeader.lua | --Checks if the playable faction leaders is logged in and thus the NPC needs to be out of player sight
require("base.common")
module("scheduled.factionLeader", package.seeall)
function checkFactionLeader()
players=world:getPlayersOnline()
for player in players do
if player.name == "Rosaline Edwards" then
npc... | --Checks if the playable faction leaders is logged in and thus the NPC needs to be out of player sight
require("base.common")
module("scheduled.factionLeader", package.seeall)
function checkFactionLeader()
players=world:getPlayersOnline()
for index, playerName in pairs(players) do
if playerName == "Rosaline Edw... | fixed for loop | fixed for loop
| Lua | agpl-3.0 | vilarion/Illarion-Content,Illarion-eV/Illarion-Content,KayMD/Illarion-Content,LaFamiglia/Illarion-Content,Baylamon/Illarion-Content |
f7bd7cfc3ab55650aab50d7885d00798cabe8497 | api/server.lua | api/server.lua | local htmlparser = require("htmlparser")
local http = require('socket.http')
local app = require('waffle').CmdLine()
local search = function(req, res)
local query = req.url.args.zoektermen
local queryType = tonumber(req.url.args.opZoeken)
local queryPage = tonumber(req.url.args.page) or 0
local queryEan = ""
if q... | local htmlparser = require("htmlparser")
local http = require('socket.http')
local json = require('json')
local app = require('waffle').CmdLine()
local search = function(req, res)
local query = req.url.args.zoektermen
local queryType = tonumber(req.url.args.opZoeken)
local queryPage = tonumber(req.url.args.page)... | Fix contenttype for app | Fix contenttype for app
App checks the contenttype
| Lua | mit | JoostvDoorn/GlutenVrijApp |
a3e401dbded84b2a90472024daa28ff51b2c00d3 | combine-cdefdbs.lua | combine-cdefdbs.lua | -- Copyright (C) 2014-2015 Brian Downing. MIT License.
local ffi = require 'ffi'
local cdef, C, ffi_string =
ffi.cdef, ffi.C, ffi.string
local dbg = function () end
-- dbg = print
local cdefdb_open = require 'cdefdb.open'
local cdefdb_write = require 'cdefdb.write'
local db_names = {...}
local outfile = table... | -- Copyright (C) 2014-2015 Brian Downing. MIT License.
local ffi = require 'ffi'
local cdef, C, ffi_string =
ffi.cdef, ffi.C, ffi.string
local dbg = function () end
-- dbg = print
local cdefdb_open = require 'cdefdb.open'
local cdefdb_write = require 'cdefdb.write'
local db_names = {...}
local outfile = table... | Add kludgey fix for combining anonymous enums | Add kludgey fix for combining anonymous enums
Seems a bit fragile, but I don't have a better idea right now...
| Lua | mit | bdowning/lj-cdefdb,bdowning/lj-cdefdb |
0096758edb617c5ba874a400ccfa37a9317950bb | MMOCoreORB/bin/scripts/screenplays/tasks/yavin4/ruwan_tokai.lua | MMOCoreORB/bin/scripts/screenplays/tasks/yavin4/ruwan_tokai.lua | ruwan_tokai_missions =
{
{
missionType = "retrieve",
primarySpawns =
{
{ npcTemplate = "ruwan_warrant_officer", npcName = "" }
},
secondarySpawns =
{
{ npcTemplate = "ruwan_thug", npcName = "" },
{ npcTemplate = "ruwan_thug", npcName = "" }
},
itemSpawns =
{
{ itemTemplate ... | ruwan_tokai_missions =
{
{
missionType = "deliver",
primarySpawns =
{
{ npcTemplate = "ruwan_warrant_officer", npcName = "" }
},
secondarySpawns =
{
{ npcTemplate = "ruwan_thug", npcName = "" },
{ npcTemplate = "ruwan_thug", npcName = "" }
},
itemSpawns =
{
{ itemTemplate =... | [Fixed] mission type on ruwan tokai's first mission | [Fixed] mission type on ruwan tokai's first mission
Change-Id: Iafae5a13fa047e582a188e156946dd47241bd505
| 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 |
50379982c099455bf6306f3c37d8a821e7b242b6 | lib/luajit/ffi.meta.lua | lib/luajit/ffi.meta.lua | local ffi = require 'ffi'
return {
["C"] = { tag = "var", contents = "require('ffi').C", value = ffi.C, },
["abi"] = { tag = "var", contents = "require('ffi').abi", value = ffi.abi, },
["alignof"] = { tag = "var", contents = "require('ffi').alignof", value = ffi.alignof, },
[... | local ok, ffi = pcall(require, 'ffi')
if not ok then ffi = {} end
return {
["C"] = { tag = "var", contents = "require('ffi').C", value = ffi.C, },
["abi"] = { tag = "var", contents = "require('ffi').abi", value = ffi.abi, },
["alignof"] = { tag = "var", contents = "require('ffi'... | Fix build failing without LuaJIT | Fix build failing without LuaJIT
| Lua | bsd-3-clause | SquidDev/urn,SquidDev/urn |
3394eba0d4fc9b84bd1f9e8f5d6105cbaca2f996 | plugins/muc/mod_muc.lua | plugins/muc/mod_muc.lua | -- Prosody IM
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
if module:get_host_type() ~= "component" then
error("MUC should be loaded as a component, please see ht... | -- Prosody IM
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
if module:get_host_type() ~= "component" then
error("MUC should be loaded as a component, please see ht... | MUC: Added a send() method to the component. Fixes issues with local mod_vcard. | MUC: Added a send() method to the component. Fixes issues with local mod_vcard.
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
aecdd22c34afc044292ca3769cbc9818fe9248f6 | modules/textadept/run.lua | modules/textadept/run.lua | -- Copyright 2007-2009 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
local locale = _G.locale
---
-- Module for running/executing source files.
module('_m.textadept.run', package.seeall)
---
-- Executes the command line parameter and prints the output to Textadept.
-- @param ... | -- Copyright 2007-2009 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
local locale = _G.locale
---
-- Module for running/executing source files.
module('_m.textadept.run', package.seeall)
---
-- Executes the command line parameter and prints the output to Textadept.
-- @param ... | Fixed bug for running filename with no path; modules/textadept/run.lua | Fixed bug for running filename with no path; modules/textadept/run.lua
--HG--
extra : rebase_source : 050d2fd8ada2b7a96d2e686b7c0fe4a709448f45
| Lua | mit | jozadaquebatista/textadept,jozadaquebatista/textadept |
32f9d3eb428d0687bc80bb302059b7bcaf6fe1dc | nvim/lua/user/ui.lua | nvim/lua/user/ui.lua | local filereadable_key = 'filereadable'
local function file_exists(name)
local f = io.open(name, 'r')
return f ~= nil and io.close(f)
end
local function buf_get_var(bufnr, name, default)
local ok, value = pcall(vim.api.nvim_buf_get_var, bufnr, name)
if ok then return value end
return default
end
local func... | local filereadable_key = 'filereadable'
local current_normal_winnr_key = 'current_normal_winnr'
local function file_exists(name)
local f = io.open(name, 'r')
return f ~= nil and io.close(f)
end
local function update_filereadable()
local path = vim.api.nvim_buf_get_name(0)
if path ~= '' then
vim.api.nvim_b... | Fix tabline to ignore floating windows | Fix tabline to ignore floating windows
| Lua | mit | creasty/dotfiles,creasty/dotfiles,creasty/dotfiles,creasty/dotfiles,creasty/dotfiles,creasty/dotfiles,creasty/dotfiles,creasty/dotfiles |
41b8703b54f2d58823f6593787cf89e4856537ac | spec/handshake_spec.lua | spec/handshake_spec.lua | package.path = package.path..'../src'
local port = os.getenv('LUAWS_WSTEST_PORT') or 8081
local url = 'ws://localhost:'..port
local handshake = require'websocket.handshake'
local socket = require'socket'
require'pack'
local request_lines = {
'GET /chat HTTP/1.1',
'Host: server.example.com',
'Upgrade: websocke... | package.path = package.path..'../src'
local port = os.getenv('LUAWS_WSTEST_PORT') or 8081
local url = 'ws://localhost:'..port
local handshake = require'websocket.handshake'
local socket = require'socket'
require'pack'
local request_lines = {
'GET /chat HTTP/1.1',
'Host: server.example.com',
'Upgrade: websocke... | fix test | fix test
| Lua | mit | KSDaemon/lua-websockets,enginix/lua-websockets,OptimusLime/lua-websockets,OptimusLime/lua-websockets,lipp/lua-websockets,enginix/lua-websockets,OptimusLime/lua-websockets,KSDaemon/lua-websockets,lipp/lua-websockets,lipp/lua-websockets,enginix/lua-websockets,KSDaemon/lua-websockets |
9408820c8377437b977b25725985d658ee2311ad | lib/lua/lunarender/rendering.lua | lib/lua/lunarender/rendering.lua | -- part of LunaRender
-- (c) 2015 Mikoláš Štrajt
-- MIT licensed
local proj = require 'lunarender.projection'
local xmlwriter = require 'lunarender.xmlwriter'
local push = table.insert
local _M = {}
local function apply_style(style, tags, zoom)
if type(style)=='function' then
return style(tags, zoom)
end
retur... | -- part of LunaRender
-- (c) 2015 Mikoláš Štrajt
-- MIT licensed
local proj = require 'lunarender.projection'
local xmlwriter = require 'lunarender.xmlwriter'
local push = table.insert
local _M = {}
local function apply_style(style, tags, zoom)
if type(style)=='function' then
return style(tags, zoom)
end
retur... | some rendering bugs | some rendering bugs
| Lua | mit | severak/lunarender,severak/lunarender,severak/lunarender |
2a0980f23312d2379277d14aece1da1514ba9963 | test/grammar_test.lua | test/grammar_test.lua | --[[ test/grammar_test.lua
Test suite to validate the Aydede LPeg grammar.
Copyright (c) 2014, Joshua Ballanco.
Licensed under the BSD 2-Clause License. See COPYING for full license details.
--]]
require("luaunit")
local P = require("lpeg").P
local grammar = require("grammar")
-- A mock parser that will f... | --[[ test/grammar_test.lua
Test suite to validate the Aydede LPeg grammar.
Copyright (c) 2014, Joshua Ballanco.
Licensed under the BSD 2-Clause License. See COPYING for full license details.
--]]
require("luaunit")
local P = require("lpeg").P
local grammar = require("grammar")
-- A mock parser that will f... | Fix test mock to generate new table each time | Fix test mock to generate new table each time
| Lua | bsd-2-clause | jballanc/aydede |
95148b796f12367443f69fc0b716107656cd66e3 | misc.lua | misc.lua | -- new global functions, either replacing existing ones or providing new
-- ones for convenience
-- replacements: pairs, ipairs, type
-- new: printf, fprintf, eprintf, sprintf, srequire, L
-- new version of type() that supports the __type metamethod
rawtype = type
function type(obj)
local mt = getmetatable(obj)
if m... | -- new global functions, either replacing existing ones or providing new
-- ones for convenience
-- replacements: pairs, ipairs, type
-- new: printf, fprintf, eprintf, sprintf, srequire, L
-- new version of type() that supports the __type metamethod
rawtype = type
function type(obj)
local mt = getmetatable(obj)
if m... | Implement lfs.normalize, lfs.dirname, and lfs.rmkdir; fix lfs.exists on windows | Implement lfs.normalize, lfs.dirname, and lfs.rmkdir; fix lfs.exists on windows
It turns out that windows is full of spiders: stat() will fail if the path has
a trailing directory, unless it's a root directory path, in which case it will
fail if it *doesn't* have one. lfs.exists now contains an ugly workaround for
thi... | Lua | mit | ToxicFrog/luautil |
f8fced08fab2f7c1813483cb325d088ff4216200 | extensions/vox/init.lua | extensions/vox/init.lua | --- === hs.vox ===
---
--- Controls for VOX music player
local vox = {}
local alert = require "hs.alert"
local as = require "hs.applescript"
local app = require "hs.application"
-- Internal function to pass a command to Applescript.
local function tell(cmd)
local _cmd = 'tell application "vox" to ' .. cmd
local ... | --- === hs.vox ===
---
--- Controls for VOX music player
local vox = {}
local alert = require "hs.alert"
local as = require "hs.applescript"
local app = require "hs.application"
local voxBundleId = "com.coppertino.Vox"
-- Internal function to pass a command to Applescript.
local function tell(cmd)
local _cmd = 't... | Handle VOX not running in isRunning() - fixes #2906 | Handle VOX not running in isRunning() - fixes #2906
| Lua | mit | Hammerspoon/hammerspoon,Hammerspoon/hammerspoon,Hammerspoon/hammerspoon,CommandPost/CommandPost-App,CommandPost/CommandPost-App,latenitefilms/hammerspoon,CommandPost/CommandPost-App,asmagill/hammerspoon,asmagill/hammerspoon,asmagill/hammerspoon,asmagill/hammerspoon,CommandPost/CommandPost-App,latenitefilms/hammerspoon,... |
b06d945651d41c64381fda22a6c7189e4850d294 | lib/lua/virgo-time.lua | lib/lua/virgo-time.lua | --[[
Copyright 2012 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 2012 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... | lib: virgo-time: improve debug statement | lib: virgo-time: improve debug statement
the debug statement had two problems:
1) it didn't use debugf so the timestamps weren't printed
2) it printed in 4 lines what could be said in 1
Fix both these issues.
| Lua | apache-2.0 | kans/birgo,kans/birgo,kans/birgo,kans/birgo,kans/birgo |
82eecef77502d1d00529492f18a51a33a9d1c8b8 | src/apps/tap/tap.lua | src/apps/tap/tap.lua | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local S = require("syscall")
local link = require("core.link")
local packet = require("core.packet")
local counter = require("core.counter")
local ethernet = require("lib.protocol.ethernet")
local ffi = require(... | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local S = require("syscall")
local link = require("core.link")
local packet = require("core.packet")
local counter = require("core.counter")
local ethernet = require("lib.protocol.ethernet")
local ffi = require(... | The last fix for allocating on every breath actually broke under load, this one does not | The last fix for allocating on every breath actually broke under load, this one does not
| Lua | apache-2.0 | wingo/snabbswitch,heryii/snabb,SnabbCo/snabbswitch,kbara/snabb,mixflowtech/logsensor,Igalia/snabbswitch,eugeneia/snabb,wingo/snabbswitch,eugeneia/snabbswitch,mixflowtech/logsensor,alexandergall/snabbswitch,snabbco/snabb,dpino/snabb,eugeneia/snabb,heryii/snabb,kbara/snabb,eugeneia/snabbswitch,dpino/snabb,wingo/snabb,sna... |
a14049f39d29c57b654bacab033948fd7996022e | nyagos.d/suffix.lua | nyagos.d/suffix.lua | share._suffixes={}
share._setsuffix = function(suffix,cmdline)
local suffix=string.lower(suffix)
if string.sub(suffix,1,1)=='.' then
suffix = string.sub(suffix,2)
end
if not share._suffixes[suffix] then
local orgpathext = nyagos.getenv("PATHEXT")
local newext="."..suffi... | share._suffixes={}
share._setsuffix = function(suffix,cmdline)
local suffix=string.lower(suffix)
if string.sub(suffix,1,1)=='.' then
suffix = string.sub(suffix,2)
end
if not share._suffixes[suffix] then
local orgpathext = nyagos.getenv("PATHEXT")
local newext="."..suffi... | Fix: `suffix ps1` => ?:-1: attempt to concatenate a table value | Fix: `suffix ps1` => ?:-1: attempt to concatenate a table value
| Lua | bsd-3-clause | nocd5/nyagos,tyochiai/nyagos,zetamatta/nyagos,tsuyoshicho/nyagos |
566171eacc29dbc3e59652b9805ac4fedbbcd28b | scripts/shaderc.lua | scripts/shaderc.lua | --
-- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
project "glslang"
kind "StaticLib"
buildoptions {
"-Wno-ignored-qualifiers",
"-Wno-inconsistent-missing-override",
"-Wno-missing-field-initializers",
"-Wno-reorder",
"-Wn... | --
-- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
project "glslang"
kind "StaticLib"
configuration { "not vs*" }
buildoptions {
"-Wno-ignored-qualifiers",
"-Wno-inconsistent-missing-override",
"-Wno-missing-field-initia... | Fixed VS build. | Fixed VS build.
| Lua | bsd-2-clause | bkaradzic/bgfx,MikePopoloski/bgfx,jdryg/bgfx,attilaz/bgfx,jdryg/bgfx,LWJGL-CI/bgfx,LWJGL-CI/bgfx,septag/bgfx,fluffyfreak/bgfx,septag/bgfx,mmicko/bgfx,bkaradzic/bgfx,jpcy/bgfx,emoon/bgfx,septag/bgfx,attilaz/bgfx,fluffyfreak/bgfx,emoon/bgfx,mendsley/bgfx,fluffyfreak/bgfx,LWJGL-CI/bgfx,Synxis/bgfx,Synxis/bgfx,LWJGL-CI/bgf... |
c552131c3d1f752e8f42d3503c971b4dfe579a98 | apps/yodnsconf/scripts/lua/domain_list.lua | apps/yodnsconf/scripts/lua/domain_list.lua | --[[ <!--
Program: YoDNSConf
Component: domain_list.lua
Copyright: Savonix Corporation
Author: Albert L. Lash, IV
License: Gnu Affero Public License version 3
http://www.gnu.org/licenses
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as ... | --[[ <!--
Program: YoDNSConf
Component: domain_list.lua
Copyright: Savonix Corporation
Author: Albert L. Lash, IV
License: Gnu Affero Public License version 3
http://www.gnu.org/licenses
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as ... | fixed minor oversight about records | fixed minor oversight about records
| Lua | agpl-3.0 | savonix/yodnsconf,savonix/yodnsconf,savonix/yodnsconf,savonix/yodnsconf |
f7b9bb75af8d65ea9f2ed445516d8f0e22a4b8ac | init.lua | init.lua | --[[
Copyright 2014 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | --[[
Copyright 2014 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | Mitigate bogus errors being returned on stack overflows (#1102) | Mitigate bogus errors being returned on stack overflows (#1102)
This is one possible way to fix #1101; it means that some stack overflow errors would never get emitted via 'process.uncaughtException'. The alternative would be to reduce the amount of work that needs to be done for emitting 'process.uncaughtException' i... | Lua | apache-2.0 | luvit/luvit,zhaozg/luvit,zhaozg/luvit,luvit/luvit |
6c613918f1eca3a565cbcaf39014af94b3170a7f | src/ui/MainMenuView.lua | src/ui/MainMenuView.lua | local class = require 'lib/30log'
local GameObject = require 'src/GameObject'
local Transform = require 'src/component/Transform'
local Renderable = require 'src/component/Renderable'
local Interfaceable = require 'src/component/Interfaceable'
local Polygon = require 'src/datatype/Polygon'
local TouchDelegate = require... | local class = require 'lib/30log'
local GameObject = require 'src/GameObject'
local Transform = require 'src/component/Transform'
local Renderable = require 'src/component/Renderable'
local Interfaceable = require 'src/component/Interfaceable'
local Polygon = require 'src/datatype/Polygon'
local TouchDelegate = require... | fixed scaling of left and right arrows | fixed scaling of left and right arrows
| Lua | mit | Sewerbird/Helios2400,Sewerbird/Helios2400,Sewerbird/Helios2400 |
02e19830508c06ef26ae08656e8fdb46e553c6b1 | interface/options/mode.lua | interface/options/mode.lua | local function get_update_delay_one(flow)
return function()
flow.updatePacket = flow._update_packet
flow._update_packet = nil
end
end
local function _random(dv, pkt)
local index = math.random(dv.count)
dv[index]:update()
dv:applyAll(pkt)
end
local function _random_alt(dv, pkt)
local index = math.random(dv.c... | local function get_update_delay_one(flow)
return function()
flow.updatePacket = flow._update_packet
flow._update_packet = nil
end
end
local function _random(dv, pkt)
local index = math.random(dv.count)
dv[index]:update()
dv:applyAll(pkt)
end
local function _random_alt(dv, pkt)
local index = math.random(dv.c... | Fix error message for invalid mode. | Fix error message for invalid mode.
| Lua | mit | gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,dschoeffm/MoonGen,gallenmu/MoonGen,scholzd/MoonGen,dschoeffm/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,scholzd/MoonGen,emmericp/MoonGen,dschoeffm/MoonGen,emmericp/MoonGen,scholzd/MoonGen,gallenmu/MoonGen,emmericp/MoonGen |
be65e83fb6d0aaa8b2842c9f584b3d85abcff011 | TemporalConvolution.lua | TemporalConvolution.lua | local TemporalConvolution, parent =
torch.class('cudnn.TemporalConvolution', 'nn.TemporalConvolution')
--use cudnn to perform temporal convolutions
--note: if padH parameter is not passed, no padding will be performed, as in parent TemporalConvolution
--however, instead of separately padding data, as is required no... | local TemporalConvolution, parent =
torch.class('cudnn.TemporalConvolution', 'nn.TemporalConvolution')
--use cudnn to perform temporal convolutions
--note: if padH parameter is not passed, no padding will be performed, as in parent TemporalConvolution
--however, instead of separately padding data, as is required no... | Update TemporalConvolution.lua | Update TemporalConvolution.lua
Cleaner way of what fbesse was doing (thans fbesse!) and typo fix
| Lua | bsd-3-clause | phunghx/phnn.torch,phunghx/phnn.torch,phunghx/phnn.torch |
096baefd5a0a7a5af7aaf962936837197293a394 | focuspoints.lrdevplugin/OlympusDelegates.lua | focuspoints.lrdevplugin/OlympusDelegates.lua | --[[
Copyright 2016 Joshua Musselwhite, Whizzbang 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... | --[[
Copyright 2016 Joshua Musselwhite, Whizzbang 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... | Fix math bug in rotated images | Fix math bug in rotated images
| Lua | apache-2.0 | mkjanke/Focus-Points,mkjanke/Focus-Points,rderimay/Focus-Points,philmoz/Focus-Points,project802/Focus-Points,project802/Focus-Points,musselwhizzle/Focus-Points,project802/Focus-Points,project802/Focus-Points,musselwhizzle/Focus-Points,philmoz/Focus-Points,rderimay/Focus-Points |
d95917ecbc5d0efbc1b4b67c1974d7f0421eebf9 | misc/freeswitch/scripts/common/gateway.lua | misc/freeswitch/scripts/common/gateway.lua | -- Gemeinschaft 5 module: gateway class
-- (c) AMOOMA GmbH 2013
--
module(...,package.seeall)
Gateway = {}
-- Create Gateway object
function Gateway.new(self, arg)
arg = arg or {}
object = arg.object or {}
setmetatable(object, self);
self.__index = self;
self.class = 'gateway';
self.log = arg.log;
sel... | -- Gemeinschaft 5 module: gateway class
-- (c) AMOOMA GmbH 2013
--
module(...,package.seeall)
Gateway = {}
-- Create Gateway object
function Gateway.new(self, arg)
arg = arg or {}
object = arg.object or {}
setmetatable(object, self);
self.__index = self;
self.class = 'gateway';
self.log = arg.log;
sel... | set gateway prefix | set gateway prefix
| Lua | mit | funkring/gs5,amooma/GS5,funkring/gs5,amooma/GS5,funkring/gs5,amooma/GS5,amooma/GS5,funkring/gs5 |
a2435e70e8e07492bff8eec9a9c37f729ee49725 | otouto/plugins/twitter.lua | otouto/plugins/twitter.lua | local twitter = {}
function twitter:init(config)
if not cred_data.tw_consumer_key then
print('Missing config value: tw_consumer_key.')
print('twitter.lua will not be enabled.')
return
elseif not cred_data.tw_consumer_secret then
print('Missing config value: tw_consumer_secret.')
print('twitter.lua will not... | local twitter = {}
function twitter:init(config)
if not cred_data.tw_consumer_key then
print('Missing config value: tw_consumer_key.')
print('twitter.lua will not be enabled.')
return
elseif not cred_data.tw_consumer_secret then
print('Missing config value: tw_consumer_secret.')
print('twitter.lua will not... | Twitter: Fix, wenn Prozent in einer URL vorkommt | Twitter: Fix, wenn Prozent in einer URL vorkommt
| Lua | agpl-3.0 | Brawl345/Brawlbot-v2 |
fe8c368a032bce5f606b9bf30a83e9375f850ccd | realism/server/character_kill.lua | realism/server/character_kill.lua | function characterKill( player, causeOfDeath )
exports.database:execute( "UPDATE `characters` SET `is_dead` = '1', `cause_of_death` = ? WHERE `id` = ?", causeOfDeath, exports.common:getCharacterID( player ) )
setElementAlpha( player, 0 )
local ped = createPed( getElementModel( player ), getElementPosition( playe... | function characterKill( characterID, causeOfDeath )
local characterPlayer = exports.common:getPlayerByCharacterID( characterID )
if ( characterPlayer ) then
exports.accounts:saveCharacter( characterPlayer )
end
local character = exports.accounts:getCharacter( characterID )
if ( character ) and ( character.... | realism: fixes and improvements to cks | realism: fixes and improvements to cks
| Lua | mit | smile-tmb/lua-mta-fairplay-roleplay |
48b85ac89cc58341095d7c7d13abb1b5d34feb74 | tests/httpredirect.lua | tests/httpredirect.lua | -- test redirecting http <-> https combinations
local copas = require("copas")
local http = require("copas.http")
local ltn12 = require("ltn12")
local dump_all_headers = false
local redirect
local function doreq(url)
local reqt = {
url = url,
redirect = redirect, --> allows https-> http redirect
... | -- test redirecting http <-> https combinations
local copas = require("copas")
local http = require("copas.http")
local ltn12 = require("ltn12")
local dump_all_headers = false
local redirect
local socket = require "socket"
local function doreq(url)
local reqt = {
url = url,
redirect = redirect, -->... | fix(test) fixes the test for redirecting http->http | fix(test) fixes the test for redirecting http->http
fixes #75
| Lua | mit | keplerproject/copas |
1bab0c5b74a81dbda9ff52cc15223a455ba9d1d1 | mods/death_messages/init.lua | mods/death_messages/init.lua | -----------------------------------------------------------------------------------------------
local title = "Death Messages"
local version = "0.1.2"
local mname = "death_messages"
-----------------------------------------------------------------------------------------------
dofile(minetest.get_modpath("death_message... | -----------------------------------------------------------------------------------------------
local title = "Death Messages"
local version = "0.1.2"
local mname = "death_messages"
-----------------------------------------------------------------------------------------------
dofile(minetest.get_modpath("death_message... | fix mores bug fix wrong param adapt to new soundset version due to conflict name with death_messages | fix mores bug
fix wrong param
adapt to new soundset version due to conflict name with death_messages
| Lua | unlicense | Coethium/server-minetestforfun,LeMagnesium/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,Gael-de-Sailly/minetest-minetestforfun-server,MinetestForFun/server-minetestforfun,Ombridride/minetest-minetestforfun-server,Coethium/server-minetestforfun,Coethium/server-minetestforfun,MinetestForFun/min... |
4c84b9699024fdd2d8e1797dace396ef084b70d2 | aspects/vim/files/.vim/lua/wincent/init.lua | aspects/vim/files/.vim/lua/wincent/init.lua | local wincent = {}
local focused_flag = 'wincent_focused'
local ownsyntax_flag = 'wincent_ownsyntax'
-- +0,+1,+2, ... +254
local focused_colorcolumn = '+' .. table.concat({
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12',
'13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23',
'24',... | local wincent = {}
local focused_flag = 'wincent_focused'
local ownsyntax_flag = 'wincent_ownsyntax'
-- +0,+1,+2, ... +254
local focused_colorcolumn = '+' .. table.concat({
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12',
'13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23',
'24',... | fix(vim): avoid "filetype unknown" messages on empty buffers | fix(vim): avoid "filetype unknown" messages on empty buffers
| Lua | unlicense | wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent |
1a5b9bd5d9b4f383ef8ea132a2fde9c8a305b01c | modules/protocol/udp/udp.lua | modules/protocol/udp/udp.lua | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local ipv4 = require("protocol/ipv4")
local function compute_checksum(pkt)
local checksum = ipv4.inet_checksum()
... | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local ipv4 = require("protocol/ipv4")
local function compute_checksum(pkt)
local checksum = ipv4.inet_checksum()
... | Fix udp install criterions | Fix udp install criterions
| Lua | mpl-2.0 | nabilbendafi/haka,haka-security/haka,haka-security/haka,nabilbendafi/haka,haka-security/haka,nabilbendafi/haka |
7b87c1e46e64ad9534c9ac550d1a433533951d35 | kernel/turtle/ttl2flr.lua | kernel/turtle/ttl2flr.lua | -- convert turtle ontologies to F-Logic/Flora-2
local ttl2flr = {}
local turtleparse = require("turtleparse")
local __dump = require("pl.pretty").dump
-- no default prefix support in Flora-2, so we save it here and
-- substitute it upon encountering it
local __DEFAULT_PREFIX_URI
-- prefix index necessary to expand ... | -- convert turtle ontologies to F-Logic/Flora-2
local ttl2flr = {}
local turtleparse = require("turtleparse")
local __dump = require("pl.pretty").dump
-- no default prefix support in Flora-2, so we save it here and
-- substitute it upon encountering it
local __DEFAULT_PREFIX_URI
-- prefix index necessary to expand ... | ttl2flr: fix dates properly whether they're parsed as Qname or URI represent class membership via an RDF triple | ttl2flr:
fix dates properly whether they're parsed as Qname or URI
represent class membership via an RDF triple
| Lua | mit | jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico,jbalint/banshee-sympatico |
b055584e7b8f38890e8ee76e7c1a0e106b5158d1 | plugins/mod_motd.lua | plugins/mod_motd.lua | -- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2010 Jeff Mitchell
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local host = module:get_host();
local motd_text = module:get_option_s... | -- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2010 Jeff Mitchell
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local host = module:get_host();
local motd_text = module:get_option_s... | mod_motd: Send only to resource coming online, not the user's bare JID (fixes #282) | mod_motd: Send only to resource coming online, not the user's bare JID (fixes #282)
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
cceb3fce68c8403722d113f9975c119a92a9e56a | SparseBlockTemporalMaxPooling.lua | SparseBlockTemporalMaxPooling.lua | local SparseBlockTemporalMaxPooling, parent = torch.class('nn.SparseBlockTemporalMaxPooling', 'nn.Module')
function SparseBlockTemporalMaxPooling:__init(kW, dW, isRelax, isBP)
dW = dW or kW
self.kW = kW
self.dW = dW
self.isRelax = isRelax or false
self.isBP = isBP or true
end
function SparseBlockTempora... | local SparseBlockTemporalMaxPooling, parent = torch.class('nn.SparseBlockTemporalMaxPooling', 'nn.Module')
function SparseBlockTemporalMaxPooling:__init(kW, dW, isRelax, isBP)
dW = dW or kW
self.kW = kW
self.dW = dW
self.isRelax = isRelax or false
self.isBP = isBP or true
end
function SparseBlockTempora... | minor SparseBlockTemporalMaxPooling fix, due to torch update | minor SparseBlockTemporalMaxPooling fix, due to torch update
| Lua | apache-2.0 | ameenetemady/DeepPep,ameenetemady/DeepPep,ameenetemady/DeepPep |
5f00699af289b43930d63101fe0425241bf56892 | App/NevermoreEngine.lua | App/NevermoreEngine.lua | --- Nevermore module loader.
-- Used to simply resource loading and networking so a more unified server / client codebased can be used
-- @module Nevermore
local DEBUG_MODE = false -- Set to true to help identify what libraries have circular dependencies
local RunService = game:GetService("RunService")
local Replic... | --- Nevermore module loader.
-- Used to simply resource loading and networking so a more unified server / client codebased can be used
-- @module Nevermore
local DEBUG_MODE = false -- Set to true to help identify what libraries have circular dependencies
local RunService = game:GetService("RunService")
local Replicat... | FIx _retrieve implementation, this was a critical bug | FIx _retrieve implementation, this was a critical bug
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
28f235cbd8f872abf5f89a534ab6066fc3f3dfbe | ClassNLLCriterion.lua | ClassNLLCriterion.lua | local ClassNLLCriterion, parent = torch.class('nn.ClassNLLCriterion', 'nn.Criterion')
function ClassNLLCriterion:__init(weights)
parent.__init(self)
self.sizeAverage = true
self.outputTensor = torch.Tensor(1)
if weights then
assert(weights:dim() == 1, "weights input should be 1-D Tensor")
sel... | local ClassNLLCriterion, parent = torch.class('nn.ClassNLLCriterion', 'nn.Criterion')
function ClassNLLCriterion:__init(weights)
parent.__init(self)
self.sizeAverage = true
self.outputTensor = torch.Tensor(1)
if weights then
assert(weights:dim() == 1, "weights input should be 1-D Tensor")
sel... | fixing small cuda typing issue for ClassNLLCriterion | fixing small cuda typing issue for ClassNLLCriterion
| Lua | bsd-3-clause | xianjiec/nn,colesbury/nn,andreaskoepf/nn,joeyhng/nn,zhangxiangxiao/nn,eulerreich/nn,PierrotLC/nn,zchengquan/nn,sbodenstein/nn,Djabbz/nn,hery/nn,eriche2016/nn,davidBelanger/nn,ominux/nn,GregSatre/nn,sagarwaghmare69/nn,LinusU/nn,mlosch/nn,Aysegul/nn,hughperkins/nn,forty-2/nn,adamlerer/nn,rickyHong/nn_lib_torch,clementfar... |
011a7f2c47c9241527106de3d7d4c2fd48ed4339 | glove.lua | glove.lua | -- Glove is a compatibility layer
-- So that you can write LOVE modules
-- That work on 0.8.0, 0.9.0, and 0.9.1
--
-- The local functions are named after 0.8.0
local glove = {}
-- Features
local love9 = love._version == "0.9.0" or love._version == "0.9.1"
local love8 = love._version == "0.8.0"
require "love.filesyste... | -- Glove is a compatibility layer
-- So that you can write LOVE modules
-- That work on 0.8.0, 0.9.0, and 0.9.1
--
-- The local functions are named after 0.8.0
local glove = {}
-- Features
local love9 = love._version == "0.9.0" or love._version == "0.9.1"
local love8 = love._version == "0.8.0"
require "love.filesyste... | Added setPoint | Added setPoint
This is the same fix as setLine really. | Lua | mit | stackmachine/glove |
562055681c1ccf3b47857864d9363fb985ed7fac | packages/twoside/init.lua | packages/twoside/init.lua | local base = require("packages.base")
local package = pl.class(base)
package._name = "twoside"
local _odd = true
local mirrorMaster = function (_, existing, new)
-- Frames in one master can't "see" frames in another, so we have to get creative
-- XXX This knows altogether too much about the implementation of mas... | local base = require("packages.base")
local package = pl.class(base)
package._name = "twoside"
local _odd = true
local mirrorMaster = function (_, existing, new)
-- Frames in one master can't "see" frames in another, so we have to get creative
-- XXX This knows altogether too much about the implementation of mas... | fix(packages): Fix over-aggressive eject in \open-double-page | fix(packages): Fix over-aggressive eject in \open-double-page
The original implementation left hmode *AND* forces an eject before
starting processing. In rare cases where this is called very close to
a page being full it would actually result in two pages being emitted
rather than one before starting to iterate for od... | Lua | mit | alerque/sile,alerque/sile,alerque/sile,alerque/sile |
2b11071fbe28af58ba237659b51a5b93ec6f1b12 | Ace3.lua | Ace3.lua |
-- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess
-- for now only /rl to reload your UI :)
-- note the complete overkill use of AceAddon and console, ain't it cool?
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
local dialog = LibStub("AceConfigDia... |
-- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess
-- for now only /rl to reload your UI :)
-- note the complete overkill use of AceAddon and console, ain't it cool?
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
local dialog = LibStub("AceConfigDia... | Ace3 - potential fix for the /ace3 command being able to be used more then once | Ace3 - potential fix for the /ace3 command being able to be used more then once
git-svn-id: d324031ee001e5fbb202928c503a4bc65708d41c@425 5debad98-a965-4143-8383-f471b3509dcf
| Lua | bsd-3-clause | sarahgerweck/Ace3 |
7773cbd86676cc0e29e90241647f36041c165d64 | benchmark/set_sequential.lua | benchmark/set_sequential.lua | -- example dynamic request script which demonstrates changing
-- the request path and a header for each request
-------------------------------------------------------------
-- NOTE: each wrk thread has an independent Lua scripting
-- context and thus there will be one counter per thread
counter = 0
init = function(a... | -- example dynamic request script which demonstrates changing
-- the request path and a header for each request
-------------------------------------------------------------
-- NOTE: each wrk thread has an independent Lua scripting
-- context and thus there will be one counter per thread
counter = 0
init = function(a... | Fixed script to actually be sequential since it was actually random due to the integers being treated as strings. | Fixed script to actually be sequential since it was actually random due to the integers being treated as strings. | Lua | apache-2.0 | kellabyte/hellcat,kellabyte/hellcat,kellabyte/hellcat |
48610006d548421338e755c0c17a0313d3507c04 | frontend/ui/networkmgr.lua | frontend/ui/networkmgr.lua | local InfoMessage = require("ui/widget/infomessage")
local ConfirmBox = require("ui/widget/confirmbox")
local UIManager = require("ui/uimanager")
local Device = require("device")
local DEBUG = require("dbg")
local _ = require("gettext")
local NetworkMgr = {}
local function kindleEnableWifi(toggle)
local lipc = re... | local InfoMessage = require("ui/widget/infomessage")
local ConfirmBox = require("ui/widget/confirmbox")
local UIManager = require("ui/uimanager")
local Device = require("device")
local DEBUG = require("dbg")
local _ = require("gettext")
local NetworkMgr = {}
local function kindleEnableWifi(toggle)
local lipc = re... | fix a case when "ip r" command fails | fix a case when "ip r" command fails
our network manager script isn't the beauty of the code base.
However, this fixes a case where it would crash the reader when an
external command fails.
fixes #1279.
| Lua | agpl-3.0 | mwoz123/koreader,apletnev/koreader,lgeek/koreader,ashhher3/koreader,chihyang/koreader,houqp/koreader,NiLuJe/koreader,poire-z/koreader,koreader/koreader,NickSavage/koreader,robert00s/koreader,pazos/koreader,mihailim/koreader,chrox/koreader,ashang/koreader,koreader/koreader,NiLuJe/koreader,Frenzie/koreader,Hzj-jie/koread... |
1613ec16e8141f07b8cd5757d165a59001a84ff4 | SVUI_Skins/components/blizzard/worldmap.lua | SVUI_Skins/components/blizzard/worldmap.lua | --[[
##############################################################################
S V U I By: Failcoder
##############################################################################
--]]
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.select;
--[[ ADDON ]]--
local SV = _G['SVUI'];
lo... | --[[
##############################################################################
S V U I By: Failcoder
##############################################################################
--]]
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.select;
--[[ ADDON ]]--
local SV = _G['SVUI'];
lo... | WorldMapFrame fix... | WorldMapFrame fix...
Of course the worldmapframe is different...
| Lua | mit | FailcoderAddons/supervillain-ui |
9456f71e9c925b0cb3ff0cc80ba37844a0b44fb5 | init.lua | init.lua | -- WAD SPRINTING minetest (https://minetest.net) mod (https://dev.minetest.net/Intro)
-- @link https://github.com/aa6/minetest_wadsprint
minetest_wadsprint =
{
players = {},
}
dofile(minetest.get_modpath(minetest.get_current_modname()).."/config.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/... | -- WAD SPRINTING minetest (https://minetest.net) mod (https://dev.minetest.net/Intro)
-- @link https://github.com/aa6/minetest_wadsprint
minetest_wadsprint =
{
players = {},
}
dofile(minetest.get_modpath(minetest.get_current_modname()).."/config.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/... | Player stamina could be greater than max value fix | Player stamina could be greater than max value fix | Lua | agpl-3.0 | aa6/minetest_wadsprint |
2f4a5022655a2dc5c4b35181efbbb30ab2092707 | main.lua | main.lua | io.stdout:setvbuf("no")
local reboot, events = false
--Internal Callbacks--
function love.load(args)
love.filesystem.load("BIOS/init.lua")() --Initialize the BIOS.
events:trigger("love:load")
end
function love.run(arg)
while true do
events = require("Engine.events")
events:register("love:reb... | io.stdout:setvbuf("no")
local reboot, events = false
--Internal Callbacks--
function love.load(args)
love.filesystem.load("BIOS/init.lua")() --Initialize the BIOS.
events:trigger("love:load")
end
function love.run(arg)
while true do
events = require("Engine.events")
events:register("love:reb... | Bugfix for bitop on soft rebooting | Bugfix for bitop on soft rebooting
| Lua | mit | RamiLego4Game/LIKO-12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.