content stringlengths 5 1.05M |
|---|
local _ = require 'moses'
local RecGRU, parent = torch.class('nn.RecGRU', 'nn.AbstractRecurrent')
function RecGRU:__init(inputsize, outputsize)
local stepmodule = nn.StepGRU(inputsize, outputsize)
parent.__init(self, stepmodule)
self.inputsize = inputsize
self.outputsize = outputsize
self.zeroOutput = ... |
dependencies = { 'libs/Context.lua',
'libs/backend/HPMSFacade.lua',
'libs/gui/InputText2D.lua',
'libs/utils/DebugConsole.lua',
'libs/utils/Utils.lua',
'libs/managers/SceneManager.lua'
} |
WireGPU_Monitors = {}
function WireGPU_AddMonitor(name, model, tof, tou, tor, trs, x1, x2, y1, y2, rot, translucent)
if not rot then
rot = Angle(0, 90, 90)
elseif not isangle(rot) then
rot = Angle(0, 90, 0)
end
local RatioX = (y2 - y1) / (x2 - x1)
local monitor = {
Name =... |
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'quick-lint-js', '--lsp-server' },
filetypes = { 'javascript' },
root_dir = util.root_pattern('package.json', 'jsconfig.json', '.git'),
},
docs = {
description = [[
https://quick-lint-js.com/
quick-lint-js finds bugs in Ja... |
function OnTargetSelected(user, target)
if (user:IsPlayer() == true and user:IsMyPartyMember() == false and target:IsMe() == true) then
local TargetersFile = io.open(GetDir() .. "_targeters\\" .. GetMe():GetName() .. ".txt", "a")
TargetersFile:write(os.date("%Y-%m-%d %H:%M:%S") .. " | " .. user:GetName() .. "\n");
... |
local MIXTURE = {}
MIXTURE.ID = 11;
MIXTURE.Results = "weapon_fiveseven";
MIXTURE.Ingredients = {'item_chunk_metal', 'item_chunk_metal', 'item_paint', 'item_paint', 'item_chunk_plastic'};
MIXTURE.Requires = {
{GENE_INTELLIGENCE, 3},
{GENE_DEXTERITY, 3},
{SKILL_CRAFTINESS, 3},
};
MIXTU... |
-- Copyright 2020, Michael Adler <therisen06@gmail.com>
local log = require("log")
local List = require("pl.List")
local Map = require("pl.Map")
local Set = require("pl.Set")
local M = {}
local function parse_line(line)
local directions = List({})
local i = 1
local n = #line
while i <= n do
local x = line:sub(i... |
local turbo = require("turbo")
local middleclass = require("turbo.3rdparty.middleclass")
local ffi = require("ffi")
local yield = coroutine.yield
local task = turbo.async.task
local COMMANDS = require("turboredis.commands")
local util = require("turboredis.util")
local resp = {}
-- Convert a table of command+argument... |
-- -*- lua -*-
conflict("openmpi")
whatis("Name: OpenMPI")
whatis("Version: "..myModuleVersion())
whatis("Description: Open source MPI implementation that is developed and maintained by a consortium of academic, research, and industry partners.")
local version = {}
local key=1
for num in string.gmatch(myModuleVersio... |
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*-
-- vim: ts=4 sw=4 ft=lua noet
----------------------------------------------------------------------
-- @author Daniel Barney <daniel@pagodabox.com>
-- @copyright 2015, Pagoda Box, Inc.
-- @doc
--
-- @end
-- Created : 15 May 2015 by Daniel Barney... |
local spell, super = Class(Spell, "pacify")
function spell:init()
super:init(self)
-- Display name
self.name = "Pacify"
-- Name displayed when cast (optional)
self.cast_name = nil
-- Battle description
self.effect = "Spare\nTIRED foe"
-- Menu description
self.description = "SPARE ... |
require("util/util")
require("util/set")
require("ift/mask")
Item = Class()
function Item.new(noun, adjectives, components, children, parent)
local self = {
parent = parent,
noun = noun,
adjectives = adjectives and Set.new():addAll(adjectives) or Set.new(),
components = components and Set.n... |
local M = {}
local function serialize(obj)
local lua = ""
local t = type(obj)
if t == "number" then
lua = lua .. obj
elseif t == "boolean" then
lua = lua .. tostring(obj)
elseif t == "string" then
lua = lua .. string.format("%q", obj)
elseif t == "table" then
lua... |
-- Developed by MAHN.quifi, 2010
local print = print
local pairs = pairs
local tostring = tostring
local type = type
local setmetatable = setmetatable
local getmetatable = getmetatable
local stdout = io.stdout
local stringrep = string.rep
local setfenv = setfenv
local assert = assert
local rawget = rawget
l... |
local function _updateRepo(destination, url, name, branch)
local current = os.getcwd()
if os.isdir(destination) then
printf(" - Updating '%s'", name)
os.chdir(destination)
if branch then
os.executef("git checkout %s", branch)
else
os.execute("gi... |
local snownet = require "snownet"
local debugchannel = require "snownet.debugchannel"
local CMD = {}
local channel
function CMD.start(address, fd)
assert(channel == nil, "start more than once")
snownet.error(string.format("Attach to :%08x", address))
local handle
channel, handle = debugchannel.create()
local ok... |
local utils = require 'mp.utils'
local msg = require 'mp.msg'
local options = require 'mp.options'
local lib = mp.find_config_file('scripts/lib.disable')
if not lib then
return
end
-- lib can be nil if the folder does not exist or we're in --no-config mode
package.path = package.path .. ';' .. lib .. '/?.lua;'
req... |
YF = 1.70710678118654752440
XF = 0.70710678118654752440
RYF = 0.58578643762690495119
RXF = 1.41421356237309504880
maxx = XF * pi
maxy = YF * tan(0.5*pi/2)
max_fov = 360
max_vfov = 180
lens_width = maxx*2
lens_height = maxy*2
onload = "f_contain"
function lens_forward(x,y,z)
if abs(x) > maxx or abs(y) > maxy the... |
-- Inventory-related methods
local Inventory = {}
-- TODO: Consider the Cursor Inventory too (otherwise items can be lost during transition)
-- TODO: Consider Filters (otherwise they are lost during transition)
-- Whether a Player's Inventory is vulnerable to going missing due to lack of a body
function Inventory.Sho... |
--spawnpoint of Libria_main
spawnpoint 'a_m_y_runner_01' { x = -1477.14, y = -538.7499, z = 55.5264 }
--
|
--[[
Mojang Authentication API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
OpenAPI spec version: 2020-06-05
Generated by: https://openapi-generator.tech
]]
-- reduced_user_data class
local reduced_user_data = {}
local reduced_user_data_mt = ... |
local function writebytes(x)
local b2=string.char(x%256) x=(x-x%256)/256
local b1=string.char(x%256) x=(x-x%256)/256
return b2,b1
end
function bytes(x)
local b2=x%256 x=(x-x%256)/256
local b1=x%256 x=(x-x%256)/256
return string.char(b1,b2)
end
function write_int(x)
local b4=x%256 ... |
local function Y(x) return (function (f) return f(f) end)(function(y) return x(function(z) return y(y)(z) end) end) end
return Y(function(fibs)
return function(n)
return n < 2 and 1 or fibs(n - 1) + fibs(n - 2)
end
end)
|
Config = {}
Config.DrawDistance = 100.0
--language currently available EN and SV
Config.Locale = 'sv'
Config.Zones = {
PoliceDuty = {
Pos = { x = 439.825, y = -975.693, z = 29.691 },
Size = { x = 2.5, y = 2.5, z = 1.5 },
Color = { r = 0, g ... |
Talk(79, "我说老五啊,天气这么冷,喝这烈酒虽能驱寒,但如能再配上热腾腾的兔肉,那才真是够味呢.", "talkname79", 0);
Talk(79, "四哥,在这寒天雪地中,上那找兔肉去?", "talkname79", 4);
Talk(79, "谁说没有兔子,只是我们功夫不济,抓不到罢了.我曾听人家说,在极北之地有一个很厉害的猎户,轻功极高,在这雪地上猎兔,犹如猎鹰般的快,狠,准.", "talkname79", 0);
Talk(79, "那还等什么,我们这就上他 家去要点兔肉来吃.", "talkname79", 4);
Talk(79, "你想上他家?我看要等到下辈子了.你知道他住那吗?他住的地方叫”云鹤崖”... |
-- in millisecond, used for both CursorHold and CursorHoldI,
-- use updatetime instead if not defined
vim.g.cursorhold_updatetime = 100
|
local Var = require "lattice.var"
local Element = require "lattice.element"
local Cell = {}
function Cell:InitWithScope(scope)
local vars = {}
local newCell = {_vars = vars}
for _, varName in pairs(scope) do
vars[varName] = Var:InitWithName(varName)
end
setmetatable(newCell, self)
self.__index = self
retu... |
local modname = ...
local theme = {}
package.loaded[modname] = theme
local imageSuffix = display.imageSuffix or ""
local sheetFile = "theme/editField.png"
local sheetData = "theme.editField"
theme.editField =
{
sheet = sheetFile,
data = sheetData,
topLeftFrame = "editField_topLeft",
middleLeftFr... |
local has_devicons, devicons = pcall(require, 'nvim-web-devicons')
local conf = require('telescope.config').values
local entry_display = require('telescope.pickers.entry_display')
local path = require('telescope.path')
local utils = require('telescope.utils')
local get_default = utils.get_default
local make_entry = ... |
--The room "object" file
--Load required files and such
local achievement = require("achievement")
local entity = require("entity")
local resource = require("resource")
local event = require("event")
local sprite = require("sprite")
local transform = require("transform")
--Create the module
local M = {}
--Room infor... |
CreateClientConVar("zm_preference", "0", true, true, "What is your Zombie Master preference? (0 = Survivor, 1 = Zombie Master)")
CreateClientConVar("zm_nopreferredmenu", "0", true, false, "Toggles the preference menu to appear or not.")
CreateClientConVar("zm_scrollwheelsensativity", "20", true, false, "How sensitive t... |
return {
tag = 'callbacks',
summary = 'Called when restarting.',
description = [[
This callback is called when a restart from `lovr.event.restart` is happening. A value can be
returned to send it to the next LÖVR instance, available as the `restart` key in the argument
table passed to `lovr.load`. O... |
local _, addon = ...;
-- https://onlinetexttools.com/split-text?input=&split-by-char=false&char=%20&split-by-regex=false®ex=%2F%5Cs%2B%2F&split-by-length=true&length=110&separator=%2C%5Cn&symbol-before-chunk=%22&symbol-after-chunk=%22
table.insert(addon.officialCourses, table.concat({
"!WOP:2!0x49726C82!vIvFWXv... |
--[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
]]
local plugin = plugin
plugin:IncludeFile("shared.lua", SERVERGUARD.STATE.CLIENT)
plugin:IncludeFile("sh_commands.lua", SERVERGUARD.STATE.CLIENT)
plugin:IncludeFile("cl_panel.lua"... |
local ipairs = ipairs
local ngx = ngx
local string_helpers = require "trustbuilder-gateway.helpers.string"
local gw_conf = require "trustbuilder-gateway.configuration"
local authentication = require "trustbuilder-gateway.authentication"
local ngx_exit = ngx.exit
local conf, c... |
return {
{
effect_list = {
{
type = "BattleBuffCount",
trigger = {
"onTorpedoWeaponFire"
},
arg_list = {
countTarget = 4,
countType = 14680
}
},
{
type = "BattleBuffCastSkill",
trigger = {
"onBattleBuffCount"
},
arg_list = {
count = 1,
target... |
local Color3 = import("../types/Color3")
local Font = import("../Enum/Font")
local GuiButton = import("./GuiButton")
local InstanceProperty = import("../InstanceProperty")
local TextButton = GuiButton:extend("TextButton", {
creatable = true,
})
TextButton.properties.Font = InstanceProperty.enum(Font, {
getDefault =... |
PLUGIN.name = "Armour"
PLUGIN.author = "Zadkiel"
PLUGIN.desc = "Armour addon"
|
function DrawBrowseScreen()
love.graphics.clear(unpack(colors.black))
love.graphics.setColor(0, 0, 0, 100)
love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
local blackImage = love.graphics.newImage(settings.black_screen_path)
local blackImageScale = 2*dim... |
local ffi = require("ffi")
local require("ovsdb_command_common")
ffi.cdef[[
struct vsctl_context {
/* Read-only. */
int argc;
char **argv;
struct shash options;
/* Modifiable state. */
struct ds output;
struct table *table;
struct ovsdb_idl *idl;
struct ovsdb_idl_txn *txn;
str... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "InGame",
id = "Milestones",
PlaceObj('XTemplateTemplate', {
'__template', "OverlayDlg",
'MaxWidth', 800,
}, {
PlaceObj('XTemplateWindow', {
'__class', "XLabel",
'Dock', "top",
'HAlign', "right",
'Te... |
package("cglm")
set_homepage("https://github.com/recp/cglm")
set_description("Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. cglm provides lot of utils to help math operations to be fast and quick to write.")
set_urls("https://github.com/recp/cglm/archive/v$(version).tar.gz")
... |
--[[ File
NAME: DocTitanPlugin.lua
DESC: This file contains documentation of Titan to assist a developer.
:DESC
--]]
--[[ API
NAME: Titan API overview for developers
DESC: Updated Dec 2011
This documentation is intended for addon developers that wish to create a Titan plugin.
Terms:
Throughout the documentation and n... |
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
SWEP.BackHolster = false;
end
if ( CLIENT ) then
SWEP.PrintName = "Service Pistol"
SWEP.Author = "Counter-Strike"
SWEP.Slot = 3
SWEP.SlotPos = 1
SWEP.IconLetter = "u"
end
SWEP.HoldType = "pistol";
SWEP.HoldTypeNorm = "normal";
SWEP.Ba... |
---@meta
---@class cc.EaseRateAction :cc.ActionEase
local EaseRateAction={ }
cc.EaseRateAction=EaseRateAction
---* brief Set the rate value for the ease rate action.<br>
---* param rate The value will be set.
---@param rate float
---@return self
function EaseRateAction:setRate (rate) end
---* brief Initializes the... |
local hijack = {}
function hijack.load(libName, methodName, override)
if (not hijack) then
return nil, "no hijack"
end
if (not hijack[libName]) then
local lib, reason = require(libName);
if (not lib) then
return nil, reason
end
hijack[libName] = {}
hijack[libName].lib =... |
-- =====================================================================
--
-- nvim-telescope.lua -
--
-- Created by liubang on 2020/12/13 13:38
-- Last Modified: 2020/12/13 13:38
--
-- =====================================================================
local actions = require 'telescope.actions'
local telescope = r... |
-----------------------------------------------------------------------------
--- ---
--- Under Migration to CorePackages ---
--- ---
--- ... |
local map = require('core.utils').map
-- DEFAULT MAP
-- -----------
vim.g.mapleader = ' '
-- Disable SPC key
-- Note: `which-key` already implemented this
-- map('n', '<Space>', '<Nop>')
map('n', '<TAB>', '<Cmd>bn<CR>')
map('n', '<S-TAB>', '<Cmd>bp<CR>')
-- Break lines in normmal mode
map('n', 'o', 'o<ESC>', { nore... |
-- Entry.lua
-- Util bootstrap, do not use require here
local SnowyStream = System.SnowyStream
function require(name)
local mod = package.loaded[name]
if mod then
return mod
end
local path = name .. ".lua"
local content = SnowyStream.FetchFileData(path)
if content then
local chunk, errMsg = loa... |
-- simple global session data storage
function build(directory, config, parameters, level, seed)
local ds = getmetatable ''["stardustlib:gdata"]
if not ds then ds = { } getmetatable ''["stardustlib:gdata"] = ds end
if type(parameters.dataRequest) == "table" then
parameters.dataReturn = { }
for k in pa... |
local test = require('tap/test')
local t = test.new()
t:plan(4)
local lazy = t:requireOK('lazy') or t:bailOut("Can't load program-options")
t:subtest(
'lazy.require()',
function ()
t:plan(2)
-- We want to unload some libraries and try loading it through
-- lazy.require(). But it wo... |
local brackets = require('bracket-push')
describe('bracket-push', function()
it('should accept an empty string', function()
assert.is_true(brackets.valid(''))
end)
it('should accept a matched pair of braces', function()
assert.is_true(brackets.valid('{}'))
end)
it('should reject an opening brace wi... |
local global = require 'domain.global'
local server = {}
local vim = vim
-- gopls configuration template use daemon
server.go = {
cmd = {"gopls","--remote=auto"};
filetypes = {'go','gomod'};
root_patterns = {'go.mod','.git'};
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md#settings
init_... |
require("bindings.global.key")
require("bindings.global.mouse")
require("bindings.client.key")
require("bindings.client.mouse")
root.keys(globalkeys)
|
AddCSLuaFile()
AddCSLuaFile("client/cop_client.lua")
stalker_cop = stalker_cop or {}
stalker_cop.CrosshairEnabled = CreateConVar("cop_crosshair_enabled", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
game.AddParticles("particles/cop_particles_gauss.pcf")
game.AddParticles("particles/cop_particles_explosion.pcf")
PrecachePar... |
return function ()
local uv = require('uv')
local core = require('core')()
if #args < 2 then
core.installDeps(uv.cwd())
else
local list = {}
for i = 2, #args do
list[#list + 1] = args[i]
end
core.installList(uv.cwd(), list)
end
end
|
local class = require 'lib.middleclass'
local Entity = require 'source.entities.entity'
local anim8 = require 'lib.anim8'
local Timer = require 'lib.timer'
local Dust = class ("Dust", Entity)
local img = love.graphics.newImage("assets/sprites/player/landingdust.png")
local w = 16
local h = 16
function Dust:initiali... |
-- _ _____ ___ _ __ ___________ ________ __
-- | | | ___|/ _ \ | | / /| ___| _ \ | ___ \ \ / /
-- | | | |__ / /_\ \| |/ / | |__ | | | | | |_/ /\ V /
-- | | | __|| _ || \ | __|| | | | | ___ \ \ /
-- | |____| |___| | | || |\ \| |___| |/ / | |_/ / | |
-- \_____/\____/\_| |_/\_| \_... |
local settings = ModDLCSettings.throwable_spears
local base_string = "scripts/mods/throwables/DLCSettings/throwable_spears/"
settings.item_master_list_file_names = {
base_string .. "item_master_list_we_throwing_spears"
}
settings.weapon_skins_file_names = {
base_string .. "weapon_skins_we_throwing_spears"
}
settings... |
local carpetItems = {
[22737] = 22736, [22736] = 22737,-- Rift carpet
[23537] = 23536, [23536] = 23537,-- Void carpet
[23431] = 23453, [23453] = 23431,-- Yalaharian carpet
[23432] = 23454, [23454] = 23432,-- White fur carpet
[23433] = 23455, [23455] = 23433,-- Bamboo mat carpet
[23715] = 23707, [23707] = 23715,--... |
local ffi = require("ffi")
ffi.cdef[[
int mapnik_register_datasources(const char* path);
// Opaque class structure
typedef struct _mapnik_map_t mapnik_map_t;
mapnik_map_t * mapnik_map( unsigned int width, unsigned int height );
void mapnik_map_free(mapnik_map_t * m);
const char * mapnik_map_get_srs(mapnik_map_t *... |
local ProgressBar = class "ProgressBar"
local Tween = require "libs.tween"
local util = require "util.util"
local progressBarAnimationSpeed = 3
function ProgressBar:init(imageName, x, y, scale, initialValue, anchorSide, offsetLeft, offsetRight, fadeIn)
self.positionX, self.positionY = x or 0, y or 0
self.valu... |
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... |
document = require "document"
json = require "json"
local Set = {}
Set.__index = Set
setmetatable(Set, {
__call = function(set, id, options)
local self = {}
self.__index = self
self._id = id
return setmetatable(self, {
__index = Set
})
end
})
function Set.config(options)
box.cfg(optio... |
--[[
Listener is an extension to deal with triggers which is designed by Observer Model.
Require:
subject
Member:
_object_ - object using the listener
_registry_ - record what event is registered.
Function:
new() - create a new instance
object() - return the object of a... |
big_gothic = love.graphics.newFont("gothic_pixel.ttf", 30) -- *keep these*
titleFont = love.graphics.newFont("gothic_pixel.ttf", 86) -- *keep these*
thin = love.graphics.newFont("thintel.ttf", 16)
blokk = love.graphics.newFont("BLOKKRegular.ttf", 10)
dialogueBox = {
x = 350,
y = 0,
w = 450,
h = 100,
... |
includeFile("custom_content/tangible/holiday/life_day/rewards_09/lifeday_costume.lua")
includeFile("custom_content/tangible/holiday/life_day/rewards_09/lifeday_decor_cookie.lua")
includeFile("custom_content/tangible/holiday/life_day/rewards_09/lifeday_decor_fruitcake.lua")
includeFile("custom_content/tangible/holiday/l... |
local url_to_slack_channel = "https://hooks.slack.com/services/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"
--local url_to_slack_channel = "https://httpbin.org/post"
function slack(msg)
http.post(url_to_slack_channel,
'Content-Type: text/xml\r\n',
'{"text": "Its works. Message from agent '..msg..'... |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\TechMaps\AlienTechMap\replace.lua
-- - Dragon
local function CheckHasTech(techId)
local techTree = GetTechTree()
return techTree ~= nil and techTree:GetHasTech(techId)
end
local function SetShellIc... |
local widget = require 'ui_widget'
local oop = require 'minioop'
local button = oop.class()
oop.extend(button, widget)
local function hex_to_rgb(hex)
hex = hex:gsub("#", "")
return tonumber(hex:sub(1,2), 16),
tonumber(hex:sub(3,4), 16),
tonumber(hex:sub(5,6), 16),
#hex > 7 and tonumbe... |
return {'kodak','kodde','koddebeier','koddig','koddigheid','kodde','kodaks','koddebeiers','kodden','koddige','koddiger','koddigst','koddigste','koddigheden'} |
AuctionatorShoppingListTabMixin = {}
local ListDeleted = Auctionator.ShoppingLists.Events.ListDeleted
local ListSelected = Auctionator.ShoppingLists.Events.ListSelected
local ListItemSelected = Auctionator.ShoppingLists.Events.ListItemSelected
local EditListItem = Auctionator.ShoppingLists.Events.EditListItem
local Di... |
-- Test if ":options" throws any exception. The options window seems to mess
-- other tests, so restart nvim in the teardown hook
local helpers = require('test.functional.helpers')
local command, clear = helpers.command, helpers.clear
describe('options', function()
setup(clear)
it('is working', function()
co... |
local premake = require('premake')
local vstudio = require('vstudio')
local vcxproj = vstudio.vcxproj
local VsVcxItemDefinitionsGroupTests = test.declare('VsVcxItemDefinitionsGroupTests', 'vcxproj', 'vstudio')
function VsVcxItemDefinitionsGroupTests.setup()
vstudio.setTargetVersion(2015)
end
local function _exec... |
local iec_104 = require('ckit.lib')
libsocket = require "socket"
libunix = require "socket.unix"
socket = assert(libunix())
SOCKET_FILE = "/tmp/socket"
os.remove(SOCKET_FILE)
assert(socket:bind(SOCKET_FILE))
assert(socket:listen())
iec_104.fetch("meter1.example.com", 2404, SOCKET_FILE, true);
iec_104.fetch("meter2.e... |
--[[
TheNexusAvenger
Tests the ServerAuthorization class.
--]]
local NexusUnitTesting = require("NexusUnitTesting")
local ServerAuthorizationUnitTest = NexusUnitTesting.UnitTest:Extend()
local ServerAuthorization = require(game:GetService("ServerScriptService"):WaitForChild("MainModule"):WaitForChild("NexusAdmin"):W... |
-- todo
-- 24x7
-- Fuel Stations
-- Ammunation
-- Medical supplies
-- other various stores |
-- File: Axe.lua
-- Author: EroicaCpp (https://github.com/Eroica-cpp/dota2scripts)
-- Version: 1.0
-- Release Date: 2017/6/26
local Utility = require("Utility")
local Axe = {}
Axe.optionAutoItem = Menu.AddOption({"Hero Specific", "Axe"}, "Auto Use Items", "Auto use items like blademail, lotus when calling")
Axe.opti... |
--rpc_server.lua
local next = next
local pairs = pairs
local tunpack = table.unpack
local log_err = logger.err
local log_info = logger.info
local qxpcall = quanta.xpcall
local signalquit = signal.quit
local FlagMask = enum("FlagMask")
local KernCode = enum("KernCode... |
local kLeapVerticalForce = 10.8
local kLeapTime = 0.2
local kLeapForce = 7.6
Skulk.kMaxSneakOffset = 0.55 --0.55 was the original number. Return of the sneaky skulks!
function Skulk:GetThirdPersonOffset()
local z = -1.5 - self:GetVelocityLength() / self:GetMaxSpeed(true) * 0.4
return Vector(0, 0.9, z)
end
func... |
-- Copyright (C) 2019-2021 Igara Studio S.A.
--
-- This file is released under the terms of the MIT license.
-- Read LICENSE.txt for more information.
dofile('./test_utils.lua')
-- this tests and ensures that the alpha-ness of a background
-- layer is maintained when sprite conversion takes place from
-- Indexed to ... |
local ConfigHelper = Object:extend()
local FileSystem = require("fs")
local Path = require("path")
local Json = require("json")
function ConfigHelper:initialize(ConfigPath)
self.ConfigPath = ConfigPath
self.Settings = {}
self.Order = {}
end
function ConfigHelper:AddSetting(Key, Value)
self.Settings[K... |
do
function run(msg, matches)
local answers = {'It is certain','It is decidedly so','Without a doubt',
'Yes definitely','You may rely on it','As I see it, yes',
'Most likely','Outlook good','Yes','Signs point to yes',
'Reply hazy try again','Ask again later',
... |
local ffi = require('ffi')
local cdt = ffi.load(package.searchpath('c-dt', package.cpath), true)
ffi.cdef [[
// dt_config.h
enum {
/* Chronological Julian Date, January 1, 4713 BC, Monday
#define DT_EPOCH_OFFSET 1721425
*/
/* Network Time Protocol (NTP), January 1, 1900, Monday
#define DT... |
-- ===================================================================
-- This file contains Global functions
-- that can be called from bash scripts
-- ===================================================================
local weekly_review = require('config.workflows.weekly-review')
-- ==============================... |
bh_force_sensitive_crypt_crawler = Creature:new {
objectName = "@mob/creature_names:force_sensitive_crypt_crawler",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "kun",
faction = "",
level = 250,
chanceHit = 0.9,
damageMin = 685,
damageMax = 1080,
baseXp = 19057,
baseHAM = 116000,
baseH... |
----------------------------------------------------------------------
-- hessian.lua: this file appends extra methods to modules in nn,
-- to estimate diagonal elements of the Hessian. This is useful
-- to condition learning rates individually.
----------------------------------------------------------------------
nn.... |
local API = {}
function API.RegisterDialogueId(dialogId)
if not _G.APIDialogsLibrary then
_G.APIDialogsLibrary = {}
end
if not _G.APIDialogsLibrary[dialogId] then
_G.APIDialogsLibrary[dialogId] = {}
else
error("Can't register the same dialog id twice.")
end
end
function AP... |
local common = require('common')
local wikiEncodeURL =
{ -- https://www.w3schools.com/tags/ref_urlencode.asp
enc = {
["Windows-1252"] = {
"%01",
"%02",
"%03",
"%04",
"%05",
"%06",
"%07",
"%08",
"%09",
"%0A",
"%0B",
"%0C",
... |
return {
id = 3,
s1 = "",
s2 = {key='',text=""},
} |
--MoveCurve
--B_30101/curve_RushB curve_RushB
return
{
filePath = "B_30101/curve_RushB",
startTime = Fixed64(0) --[[0]],
startRealTime = Fixed64(0) --[[0]],
endTime = Fixed64(104857600) --[[100]],
endRealTime = Fixed64(629146) --[[0.6]],
isZoom = false,
isCompensate = false,
curve = {
[1] = {
time = 0 --[... |
Dataset = require('datasets/dataset')
local MbDataset, parent = torch.class('MbDataset', 'Dataset')
function MbDataset:__init(self, opt)
parent.__init(parent, self, opt)
self.name='mb'
end
local function createDataset(opt)
return MbDataset:new(opt)
end
function MbDataset:setParams(opt) --parameters for tra... |
object_mobile_rebel_specforce_hum_m = object_mobile_shared_rebel_specforce_hum_m:new {
}
ObjectTemplates:addTemplate(object_mobile_rebel_specforce_hum_m, "object/mobile/rebel_specforce_hum_m.iff")
|
local obj = {}
obj.__index = obj
-- Metadata
obj.name = "weather"
obj.version = "1.0"
obj.author = "Pavel Makhov"
obj.homepage = "https://fork-my-spoons.github.io/"
obj.license = "MIT - https://opensource.org/licenses/MIT"
obj.indicator = nil
obj.timer = nil
obj.api_key = nil
obj.lat = nil
obj.lon = nil
obj.iconPath... |
-- Wiebel instability
Pi = Lucee.Pi
log = Lucee.logInfo
-- physical parameters (two electron streams: "ions" are really electrons!)
gasGamma = 5./3.
elcCharge = -1.0
ionCharge = -1.0
ionMass = 1.0
elcMass = 1.0
lightSpeed = 1.0
epsilon0 = 1.0
mu0 = 1.0
mgnErrorSpeedFactor = 1.0
-- simulation parameters
udrift1 = 0.3... |
------------------------------------------------------------------------
--[[FineCoarseCriterion ]]--
-- Lin Sun 2016@Stanford
------------------------------------------------------------------------
require 'nn'
require 'rnn'
local FineCoarseCriterion, parent = torch.class('nn.FineCoarseCriterion2_bc2', 'nn.Criterion... |
----
-- Tests for the xlsxwriter.lua styles class.
--
-- Copyright 2014, John McNamara, jmcnamara@cpan.org
--
require "Test.More"
require "Test.LongString"
plan(1)
----
-- Tests setup.
--
local expected
local got
local caption
local Styles = require "xlsxwriter.styles"
local Workbook = require "xlsxwriter.workbook... |
local SymbolCache = {}
function SymbolCache.new()
return setmetatable({
__tostring = function (self)
return self.Key
end,
}, SymbolCache)
end
function SymbolCache:__index(index)
local value = setmetatable({
Key = index
}, self)
rawset(self, index, value) -- cache the value so future lookups are cheape... |
require( "iuplua" )
text_field = iup.multiline { expand = "Yes" }
button = iup.button { title = "Push" }
function button:action()
iup.Message( "o.O", "Button pushed" )
return iup.DEFAULT
end
box = iup.vbox { text_field, button }
dialog = iup.dialog { box;
title = "Multi-element dialog",
size = "HalfxHalf"
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.