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 ScaleTo -- @extend ActionInterval -------------------------------- -- overload function: create(float, float, float) -- -- overload function: create(float, float) -- -- overload function: create(float, float, float, float) -- -- @function [pare...
cedricporter/everlost
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua
Lua
apache-2.0
1,073
-------------------------------- -- @module FadeTo -- @extend ActionInterval -------------------------------- -- @function [parent=#FadeTo] create -- @param self -- @param #float float -- @param #unsigned char char -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- -- @f...
cedricporter/everlost
frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/FadeTo.lua
Lua
apache-2.0
839
--[[----------------------------------------------------------------------------- TreeGroup Container Container that uses a tree control to switch between groups. -------------------------------------------------------------------------------]] local Type, Version = "TreeGroup", 37 local AceGUI = LibStub and LibStub("A...
voydz/vektor
libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
Lua
mit
19,813
-- -- tests/actions/vstudio/sln2005/test_header.lua -- Validate generation of Visual Studio 2005+ solution header. -- Copyright (c) 2009-2014 Jason Perkins and the Premake project -- local suite = test.declare("vstudio_sln2005_header") local sln2005 = premake.vstudio.sln2005 -- -- Setup -- local wks, prj funct...
PlexChat/premake-core
tests/actions/vstudio/sln2005/test_header.lua
Lua
bsd-3-clause
1,350
return { ["Application Name"] = nil, ["Application Description"] = nil, }
xboot/xboot
src/framework/romdisk/application/dragme/assets/i18n/zh-TW.lua
Lua
mit
76
require('ds3231') port = 80 -- ESP-01 GPIO Mapping gpio0, gpio2 = 3, 4 days = { [1] = "Sunday", [2] = "Monday", [3] = "Tuesday", [4] = "Wednesday", [5] = "Thursday", [6] = "Friday", [7] = "Saturday" } months = { [1] = "January", [2] = "Febuary", [3] = "March", [4] = "Apri...
gentooliano/nodemcu-firmware
nodemcu_0.9.6-dev/nodemcu-firmware-0.9.6-dev_20150704/lua_modules/ds3231/ds3231-web.lua
Lua
mit
1,338
-- The default player data when using /data SCHEMA.defaultData = [[ -----------------------Боевые навыки---------------------- Топоры и молоты - Луки и арбалеты - Длинные мечи - Короткие мечи - Щиты - Кулачный бой - Легкая броня - Средняя броня - Тяжелая броня - ----------------------Небоевые навыки----------...
xAleXXX007x/Witcher-RolePlay
witcherrp/schema/sh_config.lua
Lua
mit
817
-- lua/autorun/libpack.lua -- ============================================================================= -- >>> CLIENTSIDE DECLARATIONS -- ============================================================================= AddCSLuaFile("includes/modules/libpack.lua") AddCSLuaFile("includes/modules/libpack.format.lua")
MiBShidobu/libpack
src/lua/autorun/libpack.lua
Lua
mit
317
box.cfg{ listen = 3301, logger = 'tnt.log', snap_dir = 'snap', wal_dir = 'wal', } package.path = package.path .. ';./api/?.lua' local init = require("init_common") init()
alexeyknyshev/android_cash_points
server/tnt_workdir/init.lua
Lua
mit
190
local Command = require 'Command' local Log = require 'Log' local Module = require 'Module' local Package = require 'Package' local Rule = require 'Rule' local System = require 'System' local Target = require 'Target' local format = string.format local Engine = {} local ProcessingEnv = {} function E...
bazurbat/jagen
src/Engine.lua
Lua
mit
8,621
-- Busted command-line runner local path = require 'pl.path' local term = require 'term' local utils = require 'busted.utils' local osexit = require 'busted.compatibility'.osexit local loaded = false return function(options) if loaded then return else loaded = true end local options = options or {} options.def...
nehz/busted
busted/runner.lua
Lua
mit
5,182
local levels = {} function curr_level() return levels[#levels] or 0 end function Header(elem) while elem.level < curr_level() do table.remove(levels) end if elem.level > curr_level() then table.insert(levels, elem.level) end elem.level = #levels return elem end
davidar/peruse
pandoc-a11y.lua
Lua
mit
286
local storyboard = require("storyboard") local widget = require("widget") local scene = storyboard.newScene() local external = require("external") function scene:willEnterScene( event ) local group = self.view storyboard.removeAll() end function scene:createScene( event ) local screenGroup = self.view ...
ichiinisanshi/Learning-with-Penny-the-Pony
refresh.lua
Lua
mit
665
local exports = {} exports.name = "creationix/mime" exports.version = "0.1.2-1" exports.description = "A simple mime type database useful for serving static files over http." exports.tags = {"mime", "static"} exports.license = "MIT" exports.author = { name = "Tim Caswell" } exports.homepage = "https://github.com/creati...
creationix/luv-mime
init.lua
Lua
mit
5,671
--[[ GuiLib Provides library to manipulate GUIs through scripting interface ]] local GuiLib = {}; -- only load if local if not game.Players:FindFirstChild('LocalPlayer') then _G.print( _G.Enum.LOG.WARN, 'Attempt to load GuiLib on server.' ); return {}; end local guiRoot = Instance.new('ScreenGui'); guiRoot...
bowtiemod/shoot
framework/utils/GuiLib.mod.lua
Lua
mit
573
--------------------------------------------------------------------------------------------------- -- -= Map =- --------------------------------------------------------------------------------------------------- -- Setup -- Import the other classes TILED_LOADER_PATH = TILED_LOADER_PATH or ({...})[1]:gsub("[%.\\/][Mm]...
etienne-gauvin/projet-tut
core/libs/atl/Map.lua
Lua
mit
16,235
/*--------------------------------------------------------------------------- Creator: TheCodingBeast - TheCodingBeast.com This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-n...
ArcadiaGamingNetwork/AGC-DarkRP-Configuration
lua/darkrp_modules/tcb_f4menu/cl_panel_commands.lua
Lua
mit
6,515
local ffi = require("ffi") local libln = ffi.load("linenoise") ffi.cdef([[ void free(void *p); typedef void(linenoiseCompletionCallback)(const char *, void *); void linenoiseSetCompletionCallback(linenoiseCompletionCallback *); void linenoiseAddCompletion(void *, char *); char *linenoise(const char *prompt); int linen...
enotodden/luajit-linenoise
linenoise.lua
Lua
mit
1,784
--[[ * @author PureMVC LUA Native Port by Ravior * @author Copyright(c) 2006-2012 Futurescale, Inc., Some rights reserved. * * @class puremvc.Controller * * In PureMVC, the Controller class follows the 'Command and Controller' * strategy, and assumes these responsibilities: * * - Remembering which * {@link puremvc...
Ravior/puremvc-lua-framework
src/org/puremvc/lua/multicore/core/Controller.lua
Lua
mit
5,633
--[[ 3p8_ow_edgewood Uses: overworld representation of the village of edgewood File Theme: Trouble - Where I'm From (Edgewood) https://www.youtube.com/watch?v=AHQ3ZiQ96Jc Todo: details in the init do the same to blacklabs... make a base city? add position to GLOBAL_towns in 3p8 ]...
ArcboundWorker/microcosm
gamemodes/microcosm/entities/wip/time out folder/3p8_ow_edgewood.lua
Lua
mit
1,190
-- Global Game Jam 2016 debug = false require "text" require "manual" local inventory = require "inventory" require "patient" require "cauldron" require "math" require "game" gameStart = false startButton = { x = 315, y = 215, w = 175, h = 50, text = "Start", drawBackground = false } function love.load...
kickinrad/healerhealer
main.lua
Lua
mit
3,491
require 'lstm' node = lstm.InvertIndex(4) -- Test forward indexes = torch.LongTensor{1,4,2} res = node:forward(indexes) if res:eq(torch.Tensor{1,1,0,1}):sum() ~= 4 then error("inverting didn't get expected response") end -- Test backward node:backward(indexes, torch.Tensor{1,2,3,4}) if node.gradInput:dim() ~= ...
kbullaughey/lstm-play
toys/invert_index/invert_index_test.lua
Lua
mit
667
require 'copas' local http = require 'socket.http' local lfs = require 'lfs' local function ensureDir(path) local part, index = path:match("([/\\]?[^/\\]+[/\\])()") local subPath = "" while part do subPath = subPath .. part lfs.mkdir(subPath) part, index = path:match("([^/\\]+[/\\])()", index) e...
williamwilling/braneplug
src/braneplug.lua
Lua
mit
5,166
require('ISUI/ISPanel'); require('ISUI/ISRichTextPanel'); require('ISUI/ISCollapsableWindow'); UIStoryPanel = {}; function UIStoryPanel.new(title, text) local self = {}; self.richtext = ISRichTextPanel:new(0, 0, 500, 500); self.richtext:initialise(); self.richtext:setAnchorBottom(true); self.richt...
rm-code/muldraugh-tales
media/lua/client/ui/UIStoryPanel.lua
Lua
mit
1,023
local function include(name, env) local cfg, err = assert(loadfile(name, "t", env)) if _G.setfenv then setfenv(cfg, env) end cfg() return env end return function(name, env) local env, mt = env or {}, getmetatable(env) or { __index = {} } if type(mt.__index) == "table" and not mt.__inde...
fur-q/fulcrum
fulcrum/config.lua
Lua
mit
678
-- Ball local ball = {} ball.position_x = 200 ball.position_y = 500 ball.speed_x = 700 ball.speed_y = 700 ball.radius = 10 function ball.update( dt ) ball.position_x = ball.position_x + ball.speed_x * dt ball.position_y = ball.position_y + ball.speed_y * dt end function ball.draw() local segments_in_circl...
noooway/love2d_arkanoid_tutorial
1-A_LevelsAsStrings/main.lua
Lua
mit
10,488
INVOKER_RETRO_WEARABLE_MAGUS_APEX = 2 INVOKER_RETRO_WEARABLE_DARK_ARTISTRY_CAPE = 4 INVOKER_RETRO_WEARABLE_MAGUS_APEX_EXTRA = 8 INVOKER_RETRO_WEARABLE_DARK_ARTISTRY_CAPE_EXTRA = 16 local tNewAbilities = { "invoker_retro_quas", "invoker_retro_wex", "invoker_retro_exort", "invoker_retro_empty1", "invoker_retro_em...
tontyoutoure/DOTA2-AI-Fun
game/dota_addons/dota2_ai_fun/scripts/vscripts/heroes/hero_invoker/invoker_retro_init.lua
Lua
mit
11,651
local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi local gfs = require("gears.filesystem") local themes_path = gfs.get_themes_dir() local theme_name = "manta" local icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. them...
UnbounDev/dots
config/awesome/themes/manta/theme.lua
Lua
mit
14,000
modifier_old_holy_knight_purge_slow = class({}) function modifier_old_holy_knight_purge_slow:IsDebuff() return true end function modifier_old_holy_knight_purge_slow:IsPurgable() return true end function modifier_old_holy_knight_purge_slow:OnRefresh(keys) if IsClient() then return end local iSlowFactor = self:GetAbili...
tontyoutoure/DOTA2-AI-Fun
game/dota_addons/dota2_ai_fun/scripts/vscripts/heroes/old_holy_knight/old_holy_knight_modifiers.lua
Lua
mit
4,329
local cc = require "rules.cc" -- FIXME: Implicit dependency detection goes a bit overboard on this. Fix this -- once there is a way to override dependency detection. rule { inputs = glob { "VERSION", "src/version.h.in", }, task = {{"./scripts/version.py", "src/version.h.in", "src/version.h"...
jasonwhite/pepatch
BUILD.lua
Lua
mit
1,788
local rt_json = require("riritools.lua.json") local pairs = pairs local sub = string.sub local sfind = string.find local setmetatable = setmetatable local type = type local closest_key_name = function(targetString, list) local weights = {} local biggestWeight = -1 for _, value in pairs(list) do for i...
CodingKitsune/Riritools
riritools/lua/table_utils.lua
Lua
mit
7,049
-- # Example: -- The code to test is prefixed by at least four spaces and ">", -- and the expected answer is put below. -- Here, `return 1` is tested, and the result `1` is expected: -- > return 1 -- 1 -- Of course, other data types can be used, for instance: -- > return "a" -- "a" -- > return true -- ...
saucisson/lua-doccotest
example.lua
Lua
mit
1,465
return { version = "1.1", luaversion = "5.1", tiledversion = "2015-10-14", orientation = "orthogonal", renderorder = "right-down", width = 22, height = 22, tilewidth = 70, tileheight = 70, nextobjectid = 1, properties = {}, tilesets = { { name = "text-medium", firstgid = 1, ...
maxha651/NotZombies
map/pause_menu.lua
Lua
mit
3,385
local cjson = require "cjson" local cookie = require "cdn.cookie" local config = require "cdn.config" local log = require "cdn.log" local tostring, ipairs, pairs, type, tonumber, next, unpack = tostring, ipairs, pairs, type, tonumber, next, unpack local ngx_var = ngx.var local ngx_ctx = ngx.ctx loca...
millken/tengcdn
lualib/cdn/access.lua
Lua
mit
2,800
local entity = FindMetaTable("Entity") function entity:getHealth() return (ndoc.table.fwProps[self:EntIndex()] or {}).health end function entity:getMaxHealth() return (ndoc.table.fwProps[self:EntIndex()] or {}).maxhealth end if (SERVER) then ndoc.table.fwProps = {} function entity:setHealth(amt) ndoc.table.fw...
KragleStudios/gmFactionWars
gamemode/core/prop_health/phealth_sh.lua
Lua
mit
2,047
-- Adamax -- only for single worker -- Author: Minwei Feng (mfeng@us.ibm.com) require 'optim' function optim.adamaxsingle(opfunc, w, config, state) local config = config or {} local state = state or config local lr = config.lr local beta1 = config.beta1 local beta2 = config.beta2 local epsilon = config.eps...
sixin-zh/mpiT
BiCNN/optim-adamax-single.lua
Lua
apache-2.0
1,179
snowdunes_ = "Snow dunes" function snowdunes() p[[ Hills of snow roll for miles in every direction as a fierce blizzard rips at your skin. In this weather, visibility is near-zero. Which way should you go? ]] -- Let them go back to the hallway local choices = {"north"} choose(choices) end north_ = "He...
nathanaeljones/weaver-nodelua
default_universe/terra/icerealm/chasm.lua
Lua
apache-2.0
663
--!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/private/platform/check_arch.lua
Lua
apache-2.0
1,354
--[[--------------------------------------------------------------------------- Warmod Project Dev(s): x[N]ir, Hajt File: modules/commands/processor.lua Description: Command processor --]]--------------------------------------------------------------------------- -- Command List warmod.COMMANDS = {} -- Admins ...
codneutro/warmod
sys/lua/warmod/modules/commands/processor.lua
Lua
apache-2.0
2,937
--------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md -- Description: Registration of two mobile applications from different devices having differen...
smartdevicelink/sdl_atf_test_scripts
test_scripts/TheSameApp/Policies/NicknameValidation/009_ChangeReg_two_apps_with_same_appName_diff_appID_DIFF_devices_combinations_2.lua
Lua
bsd-3-clause
3,828
--[[-- Additions to the core package module. The module table returned by `std.package` also contains all of the entries from the core `package` table. An hygienic way to import this module, then, is simply to override core `package` locally: local package = require "std.package" @module std.package ]] l...
LuaDist2/stdlib
lib/std/package.lua
Lua
mit
6,974
BaseEntity = require("entities.core.baseentity") Text = class("Text", BaseEntity) function Text:initialize(x, y, w, h) BaseEntity.initialize(self) self.string = "" self.width = w self.height = h self.typing = false self.typeprogr = 0 self.nexttype = 0 end function Text:event_setstring(st...
qwook/dpsht
entities_/text.lua
Lua
mit
2,715
-- Car profile api_version = 4 Set = require('lib/set') Sequence = require('lib/sequence') Handlers = require("lib/way_handlers") Relations = require("lib/relations") find_access_tag = require("lib/access").find_access_tag limit = require("lib/maxspeed").limit Utils = require("lib/utils") Measure = require("lib/measu...
Project-OSRM/osrm-backend
profiles/car.lua
Lua
bsd-2-clause
14,073
FALL_VELOCITY = 0.9 -- how fast you have to be going (z) before you stop landing properly and just hit the ground MIN_GROUND_HEIGHT = 20 -- how high above the ground you need to be before parachuting will start local y_turn_offset = 20 -- limits how far to the sides the player will lean when turning left or right loca...
braydondavis/Nerd-Gaming-Public
resources/[no_ng_tag]/parachute/parachute_cl.lua
Lua
mit
10,736
require("tests/testsuite") Cmd.InsertStringIntoParagraph("paragraph one") Cmd.SplitCurrentParagraph() Cmd.InsertStringIntoParagraph("paragraph two") Cmd.SplitCurrentParagraph() Cmd.InsertStringIntoParagraph("paragraph three") AssertEquals(3, #Document) AssertEquals("P", Document[1].style.name) AssertEquals("P", Docum...
Munchotaur/wordgrinder
tests/change-paragraph-style.lua
Lua
mit
909
local Module = torch.class('nn.Module') function Module:__init() self.gradInput = torch.Tensor() self.output = torch.Tensor() end function Module:parameters() if self.weight and self.bias then return {self.weight, self.bias}, {self.gradWeight, self.gradBias} elseif self.weight then return {sel...
caldweln/nn
Module.lua
Lua
bsd-3-clause
10,649
--- Bitwise library --- Bitwise library -- @shared local bit_library, _ = SF.Libraries.Register( "bit" ) local bit = bit --- Arithmetic shift right -- @param value Value to be modified -- @param shiftCount Amounts of bits to shift -- @return Shifted value function bit_library.arshift ( value, shiftCount ) SF.CheckTy...
Xandaros/Starfall
lua/starfall/libs_sh/bit.lua
Lua
bsd-3-clause
3,358
module("tabwidget") name = "TabWidget" base = "Widget" funcs = [[ +Init() @ Count() (n int) @ CurrentIndex() (index int) @ CurrentWidget() (w IWidget) @ SetCurrentIndex(index int) @ SetCurrentWidget(w IWidget) AddTab(w IWidget, label string, icon *Icon) InsertTab(index int, w IWidget, label string, icon *Icon) Remove...
mickelfeng/go-qt5
make/ui/tabwidget.lua
Lua
bsd-2-clause
1,455
-- Vehicle example. -- This sample demonstrates: -- - Creating a heightmap terrain with collision -- - Constructing a physical vehicle with rigid bodies for the hull and the wheels, joined with constraints -- - Saving and loading the variables of a script object, including node & component references requi...
garage11/kaupunki
build/bin/Data/LuaScripts/46_RaycastVehicleDemo.lua
Lua
mit
17,493
local teamGUI function onShopInit ( tabPanel ) local GUIEditor teamTab = guiCreateTab("Teams", tabPanel) -- GUIEditor start -- GUIEditor = { gridlist = {}, tab = {}, tabpanel = {}, label = {} } GUIEditor.tabpanel[1] = guiCreateTabPanel(5, 5, 715, 414, false, teamTab) GUIEditor.tab[1] = guiCreateTab(...
AfuSensi/Mr.Green-MTA-Resources
resources/[gameplay]/gcshop/teams/teams_c.lua
Lua
mit
8,626
-- simple smark macro implementation return function (node) local f = assert(io.popen(node.text, "r")) local txt = assert(f:read"*a") f:close() return { type="pre", txt } end
bhk/tooltree
smark/smark_exec.lua
Lua
mit
188
-- -- Compat-5.1 -- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) -- According to Lua 5.1 -- $Id: compat-5.1.lua,v 1.22 2006-02-20 21:12:47 carregal Exp $ -- _COMPAT51 = "Compat-5.1 R5" local LUA_DIRSEP = '/' local LUA_PATH_MARK = '?' local LUA_IGMARK = ':' local assert, error, getfenv, ip...
MattiasBuelens/mcnet
lib/compat.lua
Lua
mit
4,790
return { id = 'pullover', name = 'Pullover', itemType = 'armor', slot = 'torso', armorRating = 1, damageResistance = 2 }
rm-code/sakuraba
res/data/items/armor/pullover.lua
Lua
mit
145
--[[ ########################################################## S V U I By: Munglunch ########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- --[[ GLOBALS ]]-- local _G = _G; local unpack = _G.unpack; local select ...
failcoder/SVUI_-Core
system/dropdown.lua
Lua
mit
7,595
--[[----------------------------------------------------------------------------- * Infected Wars, an open source Garry's Mod game-mode. * * Infected Wars is the work of multiple authors, * a full list can be found in CONTRIBUTORS.md. * For more information, visit https://github.com/JarnoVgr/InfectedWars * * Inf...
JarnoVgr/InfectedWars
entities/weapons/iw_famas/shared.lua
Lua
mit
2,037
function to_js_val(tbl) if type(tbl) ~= 'table' then return tbl -- it's probably fine as is end -- quick'n'dirty check if table is array-like if tbl[1] then local arr = js.global.lua_ffi:new_js_array() for i,v in ipairs(tbl) do js.global.lua_ffi:push_to_array(arr, to_js_val(v)) end return arr...
biggjoee2559/Factorio-Server
ffi.lua
Lua
mit
558
local ffi = require("ffi") local fun = require("fun") local floor = math.floor; -- a nil generator. -- good for cases when there's no data local function nil_gen(param, state) return nil end local function delim_gen(param, idx) local len = 0; while ((idx+len) < param.nelems) do --print("wchar: ", string...
Wiladams/LJIT2perfmon
testy/striter.lua
Lua
mit
2,387
-- Copyright (c) 2015 Francisco Zamora-Martinez (francisco.zamora@uch.ceu.es) -- -- 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 right...
ESAI-CEU-UCH/picudo-manual-supervision
scripts/PREPROCESS/view_filter.lua
Lua
mit
1,792
local BASE = {} function BASE:Initialize() -- Model List self.mList = vgui.Create( "DListView", self ) self.mList:SetMultiSelect( false ) self.mList:StretchToParent( 5, 30, 301, 5 ) self.mList:AddColumn( "Model" ) self.mList.OldOnClickLine = self.mList.OnClickLine self.mList.OnClickLine = functio...
MrGrim48/prop_hunt
gamemode/modules/player_prop/banned_props/cl_vgui_bannedprops.lua
Lua
mit
2,544
--========= Copyright © 2013-2015, Planimeter, All rights reserved. ==========-- -- -- Purpose: Close Dialog class -- --============================================================================-- class "closedialog" ( gui.frame ) function closedialog:closedialog( parent, name ) gui.frame.frame( self, parent, "Clo...
birdbrainswagtrain/grid-sdk
src/game/client/gui/closedialog.lua
Lua
mit
1,005
-- -- CommandlineMinify.lua -- -- A command line utility for minifying lua source code using the minifier. -- local util = require'Util' local Parser = require'ParseLua' local Format_Mini = require'FormatMini' local ParseLua = Parser.ParseLua local PrintTable = util.PrintTable local function splitFilename(name) tab...
stravant/LuaMinify
CommandLineMinify.lua
Lua
mit
2,670
local bucket = require 'bucket' local M = {} function M.hi(...) local res = bucket.vshard_call( {42}, 'read', 'app.mod1.hi', ...) return res end return M
moonlibs/tarantoolapp
templates/vshard/template/app/router/mod1.lua
Lua
mit
200
-- basic-flot.lua local flot = require 'script.lib.flot' local json = require 'script.lib.dkjson' local open_cmd -- this needs to stay outside the function, or it'll re-sniff every time... function open_url(url) if not open_cmd then if package.config:sub(1,1) == '\\' then -- windows open_cmd = f...
spitzfaust/algenhash
bin/script/plot.lua
Lua
mit
2,017
require "classes.constants.screen" require "classes.Soldier" FactorySoldier={} function FactorySoldier:new() local this = display.newGroup() local public = this local private = {} function private.FactorySoldier() end function public.createSoldier() return Soldier:new() end ...
sebastianlis/DesignPatterns-in-Lua-Using-CoronaSDK
FactoryMethod/SoldierFactoryMethod/classes/FactorySoldier.lua
Lua
mit
473
SCRIPT_TYPE = "CA" TAGS = { {0, "Dead"}, {1, "Alive"} } NEIGHBORS_POS = { {1, 0}, {-1, 0}, {0, 1}, {0, -1}, {1, 1}, {-1, -1}, {-1, 1}, {1, -1} } STATES_NUM = 2 alive = 1 dead = 0 function get_next_state (neighbors, state) local alive_neigh = 0 for i, neighbor in pairs(neighbors) do -- The ...
Piripant/aton
scripts/ca/seeds.lua
Lua
mit
626
local GuiMainMenu local CachedSelections = {} function SelectBadge( id, row ) local self = GuiMainMenu if not self then CachedSelections[ row ] = id return end if not self.dlcIcons[row] then return end for i = 1, #self.dlcIcons[row] do local dlcIcon = self.dlcIcons[row][i] if dlcIcon.id...
GhoulofGSG9/BadgesPlus
lua/Badges+_MainMenu.lua
Lua
mit
4,864
--[[ RA-MOD ]]-- local fs = require "nixio.fs" local running=(luci.sys.call("pidof gmediarender > /dev/null") == 0) if running then m = Map("gmediarender", translate("gmediarender"), translate("gmediarender is running")) else m = Map("gmediarender", translate("gmediarender"), translate("gmediarender is not running...
anyshaw/zd_openwrt_mod
luci/applications/luci-gmediarender/luasrc/model/cbi/gmediarender.lua
Lua
mit
1,014
local s = require("say") local ass = require("luassert") local function contains(container, contained) if container == contained then return true end local t1,t2 = type(container), type(contained) if t1 ~= t2 then return false end if t1 == 'table' then for k,v in pairs(contained) do if not contains(...
APItools/middleware
spec/assert_contains.lua
Lua
mit
783
return { version = "1.1", luaversion = "5.1", tiledversion = "0.17.2", orientation = "orthogonal", renderorder = "right-down", width = 32, height = 32, tilewidth = 16, tileheight = 16, nextobjectid = 1, properties = {}, tilesets = { { name = "The Eye of Cthulhu", firstgid = 1, ...
cromo/ludum-dare-37
assets/reality.lua
Lua
mit
6,304
-- The MIT License (MIT) -- Copyright © 2016 Pietro Ribeiro Pepe. -- 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, m...
LexLoki/LoveUIView
LoveUIView/View.lua
Lua
mit
6,480
--[[ Credits to HunterNL for this awesome websockets library. It has been slightly stripped down for this addon Check it out at https://github.com/HunterNL/Gmod-Websockets ]] if CLIENT then return end require( "bromsock" ); include("sha1.lua") local WS if not WS then WS = {} WS.__index = WS WS.Client = {} W...
Datamats/gm-discordlib
lua/discordlib/libs/websocket.lua
Lua
mit
26,631
local plyMeta = FindMetaTable("Player") FrenchRP.chatCommands = FrenchRP.chatCommands or {} local validChatCommand = { command = isstring, description = isstring, condition = fn.FOr{fn.Curry(fn.Eq, 2)(nil), isfunction}, delay = isnumber, tableArgs = fn.FOr{fn.Curry(fn.Eq, 2)(nil), isbool}, } local...
Sxcret/FrenchRP
gamemode/modules/chat/sh_chatcommands.lua
Lua
mit
3,655
-- Copyright (c) 2008 Mikael Lind -- -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use, -- copy, modify, merge, publis...
elemel/moonshine
src/Thing.lua
Lua
mit
1,532
-- inculdes local Prompt = require 'prompt' local Timer = require 'vendor/timer' local sound = require 'vendor/TEsound' local Gamestate = require 'vendor/gamestate' local sound = require 'vendor/TEsound' return { width = 48, height = 48, special_items = {'throwingtorch'}, animations = { defau...
10headless/hawkthorne-journey
src/npcs/blacksmith_wife.lua
Lua
mit
1,978
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 h...
alxhh/piratenluci
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
Lua
apache-2.0
2,027
local args = ngx.req.get_uri_args() local event = args["event"] local testKey = "___meteorit-test-key" if event == nil then ngx.log(ngx.ERR, "no event passed to test"); ngx.exit(ngx.HTTP_BAD_REQUEST) end local redis = require "resty.redis" local red = redis:new() red:set_timeout(1000) -- 1 sec local ok, err =...
danigiri/meteorit
meteorit-frontend-nginx/src/main/resources/conf/test-to-redis.lua
Lua
apache-2.0
1,127
if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end if ( CLIENT ) then SWEP.WepSelectIcon = surface.GetTextureID("HUD/killicons/DC15A") killicon.Add( "tfa_dc15a_expanded", "HUD/killicons/DC15A", Color( 255, 80, 0, 255 ) ) end SWEP.Base = "tfa_gun_base" SWEP.Category = "TFA Star Wars" --The category. Please, ju...
Servius/tfa-sw-weapons-repository
Live Addons/servius_uploader_legacy/tfa_swrp_expanded_weapons_pack/lua/weapons/tfa_dc15a_expanded/shared.lua
Lua
apache-2.0
8,829
--[[ 给词向量的表达加tf-idf author: liangjz time: 2015-01-19 mdifiy: 2016-2-3 2016-2-24 --]] -------------------- local Trans = torch.class('Trans4') function Trans: __init(useGPU) self.cfg = { --配置文件 vecs = nil, dict = nil, emd = nil, dim = deep_cqa.config.emd_dim, --词向量的维度 gpu = useGPU or false, --是否使用gpu模式 ...
liangjz92/deep_cqa
novel_model/trans4.lua
Lua
apache-2.0
10,694
if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end if ( CLIENT ) then SWEP.PrintName = "DC-15A [ Training Bling ]" SWEP.Author = "TFA" SWEP.ViewModelFOV = 50 SWEP.Slot = 2 SWEP.SlotPos = 3 SWEP.WepSelectIcon = surface.GetTextureID("HUD/killicons/DC15A") killicon.Add( "weapon_752_dc15a...
Servius/tfa-sw-weapons-repository
Live Addons/servius_uploader/[TFA][AT] Expanded Pack/lua/weapons/tfa_swch_dc15a_bling_training/shared.lua
Lua
apache-2.0
2,825
-- TODO: if caching (batch or single images) -- preprocessing ? -- resuhflle each epcoh? --convert grey to color --subtract mean before enter the network require 'nn' require 'image' local ffi = require 'ffi' require 'optim' require 'sys' require 'cudnn' require 'cunn' require 'paths' require 'torchx' loca...
ys1045097987/Face-Experiments
trainingl2.lua
Lua
apache-2.0
26,329
-- Actually these regular expressions were obtained from SpamAssassin project, so they are licensed by apache license: -- -- 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 copyr...
AlexeySa/rspamd
rules/regexp/headers.lua
Lua
bsd-2-clause
38,214
--------------------------------------------------------------------------------------------- -- CRQ: APPLINK-20918 [GENIVI] VR interface: SDL behavior in case HMI does not respond to -- IsReady_request or respond with "available" = false -- -- Requirement(s): APPLINK-25043 [VR Interface] VR.Is...
smartdevicelink/sdl_atf_test_scripts
test_scripts/API/IsReady/VR_IsReady/ATF_VR_IsReady_available_false_SplitRPC_GENERIC_ERROR.lua
Lua
bsd-3-clause
941
-- Tests: -- bulk() -- -- Setting up environment local _ENV = lunit.TEST_CASE "tests.integration.BulkTest" function test() local dataset_1 = util.subarr(dataset, 1, math.floor(#dataset/2)) local dataset_2 = util.subarr(dataset, math.floor(#dataset/2) + 1, #dataset) operations.bulkIndex(dataset_1) operatio...
DhavalKapil/elasticsearch-lua
tests/integration/BulkTest.lua
Lua
mit
793
#!/usr/bin/env lua -- -*- lua -*- -- Copyright 2012 Appwill Inc. -- Author : KDr2 -- -- -- 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 -...
appwilldev/moochine
luasrc/mch/controller.lua
Lua
apache-2.0
3,133
boilerfires3 = { down = { filename = "__5dim_energy__/graphics/icon/boiler-fire-down_3.png", priority = "extra-high", width = 11, height = 11, frame_count = 32, line_length = 8, shift = {0.03125, 0.28125} }, left = { filename = "__5dim_energy__...
McGuten/5DimsFactorioMods
Factorio 1.0/5dim_energy/prototypes/boilers-3.lua
Lua
mit
19,261
-- Simple IRC color table. --[[ The MIT License (MIT) Copyright (c) 2015 - 2016 Adrian Pistol 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 limitati...
carbonsrv/cobalt
libs/irccolors.lua
Lua
mit
1,715
require 'torch' require 'nn' require 'image' require 'optim' local loadcaffe_wrap = require 'loadcaffe_wrapper' -------------------------------------------------------------------------------- local cmd = torch.CmdLine() -- Basic options cmd:option('-style_image', 'examples/inputs/seated-nude.jpg', 'Styl...
jonatas/neural-style
neural_style.lua
Lua
mit
11,576
--[[ Label class By Phil Garner May 2017 ]]-- local Label = {} Label.__index = Label function Label:new(id, x, y, w, h, theme) local win = { props = { id = id ,resizable = false ,width = w ,height = h ,left = x ,top = y ...
philbgarner/SkinUI
lib/Label.lua
Lua
mit
4,036
--[[ Copyright (c) 2010-2013 Matthias Richter 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, dis...
unek/zombies
libraries/gamestate.lua
Lua
mit
2,949
local self = {} local ctor = GLib.MakeConstructor (self, GLib.Vector) function GLib.ColumnVector (h, ...) return ctor (1, h, ...) end function self:SetElementCount (elementCount) self.Height = elementCount end
Kamshak/LibK
lua/libk/3rdparty/glib/math/columnvector.lua
Lua
mit
213
function init(virtual) if not virtual then energy init() pipes.init({liquidPipe, itemPipe}) self.fuelValues = { uraniumrod=10, plutoniumrod=25, solariumrod=50 } self.waterCapacity = 5000 storage.waterLevel = storage.waterLevel or 0 self.waterConsumptionRate = 10 self.energyPerWater = ...
me4488/TechFoundry
placeholder files/nucleargenerator/nucleargenerator.lua
Lua
mit
633
local uv = {} local native = require 'couv_native' -- utility functions local function error0(err) if err then error(err, 2) end end local function error1(ret, err) if err then error(err, 2) end return ret end uv.Buffer = native.Buffer uv.Handle = native.Handle uv.Pipe = native.Pipe uv.Process = n...
hnakamur/couv
couv.lua
Lua
mit
4,209
function f2Pressed() newBuffer(getBufferName() .. " - command") print2("") print2("") print2("") print2("") print2("") print2([[do]]) print2([[ local name = getParentBufferName()]]) print2([[ closeBuffer()]]) print2([[ switchToBuffer(name)]]) print2([[end]]) edSetPosition(0) end function f3P...
createuniverses/praxis
prods/syntax2015/fnkeys.lua
Lua
mit
563
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "fadmin MOTD" ENT.Information = "Place this MOTD somewhere, freeze it and it will be saved automatically" ENT.Author = "FPtje" ENT.Spawnable = false function ENT:CanTool(ply, trace, tool) if ply:IsAdmin() and tool == "remover" then self.CanRemove = true...
aStonedPenguin/fprp
entities/entities/fadmin_motd/shared.lua
Lua
mit
628
print ("Hello from PrimaLuce - Animation!!!"); dog = plImage("res/sm.bmp"); pos = {}; pos.x = 0; pos.y = 0; v = 3.0; xt = v; yt = v; function plOnPulse() if (pos.x>300) then xt = -v; end if (pos.y>300) then yt = -v; end if (pos.x<0) then xt = v; end if (pos.x<0) then yt = v; end pos.x = pos.x...
vladpalos/PrimaLuce
samples/scripts/sample2.lua
Lua
mit
389
-- -- Corona Weather - A business style sample app -- -- MIT Licensed -- -- theme.lua a simple object to hold the colors and font definitions the app uses. -- As well as a funtion to change the colors as needed. -- Simple data bits for the colors and fonts -- Also provide a function to set the theme. local M = {} M...
coronalabs-samples/CoronaWeather
classes/theme.lua
Lua
mit
1,141
return require 'parse.char.ascii7.whitespace'^0
taxler/radish
lua/parse/match/ascii7/whitespace/optional.lua
Lua
mit
48
local $Node$ = class("$Node$", function() return display.newNode() end) function $Node$:ctor() $ctor$ end return $Node$
leitwolf/QuickXBuilder
assets/Node.lua
Lua
mit
127
local mod = DBM:NewMod(1234, "DBM-Party-WoD", 8, 559) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 15007 $"):sub(12, -3)) mod:SetCreatureID(77120) mod:SetEncounterID(1762) mod:SetZone() mod:RegisterCombat("combat") mod:RegisterEventsInCombat( "SPELL_CAST_SUCCESS 155673", "SPELL_AURA_APPLIED 15...
liruqi/bigfoot
Interface/AddOns/DBM-Party-WoD/UBRS/Zaela.lua
Lua
mit
2,794
-- Vars local breeds = K9Overhaul.Configs.Breeds local dog = K9.New() -- Menu Ready Listener RegisterNUICallback("k9_menu_ready", function() NUI.Fire("set_resource_name", { resource = GetCurrentResourceName() }) end) -- Base Menu Code local K9Menu = xMenu.New("K9") -- Basic Actions local K9Basic = K9Menu:BindSubMe...
xander1998/k9
client/client.lua
Lua
mit
1,605