commit
stringlengths
40
40
old_file
stringlengths
6
92
new_file
stringlengths
6
92
old_contents
stringlengths
0
2.22k
new_contents
stringlengths
68
2.86k
subject
stringlengths
19
253
message
stringlengths
20
711
lang
stringclasses
1 value
license
stringclasses
11 values
repos
stringlengths
10
33.5k
b8c1b19db880689eb4cf861f68833bbfb9b1dfc2
CCLib/src/java/lang/native/Throwable.lua
CCLib/src/java/lang/native/Throwable.lua
natives["java.lang.Throwable"] = natives["java.lang.Throwable"] or {} natives["java.lang.Throwable"]["fillInStackTrace()Ljava/lang/Throwable;"] = function(this) local stackTrace = newArray(getArrayClass("[Ljava.lang.StackTraceElement;"), 0) local lStackTrace = getStackTrace() stackTrace[4] = #lStackTrace - 1 local StackTraceElement = classByName("java.lang.StackTraceElement") for i=1,#lStackTrace-1 do local v = lStackTrace[i] stackTrace[5][i] = newInstance(StackTraceElement) local m = findMethod(StackTraceElement, "<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V") local lineNumber = v.lineNumber if bit.band(m.acc,METHOD_ACC.NATIVE) == METHOD_ACC.NATIVE then lineNumber = -2 end m[1](stackTrace[5][i], toJString(v.className), toJString(v.methodName), toJString(v.fileName or ""), lineNumber or -1) end setObjectField(this, "stackTrace", stackTrace) return this end
natives["java.lang.Throwable"] = natives["java.lang.Throwable"] or {} natives["java.lang.Throwable"]["fillInStackTrace()Ljava/lang/Throwable;"] = function(this) local stackTrace = newArray(getArrayClass("[Ljava.lang.StackTraceElement;"), 0) local lStackTrace = getStackTrace() stackTrace[4] = #lStackTrace - 1 local StackTraceElement = classByName("java.lang.StackTraceElement") for i=1,#lStackTrace-1 do local v = lStackTrace[i] stackTrace[5][#lStackTrace - i] = newInstance(StackTraceElement) local m = findMethod(StackTraceElement, "<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V") local lineNumber = v.lineNumber if bit.band(m.acc,METHOD_ACC.NATIVE) == METHOD_ACC.NATIVE then lineNumber = -2 end m[1](stackTrace[5][#lStackTrace - i], toJString(v.className), toJString(v.methodName), toJString(v.fileName or ""), lineNumber or -1) end setObjectField(this, "stackTrace", stackTrace) return this end
Fix stack trace order being reversed
Fix stack trace order being reversed
Lua
mit
Team-CC-Corp/JVML-JIT,apemanzilla/JVML-JIT
64e34a76a5d2931224b80afa182610fc80eea4cd
contrib/prosody_cfg_snippet.lua
contrib/prosody_cfg_snippet.lua
disoc_items = { { "upload.yoursite.tld", "request slots to upload files via http"}; } Component "upload.yoursite.tld" component_secret = "yoursecret"
disco_items = { { "upload.yoursite.tld", "request slots to upload files via http"}; } Component "upload.yoursite.tld" component_secret = "yoursecret"
Fix typo in prosody config snippet
Fix typo in prosody config snippet
Lua
agpl-3.0
siacs/HttpUploadComponent,SamWhited/HttpUploadComponent,SamWhited/HttpUploadComponent,siacs/HttpUploadComponent
995dd065ffd01471b8a57397df34fd30c8736952
scripts/changes.lua
scripts/changes.lua
--- -- Output a list of merged PRs since last release in the CHANGES.txt format --- local format_separator = "||" local git_command_raw = 'git log '.. '%s/master "^%s/release" '.. '--merges --first-parent '.. '--pretty="%%s%s%%b" '.. '--grep="Merge pull request #"' local changes_pr_format = "* PR #%s %s (@%s)" local function parse_log(line) change = {} for chunk in line:gmatch(string.format("[^%s]+", format_separator)) do table.insert(change, chunk) end assert(#change == 2) local _, _, pr_num = change[1]:find("%s#([%d]+)%s") local _, _, pr_author = change[1]:find("from%s([^/]+)") local pr_desc = change[2] return { number = tonumber(pr_num), author = pr_author, description = pr_desc } end local function gather_changes() local git_command = git_command_raw:format(_OPTIONS["remote"], _OPTIONS["remote"], format_separator) local output = os.outputof(git_command) changes = {} for line in output:gmatch("[^\r\n]+") do table.insert(changes, parse_log(line)) end return changes end local function format_to_changes(changes) changes_copy = changes local function compare_changes(a, b) return a.number < b.number end table.sort(changes, compare_changes) for _, change in pairs(changes_copy) do print(string.format(changes_pr_format, change.number, change.description, change.author)) end end local function generate_changes() changes = gather_changes() format_to_changes(changes) end newaction { trigger = "changes", description = "Generate a file containing merged pull requests in CHANGES.txt format", execute = generate_changes } newoption { trigger = "remote", value = "remoteName", description = "Git remote to operate on.", default = "origin", } --- -- Check the command line arguments, and show some help if needed. --- local usage = 'usage is: --file=<path to this scripts/changes.lua> changes' if #_ARGS ~= 0 then error(usage, 0) end
Add script to compute PRs git logs to CHANGES.md format
Add script to compute PRs git logs to CHANGES.md format Replace PRlogs_to_RELEASE_format.py with changes.lua changes.lua: Add an option to choose remote + set origin as default remote changes.lua: Simplify sort changes.lua: Fix regex matching author name
Lua
bsd-3-clause
TurkeyMan/premake-core,TurkeyMan/premake-core,soundsrc/premake-core,sleepingwit/premake-core,starkos/premake-core,premake/premake-core,dcourtois/premake-core,noresources/premake-core,noresources/premake-core,dcourtois/premake-core,starkos/premake-core,LORgames/premake-core,premake/premake-core,noresources/premake-core,dcourtois/premake-core,sleepingwit/premake-core,premake/premake-core,premake/premake-core,sleepingwit/premake-core,TurkeyMan/premake-core,dcourtois/premake-core,TurkeyMan/premake-core,TurkeyMan/premake-core,LORgames/premake-core,mandersan/premake-core,noresources/premake-core,starkos/premake-core,noresources/premake-core,dcourtois/premake-core,dcourtois/premake-core,mandersan/premake-core,mandersan/premake-core,dcourtois/premake-core,soundsrc/premake-core,starkos/premake-core,noresources/premake-core,mandersan/premake-core,premake/premake-core,starkos/premake-core,soundsrc/premake-core,starkos/premake-core,starkos/premake-core,sleepingwit/premake-core,premake/premake-core,LORgames/premake-core,sleepingwit/premake-core,soundsrc/premake-core,soundsrc/premake-core,LORgames/premake-core,LORgames/premake-core,noresources/premake-core,mandersan/premake-core,premake/premake-core
bc00a3b90d7820b94ecddb3579bdda5d36ce0009
lib/pkg/rustup.lua
lib/pkg/rustup.lua
return { -- the executable should be named 'rustup-init' or it will not run -- complaining that the default toolchain is not set source = { 'dist', 'https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init' }, build = { type = 'executable', system = 'x86_64-unknown-linux-gnu', options = { '-y', '--no-modify-path', '--default-host', '$pkg_build_system', '--default-toolchain', 'stable' } }, install = true, env = { RUSTUP_HOME = '$jagen_dist_dir/rustup', CARGO_HOME = "$pkg_build_dir" }, export = { env = { RUSTUP_HOME = '$pkg_env_RUSTUP_HOME', CARGO_HOME = '$pkg_env_CARGO_HOME', } } }
return { -- the executable should be named 'rustup-init' or it will not run -- complaining that the default toolchain is not set source = { 'dist', 'https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init' }, build = { type = 'executable', system = 'x86_64-unknown-linux-gnu', options = { '-y', '--no-modify-path', '--default-host', '$pkg_build_system', '--default-toolchain', 'stable-x86_64-unknown-linux-gnu' } }, install = true, env = { RUSTUP_HOME = '$jagen_dist_dir/rustup', CARGO_HOME = "$pkg_build_dir" }, export = { env = { RUSTUP_HOME = '$pkg_env_RUSTUP_HOME', CARGO_HOME = '$pkg_env_CARGO_HOME', } } }
Use full name for rust toolchain
Use full name for rust toolchain
Lua
mit
bazurbat/jagen
f6564a93afd539f17c039aebe179194a931de921
tests/testParsing.lua
tests/testParsing.lua
require 'dokx' local tester = torch.Tester() local myTests = {} function myTests:testParseWhitespace() local parser = dokx.createParser("dummyPackageName", "dummySourceFile") local testInput = " \n\t " local result = parser(testInput) tester:asserteq(type(result), 'table', "should be a table") tester:asserteq(#result, 0, "should be empty") end function myTests:testParseDocumentedFunction() local parser = dokx.createParser("dummyPackageName", "dummySourceFile") local testInput = [[-- this is some dummy documentation function foo() end ]] local result = parser(testInput) tester:asserteq(type(result), 'table', "should be a table") tester:asserteq(#result, 2, "should be size two") local entity1 = result[1] tester:assert(entity1:is_a(dokx.Comment), "should be a comment") tester:asserteq(entity1:text(), "this is some dummy documentation\n", "should have expected text") tester:asserteq(entity1:package(), "dummyPackageName", "should have expected package name") tester:asserteq(entity1:file(), "dummySourceFile", "should have expected source file") tester:asserteq(entity1:lineNo(), 2, "should have expected line number") local entity2 = result[2] tester:assert(entity2:is_a(dokx.Function), "should be a function") tester:asserteq(entity2:name(), "foo", "should have expected name") tester:asserteq(entity2:class(), false, "should have no class") tester:asserteq(entity2:package(), "dummyPackageName", "should have expected package name") tester:asserteq(entity2:file(), "dummySourceFile", "should have expected source file") tester:asserteq(entity2:lineNo(), 5, "should have expected line number") end tester:add(myTests) tester:run()
Add tests for doc parsing
Add tests for doc parsing
Lua
bsd-3-clause
deepmind/torch-dokx,deepmind/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx,deepmind/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx
5c8d7cceb643a345cf3e365f9f58d8110da05637
build/LLVM.lua
build/LLVM.lua
-- Setup the LLVM dependency directories LLVMRootDir = "../../deps/llvm/" LLVMBuildDir = "../../deps/llvm/build/" -- TODO: Search for available system dependencies function SetupLLVMLibs() local c = configuration() includedirs { path.join(LLVMRootDir, "include"), path.join(LLVMRootDir, "tools/clang/include"), path.join(LLVMRootDir, "tools/clang/lib"), path.join(LLVMBuildDir, "include"), path.join(LLVMBuildDir, "tools/clang/include"), } configuration { "Debug", "vs*" } libdirs { path.join(LLVMBuildDir, "Debug/lib") } configuration { "Release", "vs*" } libdirs { path.join(LLVMBuildDir, "RelWithDebInfo/lib") } configuration "not vs*" buildoptions { "-fpermissive" } defines { "__STDC_CONSTANT_MACROS", "__STDC_LIMIT_MACROS" } libdirs { path.join(LLVMBuildDir, "lib") } configuration "macosx" links { "c++", "curses", "pthread", "z" } configuration(c) end
-- Setup the LLVM dependency directories LLVMRootDir = "../../deps/llvm/" LLVMBuildDir = "../../deps/llvm/build/" -- TODO: Search for available system dependencies function SetupLLVMLibs() local c = configuration() includedirs { path.join(LLVMRootDir, "include"), path.join(LLVMRootDir, "tools/clang/include"), path.join(LLVMRootDir, "tools/clang/lib"), path.join(LLVMBuildDir, "include"), path.join(LLVMBuildDir, "tools/clang/include"), } libdirs { path.join(LLVMBuildDir, "lib") } configuration { "Debug", "vs*" } libdirs { path.join(LLVMBuildDir, "Debug/lib") } configuration { "Release", "vs*" } libdirs { path.join(LLVMBuildDir, "RelWithDebInfo/lib") } configuration "not vs*" buildoptions { "-fpermissive" } defines { "__STDC_CONSTANT_MACROS", "__STDC_LIMIT_MACROS" } configuration "macosx" links { "c++", "curses", "pthread", "z" } configuration(c) end
Add "lib" folder to lib dirs even in VS to allow ninja builds.
Add "lib" folder to lib dirs even in VS to allow ninja builds.
Lua
mit
ddobrev/CppSharp,txdv/CppSharp,mydogisbox/CppSharp,genuinelucifer/CppSharp,genuinelucifer/CppSharp,inordertotest/CppSharp,imazen/CppSharp,mono/CppSharp,KonajuGames/CppSharp,mono/CppSharp,mohtamohit/CppSharp,xistoso/CppSharp,ddobrev/CppSharp,inordertotest/CppSharp,txdv/CppSharp,genuinelucifer/CppSharp,mydogisbox/CppSharp,mydogisbox/CppSharp,ktopouzi/CppSharp,nalkaro/CppSharp,KonajuGames/CppSharp,KonajuGames/CppSharp,mohtamohit/CppSharp,mono/CppSharp,txdv/CppSharp,mohtamohit/CppSharp,KonajuGames/CppSharp,ddobrev/CppSharp,SonyaSa/CppSharp,zillemarco/CppSharp,xistoso/CppSharp,zillemarco/CppSharp,txdv/CppSharp,mohtamohit/CppSharp,mydogisbox/CppSharp,zillemarco/CppSharp,mono/CppSharp,inordertotest/CppSharp,ktopouzi/CppSharp,u255436/CppSharp,imazen/CppSharp,u255436/CppSharp,zillemarco/CppSharp,Samana/CppSharp,inordertotest/CppSharp,mydogisbox/CppSharp,zillemarco/CppSharp,ktopouzi/CppSharp,ktopouzi/CppSharp,genuinelucifer/CppSharp,imazen/CppSharp,xistoso/CppSharp,u255436/CppSharp,inordertotest/CppSharp,nalkaro/CppSharp,Samana/CppSharp,imazen/CppSharp,u255436/CppSharp,mono/CppSharp,xistoso/CppSharp,SonyaSa/CppSharp,KonajuGames/CppSharp,mono/CppSharp,nalkaro/CppSharp,ktopouzi/CppSharp,mohtamohit/CppSharp,imazen/CppSharp,Samana/CppSharp,Samana/CppSharp,txdv/CppSharp,SonyaSa/CppSharp,nalkaro/CppSharp,SonyaSa/CppSharp,ddobrev/CppSharp,Samana/CppSharp,SonyaSa/CppSharp,genuinelucifer/CppSharp,ddobrev/CppSharp,u255436/CppSharp,nalkaro/CppSharp,xistoso/CppSharp
85492a2e3915be3feefc9648ea7e08a8ef76cf94
sample/tutorial/filter/ipfilter.lua
sample/tutorial/filter/ipfilter.lua
------------------------------------ -- Loading dissectors ------------------------------------ -- We assign ipv4 because we'll need some function -- provided by dissector later in a security rule local ipv4 = require('protocol/ipv4') ------------------------------------ -- Security rule ------------------------------------ haka.rule { -- This rule is applied on each IP incoming packet hooks = { 'ipv4-up' }, eval = function (self, pkt) -- We assign a variable to an IP address thanks to -- the ipv4.addr function local bad_ip = ipv4.addr('192.168.10.10') if pkt.src == bad_ip then -- We want to block this IP haka.log("Filter", "Filtering IP %s", bad_ip) pkt:drop() end -- All other packets will be accepted end }
------------------------------------ -- Loading dissectors ------------------------------------ -- We assign ipv4 because we'll need some function -- provided by dissector later in a security rule local ipv4 = require('protocol/ipv4') ------------------------------------ -- Security rule ------------------------------------ haka.rule { -- This rule is applied on each IP incoming packet hooks = { 'ipv4-up' }, eval = function (self, pkt) -- We assign a variable to an IP address thanks to -- the ipv4.addr function local bad_ip = ipv4.addr('192.168.10.10') if pkt.src == bad_ip then -- We want to block this IP pkt:drop() haka.log.info("Filter", "Filtering IP %s", bad_ip) end -- All other packets will be accepted end }
Put tab instead of 8 spaces
Put tab instead of 8 spaces
Lua
mpl-2.0
nabilbendafi/haka,lcheylus/haka,lcheylus/haka,Wingless-Archangel/haka,haka-security/haka,LubyRuffy/haka,LubyRuffy/haka,nabilbendafi/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,haka-security/haka,lcheylus/haka
300127a234189905ef7289f9374156d5daee047c
src/Generator.Tests/Generator.Tests.lua
src/Generator.Tests/Generator.Tests.lua
project "CppSharp.Generator.Tests" kind "SharedLib" language "C#" location "." files { "**.cs" } libdirs { depsdir .. "/NUnit", depsdir .. "/NSubstitute" } links { "System", "System.Core", "CppSharp", "CppSharp.AST", "CppSharp.Generator", ParserLib, "NUnit.Framework", "NSubstitute" }
project "CppSharp.Generator.Tests" kind "SharedLib" language "C#" location "." files { "**.cs" } libdirs { depsdir .. "/NUnit", depsdir .. "/NSubstitute" } SetupParser() links { "System", "System.Core", "CppSharp", "CppSharp.AST", "CppSharp.Generator", "NUnit.Framework", "NSubstitute" }
Remove ParserLib and use SetupParser() in Generator.Test build script.
Remove ParserLib and use SetupParser() in Generator.Test build script.
Lua
mit
nalkaro/CppSharp,SonyaSa/CppSharp,nalkaro/CppSharp,inordertotest/CppSharp,mohtamohit/CppSharp,mohtamohit/CppSharp,Samana/CppSharp,mono/CppSharp,imazen/CppSharp,mydogisbox/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp,imazen/CppSharp,inordertotest/CppSharp,SonyaSa/CppSharp,xistoso/CppSharp,ktopouzi/CppSharp,nalkaro/CppSharp,mydogisbox/CppSharp,KonajuGames/CppSharp,KonajuGames/CppSharp,xistoso/CppSharp,imazen/CppSharp,imazen/CppSharp,ddobrev/CppSharp,mohtamohit/CppSharp,mohtamohit/CppSharp,Samana/CppSharp,genuinelucifer/CppSharp,u255436/CppSharp,mono/CppSharp,ddobrev/CppSharp,ktopouzi/CppSharp,zillemarco/CppSharp,inordertotest/CppSharp,mono/CppSharp,genuinelucifer/CppSharp,Samana/CppSharp,inordertotest/CppSharp,genuinelucifer/CppSharp,ddobrev/CppSharp,txdv/CppSharp,u255436/CppSharp,ktopouzi/CppSharp,mydogisbox/CppSharp,genuinelucifer/CppSharp,mono/CppSharp,xistoso/CppSharp,mydogisbox/CppSharp,txdv/CppSharp,SonyaSa/CppSharp,nalkaro/CppSharp,inordertotest/CppSharp,SonyaSa/CppSharp,genuinelucifer/CppSharp,ddobrev/CppSharp,KonajuGames/CppSharp,imazen/CppSharp,u255436/CppSharp,ktopouzi/CppSharp,txdv/CppSharp,u255436/CppSharp,SonyaSa/CppSharp,xistoso/CppSharp,txdv/CppSharp,u255436/CppSharp,nalkaro/CppSharp,zillemarco/CppSharp,mono/CppSharp,Samana/CppSharp,xistoso/CppSharp,KonajuGames/CppSharp,mono/CppSharp,ddobrev/CppSharp,Samana/CppSharp,KonajuGames/CppSharp,zillemarco/CppSharp,ktopouzi/CppSharp,mohtamohit/CppSharp,txdv/CppSharp,mydogisbox/CppSharp
6ee2b75438c9c423a261e0743be5bc09ad1ccbe0
fixture/Lua/input_code/Seed.lua
fixture/Lua/input_code/Seed.lua
i = 0 f() if i == 0 then if j ~= 0 then elseif 2 > j then end elseif 1 < i then end while i ~= 0 do while j == 0 do end end repeat repeat until j ~= 0 until i == 0 for i = 0, 1, 1 do for j = 2, 3, 4 do end end ; ::Label:: i = 0
print(1) print(1, 2) i = 0 f() if i == 0 then if j ~= 0 then elseif 2 > j then end elseif 1 < i then end while i ~= 0 do while j == 0 do end end repeat repeat until j ~= 0 until i == 0 for i = 0, 1, 1 do for j = 2, 3, 4 do end end ; ::Label:: i = 0
Enhance seed code of Lua.
Enhance seed code of Lua.
Lua
apache-2.0
exKAZUu/ParserTests,exKAZUu/ParserTests,exKAZUu/ParserTests,exKAZUu/ParserTests,exKAZUu/ParserTests,exKAZUu/ParserTests,exKAZUu/ParserTests
d377889e67ae9e0cfb54c93887e2a02888afab1f
luasrc/markdown.lua
luasrc/markdown.lua
--- Handle Markdown generation require 'logging.console' local logger = logging.console() logger:setLevel(logging.DEBUG) local textx = require 'pl.text' class.MarkdownWriter() function MarkdownWriter:_init(outputPath, packageName) self.outputFile = io.open(outputPath, 'w') self.packageName = packageName lapp.assert(self.outputFile, "could not open output file " .. outputPath) self:writeHeader() end function MarkdownWriter:write(text) self.outputFile:write(text) end function MarkdownWriter:writeHeader() self:write("# Module " .. self.packageName .. "\n\n") end function MarkdownWriter:documentEntity(entity) logger:debug("Outputting markdown for " .. entity:name()) local template = textx.Template([[ ## Function ${name} ${doc} ]]) local outputText = template:substitute { name = entity:name(), doc = entity:doc(), } self:write(outputText) end function MarkdownWriter:close() io.close(self.outputFile) end
--- Handle Markdown generation require 'logging.console' local logger = logging.console() logger:setLevel(logging.DEBUG) local textx = require 'pl.text' class.MarkdownWriter() --[[ Constructor for MarkdownWriter Args: * `outputPath` - string; path to write to * `packageName` - string; name of package being documented Returns: new MarkdownWriter object ]] function MarkdownWriter:_init(outputPath, packageName) self.outputFile = io.open(outputPath, 'w') self.packageName = packageName lapp.assert(self.outputFile, "could not open output file " .. outputPath) self:writeHeader() end function MarkdownWriter:write(text) self.outputFile:write(text) end function MarkdownWriter:writeHeader() self:write("# Module " .. self.packageName .. "\n\n") end function MarkdownWriter:documentEntity(entity) print(entity:str()) logger:debug("Outputting markdown for " .. entity:name()) local valueTable = { name = entity:name() or "{missing name}", doc = entity:doc() or "{missing docs}", } local outputText = "## " .. valueTable.name .. "\n" .. valueTable.doc -- local outputText = template:substitute(valueTable) self:write(outputText) end function MarkdownWriter:close() io.close(self.outputFile) end
Remove template.substitute; it seems unreliable
Remove template.substitute; it seems unreliable
Lua
bsd-3-clause
deepmind/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx,deepmind/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx,yozw/torch-dokx,deepmind/torch-dokx,Gueust/torch-dokx
aebfd721e40c191b85077238501c92c406d9773a
mod_proctitle/mod_proctitle.lua
mod_proctitle/mod_proctitle.lua
-- Changes the process name to 'prosody' rather than 'lua'/'lua5.1' -- Copyright (C) 2015 Rob Hoelz -- -- This file is MIT/X11 licensed. local proctitle = require 'proctitle'; proctitle 'prosody';
-- Changes the process name to 'prosody' rather than 'lua'/'lua5.1' -- Copyright (C) 2015 Rob Hoelz -- -- This file is MIT/X11 licensed. -- To use this module, you'll need the proctitle Lua library: -- https://github.com/hoelzro/lua-proctitle local proctitle = require 'proctitle'; proctitle 'prosody';
Add minimal instructions for proctitle module
Add minimal instructions for proctitle module
Lua
mit
BurmistrovJ/prosody-modules,BurmistrovJ/prosody-modules,BurmistrovJ/prosody-modules,softer/prosody-modules,BurmistrovJ/prosody-modules,softer/prosody-modules,softer/prosody-modules,softer/prosody-modules,BurmistrovJ/prosody-modules,softer/prosody-modules
4ee5170c5d781905a78ed70e3f983b498b133889
share/lua/playlist/bbc_co_uk.lua
share/lua/playlist/bbc_co_uk.lua
--[[ $Id$ Copyright © 2008 the VideoLAN team Authors: Dominique Leuenberger <dominique-vlc.suse@leuenberger.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. --]] -- Probe function. function probe() return vlc.access == "http" and string.match( vlc.path, "bbc.co.uk/iplayer/" ) end -- Parse function. function parse() p = {} while true do -- Try to find the video's title line = vlc.readline() if not line then break end if string.match( line, "title: " ) then _,_,name = string.find( line, "title: \"(.*)\"" ) end if string.match( line, "metaFile: \".*%.ram\"" ) then _,_,video = string.find( line, "metaFile: \"(.-)\"" ) table.insert( p, { path = video; name = name } ) end end return p end
Add support for bbc.co.uk iPLayer URLs (LUA Script)
Add support for bbc.co.uk iPLayer URLs (LUA Script) Radio only for the moment Signed-off-by: Christophe Mutricy <b985b104de4aa0cfb6e0672234aee2c11ae7a2b2@videolan.org>
Lua
lgpl-2.1
shyamalschandra/vlc,jomanmuk/vlc-2.2,krichter722/vlc,krichter722/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,shyamalschandra/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,shyamalschandra/vlc,xkfz007/vlc,xkfz007/vlc,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,krichter722/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc,jomanmuk/vlc-2.2,krichter722/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,shyamalschandra/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,vlc-mirror/vlc,xkfz007/vlc,vlc-mirror/vlc-2.1,krichter722/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,xkfz007/vlc,vlc-mirror/vlc,krichter722/vlc,vlc-mirror/vlc-2.1,shyamalschandra/vlc
e0a878e60a2478b73376bc7080a5f313c784b3f3
sample/tutorial/hellopacket/hellopacket.lua
sample/tutorial/hellopacket/hellopacket.lua
-- Use this file with hakapcap tool: -- -- hakapcap hellopacket.pcap hellopacket.lua -- (adjust paths) --The require lines tolds Haka which dissector --it has to register. Those dissectors gives hook --to interfere with it. require("protocol/ipv4") require("protocol/tcp") --This is a rule haka.rule { --The hooks tells where this rule is applied hooks = {"ipv4-up"}, --Each rule have an eval function --Function is always build with (self, name) --The name is later use for action eval = function (self, pkt) --All fields is accessible through accessors --following wireshark/tcpdump semantics --Documentation list all accessors print(string.format("Hello packet from %s to %s", pkt.src, pkt.dst)) end } --Any number of rule is authorized haka.rule { --The hooks is place on the TCP connection hooks = {"tcp-connection-new"}, eval = function (self, pkt) --Fields from previous layer is accessible too print(string.format("Hello TCP connection from %s:%d to %s:%d", pkt.tcp.ip.src, pkt.tcp.srcport, pkt.tcp.ip.dst, pkt.tcp.dstport)) end }
-- Use this file with hakapcap tool: -- -- hakapcap hellopacket.pcap hellopacket.lua -- (adjust paths) --The require lines tolds Haka which dissector --it has to register. Those dissectors gives hook --to interfere with it. require("protocol/ipv4") require("protocol/tcp") --This is a rule haka.rule { --The hooks tells where this rule is applied hooks = {"ipv4-up"}, --Each rule have an eval function --Function is always build with (self, name) --The name is later use for action eval = function (self, pkt) --All fields is accessible through accessors --following wireshark/tcpdump semantics --Documentation list all accessors haka.log("debug","Hello packet from %s to %s", pkt.src, pkt.dst) end } --Any number of rule is authorized haka.rule { --The hooks is place on the TCP connection hooks = {"tcp-connection-new"}, eval = function (self, pkt) --Fields from previous layer is accessible too haka.log("debug","Hello TCP connection from %s:%d to %s:%d", pkt.tcp.ip.src, pkt.tcp.srcport, pkt.tcp.ip.dst, pkt.tcp.dstport) end }
Use log message instead of print
Use log message instead of print
Lua
mpl-2.0
Wingless-Archangel/haka,nabilbendafi/haka,haka-security/haka,lcheylus/haka,haka-security/haka,nabilbendafi/haka,lcheylus/haka,haka-security/haka,LubyRuffy/haka,lcheylus/haka,LubyRuffy/haka,nabilbendafi/haka,Wingless-Archangel/haka
a6746fc37e02d26144f00bf93ba5b36b803313a0
scripts/generate-html-docs.lua
scripts/generate-html-docs.lua
local lapp = require 'pl.lapp' require 'logging.console' local logger = logging.console() logger:setLevel(logging.DEBUG) local function processArgs() return lapp [[ Build HTML documentation from the extracted Markdown, using Sundown. -i,--input (string) input .md file -o,--output (string) output .html file ]] end function readFile(inputPath) lapp.assert(path.isfile(inputPath), "Not a file: " .. tostring(inputPath)) logger:debug("Opening " .. tostring(inputPath)) local inputFile = io.open(inputPath, "rb") lapp.assert(inputFile, "Could not open: " .. tostring(inputPath)) local content = inputFile:read("*all") inputFile:close() return content end local function handleFile(markdownFile, outputPath) local sundown = require 'sundown' local content = readFile(markdownFile) local rendered = sundown.render(content) local outputFile = io.open(outputPath, 'w') logger:debug("Writing to " .. outputPath) lapp.assert(outputFile, "Could not open: " .. outputPath) outputFile:write(rendered) outputFile:close() end local function main() local args = processArgs() handleFile(args.input, args.output) end main()
Add script for building HTML from Markdown
Add script for building HTML from Markdown Uses Sundown
Lua
bsd-3-clause
deepmind/torch-dokx,yozw/torch-dokx,deepmind/torch-dokx,deepmind/torch-dokx,Gueust/torch-dokx,Gueust/torch-dokx,Gueust/torch-dokx,yozw/torch-dokx,yozw/torch-dokx
e808c7178702d5b0b477c4619525f50fe94c6cb2
neovim/.config/nvim/lua/plugins/toggleterm.lua
neovim/.config/nvim/lua/plugins/toggleterm.lua
require("toggleterm").setup{ size = 20, open_mapping = [[<c-\>]], hide_numbers = true, -- hide the number column in toggleterm buffers shade_filetypes = {}, shade_terminals = true, shading_factor = 1, -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light start_in_insert = true, insert_mappings = true, -- whether or not the open mapping applies in insert mode persist_size = true, -- direction = 'float', direction = 'horizontal', close_on_exit = true, -- close the terminal window when the process exits shell = vim.o.shell, -- change the default shell -- This field is only relevant if direction is set to 'float' float_opts = { border = 'curved', winblend = 0, highlights = { border = "Normal", background = "Normal", } } }
require("toggleterm").setup{ size = 20, open_mapping = [[<c-\>]], hide_numbers = true, shade_filetypes = {}, shade_terminals = true, shading_factor = 1, start_in_insert = true, insert_mappings = true, persist_size = true, direction = 'horizontal', close_on_exit = true, shell = vim.o.shell, float_opts = { border = 'curved', winblend = 0, highlights = { border = "Normal", background = "Normal", } } } local Terminal = require('toggleterm.terminal').Terminal local top = Terminal:new({ cmd = "command -v htop 2>&1 /dev/null && htop || top", hidden = true, shell = vim.o.shell, -- change the default shell direction = "float", float_opts = { border = 'curved', winblend = 0, }, }) function _top_toggle() top:toggle() end vim.api.nvim_set_keymap("n", "<leader>tt", "<cmd>lua _top_toggle()<CR>", {noremap = true, silent = true}) vim.api.nvim_set_keymap("t", "<leader>tt", "<cmd>lua _top_toggle()<CR>", {noremap = true, silent = true})
Add htop float terminal to neovim config
Add htop float terminal to neovim config
Lua
apache-2.0
garym/dotfiles,garym/dotfiles
3a2698f4e4c33ab055afa6ed1d57b95ef7af8f16
spec/core/router_spec.lua
spec/core/router_spec.lua
require 'spec/spec_helper' describe("Router", function() before_each(function() router = require 'core/router' routes = require('core/routes') router.dispatchers = {} end) after_each(function() package.loaded['core/router'] = nil package.loaded['core/routes'] = nil end) describe(".match", function() before_each(function() -- set routes routes.POST("/users", { controller = "users", action = "create" }) routes.GET("/users", { controller = "users", action = "index" }) routes.GET("/users/:id", { controller = "users", action = "show" }) routes.PUT("/users/:id", { controller = "users", action = "edit" }) router.dispatchers = routes.dispatchers end) it("returns the controller, action and params", function() ngx = { var = { uri = "/users/roberto", request_method = "GET" } } controller, action, params = router.match(ngx) assert.are.same("users_controller", controller) assert.are.same("show", action) assert.are.same({ id = "roberto" }, params) end) end) end)
require 'spec/spec_helper' describe("Router", function() before_each(function() router = require 'core/router' routes = require('core/routes') router.dispatchers = {} end) after_each(function() package.loaded['core/router'] = nil package.loaded['core/routes'] = nil end) describe(".match", function() before_each(function() -- set routes routes.POST("/users", { controller = "users", action = "create" }) routes.GET("/users", { controller = "users", action = "index" }) routes.GET("/users/:id", { controller = "users", action = "show" }) routes.PUT("/users/:id", { controller = "users", action = "edit" }) routes.DELETE("/users/:user_id/messages/:id", { controller = "messages", action = "destroy" }) router.dispatchers = routes.dispatchers end) it("returns the controller, action and params for a single param", function() ngx = { var = { uri = "/users/roberto", request_method = "GET" } } controller, action, params = router.match(ngx) assert.are.same("users_controller", controller) assert.are.same("show", action) assert.are.same({ id = "roberto" }, params) end) it("returns the controller, action and params for a multiple params", function() ngx = { var = { uri = "/users/roberto/messages/123", request_method = "DELETE" } } controller, action, params = router.match(ngx) assert.are.same("messages_controller", controller) assert.are.same("destroy", action) assert.are.same({ user_id = "roberto", id = "123" }, params) end) end) end)
Add router multiple params test
Add router multiple params test
Lua
mit
istr/gin,ostinelli/gin
9436c373c515ec3726b94066686f4987f489fd09
Modules/Shared/Binder/BinderUtil.lua
Modules/Shared/Binder/BinderUtil.lua
--- Utility methods for binders -- @module BinderUtil local BinderUtil = {} function BinderUtil.findFirstAncestor(binder, child) assert(binder) assert(typeof(child) == "Instance") local current = child.Parent while current do local class = binder:Get(current) if class then return class end current = current.Parent end return nil end function BinderUtil.getChildren(binder, parent) assert(type(binder) == "table", "Binder must be binder") assert(typeof(parent) == "Instance", "Parent parameter must be instance") local objects = {} for _, item in pairs(parent:GetChildren()) do local obj = binder:Get(item) if obj then table.insert(objects, obj) end end return objects end return BinderUtil
--- Utility methods for binders -- @module BinderUtil local BinderUtil = {} function BinderUtil.findFirstAncestor(binder, child) assert(binder) assert(typeof(child) == "Instance") local current = child.Parent while current do local class = binder:Get(current) if class then return class end current = current.Parent end return nil end function BinderUtil.findFirstChild(binder, parent) for _, child in pairs(parent:GetChildren()) do local class = binder:Get(child) if class then return class end end return nil end function BinderUtil.getChildren(binder, parent) assert(type(binder) == "table", "Binder must be binder") assert(typeof(parent) == "Instance", "Parent parameter must be instance") local objects = {} for _, item in pairs(parent:GetChildren()) do local obj = binder:Get(item) if obj then table.insert(objects, obj) end end return objects end return BinderUtil
Add findFirstChild to binder util
Add findFirstChild to binder util
Lua
mit
Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine
5c139ac5b9a8535ad73f0f1d9777de542cf4791d
src/test/res/metatables.lua
src/test/res/metatables.lua
package.path = "?.lua;src/test/res/?.lua" require 'ids' -- The purpose of this test case is to demonstrate that -- basic metatable operations on non-table types work. -- i.e. that s.sub(s,...) could be used in place of string.sub(s,...) local s = "hello" print(s:sub(2,4)) local t = {} function op(name,...) local a,b = pcall( setmetatable, t, ... ) print( name, id(t), id(getmetatable(t)), id(a), a and id(b) or type(b) ) end op('set{} ',{}) op('set-nil',nil) op('set{} ',{}) op('set') op('set{} ',{}) op('set{} ',{}) op('set{}{}',{},{}) op('set-nil',nil) op('set{__}',{__metatable={}}) op('set{} ',{}) op('set-nil',nil) t = {} op('set{} ',{}) op('set-nil',nil) op('set{__}',{__metatable='abc'}) op('set{} ',{}) op('set-nil',nil)
package.path = "?.lua;src/test/res/?.lua" require 'ids' -- The purpose of this test case is to demonstrate that -- basic metatable operations on non-table types work. -- i.e. that s.sub(s,...) could be used in place of string.sub(s,...) local s = "hello" print(s:sub(2,4)) local t = {} function op(name,...) local a,b = pcall( setmetatable, t, ... ) print( name, id(t), id(getmetatable(t)), id(a), a and id(b) or type(b) ) end op('set{} ',{}) op('set-nil',nil) op('set{} ',{}) op('set') op('set{} ',{}) op('set{} ',{}) op('set{}{}',{},{}) op('set-nil',nil) op('set{__}',{__metatable={}}) op('set{} ',{}) op('set-nil',nil) t = {} op('set{} ',{}) op('set-nil',nil) op('set{__}',{__metatable='abc'}) op('set{} ',{}) op('set-nil',nil) local i = 1234 local t = setmetatable( {}, { __mode="v", __index=function(t,k) local v = i i = i + 1 rawset(t,k,v) return v end, } ) local l = { 'a', 'b', 'a', 'b', 'c', 'a', 'b', 'c', 'd' } for i,key in ipairs(l) do print( 't.'..key, t[key] ) end
Add test for metatable operations which combine __mode and other tags.
Add test for metatable operations which combine __mode and other tags.
Lua
mit
MightyPirates/OC-LuaJ,MightyPirates/OC-LuaJ
089ab44f642bc86c20112c04b4966303301aaba9
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.47" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.48" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.48
Bump release version to v0.0.48
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua
f8fdea6715a5516875be2f03b398b9de25b692fe
.textadept/init.lua
.textadept/init.lua
-- 4 spaces FTW! buffer.tab_width = 4 buffer.use_tabs = false -- Increase font size for GUI: buffer:set_theme( 'light', { fontsize = 18 } ) -- Interpret PICO-8 files as Lua. textadept.file_types.extensions.p8 = 'lua' -- Make Alt have the same functionality as -- Ctrl with word selection using Shift. -- Since the default functionality -- makes no sense. keys.asleft = buffer.word_left_extend keys.asright = buffer.word_right_extend
-- 4 spaces FTW! buffer.tab_width = 4 buffer.use_tabs = false -- Turn on line wrapping: buffer.wrap_mode = buffer.WRAP_WORD -- Increase font size for GUI: buffer:set_theme( 'light', { font = 'IBM Plex Mono', fontsize = 18 } ) -- Interpret PICO-8 files as Lua. textadept.file_types.extensions.p8 = 'lua' -- Make Alt have the same functionality as -- Ctrl with word selection using Shift. -- Since the default functionality -- makes no sense. keys.asleft = buffer.word_left_extend keys.asright = buffer.word_right_extend
Use IBM Plex Mono font. Turn on line wrapping.
Use IBM Plex Mono font. Turn on line wrapping.
Lua
mpl-2.0
ryanpcmcquen/linuxTweaks
46e495ce549665ee365b5a4a235b629e07f85a82
wezterm.lua
wezterm.lua
local wezterm = require('wezterm') local function scheme_for_appearance(appearance) if appearance:find 'Dark' then return 'OneDark (base16)' else return 'One Light (base16)' end end return { font_size = 16, font = wezterm.font('Source Code Pro'), color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()), keys = { { key = 'F11', action = wezterm.action.ToggleFullScreen } }, hide_tab_bar_if_only_one_tab = true }
local wezterm = require('wezterm') local function scheme_for_appearance(appearance) if appearance:find 'Dark' then return 'OneDark (base16)' else return 'One Light (base16)' end end return { font_size = 16, font = wezterm.font('Source Code Pro'), color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()), keys = { { key = 'F11', action = wezterm.action.ToggleFullScreen } }, hide_tab_bar_if_only_one_tab = true, -- the system log from systemd-core-dump includes \u{1f855} prefix warn_about_missing_glyphs = false }
Disable WezTerm warning about missing glyphs
Disable WezTerm warning about missing glyphs
Lua
mit
raindev/dotfiles
c67607518dde152ebf2339f175136e6f0b98d02e
OfficerNoteWarning.lua
OfficerNoteWarning.lua
local mod = EPGP:NewModule("EPGP_OfficerNoteWarning", "AceHook-3.0") local L = LibStub:GetLibrary("AceLocale-3.0"):GetLocale("EPGP") function mod:OnInitialize() StaticPopupDialogs["EPGP_OFFICER_NOTE_WARNING"] = { text = L["EPGP is using Officer Notes for data storage. Do you really want to edit the Officer Note by hand?"], button1 = YES, button2 = NO, timeout = 0, OnAccept = function() self.hooks[GuildMemberOfficerNoteBackground]["OnMouseUp"]() end, whileDead = 1, hideOnEscape = 1, } end function mod:OnMouseUp() StaticPopup_Show("EPGP_OFFICER_NOTE_WARNING") end function mod:OnEnable() if GuildMemberOfficerNoteBackground and GuildMemberOfficerNoteBackground:HasScript("OnMouseUp") then self:HookScript(GuildMemberOfficerNoteBackground, "OnMouseUp") end end
local mod = EPGP:NewModule("EPGP_OfficerNoteWarning", "AceHook-3.0") local L = LibStub:GetLibrary("AceLocale-3.0"):GetLocale("EPGP") function mod:OnInitialize() StaticPopupDialogs["EPGP_OFFICER_NOTE_WARNING"] = { text = L["EPGP is using Officer Notes for data storage. Do you really want to edit the Officer Note by hand?"], button1 = YES, button2 = NO, timeout = 0, OnAccept = function(self) self:Hide() mod.hooks[GuildMemberOfficerNoteBackground]["OnMouseUp"]() end, whileDead = 1, hideOnEscape = 1, } end function mod:OnMouseUp() StaticPopup_Show("EPGP_OFFICER_NOTE_WARNING") end function mod:OnEnable() if GuildMemberOfficerNoteBackground and GuildMemberOfficerNoteBackground:HasScript("OnMouseUp") then self:RawHookScript(GuildMemberOfficerNoteBackground, "OnMouseUp") end end
Fix the officer note warning to not allow the edit of a note unless a user clicks accept.
Fix the officer note warning to not allow the edit of a note unless a user clicks accept.
Lua
bsd-3-clause
sheldon/epgp,ceason/epgp-tfatf,hayword/tfatf_epgp,sheldon/epgp,protomech/epgp-dkp-reloaded,ceason/epgp-tfatf,protomech/epgp-dkp-reloaded,hayword/tfatf_epgp
2cdc0b05ea6cc5d4221f27425a3867a49927b397
package.lua
package.lua
return { name = "rackspace-monitoring-agent", version = "2.6.22", luvi = { version = "2.9.3-sigar", flavor = "sigar", url = "https://github.com/virgo-agent-toolkit/luvi/releases/download/v%s-sigar/luvi-%s-%s" }, dependencies = { "rphillips/options@0.0.5", "virgo-agent-toolkit/rackspace-monitoring-client@0.3", "virgo-agent-toolkit/virgo@2.1.10", "kaustavha/luvit-walk@1", }, files = { "**.lua", "!tests", "!contrib", } }
return { name = "rackspace-monitoring-agent", version = "2.6.22", luvi = { version = "2.7.6-2-sigar", flavor = "sigar", url = "https://github.com/virgo-agent-toolkit/luvi/releases/download/v%s-sigar/luvi-%s-%s" }, dependencies = { "rphillips/options@0.0.5", "virgo-agent-toolkit/rackspace-monitoring-client@0.3", "virgo-agent-toolkit/virgo@2.1.10", "kaustavha/luvit-walk@1", }, files = { "**.lua", "!tests", "!contrib", } }
Use luvi 2.7.6-2-sigar for Windows build
Use luvi 2.7.6-2-sigar for Windows build
Lua
apache-2.0
virgo-agent-toolkit/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent
ec07d1a5cf2a7665c58204f2af2bc7ceeac4429d
test/tests/regex_cap.lua
test/tests/regex_cap.lua
local assertEq = test.assertEq local function log(x) test.log(tostring(x) .. "\n") end local vi_regex = require('regex.regex') local compile = vi_regex.compile local pat pat = compile('a(.*)b') assertEq(pat:match("axyzb"), {_start=1,_end=5, groups={{2,4}},}) assertEq(pat:match("axyzbb"), {_start=1,_end=6, groups={{2,5}},}) pat = compile('a(foo|bar)*b') --log(test.tostring(vi_regex.parse('a(foo|bar)*b'), '')) assertEq(pat:match("ab"), {_start=1,_end=2,}) assertEq(pat:match("afoob"), {_start=1,_end=5, groups={{2,4}},}) assertEq(pat:match("afoobarb"), {_start=1,_end=8, groups={{5,7}},}) pat = compile('a([a-z]*)z X([0-9]*)Y') assertEq(pat:match('az XY'), {_start=1, _end=5, groups={{2,1}, {5,4}}}) assertEq(pat:match('aasdfz X123Y'), {_start=1, _end=12, groups={{2,5},{9,11}}})
local assertEq = test.assertEq local function log(x) test.log(tostring(x) .. "\n") end local vi_regex = require('regex.regex') local compile = vi_regex.compile local pat pat = compile('a(.*)b') assertEq(pat:match("axyzb"), {_start=1,_end=5, groups={{2,4}},}) assertEq(pat:match("axyzbb"), {_start=1,_end=6, groups={{2,5}},}) pat = compile('a(foo|bar)*b') --log(test.tostring(vi_regex.parse('a(foo|bar)*b'), '')) assertEq(pat:match("ab"), {_start=1,_end=2,}) assertEq(pat:match("afoob"), {_start=1,_end=5, groups={{2,4}},}) assertEq(pat:match("afoobarb"), {_start=1,_end=8, groups={{5,7}},}) pat = compile('a([a-z]*)z X([0-9]*)Y') assertEq(pat:match('az XY'), {_start=1, _end=5, groups={{2,1}, {5,4}}}) assertEq(pat:match('aasdfz X123Y'), {_start=1, _end=12, groups={{2,5},{9,11}}}) -- Nested groups pat = compile('a((b)*c)') assertEq(pat:match('abc'), {_start=1, _end=3, groups={{2,3}, {2,2}}})
Add a test for nested groups, which fails.
Add a test for nested groups, which fails.
Lua
mit
jugglerchris/textadept-vi,jugglerchris/textadept-vi,erig0/textadept-vi
262a9c8875a65190f7ae0618842f49f50eb82329
scheduled/spawn_treasure.lua
scheduled/spawn_treasure.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 will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ]] -- This script spawns treasure chests (2830) whereever needed -- Estralis require("base.common") module("scheduled.spawn_treasure", package.seeall) function spawnTreasure() treasurePos=position(703,421,-3); --Salavesh dungeon if table.getn(world:getPlayersInRangeOf(treasurePos,20)) == 0 and world:isItemOnField(treasurePos) == false then --only spawn a treasure if nobody is around and there is no item on the tile world:createItemFromId(2830,1,treasurePos,false,333,{trsCat=tostring(math.random(0,4))}); --spawn the chest only if the tile is empty end end
--[[ 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 will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ]] -- This script spawns treasure chests (2830) whereever needed -- Estralis require("base.common") module("scheduled.spawn_treasure", package.seeall) function spawnTreasure() treasurePos=position(703,421,-3); --Salavesh dungeon if table.getn(world:getPlayersInRangeOf(treasurePos,20)) == 0 and world:isItemOnField(treasurePos) == false then --only spawn a treasure if nobody is around and there is no item on the tile world:createItemFromId(2830,1,treasurePos,false,333,{trsCat=math.random(0,4)}); --spawn the chest only if the tile is empty end end
Fix a small bug that prevented spawning of a treasure chest in the Salavesh dungeon
Fix a small bug that prevented spawning of a treasure chest in the Salavesh dungeon
Lua
agpl-3.0
KayMD/Illarion-Content,Illarion-eV/Illarion-Content,Baylamon/Illarion-Content,LaFamiglia/Illarion-Content,vilarion/Illarion-Content
cafd8e95742154043ee88c87b4bc8dd95e258ac4
lua/liveStatistican.lua
lua/liveStatistican.lua
local ffi = require "ffi" local lm = require "libmoon" local pktLib = require "packet" local eth = require "proto.ethernet" local ip = require "proto.ip4" local tuple = require "tuple" local module = {} ffi.cdef [[ struct live_flow_state { uint64_t packet_counter; uint64_t byte_counter; uint64_t first_seen; uint64_t last_seen; }; ]] module.flowKeys = tuple.flowKeys module.stateType = "struct live_flow_state" module.defaultState = {} module.extractFlowKey = tuple.extractIP5Tuple function module.handlePacket(flowKey, state, buf, isFirstPacket) local t = lm.getTime() * 10^6 state.packet_counter = state.packet_counter + 1 state.byte_counter = state.byte_counter + buf:getSize() if isFirstPacket then state.first_seen = t end state.last_seen = t end function module.checkExpiry(flowKey, state) local t = lm.getTime() * 10^6 if state.last_seen + 30 * 10^6 < t then return true else return false end end module.checkInterval = 5 return module
Implement Paul's illustrative live statistical module
Implement Paul's illustrative live statistical module
Lua
mit
emmericp/FlowScope
3c6a8b07d00818242c1ba86a6d6c7f793f20b01b
package.lua
package.lua
return { name = "luvit/lit", version = "2.0.6", homepage = "https://github.com/luvit/lit", description = "The Luvit Invention Toolkit is a luvi app that handles dependencies and luvi builds.", tags = {"lit", "meta"}, license = "Apache 2", author = { name = "Tim Caswell" }, luvi = { version = "2.1.1", flavor = "regular", }, dependencies = { "luvit/require@1.2.1", "luvit/pretty-print@1.0.2", "luvit/http-codec@1.0.0", "luvit/json@2.5.0", "creationix/coro-fs@1.3.0", "creationix/coro-tcp@1.1.0", "creationix/coro-http@1.0.7", "creationix/coro-tls@1.2.0", "creationix/coro-wrapper@1.0.0", "creationix/hex-bin@1.0.0", "creationix/semver@1.0.4", "creationix/git@2.0.2", "creationix/prompt@1.0.3", "creationix/ssh-rsa@1.0.0", "creationix/websocket-codec@1.0.5", }, files = { "commands/README", "**.lua", "!test*" } }
return { name = "luvit/lit", version = "2.0.7", homepage = "https://github.com/luvit/lit", description = "The Luvit Invention Toolkit is a luvi app that handles dependencies and luvi builds.", tags = {"lit", "meta"}, license = "Apache 2", author = { name = "Tim Caswell" }, luvi = { version = "2.1.1", flavor = "regular", }, dependencies = { "luvit/require@1.2.1", "luvit/pretty-print@1.0.2", "luvit/http-codec@1.0.0", "luvit/json@2.5.0", "creationix/coro-fs@1.3.0", "creationix/coro-tcp@1.1.0", "creationix/coro-http@1.0.7", "creationix/coro-tls@1.2.0", "creationix/coro-wrapper@1.0.0", "creationix/hex-bin@1.0.0", "creationix/semver@1.0.4", "creationix/git@2.0.2", "creationix/prompt@1.0.3", "creationix/ssh-rsa@1.0.0", "creationix/websocket-codec@1.0.5", }, files = { "commands/README", "**.lua", "!test*" } }
Bump lit to 2.0.7 to get packed git repo fixes
Bump lit to 2.0.7 to get packed git repo fixes
Lua
apache-2.0
squeek502/lit,kidaa/lit,luvit/lit,kaustavha/lit,james2doyle/lit,1yvT0s/lit,lduboeuf/lit,DBarney/lit,zhaozg/lit
9a62477ed9307419f69c8c4843e19b121854bede
src/cosy/tool/i18n.lua
src/cosy/tool/i18n.lua
return function (--[[loader]]) return { ["tool:description"] = { en = "run a tool in standalone mode", }, ["tool:tool:description"] = { en = "tool identifier", }, ["tool:parameters:description"] = { en = "tool parameters", }, ["tool:model-output"] = { en = "Model has been output to {{{filename}}} (a temporary file).", }, } end
return function (--[[loader]]) return { ["tool:description"] = { en = "run a tool in standalone mode", }, ["tool:tool:description"] = { en = "tool identifier", }, ["tool:parameters:description"] = { en = "tool parameters", }, ["tool:model-output"] = { en = "Models has been output to {{{directory}}}.", }, } end
Fix translation for tool models output.
Fix translation for tool models output.
Lua
mit
CosyVerif/library,CosyVerif/library,CosyVerif/library
71cfac01408862427b47ab323ce0b0c62af87993
src_trunk/resources/map-system/smokes_house_wall.lua
src_trunk/resources/map-system/smokes_house_wall.lua
createObject(3059, 2522.05, -1272.9325, 35.589998626709)
createObject(3059, 2522.05, -1272.9325, 35.589998626709) -- wall local hack = createObject(976, 2521.5, -1279, 34.089998626709, 0, 0, 90) -- Hack to stop people driving through it local hack2 = createObject(976, 2521.5, -1276, 34.089998626709, 0, 0, 90) setElementAlpha(hack, 0) setElementAlpha(hack2, 0)
Fix for vehicles ramming Smokes wall
Fix for vehicles ramming Smokes wall git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@929 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
Lua
bsd-3-clause
valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno
9c75370aa5b5066f81313c8c583b8c7e18ab6a39
data/prefabs.d/hip_to_be_square.lua
data/prefabs.d/hip_to_be_square.lua
local o = scene.newobject() o:set_sprite(6) o:enable_physics(0.1, 2) local c = o:add_box_collider(70, 70) c:set_friction(12) c:set_elasticity(0.3) return o
local o = scene.newobject() o:set_sprite(6) o:enable_physics(0.4, 2) local c = o:add_box_collider(70, 70) c:set_friction(12) c:set_elasticity(0.2) return o
Change physics parameters for green block
Change physics parameters for green block
Lua
mit
n00bDooD/geng,n00bDooD/geng,n00bDooD/geng
5649e9ae6eebef2cc1e65365b673b1684860665c
Modules/Shared/Physics/NoCollisionConstraintUtils.lua
Modules/Shared/Physics/NoCollisionConstraintUtils.lua
--- -- @module NoCollisionConstraintUtils -- @author Quenty local NoCollisionConstraintUtils = {} function NoCollisionConstraintUtils.create(part0, part1) local noCollision = Instance.new("NoCollisionConstraint") noCollision.Part0 = part0 noCollision.Part1 = part1 noCollision.Parent = part0 return noCollision end function NoCollisionConstraintUtils.createBetweenPartsLists(parts0, parts1) local collisionConstraints = {} for _, part0 in pairs(parts0) do for _, part1 in pairs(parts1) do table.insert(collisionConstraints, NoCollisionConstraintUtils.create(part0, part1)) end end return collisionConstraints end return NoCollisionConstraintUtils
Add no collision constraint utils
Add no collision constraint utils
Lua
mit
Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine
d8787e146f2ac52b75928f5f25e91c6999f5561a
lua/testdata/counter.lua
lua/testdata/counter.lua
local begin_tran = floating_temple.begin_tran local end_tran = floating_temple.end_tran local shared = floating_temple.shared begin_tran() local num = shared["num"] if num == nil then num = 1 else num = num + 1 end shared["num"] = num end_tran() print("My unique number is", num)
Add a simple Lua test program.
Add a simple Lua test program.
Lua
apache-2.0
snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple
fc60140b32e13591b50ce4a4c2862223abc1bcad
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.40" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.41" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.41
Bump release version to v0.0.41
Lua
mit
hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua
b76c69c76b1bd4cce49c6fa9eff71125b8e0f1cf
run_functional_tests.lua
run_functional_tests.lua
require('os') function report( s ) print('>>>>>>> '..s ) end function validate_junit_xml() -- validate that junit output is a valid xml file -- this assumes that xmllint is installed ! fnameJunitXml = 'output_junit.xml' -- os.tmpname() fnameJunitStdout = 'junit_stdout.txt' -- os.tmpname() exitSuccess, exitReason, exitCode = os.execute(string.format( 'lua example_with_luaunit.lua --output junit --name %s > %s', fnameJunitXml, fnameJunitStdout ) ) exitSuccess, exitReason, exitCode = os.execute( string.format( 'xmllint %s', fnameJunitXml ) ) if exitSuccess == true or (exitReason == 'exit' and exitCode == 0) then report(string.format('XMLLint validation successful: file %s', fnameJunitXml) ) else report(string.format('XMLLint reported errors : file %s', fnameJunitXml) ) end end validate_junit_xml()
require('os') function report( s ) print('>>>>>>> '..s ) end function validate_junit_xml( generateJunitXml ) -- Set generateJunitXml to refresh XML. Default is true. local retCode = 0 -- validate that junit output is a valid xml file -- this assumes that xmllint is installed ! if generateJunitXml == nil then generateJunitXml = true end fnameJunitXml = 'output_junit.xml' -- os.tmpname() fnameJunitStdout = 'junit_stdout.txt' -- os.tmpname() if generateJunitXml then exitSuccess, exitReason, exitCode = os.execute(string.format( 'lua example_with_luaunit.lua --output junit --name %s > %s', fnameJunitXml, fnameJunitStdout ) ) end exitSuccess, exitReason, exitCode = os.execute( string.format( 'xmllint %s', fnameJunitXml ) ) -- Lua 5.1 : exitSuccess == 0 -- Lua 5.2 : exitSuccess == true and exitReason == exit and exitCode == 0 if exitSuccess == 0 or (exitSuccess == true and exitReason == 'exit' and exitCode == 0) then report(string.format('XMLLint validation successful: file %s', fnameJunitXml) ) else report(string.format('XMLLint reported errors : file %s', fnameJunitXml) ) retCode = 1 end return retCode end -- main section errorCount = 0 errorCount = errorCount + validate_junit_xml() os.exit( errorCount )
Improve run_func_tests and make it compatible with Lua 5.1 / 5.2
Improve run_func_tests and make it compatible with Lua 5.1 / 5.2 - report success in exit code - structure to support more than one functional test - option to not generate the xml output to be validated
Lua
bsd-2-clause
GuntherStruyf/luaunit,GuntherStruyf/luaunit
281266d54526793cdf5e57ad95e59ef495583e18
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.2" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.3" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.3
Bump release version to v0.0.3
Lua
mit
hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua
32b98ff69a12c902d986ba116f4cdaa636115979
examples/http-server.lua
examples/http-server.lua
local HTTP = require("http") local Utils = require("utils") HTTP.create_server("0.0.0.0", 8080, function (req, res) local body = Utils.dump({req=req,headers=headers}) .. "\n" res:write_head(200, { ["Content-Type"] = "text/plain", ["Content-Length"] = #body }) res:write(body) res:close() end) print("Server listening at http://localhost:8080/")
local HTTP = require("http") local Utils = require("utils") HTTP.create_server("0.0.0.0", 8080, function (req, res) local body = Utils.dump({req=req,headers=req.headers}) .. "\n" res:write_head(200, { ["Content-Type"] = "text/plain", ["Content-Length"] = #body }) res:write(body) res:close() end) print("Server listening at http://localhost:8080/")
Fix type on http server example
Fix type on http server example
Lua
apache-2.0
luvit/luvit,boundary/luvit,AndrewTsao/luvit,zhaozg/luvit,bsn069/luvit,connectFree/lev,boundary/luvit,GabrielNicolasAvellaneda/luvit-upstream,GabrielNicolasAvellaneda/luvit-upstream,boundary/luvit,kaustavha/luvit,boundary/luvit,rjeli/luvit,DBarney/luvit,sousoux/luvit,GabrielNicolasAvellaneda/luvit-upstream,zhaozg/luvit,luvit/luvit,GabrielNicolasAvellaneda/luvit-upstream,bsn069/luvit,DBarney/luvit,boundary/luvit,sousoux/luvit,sousoux/luvit,sousoux/luvit,rjeli/luvit,sousoux/luvit,DBarney/luvit,boundary/luvit,DBarney/luvit,sousoux/luvit,AndrewTsao/luvit,rjeli/luvit,connectFree/lev,rjeli/luvit,bsn069/luvit,kaustavha/luvit,brimworks/luvit,kaustavha/luvit,AndrewTsao/luvit
0326a1d741c42459cb6386fd6067b266519d4d98
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.23" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.24" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.24
Bump release version to v0.0.24
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua
e0f7b34ab24ed9778bdaf4c3edabcbb313972ad8
overlay/sdk/android/rules.lua
overlay/sdk/android/rules.lua
package { 'make', 'host', source = 'make-3.81.tar.bz2' } package { 'android', { 'build', { 'make', 'build', 'host' } } }
package { 'make', 'host', source = 'make-3.81.tar.bz2' } package { 'android', 'target', { 'build', { 'make', 'build', 'host' } } }
Use target config for android pkg by default
Use target config for android pkg by default
Lua
mit
bazurbat/jagen
05f182b774e3e567a88c03d5555c450ac3501eeb
init.lua
init.lua
config = require("config") function load_super_mario_count() require("supermariocount") end require("wifi-devlol").start(load_super_mario_count)
config = require("config") function load_super_mario_count() local status, err = pcall(function () require("supermariocount") end) if err then print(err) end end require("wifi-devlol").start(load_super_mario_count)
Put supermariocount into a pcall to prevent any silly reboot orgies
Put supermariocount into a pcall to prevent any silly reboot orgies
Lua
mit
DevLoL/super-mario-count
ebee4adfe607fc942da705ddfb42c23a22040f62
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.54" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.55" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.55
Bump release version to v0.0.55
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua
caaf068ac49f3934d89f81474185865c2895e120
lua/plugins/fzf.lua
lua/plugins/fzf.lua
require('fzf-lua').setup { grep = { input_prompt = 'Grep: ' } } vim.api.nvim_set_keymap('n', '<leader>f', "<cmd>lua require('fzf-lua').files()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>r', "<cmd>lua require('fzf-lua').buffers()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>o', "<cmd>lua require('fzf-lua').blines()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '\\', "<cmd>lua require('fzf-lua').grep()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '|', "<cmd>lua require('fzf-lua').grep_cword()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>x', "<cmd>lua require('fzf-lua').files()<CR>", { noremap = true, silent = true })
require('fzf-lua').setup { grep = { input_prompt = 'Grep: ' } } vim.api.nvim_set_keymap('n', '<leader>p', "<cmd>lua require('fzf-lua').files()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>r', "<cmd>lua require('fzf-lua').buffers()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>o', "<cmd>lua require('fzf-lua').blines()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '\\', "<cmd>lua require('fzf-lua').grep()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '|', "<cmd>lua require('fzf-lua').grep_cword()<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '<leader>x', "<cmd>lua require('fzf-lua').files()<CR>", { noremap = true, silent = true })
Change FZF file search keymap to `<leader>p`
Change FZF file search keymap to `<leader>p`
Lua
mit
aasare/aaku
6d5f80fb674d8222c177e792179c25d537285a0e
src/program/lwaftr/lwaftr.lua
src/program/lwaftr/lwaftr.lua
module(..., package.seeall) local lib = require("core.lib") local function show_usage(exit_code) print(require("program.lwaftr.README_inc")) main.exit(exit_code) end function run(args) if #args == 0 then show_usage(1) end local command = string.gsub(table.remove(args, 1), "-", "_") local modname = ("program.lwaftr.%s.%s"):format(command, command) if not lib.have_module(modname) then show_usage(1) end require(modname).run(args) end
module(..., package.seeall) local lib = require("core.lib") -- Retrieves latest version from CHANGELOG.md. -- Format: ## [Version] - 2017-31-12. local function latest_version() local filename = "program/lwaftr/doc/CHANGELOG.md" local regex = "^## %[([^%]]+)%] %- (%d%d%d%d%-%d%d%-%d%d)" for line in io.lines(filename) do local version, date = line:match(regex) if version and date then return version, date end end end local function show_usage(exit_code) local content = require("program.lwaftr.README_inc") local version, date = latest_version() if version and date then content = ("Version: %s (%s)\n\n"):format(version, date)..content end print(content) main.exit(exit_code) end function run(args) if #args == 0 then show_usage(1) end local command = string.gsub(table.remove(args, 1), "-", "_") local modname = ("program.lwaftr.%s.%s"):format(command, command) if not lib.have_module(modname) then show_usage(1) end require(modname).run(args) end
Append lwAFTR version number and date to help info
Append lwAFTR version number and date to help info
Lua
apache-2.0
eugeneia/snabbswitch,Igalia/snabb,heryii/snabb,eugeneia/snabb,eugeneia/snabb,dpino/snabb,heryii/snabb,Igalia/snabbswitch,Igalia/snabbswitch,SnabbCo/snabbswitch,snabbco/snabb,SnabbCo/snabbswitch,alexandergall/snabbswitch,dpino/snabb,alexandergall/snabbswitch,dpino/snabbswitch,dpino/snabb,dpino/snabb,dpino/snabb,eugeneia/snabb,Igalia/snabb,Igalia/snabbswitch,alexandergall/snabbswitch,eugeneia/snabb,dpino/snabb,eugeneia/snabb,Igalia/snabb,SnabbCo/snabbswitch,Igalia/snabb,eugeneia/snabb,alexandergall/snabbswitch,snabbco/snabb,heryii/snabb,eugeneia/snabbswitch,dpino/snabbswitch,Igalia/snabb,snabbco/snabb,eugeneia/snabbswitch,SnabbCo/snabbswitch,dpino/snabbswitch,heryii/snabb,alexandergall/snabbswitch,heryii/snabb,Igalia/snabb,snabbco/snabb,snabbco/snabb,dpino/snabbswitch,snabbco/snabb,eugeneia/snabb,Igalia/snabbswitch,Igalia/snabb,heryii/snabb,eugeneia/snabb,snabbco/snabb,Igalia/snabb,snabbco/snabb,eugeneia/snabbswitch,Igalia/snabbswitch,dpino/snabb,alexandergall/snabbswitch,alexandergall/snabbswitch,alexandergall/snabbswitch
53040c798922267235008e77b1f2f0a798e623fe
contrib/curl/premake5.lua
contrib/curl/premake5.lua
project "curl-lib" language "C" kind "StaticLib" includedirs {"include", "lib"} defines {"BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY", "CURL_DISABLE_LDAP" } flags { "StaticRuntime" } location "build" files { "**.h", "**.c" } configuration { 'windows' } defines {"WIN32"} configuration { 'linux' } defines {"HAVE_CONFIG_H", "CURL_HIDDEN_SYMBOLS"} configuration { 'macosx' } defines { 'HAVE_CONFIG_H' } configuration "Release" defines {"NDEBUG"} flags { "OptimizeSize" } configuration "Debug" defines {"_DEBUG"} flags { "Symbols" }
project "curl-lib" language "C" kind "StaticLib" includedirs {"include", "lib"} defines {"BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY", "CURL_DISABLE_LDAP" } flags { "StaticRuntime" } location "build" files { "**.h", "**.c" } configuration { 'windows' } defines {"WIN32"} defines {"USE_SSL", "USE_SCHANNEL", "USE_WINDOWS_SSPI"} configuration { 'linux' } defines {"HAVE_CONFIG_H", "CURL_HIDDEN_SYMBOLS"} configuration { 'macosx' } defines { 'HAVE_CONFIG_H' } configuration "Release" defines {"NDEBUG"} flags { "OptimizeSize" } configuration "Debug" defines {"_DEBUG"} flags { "Symbols" }
Enable SSL on HTTP libcurl for Windows.
Enable SSL on HTTP libcurl for Windows.
Lua
bsd-3-clause
aleksijuvani/premake-core,Zefiros-Software/premake-core,dcourtois/premake-core,LORgames/premake-core,resetnow/premake-core,Blizzard/premake-core,jsfdez/premake-core,premake/premake-core,noresources/premake-core,resetnow/premake-core,jsfdez/premake-core,resetnow/premake-core,noresources/premake-core,dcourtois/premake-core,jstewart-amd/premake-core,lizh06/premake-core,Blizzard/premake-core,akaStiX/premake-core,dcourtois/premake-core,saberhawk/premake-core,lizh06/premake-core,LORgames/premake-core,noresources/premake-core,Zefiros-Software/premake-core,mendsley/premake-core,xriss/premake-core,soundsrc/premake-core,starkos/premake-core,xriss/premake-core,bravnsgaard/premake-core,tritao/premake-core,starkos/premake-core,bravnsgaard/premake-core,aleksijuvani/premake-core,CodeAnxiety/premake-core,mendsley/premake-core,TurkeyMan/premake-core,mandersan/premake-core,premake/premake-core,jsfdez/premake-core,akaStiX/premake-core,prapin/premake-core,dcourtois/premake-core,premake/premake-core,premake/premake-core,bravnsgaard/premake-core,tvandijck/premake-core,mendsley/premake-core,martin-traverse/premake-core,xriss/premake-core,TurkeyMan/premake-core,starkos/premake-core,jstewart-amd/premake-core,sleepingwit/premake-core,tvandijck/premake-core,CodeAnxiety/premake-core,saberhawk/premake-core,noresources/premake-core,noresources/premake-core,jstewart-amd/premake-core,mendsley/premake-core,TurkeyMan/premake-core,LORgames/premake-core,akaStiX/premake-core,prapin/premake-core,soundsrc/premake-core,mendsley/premake-core,lizh06/premake-core,Zefiros-Software/premake-core,starkos/premake-core,Zefiros-Software/premake-core,sleepingwit/premake-core,saberhawk/premake-core,premake/premake-core,CodeAnxiety/premake-core,sleepingwit/premake-core,Blizzard/premake-core,prapin/premake-core,tvandijck/premake-core,aleksijuvani/premake-core,jstewart-amd/premake-core,martin-traverse/premake-core,soundsrc/premake-core,soundsrc/premake-core,mandersan/premake-core,tritao/premake-core,jstewart-amd/premake-core,bravnsgaard/premake-core,tritao/premake-core,Zefiros-Software/premake-core,xriss/premake-core,bravnsgaard/premake-core,CodeAnxiety/premake-core,sleepingwit/premake-core,xriss/premake-core,dcourtois/premake-core,Blizzard/premake-core,noresources/premake-core,resetnow/premake-core,mandersan/premake-core,LORgames/premake-core,lizh06/premake-core,aleksijuvani/premake-core,tvandijck/premake-core,noresources/premake-core,dcourtois/premake-core,mandersan/premake-core,CodeAnxiety/premake-core,LORgames/premake-core,Blizzard/premake-core,martin-traverse/premake-core,TurkeyMan/premake-core,martin-traverse/premake-core,prapin/premake-core,saberhawk/premake-core,sleepingwit/premake-core,TurkeyMan/premake-core,soundsrc/premake-core,tvandijck/premake-core,premake/premake-core,mandersan/premake-core,aleksijuvani/premake-core,starkos/premake-core,dcourtois/premake-core,starkos/premake-core,Blizzard/premake-core,akaStiX/premake-core,premake/premake-core,jsfdez/premake-core,resetnow/premake-core,starkos/premake-core,tritao/premake-core
96090a5e22d3714e83ed5891dde5ab5d8ac9b917
packages/pandoc.lua
packages/pandoc.lua
SILE.require("packages/raiselower") -- Process arguments that might not actually have that much to do with their -- immediate function but affect the document in other ways, such as setting -- bookmarks on anything tagged with an ID attribute. local handlePandocArgs = function (options) if options.id then SU.debug("pandoc", "Set ID on tag") end end SILE.registerCommand("textem", function (options, content) handlePandocArgs(options) SILE.call("em", {}, content) end,"Inline emphasis wrapper") SILE.registerCommand("textstrong", function (options, content) handlePandocArgs(options) SILE.call("strong", {}, content) end,"Inline strong wrapper") SILE.registerCommand("textsc", function (options, content) handlePandocArgs(options) SILE.call("font", { features = "+smcp" }, content) end,"Inline small caps wrapper") SILE.registerCommand("textup", function (options, content) handlePandocArgs(options) SILE.call("font", { style = "Roman" }, content) end,"Inline upright wrapper") SILE.registerCommand("textnormal", function (options, content) handlePandocArgs(options) SILE.call("font", { weight = 400 }, content) end,"Inline upright wrapper") local scriptOffset = "0.7ex" local scriptSize = "1.5ex" SILE.registerCommand("textsuperscript", function (options, content) handlePandocArgs(options) SILE.call("raise", { height = scriptOffset }, function () SILE.call("font", { size = scriptSize }, content) end) end,"Inline superscript wrapper") SILE.registerCommand("textsubscript", function (options, content) handlePandocArgs(options) SILE.call("lower", { height = scriptOffset }, function () SILE.call("font", { size = scriptSize }, content) end) end,"Inline subscript wrapper") SILE.registerCommand("unimplemented", function (options, content) handlePandocArgs(options) SU.debug("pandoc", "Un-implemented function") SILE.process(content) end,"Inline small caps wrapper") SILE.Commands["strike"] = SILE.Commands["unimplemented"] SILE.Commands["strike"] = SILE.Commands["unimplemented"] return { documentation = [[\begin{document} Try to cover all the possible commands Pandoc's SILE export might throw at us. Provided by in base classes etc.: \listitem \code{listarea} \listitem \code{listitem} Provided specifically for Pandoc: \listitem \code{span} \listitem \code{textem} \listitem \code{textstrong} \listitem \code{textsc} \listitem \code{textnosc} \listitem \code{textnoem} \listitem \code{textnostrong} \listitem \code{textsuperscript} \listitem \code{textsubscript} \end{document}]] }
Add Pandoc helper package for converted documents
feat(packages): Add Pandoc helper package for converted documents
Lua
mit
alerque/sile,alerque/sile,alerque/sile,alerque/sile
4f97c0debfaf0486d5657ac47086cd3323f468f8
layout-a4.lua
layout-a4.lua
local book = SILE.require("classes/book"); book:loadPackage("masters") book:defineMaster({ id = "right", firstContentFrame = "content", frames = { content = {left = "32mm", right = "100%pw-32mm", top = "36mm", bottom = "top(footnotes)" }, runningHead = {left = "left(content)", right = "right(content)", top = "top(content)-12mm", bottom = "top(content)-2mm" }, footnotes = { left="left(content)", right = "right(content)", height = "0", bottom="100%ph-24mm"} }}) book:defineMaster({ id = "left", firstContentFrame = "content", frames = {}}) book:loadPackage("twoside", { oddPageMaster = "right", evenPageMaster = "left" }); book:mirrorMaster("right", "left") SILE.call("switch-master-one-page", {id="right"})
local book = SILE.require("classes/book"); book:loadPackage("masters") book:defineMaster({ id = "right", firstContentFrame = "content", frames = { content = {left = "32mm", right = "100%pw-32mm", top = "36mm", bottom = "top(footnotes)" }, runningHead = {left = "left(content)", right = "right(content)", top = "top(content)-12mm", bottom = "top(content)-2mm" }, footnotes = { left="left(content)", right = "right(content)", height = "0", bottom="100%ph-24mm"} }}) book:defineMaster({ id = "left", firstContentFrame = "content", frames = {}}) book:loadPackage("twoside", { oddPageMaster = "right", evenPageMaster = "left" }); book:mirrorMaster("right", "left") SILE.call("switch-master-one-page", {id="right"}) SILE.registerCommand("meta:distribution", function(options, content) SILE.call("font", { weight=600, style="Bold" }, {"Yayın: "}) SILE.typesetter:typeset("Bu PDF biçimi, özellikle yerel kiliselerin kendi cemaatları için basmalarına uygun hazırlanmıştır ve Via Christus’un internet sitesinde üçretsiz yayılmaktadır.") end)
Add special distribution note to A4 PDFs
Add special distribution note to A4 PDFs
Lua
agpl-3.0
alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile
be81c00376d4440b613f0a5c4e3b622495e6e823
test/integration/xinerama/03_new_screen_has_ws.lua
test/integration/xinerama/03_new_screen_has_ws.lua
mod_xinerama.refresh(); if (notioncore.find_screen_id(1) == Nil) then return "Number of screens should be 2, again at the start of this test" end if (notioncore.find_screen_id(0):mx_count() < 1) then return "Screen 0 had no workspaces!" elseif (notioncore.find_screen_id(1):mx_count() < 1) then return "Screen 1 had no workspaces!" end return "ok"
Test for desired behavior: a new screen should get a default workspace
Test for desired behavior: a new screen should get a default workspace
Lua
lgpl-2.1
dkogan/notion,p5n/notion,anoduck/notion,p5n/notion,dkogan/notion,neg-serg/notion,p5n/notion,raboof/notion,anoduck/notion,raboof/notion,dkogan/notion.xfttest,knixeur/notion,knixeur/notion,neg-serg/notion,dkogan/notion.xfttest,anoduck/notion,dkogan/notion.xfttest,p5n/notion,knixeur/notion,anoduck/notion,dkogan/notion,dkogan/notion,neg-serg/notion,knixeur/notion,raboof/notion,raboof/notion,knixeur/notion,neg-serg/notion,anoduck/notion,dkogan/notion,p5n/notion,dkogan/notion.xfttest
fe7b111fff120f85e0e8230ef576e34d859efe04
utils/choreo/boot.lua
utils/choreo/boot.lua
load_script("scripts/rig.lua") load_script("scripts/tasks.lua") load_script("scripts/drawing.lua") load_script("scripts/filesystem.lua") --load_script("scripts/repl.lua") load_script("game/actors/richard/rig.lua") index = 1 last_msg = "" moving = false pos = vec(screen_width, screen_height) * 0.5 bone_offset = vec(30, 40) kframes = { } frame = 0 keys = table.keys(root.bones) engine.mouse.cursor = 10 function get_skel_structure(bone) if #bone.children == 0 then return bone.id end end dofile("utils/choreo/logic.lua") dofile("utils/choreo/drawing.lua")
load_script("scripts/rig.lua") load_script("scripts/tasks.lua") load_script("scripts/drawing.lua") load_script("scripts/filesystem.lua") --load_script("scripts/repl.lua") load_script("game/actors/richard/rig.lua") tonumber("5") index = 1 last_msg = "" moving = false pos = vec(screen_width, screen_height) * 0.5 bone_offset = vec(30, 40) kframes = { } frame = 0 keys = table.keys(root.bones) engine.mouse.cursor = 10 function get_skel_structure(bone) if #bone.children == 0 then return bone.id end end dofile("utils/choreo/logic.lua") dofile("utils/choreo/drawing.lua")
Work on choreographer stuff still.
Work on choreographer stuff still.
Lua
mit
isovector/adventure,isovector/adventure
7b903d1f67b2d77bf7aa62282ab8e4b6ee933484
premake5.lua
premake5.lua
workspace "flaaffy" configurations { "Debug", "Release" } targetdir "bin/%{cfg.buildcfg}" startproject "mareep" filter "configurations:Debug" defines { "DEBUG" } flags { "Symbols" } filter "configurations:Release" defines { "RELEASE" } optimize "On" project "mareep" kind "ConsoleApp" language "C#" namespace "arookas" location "mareep" entrypoint "arookas.mareep" targetname "mareep" links { "arookas", "System", "System.Xml", "System.Xml.Linq", } files { "mareep/**.cs", } excludes { "mareep/bin/**", "mareep/obj/**", }
workspace "flaaffy" configurations { "Debug", "Release" } targetdir "bin/%{cfg.buildcfg}" startproject "mareep" filter "configurations:Debug" defines { "DEBUG" } symbols "on" filter "configurations:Release" defines { "RELEASE" } optimize "On" project "mareep" kind "ConsoleApp" language "C#" namespace "arookas" location "mareep" entrypoint "arookas.mareep" targetname "mareep" framework "4.6.1" links { "arookas", "System", "System.Xml", "System.Xml.Linq", } files { "mareep/**.cs", } excludes { "mareep/bin/**", "mareep/obj/**", }
Change project framework to 4.6.1
Change project framework to 4.6.1
Lua
mit
arookas/flaaffy
4f820e31e454ff6c33c4ab69aa93b9c1c81f6208
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.32" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.33" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.33
Bump release version to v0.0.33
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua
cacb5f2a411c37af902bb4c73cad60d6a414d58f
config/nvim/lua/gb-git.lua
config/nvim/lua/gb-git.lua
keymap = require("nutils").map require("gitsigns").setup( { watch_index = { interval = 100 } } ) keymap("n", "<leader>g", ":vertical Git<CR>", {silent = true})
keymap = require("nutils").map require("gitsigns").setup( { watch_index = { interval = 100 } } ) keymap("n", "<leader>gs", ":vertical Git<CR>", {silent = true}) keymap("n", "<leader>gh", ":diffget //2<CR>", {silent = true}) keymap("n", "<leader>gl", ":diffget //3<CR>", {silent = true})
Add git mappings for merges
Add git mappings for merges
Lua
mit
gblock0/dotfiles
4c8012180f9ed0582e55bf3afdfa3aad6cbfcf09
officernotewarning.lua
officernotewarning.lua
local mod = EPGP:NewModule("EPGP_OfficerNoteWarning", "AceHook-3.0") local L = LibStub("AceLocale-3.0"):GetLocale("EPGP") function mod:OnInitialize() StaticPopupDialogs["EPGP_OFFICER_NOTE_WARNING"] = { text = L["EPGP is using Officer Notes for data storage. Do you really want to edit the Officer Note by hand?"], button1 = YES, button2 = NO, timeout = 0, OnAccept = function(self) self:Hide() mod.hooks[GuildMemberOfficerNoteBackground]["OnMouseUp"]() end, whileDead = 1, hideOnEscape = 1, } end function mod:OnMouseUp() StaticPopup_Show("EPGP_OFFICER_NOTE_WARNING") end function mod:OnEnable() if GuildMemberOfficerNoteBackground and GuildMemberOfficerNoteBackground:HasScript("OnMouseUp") then self:RawHookScript(GuildMemberOfficerNoteBackground, "OnMouseUp") end end
local mod = EPGP:NewModule("EPGP_OfficerNoteWarning", "AceHook-3.0") local L = LibStub("AceLocale-3.0"):GetLocale("EPGP") StaticPopupDialogs["EPGP_OFFICER_NOTE_WARNING"] = { text = L["EPGP is using Officer Notes for data storage. Do you really want to edit the Officer Note by hand?"], button1 = YES, button2 = NO, timeout = 0, OnAccept = function(self) self:Hide() mod.hooks[GuildMemberOfficerNoteBackground]["OnMouseUp"]() end, whileDead = 1, hideOnEscape = 1, showAlert = 1, enterClicksFirstButton = 1, } function mod:OnMouseUp() StaticPopup_Show("EPGP_OFFICER_NOTE_WARNING") end function mod:OnEnable() if GuildMemberOfficerNoteBackground and GuildMemberOfficerNoteBackground:HasScript("OnMouseUp") then self:RawHookScript(GuildMemberOfficerNoteBackground, "OnMouseUp") end end
Add alert icon to officer note warning popup. Also make it accept on enter. This fixes issue 282.
Add alert icon to officer note warning popup. Also make it accept on enter. This fixes issue 282.
Lua
bsd-3-clause
hayword/tfatf_epgp,protomech/epgp-dkp-reloaded,sheldon/epgp,protomech/epgp-dkp-reloaded,ceason/epgp-tfatf,sheldon/epgp,hayword/tfatf_epgp,ceason/epgp-tfatf
9937606c78f1a94741440acdda46e3c8a78d6a97
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.27" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.28" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 912 t.screen.height = 528 t.screen.fullscreen = false t.console = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.28
Bump release version to v0.0.28
Lua
mit
hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua
f97e6a0490c692d0290c027dd8b8286108d1d63e
src/cosy/proxy/rawify.lua
src/cosy/proxy/rawify.lua
local proxy = require "cosy.util.proxy" local raw = require "cosy.util.raw" local is_proxy = require "cosy.util.is_proxy" local rawify = proxy () function rawify:__index (key) local raw_self = raw (self) local raw_key = raw (key) local value = rawget (raw_self, raw_key) if is_proxy (value) then value = raw (value) rawset (raw_self, raw_key, value) end return self (value) end function rawify:__newindex (key, value) local raw_self = raw (self) local raw_key = raw (key) local raw_value = raw (value) rawset (raw_self, raw_key, raw_value) end return rawify
local proxy = require "cosy.util.proxy" local raw = require "cosy.util.raw" local is_proxy = require "cosy.util.is_proxy" local rawify = proxy () function rawify:__index (key) local raw_self = raw (self) local raw_key = raw (key) local value = rawget (raw_self, raw_key) if is_proxy (value) then value = raw (value) rawset (raw_self, raw_key, value) end return rawify (value) end function rawify:__newindex (key, value) local raw_self = raw (self) local raw_key = raw (key) local raw_value = raw (value) rawset (raw_self, raw_key, raw_value) end return rawify
Remove usage of deprecated self () proxy constructor.
Remove usage of deprecated self () proxy constructor.
Lua
mit
CosyVerif/library,CosyVerif/library,CosyVerif/library
8d6ec530af19daf7ca391ff5a5498dbb49f6b174
lua/framework/html/init.lua
lua/framework/html/init.lua
--=========== Copyright © 2018, Planimeter, All rights reserved. =============-- -- -- Purpose: -- --============================================================================-- jit.off() local cef = require( "cef" ) local jit = require( "jit" ) local require = require local framework = framework module( "framework.html" ) function newBrowser( url ) require( "framework.html.browser" ) local browser = framework.html.browser return browser( url ) end function update( dt ) cef.cef_do_message_loop_work() end function quit() cef.cef_shutdown() end
--=========== Copyright © 2018, Planimeter, All rights reserved. =============-- -- -- Purpose: -- --============================================================================-- local cef = require( "cef" ) local require = require local framework = framework module( "framework.html" ) function newBrowser( url ) require( "framework.html.browser" ) local browser = framework.html.browser return browser( url ) end function update( dt ) cef.cef_do_message_loop_work() end function quit() cef.cef_shutdown() end
Enable jit in projects using `framework.html`
Enable jit in projects using `framework.html`
Lua
mit
Planimeter/lgameframework,Planimeter/lgameframework,Planimeter/lgameframework
ada10cfc370975544d8ccb67cf5c1ad34d511c8a
Widgets/Selection_test.lua
Widgets/Selection_test.lua
function widget:GetInfo () return { name = "BETS - Unit selection detector", desc = "Prints number of selected units.", author = "Oskar Hybl", date = "today", license = "GNU GPL v2", layer = 0, enabled = true } end function widget:Initialize () Spring.Echo ("Selection test initialized.") end function UnitSelectionChange (units) Spring.Echo ("Number of selected units: " .. #units) selectedUnitsStr = "" for i=1, #units do if i ~= 1 then selectedUnitsStr = selectedUnitsStr .. ", " end selectedUnitsStr = selectedUnitsStr .. units[i] end Spring.Echo ("IDs: " .. selectedUnitsStr) end -- compare value by value function equal (fst, snd) if #fst ~= #snd then return false end for i=1, #fst do if fst[i] ~= snd[i] then return false end end return true end local oldUnits = {} function widget:Update (dt) newUnits = Spring.GetSelectedUnits() if not equal (oldUnits, newUnits) then oldUnits = newUnits UnitSelectionChange (newUnits) end end
function widget:GetInfo () return { name = "BETS - Unit selection detector", desc = "Prints number of selected units.", author = "Oskar Hybl", date = "today", license = "GNU GPL v2", layer = 0, enabled = true } end function widget:Initialize () Spring.Echo ("Selection test initialized.") end function UnitSelectionChange (units) Spring.Echo ("Number of selected units: " .. #units) selectedUnitsStr = "" for i=1, #units do if i ~= 1 then selectedUnitsStr = selectedUnitsStr .. ", " end selectedUnitsStr = selectedUnitsStr .. units[i] end Spring.Echo ("IDs: " .. selectedUnitsStr) end -- compare value by value function equal (fst, snd) if #fst ~= #snd then return false end for i=1, #fst do if fst[i] ~= snd[i] then return false end end return true end local oldUnits = {} function widget:GameFrame (dt) newUnits = Spring.GetSelectedUnits() if not equal (oldUnits, newUnits) then oldUnits = newUnits UnitSelectionChange (newUnits) end end
Use GameFrame (on simulation frame) instead of Update (redraw).
Use GameFrame (on simulation frame) instead of Update (redraw).
Lua
mit
MartinFrancu/BETS
31d0d09f4f2475ef6a82bef4b0e47db5279642e1
lua/selectionConverter.lua
lua/selectionConverter.lua
function updateClipboard(threadObj) -- ENCODING among -detect-enc, -sjis, -utf16-be, -utf16-le, -utf8 local ENCODING = "-detect-enc" -- 0 <= DEBUG_LEVEL <= 5 local DEBUG_LEVEL = 0 -- any positive or negative integer local STRICTNESS = 20 local hexView = getMemoryViewForm().HexadecimalView local previousBytes = {} local handle = io.popen( "java.exe -jar \"" .. getCheatEngineDir() .. "autorun\\HexToString.jar\" " .. ENCODING .. " -d=" .. DEBUG_LEVEL .. " -s=" .. STRICTNESS, "w" ) local selectionSize = 0 getMainForm().OnClose = function(sender) pcall(function() handle:write("exit") handle:close() end) closeCE() end while true do if hexView.hasSelection then selectionSize = hexView.SelectionStop-hexView.SelectionStart local bytes=readBytes(hexView.SelectionStart, selectionSize+1,true) if bytes ~= nil then local s = "" for i = 1, table.getn(bytes) do s = s .. string.format("%02x", bytes[i]) end handle:write(s .. "\n") handle:flush() previousBytes = bytes end end sleep(300) end end createNativeThread(updateClipboard)
function updateClipboard(threadObj) -- ENCODING among -detect-enc, -sjis, -utf16-be, -utf16-le, -utf8 local ENCODING = "-detect-enc" -- 0 <= DEBUG_LEVEL <= 5 local DEBUG_LEVEL = 0 -- any positive or negative integer local STRICTNESS = 20 local hexView = getMemoryViewForm().HexadecimalView local previousBytes = {} local handle = io.popen( "java.exe -jar \"" .. getCheatEngineDir() .. "autorun\\HexToString.jar\" " .. ENCODING .. " -d=" .. DEBUG_LEVEL .. " -s=" .. STRICTNESS, "w" ) local selectionSize = 0 getMainForm().OnClose = function(sender) pcall(function() handle:write("exit") handle:close() end) closeCE() end while true do if hexView.hasSelection then selectionSize = hexView.SelectionStop-hexView.SelectionStart local bytes=readBytes(hexView.SelectionStart, selectionSize+1,true) if bytes ~= nil then local s = "" for i = 1, table.getn(bytes) do s = s .. string.format("%02x", bytes[i]) end handle:write(s .. "\n") handle:flush() previousBytes = bytes end end sleep(300) end end createNativeThread(updateClipboard)
Fix indentation in lua file
Fix indentation in lua file
Lua
mit
MX-Futhark/hook-any-text
e30fe59de6c5ea3dd1884b3788017f748fda9efc
backend/nginx/lua/project_access.lua
backend/nginx/lua/project_access.lua
local url = ngx.var.uri local elements = url.split("/") local project_index = -1 for k, v in pairs(elements) do if v == "projects" then project_index = k end end if project_index == -1 then ngx.exit(ngx.HTTP_BAD_REQUEST) end local apikey = get_apikey() if apikey == nil then ngx.log(ngx.WARN, "No APIKEY") ngx.exit(ngx.HTTP_UNAUTHORIZED) end local res = ngx.location.capture("/authenticate_project/" .. elements[project_index], {args = { apikey: apikey}}) if res.status ~= 200 then ngx.log(ngx.WARN, "No access to project") ngx.exit(ngx.HTTP_UNAUTHORIZED) end
local url = ngx.var.uri local elements = url.split("/") local project_index = -1 for k, v in pairs(elements) do if v == "projects" then project_index = k end end if project_index == -1 then ngx.exit(ngx.HTTP_BAD_REQUEST) end local apikey = get_apikey() if apikey == nil then ngx.log(ngx.WARN, "No APIKEY") ngx.exit(ngx.HTTP_UNAUTHORIZED) end local res = ngx.location.capture("/authenticate_project/" .. elements[project_index+1], {args = { apikey: apikey}}) if res.status ~= 200 then ngx.log(ngx.WARN, "No access to project") ngx.exit(ngx.HTTP_UNAUTHORIZED) end
Access correct spot in url for the project.
Access correct spot in url for the project.
Lua
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
b6aeda08eb787fa4e0254a789d625485ba6684c8
lua/engine/fileutil.lua
lua/engine/fileutil.lua
-- --------------------------------------------------------- -- fileutil.lua -- Copyright (C) 2015 Laurent Zubiaur, voodoocactus.com -- All Rights Reserved. -- --------------------------------------------------------- local jit = require 'jit' local ffi = require 'ffi' local fileutil = {} function fileutil.getRealPath(name) local buf = ffi.new("uint8_t[?]", 1024) ffi.C.realpath(name,buf) return ffi.string(buf) end function fileutil.init() ffi.cdef [[ char *realpath(const char *path, char *resolved_path); ]] if (jit.os == 'OSX') then fileutil.getModulePath = function(name) return '../MacOS/lib' .. name .. '.dylib' end elseif (jit.os == 'Linux') then fileutil.getModulePath = function(name) return './bin/lib' .. name .. '.so' end elseif (jit.os == 'Windows') then fileutil.getModulePath = function(name) return './bin/' .. name .. '.dll' end else error('Unsupported platform') end end -- Return this package return fileutil -- EOF
-- --------------------------------------------------------- -- fileutil.lua -- Copyright (C) 2015 Laurent Zubiaur, voodoocactus.com -- All Rights Reserved. -- --------------------------------------------------------- local jit = require 'jit' local ffi = require 'ffi' local fileutil = {} function fileutil.getRealPath(name) local buf = ffi.new("uint8_t[?]", 1024) ffi.C.realpath(name,buf) return ffi.string(buf) end function fileutil.init() ffi.cdef [[ char *realpath(const char *path, char *resolved_path); ]] if (jit.os == 'OSX') then fileutil.getModulePath = function(name) return '../MacOS/lib' .. name .. '.dylib' end elseif (jit.os == 'Linux') then fileutil.getModulePath = function(name) return './bin/lib' .. name .. '.so' end elseif (jit.os == 'Windows') then fileutil.getModulePath = function(name) return './bin/' .. name .. '.dll' end else error('Unsupported platform') end return fileutil end -- Return this package return fileutil -- EOF
Fix missing return in init function
Fix missing return in init function
Lua
mit
lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot
ca616b4c6018db38750808465e2378302b141da1
hammerspoon/hammerspoon.symlink/modules/audio-device.lua
hammerspoon/hammerspoon.symlink/modules/audio-device.lua
-- Define audio device names for headphone/speaker switching local headphoneDevice = "VIA Technologies" -- USB sound card local speakerDevice = "AppleHDAEngineOutput" -- Built-in output -- Toggle between speaker and headphone sound devices (useful if you have multiple USB soundcards that are always connected) function toggleAudioOutput() local current = hs.audiodevice.defaultOutputDevice() local speakers = findOutputByPartialUID(speakerDevice) local headphones = findOutputByPartialUID(headphoneDevice) -- if not speakers or not headphones then -- hs.notify.new({title="Hammerspoon", informativeText="ERROR: Some audio devices missing", ""}):send() -- return -- end -- if current:name() == speakers:name() then -- headphones:setDefaultOutputDevice() -- else -- speakers:setDefaultOutputDevice() -- end hs.notify.new({ title='Hammerspoon', informativeText='Default output device:' .. hs.audiodevice.defaultOutputDevice():name() }):send() end function findOutputByPartialUID(uid) for _, device in pairs(hs.audiodevice.allOutputDevices()) do if device:uid():match(uid) then return device end end end
-- Define audio device names for headphone/speaker switching local usbAudioSearch = "VIA Technologies" -- USB sound card local internalAudioSearch = "AppleHDAEngineOutput" -- Built-in output -- Toggle between speaker and headphone sound devices (useful if you have multiple USB soundcards that are always connected) function setDefaultAudio() local current = hs.audiodevice.defaultOutputDevice() local usbAudio = findOutputByPartialUID(usbAudioSearch) local internalAudio = findOutputByPartialUID(internalAudioSearch) if usbAudio and current:name() ~= usbAudio:name() then usbAudio:setDefaultOutputDevice() else internalAudio:setDefaultOutputDevice() end hs.notify.new({ title='Hammerspoon', informativeText='Default output device:' .. hs.audiodevice.defaultOutputDevice():name() }):send() end function findOutputByPartialUID(uid) for _, device in pairs(hs.audiodevice.allOutputDevices()) do if device:uid():match(uid) then return device end end end function handleLayoutChange() setDefaultAudio() end hs.screen.watcher.new(handleLayoutChange):start() handleLayoutChange()
Update audio switcher to auto-select usb audio when available
feat(Hammerspoon): Update audio switcher to auto-select usb audio when available
Lua
mit
sethvoltz/dotfiles,sethvoltz/dotfiles,sethvoltz/dotfiles,sethvoltz/dotfiles
b1615d5080ba92cf00460e904f635cc6e1cf0288
openresty/app.lua
openresty/app.lua
local mysql = mysql local encode = encode local random = math.random local mysqlconn = { host = "DBHOSTNAME", port = 3306, database = "hello_world", user = "benchmarkdbuser", password = "benchmarkdbpass" } return function(ngx) local db = mysql:new() assert(db:connect(mysqlconn)) local num_queries = tonumber(ngx.var.arg_queries) or 1 local worlds = {} for i=1, num_queries do local wid = random(1, 10000) worlds[#worlds+1] = db:query('SELECT * FROM World WHERE id = '..wid)[1] end ngx.print( encode(worlds) ) db:set_keepalive(0, 256) end
local mysql = mysql local encode = encode local random = math.random local mysqlconn = { host = "DBHOSTNAME", port = 3306, database = "hello_world", user = "benchmarkdbuser", password = "benchmarkdbpass" } return function(ngx) local db = mysql:new() assert(db:connect(mysqlconn)) local num_queries = tonumber(ngx.var.arg_queries) or 1 -- May seem like a stupid branch, but since we know that -- at a benchmark it will always be taken one way, -- it doesn't matter. For me, after a small warmup, the performance -- is identical to a version without the branch -- http://wiki.luajit.org/Numerical-Computing-Performance-Guide if num_queries == 1 then ngx.print(encode(db:query('SELECT * FROM World WHERE id = '..random(1,10000))[1])) else local worlds = {} for i=1, num_queries do worlds[#worlds+1] = db:query('SELECT * FROM World WHERE id = '..random(1,10000))[1] end ngx.print( encode(worlds) ) end db:set_keepalive(0, 256) end
Remove braces around single query
Remove braces around single query
Lua
bsd-3-clause
seem-sky/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,torhve/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,grob/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,methane/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,joshk/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,leafo/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,actframework/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,zloster/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,sxend/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,methane/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,methane/FrameworkBenchmarks,testn/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,actframework/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,joshk/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,testn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,testn/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,leafo/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,methane/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,grob/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,leafo/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,khellang/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zloster/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,sxend/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,joshk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jamming/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,herloct/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Verber/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,sxend/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sxend/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,actframework/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,leafo/FrameworkBenchmarks,valyala/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,sxend/FrameworkBenchmarks,sgml/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,doom369/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zloster/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,torhve/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Verber/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,grob/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,zapov/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Verber/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,jamming/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,dmacd/FB-try1,MTDdk/FrameworkBenchmarks,testn/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,sxend/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Verber/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,methane/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,dmacd/FB-try1,jebbstewart/FrameworkBenchmarks,jamming/FrameworkBenchmarks,methane/FrameworkBenchmarks,methane/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,testn/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,leafo/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,actframework/FrameworkBenchmarks,denkab/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,valyala/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,khellang/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,methane/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,methane/FrameworkBenchmarks,herloct/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,Verber/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,sxend/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Verber/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,leafo/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,grob/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,herloct/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,testn/FrameworkBenchmarks,valyala/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zloster/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,torhve/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sxend/FrameworkBenchmarks,dmacd/FB-try1,sagenschneider/FrameworkBenchmarks,sgml/FrameworkBenchmarks,dmacd/FB-try1,youprofit/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,joshk/FrameworkBenchmarks,grob/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,doom369/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,denkab/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,denkab/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,sgml/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,valyala/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,testn/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,joshk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,testn/FrameworkBenchmarks,methane/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sgml/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,zloster/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sxend/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,leafo/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zloster/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,joshk/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,denkab/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,actframework/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,leafo/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sxend/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zloster/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,grob/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sgml/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,doom369/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zapov/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,dmacd/FB-try1,zane-techempower/FrameworkBenchmarks,doom369/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,valyala/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,dmacd/FB-try1,PermeAgility/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,testn/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,actframework/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,herloct/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,denkab/FrameworkBenchmarks,dmacd/FB-try1,thousandsofthem/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,doom369/FrameworkBenchmarks,grob/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,valyala/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,khellang/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sgml/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,sxend/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,grob/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,herloct/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,doom369/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,doom369/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zapov/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,sgml/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,doom369/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zloster/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,doom369/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,dmacd/FB-try1,alubbe/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,herloct/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,methane/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,joshk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,testn/FrameworkBenchmarks,sgml/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,actframework/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Verber/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zloster/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,sxend/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sxend/FrameworkBenchmarks,denkab/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,jamming/FrameworkBenchmarks,dmacd/FB-try1,jebbstewart/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,dmacd/FB-try1,k-r-g/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,methane/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,grob/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,doom369/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Verber/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,herloct/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,valyala/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,testn/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,jamming/FrameworkBenchmarks,sgml/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zapov/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jamming/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,torhve/FrameworkBenchmarks,joshk/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,herloct/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,leafo/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zloster/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,khellang/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,doom369/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Verber/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,valyala/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,khellang/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,denkab/FrameworkBenchmarks,khellang/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sxend/FrameworkBenchmarks,grob/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,torhve/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,actframework/FrameworkBenchmarks,valyala/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sxend/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,zapov/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sgml/FrameworkBenchmarks,denkab/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,testn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,denkab/FrameworkBenchmarks,denkab/FrameworkBenchmarks,testn/FrameworkBenchmarks,actframework/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Verber/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,joshk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,herloct/FrameworkBenchmarks,methane/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,testn/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Verber/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,grob/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,zapov/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,leafo/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,doom369/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,joshk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,doom369/FrameworkBenchmarks,leafo/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,torhve/FrameworkBenchmarks,herloct/FrameworkBenchmarks,dmacd/FB-try1,Jesterovskiy/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,grob/FrameworkBenchmarks,sxend/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,herloct/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,joshk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,torhve/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zloster/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,actframework/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,leafo/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,methane/FrameworkBenchmarks,khellang/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,grob/FrameworkBenchmarks,torhve/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,joshk/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zloster/FrameworkBenchmarks,dmacd/FB-try1,yunspace/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zapov/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zloster/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,valyala/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,sgml/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,grob/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,nathana1/FrameworkBenchmarks
9b72fddd39dc2ad590b800138ec56421f4fbc6d1
lib/createEnvironment.lua
lib/createEnvironment.lua
local createSettings = import("./createSettings") local functions = import("./functions") local taskFunctions = import("./taskFunctions") local types = import("./types") local Enum = import("./Enum") local Instance = import("./Instance") local baseEnvironment = {} for key, value in pairs(_G) do baseEnvironment[key] = value end for key, value in pairs(types) do baseEnvironment[key] = value end baseEnvironment.Instance = Instance baseEnvironment.Enum = Enum --[[ Create a new script environment, suitable for use with the given habitat. ]] local function createEnvironment(habitat) local environment = {} for key, value in pairs(baseEnvironment) do environment[key] = value end for key, fn in pairs(functions) do environment[key] = fn end for key, fnCreator in pairs(taskFunctions) do environment[key] = fnCreator(habitat.taskScheduler) end environment.settings = createSettings(habitat.settings) environment.require = function(path) return habitat:require(path) end environment.game = habitat.game return environment end return createEnvironment
local createSettings = import("./createSettings") local functions = import("./functions") local taskFunctions = import("./taskFunctions") local types = import("./types") local Enum = import("./Enum") local Instance = import("./Instance") local baseEnvironment = {} for key, value in pairs(_G) do baseEnvironment[key] = value end for key, value in pairs(types) do baseEnvironment[key] = value end baseEnvironment.Instance = Instance baseEnvironment.Enum = Enum baseEnvironment.__LEMUR__ = true --[[ Create a new script environment, suitable for use with the given habitat. ]] local function createEnvironment(habitat) local environment = {} for key, value in pairs(baseEnvironment) do environment[key] = value end for key, fn in pairs(functions) do environment[key] = fn end for key, fnCreator in pairs(taskFunctions) do environment[key] = fnCreator(habitat.taskScheduler) end environment.settings = createSettings(habitat.settings) environment.require = function(path) return habitat:require(path) end environment.game = habitat.game return environment end return createEnvironment
Add super secret __LEMUR__ global
Add super secret __LEMUR__ global
Lua
mit
LPGhatguy/lemur
d078e4aeae1bd382fdc85335472a3a05c851e542
src/CppParser/premake4.lua
src/CppParser/premake4.lua
clang_msvc_flags = { "/wd4146", "/wd4244", "/wd4800", "/wd4345", "/wd4355", "/wd4996", "/wd4624", "/wd4291", "/wd4251" } if not (string.starts(action, "vs") and not os.is_windows()) then project "CppSharp.CppParser" kind "SharedLib" language "C++" SetupNativeProject() flags { common_flags } flags { "NoRTTI" } configuration "vs*" buildoptions { clang_msvc_flags } configuration "*" files { "*.h", "*.cpp", "*.lua" } SetupLLVMIncludes() SetupLLVMLibs() configuration "*" end include ("Bindings") include ("Bootstrap")
clang_msvc_flags = { "/wd4146", "/wd4244", "/wd4800", "/wd4345", "/wd4355", "/wd4996", "/wd4624", "/wd4291", "/wd4251" } if not (string.starts(action, "vs") and not os.is_windows()) then project "CppSharp.CppParser" kind "SharedLib" language "C++" SetupNativeProject() flags { common_flags } flags { "NoRTTI" } local copy = os.is_windows() and "xcopy /Q /E /Y /I" or "cp -rf"; local headers = path.getabsolute(path.join(LLVMRootDir, "lib/")) if os.isdir(headers) then postbuildcommands { copy .. " " .. headers .. " %{cfg.targetdir}" } end configuration "vs*" buildoptions { clang_msvc_flags } configuration "*" files { "*.h", "*.cpp", "*.lua" } SetupLLVMIncludes() SetupLLVMLibs() configuration "*" end include ("Bindings") include ("Bootstrap")
Copy the Clang builtin headers as part of the build if they are available.
Copy the Clang builtin headers as part of the build if they are available.
Lua
mit
mydogisbox/CppSharp,SonyaSa/CppSharp,ddobrev/CppSharp,u255436/CppSharp,ddobrev/CppSharp,SonyaSa/CppSharp,xistoso/CppSharp,mono/CppSharp,mydogisbox/CppSharp,Samana/CppSharp,genuinelucifer/CppSharp,mohtamohit/CppSharp,genuinelucifer/CppSharp,genuinelucifer/CppSharp,inordertotest/CppSharp,xistoso/CppSharp,mohtamohit/CppSharp,Samana/CppSharp,zillemarco/CppSharp,xistoso/CppSharp,inordertotest/CppSharp,mydogisbox/CppSharp,u255436/CppSharp,xistoso/CppSharp,xistoso/CppSharp,mono/CppSharp,Samana/CppSharp,ddobrev/CppSharp,inordertotest/CppSharp,SonyaSa/CppSharp,mohtamohit/CppSharp,u255436/CppSharp,inordertotest/CppSharp,mono/CppSharp,ddobrev/CppSharp,mohtamohit/CppSharp,genuinelucifer/CppSharp,genuinelucifer/CppSharp,ddobrev/CppSharp,ktopouzi/CppSharp,mono/CppSharp,Samana/CppSharp,u255436/CppSharp,mohtamohit/CppSharp,ktopouzi/CppSharp,mono/CppSharp,Samana/CppSharp,inordertotest/CppSharp,SonyaSa/CppSharp,mydogisbox/CppSharp,SonyaSa/CppSharp,ktopouzi/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp,mydogisbox/CppSharp,mono/CppSharp,ktopouzi/CppSharp,u255436/CppSharp,ktopouzi/CppSharp,zillemarco/CppSharp
9b8597a066dba70a554d1383f1936bbc04dd505f
madrust-announce.lua
madrust-announce.lua
PLUGIN.Title = "madrust-announce" PLUGIN.Description = "Broadcast announcements using a subreddit as the source." PLUGIN.Version = "0.1" PLUGIN.Author = "W. Brian Gourlie" function PLUGIN:Init() self.Announcement = {} print("init madrust-announce") self:AddChatCommand( "announce", self.cmdAnnounce ) print("requesting data from subreddit") webrequest.Send ("http://www.reddit.com/r/madrust/.json", function(respCode, response) print("subreddit request callback [HTTP " .. respCode .. "]") local resp = json.decode(response) for _, _listing in pairs(resp.data.children) do local title = _listing.data.title if string.sub(string.upper(title), 0, 15) == "[ANNOUNCEMENT] " then print("announcement is " .. title) self.Announcement = { title = string.sub(_listing.data.title, 16) } break end end end ) print("subreddit request sent") end function PLUGIN:OnUserConnect( netuser ) rust.SendChatToUser( netuser, "[ANNOUNCE]", "Brian is the bomb.com" ) end function PLUGIN:cmdAnnounce( netuser, cmd, args ) rust.BroadcastChat( "[ANNOUNCE]", self.Announcement.title ) end
PLUGIN.Title = "madrust-announce" PLUGIN.Description = "Broadcast announcements using a subreddit as the source." PLUGIN.Version = "0.1" PLUGIN.Author = "W. Brian Gourlie" function PLUGIN:Init() self.Announcement = {} print("init madrust-announce") self:AddChatCommand( "announce", self.cmdAnnounce ) print("requesting data from subreddit") webrequest.Send ("http://www.reddit.com/r/madrust/.json", function(respCode, response) print("subreddit request callback [HTTP " .. respCode .. "]") local resp = json.decode(response) for _, _listing in pairs(resp.data.children) do local title = _listing.data.title if string.sub(string.upper(title), 0, 15) == "[ANNOUNCEMENT] " then print("announcement is " .. title) self.Announcement = { title = string.sub(_listing.data.title, 16), id = _listing.data.id created_utc = _listing.data.created_utc } break end end end ) print("subreddit request sent") end function PLUGIN:OnUserConnect( netuser ) rust.SendChatToUser( netuser, "[ANNOUNCE]", "Brian is the bomb.com" ) end function PLUGIN:cmdAnnounce( netuser, cmd, args ) rust.BroadcastChat( "[ANNOUNCE]", self.Announcement.title ) end
Add more data to the announcement model.
Add more data to the announcement model.
Lua
mit
bgourlie/madrust-oxide-plugins
e6112bcf81fd2daca587e0fac646a6486218c712
src/states/GameOverState.lua
src/states/GameOverState.lua
local GameOverState = class('GameOverState', State) local suit = require('lib/suit') function GameOverState:initialize(won) self.won = won end function GameOverState:update(dt) suit.updateMouse(push:toGame(love.mouse.getPosition())) suit.layout:reset(0, 100) suit.Label("Game Over", {align = "center"}, suit.layout:row(512, 50)) local text = self.won and "You crushed the enemy!" or "Try harder next time." suit.Label(text, {}, suit.layout:row(512, 50)) if self.won then if suit.Button("Next level", suit.layout:row(512, 40)).hit then stack:pop() end else if suit.Button("Back to Hangar", suit.layout:row(512, 40)).hit then stack:pop() end end end function GameOverState:keypressed(key) if key == "space" then stack:pop() end end function GameOverState:draw() push:apply('start') suit:draw() push:apply('end') end return GameOverState
local GameOverState = class('GameOverState', State) local suit = require('lib/suit') local texts = { won = { "You completely obliterated them.", "Your parents will be so proud of you!", "Well played.", "gg ez" }, lost = { "Your mom could have played better.", "#rekt", "Try harder next time.", "Come on. It's not that hard." } } function GameOverState:initialize(won) self.won = won local text_id = math.random(1, #texts.won) self.text = self.won and texts.won[text_id] or texts.lost[text_id] end function GameOverState:update(dt) suit.updateMouse(push:toGame(love.mouse.getPosition())) suit.layout:reset(0, 100) suit.Label("Game Over", {align = "center"}, suit.layout:row(512, 50)) suit.Label(self.text, {}, suit.layout:row(512, 50)) if self.won then if suit.Button("Next level", suit.layout:row(512, 40)).hit then stack:pop() end else if suit.Button("Back to Hangar", suit.layout:row(512, 40)).hit then stack:pop() end end end function GameOverState:keypressed(key) if key == "space" then stack:pop() end end function GameOverState:draw() push:apply('start') suit:draw() push:apply('end') end return GameOverState
Add more game over texts
Add more game over texts
Lua
mit
alexd2580/igjam2016,alexd2580/igjam2016
21956626883d7b4c4e66dbd99964128d8666187c
build/genie.lua
build/genie.lua
KULMA_DIR = path.getabsolute("..") .. "/" KULMA_BUILD_DIR = KULMA_DIR .. ".build/" KULMA_THIRDPARTY_DIR = KULMA_DIR .. "3rdparty/" solution "kulma" configurations { "debug", "release" } platforms { "x32", "x64" } language "C++" configuration {} dofile("toolchain.lua") toolchain(KULMA_BUILD_DIR, KULMA_THIRDPARTY_DIR) dofile("kulma.lua") group "engine" kulma_project("kulma", "StaticLib") group "examples" kulma_example_project("00-helloworld") group "unit_test" project "unit_test" kind("ConsoleApp") files { path.join(KULMA_DIR, "tests", "**.cpp") } links { "kulma" } includedirs { KULMA_THIRDPARTY_DIR }
KULMA_DIR = path.getabsolute("..") .. "/" KULMA_BUILD_DIR = KULMA_DIR .. ".build/" KULMA_THIRDPARTY_DIR = KULMA_DIR .. "3rdparty/" solution "kulma" configurations { "debug", "release" } platforms { "x32", "x64" } language "C++" configuration {} dofile("toolchain.lua") toolchain(KULMA_BUILD_DIR, KULMA_THIRDPARTY_DIR) dofile("kulma.lua") group "engine" kulma_project("kulma", "StaticLib") group "examples" kulma_example_project("00-helloworld") group "unit_test" project "unit_test" kind("ConsoleApp") files { path.join(KULMA_DIR, "tests", "**.cpp") } links { "kulma" } includedirs { path.join(KULMA_DIR, "include"), KULMA_THIRDPARTY_DIR }
Add include dir to unit tests
Genie: Add include dir to unit tests
Lua
mit
siquel/kulma,siquel/kulma
f3ab574c6441c3ab86e8f5fdd47dea5e629a4635
modulefiles/python/2.7.7/all-pkgs.lua
modulefiles/python/2.7.7/all-pkgs.lua
help( [[ This module loads Python 2.7.7 with a set of popular packages for scientific computing (Numpy, matplotlib, Scipy, pandas, nltk) ]]) local version = "2.7.7" local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/virtualenv-2.7/all" pushenv("VIRTUAL_ENV", base) prepend_path("PATH", pathJoin(base, "bin")) pushenv("PYTHONHOME", base) prereq('atlas', 'blas') -- Setup Modulepath for packages built by this python stack local mroot = os.getenv("MODULEPATH_ROOT") local mdir = pathJoin(mroot,"Python",version) prepend_path("MODULEPATH", mdir)
help( [[ This module loads Python 2.7.7 with a set of popular packages for scientific computing (Numpy, matplotlib, Scipy, pandas, nltk) ]]) local version = "2.7.7" local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/virtualenv-2.7/all" pushenv("VIRTUAL_ENV", base) prepend_path("PATH", pathJoin(base, "bin")) pushenv("PYTHONHOME", base) prereq('atlas', 'lapack') -- Setup Modulepath for packages built by this python stack local mroot = os.getenv("MODULEPATH_ROOT") local mdir = pathJoin(mroot,"Python",version) prepend_path("MODULEPATH", mdir)
Use lapack instead of blas for lapack libraries
Use lapack instead of blas for lapack libraries
Lua
apache-2.0
OSGConnect/modulefiles,OSGConnect/modulefiles,OSGConnect/modulefiles
06fe31ccbd61f2d81409c12ea1d2cbc40816e5fa
mods/track_players/init.lua
mods/track_players/init.lua
local time_interval = 30.0 local fifo_path = "/home/quentinbd/minetest/worlds/minetestforfun/mt_players_fifo" function players_data() local ps = {} for _, player in ipairs(minetest.get_connected_players()) do local pos = player:getpos() local pname = player:get_player_name() local data = { name = pname, x = pos.x, y = pos.y, z = pos.z } table.insert(ps, data) end if table.getn(ps) == 0 then return '[]\n' end return minetest.write_json(ps) .. '\n' end function time_interval_func() local players = players_data() local fifo = io.open(fifo_path, 'w') if (fifo ~= nil) then fifo:write(players) fifo:close() end minetest.after(time_interval, time_interval_func) end minetest.after(time_interval, time_interval_func)
local time_interval = 5.0 local fifo_path = "/home/quentinbd/minetest/worlds/minetestforfun/mt_players_fifo" function players_data() local ps = {} for _, player in ipairs(minetest.get_connected_players()) do local pos = player:getpos() local pname = player:get_player_name() local data = { name = pname, x = pos.x, y = pos.y, z = pos.z } table.insert(ps, data) end if table.getn(ps) == 0 then return '[]\n' end return minetest.write_json(ps) .. '\n' end function time_interval_func() local players = players_data() local fifo = io.open(fifo_path, 'w') if (fifo ~= nil) then fifo:write(players) fifo:close() end minetest.after(time_interval, time_interval_func) end minetest.after(time_interval, time_interval_func)
Set the check interval for track_player mod...
Set the check interval for track_player mod... ... to 5seconds (last change i think)
Lua
unlicense
Coethium/server-minetestforfun,sys4-fr/server-minetestforfun,MinetestForFun/minetest-minetestforfun-server,Gael-de-Sailly/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,Ombridride/minetest-minetestforfun-server,MinetestForFun/server-minetestforfun,LeMagnesium/minetest-minetestforfun-server,LeMagnesium/minetest-minetestforfun-server,MinetestForFun/server-minetestforfun,MinetestForFun/server-minetestforfun,paly2/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,sys4-fr/server-minetestforfun,LeMagnesium/minetest-minetestforfun-server,Coethium/server-minetestforfun,Gael-de-Sailly/minetest-minetestforfun-server,MinetestForFun/minetest-minetestforfun-server,MinetestForFun/minetest-minetestforfun-server,Coethium/server-minetestforfun,Ombridride/minetest-minetestforfun-server,crabman77/minetest-minetestforfun-server,paly2/minetest-minetestforfun-server,sys4-fr/server-minetestforfun,Ombridride/minetest-minetestforfun-server,Gael-de-Sailly/minetest-minetestforfun-server
a7eb0eb7c3f82c6ef4027a0d86e7705490df3ba4
app/template.lua
app/template.lua
--[[ file: app/template.lua desc: Oxypanel template class (deals w/ module templates) inherits from luawa.template ]] --our template class local template = {} --set our template to inherit luawa.template's methods luawa.template.__index = luawa.template setmetatable( template, luawa.template ) function template:setup() if luawa.request.get._api then luawa.template.api = true end end function template:load( template, inline ) local dir = 'app/templates/' .. oxy.config.oxyngx.template .. '/' .. template return luawa.template:load( dir, inline ) end --loading module templates function template:loadModule( module, template, inline ) local dir = 'modules/' .. module .. '/templates/' .. oxy.config.oxyngx.template .. '/' .. template return luawa.template:load( dir, inline ) end --wrap template w/ header+footer (template inline) --don't use template as name because can either be loadModule or load function template:wrap( template ) self:load( 'head' ) self:load( 'header' ) self:put( template ) self:load( 'footer' ) end --error only w/ api function template:error( message ) luawa.session:addMessage( 'error', message ) self:load( 'header' ) self:load( 'footer' ) end return template
-- File: app/template.lua -- Desc: extends luawa.template to extend functionality --our template class local template = {} --set our template to inherit luawa.template's methods luawa.template.__index = luawa.template setmetatable( template, luawa.template ) function template:setup() if luawa.request.get._api then luawa.template.api = true end end function template:load( template ) local dir = 'app/templates/' .. oxy.config.oxyngx.template .. '/' .. template return luawa.template:load( dir ) end --loading module templates function template:loadModule( module, template ) local dir = 'modules/' .. module .. '/templates/' .. oxy.config.oxyngx.template .. '/' .. template return luawa.template:load( dir ) end --wrap template w/ header+footer function template:wrap( template, module ) self:load( 'head' ) self:load( 'header' ) if module then self:loadModule( module, template ) else self:load( template ) end self:load( 'footer' ) end --error only w/ api function template:error( message ) luawa.session:addMessage( 'error', message ) self:load( 'head' ) self:load( 'header' ) self:load( 'footer' ) end return template
Simplify wrap and remove inline options ala Luawa
Simplify wrap and remove inline options ala Luawa
Lua
mit
Oxygem/Oxycore,Oxygem/Oxycore,Oxygem/Oxycore
ccbe889b85b251ad05d45899fbe53e1b25616d58
fimbul/ui/cli.lua
fimbul/ui/cli.lua
---@module fimbul.ui.cli -- Standard CLI functions -- local cli = {} local repository = require('fimbul.repository') function cli.standard_args(opts) local repo if opts['repository'] ~= nil then repo = opts['repository'] else repo = '.' end return repo end function cli.open_repository(repo) ok, r = pcall(repository.new, repository, repo) if not ok then io.stderr:write(r .. "\n") os.exit(3) end return r end function cli.dispatch_command(cmds, cmd) if cmd == nil then io.stderr:write("No command given.\n") os.exit(2) end local c = cmds[cmd] if c == nil then io.stderr:write("No such command: " .. cmd .. ". Try help.\n") os.exit(2) end ok, ret = pcall(c.handler) if ok then os.exit(ret or 0) else io.stderr:write(ret .. "\n") os.exit(3) end end return cli
---@module fimbul.ui.cli -- Standard CLI functions -- local cli = {} local repository = require('fimbul.repository') local logger = require('fimbul.logger') function cli.standard_parameters() return [[ -g, --game=GAME Game engine to use -v, --verbose Verbose logging output -h, --help This bogus. ]] end function cli.standard_args(opts) local game game = opts['game'] or 'v35' logger.VERBOSE = opts['verbose'] or false return game end function cli.open_repository(game) ok, r = pcall(repository.new, repository, game) if not ok then io.stderr:write(r .. "\n") os.exit(3) end return r end function cli.dispatch_command(cmds, cmd) if cmd == nil then io.stderr:write("No command given.\n") os.exit(2) end local c = cmds[cmd] if c == nil then io.stderr:write("No such command: " .. cmd .. ". Try help.\n") os.exit(2) end ok, ret = pcall(c.handler) if ok then os.exit(ret or 0) else io.stderr:write(ret .. "\n") os.exit(3) end end return cli
Move standard parameter handling to CLI
Move standard parameter handling to CLI
Lua
bsd-2-clause
n0la/fimbul
cf2614f6437d770a37d108ec8ec87b309c3c57fe
config/lib/elevation.lua
config/lib/elevation.lua
local math = math module "Elevation" function slope_speed(way_info, base_speed, forward) local distance local climb_distance local desc_distance local climb_factor local desc_factor distance = way_info["distance"] if forward then climb_distance = way_info["climbDistance"] desc_distance = way_info["descentDistance"] climb_factor = climb_distance / distance desc_factor = desc_distance / distance climb = way_info["climb"] descent = way_info["descent"] else desc_distance = way_info["climbDistance"] climb_distance = way_info["descentDistance"] desc_factor = climb_distance / distance climb_factor = desc_distance / distance descent = way_info["climb"] climb = way_info["descent"] end local remain_factor = 1 - (climb_factor + desc_factor) local climb_gradient = climb / climb_distance * 1000 local desc_gradient = -descent / desc_distance * 1000 return base_speed * remain_factor + speed(climb_gradient, base_speed) * climb_factor + speed(desc_gradient, base_speed) * desc_factor end function speed(g, base_speed) if g>0 then return math.max(3,base_speed-100*g) else return math.min(50,base_speed-50*g) end end
local math = math module "Elevation" function slope_speed(way_info, base_speed, forward) local distance local climb_distance local desc_distance local climb_factor local desc_factor distance = way_info["distance"] if forward then climb_distance = way_info["climbDistance"] desc_distance = way_info["descentDistance"] climb_factor = climb_distance / distance desc_factor = desc_distance / distance climb = way_info["climb"] descent = way_info["descent"] else desc_distance = way_info["climbDistance"] climb_distance = way_info["descentDistance"] desc_factor = climb_distance / distance climb_factor = desc_distance / distance descent = way_info["climb"] climb = way_info["descent"] end local remain_factor = 1 - (climb_factor + desc_factor) local climb_gradient = climb / climb_distance * 1000 local desc_gradient = -descent / desc_distance * 1000 return base_speed * remain_factor + speed(climb_gradient, base_speed) * climb_factor + speed(desc_gradient, base_speed) * desc_factor end function speed(g, base_speed) if g>0 then return math.max(math.min(base_speed, 3),base_speed-100*g) else return math.min(math.max(base_speed, 50),base_speed-50*g) end end
Use base_speed even if it's lower/higher than the reasonable min/max
Use base_speed even if it's lower/higher than the reasonable min/max
Lua
isc
perliedman/cykelbanor,perliedman/cykelbanor,perliedman/cykelbanor
d3dc8fa77bb810e5d7fef37386c0adbc61e51a8a
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.25" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.26" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.26
Bump release version to v0.0.26
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua
22c71c8f4c52aa6d54b1bda25d5fb2eb12b6ea96
assets/scripts/player.lua
assets/scripts/player.lua
local gz = require "assets/scripts/galaczy" Player = {} Player.__index = Player function Player.create() local player = {} setmetatable(player, Player) player.name = "Jaqk" player.life = 0 return player end function Player:init() self.life = 100 end function Player:update() print(self.name) print(self.life) end function Player:finish() self.life = 0 end instance = "player" player = Player.create()
local gz = require "assets/scripts/galaczy" Player = {} Player.__index = Player function Player.create() local player = {} setmetatable(player, Player) player.name = "Jaqk" player.life = 0 return player end function Player:init() self.life = 100 end function Player:update() -- print(self.name) -- print(self.life) end function Player:finish() self.life = 0 end instance = "player" player = Player.create()
Remove the print to have clean loop
Remove the print to have clean loop
Lua
mit
jacquesrott/merriment,jacquesrott/merriment,jacquesrott/merriment
6973ea12db0dc06c70b5c848ebb82c5c782a2017
inputters/lua_spec.lua
inputters/lua_spec.lua
SILE = require("core.sile") SILE.backend = "dummy" SILE.init() SILE.utilities.error = error describe("#LUA #inputter", function () local inputter = SILE.inputters.lua() describe("should parse", function () it("bare code", function() local t = inputter:parse([[SILE.scratch.foo = 42]]) assert.is.truthy(type(t) == "function") assert.is.truthy(type(SILE.scratch.foo) == "nil") assert.is.truthy(type(t() == "nil")) assert.is.equal(42, SILE.scratch.foo) end) it("functions", function() local t = inputter:parse([[return function() return 6 end]]) local b = t() assert.is.truthy(type(b) == "function") assert.is.equal(6, b()) end) it("documents", function() local t = inputter:parse([[return { "bar", command = "foo" }]]) local b = t() assert.is.equal("foo", b.command) assert.is.equal("bar", b[1]) end) end) describe("should reject", function () it("invalid Lua syntax", function() assert.has_error(function () inputter:parse([[a = "b]]) end, [[[string "a = "b"]:1: unfinished string near <eof>]]) assert.has_error(function() inputter:parse([[if]]) end, [[[string "if"]:1: unexpected symbol near <eof>]]) end) end) end)
Add test for LUA inputter
test(inputters): Add test for LUA inputter
Lua
mit
alerque/sile,alerque/sile,alerque/sile,alerque/sile
600252b5525a97ef24e09764719e6306d6ab8b2b
src/conf.lua
src/conf.lua
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.11" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
function love.conf(t) t.title = "Journey to the Center of Hawkthorne v0.0.12" t.author = "Kyle Conroy" t.version = "0.8.0" t.identity = "hawkthorne" t.screen.width = 456 t.screen.height = 264 t.consolne = false t.modules.physics = false t.modules.joystick = false t.release = false end
Bump release version to v0.0.12
Bump release version to v0.0.12
Lua
mit
hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua
74fb91795cea8ff45a752f8945fca57cb920de53
modules/title/sites/githubgist.lua
modules/title/sites/githubgist.lua
local simplehttp = require'simplehttp' local json = require'json' customHosts['gist%.github%.com'] = function(queue, info) local query = info.query local path = info.path local fragment = info.fragment local gid local pattern = '/%a+/(%w+)' if(path and path:match(pattern)) then gid = path:match(pattern) end if(gid) then simplehttp( ('https://api.github.com/gists/%s'):format(gid), function(data) local info = json.decode(data) local name = info.user if name == json.util.null then name = 'Anonymous' else name = info.user.login end local files = '' for file,_ in pairs(info.files) do files = files..file..' ' end local time = info.updated_at local out = {} table.insert(out, string.format('\002@%s\002 %s %s', name, time, files)) queue:done(table.concat(out, ' ')) end ) return true end end
local simplehttp = require'simplehttp' local json = require'json' customHosts['gist%.github%.com'] = function(queue, info) local query = info.query local path = info.path local fragment = info.fragment local gid local pattern = '/%a+/(%w+)' if(path and path:match(pattern)) then gid = path:match(pattern) end if(gid) then simplehttp( ('https://api.github.com/gists/%s'):format(gid), function(data) local info = json.decode(data) local name = info.user if name == json.util.null then name = 'Anonymous' else name = info.user.login end local files = '' for file,_ in pairs(info.files) do files = files..file..' ' end local time = info.updated_at local out = {} table.insert(out, string.format('\002@%s\002 %s %s', name, time, files)) queue:done(table.concat(out, ' ')) end ) return true end end
Remove bad whitespaces in gist.
title: Remove bad whitespaces in gist.
Lua
mit
torhve/ivar2,haste/ivar2,torhve/ivar2,torhve/ivar2
fa778d2077616ca93b227f0c02242a189054d3e0
lib/redis_pool.lua
lib/redis_pool.lua
local redis = require 'resty.redis' -- Redis connection parameters local _M = { host = os.getenv("REDIS_HOST") or 'xc-redis', port = 6379, timeout = 1000, -- 1 second keepalive = 10000, -- milliseconds poolsize = 1000 -- # connections } -- @return table with a redis connection from the pool function _M.acquire() local conn = redis:new() conn:set_timeout(_M.timeout) local ok, err = conn:connect(_M.host, _M.port) return conn, ok, err end -- return ownership of this connection to the pool function _M.release(conn) conn:set_keepalive(_M.keepalive, _M.poolsize) end return _M
local redis = require 'resty.redis' -- Redis connection parameters local _M = { host = os.getenv("REDIS_HOST") or 'xc-redis', port = 6379, timeout = 3000, -- 3 seconds keepalive = 10000, -- milliseconds poolsize = 1000 -- # connections } -- @return table with a redis connection from the pool function _M.acquire() local conn = redis:new() conn:set_timeout(_M.timeout) local ok, err = conn:connect(_M.host, _M.port) return conn, ok, err end -- return ownership of this connection to the pool function _M.release(conn) conn:set_keepalive(_M.keepalive, _M.poolsize) end return _M
Increase timeout for Redis (for priority auth)
Increase timeout for Redis (for priority auth)
Lua
apache-2.0
3scale/apicast-xc
a5d22a424daf5398cce94c2c286ce848368143d4
middleware/cors/cors_spec.lua
middleware/cors/cors_spec.lua
local expect = require 'spec.expect' local cors = require 'cors.cors' describe("CORS", function() describe("when the status is not 404", function() it("does nothing", function() local request = { method = 'GET', uri = '/'} local response = { status = 200, body = 'ok' } expect(cors):called_with(request, response) :to_pass(request) :to_return(response) :to_send_number_of_emails(0) :to_set_number_of_keys_in_middleware_bucket(0) end) end) describe("when the status is 404", function() it("sends an email and marks the middleware bucket", function() local request = { method = 'GET', uri = '/'} local response = { status = 404, body = 'error' } expect(cors):called_with(request, response) :to_return(response) :to_set_in_middleware_bucket('last_mail') :to_send_email('YOUR-MAIL-HERE@gmail.com', 'A 404 has ocurred', 'a 404 error happened in http://localhost/') end) it("does not send two emails when called twice in rapid succession", function() local request = { method = 'GET', uri = '/'} local response = { status = 404, body = 'error' } expect(cors) :called_with(request, response) -- not a typo, call the same request twice :called_with(request, response) :to_send_number_of_emails(1) :to_set_number_of_keys_in_middleware_bucket(1) end) end) end)
local expect = require 'spec.expect' local cors = require 'cors.cors' describe("CORS", function() it("adds a header", function() local request = { method = 'GET', uri = '/'} local backend_response = { status = 200, body = 'ok' } local expected_response = { status = 200, body = 'ok', headers = {['Access-Control-Allow-Origin'] = "http://domain1.com http://domain2.com"}} expect(cors):called_with(request, backend_response) :to_pass(request) :to_receive(backend_response) :to_return(expected_response) end) end)
Update CORS spec to reflect what it really does
Update CORS spec to reflect what it really does
Lua
mit
APItools/middleware
703774516e84f00dfbea58584bb2d5e913f25fda
luasrc/tests/testMultipleRequire.lua
luasrc/tests/testMultipleRequire.lua
require "totem" local myTests = {} local tester = totem.Tester() function myTests.test_beta() local N = 10000 local oneRequire = torch.Tensor(N) local multipleRequire = torch.Tensor(N) -- Call N in one go require 'randomkit' state = torch.getRNGState() randomkit.gauss(oneRequire) -- call N with require between each another torch.setRNGState(state) local multipleRequire = torch.Tensor(N) for i=1,N do require 'randomkit' multipleRequire[i] = randomkit.gauss() end -- The streams should be the same tester:assertTensorEq(oneRequire, multipleRequire, 1e-16, 'Multiple require changed the stream') end tester:add(myTests) return tester:run()
require "totem" local myTests = {} local tester = totem.Tester() function myTests.test_beta() local N = 10000 local oneRequire = torch.Tensor(N) local multipleRequire = torch.Tensor(N) -- Call N in one go require 'randomkit' local ignored = torch.rand(1) local state = torch.getRNGState() randomkit.gauss(oneRequire) -- call N with require between each another torch.setRNGState(state) local multipleRequire = torch.Tensor(N) for i=1,N do require 'randomkit' multipleRequire[i] = randomkit.gauss() end -- The streams should be the same tester:assertTensorEq(oneRequire, multipleRequire, 1e-16, 'Multiple require changed the stream') end tester:add(myTests) return tester:run()
Fix test with serial dependency.
Fix test with serial dependency. - torch.rand() must be called before torch.getRNGState() to ensure the state is defined. - Added a 'local' keyword.
Lua
bsd-3-clause
fastturtle/torch-randomkit,deepmind/torch-randomkit,fastturtle/torch-randomkit,deepmind/torch-randomkit
dfe1f3bac2f0e07505cc83b41a8411f557911eeb
docker/heka/plugins/decoders/os_rabbitmq_log.lua
docker/heka/plugins/decoders/os_rabbitmq_log.lua
-- Copyright 2015-2016 Mirantis, Inc. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. local dt = require "date_time" local l = require 'lpeg' l.locale(l) local patt = require 'os_patterns' local utils = require 'os_utils' local msg = { Timestamp = nil, Type = 'log', Hostname = nil, Payload = nil, Pid = nil, Fields = nil, Severity = nil, } -- RabbitMQ message logs are formatted like this: -- =ERROR REPORT==== 2-Jan-2015::09:17:22 === -- Blabla -- Blabla -- local message = l.Cg(patt.Message / utils.chomp, "Message") -- The token before 'REPORT' isn't standardized so it can be a valid severity -- level as 'INFO' or 'ERROR' but also 'CRASH' or 'SUPERVISOR'. local severity = l.Cg(l.R"AZ"^1, "SeverityLabel") local day = l.R"13" * l.R"09" + l.R"19" local datetime = l.Cg(day, "day") * patt.dash * dt.date_mabbr * patt.dash * dt.date_fullyear * "::" * dt.rfc3339_partial_time local timestamp = l.Cg(l.Ct(datetime)/ dt.time_to_ns, "Timestamp") local grammar = l.Ct("=" * severity * " REPORT==== " * timestamp * " ===" * l.P'\n' * message) function process_message () local log = read_message("Payload") local m = grammar:match(log) if not m then return -1 end msg.Timestamp = m.Timestamp msg.Payload = m.Message if utils.label_to_severity_map[m.SeverityLabel] then msg.Severity = utils.label_to_severity_map[m.SeverityLabel] elseif m.SeverityLabel == 'CRASH' then msg.Severity = 2 -- CRITICAL else msg.Severity = 5 -- NOTICE end msg.Fields = {} msg.Fields.severity_label = utils.severity_to_label_map[msg.Severity] msg.Fields.programname = 'rabbitmq' return utils.safe_inject_message(msg) end
Add Heka log decoder for RabbitMQ
Add Heka log decoder for RabbitMQ In the future the Heka Lua sandboxes will be moved out of Kolla, and installed in the Heka container using a deb or rpm package. Partially implements: blueprint heka Change-Id: I1aa27048d22f1a5ed385180696d320af9a961389
Lua
apache-2.0
negronjl/kolla,openstack/kolla,negronjl/kolla,mrangana/kolla,nihilifer/kolla,tonyli71/kolla,GalenMa/kolla,mandre/kolla,dardelean/kolla-ansible,openstack/kolla,toby82/kolla,intel-onp/kolla,stackforge/kolla,GalenMa/kolla,dardelean/kolla-ansible,stackforge/kolla,dardelean/kolla-ansible,intel-onp/kolla,mandre/kolla,tonyli71/kolla,nihilifer/kolla,stackforge/kolla,rahulunair/kolla,toby82/kolla,negronjl/kolla,coolsvap/kolla,mandre/kolla,toby82/kolla,mrangana/kolla,rahulunair/kolla,coolsvap/kolla,coolsvap/kolla
86f4b0076ff633c967c582def18f84ce36c90c2d
src/cosy/util/turingtest.lua
src/cosy/util/turingtest.lua
local Platform = require "cosy.platform" local TuringTest = {} TuringTest.questions = {} function TuringTest.generate () math.randomseed (os.time ()) local i = math.random (1, #TuringTest) return TuringTest [i] () end TuringTest [1] = function () return { question = Platform.i18n "turing:what-is-round", answer = function (x) return x:trim ():lower () == "place" end } end TuringTest [1] = function () return { question = Platform.i18n "turing:what-is-rectangular", answer = function (x) return x:trim ():lower () == Platform.i18n "transition" end } end setmetatable (TuringTest, { __call = TuringTest.generate }) return TuringTest
Add very simple text-based reverse turing test.
Add very simple text-based reverse turing test.
Lua
mit
CosyVerif/library,CosyVerif/library,CosyVerif/library
5db100fc0f58518233ba716448a0d2eb248dbb6c
lua/fm-player.lua
lua/fm-player.lua
-- Play FM radio. Has no visible interface. function setup() freq = (100.9e6 + 50000) / 1e6 device = nrf_device_new(freq, "../rfdata/rf-100.900-1.raw") player = nrf_player_new(device, NRF_DEMODULATE_WBFM) end function draw() ngl_clear(0.2, 0.2, 0.2, 1.0) end function on_key(key, mods) keys_frequency_handler(key, mods) end
-- Play FM radio. Has no visible interface. function setup() freq_offset = 50000 freq = (1500e6 + freq_offset) / 1e6 device = nrf_device_new(freq, "../rfdata/rf-100.900-1.raw") player = nrf_player_new(device, NRF_DEMODULATE_WBFM, freq_offset) end function draw() ngl_clear(0.2, 0.2, 0.2, 1.0) end function on_key(key, mods) keys_frequency_handler(key, mods) if key == KEY_LEFT_BRACKET then freq_offset = freq_offset + 50000 print(freq + (freq_offset / 1e6)) nrf_player_set_freq_offset(player, freq_offset) elseif key == KEY_RIGHT_BRACKET then freq_offset = freq_offset - 50000 print(freq + (freq_offset / 1e6)) nrf_player_set_freq_offset(player, freq_offset) end end
Change freq_offset using [ and ].
Change freq_offset using [ and ].
Lua
mit
fdb/frequensea,silky/frequensea,silky/frequensea,fdb/frequensea,fdb/frequensea,silky/frequensea,silky/frequensea,silky/frequensea,fdb/frequensea,fdb/frequensea
8858f6af00d0eaebec5cced499bac01aba106d5b
luasnake/grid.lua
luasnake/grid.lua
-- grid.lua local grid = {} ; grid.__index = grid function grid.new(numX, numY, cellSize) local g = setmetatable({x = numX, y = numY, size = cellSize}, grid) g:clear() return g end function grid:clear() self.sections = {} end function grid:draw() end function grid:placeAt(x, y, is, obj) if grid:isFree(x, y) then table.insert(self.sections, {x = x, y = y, is = is, obj = obj}) return true else return false end end function grid:isFree(x, y) if self.sections then for _, sec in pairs(self.sections) do if sec.x == x and sec.y == y then return false end end end return true end function grid:test() print("TEST") end return grid
-- grid.lua local grid = {} ; grid.__index = grid function grid.new(numX, numY, cellSize) local g = setmetatable({x = numX, y = numY, size = cellSize}, grid) g:clear() return g end function grid:clear() self.tiles = {} end function grid:draw() end function grid:placeAt(x, y, is, obj) if grid:isFree(x, y) and grid:canPlaceAt(x, y) then table.insert(self.tiles, {x = x, y = y, is = is, obj = obj}) return true else return false end end function grid:isFree(x, y) if self.sections then for _, sec in pairs(self.tiles) do if sec.x == x and sec.y == y then return false end end end return true end function grid:canPlaceAt(x, y) return (x >= 0) and (x <= self.x) and (y >= 0) and (y <= self.y) end return grid
Check tiles are within bounds
Check tiles are within bounds
Lua
apache-2.0
owenjones/LuaSnake
49bb504828f88fa10e52ecdcd3f58b544911ebb8
titan-compiler/checker.lua
titan-compiler/checker.lua
local checker = {} local symtab = require 'titan-compiler.symtab' local function bindvars(node, st, errors) if not node or type(node) ~= "table" then return end local function bindvars_children() for _, child in node:children() do bindvars(child, st, errors) end end local tag = node._tag if not tag then -- the node is an array for _, elem in ipairs(node) do bindvars(elem, st, errors) end elseif tag == "TopLevel_Func" then st:add_symbol(node.name, node) st:with_block(bindvars_children) elseif tag == "Decl_Decl" then st:add_symbol(node.name, node) elseif tag == "Stat_Block" then st:with_block(bindvars_children) elseif tag == "Var_Name" then node.decl = st:find_symbol(node.name) if not node.decl then -- TODO generate better error messages when we have the line num local error = "variable '" .. node.name .. "' not declared" table.insert(errors, error) end else bindvars_children() end end function checker.check(ast) local st = symtab.new() local errors = {} st:with_block(bindvars, ast, st, errors) -- TODO return all error messages if #errors > 0 then return false, errors[1] end return true end return checker
local checker = {} local symtab = require 'titan-compiler.symtab' local function visit_children(f, node, ...) local tag = node._tag if not tag then -- the node is an array for _, child in ipairs(node) do f(child, ...) end else for _, child in node:children() do f(child, ...) end end end local function bindvars(node, st, errors) if not node or type(node) ~= "table" then return end local tag = node._tag if tag == "TopLevel_Func" then st:add_symbol(node.name, node) st:with_block(visit_children, node, st, errors) elseif tag == "Decl_Decl" then st:add_symbol(node.name, node) elseif tag == "Stat_Block" then st:with_block(visit_children, node, st, errors) elseif tag == "Var_Name" then node.decl = st:find_symbol(node.name) if not node.decl then -- TODO generate better error messages when we have the line num local error = "variable '" .. node.name .. "' not declared" table.insert(errors, error) end else visit_children(node, st, errors) end end function checker.check(ast) local st = symtab.new() local errors = {} st:with_block(bindvars, ast, st, errors) -- TODO return all error messages if #errors > 0 then return false, errors[1] end return true end return checker
Create a separate function to visit children nodes
Create a separate function to visit children nodes
Lua
mit
titan-lang/titan-v0,titan-lang/titan-v0,titan-lang/titan-v0
528fc73258456dfc0fc2eced26df1524f1a98a74
build/premake5.lua
build/premake5.lua
-- This is the starting point of the build scripts for the project. -- It defines the common build settings that all the projects share -- and calls the build scripts of all the sub-projects. config = {} dofile "Helpers.lua" dofile "LLVM.lua" solution "CppSharp" configurations { "Debug", "Release" } platforms { "x32", "x64" } characterset "Unicode" symbols "On" location (builddir) objdir (objsdir) targetdir (libdir) debugdir (bindir) configuration "windows" defines { "WINDOWS" } configuration {} group "Libraries" include (srcdir .. "/Core") include (srcdir .. "/AST") include (srcdir .. "/CppParser") include (srcdir .. "/CppParser/Bindings") include (srcdir .. "/CppParser/ParserGen") include (srcdir .. "/Parser") include (srcdir .. "/CLI") include (srcdir .. "/Generator") include (srcdir .. "/Generator.Tests") include (srcdir .. "/Runtime") dofile "Tests.lua" group "Tests" IncludeTests() if string.starts(action, "vs") then group "Examples" IncludeExamples() end
-- This is the starting point of the build scripts for the project. -- It defines the common build settings that all the projects share -- and calls the build scripts of all the sub-projects. config = {} dofile "Helpers.lua" dofile "LLVM.lua" solution "CppSharp" configurations { "Debug", "Release" } platforms { target_architecture() } characterset "Unicode" symbols "On" location (builddir) objdir (objsdir) targetdir (libdir) debugdir (bindir) configuration "windows" defines { "WINDOWS" } configuration {} group "Libraries" include (srcdir .. "/Core") include (srcdir .. "/AST") include (srcdir .. "/CppParser") include (srcdir .. "/CppParser/Bindings") include (srcdir .. "/CppParser/ParserGen") include (srcdir .. "/Parser") include (srcdir .. "/CLI") include (srcdir .. "/Generator") include (srcdir .. "/Generator.Tests") include (srcdir .. "/Runtime") dofile "Tests.lua" group "Tests" IncludeTests() if string.starts(action, "vs") then group "Examples" IncludeExamples() end
Remove multi-platform builds, use the `--arch` build option instead.
[build] Remove multi-platform builds, use the `--arch` build option instead.
Lua
mit
zillemarco/CppSharp,inordertotest/CppSharp,mono/CppSharp,inordertotest/CppSharp,u255436/CppSharp,ddobrev/CppSharp,ddobrev/CppSharp,mono/CppSharp,mono/CppSharp,mohtamohit/CppSharp,mono/CppSharp,inordertotest/CppSharp,zillemarco/CppSharp,inordertotest/CppSharp,zillemarco/CppSharp,ktopouzi/CppSharp,ddobrev/CppSharp,ktopouzi/CppSharp,mohtamohit/CppSharp,ddobrev/CppSharp,ktopouzi/CppSharp,zillemarco/CppSharp,mohtamohit/CppSharp,mohtamohit/CppSharp,u255436/CppSharp,mohtamohit/CppSharp,mono/CppSharp,zillemarco/CppSharp,u255436/CppSharp,ktopouzi/CppSharp,inordertotest/CppSharp,mono/CppSharp,u255436/CppSharp,u255436/CppSharp,ktopouzi/CppSharp,ddobrev/CppSharp
e1d82fd253cb7965df326d50ba6619eaa29b5e20
ci-main.lua
ci-main.lua
bootstrap = require("bootstrap") bootstrap.init() ci = require("ci") godi = require("godi") ci.init() godi.init() godi.bootstrap("3.12") godi.update() godi.upgrade() godi.build("godi-findlib") ci.exec("ocaml", "setup.ml", "-configure", "--enable-backtrace") ci.exec("ocaml", "setup.ml", "-build") ci.exec("ocaml", "setup.ml", "-test")
bootstrap = require("bootstrap") bootstrap.init() oasis = require("oasis") darcs = require("darcs") ci = require("ci") godi = require("godi") ci.init() godi.init() oasis.init() darcs.init() godi.bootstrap("3.12") godi.update() godi.upgrade() godi.build("godi-findlib") ci.exec("ocaml", "setup.ml", "-configure", "--enable-backtrace") ci.exec("ocaml", "setup.ml", "-build") ci.exec("ocaml", "setup.ml", "-test") darcs.create_tag(oasis.package_version())
Integrate tag generation in the continuous build pipeline
Integrate tag generation in the continuous build pipeline Ignore-this: b83dc8a4cbdf7de3f5e8076947f164de darcs-hash:20120611234746-4d692-5a92585198b5b7c6ef97fd4bab72bd90420f77a2
Lua
mit
mlin/ounit
5704e7fd391a1edac5cbed8f4a22295e3c61d808
exercises/matrix/example.lua
exercises/matrix/example.lua
return function(s) local rows = {} for line in s:gmatch('[%w ]+') do local row = {} for element in line:gmatch('%w+') do table.insert(row, tonumber(element)) end table.insert(rows, row) end return { row = function(which) return rows[which] end, column = function(which) local column = {} for _, row in ipairs(rows) do table.insert(column, row[which]) end return column end } end
return function(s) local rows = {} for line in s:gmatch('[%d ]+') do local row = {} for element in line:gmatch('%d+') do table.insert(row, tonumber(element)) end table.insert(rows, row) end return { row = function(which) return rows[which] end, column = function(which) local column = {} for _, row in ipairs(rows) do table.insert(column, row[which]) end return column end } end
Use digit matching instead of alphanumeric
Use digit matching instead of alphanumeric
Lua
mit
fyrchik/xlua,ryanplusplus/xlua,exercism/xlua
b699292bf371d8c1773883de3fb30fed2fb7b062
hammerspoon/window-expand.lua
hammerspoon/window-expand.lua
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "Return", function() local win = hs.window.focusedWindow() local f = win:frame() local max = win:screen():frame() f.x = max.x f.y = max.y f.w = max.w f.h = max.h win:setFrame(f) end) hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "F", function() local win = hs.window.focusedWindow() win:toggleFullScreen() end)
local function pressFn(mods, key) if key == nil then key = mods mods = {} end return function() hs.eventtap.keyStroke(mods, key, 1000) end end local function remap(mods, key, pressFn) hs.hotkey.bind(mods, key, pressFn, nil, pressFn) end remap({"cmd", "alt", "ctrl", "shift"}, "delete", pressFn({"cmd", "shift"}, "Return")) hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "Return", function() local win = hs.window.focusedWindow() local f = win:frame() local max = win:screen():frame() f.x = max.x f.y = max.y f.w = max.w f.h = max.h win:setFrame(f) end) hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "F", function() local win = hs.window.focusedWindow() win:toggleFullScreen() end)
Add hyper+delete (backspace) to expand active iterm pane
Add hyper+delete (backspace) to expand active iterm pane
Lua
mit
bsingr/dotfiles,bsingr/dotfiles
cf32483a732de1706d37c2975daedef77d7a4401
.textadept/init.lua
.textadept/init.lua
-- 4 spaces FTW! buffer.tab_width = 4 buffer.use_tabs = false -- Turn on line wrapping: buffer.wrap_mode = buffer.WRAP_WORD -- https://foicica.com/textadept/api.html#textadept.editing.auto_pairs -- Do not automatically generate pairs -- for certain characters -- (', ", (, [, {). textadept.editing.auto_pairs = nil -- Trim trailing whitespace: textadept.editing.strip_trailing_spaces = true -- Increase font size for GUI: buffer:set_theme( 'light', { font = 'IBM Plex Mono', fontsize = 18 } ) -- Interpret PICO-8 files as Lua. textadept.file_types.extensions.p8 = 'lua' -- Make Alt have the same functionality as -- Ctrl with word selection using Shift. -- Since the default functionality -- makes no sense. keys.asleft = buffer.word_left_extend keys.asright = buffer.word_right_extend -- Increase the line number margin width, relatively: events.connect( events.FILE_OPENED, function() if type(buffer.line_count) == 'number' then local lineCountLength = tostring(buffer.line_count):len() local width = (lineCountLength + 2) * 12 buffer.margin_width_n[0] = width + (not CURSES and 4 or 0) end end )
-- 4 spaces FTW! buffer.tab_width = 4 buffer.use_tabs = false -- Turn on line wrapping: buffer.wrap_mode = buffer.WRAP_WORD -- https://foicica.com/textadept/api.html#textadept.editing.auto_pairs -- Do not automatically generate pairs -- for certain characters -- (', ", (, [, {). textadept.editing.auto_pairs = nil -- Trim trailing whitespace: textadept.editing.strip_trailing_spaces = true -- Increase font size for GUI: buffer:set_theme( 'light', { font = 'IBM Plex Mono', fontsize = 16 } ) -- Interpret PICO-8 files as Lua. textadept.file_types.extensions.p8 = 'lua' -- Make Alt have the same functionality as -- Ctrl with word selection using Shift. -- Since the default functionality -- makes no sense. keys.asleft = buffer.word_left_extend keys.asright = buffer.word_right_extend
Remove line margin width code as it was added upstream. Reduce font size.
Remove line margin width code as it was added upstream. Reduce font size.
Lua
mpl-2.0
ryanpcmcquen/linuxTweaks
16ca2b93dab7faefb5e44dc3cea7f0e73d0ede70
lua/mediaplayer/config/client.lua
lua/mediaplayer/config/client.lua
--[[---------------------------------------------------------------------------- Media Player client configuration ------------------------------------------------------------------------------]] MediaPlayer.SetConfig({ --- -- HTML content -- html = { --- -- Base URL where HTML content is located. -- @type String -- base_url = "http://pixeltailgames.github.io/gm-mediaplayer/" }, --- -- Request menu -- request = { --- -- URL of the request menu. -- @type String -- url = "http://gmtower.org/apps/mediaplayer/" } })
--[[---------------------------------------------------------------------------- Media Player client configuration ------------------------------------------------------------------------------]] MediaPlayer.SetConfig({ --- -- HTML content -- html = { --- -- Base URL where HTML content is located. -- @type String -- base_url = "http://pixeltailgames.github.io/gm-mediaplayer/" }, --- -- Request menu -- request = { --- -- URL of the request menu. -- @type String -- url = "http://pixeltailgames.github.io/gm-mediaplayer/request.html" } })
Set the default request page to the github URL.
Set the default request page to the github URL.
Lua
mit
pixeltailgames/gm-mediaplayer,pixeltailgames/gm-mediaplayer
097cc43514fc1ede75cdc86a170613b302f8dcd1
src/lua/utils.lua
src/lua/utils.lua
-- functions used by different modules function split(str, delim) local ret = {} local last_end = 1 local s, e = str:find(delim, 1) while s do if s ~= 1 then cap = str:sub(last_end, e-1) table.insert(ret, cap) end last_end = e+1 s, e = str:find(delim, last_end) end if last_end <= #str then cap = str:sub(last_end) table.insert(ret, cap) end return ret end function get_file_directory(str) splitpath=split(str,"/") local newpath = "" if #splitpath > 1 then for i = 1,#splitpath-1 do newpath = newpath .. splitpath[i] .. "/" end end return newpath end
-- functions used by different modules function split(str, delim) local ret = {} local last_end = 1 local s, e = str:find(delim, 1) while s do cap = str:sub(last_end, e-1) table.insert(ret, cap) last_end = e+1 s, e = str:find(delim, last_end) end if last_end <= #str then cap = str:sub(last_end) table.insert(ret, cap) end return ret end function get_file_directory(str) local splitpath = split(str, "/") local newpath = "" if #splitpath > 1 then for i = 1,#splitpath-1 do newpath = newpath .. splitpath[i] .. "/" end end return newpath end
Fix path splitting for absolute path
Fix path splitting for absolute path The absolute path was not split correctly and generated a relative path.
Lua
mpl-2.0
nabilbendafi/haka,lcheylus/haka,lcheylus/haka,haka-security/haka,nabilbendafi/haka,LubyRuffy/haka,haka-security/haka,Wingless-Archangel/haka,lcheylus/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,LubyRuffy/haka
ed7959ffc7fd8a847a20fe6995dd21b4fc8ebf1a
src/apicast-cli/cli/create.lua
src/apicast-cli/cli/create.lua
local actions = require "apicast-cli.cmd" local colors = require "ansicolors" local function call(_, parser) local create_cmd = parser:command("c create", "Generates apicast application in a directory.") :action(actions.generator.create) create_cmd:usage(colors("%{bright red}Usage: apicast-cli create NAME [PATH]")) create_cmd:argument("name", "The name of your application.") -- create_cmd:argument("path", "The path to where you wish your app to be created."):default(".") create_cmd:epilog(colors([[ Example: %{bright red} apicast-cli create 'hello_world' /var/www %{reset} This will create your web app under /var/www/hello_world.]])) return create_cmd end local _M = {} local mt = { __call = call } return setmetatable(_M, mt)
local actions = require "apicast-cli.cmd" local colors = require "ansicolors" local function call(_, parser) local create_cmd = parser:command("c create", "Generates apicast application in a directory.") :action(actions.generator.create) create_cmd:usage(colors("%{bright red}Usage: apicast-cli create NAME [PATH]")) create_cmd:argument("name", "The name of your application.") create_cmd:argument("path", "The path to where you wish your app to be created."):default(".") create_cmd:epilog(colors([[ Example: %{bright red} apicast-cli create 'hello_world' /var/www %{reset} This will create your web app under /var/www/hello_world.]])) return create_cmd end local _M = {} local mt = { __call = call } return setmetatable(_M, mt)
Allow specifying path to the project
Allow specifying path to the project
Lua
apache-2.0
3scale/apicast-cli
768a9665994eb95c49077c9e537b9e1d169536ae
test/tests/HML.lua
test/tests/HML.lua
-- Test the left/right keys test.open('1_100.txt') local lineno = test.lineno local colno = test.colno local assertEq = test.assertEq local log = test.log test.key('j', 'l') assertEq(colno(), 0) assertEq(lineno(), 1) test.key('H') assertEq(colno(), 0) assertEq(lineno(), 0) test.key('M') assertEq(colno(), 0) assertEq(lineno(), 10) test.key('L') assertEq(colno(), 0) assertEq(lineno(), 20) test.key('H') assertEq(colno(), 0) assertEq(lineno(), 0) test.key('M') assertEq(colno(), 0) assertEq(lineno(), 10) test.key('L') assertEq(colno(), 0) assertEq(lineno(), 20)
-- Test the left/right keys test.open('1_100.txt') local lineno = test.lineno local colno = test.colno local assertEq = test.assertEq local log = test.log test.key('j', 'l') assertEq(colno(), 0) assertEq(lineno(), 1) test.key('H') assertEq(colno(), 0) assertEq(lineno(), 0) test.key('M') assertEq(colno(), 0) assertEq(lineno(), 11) test.key('L') assertEq(colno(), 0) assertEq(lineno(), 21) test.key('H') assertEq(colno(), 0) assertEq(lineno(), 0) test.key('M') assertEq(colno(), 0) assertEq(lineno(), 11) test.key('L') assertEq(colno(), 0) assertEq(lineno(), 21)
Fix the H/M/L tests. Not sure why the results are different to TA 9.
Fix the H/M/L tests. Not sure why the results are different to TA 9.
Lua
mit
jugglerchris/textadept-vi,jugglerchris/textadept-vi
1c6556b1db6b9e1613ce90e612f8e1305bba8408
projects/premake/premake4.lua
projects/premake/premake4.lua
#!lua require 'conanpremake' -- A solution contains projects, and defines the available configurations solution "ember-test" configurations { "Debug", "Release" } includedirs { conan_includedirs } libdirs { conan_libdirs } links { conan_libs } -- A project defines one build target project "ember-test" kind "ConsoleApp" language "C++" files { "../src/**.h", "../src/**.cpp" } configuration "Debug" defines { "DEBUG" } flags { "Symbols" } configuration "Release" defines { "NDEBUG" } flags { "Optimize" }
#!lua require 'conanpremake' -- A solution contains projects, and defines the available configurations solution "ember-test" configurations { "Debug", "Release" } includedirs { conan_includedirs } libdirs { conan_libdirs } links { conan_libs } -- A project defines one build target project "ember-test" kind "ConsoleApp" language "C++" files { "../../src/**.h", "../../src/**.cpp" } configuration "Debug" defines { "DEBUG" } flags { "Symbols" } configuration "Release" defines { "NDEBUG" } flags { "Optimize" }
Fix issue with paths for finding src.
Fix issue with paths for finding src.
Lua
mit
pjohalloran/ember,pjohalloran/ember,pjohalloran/ember
014708bceb70550a3ab8d539cff14d9085ca9cb8
test/trace/gc64_slot_revival.lua
test/trace/gc64_slot_revival.lua
do --- BC_KNIL local function f(x, y) end for i = 1,100 do f(i, i) f(nil, nil) end end
do --- BC_KNIL local function f(x, y) end for i = 1,100 do f(i, i) f(nil, nil) end end do --- BC_VARG local function f() end local function g(...) f() f(...) end for i = 1,100 do g() end end
Add test for BC_VARG slot revival
Add test for BC_VARG slot revival
Lua
apache-2.0
Igalia/snabb,Igalia/snabbswitch,alexandergall/snabbswitch,Igalia/snabbswitch,snabbco/snabb,snabbco/snabb,snabbco/snabb,Igalia/snabb,snabbco/snabb,alexandergall/snabbswitch,snabbco/snabb,alexandergall/snabbswitch,eugeneia/snabb,eugeneia/snabb,SnabbCo/snabbswitch,eugeneia/snabb,eugeneia/snabb,eugeneia/snabb,alexandergall/snabbswitch,Igalia/snabb,SnabbCo/snabbswitch,eugeneia/snabb,Igalia/snabb,Igalia/snabb,Igalia/snabb,SnabbCo/snabbswitch,snabbco/snabb,Igalia/snabb,eugeneia/snabb,Igalia/snabbswitch,Igalia/snabb,alexandergall/snabbswitch,SnabbCo/snabbswitch,Igalia/snabbswitch,alexandergall/snabbswitch,snabbco/snabb,alexandergall/snabbswitch,eugeneia/snabb,alexandergall/snabbswitch,snabbco/snabb,Igalia/snabbswitch
13c1ae5f26f04ef5fef4ac72714178a9ca383359
item/empty_pits.lua
item/empty_pits.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 will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ]] function M.UseItem(User, SourceItem, ltstate) User:inform( "An dieser Stelle gibt es nicht mehr zu holen.", "There isn't anything left in this pit.", Character.highPriority) end
Add a script for empty pits
Add a script for empty pits
Lua
agpl-3.0
Illarion-eV/Illarion-Content,vilarion/Illarion-Content
dc5b8b422e93400fbb442551d1a9f6c1ab008a07
src/systems/GameOverSystem.lua
src/systems/GameOverSystem.lua
local GameOverSystem = class('GameOverSystem', System) local GameOverState = require('states/GameOverState') function GameOverSystem:update(dt) if player:get("Health").points <= 0 then stack:pop() stack:push(GameOverState(false)) end end return GameOverSystem
local GameOverSystem = class('GameOverSystem', System) local GameOverState = require('states/GameOverState') function GameOverSystem:update(dt) if player:get("Health").points <= 0 then stack:pop() stack:push(GameOverState(false)) elseif enemy:get("Health").points <= 0 then stack:pop() stack:push(GameOverState(true)) end end return GameOverSystem
Fix enemy not triggering game over
Fix enemy not triggering game over
Lua
mit
alexd2580/igjam2016,alexd2580/igjam2016
d15a2b7c715dcf13f03024a9b18759e83ec5b350
util/profile-network.lua
util/profile-network.lua
#!/usr/bin/env th -- -- Outputs the number of parameters in a network for a single image -- in evaluation mode. require 'torch' require 'nn' require 'dpnn' torch.setdefaulttensortype('torch.FloatTensor') local cmd = torch.CmdLine() cmd:text() cmd:text('Network Size.') cmd:text() cmd:text('Options:') cmd:option('-model', './models/openface/nn4.v1.t7', 'Path to model.') cmd:option('-imgDim', 96, 'Image dimension. nn1=224, nn4=96') cmd:option('-numIter', 50) cmd:option('-cuda', false) cmd:text() opt = cmd:parse(arg or {}) -- print(opt) net = torch.load(opt.model):float() net:evaluate() -- print(net) local img = torch.randn(opt.numIter, 1, 3, opt.imgDim, opt.imgDim) if opt.cuda then require 'cutorch' require 'cunn' net = net:cuda() img = img:cuda() end times = torch.Tensor(opt.numIter) for i=1,opt.numIter do timer = torch.Timer() rep = net:forward(img[i]) times[i] = 1000.0*timer:time().real end print(string.format('Single image forward pass: %.2f ms +/- %.2f ms', torch.mean(times), torch.std(times)))
Add simple Torch network profiling script.
Add simple Torch network profiling script.
Lua
apache-2.0
sumsuddinshojib/openface,nhzandi/openface,xinfang/face-recognize,sumsuddinshojib/openface,sahilshah/openface,sahilshah/openface,cmusatyalab/openface,sahilshah/openface,francisleunggie/openface,Alexx-G/openface,sumsuddinshojib/openface,xinfang/face-recognize,nmabhi/Webface,nmabhi/Webface,francisleunggie/openface,sahilshah/openface,francisleunggie/openface,nmabhi/Webface,xinfang/face-recognize,cmusatyalab/openface,cmusatyalab/openface,Alexx-G/openface,nmabhi/Webface,sumsuddinshojib/openface,Alexx-G/openface,nhzandi/openface,nhzandi/openface,Alexx-G/openface
37c55220ce104ac68dea5879559f8d83d948098b
print_all_variables.lua
print_all_variables.lua
-- Use Activation by Button event "Manual (triggered by action button)" logf("-----") local function toDebugString(a, indent) if type(a) == 'table' then indent = indent or 0 local out = {'table\n'} for k, v in pairs(a) do table.insert(out, string.format('%s%s -> %s\n', string.rep(' ', indent), tostring(k), toDebugString(v, indent+1))) end return table.concat(out) else return tostring(a) end end for key, item in pairs(devices) do logf("%s -> %s", key, toDebugString(item, 0)) end
-- Use Activation by Button event "Manual (triggered by action button)" logf("-----") local function toDebugString(a, indent) if type(a) == 'table' then indent = indent or 0 local out = {'table\n'} for k, v in pairs(a) do table.insert(out, string.format('%s%s -> %s\n', string.rep(' ', indent), tostring(k), toDebugString(v, indent+1))) end return table.concat(out) else return tostring(a) end end for key, item in pairs(devices) do logf("%s -> %s", key, toDebugString(item, 0)) end
Print all variables and its values to the user log
Print all variables and its values to the user log
Lua
mit
Koukaam/ipcorder-utils
6f4f746b9e0d8e53de88b807d733e19ee0eb866f
soressa/compile_all.lua
soressa/compile_all.lua
node.compile("led.lua") node.compile("time.lua") node.compile("soressa.lua") dofile("soressa.lc")
node.compile("led.lua") node.compile("time.lua") node.compile("soressa.lua") file.remove("led.lua") file.remove("time.lua") file.remove("soressa.lua") dofile("soressa.lc")
Remove .lua file after compile.
Remove .lua file after compile.
Lua
mit
alexandrevicenzi/tcc,alexandrevicenzi/tcc,alexandrevicenzi/tcc,alexandrevicenzi/tcc
6f252ad28bd586bb12b72b900809b73418023e19
lua/iq-tex-steps.lua
lua/iq-tex-steps.lua
-- Visualize IQ data as a texture from a file. -- Don't connect a device. -- Steps are deliberate. VERTEX_SHADER = [[ #version 400 layout (location = 0) in vec3 vp; layout (location = 1) in vec3 vn; layout (location = 2) in vec2 vt; out vec3 color; out vec2 texCoord; uniform mat4 uViewMatrix, uProjectionMatrix; uniform float uTime; void main() { color = vec3(1.0, 1.0, 1.0); texCoord = vt; gl_Position = vec4(vp.x*2, vp.z*2, 0, 1.0); } ]] FRAGMENT_SHADER = [[ #version 400 in vec3 color; in vec2 texCoord; uniform sampler2D uTexture; layout (location = 0) out vec4 fragColor; void main() { float r = texture(uTexture, texCoord).r * 0.05; fragColor = vec4(r, r, r, 0.95); } ]] function setup() freq = 612.004 device = nrf_device_new(freq, "../rfdata/rf-612.004-big.raw", 0.01) nrf_device_set_paused(device, true) camera = ngl_camera_new_look_at(0, 0, 0) -- Camera is unnecessary but ngl_draw_model requires it shader = ngl_shader_new(GL_TRIANGLES, VERTEX_SHADER, FRAGMENT_SHADER) texture = ngl_texture_new(shader, "uTexture") model = ngl_model_new_grid_triangles(2, 2, 1, 1) end function draw() ngl_clear(0.2, 0.2, 0.2, 1.0) ngl_texture_update(texture, GL_RED, 256, 256, device.iq) ngl_draw_model(camera, model, shader) end function on_key(key, mods) keys_frequency_handler(key, mods) if (key == KEY_SPACE) then nrf_device_step(device) end end
Add example script to step through data.
Add example script to step through data.
Lua
mit
silky/frequensea,fdb/frequensea,fdb/frequensea,silky/frequensea,fdb/frequensea,fdb/frequensea,silky/frequensea,silky/frequensea,silky/frequensea,fdb/frequensea