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 |
|---|---|---|---|---|---|
module 'mock_edit'
-- CLASS: ProtoManager ()
-- function ProtoManager:__init()
-- connectGlobalSignalFunc( 'scene.post_deserialize', self, 'postSceneDeserialize' )
-- connectGlobalSignalFunc( 'scene.post_serialize', self, 'postSceneSerialize' )
-- end
-- function ProtoManager:extractProtoData( info, scnData )
... | tommo/gii | lib/lua/mock_edit/AssetHelper/ProtoUpdateHelper.lua | Lua | mit | 742 |
-- references:
-- https://github.com/neovim/nvim-lspconfig
-- https://raygervais.dev/articles/2021/3/neovim-lsp
local nvim_lsp=require('lspconfig')
local on_attach=function(client, bufnr)
require('completion').on_attach()
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local f... | davezuko/dev-environment | config/nvim-lua/lua/lsp.lua | Lua | mit | 4,149 |
local ActiveCD = {}
local ActiveC = 0
function DCT_ProcCooldown(self, event, arg1, arg2)
if DCT_Player["DCT_SHOWCOOLDOWN"].frame == 0 then return;end
local cdp = DCT_Player["DCT_SPECCOOLDOWN"]
local n, duration, enabled
local spellName
local ctime = GetTime()
for spellName in pairs(cdp) do
local n,... | liruqi/bigfoot | Interface/AddOns/dct/DCT_cd.lua | Lua | mit | 1,029 |
--[[
##############################################################################
S V U I By: Munglunch
##############################################################################
##########################################################
LOCALIZED LUA FUNCTIONS
################################################... | FailcoderAddons/SVUI | SVUI_!Core/system/_reports/bags.lua | Lua | mit | 2,883 |
--
---- Copyright (c) 2014, Facebook, Inc.
---- All rights reserved.
----
---- This source code is licensed under the Apache 2 license found in the
---- LICENSE file in the root directory of this source tree.
----
if not opt then
cmd = torch.CmdLine()
cmd:text()
cmd:text('LSTM Model')
cmd:text()
cmd:text... | dhalpern/A4 | main_exp1.lua | Lua | apache-2.0 | 14,484 |
--------------------------------
-- @module MenuItemLabel
-- @extend MenuItem
-- @parent_module cc
--------------------------------
-- Gets the color that will be used to disable the item.
-- @function [parent=#MenuItemLabel] getDisabledColor
-- @param self
-- @return color3b_table#color3b_table ret (ret... | weiDDD/WSSParticleSystem | cocos2d/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua | Lua | apache-2.0 | 2,151 |
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
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
$Id$
]]--
arg[... | alxhh/piratenluci | applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua | Lua | apache-2.0 | 2,144 |
WUMA = WUMA or {}
local WUMADebug = WUMADebug
local WUMALog = WUMALog
WUMA.DATA = {}
WUMA.DataUpdateCooldown = WUMA.CreateConVar("wuma_data_save_delay", "10", FCVAR_ARCHIVE, "Delay before changes are saved.")
function WUMA.GetSavedTable(enum, user)
if (enum == Restriction) then
return WUMA.GetSavedRes... | Weol/WUMA | lua/wuma/datahandler.lua | Lua | apache-2.0 | 11,523 |
local class = require("snabbp4.syntax.utils.middleclass")
local utils = require("snabbp4.syntax.utils.debug")
-- base symbol
local base = require("snabbp4.syntax.symbols.base")
local BaseSymbol = base.BaseSymbol
-- precedence values
local precedence = require("snabbp4.syntax.precedence")
local Colon =... | esbullington/snabbp4 | syntax/symbols/punctuators.lua | Lua | apache-2.0 | 2,729 |
print("Experimental Lua script for Battle Master (Genesis)")
print("Written by Dammit, last updated 1/13/2011")
print("http://www.gamefaqs.com/genesis/586050-battle-master/faqs/29225")
print()
print("Lua hotkey 1: toggle memviewer")
print("Lua hotkey 2: cycle memviewer profiles")
print("Lua hotkey 3: cycle parley... | ncoop/vgr | lua/Battlemaster.lua | Lua | apache-2.0 | 22,076 |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
-- * (c) 2009, Lucas de Vries <lucas@glacicle.com>
---------------------------------------------------
-- {{{ Grab environment
local type = type
local io = { popen = i... | eaufavor/AwesomeWM-powerarrow-dark | extern/vicious/contrib/mpc.lua | Lua | apache-2.0 | 1,273 |
-- Modified from https://github.com/facebook/fbnn/blob/master/fbnn/Optim.lua.
local pl = require('pl.import_into')()
local OpenFaceOptim, parent = torch.class('OpenFaceOptim')
-- deepcopy routine that assumes the presence of a 'clone' method in user
-- data should be used to deeply copy. This matches the behavior o... | sumsuddinshojib/openface | training/OpenFaceOptim.lua | Lua | apache-2.0 | 5,091 |
--[[
********************************************************************************
Project owner: RageQuit community
Project name: GTW-RPG
Developers: Mr_Moose
Source code: https://github.com/GTWCode/GTW-RPG/
Bugtracker: http://forum.404rq.com/bug-reports/
Suggestions: http://forum.404rq.com/mta-se... | SpRoXx/GTW-RPG | [resources]/GTWupdates/updates_s.lua | Lua | bsd-2-clause | 1,415 |
#!/usr/bin/env tarantool
box.cfg{logger = "tarantool.log"}
package.cpath = '../app-tap/?.so;../app-tap/?.dylib;'
local function test_pushcdata(test, module)
test:plan(6)
local ffi = require('ffi')
ffi.cdef('struct module_api_test { int a; };')
local gc_counter = 0;
local ct = ffi.typeof('struct m... | mejedi/tarantool | test/app-tap/module_api.test.lua | Lua | bsd-2-clause | 1,415 |
local keynormal = {}
keynormal[1] = {"1","2","3","4","5","6","7","8","9","0","backspace"}
keynormal[2] = {"q","w","e","r","t","z","u","i","o","p","enter","capsLock"}
keynormal[3] = {"a","s","d","f","g","h","j","k","l","up","down","space"}
keynormal[4] = {"y","x","c","v","b","n","m","left","right","tab","rightCtrl"}
lo... | Wilma456/Computercraft | Command/chatkeyboard.lua | Lua | bsd-2-clause | 3,410 |
-- temporary spaces
_space = box.space._space
-- not a temporary
FLAGS = 6
s = box.schema.space.create('t', { temporary = true })
s.temporary
s:drop()
-- not a temporary, too
s = box.schema.space.create('t', { temporary = false })
s.temporary
s:drop()
-- not a temporary, too
s = box.schema.space.create('t', { tempora... | ocelot-inc/tarantool | test/box/temp_spaces.test.lua | Lua | bsd-2-clause | 1,383 |
local serialize = require 'ser'
local succeeded = 0
local failed = 0
function case(input, expected, message)
local output = serialize(input)
if output == expected then
succeeded = succeeded + 1
else
print('test failed: ' .. message)
print('expected:')
print(expected)
print('got:')
print(output)
faile... | AntonioModer/Ser | tests.lua | Lua | mit | 1,920 |
--DiskOS API Loader
local Globals = (...) or {}
Globals.SpriteGroup = SpriteGroup
Globals.isInRect = isInRect
Globals.whereInGrid = whereInGrid
Globals.input = function(historyTable,preinput)
local pauseDisabled = Globals._DISABLE_PAUSE --Backup the original value
Globals._DISABLE_PAUSE = true --Make sure pau... | RamiLego4Game/LIKO-12 | OS/GameDiskOS/Runtime/Globals/03_DiskOSAPI.lua | Lua | mit | 571 |
local lustache = require "lustache"
pages = alven.get_pages()
data = {
pages = pages
}
template = alven.read_theme_file("base.mustache")
output = lustache:render(template, data)
alven.output(output)
| rzetterberg/alven | src/test/static/lua/examples/page_list/main.lua | Lua | mit | 208 |
-- Declare a shared "timer" counter and functions "timer"
-- and "start" when the script is loading.
shared.timer = 0
function timer()
-- Increment shared value.
shared.timer = shared.timer + 1
-- Return true to keep interval timer running or false to stop.
return true
end
function start()
-- Th... | GerHobbelt/civet-webserver | test/lua_backbround_script_timer.lua | Lua | mit | 973 |
local ccpaw = dofile "/lib/cc-paw.lua"
local args = {...}
local function usage()
print("cc-paw version " .. tostring(ccpaw.v) .. ". Usage:")
print("cc-paw install <package> [-f]")
print("cc-paw remove <package> [-f]")
print("cc-paw purge <package> [-f]")
print("cc-paw update")
print("cc-paw upgrade [-f]")... | cc-paw/cc-paw | src/bin.lua | Lua | mit | 1,504 |
-- Copyright (c) 2015-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
local S = {}
loc... | Ardavans/DSR | mbwrap/games/shooting_utils.lua | Lua | mit | 4,019 |
return require('rate_limit')
| 3scale/apicast | gateway/src/apicast/policy/rate_limit/init.lua | Lua | apache-2.0 | 29 |
-- This is code common to container modules, which are collections of
-- smaller constituent modules like Parallel, Sequential, etc.
local Container, parent = torch.class('nn.Container', 'nn.Module')
function Container:__init(...)
parent.__init(self, ...)
self.modules = {}
end
function Container:add(module)
... | quanhua92/torch-android | src/3rdparty/nn/Container.lua | Lua | bsd-3-clause | 1,717 |
-- ***************************************************************************
-- BH1750 Example Program for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-30
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***********************************************************************... | gentooliano/nodemcu-firmware | nodemcu_0.9.6-dev/nodemcu-firmware-0.9.6-dev_20150704/lua_modules/bh1750/bh1750_Example1.lua | Lua | mit | 673 |
local config = {}
config.HTTP_SCHEMA = "HTTP"
config.HTTP_VERSION = "1.1"
config.HTTP_PORT = 80
-- config.HTTPS_PORT = 443
config.HTTP_AGENT = "levent/1.0"
config.HTTP_ABS_PATH = "/"
-- supported methods
-- http methods is case-sensitive
config.HTTP_METHODS = {
OPTIONS = "OPTIONS",
GET = "GET",
HEAD... | xjdrew/levent | levent/http/config.lua | Lua | mit | 785 |
C_player = loadfile("c_player.lua")
Gp = loadfile("gp.lua")
Menu = loadfile("menu.lua")
if C_player == nil or Menu == nil then
screen:clear()
screen:print(10,10,"File Loading Failed",Color.new(255,0,0))
screen:print(10,20,"Reinstall Homebrew Please",Color.new(255,0,0))
screen.flip()
end
-----------------------... | Yonaba/mario-kart | src/menu2.lua | Lua | mit | 2,515 |
-- Modified code at http://czerasz.com/2015/07/19/wrk-http-benchmarking-tool-example/
-- Module instantiation
local cjson = require "cjson"
local cjson2 = cjson.new()
local cjson_safe = require "cjson.safe"
local url = require "socket.url"
-- Load URL paths from the file
function load_post_data_from_file(file)
loca... | elifkus/very-simple-service | scripts/requests-with-post-data.lua | Lua | mit | 1,622 |
-- a basic MCP 2.1 implementation in Lua
local mcp = {
_VERSION = 1.0,
}
local function fixminor(str)
local major, minor = string.match(str, "^(%-?%d+)%.?(%d-)$")
return major*1000 + (tonumber(minor) or 0)
end
local function unfixminor(f)
return math.floor(f*0.001) .. "." .. (f % 1000)
end
-- returns the highest ... | Loonesbury/lua-mcp | init.lua | Lua | mit | 10,562 |
EditorHint = EditorHint or class(MissionScriptEditor)
function EditorHint:create_element()
self.super.create_element(self)
self._element.class = "ElementHint"
self._element.values.hint_id = "none"
end
function EditorHint:_set_text()
local hint = managers.hint:hint(self._element.values.hint_id)
self._text:SetText... | GreatBigBushyBeard/PAYDAY-2-BeardLib-Editor | Classes/Map/Elements/hintelement.lua | Lua | mit | 798 |
-- Luapress
-- File: lib/template.lua
local type, tostring, loadstring = type, tostring, loadstring
--bits taken from my luawa (https://github.com/Fizzadar/luawa)
local template = {
data = {}
}
--add to data
function template:set(key, value)
self.data[key] = value
end
--get data
function template:get(key)
... | zet23t/tinyduinogames-blog | lib/template.lua | Lua | mit | 1,609 |
addEvent("DistanceTraveled",true)
recycling = {
button = {},
window = {},
label = {}
}
local screenW, screenH = guiGetScreenSize()
recycling.window[1] = guiCreateWindow((screenW - 384) / 2, (screenH - 212) / 2, 384, 212, "SUSA-TRANS", false)
guiWindowSetSizable(recycling.window[1], false)
guiWindow... | Krzo/susa_rp | susa_jobs/susa_recycling_c.lua | Lua | mit | 3,072 |
--------------------------------------------------------------------------------
--- Function
--- Toggle Night Shift.
---
--- Depends on https://github.com/smudge/nightlight being installed on the
--- system. To install via homebrew, run:
---
--- $ brew install smudge/smudge/nightlight
---
--- Parameters:
--- * None... | jasonrudolph/dotfiles | hammerspoon/night-shift.lua | Lua | mit | 1,199 |
--[[
Powerarrow Darker Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
local gears = require("gears")
local awful = require("awful")
awful.rules = require("aw... | RossMeikleham/dotfiles | awesome/rc.lua | Lua | mit | 27,625 |
if SERVER then
AddCSLuaFile("shared.lua")
end
if CLIENT then
SWEP.PrintName = "Hand Cuffs"
SWEP.Slot = 2
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end
SWEP.Author = "RedMist"
SWEP.Instructions = "Left Click: Restrain / Free"
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.ViewModelFOV = 62
SW... | msburgess3200/PERP | gamemodes/perp/entities/weapons/weapon_perp_handcuffs/shared.lua | Lua | mit | 2,954 |
LinkLuaModifier("modifier_ramza_ninja_reflexes", "heroes/ramza/ramza_ninja_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_ramza_ninja_dual_wield", "heroes/ramza/ramza_ninja_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
RmazaNinjaDualWieldApply = function (keys)
keys.caster:AddNewModifier(keys.caster, ... | tontyoutoure/DOTA2-AI-Fun | game/dota_addons/dota2_ai_fun/scripts/vscripts/heroes/ramza/ramza_ninja.lua | Lua | mit | 4,719 |
local nn = require 'nn'
local net = nn.Sequential()
net:add(nn.View(2))
net:add(nn.Linear(2, 32))
net:add(nn.ReLU(true))
return net
| DanielTea/Unity_AI | unity3d-roll-a-ball-master/Atari2/examples/GridWorldNet.lua | Lua | mit | 134 |
local player = {}
local sprite = require "sprite"
local physics = require "physics"
local debris = require "debris"
speed_movement = 120.0
speed_rotation = 3.0
anim_moving_factor = 0.04
snd_fire = nil
physics_object = nil
location_x = 0.0
location_y = 0.0
heading = 0.0
sprite_anim_progress = 0.0
is_forward = fal... | thunderk/phobia | phobia/player.lua | Lua | mit | 5,877 |
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- F I N A L C U T P R O A P I --
-----------------------------------------------------------------------------... | cailyoung/CommandPost | src/extensions/cp/apple/finalcutpro/main/Viewer.lua | Lua | mit | 7,230 |
--------------------------------------------------------------------------------
-- main.lua
--
-- This file is the entry point for the application: both for the game and for
-- testing via Corona simulator.
--
-- This file should remain small and simply call the two cases: main game loop
-- or the test_runner.
-------... | mrhappyasthma/GoT-Board-Game | src/main.lua | Lua | mit | 1,571 |
local unique_key = KEYS[1]
local job_id = ARGV[1]
local expires = ARGV[2]
if redis.pcall('set', unique_key, job_id, 'nx', 'ex', expires) then
return 1
else
return 0
end
| antek-drzewiecki/sidekiq-unique-jobs | redis/aquire_lock.lua | Lua | mit | 193 |
local K, C, L = unpack(select(2, ...))
if C["Skins"].BigWigs ~= true or not K.CheckAddOnState("BigWigs") then return end
local _G = _G
local table_remove = table.remove
local CreateFrame = _G.CreateFrame
local UIParent = _G.UIParent
-- GLOBALS: BigWigs, BigWigsLoader
local BigWigsFont = K.GetFont(C["Skins"].Font)
l... | Kkthnx-WoW/KkthnxUI | KkthnxUI/Modules/Skins/Addons/BigWigs.lua | Lua | mit | 4,480 |
local request = require 'http.functional.request'
local writer = require 'http.functional.response'
local function usage()
print([[
Usage: lurl [options...] <app> <path>
Options:
-X COMMAND Specify request command to use, e.g. POST
-I Fetch the headers only
-H LINE Pass custom header LIN... | akornatskyy/lucid | src/http/functional/lurl.lua | Lua | mit | 4,431 |
local discount = require "discount"
local input_file = select(1, ...) or "manual.md"
local output_file = select(2, ...) or "manual.html"
local f = io.open(input_file, "rb")
local code = f:read("*a")
f:close()
local html = ([[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/... | ignacio/nozzle | docs/gendoc.lua | Lua | mit | 660 |
package.path = '/EnergyWatchdog/lib/?.lua;/EnergyWatchdog/conf/?.lua;' .. package.path
local component = require('component')
local shell = require("shell")
local term = require("term")
local computer = require("computer")
local util = require("util")
local prettyTable = require("prettyTable")
local functi... | thiagohmoreira/EnergyWatchdog | opencomputer/bin/reactor_control.lua | Lua | mit | 6,122 |
ITEM.name = "Качественная гражданская кожаная одежда"
ITEM.desc = "Хорошего качества одежда из кожи."
ITEM.category = "Armor"
ITEM.model = "models/props/furnitures/humans/basket_cloth.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.permit = "equip"
ITEM.price = 1750
ITEM.eqslot = "Armor"
ITEM:hook("Equip", function(item)
if... | xAleXXX007x/Witcher-RolePlay | witcherrp/plugins/armor/items/armor/sh_citizen_leather_good.lua | Lua | mit | 631 |
local debug = debug
local client = client
local ipairs = ipairs
local table = table
local tostring = tostring
module("widgets.history")
local history = { }
local remove = function(value)
for i,v in ipairs(history) do
if v == value then
table.remove(history, i)
end
end
end
local focused = function(c)
remo... | timroes/my-awesome | widgets/history.lua | Lua | mit | 776 |
ITEM.Name = "Bowie knife" .. " | " .. "Marble Fade"
ITEM.Price = 20000
ITEM.Model = "models/weapons/w_csgo_bowie.mdl"
ITEM.Skin = 13
ITEM.WeaponClass = "csgo_bowie_marblefade"
function ITEM:OnEquip(ply)
ply:Give(self.WeaponClass)
end
function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponC... | xDShot/csgo_knives_sweps | lua/pointshop/items/weapons/csgo_bowie_marblefade.lua | Lua | mit | 465 |
local chatOpen = false
local Suggestions = {}
hook.Add("HUDPaint", "HUDPaint", function()
if chatOpen then
local x, y = chat.GetChatBoxPos()
x = x + ScrW() * 0.03875
y = y + ScrH() / 4 + 5
surface.SetFont("ChatFont")
for i, v in ipairs( Suggestions ) do
local sx, sy = surface.GetTextSize(v.name)
... | Partixel/v-handle | lua/v-handle/modules/hud/cl_auto_complete.lua | Lua | apache-2.0 | 1,857 |
--------------------------------------------------------------------
-- This file was automatically generated by ProjectGenerator
-- which is tooling part the build system designed for GUCEF
-- (Galaxy Unlimited Framework)
-- For the latest info, see http://www.VanvelzenSoftware.com/
--
-- The contents of this file... | LiberatorUSA/GUCEF | projects/premake5/targets/GUCEF_exe_gucefDRN_TestApp/premake5.lua | Lua | apache-2.0 | 837 |
-- Clipboard.lua
-- Implements command handlers for the clipboard-related commands
function HandleCopyCommand(a_Split, a_Player)
-- //copy
-- Get the player state:
local State = GetPlayerState(a_Player)
if not(State.Selection:IsValid()) then
a_Player:SendMessage(cChatColor.Rose .. "Make a region selection ... | cuberite/WorldEdit | Commands/Clipboard.lua | Lua | apache-2.0 | 4,219 |
if (SERVER) then
AddCSLuaFile()
end
kswep_npcarmors={}
local function KswepAddNPCArmor(tbl)
kswep_npcarmors[tbl.name]=tbl
end
--suit coverage: 1 adds chest, 2 adds gut, 4 adds limbs, 8 adds head, 16 adds generic
--hit areas: 1 front, 2 back, 4 side
local def={}
def.name="none"
def.hitpoints={}
def.slash=0
def.club=0... | VurtualRuler98/kswep2 | lua/autorun/kswep_npcarmors.lua | Lua | apache-2.0 | 3,852 |
local importations = require(IMPORTATIONS)
local databaseConstants = require(importations.DATABASE_CONSTANTS)
local sqlite3 = require(importations.SQLITE3)
local listener = require(importations.LISTENER)
local strings = require(importations.STRINGS)
local db
local function _start()
local dbPath = system.pathForFi... | hpedrorodrigues/TimeRunner | src/db/db.lua | Lua | apache-2.0 | 997 |
x = 5
y = 10
z = "abc"
l = {x,y,z}
for i =1,3 do
--print(l[i])
end
function f(x)
print(z)
end
f()
| AndreasPK/yalvm | test/testFiles/globals.lua | Lua | bsd-3-clause | 105 |
----------------------------
-- SSBase --
-- Created by Skeyler.com --
----------------------------
surface.CreateFont("ss.slot.name", {font = "DeJaVu Sans", size = 9, weight = 400})
local backgroundTexture = Material("skeyler/vgui/store/icon_base.png", "noclamp smooth")
local highlightTexture = ... | T3hArco/skeyler-gamemodes | ssbase/gamemode/panels/ss_slot.lua | Lua | bsd-3-clause | 8,450 |
Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local mobile = require('mobile_connection')
local tcp = require('tcp_connection')
local file_connection = require('file_connection')
----------------------------------------------... | smartdevicelink/sdl_atf_test_scripts | test_scripts/API/ATF_DeleteFile.lua | Lua | bsd-3-clause | 89,261 |
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
function HandleMouse_Text(this,MouseX,MouseY)
--print("In HandleMouse_Text. Values=",MouseX,MouseY)
return nil -- didn't hit it
end
function HandleMouse_Model(this,MouseX,MouseY)
return nil -- didn't hit it
end
function HandleM... | marth8880/MEUScripts | ifutil_mouse.lua | Lua | bsd-3-clause | 9,268 |
#!/usr/bin/env luajit
package.path = "../?.lua"
--[[
test_sysinfo.lua
Test for a specific directory
--]]
local procfs = require("lj2procfs.procfs")
local sutil = require("lj2procfs.string-util")
local sysfs = require("lj2procfs.codecs.sys")
local putil = require("lj2procfs.print-util")
local node = sysfs... | Wiladams/lj2procfs | testy/test_sysinfo.lua | Lua | mit | 410 |
--- === plugins.finalcutpro.tangent.browser ===
---
--- Final Cut Pro Tangent Browser Group
local require = require
--local log = require "hs.logger".new "tangentBrowser"
local timer = require "hs.timer"
local fcp = require "cp.apple.finalcutpro"
loc... | fcpxhacks/fcpxhacks | src/plugins/finalcutpro/tangent/browser.lua | Lua | mit | 5,347 |
#!/usr/bin/env luajit
local logger = require "kong.cli.utils.logger"
local constants = require "kong.constants"
logger:print(string.format("Kong version: %s", constants.VERSION))
| xvaara/kong | kong/cli/cmds/version.lua | Lua | apache-2.0 | 181 |
--[[
********************************************************************************
Project owner: RageQuit community
Project name: GTW-RPG
Developers: Mr_Moose
Source code: https://github.com/404rq/GTW-RPG/
Bugtracker: https://discuss.404rq.com/t/issues
Suggestions: https://discuss.404rq.com/t/deve... | GTWCode/GTW-RPG | [resources]/GTWhelp/cmd_list.lua | Lua | bsd-2-clause | 10,362 |
luascript = [[
task.caption = 'Hello World Example'
print('Hello World!')
task.status = 'Done.'
]]
tab:runtask(luascript) | syhunt/community | src/PenTools/Scripts/scriptrunner/Lua/task.lua | Lua | bsd-3-clause | 121 |
--
-- tests/actions/vstudio/cs2005/buildevents.lua
-- Validate the build events in Visual Studio 2005+ .csproj
-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
--
T.vstudio_cs2005_buildevents = { }
local suite = T.vstudio_cs2005_buildevents
local cs2005 = premake.vstudio.cs2005
--
-- Set... | premake/premake-4.x | tests/actions/vstudio/cs2005/buildevents.lua | Lua | bsd-3-clause | 994 |
local config
do
local _table_0 = require("lapis.config")
config = _table_0.config
end
config("development", function()
return postgresql_url("postgres://benchmarkdbuser:benchmarkdbpass@127.0.0.1/hello_world")
end)
return config("production", function()
port(80)
num_workers(4)
lua_code_cache("on")
return p... | Ocramius/FrameworkBenchmarks | lapis/config.lua | Lua | bsd-3-clause | 407 |
a = mpz("1000000000000000000000000000")
b = mpz(10)
c = mpz(10)
print(a/3)
print(b == c)
print(a < b)
print(b < a)
print(b == mpz(10))
print(mpz(10) < b)
print(mpz(10) <= b)
print(a)
print(b)
| c-cube/lean | tests/lua/mpz1.lua | Lua | apache-2.0 | 192 |
scope = 'global'
scope_abbr = 'g'
dofile 'scope-tests.lua'
| hoelzro/queqiao | tests/004-global-scope.lua | Lua | mit | 65 |
local http = require "resty.http"
local server = require "spec.support.server"
describe("option generate_certs", function()
before_each(server.stop)
after_each(server.stop)
it("generate_certs disables generation of new SSL certs", function()
server.start({
auto_ssl_http_config = [[
server {
... | GUI/lua-resty-auto-ssl | spec/option_generate_certs_spec.lua | Lua | mit | 3,366 |
local GameState = require("states/GameState")
local KeyPressed = require("events/KeyPressed")
-- State superclass
local State = require("core/State")
local MenuState = class("MenuState", State)
function MenuState:load()
self.engine = Engine()
self.eventmanager = EventManager()
end
function MenuState:update... | lovetoys/preset | src/states/MenuState.lua | Lua | mit | 684 |
local opts = { noremap = true, silent = true }
-- Shorten function name
local keymap = vim.api.nvim_set_keymap
-- Set <Leader> key
--vim.g.mapleader = ","
--Remap space as leader key
keymap("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
keymap("", ",", "<leader>", { silent = true })
-... | bmwill/dotfiles | nvim/lua/user/keymaps.lua | Lua | mit | 5,083 |
levels = {
{ enemies = 0, fuel = 100 },
{ enemies = 1, fuel = 200 },
{ enemies = 2, fuel = 250 },
{ enemies = 3, fuel = 300 },
{ enemies = 4, fuel = 350 },
{ enemies = 5, fuel = 350 },
{ enemies = 6, fuel = 350 },
{ enemies = 7, fuel = 350 },
{ enemies = 8, fuel = 350 },
{ enemie... | jotson/1gam-jan2013 | levels.lua | Lua | mit | 546 |
-- ========== Globals ==========================================================
local log = hs.logger.new("init", "info")
-- ========== Utilities ========================================================
-- Executes a command with the user profile (/etc/profile and ~/.profile) so
-- that PATH and other environment v... | mk12/dotfiles | .config/hammerspoon/init.lua | Lua | mit | 18,981 |
local gamestate = {}
gamestate.new = function(self,name)
local _state = {}
_state.name = name or "defaultState"
_state.manager = nil
return _state
end
return gamestate | mattijv/Avoidant | gamestate.lua | Lua | mit | 172 |
-- wheat.lua v1.1 -- by Cegaiel
--
-- Waters and harvests wheat plants, but you still need to manually plant every seed and pin up the window.
-- You can Alt+Shift to Pause the macro and plant new beds/add new windows anytime.
-- Then Alt+Shift again to Resume the macro. It will find any new pinned bed windows.
-- Just... | DashingStrike/Automato-ATITD | scripts/wheat.lua | Lua | mit | 5,926 |
BulletEnemyB = class(Bullet)
function BulletEnemyB:spriteClass()
return SpriteBulletEnemyB
end
function BulletEnemyB:spriteLayer()
return "scene"
end
function BulletEnemyB:spriteName()
return "bullet_enemy_b"
end
function BulletEnemyB:moveRateX()
return 0
end
function BulletEnemyB:moveRateY()
r... | suppayami/shoot-la-shoot | data/scripts/class/specific/bullet_enemy_b.lua | Lua | mit | 392 |
--[[
LibDispellable-1.0 - Test whether the player can really dispell a buff or debuff, given its talents.
Copyright (C) 2009-2013 Adirelle (adirelle@gmail.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are... | modhunter/NerdPack | Libs/LibDispellable-1.0/LibDispellable-1.0.lua | Lua | mit | 11,794 |
ldnn = {}
mt = {}
-- introduce a '__call' metamethod in table 'mt'
mt.__call = function (cls, ...)
print(cls)
print(...)
end
-- associate the metatable 'mt' with 'ldnn' table
setmetatable(ldnn, mt)
-- call table 'ldnn' as like function
ldnn("abc")
-- above statement will execute a function associated with __cal... | NerdWalletOSS/Q | RUNTIME/DNN/lua/sam.lua | Lua | mit | 878 |
PlayController = {}
ePlayState =
{
Play = "Play",
Paused = "Paused",
AtStart = "AtStart",
AtEnd = "AtEnd",
}
-- This could be a state machine but it feels a bit over designed that way.
PlayController.__index = PlayController
function PlayController:Create(params)
params = params or {}
local t... | dinodeck/rpg_dialog_script | dialog_runner/code/ui/PlayController.lua | Lua | mit | 1,921 |
local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f:close()
end
retur... | KevinGuarnati/controllore | plugins/quotes.lua | Lua | mit | 1,508 |
#!/usr/bin/lua
--HTTP header
print [[
Content-Type: text/plain
]]
warningTemperature = 40
successReturnText = "succ_ardu_openwrt"
localLogPath = "/mnt/web/data/node_"
globalLogPath = "/mnt/web/data/global.log"
mailList = "/mnt/web/data/mail.list"
mailTempPath = "/tmp/warning.mail"
maskCode = "ArduinoEnvNode"
fun... | DuanWeiye/rpiBot | Others/Arduino_Code/TempWebServer/main.lua | Lua | mit | 3,857 |
local _, Zylla = ...
local unpack = _G.unpack
local NeP = _G.NeP
local Mythic_Plus = _G.Zylla.Mythic_Plus
local GUI = {
unpack(Zylla.Logo_GUI),
-- Header
{type = 'header', size = 16, text = 'Keybinds', align = 'center'},
{type = 'checkbox', text = 'Left Shift: '..Zylla.ClassColor..'Pause|... | adde88/Nerdpack-Zylla | rotations/hunter/marksmanship.lua | Lua | mit | 15,344 |
local K, C, L = select(2, ...):unpack()
if C.Unitframe.Enable ~= true then return end
local _, ns = ...
local oUF = ns.oUF
local colors = K.Colors
local ignorePetSpells = {
115746, -- Felbolt (Green Imp)
3110, -- firebolt (imp)
31707, -- waterbolt (water elemental)
85692, -- Doom Bolt
}
-- Channeling ticks, base... | AutoJames/KkthnxUI_Legion | KkthnxUI/Modules/UnitFrames/Elements/Castbars.lua | Lua | mit | 8,961 |
-- Copyright (c) 2009-2012 Incremental IP Limited
-- see LICENSE for license information
local ops = require("rima.operations")
local object = require("rima.lib.object")
local index = require("rima.index")
------------------------------------------------------------------------------
return function(T)
local A =... | geoffleyland/rima | lua/tests/rima/operators/mul.lua | Lua | mit | 684 |
---
-- ODBC connector for Lua-DBI library
--
local odbc = require "odbc"
local DBD_ODBC_CONNECTION = "DBD.ODBC.Connection"
local DBD_ODBC_STATEMENT = "DBD.ODBC.Statement"
local Connection, Statement
local function odbc_error(err)
return err and tostring(err) or nil
end
local function odbc_return(ok, ...)
if n... | moteus/lua-odbc-dbi | src/dbd/odbc.lua | Lua | mit | 3,420 |
print("included")
| frinknet/rava | examples/inc.lua | Lua | mit | 18 |
--- Create zip archives.
--
-- Based on http://wiki.tcl.tk/15158
--
-- @module ZipWriter
--
-- @usage
-- local ZipWriter = require "ZipWriter"
--
-- local function make_reader(fname)
-- local f = assert(io.open(fname, 'rb'))
-- local chunk_size = 1024
-- local desc = { -- `-rw-r-----` on Unix
-- istext = tr... | dariocanoh/numberbook | deps/ZipWriter.lua | Lua | mit | 38,476 |
DSM.Config = {}
DSM.Config.CallMods = {}
--Stores the last time a user used !callmods
DSM.Config.CallMods.UserLastCallTable = {}
--Stores the Unix Timestamp indicating the last time the
DSM.Config.CallMods.ServerLastCall = 0
--Players in these groups can call for a mod.
DSM.Config.CallMods.AuthorizedUserGroups = {"Reg... | DarkRedemption/darksservermanager | lua/callmods/config/sv_callconfig.lua | Lua | mit | 1,228 |
data:extend({
{
type = "tree",
name = "5d-banner-1",
icon = "__5dim_decoration__/graphics/icon/icon_5d_banner1_.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "5d-banner-1"},
max_health = 100,
corpse = "small-remnants",
collision_box = {{-... | McGuten/5DimsFactorioMods | Factorio 0.15/5dim_decoration_0.15.3/prototypes/entity.lua | Lua | mit | 57,039 |
--[[
strings.lua
Strings for ImprovedIgnore. Makes for easy editing and localization.
]]
-- Generic strings
STR_IIGNORE_ALLOW = "allow"
STR_IIGNORE_DENY = "deny"
STR_IIGNORE_REMOVE = "remove"
STR_IIGNORE_LOCALIZATION_WHISPERS = "whispers" -- localized version of "[Player] whispers:"
-- Generic function strings.
STR... | twothe/ImprovedIgnore | strings.lua | Lua | mit | 2,704 |
local _M={}
_M.db_no_parm="参数不存在"
_M.db_no_usercode="用户编号为空"
_M.db_parm_error="参数异常"
return _M | ouyangruoxue/pokerServer | server/lua/init/international/zh_cn/db_msg.lua | Lua | mit | 124 |
local BW = BaseWars
local colorRed = Color(255, 0, 0)
local colorBlue = Color(0, 0, 255)
local colorWhite = Color(255, 255, 255)
local function Log(...)
MsgC(SERVER and colorRed or colorBlue, "[BWML] ", colorWhite, ...)
MsgN("")
end
if not BW then -- Woah, no BaseWars table? This should be loaded AFTER the t... | SherlockMe/basewars.1.1 | gamemode/modules.lua | Lua | apache-2.0 | 2,461 |
require "runner"
require "ui"
ttt = Runner:new()
ttt:start_the_game() | angeleah/lua_tic_tac_toe | src/executor.lua | Lua | apache-2.0 | 71 |
--[[
Slide - gamemode/shared.lua
Copyright 2017-2020 Lex Robinson
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 re... | Lexicality/slide | gamemode/shared.lua | Lua | apache-2.0 | 1,541 |
-----------------------------------------------------------------
-----------------------------------------------------------------
-- MASS EFFECT: UNIFICATION Template Script by Aaron Gilbert
-- Build 80219/07
-- Screen Names: Marth8880, GT-Marth8880, [GT] Marth8880
-- E-Mail: Marth8880@gmail.com
-- Copyright (c... | marth8880/MEUScripts | ME5_Weapons.lua | Lua | bsd-3-clause | 16,598 |
-- ProbablyEngine Rotations
-- Released under modified BSD, see attached LICENSE.
ProbablyEngine.listener.register("PLAYER_FOCUS_CHANGED", function(...)
ProbablyEngine.module.player.focus = Unit
end)
ProbablyEngine.listener.register("PLAYER_TARGET_CHANGED", function(...)
if ProbablyEngine.faceroll.rolling then
... | adde88/Probably | system/listeners/player_focus_changed.lua | Lua | bsd-3-clause | 375 |
-- This file is part of SUIT, copyright (c) 2016 Matthias Richter
local NONE = {}
local BASE = (...):match('(.-)[^%.]+$')
local default_theme = require(BASE..'theme')
local suit = {}
suit.__index = suit
function suit.new(theme)
return setmetatable({
-- TODO: deep copy/copy on write? better to let user handle => d... | evgiz/sprit3r | src/SUIT/core.lua | Lua | mit | 4,529 |
--- === hs.expose ===
---
--- Keyboard-driven expose replacement/enhancement
---
--- Warning: this module is still somewhat experimental.
--- Should you encounter any issues, please feel free to report them on https://github.com/Hammerspoon/hammerspoon/issues
--- or #hammerspoon on irc.freenode.net
---
--- With this mo... | asmagill/hammerspoon | extensions/expose/init.lua | Lua | mit | 44,935 |
--- Extended operations on Lua tables.
--
-- See @{02-arrays.md.Useful_Operations_on_Tables|the Guide}
--
-- Dependencies: `pl.utils`, `pl.types`
-- @module pl.tablex
local utils = require ('pl.utils')
local types = require ('pl.types')
local getmetatable,setmetatable,require = getmetatable,setmetatable,require
local t... | ennis/autograph-pipelines | resources/scripts/pl/tablex.lua | Lua | mit | 27,308 |
-- Copyright (C) 2012 by wubenqi
-- Distributable under the terms of either the Apache License (Version 2.0) or
-- the GNU Lesser General Public License, as specified in the COPYING file.
--
-- By: wubenqi<wubenqi@gmail.com>
--
------------------------------------------------------------------------------------------... | tempbottle/zengine | bin/scripts2/zengine/echod/echod.lua | Lua | apache-2.0 | 824 |
-- Trie search tests
context("Trie search functions", function()
local t = require "rspamd_trie"
test("Trie search", function()
local patterns = {
'test',
'est',
'he',
'she',
'str\0ing'
}
local trie = t.create(patterns)
assert_not_nil(trie, "cannot create trie"... | amohanta/rspamd | test/lua/unit/trie.lua | Lua | bsd-2-clause | 1,403 |
----
-- @file Xml
---- Brief description.
-- <#Description#>
-- @return <#return value description#>
function Xml:calculateSerializeBufferSize()
end
---- Brief description.
-- <#Description#>
-- @param btSerializer <#btSerializer description#>
-- @return <#return value description#>
function Xml:serialize(btSeriali... | njligames/NJLIGameEngine | src/njli/platform/cmake.in/ldoc.in/Xml.lua | Lua | mit | 2,009 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.