content stringlengths 5 1.05M |
|---|
-- ─┐ ┬┌─┐┌┐┌┌─┐┌┐ ┬ ┬┌┬┐┌─┐ ─┐ ┬┬ ┬┌─┐
-- ┌┴┬┘├┤ ││││ │├┴┐└┬┘ │ ├┤ ┌┴┬┘└┬┘┌─┘
-- ┴ └─└─┘┘└┘└─┘└─┘ ┴ ┴ └─┘o┴ └─ ┴ └─┘
-- Author: SENEX @ XENOBYTE.XYZ
-- License: MIT License
-- Website: https://xenobyte.xyz/projects/?nav=dotfiles
-- Notes: This configuration file is for AwesomeWM ver.4+
-- {{{{{{{{{{ DEPEND... |
local t = require( "taptest" )
local basename = require( "basename" )
path = "/foo/bar/baz/asdf/quux.html"
t( basename( path ), "quux.html" )
t( basename( path, ".html" ), "quux" )
t( basename( "quux.html" ), "quux.html" )
t( basename( "quux.html", ".html" ), "quux" )
t()
|
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
CreateConVar('sbox_max_acf_grenade', 20)
function ENT:Initialize()
self.BulletData = self.BulletData or {}
self.SpecialDamage = true --If true needs a special ACF_OnDamage function
self.ShouldTrace = false
... |
local nn = require 'nn'
local Gaussian, parent = torch.class('nn.Gaussian', 'nn.Module')
function Gaussian:__init(mean, stdv)
parent.__init(self)
self.mean = mean or 0
self.stdv = stdv or 1
end
function Gaussian:updateOutput(input)
self.output:resizeAs(input)
self.output:normal(self.mean, self.stdv)
retu... |
local class = require "class"
local ParticlePiece = class:derive("ParticlePiece")
local Vec2 = require("Essentials/Vector2")
local Image = require("Essentials/Image")
function ParticlePiece:new(manager, data, pos)
self.manager = manager
self.pos = pos + parseVec2(data.pos)
self.speed = parseVec2(data.s... |
local Aiming, super = Class(Wave)
function Aiming:onStart()
-- Every 0.5 seconds...
self.timer:every(1/2, function()
-- Get all enemies that selected this wave as their attack
local attackers = self:getAttackers()
-- Loop through all attackers
for _, attacker in ipairs(attacker... |
return {'orografie','orografisch','orontes','orografische'} |
#!/usr/bin/env gt
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2015-2016 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in a... |
-- or: 如果a为true,则返回a,否则返回b
a = a or "hello"
print(a)
-- hello
-- and: 如果a为false,则返回a,否则返回b
b = true and false
print(b)
-- false
-- 数组,第一个下标是1,而不是0,逗号和分号都可以,一般分号用来做不同类型的元素区分
arr = {1, 2, 3, 4, 5; 'hello', 'world'}
print(arr[1])
-- 1
-- 字典
pos = {x = 1, y = 2}
print(pos.y)
-- 2
|
require("gitsigns").setup({
signs = {
delete = { text = "│" },
topdelete = { text = "│" },
changedelete = { text = "│" },
},
numhl = true,
})
vim.api.nvim_set_hl(0, "GitSignsAddLn", { fg = "#222424", bg = "#90c7f4" })
vim.api.nvim_set_hl(0, "GitSignsChangeLn", { fg = "#222424", bg =... |
---------------------------------------------------------------------------------------------------
-- User story: https://github.com/SmartDeviceLink/sdl_core/issues/964
--
-- Precondition:
-- SDL Core and HMI are started. App is registered, HMI level = FULL
-- Description:
-- Steps to reproduce:
-- 1) Send PutFile wit... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BceExitGame_pb', package.seeall)
local BCEEXITGAME = protobuf.Descriptor();
BCEEXITGAME.name = "BceExitGame"
BCEEXITGAME.full_name = ".com.xinqihd.sns.gameserver.proto.BceExitGame"
BCEEXITGAME.nested_types = {}
BCEEXITGAME.enum_ty... |
---@class CS.UnityEngine.ColliderDistance2D : CS.System.ValueType
---@field public pointA CS.UnityEngine.Vector2
---@field public pointB CS.UnityEngine.Vector2
---@field public normal CS.UnityEngine.Vector2
---@field public distance number
---@field public isOverlapped boolean
---@field public isValid boolean
---@type... |
-- Copyright 2018 Lienol <lienol@qq.com>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local util = require "luci.util"
local i18n = require "luci.i18n"
module("luci.model.cbi.v2ray_server.api.v2ra... |
local objects = {
sbox = { -32/2, -32/2, "17586411471.png" },
bbox = { -62/2, -62/2, "17586378d04.png" },
splank = { -100/2, -12/2, "175863cfb88.png" },
bplank = { -200/2, -12/2, "175863e854a.png" },
ball = { -30/2, -30/2, "17586559f9a.png" },
anv = { -52/2, -25/2, "1758656b838.png" },
cn = { -32/2, -32/2, "1758... |
--[[------------------------------------------------------
dub.Inspector test
------------------
Test introspective operations with the 'thread' group
of classes.
--]]------------------------------------------------------
require 'lubyk'
local should = test.Suite('dub.Inspector - thread')
local ins = dub.In... |
require 'pl'
local sum = 0.0
local count = 0
local text = [[
981124001 2.0 18988.4 10047.1 4149.7
981125001 0.8 19104.0 9970.4 5088.7
981127003 0.5 19012.5 9946.9 3831.2
]]
for id,magn,x in input.fields(3,' ',text) do
sum = sum + x
count = count + 1
end
print('average x coord is ',sum/count)
|
-- Author: Yonatan Belinkov
-- Last updated: December 6 2015
-- require('mobdebug').start()
if not opt then
print '==> parsing arguments'
cmd = torch.CmdLine()
cmd:text()
cmd:text('Options:')
-- general
cmd:option('-seed', 1, 'fixed input seed for repeatable experiments')
cmd:option('-type', 'cuda', 'ty... |
XBar.Lng = {
["Ttip"]={
["CfgBtn1"]="XBar 設定",
["CfgBtn2"]="點擊左鍵開啟設定介面\n右鍵開啟插件選單\n中鍵開關自動前進",
["SysBtn1"]="系統功能",
["SysBtn2"]="點擊左鍵開啟主選單\n右鍵開啟系統選單\n中鍵重新載入",
["DspBtn1"]="點擊左鍵開啟傳送之書介面\n右鍵開關世界地圖\n中鍵設定畫質為低階",
["SndBtn1"]="點擊左鍵開啟世界搜尋\n右鍵開啟副本進度\n中鍵靜音",
["Ammo1"]="點擊左鍵開啟任務日誌\n右鍵開啟卡片圖鑑",
["Bag1"]="點擊左鍵開啟背包\n... |
local buildlist = {}
for eqi, eq in pairs(data.raw["night-vision-equipment"]) do
buildlist[eq.name] = {
name = eq.name,
sprite = eq.sprite,
shape = eq.shape,
energy_source = eq.energy_source,
categories = eq.categories
}
end
for eqi, eq in pairs (buildlist) do
data:extend(
{
{
type ... |
local kAdditionalItems = {
-- Crafting Mats from Crafting Vendor
-- Weaponsmith
81866, 81870, 81874, 81878, 81882,
}
local SAVE_FMT_VERSION = 44
local GeminiHook = Apollo.GetPackage("Gemini:Hook-1.0").tPackage
local CXport = {}
function CXport:new(o)
o = o or {}
setmetatable(o,... |
--[[----------------------------------------------------------------------------
FlickrPublishServiceProvider.lua
Publish-specific portions of Lightroom Flickr uploader
--------------------------------------------------------------------------------
ADOBE SYSTEMS INCORPORATED
Copyright 2007 Adobe Systems Incorporat... |
local _ = {name = "air", prob = 0}
local l = {name = "default:lava_source", prob = 225}
local s = {name = "default:stone", prob = 255}
local d = {name = "ethereal:fiery_dirt", prob = 255}
ethereal.volcanom = {
size = {x = 6, y = 2, z = 6},
yslice_prob = {
{ypos = 0, prob = 127},
},
data = {
_,_,s,_,_,_,
_... |
--[[
Programmable robot ('hoverbot') mod for Minetest
Copyright (C) 2018 Pilcrow182
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
... |
local NONE = "NONE"
local gui = {
bold = "bold",
italic = "italic",
underline = "underline",
inverse = "inverse"
}
local colors = {
red = "#DC2626",
orange = "#F97316",
amber = "#F59E0B",
yellow = "#EAB308",
lime = "#84CC16",
green = "#22C55E",
emerald = "#10B981",
teal = "#14B8A6",
cyan = "#0... |
local lowerclass = {
_VERSION = "lowerclass v1.0.0",
_DESCRIPTION = "Object Orientation for Lua with a Middleclass-like API",
_URL = "https://github.com/Positive07/lowerclass",
_LICENSE = "MIT LICENSE - Copyright (c) 2017 Pablo. Mayobre (Positive07)"
}
--Typechecking
local INVALIDSELF = "Make s... |
--[[
Copyright (C) 2019 Blue Mountains GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the Onset
Open Source License as published by Blue Mountains GmbH.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied w... |
-------------------------------------------------------------------------------
-- Copyright (c) 2006-2013 Fabien Fleutot and others.
--
-- All rights reserved.
--
-- This program and the accompanying materials are made available
-- under the terms of the Eclipse Public License v1.0 which
-- accompanies this distributi... |
-- mod-version:2 -- lite-xl 2.0
local syntax = require "core.syntax"
syntax.add {
name = "V",
files = { "%.v$", "%.vsh$" },
headers = "^#!.*[ /]v\n",
comment = "//",
patterns = {
{ pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
... |
local PLUGIN = PLUGIN
PLUGIN.name = "Cassette Player"
PLUGIN.author = "Kek1ch"
PLUGIN.desc = "Playable tapes from cassette players."
function PLUGIN:LoadData()
data = self:GetData()
for k, v in ipairs(data or {}) do
local entity = ents.Create("ix_cassette_player")
entity:SetPos(v.pos)
entity:SetAngles(v.angle... |
-- Copyright (c) 2018 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("Entity - wood_pile", function()
local wood_pile = require "entities.wood_pile"
it("contains a count of the wood resources in the pile", function()... |
-- /script countdown = 60
local Gladdy = LibStub("Gladdy")
local L = Gladdy.L
local ACDFrame = Gladdy:NewModule("Countdown", nil, {
countdown = true,
})
function ACDFrame:Initialise()
self.hidden = false
self.countdown = -1
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
end
function ACDFrame... |
local mod_name = (...):match ( "^(.*)%..-$" )
local misc = require ( mod_name .. ".misc" )
local assert , pcall = assert , pcall
local ipairs , pairs = ipairs , pairs
local t_insert , t_concat = table.insert , table.concat
local attachpairs_start = misc.attachpairs_start
local ll = require ( mod_name .. ".ll" )
loc... |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 9,
"version_minor", 6,
}),
},
"title", "Triboelectric Sensor Tower",
"id", "ChoGGi_TriboelectricSensorTower",
"lua_revision", 1001569,
"steam_id", "220162... |
-- title: fire
-- author: by Filippo
-- desc: fire demo
-- script: lua
-- input: gamepad
t=0
x=120
y=120
particle = {}
palete = {14,9,6,3,10,15}
function addParticle(x,y)
local p = {}
p.x = x
p.y = y
p.dx = math.random(-10.0,10.0)/150.0
p.dy = math.random(-10.0,-2)/50
p.t = 0
table.insert(particle,p)
end
... |
local self = {}
GLib.Databases.IDatabase = GLib.MakeConstructor (self)
function self:ctor ()
end
function self:Connect (hostname, port, username, password, databaseName, callback)
GLib.Error ("IDatabase:Connect : Not implemented.")
end
function self:Disconnect (callback)
GLib.Error ("IDatabase:Connect : Not implem... |
AddCSLuaFile()
SWEP.PrintName = "АЕК-971"
SWEP.Category = "Call of Pripyat"
SWEP.Base = "weapon_cop_base"
SWEP.Slot = 2
SWEP.SlotPos = 2
SWEP.Spawnable = true
SWEP.AdminOnly = false
SWEP.ViewModel = "models/wick/weapons/stalker/stcopwep/aek_model.mdl"
SWEP.WorldModel = "models/wick/weapons/stalker/stcop... |
local command = {}
command.name = "XKCD Comic"
command.info = "Get a XKCD comic"
command.desc = table.join({
"I will show you kxcd webcomics!",
" \\• {prefix}kxcd - Returns a random comic",
" \\• {prefix}kxcd latest - For the latest ... |
require("defines")
require("lib/misc")
local noise = require("noise")
-- The tower generator.
data:extend{
{
type = "noise-expression",
name = "gen-towers",
intended_property = "elevation",
expression = noise.define_noise_function(function(x, y, tile, map)
local raw_elev... |
--[[ BaseLua
https://github.com/dejayc/BaseLua
Copyright 2012 Dejay Clayton
All use of this file must comply with the Apache License,
Version 2.0, under which this file is licensed:
http://www.apache.org/licenses/LICENSE-2.0 --]]
local BaseLua = require( "Packages.BaseLua" )
local FileHelper... |
-- Made By Jay
-- Objects
local ScreenGui = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local Credit = Instance.new("TextLabel")
local Title = Instance.new("TextLabel")
local PlayerName = Instance.new("TextBox")
local Kill = Instance.new("TextButton")
local Message = Instance.new("TextButton")
local... |
local rtcTest = {}
local tag = "rtcTest"
function rtcTest.test()
if rtc == nil then
log.error(tag, "this fireware is not support rtc")
return
end
log.info(tag, "START")
assert(
rtc.set({year = 2021, mon = 2, day = 20, hour = 0, min = 0, sec = 0}) ==
true, tag .. ".s... |
-----------------------------------
-- Area: Temple of Uggalepih
-- Mob: Rumble Crawler
-----------------------------------
require("scripts/globals/regimes")
-----------------------------------
function onMobDeath(mob, player, isKiller)
tpz.regime.checkRegime(player, mob, 791, 2, tpz.regime.type.GROUNDS)
end
|
object_tangible_meatlump_event_buff_device_meatlump_bomb = object_tangible_meatlump_event_shared_buff_device_meatlump_bomb:new {
}
ObjectTemplates:addTemplate(object_tangible_meatlump_event_buff_device_meatlump_bomb, "object/tangible/meatlump/event/buff_device_meatlump_bomb.iff")
|
-- Taken from zehpyr theme repo
--[[
--group = {
-- [name] = {
-- fg = col[hex]
-- bg = col[hex]
-- style = name[string]
-- }
--}
--]]
-- this won't work unless you turn off colorscheme
local red = "#ea6962"
local orange = "#e78a4e"
local yellow = "#d8a657"
local green = "#a9b665"
local aqua = "#89b482"
... |
torch = require 'torch'
dkjson = require 'dkjson'
DataHandler = {}
function DataHandler.weight_binarize(data, bin_type)
local bindata = data:clone() -- non-destructive
if bin_type == 'stoch' then
bindata:add(1):div(2):clamp(0,1) -- hard-sigmoid
if type(p.cbernoulli) == 'function' then
bindata:cbern... |
local utils = require('sui.utils');
local wrapper = require('sui.wrapper');
local Button = {};
setmetatable(Button, {__index = wrapper});
local LAYOUT = { -- 声明在这里的style的优先级比class的高
style = {},
text = { -- 也可以是string类型
style = {},
value = ''
}
};
-- 声明在这下面的style的优先级比class的低
local STYLE = {
opacity = 1,
['ali... |
minetest.log("warning", "[damocles_custom] integration-test enabled!")
minetest.register_on_mods_loaded(function()
minetest.log("warning", "[damocles_custom] all mods loaded, starting delayed test-function")
minetest.after(1, function()
minetest.log("warning", "[damocle_custom] starting integration test")
loc... |
AddCSLuaFile()
include('shared.lua')
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.RenderGroup = RENDERGROUP_OPAQUE
ENT.Icons = {}
function ENT:Initialize()
self:SetModel( "models/niksacokica/tech/tech_science_centrifuge.mdl" )
self:DrawShadow(true)
//self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entit... |
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.SeaOfLightQuest.Questline) < 8 then
return false
end
local destination = Position(32017, 31730, 8)
player:teleportTo(destination)
destination:sendMagicEffect(CONST_ME_TELEPORT)
return true
end
|
--[[
MTA Role Play (mta-rp.pl)
Autorzy poniższego kodu:
- Dorian Nowakowski <burekssss3@gmail.com>
Discord: Rick#0157
Link do githuba: https://github.com/PatrykAdam/mtarp
--]]
_Sirens = {
[1] = {
[1] = {src = "assets/sounds/polsiren.wav", loop = true},
[2] = {src = "assets/sounds/polsiren2.w... |
require('nvim-autopairs').setup({
enable_check_bracket_line = false, -- Don't close pair when next char is a closing pair
ignored_next_char = "[%w%.]", -- will ignore alphanumeric and `.` symbol
})
require("nvim-autopairs.completion.compe").setup({
map_cr = true, -- map <CR> on insert mode
ma... |
require 'dp'
--[[SGD(stochastic gradient descent) class]]
do
local SGD = torch.class('SGD')
function SGD:__init(model,criterion,optimState)
self._optimState = optimState
self._model = model
self._criterion = criterion
self._params = {}
self._gradParams = {}
self._scales = {}
self._pastGr... |
-- dataset-mnist.lua
require 'torch'
require 'paths'
mnist = {}
mnist.path_remote = 'https://s3.amazonaws.com/torch7/data/mnist.t7.tgz'
mnist.path_dataset = 'mnist.t7'
mnist.path_trainset = paths.concat(mnist.path_dataset, 'train_32x32.t7')
mnist.path_testset = paths.concat(mnist.path_dataset, 'test_32x32.t7')
func... |
local a=require("xaf/graphic/component")local b=require("xaf/core/xafcore")local c=b:getMathInstance()local d=b:getTableInstance()local e={C_NAME="Generic GUI List",C_INSTANCE=true,C_INHERIT=true,static={SELECT_DEFAULT=0,SELECT_SINGLE=1,SELECT_MULTIPLE=2,SELECT_NOTHING=3}}function e:initialize()local f=a:extend()local ... |
AddEventHandler('es:playerLoaded', function(source, _player)
local _source = source
local tasks = {}
local userData = {
accounts = {},
inventory = {},
job = {},
job2 = {},
loadout = {},
playerName = GetPlayerName(_source),
lastPosition = nil
}
TriggerEvent('es:getPl... |
-- uses code from:
-- https://github.com/SeanNaren/deepspeech.torch
require 'utils'
require 'UtilsMultiGPU'
require 'lmdb'
require 'optim'
require 'nn'
stringx = require 'pl.stringx'
local cmd = torch.CmdLine()
cmd:option('-saveClassifierModel', false, 'Save model after training/testing')
cmd:option('-saveClassifier... |
mars_mobility = class({})
LinkLuaModifier("modifier_mars_mobility_banish", "abilities/heroes/mars/mars_mobility/modifier_mars_mobility_banish", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_mars_mobility_thinker", "abilities/heroes/mars/mars_mobility/modifier_mars_mobility_thinker", LUA_MODIFIER_MOTION_NONE)
fun... |
object_mobile_typho = object_mobile_shared_typho:new {
}
ObjectTemplates:addTemplate(object_mobile_typho, "object/mobile/typho.iff")
|
slot0 = class("Nation")
slot0.CM = 0
slot0.US = 1
slot0.EN = 2
slot0.JP = 3
slot0.DE = 4
slot0.CN = 5
slot0.ITA = 6
slot0.SN = 7
slot0.FF = 8
slot0.MNF = 9
slot0.META = 97
slot0.BURIN = 98
slot0.LINK = 100
slot0.IDOL_LINK = 107
slot0.IsLinkType = function (slot0)
return slot0.LINK < slot0
end
slot0.IsMeta = function... |
object_tangible_tcg_series4_video_game_table = object_tangible_tcg_series4_shared_video_game_table:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series4_video_game_table, "object/tangible/tcg/series4/video_game_table.iff") |
local log = require "util.logger".init("auth_passthrough");
local new_sasl = require "util.sasl".new;
local provider = {};
function provider.test_password(username, password)
module:log("debug", "Testing password for %s", username);
return true;
end
function provider.get_password(username)
module:log("debug", "Get... |
object_tangible_furniture_tatooine_uber_orbital_cannon = object_tangible_furniture_tatooine_shared_uber_orbital_cannon:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_tatooine_uber_orbital_cannon, "object/tangible/furniture/tatooine/uber_orbital_cannon.iff")
|
return {
Water = 16 * 0 + 0
, Earth = 16 * 1 + 0
, Grass = 16 * 2 + 0
, House_Wall = 16 * 2 + 1
, Bridge = 16 * 3 + 0
, House_Temporary = 16 * 3 + 1
, House_Chest = 16 * 3 + 2
, House_Floor = 16 * 3 + 3
, House_Window = 16 * 4 + 1
, House_Window_Broken = 16 * 4 + 13
, House_Door = 16 * 5 + 0
, House_Door_V1... |
--[[
Copyright (c) 2019 PCC-Studio
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, distribute, ... |
include("shared.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
local sin = math.sin
local cos = math.cos
local clamp = math.Clamp
local approach = math.Approach
local trace = util.TraceLine
function ENT:Think()
self.BaseClass.Think(self)
local phys = self:GetPhysicsObject()
local vel = phys:GetVeloc... |
local core = require('vfiler/libs/core')
local eq = function(excepted, actual)
assert.equal(excepted, actual)
end
describe('core.string', function()
describe('truncate (end)', function()
local truncate = core.string.truncate
local string = 'abcdefghijklmnopqrstuvwxyz'
local wstring =
'あいうえおかきくけこ... |
local tree = require('tree')
local TreeAddTests = test.declare('TreeAddTests', 'tree')
local tr
function TreeAddTests.setup()
tr = tree.new('root')
end
function TreeAddTests.add_atRoot()
tree.add(tr, 'a1')
tree.add(tr, 'b1')
test.capture([[
root
--a1
--b1
]], tree.toString(tr))
end
function TreeAddTests.add... |
-----------------------------------------
-- Spell: Blaze Spikes
-----------------------------------------
require("scripts/globals/magic")
require("scripts/globals/msg")
require("scripts/globals/status")
-----------------------------------------
function onMagicCastingCheck(caster, target, spell)
return 0
end
fu... |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local S = E:GetModule("Skins")
-- Credit: ElvUI and Merathilis give that man a cookie!
--Cache global variables
local _G = _G
local select = select
--WoW API / Variables
local CreateFrame = CreateFrame
local GetGuildLogoInfo = GetGuildLogoInfo
local SetSmallGuildTabar... |
-- fdbkr.
-- @eigen
--
--
-- -------------------------------------------------------------------------
-- REQUIRES
engine.name = "Fdbkr"
local cs = require 'controlspec'
local _16n = include "sines/lib/16n"
-- -------------------------------------------------------------------------
-- STATIC CONF
local NB_BANDS... |
-----------------------------------
-- Area: Batallia Downs
-- Mob: Weeping Willow
-----------------------------------
function onMobFight(mob, target)
if (mob:getHPP() <= 50 and mob:getLocalVar("Saplings") < 1) then
SpawnMob(mob:getID()+1):updateEnmity(target)
SpawnMob(mob:getID()+2):updateEnmity... |
require "luaScript/helper"
require "luaScript/ActionsTest/ActionsTest"
require "luaScript/TransitionsTest/TransitionsTest"
require "luaScript/ActionsProgressTest/ActionsProgressTest"
require "luaScript/EffectsTest/EffectsTest"
require "luaScript/ClickAndMoveTest/ClickAndMoveTest"
require "luaScript/RotateWorldTest/Rot... |
name = "Health EV: Ruins of Alph (near Violet City)"
author = "The7L"
description = [[This script will train the first pokémon of your team.
It will only attack pokémon giving Health EV.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Violet City and Ruins of Alph.]]
function onPathAc... |
library("zboost", {
includedirs = {"include"}
});
solution("zboost", function()
project("zboost", function()
category ("StaticLib");
directory("include/boost");
sourcedirs("include");
end);
project("helloworld", function()
category ("ConsoleApp");
directory("tests/helloworld");
depends("... |
--[[
Model - Public Transport Route Choice
Type - MNL
Authors - Rui Tan
]]
--Estimated values for all betas
--Note: the betas that not estimated are fixed to zero.
local beta_in_vehicle = -0.35
local beta_walk = -0.65
local beta_wait = -0.46
local beta_no_txf= -4.31
local beta_cost = -0.16
local beta_path_size = 0.8
l... |
local AddonName, AddonTable = ...
AddonTable.inscription = {
-- Pigments
39151,
39334,
39338,
39339,
39340,
39341,
39342,
43103,
43104,
43106,
43108,
-- Inks
39469,
43115,
43117,
43118,
43121,
-- Glyphs
43386,
}
|
ENT.Type = "anim"
ENT.Category = "Metrostroi (utility)"
ENT.Spawnable = true
ENT.AdminSpawnable = false
function ENT:SetupDataTables()
self:NetworkVar("Bool",0,"Train")
self:NetworkVar("Bool",1,"TrainStopped")
end |
lua_tree_output={ branchname="Title\\n\\n",
{ branchname="Subtitle\\n\\n",
"This is a text with a paragraph end.\\n\\n", "This is a text without line break ",
"that is finished in the next node.\\n\\n",
},
{ branchname="Next subtitle\\n\\n",
"This is a ", "next text.\\n\\n",
}}--lua_tree_output
T... |
CLASS.name = "Civilian"
CLASS.faction = FACTION_CITIZEN
CLASS.salary = 160
CLASS.isDefault = true
CLASS.business = {}
CLASS.color = Color(20, 150, 20)
CLASS_CIVILIAN = CLASS.index |
--- Vector3OffsetInstance
--
local t = require(script.Parent.t)
local Vector3Instance = require(script.Parent.Vector3Instance)
local GetVector3Instance = Vector3Instance.Get
local Vector3OffsetInstance = {}
Vector3OffsetInstance.IsInstanceData = t.union(
Vector3Instance.Check,
t.every(
t.instanceOf("Folder"),
... |
modifier_destructible_gate = class({})
--------------------------------------------------------------------------------
function modifier_destructible_gate:IsHidden()
return true
end
--------------------------------------------------------------------------------
function modifier_destructible_gate:CanParentBeAut... |
local Time,Socket=require't.Time', require't.Net.Socket'
-- use a standard socket read to download an HTTP document
-- select triggeres readability of socket
local start_wall_clock = Time( )
local tcpsock,adr = Socket.connect( '128.30.52.37', 80 )
local len = tcpsock:send( "GET /TR/REC-html32.html HTTP/1.0\r\n\r\n... |
--------------------------------------------------------------------------------
-- Reinforced wall --
--------------------------------------------------------------------------------
data:extend{
{
type = "technology",
name = "reinforced-walls",
... |
henvData = {
--- 装饰物
doodad = {
block = {
string.char2id("LTba")
},
cage = {
string.char2id("LOcg")
},
bucket = {
string.char2id("LTbr"),
string.char2id("LTbx"),
string.char2id("LTbs")
},
bucketBr... |
return
{
name="Basins To Mask",
description="Calculate a mask from the fill-basins routine.",
options=
{
{name="Max delta", type="value", value=0.0005},
{name="Which Mask?", type="list", value="Mask 0", list={"Mask 0", "Mask 1", "Mask 2"}},
{name="Invert Mask?", type="flag", value=false},
{name="Mask Bias",... |
local BasePlugin = require "kong.plugins.base_plugin"
local URLReplace = BasePlugin:extend()
URLReplace.PRIORITY = 700
function URLReplace:new()
URLReplace.super.new(self, "url-replace")
end
function URLReplace:access(config)
URLReplace.super.access(self)
path = kong.request.get_path()
kong.log.debug('in... |
-- This part is for converting between map and wire
-- Per type converting functions for
-- converting from map inputs to wire outputs. (String to Value)
local MapToWireTypes = {
[0] = {"NORMAL", function(str) -- Number, default
return tonumber(str) or 0
end},
[1] = {"NORMAL", function(self, ent, I) -- switches ... |
-- popupcannon
-- popupflare
-- lightflylaser
return {
["popupcannon"] = {
usedefaultexplosions = true,
heatcloud = {
air = true,
count = 10,
ground = true,
water = false,
properties = {
heat = 15,
... |
Script.LoadScript("scripts/gamerules/AccessControl.lua")
-- Execute an RCON command on the server.
ChatCommands["!rcon"] = function(playerId, command)
Log(">> !rcon %s", command)
local message = "Invalid command. Usage:\n !rcon <command>"
local player = System.GetEntity(playerId)
if IsAdminPlayer(player.player... |
--[[-------------------------------------------------------------------
Lightsaber Force Powers:
The available powers that the new saber base uses.
Powered by
_ _ _ ___ ____
__ _(_) | |_ / _ \/ ___|
\ \ /\ / / | | __| | | \___ \
\ V V /| | | |_| |_| |___) |
\_/\_/ |_|_|\_... |
local helpers = require('test.functional.helpers')(after_each)
local clear, eq, command, funcs =
helpers.clear, helpers.eq, helpers.command, helpers.funcs
describe(':z^', function()
before_each(clear)
it('correctly sets the cursor after :z^', function()
command('z^')
eq(1, funcs.line('.'))
end)
end)
|
local resty_resolver = require("resty.dns.resolver")
local resolver_addr = os.getenv("RESOLVERS")
assert(resolver_addr ~= nil, "RESOLVERS is not set, add resolvers (comma separated) in the RESOLVERS env var")
local resolvers = {}
local ir = 1
for r in resolver_addr:gmatch('[^,]+') do
resolvers[ir] = r
ir = ir... |
-- Require all engine common modules (used across various engine scripts)
-- that define globals and don't return a module table
-- This file plays the role of prelude in Rust, or precompiled header in C++
-- It allows to reduce token count by not needing require() for common modules in various files
-- Note: this onl... |
local apply_options = require("settings.utils").apply_options
apply_options(
{
compatible = false,
wildmenu = true,
cindent = true,
autoindent = true, -- enable autoindent
smartcase = true, -- improve searching using '/'
smartindent = true, -- smarter indentation
smarttab = true, -- make ... |
local str = require('cmp.utils.str')
describe('utils.str', function()
it('get_word', function()
assert.are.equal(str.get_word('print'), 'print')
assert.are.equal(str.get_word('$variable'), '$variable')
assert.are.equal(str.get_word('print()'), 'print')
assert.are.equal(str.get_word('["cmp#confirm"]')... |
return {
{
Index= 0,
PointerLocation= 574852,
OldPointer= 448760,
Label= "L1691"
},
{
Index= 1,
PointerLocation= 574868,
OldPointer= 372443,
Label= "L145"
},
{
Index= 2,
PointerLocation= 574884,
OldPointer= 552766,
Label= "L1692"
},
{
Index= 3,
Point... |
ITEM.name = "Пара сапог"
ITEM.desc = "Обычные ботинки из хорошо обработанной кожи, одеваются на ноги."
ITEM.model = "models/aoc_armour/boot_right_01.mdl"
ITEM.Width = 2
ITEM.Height = 2
ITEM.price = 75
ITEM.permit = "mat"
ITEM.iconCam = {
pos = Vector(-28.002248764038, 1.9555344581604, 1.470321059227),
ang = Angle(0, ... |
--- Poppler pdf
-- Requires luajit and ffi
-- @module Poppler
--- CDEF ---
local ffi = require 'ffi'
ffi.cdef[[
typedef struct {
int domain;
int code;
char *message;
} GError;
typedef void cairo_t;
typedef char gchar;
typedef void PopplerDocument;
typedef void PopplerPage;
// glib
bool g_pat... |
local lor = require("lor.index")
local cookie_middleware = require("lor.lib.middleware.cookie")
local check_login_middleware = require("app.middleware.check_login")
local whitelist = require("app.config.config").whitelist
local router = require("app.router")
-- 全局 app 对象, Golang 通过调用app.run来处理每个请求
app = lor()
app:con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.