code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
local core_utils = require "luacheck.core_utils" local stage = {} stage.warnings = { ["531"] = {message_format = "right side of assignment has more values than left side expects", fields = {}}, ["532"] = {message_format = "right side of assignment has less values than left side expects", fields = {}} } local f...
mpeterv/luacheck
src/luacheck/stages/detect_unbalanced_assignments.lua
Lua
mit
874
-- -- Copyright 2010-2017 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- newoption { trigger = "with-amalgamated", description = "Enable amalgamated build.", } newoption { trigger = "with-crtnone", description = "Enable build without CRT.", } solution ...
coconutxin/bx
scripts/genie.lua
Lua
bsd-2-clause
2,382
-- -- test_gmake2_objects.lua -- Validate the list of objects for a makefile. -- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project -- local suite = test.declare("gmake2_objects") local p = premake local gmake2 = p.modules.gmake2 -- -- Setup -- local wks, prj function suite.setup() ...
TurkeyMan/premake-core
modules/gmake2/tests/test_gmake2_objects.lua
Lua
bsd-3-clause
6,831
WireToolSetup.setCategory( "Physics/Constraints" ) WireToolSetup.open( "grabber", "Grabber", "gmod_wire_grabber", nil, "Grabbers" ) if CLIENT then language.Add( "tool.wire_grabber.name", "Grabber Tool (Wire)" ) language.Add( "tool.wire_grabber.desc", "Spawns a constant grabber prop for use with the wire system." ) ...
mitterdoo/wire
lua/wire/stools/grabber.lua
Lua
apache-2.0
1,443
-- Copyright (C) by Daniel Hiltgen (daniel.hiltgen@docker.com) local ffi = require "ffi" local _C = ffi.C local _M = { _VERSION = "0.0.2" } local CONST = { SHA256_DIGEST = "SHA256", SHA512_DIGEST = "SHA512", } _M.CONST = CONST -- Reference: https://wiki.openssl.org/index.php/EVP_Signing_and_Verifying ffi....
darkonie/dcos
packages/adminrouter/extra/src/resty/evp.lua
Lua
apache-2.0
11,550
-- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall local function BottomUpTree(item, depth) if depth > 0 then local i = item + item depth = depth - 1 local left, right = BottomUpTree(i-1, depth), BottomUpTree(i, depth) return { item, left,...
mjanicek/rembulan
rembulan-tests/src/test/resources/benchmarksgame/binarytrees.lua-2.lua
Lua
apache-2.0
1,346
AbilityLearnResult_t = { ABILITY_CAN_BE_UPGRADED = 0, ABILITY_CANNOT_BE_UPGRADED_NOT_UPGRADABLE = 1, ABILITY_CANNOT_BE_UPGRADED_AT_MAX = 2, ABILITY_CANNOT_BE_UPGRADED_REQUIRES_LEVEL = 3, ABILITY_NOT_LEARNABLE = 4, } Attributes = { DOTA_ATTRIBUTE_INVALID = -1, DOTA_ATTRIBUTE_STRENGTH = 0, DOTA_ATTRIBUTE_AGILITY...
Dingf/Icewrack
game/dota_addons/icewrack/scripts/vscripts/constants.lua
Lua
mit
33,247
pin_fan = 0 pin_cooling = 1 gpio.mode(pin_fan, gpio.OUTPUT) gpio.mode(pin_cooling, gpio.OUTPUT) gpio.write(pin_fan, 0) gpio.write(pin_cooling, 0) function set_cooling(is_on) print("cooling set to " .. fif(is_on, "on", "off")) local v = fif(is_on, gpio.HIGH, gpio.LOW) gpio.write(pin_fan, v) gpio.write(...
keccs/ferm_chamber
relay.lua
Lua
mit
415
--[[ Infinity by Harshit original by someone i can't remeber the name This script draws the left rings of the screen that is with the clock To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua): lua_load ~/scripts/haunted.lua lua_draw_hook_pre ring_stats Chang...
seagoj/cookbook-bootstrap
files/default/conky/.lua/scripts/haunted.lua
Lua
mit
9,324
-- SENDING DATA TO SOMEONE ON THE LAN NETWORK: side = "" -- side of modem serverid = 0 -- PC ID of LAN server id = os.getComputerID() -- ID of this computer mykey = "AXLAN_xxxxx" -- Your public LAN key receiverkey = "AXLAN_xxxxx" -- Public LAN key of receiv...
AxTo/LAN
example.lua
Lua
mit
1,205
for line in io.lines(arg[1]) do distances = {} for m in line:gmatch('%d+') do distances[#distances+1] = tonumber(m) end table.sort(distances) last = 0 result = {} for _, val in pairs(distances) do result[#result+1] = val - last last = val end print(table.concat(resu...
leaen/Codeeval-solutions
road-trip.lua
Lua
mit
334
local execute = vim.api.nvim_command local fn = vim.fn local pack_path = fn.stdpath("data") .. "/site/pack" local fmt = string.format function ensure (user, repo) -- Ensures a given github.com/USER/REPO is cloned in the pack/packer/start directory. local install_path = fmt("%s/packer/start/%s", pack_path, repo) ...
atroche/dotfiles
nvim/init.lua
Lua
mit
1,536
local github_issues_comments = require "includes.github_issues_comments" local data = github_issues_comments.html_github_issues_comments(4) print(data)
hmybmny/luammd.org
tests/test_github_issues_comments.lua
Lua
mit
155
--- Checks uses of undeclared global variables. -- All global variables must be 'declared' through a regular assignment -- (even assigning `nil` will do) in a main chunk before being used -- anywhere or assigned to inside a function. Existing metatables `__newindex` and `__index` -- metamethods are respected. -- -- Yo...
AdUki/Grapedit
scripts/libs/pl/strict.lua
Lua
mit
3,232
-- test_spec.lua expose("exposed test for mstranslator", function() require("mstranslator") -- tests can go here describe("some assertions", function() it("tests positive assertions", function() assert.is_true(true) -- Lua keyword chained with _ assert.True(true) ...
newfies-dialer/lua-mstranslator
spec/test_spec.lua
Lua
mit
1,298
local w = require('tables').wrap local parser = clink.arg.new_parser local function read_lines (filename) local lines = w({}) local f = io.open(filename) if not f then return lines end for line in f:lines() do table.insert(lines, line) end f:close() return lines end -- read all...
Toxaris/clink-completions
ssh.lua
Lua
mit
1,044
return { global = { fields = { _VERSION = { description = "A global variable (not a function) that holds a string containing the current interpreter version. The current contents of this variable is \"Lua 5.2\".", link = "https://www.lua.org/manual/5.2/manual.html#pdf-_VERSION", type...
Alloyed/lua-lsp
lua-lsp/data/5_2.lua
Lua
mit
70,122
local function init(busted) local block = require 'busted.block'(busted) local file = function(file) busted.wrap(file.run) if busted.safe_publish('file', { 'file', 'start' }, file) then block.execute('file', file) end busted.safe_publish('file', { 'file', 'end' }, file) end local describ...
o-lim/busted
busted/init.lua
Lua
mit
4,122
--Mayor Voting System Server Dist VOTING = {} VOTING.CurrentCandidates = {} VOTING.InProgress = false VOTING.AboutToBegin = false VOTING.DarkRPSetup = false include('sh_votingconfig.lua') include('sv_votingdata.lua') util.AddNetworkString("Voting_NewVote") util.AddNetworkString("Voting_EndVote") util.AddNetworkString("...
OctoEnigma/shiny-octo-system
addons/Mayor Voting System/lua/sv_mayorvoting.lua
Lua
mit
8,804
-- ---------------------------------------------------------------------------- -- AddOn namespace. -- ---------------------------------------------------------------------------- local FOLDER_NAME, private = ... local LibStub = _G.LibStub local Dialog = LibStub("LibDialog-1.0") -- ---------------------------...
liruqi/bigfoot
Interface/AddOns/Archy/TomTomHandler.lua
Lua
mit
2,775
local MyPluginMgr = class("MyPluginMgr") function MyPluginMgr:ctor() -- check sdkbox module if sdkbox == nil then return end self:adcolonyinit() self:charboostinit() self:flurryinit() self:googleanalyticsinit() self:iapinit() self:kochavainit() self:tuneinit() self:facebookinit() self:agecheqinit() self:v...
yinjimmy/sdkbox-samples
src/app/views/MyPluginMgr.lua
Lua
mit
20,455
password = "" -- AP Password ssid = "" -- AP SSID PBdevId = "" -- PushingBox Device Id -- power up the wifi module and log into the AP wifi.setmode(wifi.STATIONAP) wifi.sta.config(ssid, password) wifi.sta.connect() -- Poll the PushingBox API -- devid: Device ID given by PushingBox -- cb: callback function when recei...
DasBasti/esp8266
Sensoren/Fenster/FensterOffenWarner/fenster.lua
Lua
mit
1,071
--[[ Behaviour Driven Development for Lua 5.1, 5.2 & 5.3. Copyright (C) 2015-2018 Gary V. Vaughan ]] --[[-- Functions for running a Lua program in the Specl Lua interpreter. @module specl.inprocess ]] local find = string.find local gsub = string.gsub local sub = string.sub local compat = require 'specl.compat' l...
gvvaughan/specl
lib/specl/inprocess.lua
Lua
mit
10,325
function KingsBar_purge(keys) local ability = keys.ability local caster = keys.caster caster:Purge(false, true, false, true, false ) caster:RemoveModifierByName("modifier_heavens_halberd_debuff") end
DiNaSoR/Angel_Arena
game/angel_arena/scripts/vscripts/items/kings_bar.lua
Lua
mit
207
example_blueprints = {raw = {}} example_blueprints.standard = { belts = { { direction = 2, entity_number = 4, name = "transport-belt", position = { x = 0.5, y = 4.5 } }, { dir...
Ben-Ramchandani/OutpostPlanner
example_blueprints.lua
Lua
mit
7,689
local colourWhite = tocolor(255,255,255) local loginGui = nil addEvent("showLogin",true) addEventHandler("onClientResourceStart",resourceRoot, function() -- for relative positioning screenX,screenY = guiGetScreenSize() if screenY > 600 then imageHeight = 269 imageWidth = 320 else imageHeight = 13...
PTPM/MTASA-legacy
ptpm_login_old/client.lua
Lua
mit
5,864
--[[ -------------------------------------------- Skip-gram with negative sampling (Skip-Gram) -------------------------------------------- References: 1. http://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf 2. http://cs224d.stanford.edu/lecture_notes/Lectur...
ganeshjawahar/dl4nlp-made-easy
skipgram_neg_sampling.lua
Lua
mit
2,841
local stringGenerator = {} --[[ Generates an alphanumeric string of a specified length. Default length range is [1, 128]. ]] function stringGenerator.generateAlphaNum(minSize, maxSize) minSize = minSize or 1 maxSize = maxSize or 128 assert(minSize <= maxSize, "The minimum size MUST be less than or equal to the m...
DarkRedemption/GUnit
lua/gunit/main/generators/sv_stringgen.lua
Lua
mit
1,042
require "stategraphs/SGethorobot" local clockwork_common = require"prefabs/clockwork_common" local assets = { } local prefabs = { "gears", "etho_multitool" } local brain = require "brains/etho_robotbrain" local function ShouldSleep(inst) return clockwork_common.ShouldSleep(inst) end local function Shoul...
Quozlet/DST-Etho
scripts/prefabs/etho_robot.lua
Lua
mit
3,645
---------------------------------------------------------------- -- -- Database.lua -- This is a database module built on top of Lua-sqlite3 and -- Moai. When opening databases, they will automatically be -- copied to the right place if necessary. -- -- Written in 2012 by Brendan A R Sechter <bsechter@sennue.com>...
Sennue/rainbow-bubbles
Database.lua
Lua
cc0-1.0
6,340
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmRedutor() local obj = GUI.fromHandle(_obj_newObject("f...
rrpgfirecast/firecast
Plugins/Sheets/Ficha Herois d20/output/rdkObjs/FichaHerois/05.Poderes.Redutor.lfm.lua
Lua
apache-2.0
5,584
---------------------------------- -- "Zhongguo" awesome theme -- -- By Tony @ git-pull -- -- based on Zenburn by anrxc -- -- License: GNU GPL v2 -- ---------------------------------- -- {{{ Main theme = {} theme.themedir = awful.util.getdir("config") theme.themedir = theme.themed...
lagerstrom/urpuppet
modules/awesome/files/awesome_config/themes/zhongguo/zhongguo.lua
Lua
apache-2.0
6,042
--!A cross-platform build utility based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apach...
tboox/xmake
xmake/modules/devel/git/tags.lua
Lua
apache-2.0
1,289
--- Turbo.lua Log module -- A simple log writer implementation with different levels and standard -- formatting. Messages written is appended to level and timestamp. You -- can turn off unwanted categories by modifiying the table at log.categories. -- -- For messages shorter than 4096 bytes a static buffer is used to -...
ddysher/turbo
turbo/log.lua
Lua
apache-2.0
12,125
---@module opt_args -- @author Christopher VanZomeren -- @copyright (c) 2014 Christopher VanZomeren -- -- This will be replaced with a more flexible and general solution at some point assert(..., 'Do not use as main file; use require from different file') local _id = select(2, ...) or ... local error = error local ...
vanzomerenc/misc-lua
opt_args.lua
Lua
bsd-2-clause
1,366
local ARCHS = { "tlcs90" } for _, toolchain in ipairs(ALL_TOOLCHAINS) do for _, arch in ipairs(ARCHS) do cowgol { toolchain = toolchain, ins = { "src/cowdis/arch"..arch..".cow", }, outs = { "bin/cowdis-"..arch } } end end
davidgiven/cowgol
src/cowdis/build.lua
Lua
bsd-2-clause
246
local objGatee = createObject(3089, 274.12623901367, 189.35, 1007.471875, 0, 0, 0) exports.pool:allocateElement(objGate3) setElementInterior(objGatee, 3) setElementDimension(objGatee, 1) local objGatee2 = createObject(3089, 277.02623901367, 189.35, 1007.471875, 0, 0, 180) exports.pool:allocateElement(objGatee2) ...
valhallaGaming/uno
src_trunk/resources/gate-system/pd_door5.lua
Lua
bsd-3-clause
1,510
---------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0238-Keyboard-Enhancements.md ---------------------------------------------------------------------------------------------------- -...
smartdevicelink/sdl_atf_test_scripts
test_scripts/API/KeyboardEnhancements/Resumption/002_SDL_resumes_cached_KeyboardProperties.lua
Lua
bsd-3-clause
3,046
----------------------------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0211-ServiceStatusUpdateToHMI.md --------------------------------------------------------------------------------...
smartdevicelink/sdl_atf_test_scripts
test_scripts/API/ServiceStatusUpdateToHMI/002_5_Audio_service_unprotected_force_protected.lua
Lua
bsd-3-clause
3,564
addEvent ( "NGJobs:Modules->Detective:onClientFinishCase", true ) addEventHandler ( "NGJobs:Modules->Detective:onClientFinishCase", root, function ( ) local payment = math.random ( 600, 800 ) givePlayerMoney ( source, payment ) exports.NGMessages:sendClientMessage ( "Good work detective! We now have enough evidence ...
braydondavis/Nerd-Gaming-Public
resources/NGJobs/law/detective/detective_s.lua
Lua
mit
1,276
local getVelocity = function(self) return self.vVelocity end local setVelocity = function(self, velocity) self.vVelocity = velocity end local getMass = function(self) return self.node:getPhysicsBody():getMass() end local getPos = function(self) return self.node:getWorldTransform():getOrigin() end ...
njligames/NJLIGameEngine
projects/YappyBirds/_archive/scripts_9.16.2016/steering/MovingEntity.lua
Lua
mit
4,746
-- fugue.lua fugue = {} fugue.minscale = { 0, 2, 3, 5, 7, 8, 11, 12 } fugue.majscale = { 0, 2, 4, 5, 7, 9, 11, 12 } fugue.currentKey = 60 -- C fugue.lastNoteTime = 0 --fugue.timeBetweenNotes = 0.5 fugue.timeBetweenNotes = 0.15 fugue.currnote = 1 fugue.improvisation = {} fugue.improvisation.lines = { {}, {}, {} } -...
GitoriousLispBackup/praxis
prods/fugue/fugue.lua
Lua
mit
16,767
local helpers = require "spec.helpers" local TCP_PORT = 16945 local pack = function(...) return { n = select("#", ...), ... } end local unpack = function(t) return unpack(t, 1, t.n) end -- @param port the port to listen on -- @param duration the duration for which to listen and accept connections (seconds) local fun...
Mashape/kong
spec/02-integration/05-proxy/05-dns_spec.lua
Lua
apache-2.0
3,934
local dpdk = require "dpdk" local memory = require "memory" local ts = require "timestamping" local device = require "device" local filter = require "filter" local stats = require "stats" local timer = require "timer" local histogram = require "histogram" local PKT_SIZE = 60 function master(...) local txPort, r...
werpat/MoonGen
examples/l2-poisson-load-latency.lua
Lua
mit
1,909
local check = require "luacheck.check" local filter = require "luacheck.filter" local options = require "luacheck.options" local format = require "luacheck.format" local utils = require "luacheck.utils" local luacheck = { _VERSION = "0.23.0" } local function raw_validate_options(fname, opts, stds, context) loca...
xpol/luacheck
src/luacheck/init.lua
Lua
mit
4,301
-- -- look_newviolet for Notion's default drawing engine. -- Based on look_cleanviolet -- if not gr.select_engine("de") then return end de.reset() de.defstyle("*", { highlight_colour = "#e7e7ff", shadow_colour = "#e7e7ff", background_colour = "#b8b8c8", foreground_colour = "#000000", s...
lpenz/ansible-playbooks
roles/user-x/files/notion/look_newviolet.lua
Lua
apache-2.0
1,711
--[[ Copyright (C) 2013-2018 Draios Inc dba Sysdig. Copyright (C) 2015 Brendan Gregg. This file is part of sysdig. 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/license...
angeloc/sysdig
userspace/sysdig/chisels/subsecoffset.lua
Lua
apache-2.0
5,009
-- -- tests/base/test_detoken.lua -- Test suite for the token expansion API. -- Copyright (c) 2011-2014 Jason Perkins and the Premake project -- local suite = test.declare("detoken") local detoken = premake.detoken -- -- Setup -- local x, action local environ = {} function suite.setup() action = premake.ac...
jstewart-amd/premake-core
tests/base/test_detoken.lua
Lua
bsd-3-clause
3,654
-------------------------------- -- @module SpriteDisplayData -- @extend DisplayData -- @parent_module ccs -------------------------------- -- -- @function [parent=#SpriteDisplayData] copy -- @param self -- @param #ccs.DisplayData displayData -------------------------------- -- -- @function [parent=#Sprit...
kinzhang/cocos2d-js-v3.2
frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua
Lua
mit
594
------------------------------------------------------------------------------ -- DynASM x86/x64 module. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ local x64 = x64 -- Module i...
eugeneko/Urho3D
Source/ThirdParty/LuaJIT/dynasm/dasm_x86.lua
Lua
mit
71,256
-- https://github.com/norcalli/snippets.nvim -- 'suggested_mappings' are <c-k> for next and <c-j> for previous require'snippets'.use_suggested_mappings() local snippets = require'snippets' local U = require'snippets.utils' snippets.snippets = { vimwiki = { ["tomlpost"] = [[ --- title: "Title" date: 2021-04-15 d...
dgalizzi/dotfiles
.config/nvim/lua/mysnippets.lua
Lua
mit
567
local TR = _G.TimeRecordMod local LN = _G.LuaNetworking Hooks:PostHook(GameStateMachine, "change_state", "TimeRecord_GameStateMachine_Post_change_state", function(ply, state) if state._name == "victoryscreen" then local records_changed = false local needed_time, by_username for level_id, _1 in pairs(TR.new_rec...
jan-di/PD2-Time-Record
lua/hook_gamestatemachine.lua
Lua
mit
1,768
help([[Boost provides free peer-reviewed portable C++ source libraries. - Homepage: http://www.boost.org/]]) whatis([[Description: Boost provides free peer-reviewed portable C++ source libraries. - Homepage: http://www.boost.org/]]) local root = "/opt/apps/software/Boost/1.63.0-foss-2016b-Python-3.5.2" conflict("Boo...
ntuhpc/modulefiles
library/Boost/1.63.0-foss-2016b-Python-3.5.2.lua
Lua
mit
1,093
----------------------------------------------------- --name : home/bin/ifr.lua --description: a command line based ifr calculation trainer --author : mpmxyz --github page: https://github.com/mpmxyz/ocprograms --forum page : http://oc.cil.li/index.php?/topic/ --------------------------------------------------...
OpenPrograms/mpmxyz-Programs
home/bin/ifr.lua
Lua
mit
12,664
return { name = "luvit/luvit", version = "2.7.1", luvi = { version = "2.5.0", flavor = "regular", }, license = "Apache 2", homepage = "https://github.com/luvit/luvit", description = "node.js style APIs for luvi as either a luvi app or library.", tags = { "luvit", "meta" }, author = { name = "T...
laarc/laarc-old
luvit/package.lua
Lua
mit
1,347
Enemy = { score_sound = love.audio.newSource("sounds/player_die.wav") } setmetatable(Enemy, {__index = Paddle}) function Enemy.new(world, align) if align == nil then align = 'right' end local self = Paddle.new(world, align) setmetatable(self, {__index = Enemy}) self.speed = self.speed * ...
TomBebbington/minld-pong
enemy.lua
Lua
mit
611
local aff = Afflictions.deafness function aff:canCure() if Defences.truehearing:have() then return false end for _, cure in ipairs(self.cures) do if cure:canSend() then return true end end return false end function aff:diag() if Defences.truehearing:have()...
codeacula/lusternia-neko
Afflictions/Plugins/deafness.lua
Lua
mit
442
vim.cmd('set runtimepath^=~/.vim runtimepath+=~/.vim/after') vim.cmd('let &packpath = &runtimepath') vim.cmd('source ~/.vimrc') ---------------- Tree Sitter ---------------- require'nvim-treesitter.configs'.setup { ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list ...
coreyja/dotfiles
.config/nvim/init.lua
Lua
mit
7,551
local Parameter = require 'autoswagger.parameter' describe('Parameter', function() it('can be created', function() local o = {} local p = Parameter:new(o, 'query', 'user_id') assert.equal(p.operation, o) assert.equal(p.paramType, 'query') assert.equal(p.name, 'user_id') end) describe(':add_...
APItools/autoswagger.lua
spec/parameter_spec.lua
Lua
mit
2,253
---------------------------------------- --------------- Perkshop --------------- ---------------------------------------- ------- Created by my_hat_stinks ------- ---------------------------------------- -- cl_menu.lua CLIENT -- -- -- -- Perkshop Menu. ...
MyHatStinks/perkshop
lua/perkshop/cl_menu.lua
Lua
mit
5,161
local Utils = {} function Utils.tostring( arg, saved, ident ) local t = type( arg ) saved, ident = saved or {n = 0, recursive = {}}, ident or 0 if t == 'nil' or t == 'boolean' or t == 'number' or t == 'function' or t == 'userdata' or t == 'thread' then return tostring( arg ) elseif t == 'string' then return ('...
iskolbin/loot
Utils.lua
Lua
mit
2,130
local delimiters = {["("] = true, [")"] = true, [";"] = true, ["\n"] = true, ["}"] = true, ["]"] = true, ["{"] = true, ["["] = true} local whitespace = {[" "] = true, ["\n"] = true, ["\t"] = true} local function stream(str, more) return({more = more, pos = 0, len = _35(str), string = str}) end local function peek_cha...
laarc/laarc-old
lumen/bin/reader.lua
Lua
mit
7,091
data:extend({ -- Item { type = "item", name = "5d-inserter-speed2-range3", icon = "__5dim_automatization__/graphics/icon/icon_5d_inserter_2c23f.png", flags = {"goes-to-quickbar"}, icon_size = 32, subgroup = "inserters-speed2", order = "e", place_result = "5d-inserter-speed2-range3", ...
McGuten/5DimsFactorioMods
Factorio 0.16/5dim_automatization_0.16.7/prototypes/inserter-speed2-range3.lua
Lua
mit
3,884
local opt = vim.opt_local opt.spell = true opt.textwidth = 72 opt.colorcolumn:append { vim.opt.textwidth:get() } opt.colorcolumn:append { 51 } vim.cmd([[ iabbrev <buffer> co-author@ Co-authored-by: author <author@example.com><ESC>F:wve ]])
brunohenrique/dotfiles
neovim/.config/nvim/after/ftplugin/gitcommit.lua
Lua
mit
248
helpScene = director:createScene() -- Background local background = director:createSprite(director.displayCenterX, director.displayCenterY, "textures/Menu_Design_Potrait.png") background.xAnchor = 0.5 background.yAnchor = 0.5 local bg_width, bg_height = background:getAtlas():getTextureSize() background.xScale = direct...
simonrose121/slidinghome-prototype
resources/help.lua
Lua
mit
1,132
package.path = package.path .. ";../?.lua;?.lua;lib/?.lua" local Object = require( "lib.object" ) local power = math.pow local nroot = function ( num, root ) return num^(1/root) end local teaLifeCalc = Object:extend{ totalAsset = 0, -- Initial Asset totalYear = 30, -- Total Years defaultSalary = 60, -- Default S...
johnteee/teaLifeCalc
lib/teaLifeCalc.lua
Lua
mit
5,921
{(header.lua)} <h2>Names</h2> <ul> {% for name in Each(people) do %} <li>{{ name }}</li> {% end %} </ul> {(footer.lua)}
KelsonBall/MonoServer
MonoServer.Sample/Views/names.lua
Lua
mit
122
--[[ ============================================================================================================ Author: Rook Date: February 20, 2015 Called when Levitation is cast. Applies the levitating modifier with a duration dependent on Quas, Wex, and Exort. ==================================================...
DiNaSoR/Angel_Arena
game/angel_arena/scripts/vscripts/heroes/hero_invoker/invoker_retro_levitation.lua
Lua
mit
6,833
local KLDCriterion, parent = torch.class('nn.KLDCriterion', 'nn.Criterion') function KLDCriterion:__init() parent.__init(self) self.sizeAverage = true end function KLDCriterion:updateOutput(input, target) -- 0.5 * sum(1 + log(sigma^2) - mu^2 - sigma^2) self.term1 = self.term1 or input[1].new() self....
iassael/torch-ddcnn
KLDCriterion.lua
Lua
mit
1,416
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law...
waruqi/xmake
xmake/core/sandbox/modules/import/core/ui/textdialog.lua
Lua
apache-2.0
781
application = { content = { width = 320, height = 512, scale = "letterBox", xAlign = "center", yAlign = "center", } }
jbp4444/GameOfLife
corona/config.lua
Lua
apache-2.0
171
--- Retry policy local tonumber = tonumber local _M = require('apicast.policy').new('Retry Policy') local new = _M.new function _M.new(config) local self = new(config) self.retries = tonumber(config.retries) return self end function _M:export() return { upstream_retries = self.retries } end return _M
3scale/apicast
gateway/src/apicast/policy/retry/retry.lua
Lua
apache-2.0
317
local cjson = require "cjson" local openssl_hmac = require "openssl.hmac" local helpers = require "spec.helpers" local utils = require "kong.tools.utils" local resty_sha256 = require "resty.sha256" local fmt = string.format local hmac_sha1_binary = function(secret, data) return openssl_hmac.new(secret, "sha1"):fin...
Mashape/kong
spec/03-plugins/19-hmac-auth/03-access_spec.lua
Lua
apache-2.0
68,160
local version = setmetatable({ major = 1, minor = 4, patch = 0, -- suffix = "", }, { __tostring = function(t) return string.format("%d.%d.%d%s", t.major, t.minor, t.patch, t.suffix or "") end }) return { _NAME = "kong", _VERSION = tostring(version), _VERSION_TABLE = versi...
Mashape/kong
kong/meta.lua
Lua
apache-2.0
568
function gameStates.core.load() love.graphics.setScreen('top') core = {} --create a table to hold variables for the core core.state = 0 core.image = love.graphics.newImage('img/core/core.png') --load the core img core.x = (love.graphics.getWidth() / 2) - (core.image:getWidth() / 2) --center the core core.y ...
Xavyrr/LOVE
game/core.lua
Lua
apache-2.0
1,660
-------------------------------- -- @module AmbientLight -- @extend BaseLight -- @parent_module cc -------------------------------- -- Creates a ambient light.<br> -- param color The light's color.<br> -- return The new ambient light. -- @function [parent=#AmbientLight] create -- @param self -- @param #c...
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/AmbientLight.lua
Lua
apache-2.0
596
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law...
waruqi/xmake
xmake/actions/global/main.lua
Lua
apache-2.0
1,955
--[[---------------------------------------------------------------------------- Copyright (c) 2014, 2015, Jonathan Wong All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source cod...
thejonwong/huginenfuse
huginenfuse.lrplugin/MainDialog.lua
Lua
bsd-3-clause
8,153
local git = {} git.setup = function() -- Setup Neogit require("neogit").setup({}) vim.api.nvim_set_keymap("n", "<leader>gg", [[<cmd>lua require("neogit").open()<CR>]], { noremap = true, silent = true }) -- Lazygit require("lazygit") vim.api.nvim_set_keymap("n", "<leader>lg", [[<cmd>lua require("lazygit").lazygi...
ankitrgadiya/dotfiles
private_dot_config/nvim/lua/argv/git.lua
Lua
bsd-3-clause
382
-- -- Copyright (c) 2015 Jonathan Howard. -- function bullet_library(_kind) newoption { trigger = "without-cl", description = "Disable OpenCL for Bullet." } project "bullet" language "C++" kind(_kind) includedirs { BULLET_DIR .. "src/" } files { BULLET_DIR .. "s...
NathanaelThompson/altertum
genie/bullet.lua
Lua
mit
534
local _, Engine = ... local Module = Engine:NewModule("Blizzard: PopUps") -- Lua API local _G = _G Module.StylePopUp = function(self, popup) if not self.styled then self.styled = {} end local config = self.config.popup -- add a bigger backdrop frame with room for our larger buttons if not popup.backdrop then ...
cogwerkz/DiabolicUI
modules/blizzard/popups.lua
Lua
mit
4,111
require 'torch' require 'nn' require 'features' io.stdout:setvbuf("no") embeddingsFolder=arg[1]; --name=arg[2] output=arg[3]; modelFolder=arg[2] --embeddingsFolder .. '/' .. name mlp = torch.load(modelFolder .. '/bestModel') features = nn.Features(embeddingsFolder .. '/embeddings.words', embeddingsFolder .. '/lemma...
mikelewis0/easyccg
training/dump_model.lua
Lua
mit
3,261
require "theme" finger = { nam = 'finger'; object_type = true; system_type = true; fingers_list = { }; add = function(s, press, fid, x, y, px, py) if press then local v = s:lookup(fid) if v then v.x, v.y, v.px, v.py = x, y, px, py else stead.table.insert(s.fingers_list, { id = fid, x = x,...
mehdisadeghi/mehdix.ir
src/assets/instead/fs/stead/stead2/finger.lua
Lua
cc0-1.0
2,088
require "path" require "sqlite3" local db = sqlite3.open_memory() db:exec[[ CREATE TABLE test (id INTEGER PRIMARY KEY, content); INSERT INTO test VALUES (NULL, 'Hello World'); INSERT INTO test VALUES (NULL, 'Hello Lua'); INSERT INTO test VALUES (NULL, 'Hello Sqlite3') ]] for row in db:rows("SELECT * FROM ...
moteus/lua-sqlite3
examples/simple.lua
Lua
mit
363
return { PRIORITY = 1 }
Mashape/kong
spec/fixtures/custom_plugins/kong/plugins/foreign-entity/handler.lua
Lua
apache-2.0
26
local LookupTable, parent = torch.class('nn.LookupTable', 'nn.Module') LookupTable.__version = 3 function LookupTable:__init(nIndex, ...) parent.__init(self) local arg = {...} if select('#', ...) == 1 and type(arg[1]) ~= "number" then local size = arg[1] self.size = torch.LongStorage(#size + 1) ...
quanhua92/torch-android
src/3rdparty/nn/LookupTable.lua
Lua
bsd-3-clause
4,662
io.write("Input stacktrace from kernel:\n") local line = io.read("*line") for addr in line:gmatch("(%w+)") do -- io.write(("-"):rep(80).."\n") -- io.write("address: " .. addr .. "\n") -- io.write(("-"):rep(80).."\n") -- os.execute("objdump -d kernel | grep "..addr:lower().." -A 3 -B 10") os.execute([[objdump -d kerne...
MasterQ32/trainOS
traceback.lua
Lua
mit
423
--- Cream-Browser API -- @author David Delassus &lt;david.jose.delassus@gmail.com&gt; module ("cream") --- Set/get current browser's state -- @param ... If given, set the browser's state -- @return If no parameters are given, return current browser's state -- @class function -- @name state.current --- All available ...
linkdd/cream-browser
src/lua/doc/init.lua
Lua
mit
766
-- NetHack 3.7 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ -- Copyright (c) 1989 by Jean-Christophe Collet -- Copyright (c) 1991 by M. Stephenson -- NetHack may be freely redistributed. See license for details. -- des.level_init({ style = "solidfill", fg = " " }...
Nax/citizenhack
dat/Arc-loca.lua
Lua
mit
5,125
script.on_init(function() initVariables() init_gui() end) script.on_load(function() initVariables() end) -- Calculate module level, minimum 1 maximum 100 function modulelevel() local exponent = settings.startup["alien-module-level-exponent"].value if (global.killcount < 10000) then return math.min(math.max(mat...
renoth/factorio-alien-module
alien-module/control.lua
Lua
mit
15,739
print("3 deep") print("two") print("three") return {1,2,3}
o-jasper/alt_require.lua
alt_require/test/toys/subsubreqme.lua
Lua
mit
60
-- Console.lua -- For your console needs local assert = assert local ceil = math.ceil local format = string.format local max = math.max local tonumber = tonumber local type = type ----------- -- Imports ----------- local draw = love.graphics.draw local drawRect = love.graphics.rectangle local IsInteger = varops.IsInt...
ggcrunchy/Old-Love2D-Demo
Scripts/DebugHelpers/Console.lua
Lua
mit
9,421
--- === cp.strings.source.table === --- --- Loads strings from provided tables, allowing for a given language variation. Eg: --- --- ```lua --- local src = require("cp.strings.source.table").new():add("en", {foo = "bar"}):add("en", {foo = "baz"}) --- local valueEn = src:find("en", "foo") -- "bar" --- local valueEs = sr...
cailyoung/CommandPost
src/extensions/cp/strings/source/table.lua
Lua
mit
3,161
require('torch') -- torch require('xlua') -- xlua provides useful tools, like progress bars require('optim') -- an optimization package, for online and batch methods ---------------------------------------------------------------------- -- parse command line arguments if not opt then print '==> processing opt...
adiyoss/DeepVOT
back_end_new_structure/train.lua
Lua
mit
5,113
--[[ %% properties %% globals lightsQueue --]] -- CONST local debugMode = true; local powerID = 6; -- RGBW DEVICE SUPPORT function getTheColor(devID, clrIndex) local colors = fibaro:getValue(devID, "color"); --local RGBWTable = {}; local i = 1; for value in string.gmatch(colors, "(%d+)") do if ...
Mechaniston/FibaroHC_mechHomeBcfg
lightsAction (188, maxInst = 5).lua
Lua
mit
7,488
----------------------------------------------------------------------------------------------- -- Client Lua Script for Builder -- Copyright (c) NCsoft. All rights reserved ----------------------------------------------------------------------------------------------- require "Window" require "Apollo" require "GameLi...
scscgit/scsc_wildstar_addons
Builder/Builder.lua
Lua
mit
41,677
local TK = require("PackageToolkit") local M = { } local me = ... local name = "test_os" local members = { "test_windows", "test_path" } local T = TK.module.submodules(me, members) M[name] = function() return TK.test.self(T) end return M
FunctionalX/FunctionalX.lua
src/test/test_os/init.lua
Lua
mit
244
be = require("buildengine") test_val = false be.subscribe("test", function () test_val = true end)
Ameliorate/buildengine5
src/script/test/event.lua
Lua
mit
103
local PerlinNoise = {} local Map = require("src.Map") ----------------------------------------------------------- PerlinNoise.perlinNoise = function(params) local params = params if not params then params = {} end local width = params.width or Map.map.width local height = params.height or...
jsykes/million-tile-engine
src/PerlinNoise.lua
Lua
mit
21,129
-- cool-blue, awesome3 theme, inspired by Adobe Kuler --{{{ Main local awful = require("awful") awful.util = require("awful.util") theme = {} home = os.getenv("HOME") config = awful.util.getdir("config") shared = "/usr/share/awesome" if not awful.util.file_readable(shared .. "/icons/awesome16....
mikar/awesome34-themes
cool-blue/theme.lua
Lua
mit
2,868