content stringlengths 5 1.05M |
|---|
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style 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.
--]]
local MPI = require("... |
P['--[[%= name %]]'] = function(_ENV, ...)
--[[%= body %]]
end
|
--[[
A simple sample game for Corona SDK.
http://coronalabs.com
Made by @SergeyLerg.
Licence: MIT.
]]
-- Don't show pesky status bar.
display.setStatusBar(display.HiddenStatusBar)
local particleDesigner = require('particle_designer')
-- Screen size.
local _W, _H = display.contentWidth, display.contentHeight
-- Scre... |
local M = {}
local Log = require "core.log"
local myvim_lsp_utils = require "lsp.utils"
local lspconf = require("lspconfigx")
function M.init_defaults(languages)
for _, entry in ipairs(languages) do
if not lspconf.lang[entry] then
lspconf.lang[entry] = {
formatters = {},
linters = {},
... |
local multiliner =
function(self, node)
local printer = self.printer
printer:request_clean_line()
printer:add_curline('function')
if not self:process_node(node.params) then
return
end
printer:request_clean_line()
return self:process_block_multiline(nil, node.body, 'end')
end
ret... |
local abstk = require 'abstk'
local wizard = abstk.new_wizard("My First AbsTK Wizard")
local scr1 = abstk.new_screen("Page 1")
local scr2 = abstk.new_screen("Page 2")
local scr3 = abstk.new_screen("Page 3")
scr1:add_image('logo', 'images/abstk_logo.png')
scr1:add_label('hellow', "Hello, World!")
scr1:add_label('msg1', ... |
local common = require("common")
local S = 4 -- Start node ID in towns list
local T = {"A", "B", "C", "D"}
local W = {
A = {A = 0 , B = 20, C = 38, D = 61},
B = {A = 20, B = 0 , C = 1, D = 34},
C = {A = 27, B = 60, C = 0 , D = 16},
D = {A = 35, B = 34, C = 12, D = 0 }
}
local function trSum(v... |
local M = {}
function M.bootstrap()
local fn = vim.fn
local install_path = fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system {
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.... |
--- This is the event handling a /search command
-- @classmod SearchCommandEvent
-- region imports
local class = require('classes/class')
local prototype = require('prototypes/prototype')
require('prototypes/event')
require('prototypes/serializable')
local simple_serializer = require('utils/simple_serializer')
loca... |
local user_id = ARGV[1];
local token = ARGV[2];
if redis.call('SREM', 'online:token', token) ~= 0 then
if redis.call('HINCRBY', 'online:count', user_id, -1) == 0 then
redis.call('ZREM', 'online:user_id', user_id)
return 1
end
end
return 0
|
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local A = E:NewModule('Auras', 'AceHook-3.0', 'AceEvent-3.0');
local LSM = LibStub("LibSharedMedia-3.0")
--Cache global variables
--Lua functions
local GetTime = GetTime
local select, unpack = select, unpack
local t... |
-- ----------------------------------------------
-- Copyright (c) 2018, CounterFlow AI, Inc. All Rights Reserved.
-- author: Randy Caldejon <rc@counterflowai.com>
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE.txt file.
-- --------------------------------------------... |
return {
nefia = {
level = function(_1) return ("%s層"):format(ordinal(_1)) end,
prefix = {
_0 = {
_0 = function(_1) return ("はじまりの%s"):format(_1) end,
_1 = function(_1) return ("冒険者の%s"):format(_1) end,
_2 = function(_1) return ("迷いの%s"):format(_1) end,
... |
POINTCLOUD_MINZOOM = 0.5
POINTCLOUD_MAXZOOM = 5
POINTCLOUD_MODE_CUBE = 1
POINTCLOUD_MODE_POINTS = 2
POINTCLOUD_MODE_HOLOGRAM = 3
POINTCLOUD_SAMPLE_NONE = 0
POINTCLOUD_SAMPLE_NOISE = 1
POINTCLOUD_SAMPLE_FRONTFACING = 2
POINTCLOUD_SAMPLE_AUTOMAP = 3
POINTCLOUD_SAMPLE_SWEEPING = 4
POINTCLOUD_SAMPLE_SATMAP ... |
-- Author: Divran
local Obj = EGP:NewObject( "CircleOutline" )
Obj.angle = 0
Obj.size = 1
Obj.fidelity = 180
local cos, sin, rad = math.cos, math.sin, math.rad
Obj.Draw = function( self )
if (self.a>0 and self.w > 0 and self.h > 0) then
if EGP:CacheNeedsUpdate(self, {"x", "y", "w", "h", "angle", "fidelity"}) then
... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' 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... |
-- Copyright (c) 2017 Phil Leblanc -- see LICENSE file
------------------------------------------------------------------------
--[[
=== henat module -- wrap OS native commands
-- Complement os.execute() - (poor man's popen3, popen4)
execute2 same as execute, with stdin and stdout redirected to tmp files
execut... |
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 1945 then
local stonePosition = Position(32849, 32282, 10)
local stoneItem = Tile(stonePosition):getItemById(1304)
if stoneItem then
stoneItem:remove()
stonePosition:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
item:tr... |
-- Path related utils
local M = {}
-- Concatenate paths with '/'
M.concat = function(...)
return vim.fn.glob(table.concat({ ... }, '/'))
end
-- Check whether directory exist on path
M.dir_exists = function(path)
return vim.fn.isdirectory(vim.fn.glob(path)) == 1
end
-- Check whether file exists on path
M.file_exi... |
local StoryConfig = require "config.StoryConfig"
local HeroWeaponStage = require "hero.HeroWeaponStage"
local ItemHelper = require "utils.ItemHelper";
local UserDefault = require "utils.UserDefault";
local Time = require "module.Time"
local npcConfig = require "config.npcConfig"
local System_Set_data=UserDefault.Load("... |
function selection_sort(arr)
local result = {}
while #arr > 0 do
local min = arr[1]
local index = 1
for i,v in ipairs(arr) do
if v < min then
index = i
min = v
end
end
table.insert(result, min)
table.remove(arr, index)
end
return result
end
function insertion_sort(arr)
local result... |
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(10000)
condition:setOutfit({lookType = 65})
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:addCondition(condition)
player:say('You are now disguised as a mummy for 10 seconds. Hurry up and scare the caliph!', TALKTYPE_M... |
{{/*
This command allows users to flag messages by reacting with a custom emoji.
Recommended trigger: Reaction trigger on REACTION ADD only.
*/}}
{{/* CONFIGURATION VARIABLES START */}}
{{ $reportEmoji := 675512907391434759 }} {{/* ID of report emoji */}}
{{ $reportChannel := 675513854888771595 }}
{{/* CONFIGURATIO... |
local M = {}
M.__index = M
M.tools = {
lua = {
busted = { separator = " ", default = true },
},
go = {
go_test = { separator = "/", default = true, display_name = "go test" },
},
typescript = {
jest = { separator = " ", default = true },
},
javascript = {
jest = { separator = " ", default... |
---@diagnostic disable: undefined-global
-- GENERATE BY _TalentGen.js
select(2,...).TalentMake()D'enUS/koKR/frFR/deDE/zhCN/esES/ruRU/ptBR/itIT'C'WARRIOR'T('WarriorArms',23)N'Arms/무기/Armes/Waffen/武器/Armas/Оружие/Armas/Arms'I(1,1,3,124)R{12282,12663,12664}I(1,2,5,130)R{16462,16463,16464,16465,16466}I(1,3,3,127)R{12286,12... |
#!/usr/bin/env lua
package.path = package.path..";../?.lua"
local glfw = require("moonglfw")
local gl = require("moongl")
local glmath = require("moonglmath")
local new_plane = require("common.plane")
local texture = require("common.texture")
local vec3, vec4 = glmath.vec3, glmath.vec4
local mat3, mat4 = glmath.mat3, ... |
module:depends"http"
local jid_split = require "util.jid".split;
local jid_prep = require "util.jid".prep;
local stanza = require "util.stanza";
local test_password = require "core.usermanager".test_password;
local b64_decode = require "util.encodings".base64.decode;
local formdecode = require "net.http".formdecode;
l... |
object_tangible_loot_misc_smuggler_crate = object_tangible_loot_misc_shared_smuggler_crate:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_misc_smuggler_crate, "object/tangible/loot/misc/smuggler_crate.iff")
|
workspace "UtopianEngine"
configurations { "Debug", "Release" }
language "C++"
cppdialect "C++17"
platforms "x64"
startproject "Editor"
characterset "ASCII"
buildoptions "/Zc:__cplusplus"
-- Defines
defines
{
"BT_USE_DOUBLE_PRECISION",
"GLM_FORCE_CTOR_INIT",
"WIN32",
... |
local Gui3 = ...
Gui3.Checkbox = class("Gui3.Checkbox", Gui3.Element)
Gui3.Checkbox.checkBoxPadding = 2
function Gui3.Checkbox:initialize(x, y, s, padding, func, val)
self.s = s
self.padding = padding or 0
local w, h = 10+self.padding*2, 10+self.padding*2
if self.s then
w = w + #self.s*8 + s... |
DefineClass.MoholeMine = {
__parents = { "ResourceProducer", "BaseHeater", "Building", "ElectricityConsumer", "OutsideBuildingWithShifts" },
exploitation_resource = "Metals",
heat = 2*const.MaxHeat,
additional_stockpile_params3 = {
apply_to_grids = false,
has_platform = true,
snap_to_grid = false,
prio... |
---@brief [[
---classic
---
---Copyright (c) 2014, rxi
---@brief ]]
---@class Object
local Object = {}
Object.__index = Object
---Does nothing.
---You have to implement this yourself for extra functionality when initializing
---@param self Object
function Object:new()
end
---Create a new class/object by extending th... |
-- Gem class
-- LGPL Juan Belón Pérez
-- videojuegos.ser3d.es
-- 2011
Gem = class()
GEM_BAR = 0
GEM_LIVE = 1
GEM_DIE = 2
GEM_EXPLODE= 3
GEM_FALL = 4
GEM_BORN = 5
GEM_WAIT = 6
GEM_REGEN = 7
function Gem:init(x,y,seedGen,empty)
self.x = x
self.y = y
self.yo= 0 -- destiny y for falling animation
self.color = color(... |
dofile("GetVarObject")
local id = getvarobject("nfr2", "units", "UNITS_UNIT_EVENT", true)
local indexval = getvarobjectvalue("ABILITIES_UNIT_INDEXER")
createobject("nfr2", id)
makechange(current, "unam", "Unit Event")
makechange(current, "unsf", "(Unit Event)")
makechange(current, "upat", "")
makechange(current, ... |
local M = {}
M.filter = function(tbl, f)
local t = {}
for _,v in pairs(tbl) do
if f(v) then
table.insert(t, v)
end
end
return t
end
M.map = function(tbl, f)
local t = {}
for k,v in pairs(tbl) do
t[k] = f(v)
end
return t
end
M.foreach = function(tbl,... |
local cache = require 'cache'
-- this module will periodically refresh the jwt token from the cooke to extend the session lifetime
local jwt_auto_refresh = require 'subzero.jwt_auto_refresh'
jwt_auto_refresh.configure({
rest_prefix = '/rest',
refresh_uri = '/rpc/refresh_token',
excluded_uris = {'/rpc/login... |
require('plugins.autocomplete')
require('plugins.treesitter')
require('plugins.blankline')
require('plugins.gitsigns')
require('plugins.tree')
require('plugins.telescope')
|
--[[
Copyright (c) 2015 深圳市辉游科技有限公司.
--]]
require 'socket'
require 'GlobalSettings'
local utils = require('utils.utils')
local cjson = require('cjson.safe')
local _audioInfo = ddz.GlobalSettings.audioInfo
local display = require('cocos.framework.display')
local LandingScene = class("LandingScene")
function LandingS... |
--[[
Mod MacroPlantas para Minetest
Copyright (C) 2017 BrunoMine (https://github.com/BrunoMine)
Recebeste uma cópia da GNU Lesser General
Public License junto com esse software,
se não, veja em <http://www.gnu.org/licenses/>.
Mudanças nas plantas de farming
]]
-- Mudança no potencial alimenti... |
local cameraActive = false
local currentCameraIndex = 0
local currentCameraIndexIndex = 0
local createdCamera = 0
vRP = Proxy.getInterface("vRP")
vrpscams = {}
Tunnel.bindInterface("vrpscams", vrpscams)
SCServer = Tunnel.getInterface("vrpscams","vrpscams")
Citizen.CreateThread(function()
while true do
fo... |
--[[
cargBags: An inventory framework addon for World of Warcraft
Copyright (C) 2010 Constantin "Cargor" Schomburg <xconstruct@gmail.com>
cargBags is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either ve... |
require 'plugins.clap.keymap'
require 'plugins.clap.setting'
|
local require = require
local builder = require "oil.builder"
local arch = require "oil.arch.basic.server"
module "oil.builder.lua.server"
ServantManager = arch.ServantManager {require "oil.kernel.base.Servants",
dispatcher = require "oil.kernel.lua.Dispatcher"}
function create(comps)
re... |
local yapre = yapre
local world_flappy_duck = {}
local core = require("core")
local yecs = core.yecs
yecs.Behavior:Register("world_flappy_duck_duck_behavior", {
OnInit = function(self)
self.tags["duck"] = true
self.size = {
width = 32,
height = 32
}
self:Set... |
BigWigs:AddColors("Houndmaster Braun", {
[-5611] = {"green","yellow"},
[114259] = "orange",
})
BigWigs:AddColors("Armsmaster Harlan", {
["blades"] = {"orange","yellow"},
["cleave"] = "yellow",
["help"] = "orange",
})
BigWigs:AddColors("Flameweaver Koegler", {
[113364] = "red",
[113641] = {"green","yellow"},
... |
--- Tweening class.
-- This class serves as a base class for all types of tweenings. Tweenings are
-- used to interpolate between set of numeric values during some period of time.
--
-- @classmod Tweening
--- Get interpolated value for given time.
-- @number timeVal Time, in seconds
-- @treturn number Interpolated val... |
local playsession = {
{"madieboyd", {2524}},
{"Sovereign9000", {395342}},
{"firstandlast", {248803}},
{"larsy7", {395186}},
{"pomabroad", {395109}},
{"Kevin99", {1863}},
{"Ed9210", {255943}},
{"ksb4145", {294564}},
{"adee", {50465}},
{"Frosty1098", {3858}},
{"Chaoskiller", {76246}},
{"ValidusVirtu", {393203... |
s = Procedural.Shape():addPoint(0, 0):addPoint(-0.5, -1.0):addPoint(-0.75, 1):addPoint(0, 0.5)
s:rotate(Procedural.Radian(Procedural.Math_HALF_PI/2))
tests:addShape(s) |
--This is a rank table
--There could be multiple tables to generate spawns from
local Rikti_Ranks_01 = {
["Underlings"] = {
--NA
},
["Minions"] = {
"Lost_01", "Lost_02", "Lost_03",
"Lost_04", "Lost_05", "Lost_06",
"Lost_07", "Lost_08", "Lost_09",
... |
--[[
Copyright (C) 2014-2015 Masatoshi Teruya
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, p... |
local skynet = require "skynet"
local socket =require "socket"
local CMD = {}
local gate=...
local function validate( )--验证是否存在用户
-- body
end
function login( fd )登录
-- 判断是否登录成功 {"login","username","password"}
local judge = true--validate( )
if judge then
local player=skynet.newservice("playeragent")
sky... |
-- Blinks led on P0 / pin11
-- Exits after 10 blinks
local gpio = require("GPIO")
local sleep = function(seconds)
os.execute("sleep "..tostring(seconds).."s")
end
gpio.setmode(gpio.BOARD)
gpio.setup(11, gpio.OUT)
for i = 1,10 do
gpio.output(11, gpio.HIGH)
sleep(0.3)
gpio.output(11, gpio.LOW)
sleep(0.3... |
local tArgs = {...}
local PACKAGE_REPO_URL = "https://raw.githubusercontent.com/blunty666/CC-Programs-and-APIs/master/installer/packages/"
local DOWNLOADER_URLS = {
raw = "https://raw.githubusercontent.com/blunty666/CC-Programs-and-APIs/master/installer/downloaders/raw.lua",
github = "https://raw.githubusercontent.... |
object_draft_schematic_structure_kashyyyk_treehouse = object_draft_schematic_structure_shared_kashyyyk_treehouse:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_structure_kashyyyk_treehouse, "object/draft_schematic/structure/kashyyyk_treehouse.iff")
|
--[[
@author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com>
@copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com>
@license MIT
]]--
addCommandHandler("spawn", function(el,md)
if not getAdmin(el) then return end local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setE... |
roofblocks = {}
minetest.register_node('roofblocks:roofclay', {
description = 'Clay Tiles Roof',
tiles = {'roofblocks_clay.png'},
groups = {choppy=1,oddly_breakable_by_hand=2,flammable=3},
})
minetest.register_node('roofblocks:roofslates', {
description = 'Slates Roof',
tiles = {'roofblocks_slate.png'},
groups ... |
return function(Sunshine, entity)
local box = entity.box
local frame = entity.frame
local visible = entity.visible
local uiTransform = entity.uiTransform
local parent = entity.parent
if box and uiTransform then
local alreadySetText = false
local boxInstance = Instance.new("TextB... |
require 'xlua'
require 'json'
file = io.open(opt.outFile,'w')
function extract()
cutorch.synchronize()
for i=1, nExtract/opt.batchSize do -- nExtract is set in data.lua
collectgarbage()
xlua.progress(i, nExtract/opt.batchSize)
local indexStart = (i-1) * opt.batchSize + 1
local indexEnd ... |
-----------------------------------------
-- ID: 4160
-- Item: Petrify Potion
-- Item Effect: This potion induces petrify.
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
function onItemCheck(target)
return 0
end
function onItemUse(target)
if (not tar... |
local base = _G
local string = require("string")
local base64 = require("resty.smtp.base64")
local qpcore = require("resty.smtp.qp")
module("resty.smtp.mime")
-- FIXME following mime-relative string operations are quite inefficient
-- compared with original C version, maybe FFI can help?
--
-- base64
--
function b... |
function onSongStart()
doTweenAngle('bruh', 'camHUD', 1440, 9, 'linear')
end |
local peer_send_hook = "NetworkPeerSend"
local NetworkPeerSend = NetworkPeer.send
local SyncUtils = BeardLib.Utils.Sync
local SyncConsts = BeardLib.Constants.Sync
Hooks:Register(peer_send_hook)
Hooks:Add(peer_send_hook, "BeardLibCustomHeistFix", function(self, func_name, params)
if self ~= managers.network:sessi... |
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
include("shared.lua")
sound.Add( {
name = "bm2_electric",
channel = CHAN_AUTO,
volume = 0.075,
level = 65,
pitch = { 110, 110 },
sound = "bitminers2/hi-tensionpower.wav"
} )
function ENT:Initialize()
self:SetModel("models/bitminers2/bm2_solar_converter.md... |
local G = GLOBAL
local require = G.require
local function Schthirsty_statusdisplays(self)
if self.owner.prefab == "schwarzkirsche" then
local SchThirstyBadge = require "widgets/schthirstybadge"
self.schthirsty = self:AddChild(SchThirstyBadge(self.owner))
self.owner.schthirstybadge = self.schthirsty
se... |
constants = {}
-- 1 and 9
TERMINAL_INDICES = {0, 8, 9, 17, 18, 26}
-- dragons and winds
EAST = 27
SOUTH = 28
WEST = 29
NORTH = 30
HAKU = 31
HATSU = 32
CHUN = 33
WINDS = {EAST, SOUTH, WEST, NORTH}
HONOR_INDICES = WINDS + {HAKU, HATSU, CHUN}
FIVE_RED_MAN = 16
FIVE_RED_PIN = 52
FIVE_RED_SOU = 88
AKA_DORA_LIST = {FIVE... |
local anim8 = require 'vendor/anim8'
local game = require 'game'
local utils = require 'utils'
local Timer = require 'vendor/timer'
local window = require 'window'
local Player = require 'player'
local sound = require 'vendor/TEsound'
local Gamestate = require 'vendor/gamestate'
local Projectile = {}
Projectile.__inde... |
-- Copyright 2015 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header$
local Koerner2015 = {}
-- Namespace
require("pgf... |
object_tangible_veteran_reward_frn_vet_houseplant_02 = object_tangible_veteran_reward_shared_frn_vet_houseplant_02:new {
}
ObjectTemplates:addTemplate(object_tangible_veteran_reward_frn_vet_houseplant_02, "object/tangible/veteran_reward/frn_vet_houseplant_02.iff")
|
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Drugs"
ENT.Author = "Rickster"
ENT.Spawnable = false
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "price")
self:NetworkVar("Entity", 1, "owning_ent")
end
hook.Add("Move", "DruggedPlayer", function(ply, mv)
if not ply.isDrugged the... |
-- example HTTP POST script which demonstrates setting the
-- HTTP method, body, and adding a header
wrk.method = "POST"
wrk.body = "User@U001"
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
-- ===========================
-- Temp File
-- ===========================
-- A temporary file (similar to the code below) will be created automatically
-- to set parameters and load this file
-- ** Parameters **
-- target = "111"; -- World Number - Level Number - Area Number
-- mode = "algo"; ... |
local Package = {}
function Package.OnInitialize()
Import("ga.corebyte.CoreSort.Main")
end
return Package
|
_G.ForkliftCapacity = _G.ForkliftCapacity or {}
ForkliftCapacity._path = ModPath
ForkliftCapacity._data_path = SavePath .. 'forklift_capacity.txt'
ForkliftCapacity.settings = {
forklift_capacity = 3
}
function ForkliftCapacity:Load()
local file = io.open(self._data_path, 'r')
if file then
for k, v in pairs(json.d... |
module(...,package.seeall)
local wstr=require("wetgenes.string")
local sod=require("wetgenes.sod")
local pack=require("wetgenes.pack")
local kissfft=require("kissfft.core")
function test_sod()
--print(wstr.dump(sod))
local sd=assert(sod.create())
--print(wstr.dump(sd))
assert(sd:load("dat/... |
local Target = require("reacher.core.target").Target
local windowlib = require("reacher.lib.window")
local vim = vim
local M = {}
local Translator = {}
Translator.__index = Translator
M.Translator = Translator
function Translator.new(window_id, matcher, regex_matcher, number_sign_width)
vim.validate({
window_i... |
local LeakyReLU, parent = torch.class('fbnn.LeakyReLU', 'nn.PReLU')
function LeakyReLU:__init(p)
parent.__init(self)
self.weight:fill(p)
self.gradWeight:fill(0)
end
function LeakyReLU:__tostring__()
return torch.type(self) .. string.format('(%g)', self.weight[1])
end
function LeakyReLU:accGradParameters(inpu... |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author (zacharyenriquee@gmail.com).
--]]
local character = ix.meta.character
function character:GetClassName()
if(self:GetClass()) then
return ix.class.list[self:GetClass()].name
end
return ix.faction.indices[... |
local packer_path = ("%s/site/pack/packer/start/packer.nvim"):format(stdpath)
function _G.packer_install()
print "Cloning packer.."
-- remove the dir before cloning
vim.fn.delete(packer_path, "rf")
vim.fn.system {
"git",
"clone",
"https://github.com/wbthomason/packer.nvim",
... |
---
--- CommandAction.lua
---
--- Copyright (C) 2018 Xrysnow. All rights reserved.
---
local mbg = require('util.mbg.main')
local String = require('util.mbg.String')
---@class mbg.CommandAction:mbg.IAction
local CommandAction = {}
mbg.CommandAction = CommandAction
local function _CommandAction()
---@type mbg.Com... |
---@class love.sound
---This module is responsible for decoding sound files. It can't play the sounds, see love.audio for that.
local m = {}
--region Decoder
---@class Decoder
---An object which can gradually decode a sound file.
local Decoder = {}
---Creates a new copy of current decoder.
---
---The new decoder will ... |
local assert = require "luassert.assert"
local Request = require "atlas.request"
local asgi = require "atlas.test.asgi"
describe("Request", function()
it("constructs an instance", function()
local scope = {}
local request = Request(scope)
assert.equal(getmetatable(request), Request)
assert.equal(s... |
-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allowed to pretend you have written it.
--
--! @file init.lua
--! @brief wolf implem... |
--魔术手
local m=14010092
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:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEff... |
if enable_moudles["anc"] == false then
return;
else
local anc_config_version = "ANCGAIN01"; -- 固定10字节长
local anc_coeff_config_version = "ANCCOEF01"; -- 固定10字节长
local anc_coeff_size = 588 * 4;
--[[===================================================================================
==========================... |
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/SmartDeviceLink/sdl_core/issues/1600
---------------------------------------------------------------------------------------------------
-- Description: HMI responds with UNSUPPORTED_RESOURCE... |
function love.load()
hero = require "hero"
camera = require "camera"
ground = require "ground"
ceiling = require "ceiling"
buildings = require "buildings"
enemies = require "enemies"
local FONT_LOC = "assets/Amble-Bold.ttf"
local size = 30
font = love.graphics.newFont(FONT_LOC, size)
decoder = lo... |
local diagnostics = require("null-ls.builtins").diagnostics
describe("diagnostics", function()
describe("chktex", function()
local linter = diagnostics.chktex
local parser = linter._opts.on_output
local file = {
[[\documentclass{article}]],
[[\begin{document}]],
... |
if(GetRealmName() == "Benediction")then
WP_Database = {
["Folkron"] = "ST:829/99%SB:872/99%SM:1057/99%",
["Salinew"] = "ST:803/99%SB:858/99%SM:1009/99%",
["Awingg"] = "ST:805/99%SB:842/99%SM:1023/99%",
["Coze"] = "ST:820/99%SB:889/99%SM:1044/99%",
["Supremevv"] = "ET:618/82%SB:822/99%SM:995/99%",
["Haywíre"] = "LT:746/... |
--- expirationd - data expiration with custom quirks.
--
-- @module expirationd
-- ========================================================================= --
-- local support functions
-- ========================================================================= --
local checks = require("checks")
local fun = requir... |
------------------------------------------------------------------------------------------------------------------------
-- Game Type Hill Manager Server
-- Author Morticai (META) - (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
-- Date: 2021/3/10
-- Version 0.1.2
------------------------------------... |
local maininv = dofile(minetest.get_modpath(minetest.get_current_modname()).."/maininv.lua")
sfinv_buttons.register_button('compress', {
image = "smart_sfinv_tweaks_compress_button.png",
tooltip = "Compress stacks",
position = 7,
action = function(player)
maininv.get(player):compress()
end,
show = function(pl... |
-- Copyright (C) 2014-2016, UPYUN Inc.
local cjson = require "cjson.safe"
local round_robin = require "resty.checkups.round_robin"
local consistent_hash = require "resty.checkups.consistent_hash"
local base = require "resty.checkups.base"
local max = math.max
local sqrt = math.sq... |
--- Oculus Rift support for LÖVE3D.
-- Currently targets SDK 0.6
-- @module ovr
-- @alias ret
local ffi = require "ffi"
ffi.cdef [[
typedef int32_t ovrResult;
typedef enum ovrSuccessType_
{
ovrSuccess = 0,
ovrSuccess_NotVisible = 1000,
ovrSuccess_HMDFirmwareMismatch = 4100,
ovrSuccess_TrackerFirmwareMis... |
return {
{
effect_list = {
{
type = "BattleBuffHPLink",
trigger = {
"onTakeDamage",
"onRemove"
},
arg_list = {
number = 0.8
}
}
}
},
{
effect_list = {
{
type = "BattleBuffHPLink",
trigger = {
"onTakeDamage",
"onRemove"
},
arg_list = {
n... |
ARG TAG="php-nginx:latest"
#FROM webdevops/php:${TAG}
FROM adockero/${TAG}
RUN set -x \
&& if [ -n "$(which apt)" ]; then \
apt-get update; \
apt-get install -y --no-install-recommends libnginx-mod-http-lua; \
rm -rf /var/lib/apt/lists/*; \
elif [ -n "$(which apk)" ]; then ... |
return {
NONE = 0,
NEUTRAL = 0,
TERRORIST = 1,
ZOMBIE = 1,
COUNTERTERRORIST = 2,
SURVIVOR = 2,
VIP = 3,
}
|
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local util = include( "client_util" )
local mathutil = include( "modules/mathutil" )
local array = incl... |
if GetLocale() ~= "esES" then return end
local F, L, P, G = unpack(select(2, ...))
--@localization(locale="esES", format="lua_additive_table")@
|
--[[------------------------------------------------------
# LuaBinder
Use the dub.Inspector to create Lua bindings.
--]]------------------------------------------------------
local lub = require 'lub'
local dub = require 'dub'
local yaml = require 'yaml'
local PLAT = lub.plat()
local pairs, ipai... |
WriteTool = {
desription = "Write file",
inventory_image = "core_write.png",
wield_image = "core_write.png",
tool_capabilities = {punch_attack_uses = 0, damage_groups = {write = 1}}
}
function WriteTool.write(entity, player_name)
local player_graph = graphs:get_player_graph(player_name)
local d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.