content
stringlengths
5
1.05M
local st = require "util.stanza"; local pubsub = module:depends"pubsub"; local actor = module.host .. "/modules/" .. module.name; local pubsub_xmlns = "http://jabber.org/protocol/pubsub" local node = module:get_option_string(module.name .. "_node", "stats"); local function publish_stats(stats, stats_extra) local ...
AddCSLuaFile("cl_init.lua"); AddCSLuaFile("shared.lua"); include("shared.lua"); function ENT:Initialize() self:SetModel("models/props_lab/clipboard.mdl"); self:PhysicsInit(SOLID_VPHYSICS); self:SetMoveType(MOVETYPE_VPHYSICS); self:SetSolid(SOLID_VPHYSICS); self:SetUseType(SIMPLE_USE); local phys = self:GetPhys...
 local x,y = guiGetScreenSize() local pw,ph = 388, 388 local px,py = x/2-pw/2,y/2-ph/2 local tickk local price = 0 local endTime local angle = 0 local startTime local showingshop = false local row local carshow local Carwindow = { button = {}, gridlist = {}, window = {}, label = {} ...
local Audio = { effectScoreRed = love.audio.newSource("/Music/scoreRed.mp3", "static"), effectScoreBlue = love.audio.newSource("/Music/scoreBlue.mp3", "static"), effectHunterHook = love.audio.newSource("/Music/Hook.mp3", "static"), levelAudio = love.audio.newSource("/Music/Level.mp3"), menuAudio = love.audio....
return require('lib.stdlib.oop._generated._itempool')
local mytestlib=require("mytestlib") --指定包名称 --将包含C函数的代码生成库文件,如Linux的so,或Windows的DLL,同时拷贝到Lua代码所在的当前目录,或者是LUA_CPATH环境变量所指向的目录,以便于Lua解析器可以正确定位到他们 --比如Lua\5.1\clibs\",这里包含了所有Lua可调用的C库 --在调用时,必须是package.function print(mytestlib.add(1.0,2.0)) print(mytestlib.sub(20.1,19)) --编译命令为 --g++ -c step3_2.cpp --g++ -O2 -bundle -...
Talk(93, "听说六大派正要铲平光明顶消灭明教时,出现了一位少年英雄,打败了六大派,救了明教,此人真是了得.", "talkname93", 0); Talk(0, "不好意思,那个少年英雄就是我.", "talkname0", 1); Talk(93, "你?也不照照镜子看看.听说那位英雄身长十尺,虎背熊腰,力大无穷.你看看你,配吗?", "talkname93", 0); do return end;
--[[---------------------------------------------------- -- client script linker -- @author ZoLo -- @update 22/03/2010 ----------------------------------------------------]]-- function playSfxSound(...) local soundResource = getResourceFromName("sound") if(soundResource) then call(soundResource, "playSfxSound", .....
-- -*- coding: utf-8 -*- -- Documentation --- \fn whatOs() --- \brief Define operative system, on which script is runned --- \return 'win' or 'unix' --- \fn osSlash() --- \brief Define what slash is using in pathes on operative system, on which script is runned --- \return slash or backslash --- \fn ...
local sqlite3 = require("lsqlite3") local db = sqlite3.open("karma.sqlite3") local block_addmarma = false local block_getkarma = false db:exec[[ CREATE TABLE karma ( id INTEGER PRIMARY KEY, name TEXT, amount INTEGER ); ]] local function lsqlite_exec(query) local status = db:exec(query) if status ~= 0 then ...
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local Roact = require(Modules.Packages.Roact) local UIBlox = require(Modules.Packages.UIBlox) local t = require(Modules.Packages.t) local ArrowNav = require(Modules.AvatarExperience.Common.Components.NavBar.ArrowNav) local Con...
local class = require('opus.class') local UI = require('opus.ui') local Util = require('opus.util') local colors = _G.colors UI.Chooser = class(UI.Window) UI.Chooser.defaults = { UIElement = 'Chooser', choices = { }, nochoice = 'Select', backgroundFocusColor = colors.lightGray, textInactiveColor = colors.gra...
require 'class' require 'paths' require 'mattorch' local json = require 'lunajson' require 'net.util' local Data = torch.class('Data') function Data:__init(fileDir, listFile, meanFile, listType, inputSize, inputCh, labelSize, dataSize, dataCh, ch, useCuda) self.seqList = self:getSeq(fileDir, listFile, listType...
data:extend{ { type = "mouse-cursor", name = "tl-tool-cursor", filename = "__Tapeline__/graphics/cursor/draw-cursor.png", hot_pixel_x = 1, hot_pixel_y = 1 } }
----------------------------------------- -- Spell: Esuna -- ----------------------------------------- require("scripts/globals/status") require("scripts/globals/magic") require("scripts/globals/msg") ----------------------------------------- function onMagicCastingCheck(caster, target, spell) return 0 end functi...
--#region initiative-hud local _defaults = { color = { ally = "#66ba6b", neutral = "#d5d165", player = "#7e7dbb", enemy = "#BD5365", lair = "#D2D186", epic = "#B38CFF" }, players = { "Zora", "Amber", "Edwin", "Gilkan", "...
require("iuplua") data = {} lastId = 0 function crud_create(surname, name) local item = {} lastId = lastId + 1 item.name = name item.surname = surname item.id = lastId data[item.id] = item return lastId end function crud_read(nextId) local n, v = next(data, nextId) if not n then return n end return n, v...
local is_avail = require("wandbox.util").is_available local config = {} config.options = { client_list = { is_avail("curl"), is_avail("wget"), is_avail("socket") }, compilers = { cpp = "clang-head", c = "gcc-head", coffee = "coffeescript-head", crystal = "crystal-head", cs = "mono-head", d = "dmd-head", ...
_ENV=namespace "container" using_namespace "luaClass" template("mat") function mat:mat(rowNum,colNum) local data={} self._data=data self._rowNum=rowNum self._colNum=colNum for i=1,rowNum*colNum do data[i]=false end end function mat:at(row,col) return self._data[col+(row-1)*self._c...
-- Dependencies local Assets = require("engine.Assets") local Config = require("engine.Config") local Table = require("engine.Table") -- Clouds module local Clouds = {} -- Variables local gameWidth = Config.gameWidth local gameHeight = Config.gameHeight local sprites = Assets.sprites.clouds local cloudWidth = sprite...
-- IupRadio Example in IupLua -- Creates a dialog for the user to select his/her gender. -- In this case, the radio element is essential to prevent the user from -- selecting both options. require( "iuplua" ) male = iup.toggle{title="Male", tip="Two state button - Exclusive - RADIO"} female = iup.toggle{title="...
snet.Callback('qsystem_sync_players', function(_, ent, players) ent.players = players QuestSystem:Debug('SyncPlayers (' .. table.Count(players) .. ') - ' .. table.ToString(players)) end).Validator(SNET_ENTITY_VALIDATOR).Register()
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
-- This is a part of uJIT's testing suite. -- Copyright (C) 2015-2019 IPONWEB Ltd. See Copyright Notice in COPYRIGHT local function test_trim(str, expected) local actual = ujit.string.trim(str) if actual ~= expected then error(string.format('\nTest failed: trim("%s")\n\tExpected: "%s"\n\tActual: "%s"',...
data:extend( { { type = "recipe", name = "gun-turret-mk2", enabled = false, energy_required = 10, ingredients = { {"gun-turret", 2}, {"titanium-alloy", 10} }, result = "gun-turret-mk2" }, { type = "recipe", name = "laser-turret-mk2", enabled = false, ...
local config = require "api-umbrella.proxy.models.file_config" local json_decode = require("cjson").decode local xpcall_error_handler = require "api-umbrella.utils.xpcall_error_handler" local elasticsearch_templates local path = os.getenv("API_UMBRELLA_SRC_ROOT") .. "/config/elasticsearch_templates_v" .. config["elas...
local select, pairs, string_lower, strmatch, tremove, tinsert, getglobal, string_gsub = select, pairs, string.lower, strmatch, tremove, tinsert, getglobal, string.gsub local WorldFrame, UnitExists = WorldFrame, UnitExists local Gladdy = LibStub("Gladdy") local L = Gladdy.L local GetSpellInfo, CreateFrame, GetCVar = Get...
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_hoodwink_...
------------------------------------------------------------------------------- -- -- tek.ui.class.application -- Written by Timm S. Mueller <tmueller at schulze-mueller.de> -- See copyright notice in COPYRIGHT -- -- OVERVIEW:: -- [[#ClassOverview]] : -- [[#tek.class : Class]] / -- [[#tek.ui.class.family : Family]] ...
ITEM.name = "'Eagle' Gunpowder" ITEM.description = "'Eagle' brand gunpowder with a green top." ITEM.longdesc = "Smokeless gunpowder from the 'Eagle' brand, a mid tier producer of gunpowder. Used by some technicians in the zone to reload ammunition for sale." ITEM.model = "models/illusion/eftcontainers/gpgreen.mdl" ITE...
function RunCode(code) local code, err = load(code, '@runcode') if err then print(err) return nil, err end local status, result = pcall(code) print(result) if status then return result else return nil, result end end
register_outcome{ text = "Enemy Shields", subtext = "Can you break them?", bad = true, comment = "todo", rarity = 10, apply = function() local x, y = get_player_pos() for _, entity in pairs( EntityGetInRadiusWithTag( x, y, 1024, "enemy" ) or {} ) do local x, y = EntityGetTransform( en...
return {'vuelta'}
help( [[ MUSCLE stands for MUltiple Sequence Comparison by Log- Expectation. MUSCLE is claimed to achieve both better average accuracy and better speed than ClustalW2 or T-Coffee, depending on the chosen options. ]]) whatis("MUSCLE stands for MUltiple Sequence Comparison by Log- Expectation.") local version = "3.8.31"...
object_tangible_quest_rebel_rtp_wedge_security_terminal = object_tangible_quest_rebel_shared_rtp_wedge_security_terminal:new { } ObjectTemplates:addTemplate(object_tangible_quest_rebel_rtp_wedge_security_terminal, "object/tangible/quest/rebel/rtp_wedge_security_terminal.iff")
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0213-rc-radio-climate-parameter-update.md -- Description: -- Preconditions: -- 1) SDL got RC.GetCapabilities("availableHdChannelsAvailab...
--[[ Version 3.0.7 Recent Changes: 1. Now has session persistence! Just type "quarry -restore" and your turtle will pick up where it left off 2. doRefuel argument will now take fuel from inventory while it is running, instead of waiting to come back to the start 3. Will now wait for its chest to clear if ...
ModifyEvent(-2, -2, -2, -2, -1, -1, -1, 2612, 2612, 2612, -2, -2, -2); AddItem(186, 5); do return end;
local DatabaseSource = require(script.Parent.Parent.DatabaseSource) local copyDeep = require(script.Parent.copyDeep) local DocumentData = {} DocumentData.__index = DocumentData function DocumentData.new(options) return setmetatable({ isLoaded = false, isDirty = false, _lockSession = options.lockSession, _re...
--[[ |WARNING| THESE TESTS RUN IN YOUR REAL ENVIRONMENT. |WARNING| If your tests alter a DataStore, it will actually alter your DataStore. This is useful in allowing your tests to move Parts around in the workspace or something, but with great power comes great responsibility. Don't mess up your stuff! ------------...
local M = {} function M.parse(arg) local cmd = torch.CmdLine() cmd:text() cmd:text('Torch-7 Image Captioning') cmd:text() cmd:text('Options:') ------------ Model options ---------------------- cmd:option('-emb_size', 100, 'Word embedding size') -- 100 cmd:option('-lstm_size', 2048,...
data:extend({ { type = "custom-input", name = "map-labels-hotkey-toggle", key_sequence = "SHIFT + M", consuming = "script-only" }, })
SimpleDlg = Inherit(CppObjectBase, UUserWidget) local WidgetType_Lua = {} local BasicWidget = require "ui.widgets.basicwidget" local PathPrefix = "/Game/Git/" function SimpleDlg:NewCpp(Object, ...) if not self:Property("m_BpClass") then self.m_BpClass = UUserWidget.LoadClass(Object, PathPrefix..self.p_BP_Path.."."...
-- remove all lag frame input from text-based movie. if not emu then if #arg < 2 then print("arguments: <key movie file> <lag frame database file>") return end txtpath = arg[1] dbpath = arg[2] outfile = io.stdout else txtpath = "a.dsm" dbpath = "lag.db" outfile = io.open("out.dsm", "w") if o...
-- Copyright (C) 2018 by chrono local footer = "ocarina of time\n" ngx.log(ngx.INFO, "chunk = ", ngx.arg[1], " eof = ", ngx.arg[2]) if not ngx.arg[2] then return end ngx.arg[1] = ngx.arg[1] .. footer
-- 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...
return {'bujumbura'}
local actions = require("telescope.actions") require("telescope").setup({ defaults = { prompt_prefix = "❯ ", selection_caret = "❯ ", file_ignore_patterns = { "node_modules/*", ".git/*", "%.class", "%.pdf", "%.png", "target/", ".bloop/", }, mappings = { ...
cflags{ '-I $srcdir/include', '-I $srcdir/src', '-I $basedir/pkg/netsurf/libhubbub/src/include', '-I $basedir/pkg/netsurf/libparserutils/src/include', '-I $basedir/pkg/netsurf/libwapcaplet/src/include', '-isystem $builddir/pkg/expat/include', } pkg.hdrs = copy('$outdir/include/dom', '$srcdir', { 'bindings/hubbu...
--[[ ╔═════════════════════════════════╗ ║ Settings for dense-analysis/ale ║ ╚═════════════════════════════════╝ --]] local g = vim.g g.ale_completion_enabled = 0 g.ale_lint_on_text_changed = "never" g.ale_lint_on_insert_leave = 0 g.ale_lint_on_enter = 0
-- Globals g_lastFetchTime = 0 g_lastFetchCode = 0 g_lastFetchData = "" -- Functions function getTime() local sec, usec = rtctime.get() sec = sec - 25200 -- -7 hours (PDT) return luatz_timetable.new_from_timestamp(sec) end -- Start a simple http server srv=net.createServer(net.TCP) function receiver(sck, data) ...
if SERVER then AddCSLuaFile("actors2/convars.lua") AddCSLuaFile("actors2/language.lua") AddCSLuaFile("actors2/properties.lua") AddCSLuaFile("actors2/panels/welcome.lua") AddCSLuaFile("actors2/panels/actor_settings.lua") AddCSLuaFile("actors2/panels/actor_animations.lua") end include("actors2/convars.lua") includ...
--- --- wifi.lua --- --- Generic code for setting up the wifi module in the ESP8266. --- This is shared by many of my projects, control is returned to --- application logic via a callback named event_wifi_ready() which is --- triggered when the device receives an IP address from DHCP --- --- When this file is load it c...
-- Copyright (c) 2017-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the 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. -- --[[ -- -- Creates a dicti...
local mod = DBM:NewMod(674, "DBM-Party-MoP", 9, 316) local L = mod:GetLocalizedStrings() local sndWOP = mod:SoundMM("SoundWOP") mod:SetRevision(("$Revision: 9656 $"):sub(12, -3)) mod:SetCreatureID(60040, 99999)--3977 is High Inquisitor Whitemane and 60040 is Commander Durand, we don't really need to add her ID,...
--!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...
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5) combat:setArea(area) function onGetFormulaValues(player, level, maglevel) min = -((level / 5) + (...
require("prototypes.technology") require("prototypes.disablesciencepacks") require("prototypes.increaselabenergy")
--- Utility functions. require "socket" local M = {} --- Print a formatted string. -- Use __tostring method on tables that provide the function. local function printf(s, ...) local t = {} for i,v in ipairs{...} do if type(v) == 'table' and v.__tostring then t[i] = tostring(v) else t[i] = v ...
-- imported modules local action = require 'engine.action' local class = require 'engine.oop' local color = require 'engine.color' local console = require 'engine.console' local elements = require 'engine.elements' local Entity = require 'engine.Entity' local Equipment = require 'engine.Equipment' local Inventory = req...
--Sayuri·七色的人偶师 xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end) local m,cm=Senya.SayuriRitualPreload(37564921) function cm.initial_effect(c) c:EnableReviveLimit() local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_SPE...
Citizen.CreateThread(function() while true do Citizen.Wait(1) id = PlayerId() DisablePlayerVehicleRewards(id) end end)
local Repairer = Class(function(self, inst) self.inst = inst self.workrepairvalue = 0 self.healthrepairvalue = 0 self.perishrepairvalue = 0 self.repairmaterial = nil end) function Repairer:CollectUseActions(doer, target, actions, right) if right and target.components.repairable and target.co...
--- Functions for working with directions and orientations. -- @module Area.Direction -- @usage local Direction = require('__stdlib__/stdlib/area/direction') -- @see defines.direction local Direction = { __class = 'Direction', __index = require('__stdlib__/stdlib/core'), dir = defines.direction } setmetata...
--[[ Copyright 2021 0x2A ( https://github.com/0x2A-git ) 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...
--!nocheck --[[ Filename: GamepadMenu.lua Written by: jeditkacheff Version 1.1 Description: Controls the radial menu that appears when pressing menu button on gamepad --]] --NOTICE: This file has been branched! If you're implementing changes in this file, please consider also implementing them in the other --...
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras...
-- Array que contiene los callbacks de la pantalla local funcs = {} local name = "intro" -- Callbacks function funcs:init(...) end function funcs:update(dt) if TIME > 0 then if not savm:getLanguage(SAVEDATA) then sm:set("languageSelection") else sm:set("mainMenu") end end end function fun...
AddCSLuaFile() SWEP.PrintName = "ПКМ" SWEP.Category = "Call of Pripyat" SWEP.Base = "weapon_cop_base" SWEP.Slot = 3 SWEP.SlotPos = 2 SWEP.Spawnable = true SWEP.AdminOnly = false SWEP.ViewModel = "models/wick/weapons/stalker/stcopwep/pkm_model.mdl" SWEP.WorldModel = "models/wick/weapons/stalker/stcopwep/...
local SSort = require(game.ReplicatedStorage.Shared.SSort) local RandomLua = require(game.ReplicatedStorage.Shared.RandomLua) local SPList = {} local rand function SPList:new() local self = {} self._table = {} function self:push_back(element) self._table[#self._table + 1] = element return #self._table end func...
--[[ Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification OpenAPI spec version: 1.1.1 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech ]] -- input_step_impl class local input_step_impl = {} local input_step_impl_mt = { __name = "input_step_impl"; __i...
local KDL = foundation_kdl.KDL local Encoder = {} -- TODO: implement Encode.encode/1 function Encoder.encode() end KDL.Encoder = Encoder
--[[ This file contains 4 examples showing off the various features of ActorFrameTextures. Drop this into any Screen's Decorations or Overlay to see the examples. --]] -- Choose which example you'd like to see local ExampleToShow = 1; -- Example 1: An ActorFrameTexture draws 3 quads and then hides itself. All of ...
require"pears".setup()
local function CreateFont() surface.CreateFont( "KNOTIF", { font = "Roboto Cn", extended = true, size = 30, weight = 700, antialias = true }) end CreateFont() hook.Add("CHKill","CHKillIndidator",function(ply) local col = team.GetColor(LocalPlayer():Team()) local r = col.r local g = col.g local b = col....
screenX, screenY = guiGetScreenSize() scaleX, scaleY = (screenX / 1920), (screenY / 1080) local anim = {} local anim_startingPos = 0.2900 local anim_startingPosbg = 355 local animListVisible = false local animListGlobal local chosenAnim = 0 local animCategories = { {"Leżenie", true}, {"Postać", false}, {"Barowe", ...
-- Test complex recursive CALL of CLOSURE using Fibonacci algorithm -- Copyright (c) 2013 the authors listed at the following URL, and/or -- the authors of referenced articles or incorporated external code: -- http://en.literateprograms.org/Fibonacci_numbers_(Lua)?action=history&offset=20120305215844 function fib(n)...
local assert_error = require("lapis.application").assert_error local csrf = require "lapis.csrf" local generate = require "utils.generate" local Boards = require "models.boards" local Reports = require "models.reports" return { before = function(self) -- Get data self.boards = Boards:get_b...
local _G = _G local table_insert = table.insert local table_remove = table.remove local abs = math.abs local type = type local ipairs = ipairs local next = next local assert = assert local setmetatable = setmetatable local d_getinfo = debug.getinfo local FunctionFile = debug.FunctionFile local pcall2 = pcall2 local cor...
local DECOR = { FLOAT = 1, BOOL = 2, INT = 3, UNK = 4, TIME = 5, } local DECORATORS = { ["flatbed3_bed"] = DECOR.INT, -- The bed entity ["flatbed3_car"] = DECOR.INT, -- The car entity ["flatbed3_attached"] = DECOR.BOOL, -- Is a car attached? ["flatbed3_lowered"] = DECOR.BOOL, -- Is ...
-- -- User: Glastis -- Date: 01/11/17 -- Time: 14:51 -- local file = require('common.file') local utilities = {} local function trim(str) return str:gsub("^%s+", ""):gsub("%s+$", "") end utilities.trim = trim local function get_elem_in_table(table, elem) local i i = 1 while i <= #table do i...
if SERVER then AddCSLuaFile() return end --[[ https://github.com/Derpius/VisTrace/issues/13 pcall(require, "VisTrace-v0.4") -- Don't throw an error if the module failed to load ]] if not file.Exists("lua/bin/gmcl_VisTrace-v0.4_win64.dll", "GAME") then return end if not system.IsWindows() then error("VisTrace is...
local menu = {} love.graphics.setBackgroundColor(130, 220, 250) function math.lerp(a, b, k) --just fun stuff if a == b then return a else if math.abs(a-b) < 0.005 then return b else return a * (1-k) + b * k end end end WWIDTH, WHEIGHT = 800, 600 function menu:load() font = love.graphics.newFont(48) myS...
------------------------------ -- Area: Gusgen Mines -- NM: Pulverized Pfeffer ------------------------------ require("scripts/globals/hunts") ------------------------------ function onMobDeath(mob, player, isKiller) tpz.hunts.checkHunt(mob, player, 232) end
-- General utility functions function tableKeys(t) local keys = {} local n = 0 for k, v in pairs(t) do n = n + 1 keys[n] = k end return keys end function shuffle(tbl) size = #tbl for i = size, 1, -1 do local rand = math.random(size) tbl[i], tbl[rand] = tbl[rand], tbl[i] end return tbl end function se...
require 'optim' -- modified to include a threshold for relative changes in the loss function as stopping criterion local lbfgs_mod = require 'lbfgs' --- --- MAIN FUNCTIONS --- function runOptimization(params, net, content_image, content_losses, style_losses, temporal_losses, img, frameIdx, runIdx, max_...
local class = require('opus.class') local UI = require('opus.ui') UI.MenuItem = class(UI.FlatButton) UI.MenuItem.defaults = { UIElement = 'MenuItem', noPadding = false, textInactiveColor = 'gray', }
function test() local a, b, c end jit("compile", test) test() --[[ function <../tests/4_OP_LOADNIL.lua:1,3> (2 instructions at 0x1800500) 0 params, 3 slots, 0 upvalues, 3 locals, 0 constants, 0 functions 1 [2] LOADNIL 0 2 2 [3] RETURN 0 1 constants (0) for 0x1800500: locals (3) for 0x1800500: 0 a 2 3 1 b...
BusStop = {} -- Gets the hash of the bus stop from the given coordinates BusStop.CalculateHash = function(coords) local x = math.floor(coords.x) local y = math.floor(coords.y) return sha1.hex('busstop:' .. tostring(x) .. ':' .. tostring(y)) end
biter_ai_settings = { destroy_when_commands_fail = true, allow_try_return_to_spawner = true }
--[[ Purpose: Provides a wrapper for database interaction so switching from mysqloo or tmysql4 can be quickly done without much hassle. There are also some utility functions for the database. --]] nut.db = nut.db or {} local dbModule = nut.config.dbModule -- SQLite doesn't need a module! if (dbModule != "sqlite")...
local sti = require("lib/sti") local anim8 = require("lib/anim8") function love.load() map = sti.new("assets/maps/level") heroSprites = love.graphics.newImage("assets/spritesheets/pimple.gif") movementGrid = anim8.newGrid(58, 80, heroSprites:getWidth(), heroSprites:getHeight(), 0, 0, 3) stillGrid = ani...
return {'ere','ereambt','erebaan','erebaantje','erebegraafplaats','ereblijk','ereboog','ereburger','ereburgerschap','erecode','erecomite','ereconsul','erectie','erectiemiddel','erectiepil','erectiestoornis','eredame','eredegen','eredienst','erediploma','eredivisie','eredivisieclub','eredivisieduels','eredivisieteam','e...
--[[ behavior that makes any GridSolver AMR-friendly now to change hydro/solver/gridsolver so I can somehow modify the mins/maxs without reloading any kernels ... --]] local ffi = require 'ffi' local class = require 'ext.class' local table = require 'ext.table' local template = require 'template' local vec3sz = requir...
local yaml = require("yaml") local test = {} -- test decode function test:decode() local text = [[ a: b: 1 ]] local result, err = yaml.decode(text) assert(not err, tostring(err)) assert(result["a"]["b"] == 1, tostring(result["a"]["b"])) print("done: yaml.decode()") end -- test decode with no arg...
------------ --- Trace -- Trace object. Holds both request and response. -- @module middleware local Model = require 'model' local Service = require 'models.service' local Event = require 'models.event' local fn = require 'functional' local http = require 'http' local uuid4 = require 'uuid' local i...
-- Local instances of Global tables -- local PA = PersonalAssistant local PAC = PA.Constants -- --------------------------------------------------------------------------------------------------------------------- local PAMenuChoices = { PABanking = { stackingType = { GetString(SI_PA_ST_MOVE_F...
object_tangible_tcg_series3_greeter_deed_tusken = object_tangible_tcg_series3_shared_greeter_deed_tusken:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series3_greeter_deed_tusken, "object/tangible/tcg/series3/greeter_deed_tusken.iff")
local request_key = require 'http.request_key' local http = require 'http' local Cache = {__index={ get = function(self, key) return self.items[key] end, set = function(self, key, value, time) self.items[key] = value end }} local app = http.app.new { cache = setmetatable({items =...
------------------------------------------------------------------------------ -- Additional CQUI Common LUA support functions specific to Civilization 6 ------------------------------------------------------------------------------ -- =========================================================================== -- Exp...