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
--finds item stack with given qty. if qty=0 then finds first stack function findItemStack(itemName,qty) local itemBase = memFindString(itemName,'0') local itemX local itemY local itemQty local c = 0 local match = false while true do local d = memFindString('icon_',itemBase) if d-itemBase==116 then ...
laggyluk/brick_engine
tools/logicEditor/bin/scripts/destroy_items.lua
Lua
mit
4,040
---------------------------------------------------------- -- HideHouseName -- Copyright (c) J Teatime. ---------------------------------------------------------- require "Window" local HideHouseName = {} function HideHouseName:new(o) o = o or {} setmetatable(o, self) self.__i...
pprince/wsaddon-HideHouseName
HideHouseName.lua
Lua
mit
1,422
print("inmation - Executing tests...") -- Create package aliases package.loaded.json = require("lib.json") local allTests = require('tests.all-tests') allTests:execute() print("inmation - Done testing")
inmation/library
main.lua
Lua
mit
206
--[[ source: https://github.com/kyleconroy/lua-state-machine Copyright (c) 2012 Kyle Conroy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limit...
Sewerbird/Helios2400
lib/statemachine.lua
Lua
mit
4,922
-- **************************************************************************** -- Temperature & Humidity display for OLED screen on EPS8266 (nodemcu) -- Written by: Phantase (https://github.com/phantase) -- -- Call it with a dofile('u8g_graphics_test.lua') to test it. -- -- MIT license, http://opensource.org/licenses/...
AndreiD/ESP8266_Stuff
examples/LUA_Examples/display/ssd1306/ssd1306_complex.lua
Lua
mit
3,434
-- convention around creating simple metatable class types -- no inheritance, data hiding built in -- copyright 2016 Samuel Baird MIT Licence local meta = require('core.meta') local class_meta = { -- constructor callable directly off the class __call = function(class, ...) return class.new(...) end, -- shared c...
samuelwbaird/brogue
source/core/class.lua
Lua
mit
5,630
--[[ Most of these functions can be called at any time. Send queues what you send until a connection is made. Only "tcp" and "udp" is supported. Default is tcp. There isn't much of a difference between udp and tcp in this wrapper so you can easily change between the two modes. By default the socket has a 3 second ti...
Noiwex/skoope
lua/luasocket.lua
Lua
mit
19,132
return{ name = 'stone', description = 'Stone', type = 'material', MAX_ITEMS = 1, }
10headless/hawkthorne-journey
src/items/materials/stone.lua
Lua
mit
99
local assert, type, setmetatable = assert, type, setmetatable local check_rule = {__index = { validate = function(self, value, model, translations) return self.rule(value, model, translations) end } } return function(rule) assert( type(rule) == 'function', "bad argument 'rule' (fun...
akornatskyy/lucid
src/validation/rules/rule.lua
Lua
mit
421
-------------------------------- -- @module LayoutComponent -- @extend Component -- @parent_module ccui -------------------------------- -- -- @function [parent=#LayoutComponent] setStretchWidthEnabled -- @param self -- @param #bool isUsed -- @return LayoutComponent#LayoutComponent self (return value: ccui.LayoutCo...
Gamesjiazhi/rwproject
ResourceWar/undeadClient2D/frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/LayoutComponent.lua
Lua
apache-2.0
10,737
require('tap')(function(test) local readdirRecursive = require('../lib/luvit-read-directory-recursive').readdirRecursive test('Test if we can recursively read directories', function(expect) readdirRecursive('./testDir', function(err, files) local cb = expect(function() assert(err == nil, 'Error sh...
kaustavha/luvit-read-directory-recursive
tests/test-read-directory-recursive.lua
Lua
apache-2.0
868
require "resty.nettle.types.curve25519" local types = require "resty.nettle.types.common" local lib = require "resty.nettle.hogweed" local ffi = require "ffi" local ffi_str = ffi.string local curve = {} function curve.mul(n, p) if p then lib.nettle_curve25519_mul(types.uint8_t_32, n, p) else lib.nettle_c...
bungle/lua-resty-nettle
lib/resty/nettle/curve25519.lua
Lua
bsd-2-clause
421
-- author: Adam Carmichael <carneeki@carneeki.net> -- package: compycraft -- descr: Looped one shot timer with countdown and lamp to indicate running -- state (lamp is inverted redstone signal) local runtime=5 term.clear() term.setCursorPos(1,1) redstone.setOutput("top", true) -- lamp off (inverted) redstone.setOutput...
carneeki/compycraft
oneshot-vari-timer.lua
Lua
bsd-2-clause
700
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0042-transfer-invalid-image-rpc.md -- -- Requirement summary:TBD -- -- Description: -- In case: -- 1. Mobile app requests AddSubMenu wit...
smartdevicelink/sdl_atf_test_scripts
test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/002_AddSubMenu.lua
Lua
bsd-3-clause
2,502
-- -- _vstudio.lua -- Define the Visual Studio 200x actions. -- Copyright (c) 2008-2013 Jason Perkins and the Premake project -- premake.vstudio = {} local vstudio = premake.vstudio local p = premake local project = p.project local config = p.config -- -- Mapping tables from Premake systems and architectures t...
Tiger66639/premake-core
src/actions/vstudio/_vstudio.lua
Lua
bsd-3-clause
15,098
local getNodeState = function(self) return self.nodeState end local getNodeObject = function(self) return self.nodeObject end local push = function(self) assert(self:getNodeObject(), "self:getNodeObject() must not be nil in " .. self:getNodeState():getName()) self:getNodeObject():getNode():getStateMachine():pu...
njligames/NJLIGameEngine
projects/YappyBirds/_archive/scripts_9.16.2016/nodes/bird/states/grabbed.lua
Lua
mit
2,878
--[[ -- Local Average Matching Strategy: -- This strategy first calculates the average demand during the day from the load profile of the building. -- The storage strategies goal is for this building’s final demand profile (aggregate of the load profile and the storage profile) to remain flat and constant at this aver...
funIntentions/project-smart-grid
strategies/Local_Average_Matching_Strategy.lua
Lua
mit
3,918
debugging = nil local Interface = require 'NJLI.Interface' local BitmapFont = require 'NJLI.BitmapFont' local YappyGame = require "YAPPYBIRDS.YappyGame" RanchersFont = nil Geometry2D = nil OrthographicCameraNode = nil PerspectiveCameraNode = nil MyGame = nil gInterface = nil local Create = function() if nil == O...
njligames/NJLIGameEngine
projects/YappyBirds_macOS_Xcode/build/Debug/NJLIGameEngine.app/Contents/Resources/assets/scripts/NJLI/InterfaceFunctions.lua
Lua
mit
33,110
local Stateful = { _VERSION = 'Stateful 1.0.5 (2017-08)', _DESCRIPTION = 'Stateful classes for middleclass', _URL = 'https://github.com/kikito/stateful.lua', _LICENSE = [[ MIT LICENSE Copyright (c) 2017 Enrique García Cota Permission is hereby granted, free of charge, to any person...
kikito/stateful.lua
stateful.lua
Lua
mit
6,692
local qt = require "qtest" local xc = require "xpio_c" local cmap = require "cmap" local eq = qt.eq -------------------------------- -- inspect `xpio` contents -------------------------------- local contents = { socket = "function", tqueue = "function", gettime = "function", socketpair = "function", ...
bhk/tooltree
monoglot/xpio_c_q.lua
Lua
mit
2,945
-- Furnishing: An furnishing in the Saloon that must be pathed around, or destroyed. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. local class = require("joueur.utili...
siggame/Joueur.lua
games/saloon/furnishing.lua
Lua
mit
2,736
--- === plugins.core.tourbox.changeapplications === --- --- Allows you to change the TourBox application if set to manual. local require = require --local log = require "hs.logger".new "changeapplications" local application = require "hs.application" ...
CommandPost/CommandPost
src/plugins/core/tourbox/changeapplications/init.lua
Lua
mit
3,445
return { hand_right = { { {-9, 37}, {-11, 31}, {-6, 32}, {-13, 28}, {0, 0}, {-9, 37}, {-9, 37}, {-9, 37}, {-9, 33}, {-10, 33}, {-1, 34}, {6, 37}, }, { {8, 37}, {10, 31}, {6, 32}, {12, 28}, {0, 0}, {8, 37}, {7, 37}, {8, 37}, {7, 36}, {9, 36}, {-1, 34}, {8, 37}, }, { {-14, 15}, {0, 0}, {0, 0}, {11, 30...
10headless/hawkthorne-journey
src/positions/jeff.lua
Lua
mit
4,157
local Migrations = { { name = "2015-07-31-172400_init_keyauth", up = function(options, dao_factory) return dao_factory:execute_queries [[ CREATE TABLE IF NOT EXISTS keyauth_credentials( id uuid, consumer_id uuid, key text, created_at timestamp, P...
xvaara/kong
kong/plugins/key-auth/schema/migrations.lua
Lua
apache-2.0
690
-- Use of this source code is governed by the Apache 2.0 license; see COPYING. module(...,package.seeall) local VhostUser = require("apps.vhost.vhost_user").VhostUser local PcapFilter = require("apps.packet_filter.pcap_filter").PcapFilter local RateLimiter = require("apps.rate_limiter.rate_limiter").RateLimiter local...
wingo/snabbswitch
src/program/snabbnfv/nfvconfig.lua
Lua
apache-2.0
6,038
include("build_tools") location(build_root) targetdir(build_bin) objdir(build_obj) includedirs({ ".", "src", "third_party", "build_tools/third_party/gflags/src", }) defines({ "_UNICODE", "UNICODE", "MICROPROFILE_MAX_THREADS=128", }) vectorextensions("AVX") flags({ --"ExtraWarnings", -- Sets t...
TingPing/xenia
premake5.lua
Lua
bsd-3-clause
4,408
--[[ Copyright (C) 2013-2018 Draios Inc dba Sysdig. 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/licenses/LICENSE-2.0 Unless required by ...
draios/sysdig
userspace/sysdig/chisels/v_procs_fd_usage.lua
Lua
apache-2.0
3,750
--[[----------------------------------------------------------------------------- EditBox Widget -------------------------------------------------------------------------------]] local Type, Version = "EditBox", 26 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Typ...
askore/LootSecretary
src/lua/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
Lua
apache-2.0
7,520
p("module1") _G.num_loaded = _G.num_loaded + 1 return {"module1"}
sousoux/luvit
tests/modules/module1/init.lua
Lua
apache-2.0
66
-- -- tests/config/test_linkinfo.lua -- Test the config object's link target accessor. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local suite = test.declare("config_linkinfo") local config = premake.config -- -- Setup and teardown -- local sln, prj function suite.setup() _ACTION = "t...
annulen/premake
tests/config/test_linkinfo.lua
Lua
bsd-3-clause
2,402
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire ZCPU" ENT.Author = "Black Phoenix" ENT.WireDebugName = "ZCPU" if CLIENT then return end -- No more client local cpu_max_frequency = 1400000 local wire_cpu_max_frequency = CreateConVar("wire_cpu_max_frequency", cpu_max_frequency...
NezzKryptic/Wire
lua/entities/gmod_wire_cpu.lua
Lua
apache-2.0
8,821
s_pPathGrossini = "Images/grossini.png" s_pPathSister1 = "Images/grossinis_sister1.png" s_pPathSister2 = "Images/grossinis_sister2.png" s_pPathB1 = "Images/b1.png" s_pPathB2 = "Images/b2.png" s_pPathR1 = "Images/r1.png" s_pPathR2 = "Images/r2.png" s_pP...
dios-game/dios-cocos
src/oslibs/cocos/cocos-src/tests/lua-tests/src/testResource.lua
Lua
mit
2,060
-------------------------------- -- @module FlipY3D -- @extend FlipX3D -- @parent_module cc -------------------------------- -- brief Create the action with duration.<br> -- param duration Specify the duration of the FlipY3D action. It's a value in seconds.<br> -- return If the creation success, return a pointer of F...
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua
Lua
mit
1,014
require ("lib.lclass") require ("lib.yanecos.Processor") require ("src.events.FireMissileEvent") class "PlayerInputProcessor" ("Processor") function PlayerInputProcessor:PlayerInputProcessor (entityManager, eventManager) self.entityManager = entityManager self.eventManager = eventManager self.accelerateShip = 0 ...
BlurryRoots/weltraumsteinekaputtmachen
src/processors/PlayerInputProcessor.lua
Lua
mit
2,509
SB.Include(Path.Join(SB.DIRS.SRC, 'view/editor.lua')) SB.Include(Path.Join(SB.DIRS.SRC, 'view/map/material_browser.lua')) SB.Include(Path.Join(SB.DIRS.SRC, 'view/map/saved_brushes.lua')) TextureEditor = Editor:extends{} TextureEditor:Register({ name = "textureEditor", tab = "Map", caption = "Texture", ...
Spring-SpringBoard/SpringBoard-Core
scen_edit/view/map/texture_editor.lua
Lua
mit
20,925
-- Automatically generated packer.nvim plugin loader code if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') return end vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcal...
faldah/dotfiles
nvim/plugin/packer_compiled.lua
Lua
mit
15,255
local unpack = table.unpack or unpack --- Bit operations local ok,bit if _VERSION == "Lua 5.3" then bit = (load [[ return { band = function(x, y) return x & y end, bor = function(x, y) return x | y end, bxor = function(x, y) return x ~ y end, bnot = function(x) return ~x end, rshift =...
MEHRDAD1370/Quick-Bot
libs/fakeredis.lua
Lua
mit
42,111
CUSTOM_STARTING_GOLD = 625 CUSTOM_GOLD_FOR_RANDOM_TOTAL = 800 ADS_CLICKED_BONUS_GOLD = 35 CUSTOM_GOLD_REPICK_COST = 200 MAX_SPAWNBOXES_SELECTED = 3 HERO_SELECTION_PICK_TIME = 70 HERO_SELECTION_STRATEGY_TIME = 20 HERO_SELECTION_BANNING_TIME = 40 HERO_SELECTION_PHASE_NOT_STARTED = 0 HERO_SELECTION_PHASE_BANNING = 1 HE...
ark120202/aabs
game/scripts/vscripts/modules/hero_selection/hero_selection.lua
Lua
mit
9,387
customSchema = class({}) function customSchema:init() -- Check the schema_examples folder for different implementations -- Flag Example -- statCollection:setFlags({version = GetVersion()}) -- Listen for changes in the current state ListenToGameEvent('game_rules_state_change', function(keys) ...
Paaskehare/SurvivalTD
game/survival_td/scripts/vscripts/statcollection/schema_examples/example.lua
Lua
mit
4,775
local gl = require'gl' local buffer=require'lib.buffer'.newBuffer local ffi if pcall(require,'ffi') then ffi=require'ffi' end local function validate(shader) local int = buffer('int',1,{0}) gl.glGetShaderiv( shader, gl.GL_COMPILE_STATUS, int ) if int[0] == gl.GL_TRUE then return true else ...
Salmito/yale
app/src/main/assets/lib/glutils.lua
Lua
mit
4,031
-- The pet must win the race. -- Runners should touch their teams mark and run back. local function waitAndRun(event) local referee = pet:findNearestByType("wizard") -- If the referee is speaker and the message is "Start": -- Make the pet run to the red mark. -- Then run back. if event.spea...
nikai3d/codecombat-scripts
desert/olympic-race.lua
Lua
mit
521
module 'mock' CLASS: Stat () :MODEL{} function Stat:__init( data ) self.values = {} self.changeListeners = {} self.changeSignals = {} self.allowNotifyChanges = true self.globalChangeSignal = false self.globalChangeListenerList = {} self.changeListeners[ '*' ] = self.globalChangeListenerList if data then s...
tommo/mock
mock/tools/Stat.lua
Lua
mit
3,500
local tables = require("__flib__.table") local time_period_items = { { time = 60*2, text = "train-log.time-2m" }, { time = 60*15, text = "train-log.time-15m" }, { time = 60*60*1, text = "train-log.time-1h" }, { time = 60*60*3, ...
Zomis/FactorioMods
train-log_1.1.4/filter-time.lua
Lua
mit
878
--[=[ @class GameConfigCmdrUtils ]=] local require = require(script.Parent.loader).load(script) local GameConfigAssetTypes = require("GameConfigAssetTypes") local GameConfigCmdrUtils = {} function GameConfigCmdrUtils.registerAssetTypes(cmdr, configPicker) assert(cmdr, "Bad cmdr") assert(configPicker, "Bad config...
Quenty/NevermoreEngine
src/gameconfig/src/Shared/Cmdr/GameConfigCmdrUtils.lua
Lua
mit
1,889
--- Source code of KcWiki "模块:深海装备函数" -- Provide lua APIs to get shinkai equip data from "模块:深海装备数据" -- https://github.com/kcwikizh/kancolle-shinkai-db/tree/develop/lua -- Please contact us by github issue -- Wiki text is too long at one line, use table.insert/table.concat to wrap it. -- \z is supported after lua 5.2,...
kcwikizh/kancolle-shinkai-db
lua/equips_method2.lua
Lua
mit
19,368
-- function distance_manhattan(x1,y1,x2,y2) --TODO let's not leave this global -- manhattan is sufficient for now return math.abs(x1-x2)+math.abs(y1-y2) end function distance_euclid(x1,y1,x2,y2) local x = x1-x2 local y = y1-y2 return math.sqrt(x*x+y*y) end love.turris.drawMessage = function(x1,x2,y1,rectX1,text...
sam1i/Turres-Monacorum
love2d/util.lua
Lua
mit
658
local __exports = LibStub:NewLibrary("ovale/simulationcraft/parser", 80300) if not __exports then return end local __class = LibStub:GetLibrary("tslib").newClass local __Lexer = LibStub:GetLibrary("ovale/Lexer") local OvaleLexer = __Lexer.OvaleLexer local tostring = tostring local tonumber = tonumber local ipairs = ipa...
Xeltor/ovale
dist/simulationcraft/parser.lua
Lua
mit
18,675
AddCSLuaFile() ENT.Base = "npc_nb_base" // Moddable ENT.AttackAnims = { "attackB", "attackD", "attackE", "attackF", "swatleftmid", "swatrightmid" } ENT.AnimSpeed = 1.2 ENT.AttackTime = 0.5 ENT.MeleeDistance = 64 ENT.BreakableDistance = 96 ENT.Damage = 60 ENT.BaseHealth = 200 ENT.MoveSpeed = 50 ENT.MoveAnim = ACT_WA...
unusualcrow/redead_reloaded
entities/entities/npc_nb_contagion/shared.lua
Lua
mit
2,583
-- grey-new, awesome3 theme, by Andreas Persson (greyscale, grey) --{{{ 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 .. "/icon...
mikar/awesome34-themes
grey-new/theme.lua
Lua
mit
5,458
-- Copyright (c) 2011 by Robert G. Jakabosky <bobby@neoawareness.com> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to ...
terminar/lua-handlers
handler/http/server/hconnection.lua
Lua
mit
14,754
local alpha = require'alpha' local dashboard = require'alpha.themes.dashboard' dashboard.section.header.val = { [[███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗]], [[████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║]], [[██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║]], [[██║╚██╗██║ ██╔══╝...
KenPowers/dotfiles
home/config/nvim/lua/plugins/alpha.lua
Lua
mit
1,672
----------------------------------------------- -- item.lua -- The code for an object, when it in the players inventory. -- Created by HazardousPeach and NimbusBP1729 ----------------------------------------------- local GS = require 'vendor/gamestate' local Weapon = require 'nodes/weapon' local Item = {} Item.__index...
hawkthorne/hawkthorne-server-lua
src/items/item.lua
Lua
mit
3,602
require "ezdb" local engine = {database = ezdb.create(fw.config.sql)} function engine.database:onConnected() fw.print("Connected to the database") self:create("fw_playerdata") :create("id", "INTEGER NOT NULL AUTO_INCREMENT") :create("steamid", "VARCHAR(255) UNIQUE NOT NULL") :create("money", "INTEGER NOT NUL...
KragleStudios/gmFactionWars
gamemode/libraries/data/engine_sql_sv.lua
Lua
mit
1,357
if not file.Exists( "weapons/csgo_baseknife.lua", "LUA" ) then SWEP.Spawnable = false print( "csgo_gut_freehand failed to initialize: csgo_baseknife.lua not found. Did you install the main part?" ) return end local TTT = ( GAMEMODE_NAME == "terrortown" or cvars.Bool("csgo_knives_force_ttt", false) ) DEFINE_BASE...
xDShot/csgo_knives_sweps
lua/weapons/csgo_gut_freehand.lua
Lua
mit
2,408
print("running") local QUALITY = 1.0 -- TODO: Find a way to modify the quality in realtime. local function SourceUnit2Inches( x ) return x * 0.75 end local function Inches2SourceUnits( x ) return x / 0.75 end local DOF_LENGTH = 512 local DOF_LAYERS = math.ceil((ScrH()*QUALITY)/50) local MAX_FOCAL_LENGTH = 1024*...
raubana/AttackOfTheMimics
gamemodes/attack_of_the_mimics/gamemode/cl_dof.lua
Lua
mit
7,704
--[[ KahLua KonferSK - a suicide kings loot distribution addon. WWW: http://kahluamod.com/ksk Git: https://github.com/kahluamods/konfersk IRC: #KahLua on irc.freenode.net E-mail: me@cruciformer.com Please refer to the file LICENSE.txt for the Apache License, Version 2.0. Copyright 2008-20...
kahluamods/konfersk
KSK-Lists.lua
Lua
apache-2.0
69,148
--!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/require/install.lua
Lua
apache-2.0
5,236
exports.name = "creationix/coro-http" exports.version = "1.1.0-1" exports.dependencies = { "creationix/coro-net@1.1.1", "creationix/coro-tls@1.2.0", "creationix/coro-wrapper@1.0.0", "luvit/http-codec@1.0.0" } exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-http.lua" exports.description = ...
DBarney/lit
deps/coro-http.lua
Lua
apache-2.0
4,230
-- Engine Configuration File engine_config.lua --- This file holds all configuration that is not set by the developer, such as -- resolution, framerate, savegame directory SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 MAXIMUM_FRAMERATE = 60
team-code/deucalion
deucalion-rs/data/engine_config.lua
Lua
apache-2.0
236
function damage( events ) local attacker_damage = events.caster:GetAttackDamage() local found_units = Entities:FindAllInSphere(events.target:GetAbsOrigin(), 200.0) --PrintTable(found_units) for number,target in pairs(found_units) do if (target.IsHero and target:IsHero()) or (target.IsCreature and target:I...
tmbr54/Kingmaker
game/dota_addons/castle_wars/scripts/vscripts/units/mortar_damage.lua
Lua
apache-2.0
1,560
local storyboard = require( "storyboard" ) local scene = storyboard.newScene() local widget = require 'widget' local otherSoundEffect = require 'gameLogic.otherSoundEffect' -- local forward references local currentPage local currentRank local lastScore local numberOfPages local rankTable local beginX, endX local fon...
dyhpoon/Attack-on-Pirates
AttackOnPirates/leaderboard-scene.lua
Lua
apache-2.0
14,373
--------------------------------------------------------------------------------------------------- -- Issue: https://github.com/SmartDeviceLink/sdl_core/issues/885 --------------------------------------------------------------------------------------------------- -- Description: Check that SDL stops processing softBut...
smartdevicelink/sdl_atf_test_scripts
test_scripts/Defects/7_1/885_ShowConstantTBT.lua
Lua
bsd-3-clause
3,516
local LL = LibStub('LibLuminary', 1) if (not LL) then return end Alchemist = { version = '165.1', listview = {} } local function on_start_crafting(event_type, crafting_type) if crafting_type == CRAFTING_TYPE_ALCHEMY then Alchemist.listview.control:SetHidden(false) Alch...
williamrussellajb/ESOPublicAddons
Alchemist/Alchemist.lua
Lua
bsd-3-clause
4,007
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0216-widget-support.md -- -- Description: Check app is able to successfully create Primary widget with -- "duplicateUpdatesFromWindowID"...
smartdevicelink/sdl_atf_test_scripts
test_scripts/WidgetSupport/Show/007_Show_RPC_to_Main_Window_Primary_Widget_with_DuplicateID_For_Main_Window.lua
Lua
bsd-3-clause
2,432
-- ####################################### -- ## Project: MTA iLife ## -- ## Name: OfflineMSGManager.lua ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ####################################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local...
Pandafuchs/iLife
server/Manager/Util/cOfflineMSGManager.lua
Lua
mit
2,944
local spec_helper = require "spec.spec_helpers" local http_client = require "kong.tools.http_client" local PROXY_URL = spec_helper.PROXY_URL local SLEEP_VALUE = "0.5" local function wait() -- Wait til the beginning of a new second before starting the test -- to avoid ending up in an edge case when the second is a...
ejoncas/kong
spec/plugins/response-ratelimiting/access_spec.lua
Lua
apache-2.0
7,635
function CreatEnumTable(tbl, index) local enumtbl = {} local enumindex = index or 0 for i, v in ipairs(tbl) do enumtbl[v] = enumindex + i end return enumtbl end ObjectEvent = { "COE_CREATE_NODATA", "COE_CREATE_BEFORE_ATTACHDATA", "COE_CREATE_LOADDATA", "COE_CREATE_AFT...
ketoo/NoahGameFrame
_Out/NFDataCfg/ScriptModule/NFScriptEnum.lua
Lua
apache-2.0
1,052
--[[ Copyright (c) 2015, Robert 'Bobby' Zenz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
RobertZenz/minetest-australopithecus-artisanry
mods/artisanry/artisanryutil.lua
Lua
bsd-2-clause
3,452
require 'dp' --[[command line arguments]]-- cmd = torch.CmdLine() cmd:text() cmd:text('Facial Keypoint detector using Convolution Neural Network Training/Optimization') cmd:text('Example:') cmd:text('$> th facialkeypointdetector.lua --batchSize 128 --momentum 0.5') cmd:text('Options:') cmd:option('--learningRate', 0.1...
fiskio/dp
examples/facialkeypointdetector.lua
Lua
bsd-3-clause
7,933
//=============================================================================// // ___ ___ _ _ _ __ _ ___ ___ __ __ // |_ _|| __| / \ | \_/ | / _| / \ | o \ o \\ V / // | | | _| | o || \_/ | ( |_n| o || / / \ / // |_| |___||_n_||_| |_| \__/|_n_||_|\\_|\\ |_| 2007 // //=============...
cardentity/DarkRP
gamemode/modules/fadmin/fadmin/changelevel/cl_startgame.lua
Lua
mit
2,398
require 'torch' require 'nn' require 'image' require 'densecap.DenseCapModel' local utils = require 'densecap.utils' local box_utils = require 'densecap.box_utils' local vis_utils = require 'densecap.vis_utils' --[[ Run a trained DenseCap model on images. The inputs can be any one of: - a single image: use the flag...
rollasoul/HaikuDenseCap
run_model.lua
Lua
mit
6,531
--IupTuio Example in Lua require( "iuplua" ) require( "iupluatuio" ) cv = iup.canvas {size="300x100", xmin=0, xmax=99, posx=0, dx=10} dg = iup.dialog{iup.frame{cv}; title="IupCanvas"} tuio = iup.tuioclient{} function cv:motion_cb(x, y, r) --print(x, y, r) end function cv:touch_cb(id, x, y, status) prin...
ivanceras/iup-mirror
html/examples/Lua/tuio.lua
Lua
mit
479
local ffi = require("ffi") local xf86drmMode = require("xf86drmMode_ffi") local DRMCardMode = require("DRMCardMode") local DRMEncoder = require("DRMEncoder") -- list of types of connectors local ConnectorType = { [0] = "Unknown"; [1] = "VGA"; [2] = "DVII"; [3] = "DVID"; [4] = "DVIA"; [5] = "Composite"; ...
LuaDist2/llui
src/DRMCardConnector.lua
Lua
mit
3,734
--[[ LuCI - Lua Configuration Interface Copyright 2010 Jo-Philipp Wich <xm@subsignal.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$ ]]-- lo...
deepak78/luci
applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua
Lua
apache-2.0
2,640
-- This script can be used to make sure that the christmas tree does not run out of water -- You'll need a water sensor such as the Philio PAT02 and a switch for the lights in the christmas tree -- Define your devices and settings here: local christmas_tree = "Julgran" -- Name of the christmas tree local water_sensor ...
telldus/tellstick-lua-examples
basics/ChristmasTree.lua
Lua
mit
1,110
--[[ Author: Yahnich Date: 28.03.2017 ]] CreateEmptyTalents('juggernaut') -- JUGGERNAUT SPECIFIC UTILITY FUNCTIONS -- function IsTotem(unit) -- have to do it like this because server and client side classes are different thanks valve return ( not unit:HasMovementCapability() ) end -- BLADE FURY -- imba_juggernaut_...
DiNaSoR/Angel_Arena
game/angel_arena/scripts/vscripts/hero/hero_juggernaut.lua
Lua
mit
35,582
--$Name: Волк, коза и якудза.$ --$Version: 0.1$ instead_version "1.8.1"; require "xact" require "para" require "dash" -- если для объекта не прописана реакция, то реагировать будем так: game.act = "Ничего не произошло."; -- если нажали на объект на сцене game.inv = "И откуда это у меня?"; -- если применили объект и...
instead-hub/plainstead
build/games/wolf_goat_yakuza/main.lua
Lua
mit
14,617
-- Copyright (c) 2012 Roland Yonaba --[[ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
Yonaba/SOR
SOR.lua
Lua
mit
5,215
local size = 1; -- pixel scale local scale = size / 0.8 + 0.8; -- Based on a default scale of 1 = 10 local yScale = 0.8; local center = {x = ScrW() / 2, y = ScrH() / 2}; local shouldDrawCenter = true; local crosshairEnabled = CreateClientConVar("cl_crosshair", "1", true, false); resource.AddFile("materials/vg...
Pugsworth/GarrysMod-Code
Puggles Various Scripts/lua/autorun/client/crosshair.lua
Lua
mit
2,143
-- Tests/examples helpers local gendir = "%{wks.location}/gen" local supportdir = path.getabsolute("../support") local catchdir = path.getabsolute("../catch") function SetupTestProject(name, extraFiles) SetupTestGeneratorProject(name) SetupTestNativeProject(name) SetupTestProjectsCSharp(name, nil, extraFiles)...
tritao/MonoManagedToNative
build/Tests.lua
Lua
mit
3,891
-- Senick is trying to find the elusive Burleous Majoris! -- But he doesn't know how big a Burleous Majoris would be... -- Find the average size of this burl population to use as a baseline! -- This function returns average size of all the burls in an array. local function averageSize(burls) local sum = sumSize(bu...
nikai3d/codecombat-scripts
mountain/the-hunt-begins.lua
Lua
mit
819
ITEM.name = "Pistol" ITEM.model = "models/weapons/w_pistol.mdl"
ShiniXi/dogslol
gamemode/items/weapons/pistol.lua
Lua
mit
64
local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) set_profile_photo(file, ok_cb, false) send_large_msg(rec...
MEHRDAD1370/Quick-Bot
plugins/admin.lua
Lua
mit
10,626
local activeScreen = require("ext.screen").activeScreen local table = require('ext.table') local hhtwm = require('hhtwm') local log = hs.logger.new('wm', 'debug') local cache = { hhtwm = hhtwm } local module = { cache = cache } local IMAGE_PATH = os.getenv('HOME') .. '/.hammerspo...
szymonkaliski/Dotfiles
Dotfiles/hammerspoon/utils/wm/init.lua
Lua
mit
4,740
function randomNumber(max) math.randomseed(os.time()) rnd = math.random() return math.random(max) end print "Guess a number" number = randomNumber(100) count = 0 while true do print("What is the number you propose ?") answer = io.read("*n") count = count + 1 print("Your answer is : " .. a...
TGITS/programming-workouts
lua/basic/GuessNumber2.lua
Lua
mit
661
print ("1-Wire Read Ram ID") SensPinNum = 14 -- EIO6 aka 14 --Configure T7's 1-Wire Functionality: --Pins MB.W(5300, 0, SensPinNum) --DQ MB.W(5301, 0, 0) --DPU --Options MB.W(5302, 0, 0) --Options MB.W(5307, 0, 240) --Search Function MB.W(5308, 0, 0) --Num Bytes Tx MB.W(5309, 0, 0) --Num Bytes Rx MB...
Samnsparky/ljswitchboard
switchboard_modules/lua_script_debugger/premade_scripts/oldScripts/1-Wire Read Ram ID.lua
Lua
mit
699
local L = Apollo.GetPackage("Gemini:Locale-1.0").tPackage:NewLocale("Prestige", "frFR") if not L then return end L["P_HAVE"] = "Vous possédez" L["P_BAGS"] = "sac(s)" L["P_STOCK"] = "en stock." L["P_DETAIL"] = "pour le détail" L["P_IN"] = "dans" L["P_BAG"] = Apollo.GetStrin...
scscgit/scsc_wildstar_addons
Prestige/locale/frFR.lua
Lua
mit
546
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv() local hooked = false local function ShowFinish(text, subtext) local levelUpTexCoords = { gLine = { 0.00195313, 0.81835938, 0.00195313, 0.015...
ViolyS/RayUI_VS
Interface/AddOns/RayUI/core/install.lua
Lua
mit
6,031
-- Let's train your pet a little. -- This function makes a pet run around. local function runAround(event) while true do -- First, move to the left mark: pet:moveXY(9, 24) -- Next, the top mark: pet:moveXY(30, 43) -- Move your pet to the right mark: pet:moveXY(51, 24)...
nikai3d/codecombat-scripts
forest/forest-jogging.lua
Lua
mit
723
--!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/modules/detect/tools/sdcc/has_flags.lua
Lua
apache-2.0
3,798
require("scene.lua"); require("utils.lua"); require("gui.lua"); require("firecast.lua"); local WINDOW_CATEGORY = 'windowTool'; ---------- Ferramentas de Camadas SceneLib.registerPlugin( function (scene, attachment) scene.viewport:setupToolCategory(WINDOW_CATEGORY, lang("scene.windowTool.categoryTitle"), 15);...
rrpgfirecast/firecast
Plugins/Core/sceneinlua/rrpgScene_WindowTools.lua
Lua
apache-2.0
3,838
-------------------------------- -- @module SkewFrame -- @extend Frame -- @parent_module ccs -------------------------------- -- -- @function [parent=#SkewFrame] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- -- -- @function [parent=...
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua
Lua
apache-2.0
1,540
-- SatA print("SatA startup__6") shell.run("gps", "host", 0, 255, -3)
gmalmquist/turtling
src/startup__6.lua
Lua
apache-2.0
71
-- -- Name: codelite/codelite.lua -- Purpose: Define the CodeLite action(s). -- Author: Ryan Pusztai -- Modified by: Andrea Zanellato -- Andrew Gough -- Manu Evans -- Created: 2013/05/06 -- Copyright: (c) 2008-2015 Jason Perkins and the Premake project -- local p = prem...
bravnsgaard/premake-core
modules/codelite/codelite.lua
Lua
bsd-3-clause
1,771
--------------------------------------------------------------- -- -- Name: Ward Tracker -- Version: 0.1 [Alpha] -- Author: Tiritto -- -- Thread link: http://gamingonsteroids.com/topic/4449-/ -- GitHub link: https://github.com/tiritto/GamingOnSteroids/blob/master/unminified/wardTracker.lua -- ------------------------...
tiritto/GamingOnSteroids
unminified/wardTracker.lua
Lua
bsd-3-clause
7,994
-- For now, this will just be a test harness. -- Eventually, this should be the daemon process & accept command line args -- for configuration like beanstalkd/memcached do. require("solidrocket/database") require("solidrocket/bucket") print("Testing Lua API...") db = Database('/var/solidrocket/', 'test') bucket = Buc...
toastdriven/solidrocket
solidrocket/daemon.lua
Lua
bsd-3-clause
413
-- lua-npge, Nucleotide PanGenome explorer (Lua module) -- Copyright (C) 2014-2016 Boris Nagaev -- See the LICENSE file for terms of use. return function(block) local Block = require 'npge.model.Block' return Block(block:fragments()) end
starius/lua-npge
src/npge/block/alignLeft.lua
Lua
mit
247
Macro { area="Shell"; key="Alt"; description="Use Alt for search by name (activate)"; action = function() Keys('Alt<') end; } Macro { area="Search"; key="Alt"; description="Use Alt for search by name (deactivate)"; action = function() Keys('Esc') end; }
data-man/FarAS
extra/Addons/Macros/AltSearch.lua
Lua
bsd-3-clause
263
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- base object local newobject = loveframes.NewObject("base", "loveframes_object_base") --[[-------------------------------...
D-m-L/evonara
modules/libs/Peep/LoveFrames/objects/base.lua
Lua
mit
27,253
module("luci.controller.olsr6", package.seeall) function index() if not nixio.fs.access("/etc/config/olsrd6") then return end require("luci.model.uci") local uci = luci.model.uci.cursor_state() local ol = entry( {"admin", "services", "olsrd6"}, cbi("olsr/olsrd6"), "OLSR IPv6" ) ol.subindex = true ol.ac...
tobiaswaldvogel/luci
applications/luci-app-olsr/luasrc/controller/olsr6.lua
Lua
apache-2.0
1,017