content stringlengths 5 1.05M |
|---|
--
-- Adds the impersonation headers for kubernetes calls.
--
-- First the a kubernetes token is retrieved from the impersonation auth module. By default
-- this is a service account token. This token is stored in tokens shared dictionary so it doesn't
-- need to be retreived on every request.
-- Next the ICP id toke... |
local AutoBG = {}
_G.AutoBG = AutoBG
local WaitTimer = LibStub("WaitTimer")
AutoBG.ToggleStatus = false
AutoBG.TimerID = 1337
AutoBG.loading_msg = false
function AutoBG.OnLoad(this)
this:RegisterEvent("OPEN_ENTER_BATTLEGROUND_QUERY_DIALOG")
this:RegisterEvent("ON_BATTLEGROUND_CLOSE")
this:RegisterEvent("PLA... |
-- Use a protected call so we don't error out on first use
local status_ok, _ = pcall(require, "dapui")
if not status_ok then
return
end
local dap = require('dap')
vim.fn.sign_define('DapBreakpoint', {text='', texthl='Error', linehl='', numhl=''})
vim.fn.sign_define('DapStopped', { text = 'ﰲ', texthl = 'Success', ... |
-- Don't return true otherwise, as it can affect the simple prop protection thingy on the otherside.
hook.Add("PhysgunPickup","CanTouchGamemodeSpecific",function(pl,ent)
if (ent.Untouchable) then return false end
end) |
--[[ Class for managing the training process by logging and storing
the state of the current epoch.
]]
local EpochState = torch.class("EpochState")
--[[ Initialize for epoch `epoch` and training `status` (current loss)]]
function EpochState:__init(epoch, numIterations, learningRate, lastValidPpl, status)
self.epoc... |
animal_voices = {bunny="silence", cow="moo", cat="meow", dog="woof"}
function speak(animal)
local v = animal_voices[animal]
return v
end |
-- test lua base module
-- such as sting, table
print("Hello world")
str="test";
print(string.len(str)); -- lua string module
print(string.sub(str, 1, 2));
t={11,22,33,44,55};
for k,v in pairs(t) do print(k,v); end
table.remove(t, 3); -- use table module to remove the third element from table t
for k,v in pairs(t)... |
--- @type table<string,Spoon>
spoon = spoon
|
--package.cpath = package.cpath .. ';C:/Users/admin/AppData/Roaming/JetBrains/IdeaIC2020.3/plugins/intellij-emmylua/classes/debugger/emmy/windows/x64/?.dll'
--local dbg = require('emmy_core')
--dbg.tcpConnect('localhost', 9966)
local App = CS.FairyEditor.App
local _pluginPath = PluginPath;
local LuaWriter = require(_p... |
-- Examples Solution
solution "Examples"
configurations { "Debug", "Release" }
location (_ACTION)
-- [start] Settings that are true for all projects
if isVisualStudio then
defines { "WIN32", "_CRT_SECURE_NO_DEPRECATE" }
end
configuration "Debug"
if isVisualStudio then
defines { "_DEBUG" }
... |
local result_type = require("melon.utils.result.result_type")
local json = require("cjson")
local _M = {}
_M.HTTP_MELON_ERROR = 450
function _M.ok(data)
return ngx.say(json.encode(result_type.ok(data)))
end
function _M.illegal_argument(arg_name)
return ngx.say(json.encode(result_type.illegal_argument_error(a... |
return {
id = "pizzabandit",
name = "Pizza Bandit",
description = "Dangerous and tasty!",
type = "hat",
rarity = 2,
hidden = false,
}
|
-- include modules
require("roles")
-- load roles
local rolesPre = "terrortown/entities/roles/"
local rolesFiles = file.Find(rolesPre .. "*.lua", "LUA")
local _, rolesFolders = file.Find(rolesPre .. "*", "LUA")
for i = 1, #rolesFiles do
local fl = rolesFiles[i]
ROLE = {}
local cls = string.sub(fl, 0, #fl - 4)
... |
--[[
CREATE OR REPLACE SCRIPT LIST_USER_ROLES(user_name) RETURNS TABLE AS
--]]
-- [impl->dsn~listing-user-roles~1]
--exit(query([[SELECT u.EXA_USER_NAME, rm.ROLE_NAME FROM ::s.EXA_ROLES_MAPPING rm
--LEFT JOIN ::s.EXA_RLS_USERS u ON BIT_CHECK(u.EXA_ROLE_MASK, rm.ROLE_ID - 1)
--WHERE u.EXA_USER_NAME = :username
--ORDER B... |
--[[
Author: Scott Sullivan 2/23/2020
github: scottmsul
Algorithm Overview
------------------
The algorithm is based on the post here: https://kirkmcdonald.github.io/posts/calculation.html
We solve the matrix equation Ax = b, where:
- A is a matrix whose entry in row i and col j is the output/timescale/building fo... |
---------------------------------------------------------------------------------------------------------
-- Distributed task helper for Tundrawolf
-- Author: aimingoo@wandoujia.com
-- Copyright (c) 2015.09
--
-- Note:
-- *) a interface of task define helper.
-- *) encode/decode fields for local supported object, from/... |
-- resnet.lua
local nn = require 'nn'
require 'math'
require 'cunn'
require 'cutorch'
local Convolution = cudnn.SpatialConvolution
local Avg = cudnn.SpatialAveragePooling
local ReLU = cudnn.ReLU
local Sigmoid = cudnn.Sigmoid
local Max = nn.SpatialMaxPooling
local SBatchNorm = nn.SpatialBatchNormalization
local funct... |
local AheadOfTheCurve = LibStub('AceAddon-3.0'):NewAddon('AheadOfTheCurve', 'AceConsole-3.0', 'AceHook-3.0', 'AceEvent-3.0')
local AceConfigRegistry = LibStub('AceConfigRegistry-3.0')
local keyStoneLink
local defaults = {
global = {
enable = {
addon = true,
override = false,
... |
return function(authors: { string })
return {
type = "SET_AUTHORS",
payload = authors,
}
end
|
--CONSTANTS--
local SOME_CONSTANT = "val"
--REQUIRES--
local req = require("whatever")
--Holds items that are exported
local exports = {}
--Variables and functions should be named lowecase with underscores
--Constants should be all uppercase with underscores
return exports
|
local core = require "sys.core"
local mysql = require "sys.db.mysql"
local json = require "sys/json"
core.start(function()
local id = os.time()
local remindTime = os.time() + 1000
local prop = {}
prop.info = "hi"
local propStr = json.encode(prop)
require "HttpServer"
end)
|
function printtablekeys(t)
for k,v in pairs(t) do
print(k)
end
end
|
-- scraper for youtube
local json = require("json")
local http = require("ssl.https")
local api_key = "AIzaSyDO72B4_jgFVBVMGIgGoB_aikR4g3BUnzs"
local api_base_url = "https://www.googleapis.com/youtube/v3/"
local function table_to_string(t)
local out = ""
for k,v in pairs(t) do
out = out .. k .. ": " .. (type(... |
data:extend({
{
type = "technology",
name = "nuclear-power-2",
icon = "__base__/graphics/technology/nuclear-power.png",
icon_size = 128,
effects =
{
{
type = "unlock-recipe",
recipe = "5d-nuclear-reactor-2"
},
{
type = "unlock-recipe",
recipe ... |
-- functions
function FindFilesRelative(opts)
opts = opts or {}
local themes = require("telescope.themes")
local theme_opts = themes.get_dropdown({
sorting_strategy = "ascending",
layout_strategy = "center",
prompt_prefix = ">> ",
prompt_title = "~ find relative files ~",
cwd = require("telescope.utils").b... |
local name = "cloud-communicator"
local version = "0.1.0"
local registryHost = "r.mysite.io"
local registryRepo = "trogdor-burninator/" .. name
local command = "/usr/local/bin/talk-to-the-cloud"
local provider = "aws"
local installArgs = {"--setup", "--provider", provider, "-f", provider .. "-setup.conf"}
local unins... |
notAllowedModels = {592,577,511,548,512,593,425,520,417,487,553,488,497,563,476,447,519,460,469,
513,510,522,461,448,468,586,581,509,481,462,521,463,472,473,493,595,484,430,453,452,446,454,449,
537,538,570,569,590}
local Keys = {
"delete","tab", "lalt", "ralt"
}
function reset()
veh = getPedOccupiedVehicle(localP... |
-----------------------------------
--
-- tpz.effect.TRICK_ATTACK
--
-----------------------------------
function onEffectGain(target,effect)
end
function onEffectTick(target,effect)
end
function onEffectLose(target,effect)
end
|
atom_type["Va"] = {Z= 0, Zc= 0, Zs= 0, Zv= 0, rad=2}
atom_type["H"] = {Z= 1, Zc= 0, Zs= 0, Zv= 1, rad=2}
atom_type["He"] = {Z= 2, Zc= 2, Zs= 0, Zv= 0, rad=2}
--
atom_type["Li"] = {Z= 3, Zc= 2, Zs= 0, Zv= 1, rad=2}
atom_type["Be"] = {Z= 4, Zc= 2, Zs= 0, Zv= 2, rad=2}
atom_type["B"] = {Z= 5, Zc= 2, Zs= 0, Zv= 3, ... |
local MAJOR_VERSION = "LibDogTag-3.0"
local MINOR_VERSION = 90000 + ((tonumber(("@file-date-integer@"):match("%d+")) or 33333333333333))
if MINOR_VERSION > _G.DogTag_MINOR_VERSION then
_G.DogTag_MINOR_VERSION = MINOR_VERSION
end
local type, error, math, next, pairs, ipairs, select, rawget, setmetatable, _G, assert =... |
local oop = require "lua-circuit-breaker.oop"
local Counters = oop.class()
function Counters:__new()
return {
requests = 0,
total_successes = 0,
total_failures = 0,
consecutive_successes = 0,
consecutive_failures = 0
}
end
function Counters:total_samples()
return self.total_successes + self.total_failur... |
local MinigameController = require("scenes.minigame.MinigameController")
local Controller = class("Controller", MinigameController)
-- Call self:onSuccess() when player wins
-- or self:onFail() when player fails
speed = 120
local net_rx = {
0, 10, 25, 45, 70
}
local net_spd = {
1.8, 1.8, 1.9, 2.0, 2.2
}
funct... |
------------------------------------------------------------------
--
-- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Copyright (C) 2015-2017 Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Licensed according to the included 'LICENSE' document
--
-- This file is part of lua-lluv-gsmmodem library.... |
--[[
* The `Matter.Body` module contains methods for creating and manipulating body models.
* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.
* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.
*
* See... |
-- See LICENSE for terms
return {
PlaceObj("ModItemOptionToggle", {
"name", "EnableMod",
"DisplayName", T(302535920011303, "<color ChoGGi_yellow>Enable Mod</color>"),
"Help", T(302535920011793, "Disable mod without having to see missing mod msg."),
"DefaultValue", true,
}),
PlaceObj("ModItemOptionToggle", {... |
Talk(0, "前辈,我已将段皇爷杀了,请前辈告知”射雕英雄传”一书的下落.", "talkname0", 1);
Talk(66, "你已经把他杀了.....哈!哈!你已经把他杀了,哈!哈!我的仇终于报了.”射雕英雄传”一书是在桃花岛郭靖的手上,要知那桃花岛是黄老邪按五行八卦布置而成的,一般人是很难找到入口的,我就告诉你吧. 它的座标位置是在(341,138).", "talkname66", 0);
ModifyEvent(-2, -2, -2, -2, 422, -1, -1, -2, -2, -2, -2, -2, -2);--by fanyu|启动422脚本。场景21-编号01
OpenScence(75);
do ... |
-- See LICENSE for terms
local mod_StopNotificationCamera
local function ModOptions(id)
-- id is from ApplyModOptions
if id and id ~= CurrentModId then
return
end
mod_StopNotificationCamera = CurrentModOptions:GetProperty("StopNotificationCamera")
end
-- load default/saved settings
OnMsg.ModsReloaded = ModOpti... |
---------------------------------------------------------------
-- Copyright 2021 Deviap (https://deviap.com/) --
---------------------------------------------------------------
-- Made available under the MIT License: --
-- https://github.com/deviap/deviap-main/blob/master/LICENSE --
... |
-- Author Tony Beltramelli www.tonybeltramelli.com - 10/11/2015
require 'torch'
require 'nn'
require 'nngraph'
require 'lfs'
require 'optim'
cmd = torch.CmdLine()
cmd:text()
cmd:text("Options:")
cmd:option("-data_path", "../../data/feature/", "pre-processed data directory")
cmd:option("-output_report", "report", "fil... |
local _ENV = mkmodule('json')
local internal = require 'json.internal'
encode_defaults = {
-- For compatibility with jsonxx (C++)
pretty = true,
indent = '\t',
}
function encode(data, options, msg)
local opts = {}
for k, v in pairs(encode_defaults) do opts[k] = v end
for k, v in pa... |
local debug = function(x) print( require('test/luaunit').prettystr(x) ) end
local is = function (what, node)
return node ~= nil
and (type(node) == "table" and node[1] == what)
end
return function (tree)
local s = {
globalTags = {},
state = {
visitCount = {},
}
}
local pointer = 1
loca... |
includedirs { '../voip-mumble/include' }
libdirs { '../voip-mumble/lib' }
links { 'avutil', 'swresample' }
links { 'runtimeobject' }
linkoptions '/DELAYLOAD:ole32.dll /DELAYLOAD:api-ms-win-core-winrt-error-l1-1-1.dll /DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll /DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll /DELAYLO... |
local Noise_PATH =({...})[1]:gsub("[%.\\/]noise$", "") .. '/'
local class =require (Noise_PATH .. 'vendor/30log')
local Noise=class{ __name }
function Noise:__init()
self.__name='Noise'
end
function Noise:get(x, y) end
return Noise
|
require "components.UI_Mod_UIPanel"
UI_Mod_UIEntry = Object:extend()
local UI_MOD_NAME = "ui_mod_"
------------------------------------------------------------
-- 主界面按钮
------------------------------------------------------------
function UI_Mod_UIEntry:createMenuButton()
local parent = find_uicomponent(
... |
local function OnTimerDone(inst, data)
if data.name == "foodspoil" then
inst.components.trap:OnTrappedStarve()
end
end
local Trap = Class(function(self, inst)
self.inst = inst
self.bait = nil
self.issprung = false
self.isset = false
self.range = 1.5
self.targettag = "smallcrea... |
local moon = require("moon")
local M = {}
M.__index = M
function M.new()
local obj = {
n = 0
}
return setmetatable(obj,M)
end
function M:func()
print("after", self.n)
self.n=self.n-1
moon.sleep(1000)
end
return M |
function save()
mydata = {
"nick='João'",
"age=24",
"health='20'",
"level='2'"
};
mysavedata = table.concat(mydata, "[SEPARATOR]"); --legacy: mydata:implode() broke
spaces = { "DATA0", "DATA1", "DATA2" };
saveplace = {gameid="DEMODEV1", savenames=spaces};
s... |
BigWigs:AddSounds("General Husam", {
[83113] = "Alert",
[83445] = "Info",
[91263] = "Alarm",
})
BigWigs:AddSounds("Lockmaw", {
[81690] = "Alert",
})
BigWigs:AddSounds("High Prophet Barim", {
[82622] = "Alarm",
})
BigWigs:AddSounds("Siamat", {
["servant"] = "Alert",
["stages"] = "Info",
})
|
local TextService = game:GetService("TextService")
local CorePackages = game:GetService("CorePackages")
local ContextActionService = game:GetService("ContextActionService")
local InGameMenuDependencies = require(CorePackages.InGameMenuDependencies)
local Roact = InGameMenuDependencies.Roact
local UIBlox = InGameMenuDe... |
-- Better Sonic Debug Script
-- Allows to toggle debug and slow motion flags,
-- Original script by: deltaphc
-- Modified by: Chrezm
function sr_debug()
local v = mem_read_ubyte(DEBUG_FLAG)
mem_write_ubyte(DEBUG_FLAG,1-v)
end
function sr_slowmotion()
local v = mem_read_ubyte(SLOWMO_FLAG)
mem_write_ubyte(SLOWMO_... |
ITEM.name = "Flash"
ITEM.model ="models/lostsignalproject/items/artefacts/glass.mdl"
ITEM.description = "A small, light blue orb that glows with a yellow sheen."
ITEM.longdesc = "When the artifact is shaken, it will discharge a powerful shock into the hand of the person holding it and everyone standing close by. Scient... |
-- 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 writing, software
-- distributed ... |
--[[
local c_schedule = CS.SGK.CoroutineService.Schedule;
local repeat_schedule_list = {};
local onece_schedule_list = {};
local schedule_tick = 0;
local schedule_pass = 0;
local profiler = require "perf.profiler"
c_schedule(function()
profiler.start();
for _, v in ipairs(repeat_schedule_list) do
AS... |
--- The root LTML module provides functions to compile, execute and render templates.
-- @module ltml
local ltml = {}
local sandbox = require("ltml.sandbox")
local utils = require("ltml.utils")
local render = require("ltml.render")
function ltml.execute(template, data, name)
return ltml.compile(template, name)(... |
local IGenerator = require("api.test.gen.IGenerator")
local IntGen = require("api.test.gen.IntGen")
local Rand = require("api.Rand")
local UnicodeGen = class.class("UnicodeGen", IGenerator)
local function is_reserved(cp)
if cp < 0 or cp > 0x10FFFF then
return true
end
if cp >= 0xDC00 and cp <= 0xDFFF ... |
--- Returns the future position assuming no external forces are acting on the body
-- @x, @y Current position at the beginning of the time step
-- @lvx, lvy Current linear velocity at the beginning of the time step
-- @damping Linear damping
-- @gx, gy Gravity
-- @dt Time step
-- @return Fut... |
--- @module MainGui 房间设置的UI模块
--- @copyright Lilith Games, Avatar Team
--- @author An Dai
local MainGui = ModuleUtil.New('MainGui', ClientBase)
local self = MainGui
local indexToColor = {
Color(255,43,103,255),
Color(255,80,80,255),
Color(255,134,53,255),
Color(252,194,93,255),
Color(255,216,1,255),
Color(196,22... |
package("srt")
set_homepage("https://www.srtalliance.org/")
set_description("Secure Reliable Transport (SRT) Protocol")
add_urls("https://github.com/Haivision/srt/archive/refs/tags/$(version).tar.gz",
"https://github.com/Haivision/srt.git")
add_versions("v1.4.2", "28a308e72dcbb50eb2f61b50... |
--
-- ow.lua
-- Provides Open Watcom-specific configuration strings.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
premake.ow = { }
premake.ow.namestyle = "windows"
--
-- Set default tools
--
premake.ow.cc = "WCL386"
premake.ow.cxx = "WCL386"
premake.ow.ar = "ar"
--
-- Transla... |
local class = require 'ext.class'
local table = require 'ext.table'
local Binary = require 'symmath.op.Binary'
local mod = class(Binary)
mod.precedence = 3
mod.name = '%'
mod.nameForExporterTable = {}
mod.nameForExporterTable.LaTeX = '\\mod'
--[[
d/dx[a%b] is da/dx, except when a = b * k for some integer k
--]]
fun... |
#!/usr/bin/env lua
--[[
@filename example3.lua
@version 1.0
@autor Máster Vitronic <mastervitronic@gmail.com>
@date Fri Mar 12 03:47:42 -04 2021
@licence MIT licence
]]--
--[[
On an alsa capable system, plays an audio file starting 10 seconds in.
Copes with sample-rate and channel change if necessa... |
local maxVelocity = 25.0
local idleRadius = 0.10
local pushForce = 50.0
local dirVariation = 0.5
local pushVariation = 0.2
local physics = object:GetPhysics()
local transform = object:GetTransform()
function Idle()
if (physics.velocity == zero_vec3())
then
physics:ApplyForce(normalize(random_vec3(-100.... |
local R = require "rigel"
local types = require "types"
local J = require "common"
local C = require "generators.examplescommon"
local SDF = require "sdf"
local AXI = require "generators.axi"
local RM = require "generators.modules"
local G = require "generators.core"
local Bjump = {}
-- a direct mapped cache, with 'se... |
-- INIT
local args = {...}
local screen = require("screen")
local fs = require("filesystem")
-- Boot
for _, file in ipairs(fs.list("boot")) do
dofile("boot/" .. file)
end
local event = require("event")
local term = require("term")
-- not really the fanciest way
local function init()
while true do
do... |
-- Copyright (C) 2013 Matthieu Tourne
-- @author Matthieu Tourne <matthieu@cloudflare.com>
-- small overlay over shdict, smart cache load mechanism
local M = {}
local resty_lock = require("resty.lock")
local DEBUG = false
-- defaults in secs
local DEFAULT_POSITIVE_TTL = 10 -- cache for, successful lookup
local... |
local cjson = require("cjson");
local http = require("http");
local isub = string.sub;
local ilen = string.len;
local dyn_lib = require("suma_basecom_action");
_M = {
["aaa_url"] = "http://127.0.0.1/"
}
_M.allowInstall = function ()
local state = require("suma_main_state");
if state.aaa_option.url then... |
-- dep
local ansicolors = require 'ansicolors'
local lfs = require 'lfs'
-- gin
local Gin = require 'gin.core.gin'
local BaseLauncher = require 'gin.cli.base_launcher'
local helpers = require 'gin.helpers.common'
-- settings
local nginx_conf_source = 'config/nginx.conf'
local GinLauncher = {}
-- convert true|false... |
local files = require 'files'
local vm = require 'vm'
local lang = require 'language'
local config = require 'config'
local guide = require 'core.guide'
local function check(src, uri, callback)
local key = guide.getKeyName(src)
if not key then
return
end
if config.config.diagnostic... |
mobs:register_mob("mobs:blacksmith",{
type = "npc",
hp_min = 30,
hp_max = 75,
exp_min = 0,
exp_max = 0,
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
visual = "mesh",
mesh = "3d_armor_character.x",
textures = {"mobs_blacksmith.png",
"3d_armor_trans.png",
minetest.registered_items["cottages:hammer"... |
#!/usr/bin/env lua
math.randomseed(os.time())
for i = 1, 10 do
local file = io.open(string.format("sample%02d.data", i), "w")
for j = 1900, 2014 do
local t = math.random(100) + 20
file:write(string.format("%d\t%d\n", j, t))
end
file:close()
end
|
---------------------------------------------------------------------------------------------------
-- func: setlocalvar <varName> <player/mob/npc> <ID>
-- desc: set player npc or mob local variable and value.
---------------------------------------------------------------------------------------------------
cmdprops ... |
local A, GreyHandling = ...
local playerName=UnitName("player")
local realmName=GetRealmName()
GreyHandling.data.playerNameWithoutServer = playerName
GreyHandling.data.playerNameWithServer = format("%s-%s", playerName, string.gsub(realmName, "%s+", ""))
if GreyHandling.IS_CLASSIC then
GreyHandling.data.playerName = ... |
require "torch"
require "nn"
require "nngraph"
require "optim"
function reverse_list( w_list )
local s = 1
local e = #w_list
while (s < e) do
local t = w_list[s]
w_list[s] = w_list[e]
w_list[e] = t
s = s + 1
e = e - 1
end
end
function combine_all_parameters(...)
--[[ like module:getPar... |
require("MainEntry")
describe("FormDB", function()
it("should be a top level table", function()
assert.truthy(_G["FormDB"])
assert.True(type(_G["FormDB"]) == "table")
end)
end)
describe("Data access", function()
describe("Allow setting values by path", function()
it("should allow setting differet types trans... |
--[[
# Copyright 2001-2014 Cisco Systems, Inc. and/or its affiliates. All rights
# reserved.
#
# This file contains proprietary Detector Content created by Cisco Systems,
# Inc. or its affiliates ("Cisco") and is distributed under the GNU General
# Public License, v2 (the "GPL"). This file may also include Detector Co... |
require("gameData/gameData")
FlagCommonData = class(GameData)
FlagCommonData.Delegate = {
}
FlagCommonData.initData = function(self)
end
FlagCommonData.loadDictData = function(self, dict)
local strData = dict:getString("info")
self.m_info = json.decode(strData) or {}
end
FlagCommonData.saveDic... |
return {
talon_ach = {
acceleration = 0.48,
brakerate = 0.048,
buildcostenergy = 14398,
buildcostmetal = 588,
builddistance = 225,
builder = true,
buildpic = "talon_ach.dds",
buildtime = 25000,
canguard = true,
canhover = true,
canmove = true,
canpatrol = true,
canreclamate = 1,... |
---@class UnityEngine.Animation : UnityEngine.Behaviour
---@field clip UnityEngine.AnimationClip
---@field playAutomatically bool
---@field wrapMode UnityEngine.WrapMode
---@field isPlaying bool
---@field Item UnityEngine.AnimationState
---@field animatePhysics bool
---@field cullingType UnityEngine.AnimationCullingTyp... |
-------------------------------------------------------------------------------
-- LISTENER by Tammya-MoonGuard (2018)
--
-- This module handles slash commands.
-------------------------------------------------------------------------------
local Main = ListenerAddon
local L = Main.Locale
function Main.ToggleComma... |
--[[
Graphite for Lua
Dictionary
Copyright (c) 2014 Lucien Greathouse (LPGhatguy)
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use this software ... |
require 'image'
require 'torch'
require 'super_resolution.InstanceNormalization'
require 'math'
local utils = require 'super_resolution.utils'
local gm = require 'graphicsmagick'
local cmd = torch.CmdLine()
-- Generic options
cmd:option('-test_dataset',"/home/lixiaojie/Data/Set5/image_SRF_4/")
-- Super-resolution op... |
local showingWarning = false
local lastSpeed = 0
local lastVelocity = vector3(0, 0, 0)
local newbieBeep = true
local showHelp = false
local activated
local hasSeatbelt
RegisterKeyMapping('seatbelt', 'Seatbelt', 'keyboard', Constants.DefaultKeybind)
RegisterFrameworkCommand('seatbelt', function()
local ped = PlayerPe... |
ITEM.name = "Kolobok"
ITEM.model ="models/nasca/etherealsrp_artifacts/kolobok.mdl"
ITEM.description = "Very spikey artifact."
ITEM.longdesc = "A relatively rare artifact forming in chemical areas, Kolobok is highly valued for its ability to heal most kinds of wounds and stop bleeding in a matter of minutes. For unknown... |
require 'gnuplot'
require 'os'
require 'paths'
require 'torch'
local tester = torch.Tester()
local tests = {}
-- Returns a random string of lowercase digits
local function randomFilenameStr()
local t = {}
for i = 1, 10 do
table.insert(t, string.char(math.random(97, 122)))
end
return table.concat(t)
... |
local enclosures = {
[1] = {
name = "Los Bloods",
weapon = {x= 1398.758, y= 1147.022, z= 115.333},
garage = {x= 1398.303, y= 1118.317, z= 115.837},
spawnCar = {x= 1407.55, y= 1118.62, z= 115.83},
saveCar = {x= 1413.39, y= 1118.42, z= 115.83 },
attack = {x= -143.12, y= -1609.22, z= 35.12},
spawnHeli = {x... |
local INITIAL_RECURSIVE = {
deployers = {},
chests = {},
outputs = {},
blueprints = {},
deploy_cache = {},
to_be_mined = {}
}
function on_init()
--global.recursive = tdc( INITIAL_RECURSIVE )
--not needed, because it is done in on_mods_changed()
on_mods_changed()
end
function on_mods_changed()
if not glo... |
function onEvent(name,value1,value2)
if name == "Set Cam Zoom" then
if value2 == '' then
setProperty("defaultCamZoom",value1)
debugPrint(value2 )
else
doTweenZoom('camz','camGame',tonumber(value1),tonumber(value2),'sineInOut')
end
end
end
function onTwee... |
local Target = nil
local targetPosition = nil
local lockedOn = false
local ForwardCamera = script:GetCustomProperty("ForwardCamera"):WaitForObject()
local Reticle = script:GetCustomProperty("Reticle"):WaitForObject()
local targetName = Reticle:GetCustomProperty("TargetName"):WaitForObject()
local Targetting = script:Ge... |
local cunnxtest = {}
local precision_forward = 1e-6
local precision_backward = 1e-6
local nloop = 50
local times = {}
local cunntestx = {}
--e.g. usage: th -lcunnx -e "nn.testcudax{'SoftMaxTree','BlockSparse'}"
local function round(a)
if (a - math.floor(a)) >= 0.5 then
return math.ceil(a)
end
return ma... |
AddCSLuaFile()
SWEP.Base = "weapon_obj_base"
SWEP.Name = "Disguise"
SWEP.PrintName = "Disguise"
SWEP.AbilityDuration = 20
SWEP.AbilityDescription = "Transforms you into a random hunter for $AbilityDuration seconds."
function SWEP:Ability()
local ply = self:GetOwner()
self:AbilityTimerIfValidOwner(self.Abilit... |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
release_mechanism_duration_advanced = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/component/chemistry/release_mechanism_duration_advanced.iff",
craftingValues = {
{"power", 15,30,0},
{"u... |
require "Polycode/EventDispatcher"
class "Core" (EventDispatcher)
Core.EVENTBASE_CORE = 0x200
Core.EVENT_CORE_RESIZE = Core.EVENTBASE_CORE + 0
Core.EVENT_LOST_FOCUS = Core.EVENTBASE_CORE + 1
Core.EVENT_GAINED_FOCUS = Core.EVENTBASE_CORE + 2
Core.EVENT_UNDO = Core.EVENTBASE_CORE + 3
Core.EVENT_REDO = Core.EVENTBASE_CO... |
local TruckerIndex = 0
local MissionTruckerIndex = 0
AddEventHandler("vmenu:TransportOG", function(target, index)
local index = index
VMenu.ResetMenu(13, "Livraison", "default")
VMenu.AddMenu(13, "Livraison", "default")
if index == 0 then
VMenu.AddFunc(13, "Citerne", "transporter:optionMission", {0}, "Choi... |
local farmerColSphare = createColRectangle(-1185.1004638672, -1050.79364013672, 150, 130)
local farmerColSphare2 = createColRectangle(-1180, -1230, 90, 70)
local farmerColSphare3 = createColRectangle(677, 1952, 51, 57)
local radararea3 = createRadarArea(677, 1952, 61, 67, 255, 255, 0)
local radararea = createRadarAre... |
surface.CreateFont('BWScoreboardGenText', {font = 'Tahoma', size = 16})
surface.CreateFont('BWScoreboardPlayerName', {font = 'Tahoma', size = 20})
local scoreboard
function GM:ScoreboardShow()
--frame
local frame = vgui.Create('DFrame')
frame:SetSize(ScrW() -150, ScrH() -200) --850, 600 (250 dif.)
frame:SetTitle('... |
local shaderdata = {}
shaderdata.shader = love.graphics.newShader[[
extern vec4 color1;
extern vec4 color2;
extern vec4 color3;
extern vec4 color4;
vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ){
vec4 pixel = Texel(texture, texture_coords );//Th... |
RenderedSuggestion = mondelefant.new_class()
RenderedSuggestion.table = 'rendered_suggestion'
RenderedSuggestion.primary_key = { "suggestion_id", "format" }
RenderedSuggestion:add_reference{
mode = 'm1',
to = "Suggestion",
this_key = 'suggestion_id',
that_key = 'id',
ref ... |
require('utils')
require('Object')
Player = Object:new{}
local scale = 2/5
-- Load up those sprites
Player.sprites = {
stand = 'bunny1_stand.png',
walk1 = 'bunny1_walk1.png',
walk2 = 'bunny1_walk2.png'
}
local spriteDirectory = 'assets/PNG/Players/'
for sprite, file in pairs(Player.sprites) do
Player.sprites... |
--[[
Copyright 2016 Whizzbang Inc
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 writin... |
local defaultConfig = {
ScreenFilter = 1,
JudgeType = 1,
AvgScoreType = 0,
GhostScoreType = 1,
DisplayPercent = true,
TargetTracker = true,
TargetGoal = 93,
TargetTrackerMode = 0,
JudgeCounter = true,
ErrorBar = 1,
leaderboardEnabled = false,
PlayerInfo = true,
FullProgressBar = true,
MiniProgressBar =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.