content
stringlengths
5
1.05M
function onCreate() -- background shit makeLuaSprite('back', 'bg/lightwall', -340, -50); setLuaSpriteScrollFactor('back', 0.94, 0.94); scaleObject('back', 0.77, 0.77); addLuaSprite('back', false); makeLuaSprite('floor', 'bg/lightflooring', -240, -10); setLuaSpriteScrollFactor('floor', 0.94, 0.94); scaleObject(...
local ADDON, Engine = ... -- Lua API local abs = math.abs local assert, error = assert, error local floor = math.floor local ipairs, pairs = ipairs, pairs local pcall = pcall local print = print local select, type = select, type local setmetatable = setmetatable local tonumber, tostring = tonumber, tostring...
local Config = require "ardoises.config" local Cookie = require "resty.cookie" local Gettime = require "socket".gettime local Http = require "ardoises.jsonhttp.resty-redis" local Hmac = require "openssl.hmac" local Json = require "rapidjson" local Jwt = require "resty.jwt" local Keys = require...
---------------------------------------------------------------------------------- -- Total RP 3 -- Popups API -- --------------------------------------------------------------------------- -- Copyright 2014 Sylvain Cossement (telkostrasz@telkostrasz.be) -- -- Licensed under the Apache License, Version 2.0 (the "...
local StopWatch = require ("StopWatch"); local sw = StopWatch(); while(true) do print(sw:Seconds()) end
-- Dialogue for NPC "npc_thea" loadDialogue = function(DL) DL:createChoiceNode(0) if (not DL:isConditionFulfilled("npc_thea", "who_are_you")) then DL:addChoice(1, "DL_Choice_WhoAreYou") -- Who are you? end if (not DL:isConditionFulfilled("npc_thea", "what_are_you_doing")) then DL:addChoice(10, "DL_Choice_What...
-- The queue for the rendered icons. renderdIcons = renderdIcons or {} -- To make making inventory variant, This must be followed up. function renderNewIcon(panel, itemTable) -- re-render icons if ((itemTable.iconCam and !renderdIcons[string.lower(itemTable.model)]) or itemTable.forceRender) then local iconCam = i...
inspect = require("app.libs.inspect") require("app.config.error_code") require "app.libs.log_api" local app = require("app.server") app:run()
local hit_effect = { red = 0, shift_radius = 0, static_str = 0 } Player = Entity("Player",{ hitbox=true, reaction="cross", animations={ "robot_stand", "robot_walk", "robot_hit" }, align="center", --z=5, collision=function(self, i) if i.other.tag == "Ball" and i.other:is_colliding(self) then -- change fr...
local _, ns = ... local B, C, L, DB, P = unpack(ns) local M = P:RegisterModule("Misc") local strmatch, format, tonumber, select = string.match, string.format, tonumber, select M.MiscList = {} function M:RegisterMisc(name, func) if not M.MiscList[name] then M.MiscList[name] = func end end function M:OnLogin() f...
-- module Data.Semigroup local exports = {} exports.concatString = function (s1) return function (s2) return s1 .. s2 end end exports.concatArray = function (xs) return function (ys) local result = copyTable(xs) for i=1, #ys do result[#result+1] = ys[i] end return result end end return exports
return { fadeOut = 1.5, mode = 2, id = "TIANCHENGHUODONG17", once = true, fadeType = 1, continueBgm = true, fadein = 1.5, scripts = { { expression = 2, side = 0, nameColor = "#a9f548", actor = 305070, dir = -1, stopbgm = true, say = "{namecode:161},你究竟在想什么!现在来参加这种演习你…", typewriter = { ...
local M = {} M.NONE = "none" M.ERROR = "error" M.USI = "usi" M.USIOK = "usiok" M.ISREADY = "isready" M.READYOK = "readyok" M.OPTION = "option" M.SETOPTION = "setoption" M.USINEWGAME = "usinewgame" M.POSITION = "position" M.GO = "go" M.STOP = "st...
salt = bcrypt.gen_salt() hash = bcrypt.hashpw("my-password", salt) assert(bcrypt.hashpw("my-password", hash) == hash)
local vnet = GLib.vnet GLib.Transfers = {} GLib.Transfers.InboundTransfers = {} GLib.Transfers.OutboundTransfers = {} GLib.Transfers.Requests = {} GLib.Transfers.Handlers = {} GLib.Transfers.InitialPacketHandlers = {} GLib.Transfers.RequestHandlers = {} GLib.Transfers.NextTransferId = 1 if SERVER then util.AddNetwo...
SCONFIG = L2TConfig.GetConfig(); moveDistance = 30; ShowToClient("Q3", "Quest Searching for the Mysterious Power - Started"); LearnAllSkills(); MoveTo(-111432, 255835, -1443, moveDistance); MoveTo(-111399, 255866, -1443, moveDistance); TargetNpc("Shannon", 32974); Talk(); ClickAndWait("talk_select", "Quest"); ClickAndW...
local coins = 23254 function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, coins) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have "..getPlayerStorageValue(cid, coins).." cassino coins left.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATU...
#!/usr/bin/env tarantool local fio = require("fio") local ffi = require("ffi") local parserConst = require("sqlparserConst") local sqlgen = require("sqlgen") local hFilePath = debug.getinfo(1, "S").source hFilePath = fio.dirname(hFilePath:sub(2)) hFilePath = fio.pathjoin(hFilePath, "LuaDataTypes.h") local hFile, err...
Locales['en'] = { -- global menus ['not_enough_in_society'] = 'there\'s not enough of ~r~that item~s~ in the society!', ['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!', ['vehicle_belongs'] = 'a vehicle with plate ~y~%s~s~ now belongs to ~b~you~s~', ['...
music = "Muttrace.ogg" function start() out = Portal:new{x=3, y=7} shopkeep = Object:new{x=3, y=2, anim_set="Doggy", person=true} setObjectDirection(shopkeep.id, DIRECTION_SOUTH) shop = Object:new{x=3, y=3} end function stop() end function update(step) if (out:update()) then change_areas("Muttrace", 20, 8, DI...
#include "umf/umf_meta.lua" #include "umf/umf_utils.lua" local VEC_MIN = Vec(-math.huge, -math.huge, -math.huge) local VEC_MAX = Vec(math.huge, math.huge, math.huge) -- UI functions function UiDrawLine(dx, dy, r, g, b, a) UiPush() UiColor(r, g, b, a) UiRotate(math.atan2(-dy, dx) * 180 / math.pi) UiRect((...
require("awful") require("awful.rules") require("beautiful") require("naughty") require("keygrabber") require("vicious") require("bobroutils") require("tbar") require("rsi") require("rodentbane") --require("debug") -- {{{ Variable definitions -- Themes define colours, icons, and wallpapers beautiful.init("/home/bobro...
function Spawn( entityKeyValues ) thisEntity._abilitySilence = thisEntity:FindAbilityByName( "ability_boss3_silence" ) thisEntity._abilitySummon = AICore:FindAbility(thisEntity, "ability_boss3_summom_healer" ) thisEntity._abilityBattleHunger = AICore:FindAbility(thisEntity, "ability_boss2_battle_hunger" ) ...
--- binary 0011 1111 which represents the utf-8 continue mask local CONT_MASK = 63 local Buffer = {} Buffer.__index = Buffer function Buffer.new(s) local ret = { stream = s, current_idx = 1, len = #s, } setmetatable(ret, Buffer) return ret end ---Check if the buffer has rea...
local tnt = require 'torchnet.env' local tds = require 'tds' local tester local test = torch.TestSuite() function test.DatasetIterator() local d = tnt.TableDataset{data = {1, 2, 3, 4, 5, 6}} local itr = tnt.DatasetIterator(d) local count = 0 for sample in itr:run() do count = count + 1 tester...
--[[-- h1 four.Camera A camera defines a view volume of world space. --]]-- local lub = require 'lub' local four = require 'four' local lib = lub.class 'four.Camera' local V2 = four.V2 local V3 = four.V3 local M4 = four.M4 local Quat = four.Quat -- Projection parameters/matrix synchronization local function se...
-- -- Author: Yiran WANG -- Date: 2014-08-05 16:18:35 -- local Formulas = require "Formulas" local Macros = require "Macros" local F_FeverBar = class("F_FeverBar") function F_FeverBar:ctor ( params ) -- self.Progress = {} -- self.fullPercentage = params.fullPercentage or 100 -- self.emptyPercentage = params.emptyP...
return { no_consumer = true, fields = { card_number_field = {required = true, type = "string"}, card_expiry_month_field = {required = true, type = "string"}, card_expiry_year_field = {required = true, type = "string"}, card_cvv_field = {required = true, type = "string"}, tokenizer_url = {require...
--[[ { file = "file path relative to Data Files\Sound", subtitle = "what it says" }, ]] local voices = { argonian = { female = { ["sneaking"] = { { file = "vo\\a\\f\\Hlo_AF000a.mp3", subtitle = "What?" }, { file = "vo\\a\\f\\Idl_AF007.mp3", subtitle = "What w...
return function(scene, dt) for entity in pairs(scene:entities_with('animation', 'remove_when_animation_complete')) do if entity.animation:is_complete() then scene:remove_entity(entity) end end end
-- Copyright 2022 SmartThings -- -- 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 or agreed to in ...
require 'dp' local SaveModel, parent = torch.class("dp.SaveModel","dp.SaveToFile") SaveModel.isSaveModel = true function SaveModel:__init(config) parent.__init(self) end function SaveModel:save(subject, current_error) assert(subject, "SaveModel: subject is nil") local subject_path = subject:id():toPath() loca...
-- See LICENSE for terms local WaitMsg = WaitMsg local CreateRealTimeThread = CreateRealTimeThread local function UpdateList(dlg) WaitMsg("OnRender") if not dlg.idPOIList then return end local const = const --~ ex(buttons) local buttons = dlg.idPOIList or "" for i = 1, #buttons do local button = buttons[...
dofile("table_show.lua") dofile("urlcode.lua") local urlparse = require("socket.url") local http = require("socket.http") JSON = (loadfile "JSON.lua")() local item_dir = os.getenv("item_dir") local warc_file_base = os.getenv("warc_file_base") local item_type = nil local item_name = nil local item_value = nil local ite...
ITEM.name = "Bag" ITEM.desc = "A bag to hold more items." ITEM.model = "models/props_c17/suitcase001a.mdl" ITEM.category = "Storage" ITEM.weight = -5 function ITEM:onRegistered() if (isnumber(self.invWidth) and isnumber(self.invHeight)) then self.weight = -1 * self.invWidth * self.invHeight end end
function Flow_ClassifyEncryptedTraffic (msg, ruleEngine) -- Adds a metadata field if the traffic uses a knwon encryption classification require 'LOG' -- list of known crypto protocols if (cryptoProtocols == nil) then cryptoProtocols = {"ipsec","ssl", "ssh", "sftp", "rdp"} end -- if you need to increase e...
-- TODO(subeet) -- 1. [ ] get the folder path -- 2. [ ] get the file base name local M = {} return M
local Tunnel = module('_core', 'libs/Tunnel') local Proxy = module('_core', 'libs/Proxy') local hpp = Tunnel.getInterface("hpp_invHUD") API = Proxy.getInterface('API') cAPI = Tunnel.getInterface('cAPI') local capacity = 0 local weight = 0 Citizen.CreateThread(function() while true do Citizen.Wait(3000) ...
FancyProgress = {} FancyProgress.__index = FancyProgress function FancyProgress.create(minval, maxval, bgName, x, y, width, height, barName, barOffsetX, barOffsetY, barWidth, barHeight) local screenWidth, screenHeight = guiGetScreenSize() if screenWidth < 1280 and screenHeight < 1024 then x = resAdjust(x) y = re...
local M = {} M.__index = M --- Switch by whether mapping has filetype matched with the buffer's filetype. --- @param mapping function|table: |stlparts.nvim-types-component| --- @param default function|table: |stlparts.nvim-types-component| --- @return table: |stlparts.nvim-types-component| function M.new(mapping, defa...
local MODULE = PAW_MODULE('lib') local Colors = MODULE.Config.Colors local PANEL = {} function PANEL:Init() self:TDLib() :ClearPaint() :Background(Colors.Button) end function PANEL:AddOption( strText, funcFunction ) local pnl = vgui.Create( 'Paws.MenuOption', self ) pnl:SetMenu( self ) pnl:Se...
function __TS__OptionalChainAccess(____table, key) if ____table then return ____table[key] end return nil end
local Root = script:FindFirstAncestor('MazeGeneratorPlugin') local Roact = require(Root:WaitForChild('Roact')) local M = require(Root.M) local createElement = Roact.createElement local function UIPadding(props) local padding = props.padding local paddingProp = UDim.new(0, padding) return createElement( 'UIPadd...
insulate("Generic:withTags()", function() require "init" require "spec.mocks" require "spec.asserts" it("creates a valid tagged object", function() local station = SpaceStation() Generic:withTags(station) assert.is_true(Generic:hasTags(station)) end) it("allows to set ...
function readADC_SingleEnded(channel, cb) if channel > 3 then return 0 end local ADDR = 0x48 local ADS1115_CONVERTIONDELAY = 8 local ADS1015_REG_POINTER_MASK = 0x03 local ADS1015_REG_POINTER_CONVERT = 0x00 local ADS...
local Collapse, parent = torch.class('nn.Collapse', 'nn.Module') -- collapses non-batch dims function Collapse:__init(nInputDim) parent.__init(self) self.nInputDim = nInputDim end function Collapse:updateOutput(input) if not input:isContiguous() then self._input = self._input or input.new() self....
local helpers = require('test.functional.helpers')(after_each) local clear = helpers.clear local funcs = helpers.funcs local eval, eq = helpers.eval, helpers.eq local execute = helpers.execute local nvim = helpers.nvim local exc_exec = helpers.exc_exec describe('msgpack*() functions', function() before_each(clear) ...
--- @class GCTakeDamageInfo --- A class used to store and modify all the data concerning a damage event. --- An empty CTakeDamageInfo object can be created with Global.DamageInfo --- List of hooks that this object is passed to: --- * ENTITY:OnTakeDamage --- * GM:DoPlayerDeath --- * GM:EntityTakeDamage --- *...
--[[ Entity info ]] ENT.Base = "base_gmodentity" ENT.Type = "anim" ENT.Category = "Respawn Point" ENT.Spawnable = true ENT.PrintName = "Respawn Point" ENT.Author = "Mailz" ENT.Contact = "Steam" ENT.Purpose = "Allow players set their custom s...
AddCSLuaFile() resource.AddFile("materials/deaf-icon.png") if (CLIENT) then local drawDeaf = false local deafIcon = Material("materials/deaf-icon.png") net.Receive("drawDeaf",function() drawDeaf = net.ReadBool() end) hook.Add( "HUDPaint", "ttt_dcrdint_HUDPaint", function() if (!drawDeaf) then return end s...
function make_test(group, name, fileglob) local pc_proj = precore.make_project( group .. "_" .. name, "C++", "ConsoleApp", "./", "obj/", nil, nil ) configuration {} targetname(name) includedirs { precore.subst("${ROOT}/include") } files {fileglob} libdirs {precore.subst("${ROOT}/lib")} lin...
--- Utilities used by other modules. --- @module haproxy.util local M = {} --- Calls uname to return the current operating system. -- @treturn string function M.uname() local f = assert(io.popen('uname -s', 'r')) local os_name = assert(f:read('*a')) f:close() return os_name end --- Return whether a table cont...
-- Folder name that the code base is held in. This must be confirmed before generating the solution. MainFolder = "Source" ModuleFolder = "Library.Modules" -- load functions dofile "Functions.lua" workspace "Library" location "../.." architecture "x86_64" startproject "Library" configurations { "Debug", "Re...
ITEM.name = "Crystal Meth" ITEM.model = "models/katharsmodels/contraband/metasync/blue_sky.mdl" ITEM.desc = "A highly addictive drug that's inhaled" ITEM.duration = 100 ITEM.price = 20 ITEM.attribBoosts = { ["end"] = -2, ["stm"] = 3, } local effectText = { "You feel very alert yet paranoid and aggressive.", } ITEM:...
object_tangible_loot_creature_loot_generic_humanoid_arm_bone = object_tangible_loot_creature_loot_generic_shared_humanoid_arm_bone:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_generic_humanoid_arm_bone, "object/tangible/loot/creature/loot/generic/humanoid_arm_bone.iff")
--[[Compys(TM) TapFAT Shared Library v1.54 for MineOS 2021 (C) Compys S&N Systems This is a driver library for a "Tape File Allocation Table" (or "TapFAT") system With this system you can use Computronics Tapes as a file storage like Floppy The first 8Kb of a space is reserved for special FAT with info about files...
------------------------------------------------------------------------------- -- Copyright(C) machine stdio -- -- Author: donney -- -- Email: donney_luck@sina.cn -- ...
AddCSLuaFile() function EFFECT:Init(data) self.Start = data:GetOrigin() self.size = 4000 self.Emitter = ParticleEmitter(self.Start) for i = 1, 30 do local vec = VectorRand() local p = self.Emitter:Add("effects/fleck_cement" .. math.random(1, 2), self.Start) p:SetDieTime(math.random(1, 15)) p:SetStartAl...
-- invalid user test wrk.method = "POST" wrk.body = '--------------------------12345\r\nContent-Disposition: form-data; name="data"\r\n\r\n{"phone_number":"09336521656","device_id":"dev"}\r\n--------------------------12345--\r\n' wrk.headers["Content-Type"] = "multipart/form-data; boundary=------------------------123...
function camInit(x1,y1,x2,y2) cam = {x = 0,y = 0, vx = 0, vy = 0, real = {x = 0, y = 0}, scale = 1, a = camera.new(x1, y1, x2, y2), zoom = 100, update = function (dt) local check = false for i,v in ipairs (craft) do if v.control then cam.x, cam.y = v.x+(math.abs(v.vx)*math.sin(v.angle))/3, v.y-(math.abs(v.v...
require("prototypes.constants") --//////////////////////////////////////// --MSR Entity --//////////////////////////////////////// data:extend({ { burner = { burnt_inventory_size = 0, effectivity = 0.55, fuel_inventory_size = 1, fuel_category = "msr-nuclear", smoke = { { --Cooling tower in b...
AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Grenade_Ent" ENT.Author = "Zenolisk" ENT.Contact = "" ENT.Purpose = "" ENT.Instructions = "" ENT.Spawnable = true ENT.Category = "Rebellion" if SERVER then function ENT:Initialize() -- Boiler plate self.Entity:SetModel( ...
local State = require("stateBase") local ConcreteState2 = State:new() function ConcreteState2:handle(context) print(context:getHour()) print("ConcreteState2:handle") end return ConcreteState2
-- Enter the button number, you want to use for simple trim here simple_trim_button = 330 -- edit the factor, to define simple_trim's sensibility stg_trim_factor = 1.0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- leave the rest of the file as it is, if you are not a Lua prog...
object_tangible_loot_loot_schematic_marauder_s02_helmet_schematic = object_tangible_loot_loot_schematic_shared_marauder_s02_helmet_schematic:new { templateType = LOOTSCHEMATIC, customName = "Marauder Armor Helmet Schematic", objectMenuComponent = "LootSchematicMenuComponent", attributeListComponent = "LootSchematic...
return require('local_chain')
-- local log = require("hs.logger").new("t_binding") -- local inspect = require("hs.inspect") local require = require local test = require("cp.test") local binding = require("binding") local parameter = require("parameter") return test.suite("binding"):with { test("new", function() lo...
--[[ This file is part of zlib. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/pallene-modules/zlib/master/COPYRIGHT. No part of zlib, including this file, may be copied, modified, propagated, or distributed except ...
--bios modem = component.proxy(component.list("modem")()) function sleep(n) local deadline = computer.uptime() + (n or 0) repeat computer.pullSignal(deadline - computer.uptime()) until computer.uptime() >= deadline end env = {require = require, drone = component.proxy(component.list("drone")()), addUse...
require "CommonUtils" require "NSData" class(StringUtils); function StringUtils.appendingPathComponent(path, component) return runtime::invokeClassMethod("LIStringUtils", "appendingPath:component:", path, component); end function StringUtils.md5(str) return runtime::invokeClassMethod("LIStringUtils", "md5For...
--死境战壕 local m=14000105 local cm=_G["c"..m] function cm.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(cm.actcon) e1:SetTarget(cm.target) e1:SetOperation(cm.activate) c:RegisterEffect(e1) --summon local e2...
local al = legato.al --[[ main ]]-- local filename = '/data/mysha.pcx' local display = al.create_display(640, 480) local subbitmap = al.create_sub_bitmap(al.get_backbuffer(display), 50, 50, 640 - 50, 480 - 50) local overlay = al.create_sub_bitmap(al.get_backbuffer(display), 100, 100, 300, 50) al.set_window_title(dis...
return Def.Quad{ InitCommand=function(self) self:zoomto(256,104):diffuse(PlayerColor(PLAYER_1)):diffusealpha(0.75):fadeleft(0.2):faderight(0.2) end; };
local utils = require "spine.utils" local Slot = {} function Slot.new (slotData, skeleton, bone) if not slotData then error("slotData cannot be nil", 2) end if not skeleton then error("skeleton cannot be nil", 2) end if not bone then error("bone cannot be nil", 2) end local self = { data = slotData, skeleton...
--[[ Copyright 2019 Nyapaw © 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 or agreed to in wr...
--[[--------------------------------------------------------- Super Cooking Panic for Garry's Mod by Xperidia (2020) -----------------------------------------------------------]] include("sh_player.lua") AddCSLuaFile("cl_player.lua") --[[--------------------------------------------------------- Called once on...
local GameConst = require 'scripts.game-const' local Parser = {} local types = GameConst.code.type function Parser.bcheck(a, b) return bit.band(a, b) ~= 0 end function Parser.match_msb(a, b) local n = bit.band(a, b) if n == 0 then return 0 end local msb = 1 while n > 1 do n = bit.rshift(n, 1) msb...
local ffi = require("cffi") ffi.cdef [[ typedef struct foo { int x; int y; } foo; ]] local foo = ffi.metatype("foo", { __index = { sum = function(self) return self.x + self.y end } }) local x = foo(5, 10) assert(x.x == 5) assert(x.y == 10) assert(x:sum() ==...
local present, bufremove = pcall(require, "mini.bufremove") if not present then return end bufremove.setup()
local skynet = require "skynet" local redis = require "redis" skynet.start(function() local db = redis.connect "main" db:batch "write" -- ignore results db:set("A", "hello") db:set("B", "world") db:batch "end" db:batch "read" db:get("A") db:get("B") local r = db:batch "end" -- return all results in a tab...
return { { effect_list = { { type = "BattleBuffCastSkill", trigger = { "onAttach", "onStack" }, arg_list = { rant = 100, target = "TargetSelf", skill_id = 13891 } } } }, { effect_list = { { type = "BattleBuffCastSkill", trigger = { "onAttach", ...
local M = {} M.config = function() rvim.builtin.dap = { active = true, on_config_done = nil, breakpoint = { text = "", texthl = "LspDiagnosticsSignError", linehl = "", numhl = "", }, breakpoint_rejected = { text = "", texthl = "LspDiagnosticsSignHint", ...
-- exxec return { ["exxec"] = { yuped = { air = true, class = [[CSimpleGroundFlash]], count = 1, ground = true, water = true, properties = { alwaysvisible = true, colormap = [[0.3 ...
local Prerequisites = {} function Prerequisites.InAttackRange(action, prerequisite, agent, target, dt) local attack = Utils.getChild(agent, action) if attack then local range = attack:get("AttackRange") local agentPosition = agent:get("Position") local targetPosition = target:get("Position") local...
local TDKP_Tests = {} _G["TDKP_Tests"] = TDKP_Tests function TDKP_Tests:RunTests() if WoWUnit == nil then return end local AreEqual, Exists, Replace = WoWUnit.AreEqual, WoWUnit.Exists, WoWUnit.Replace local Tests = WoWUnit:NewGroup("TurboDKP") function Tests:ApplyBiddingCaps1() Ar...
--[[ Copyright (c) 2009 Edvin "Lego3" Linge 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, distr...
require 'paths' require 'rnn' require 'optim' local dl = require 'dataload' version = 2 --[[ command line arguments ]]-- cmd = torch.CmdLine() cmd:text() cmd:text('Train a Language Model on PennTreeBank dataset using RNN or LSTM or GRU') cmd:text('Example:') cmd:text('th recurrent-language-model.lua --cuda --device 2...
return { bg = "#202328", fg = "#bbc2cf", aqua = "#3affdb", beige = "#f5c06f", blue = "#51afef", brown = "#905532", cyan = "#008080", darkblue = "#081633", darkorange = "#f16529", green = "#98be65", grey = "#8c979a", lightblue = "#5fd7ff", lightgreen = "#31b53e", magenta = "#c678dd", orange = "#d4843e", ...
object_mobile_hoth_collector = object_mobile_shared_hoth_collector:new { } ObjectTemplates:addTemplate(object_mobile_hoth_collector, "object/mobile/hoth_collector.iff")
local core, smoketest = core, smoketest local sam = smoketest.sam local function is_testable(name, def) local privs = def.privs if privs.server or privs.ban or privs.kick or privs.rollback or privs.password then return false end return true end local function describe_chatcommand(name, def) if is_testable(...
-- inoremap <silent><expr> <C-Space> compe#complete() -- inoremap <silent><expr> <CR> compe#confirm('<CR>') -- inoremap <silent><expr> <C-e> compe#close('<C-e>') -- inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 }) -- inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 }) H.keymap('i', '...
-- GGNN for making a sequence of graph level predictions. Designed for -- bAbI task 19. -- -- This is a variant where the graph level output and the node annotation -- output share the same propagation network. -- -- Yujia Li, 04/2016 -- local GraphLevelSequenceSharePropagationGGNN = torch.class('ggnn.GraphLevelSequ...
RegisterCommand('ooc', function(source, args) local LocalPlayer = exports["npc-core"]:getModule("LocalPlayer") local Player = LocalPlayer:getCurrentCharacter() local cid = exports['isPed']:isPed('cid') local firstname = Player.first_name local lastname = Player.last_name local dob = Player.dob local gende...
local function should_error_code(code) local fn = assert(loadstring(code, "should_error_code")) local ok = pcall(fn) assert(not ok, string.format("the code should get error but not, code: %s", code)) end should_error_code [[io.open("anonymous.file")]] should_error_code [[os.open("anonymous.file")]] should_erro...
----------------------------------- -- Ability: Warding Circle -- Grants resistance, defense, and attack against Demons to party members within the area of effect. -- Obtained: Samurai Level 5 -- Recast Time: 5:00 -- Duration: 3:00 ----------------------------------- require("scripts/globals/settings") require("scripts...
--[[ Desc: Gorecross state Author: SerDing Since: 2017-07-28 Alter: 2020-02-04 ]] local _Base = require("entity.states.base") ---@class Entity.State.Swordman.GoreCross : Entity.State.Base ---@field protected _effectTicks table<number, number> ---@field protected _attackTicks table<number, number> local _GoreCross ...
local fn = require('tmux.lib.fn') local M = {} local function restore_zoom() if vim.fn.exists('t:tmux_pane_zoom') == 1 then vim.cmd(vim.api.nvim_tabpage_get_var(0, 'tmux_pane_zoom')) vim.api.nvim_tabpage_del_var(0, 'tmux_pane_zoom') end end M.display_message = function (opts) opts = opts or {} local...
-- two toolchain -- module function dep(namespace, name, cppmodule, usage_decl, deps) local m = { project = nil, cppmodule = cppmodule, namespace = namespace, name = name, dotname = string.gsub(name, "-", "."), idname = string.gsub(name, "-", "_"), usage_decl...
local mod = DBM:NewMod(1209, "DBM-Party-WoD", 5, 556) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 12458 $"):sub(12, -3)) mod:SetCreatureID(84550) mod:SetEncounterID(1752)--TODO: VERIFY, "Boss 4" isn't descriptive enough mod:SetZone() mod:SetReCombatTime(120, 3)--this boss can quickly re-enter com...
------------------------------------------------------------------ -- lib.lua -- Author : Xin Zhang -- Version : 1.0.0.0 -- Date : 2011-10-16 -- Description: ------------------------------------------------------------------ local strModuleName = "lib"; -----------------------------------------...