content stringlengths 5 1.05M |
|---|
-- Icon-only circle buttin
-- Part of Live Simulator: 2
-- See copyright notice into main.lua
local love = require("love")
local Luaoop = require("libs.Luaoop")
local color = require("color")
local Util = require("util")
local Glow = require("game.afterglow")
local Ripple = require("game.ui.ripple")
lo... |
local M = {}
local json = require "json"
--local translate = require "com.ponywolf.translator"
-- are we running on a simulator?
local isSimulator = "simulator" == system.getInfo( "environment" )
local dir = isSimulator and "csv/" or "dat/"
-- Create your own 64 character string (with no
-- repeats) for even more "s... |
local helpers = require "spec.helpers"
describe("kong reload", function()
setup(function()
helpers.prepare_prefix()
end)
teardown(function()
helpers.clean_prefix()
end)
after_each(function()
helpers.kill_all()
end)
it("send a 'reload' signal to a running Nginx master process", function()
... |
---@class Client
-- [[Client Fields]]
---@field email string|nil
---@field groupChannels Cache
---@field guilds Cache
---@field mfaEnabled boolean|nil
---@field owner User|nil
---@field privateChannels Cache
---@field relationships Cache
---@field shardCount number|nil
---@field totalShardCount number|nil
---@field u... |
require "listeners.eventlistener"
function MouseEventListeners()
local this = {
mouseEnter = nil,
mouseLeave = nil,
mousemove = nil,
click = nil,
isMouseOver = false,
isLeftClick = false,
isRightClick = false
}
function this:SetMouseEnter(component, func)
self.mouseEnter = EventManager:RegisterList... |
local module = {}
module.SSID = {}
module.SSID["APToConnectTo"] = "PASSWORD"
module.APPCFG={}
module.APPCFG.ssid="Drink Me"
--module.APPCFG.pwd="mypassword"
module.PORT = 80
return module
|
if enemy_1.hp_percentage > 10 then
if not character_1:HasStatusEffect("1241") then
character_1:UseSkill(1)
character_1:UseSkill(2)
character_1:UseSkill(3)
character_1:UseSkill(4)
end
if not character_2:HasStatusEffect("1241") then
character_2:UseSkill(1)
character_2:UseSkill(2)
character_2:UseSkill(3)
... |
name = "GunUtils"
version = "1.3.0.1"
description = [[
通用枪械API(GunUtils API) 1.3
※MOD制作初心者
※大量API修改, 兼容性注意
使用本API快速构建各种各样的枪械
·最高支持射速500发/分
·最高弹匣容量支持255发
·弹匣可配置回收余弹
·可配置射程
·带保险功能的快慢机, 可锁定
·单发/连发/自动3种模式, 可根据实际需要分别开启
·单发模式可配置开启栓动/霰弹枪模式
·连发模式单次发射弹数(霰弹枪单发射出弹丸数)可配置
·使用一个函数配置连发和自动模式的弹道
·通过画面左下角的射击指示器显示枪械图案/名称/弹量/快慢机状态(换弹/快慢... |
-- sorting, columns, maybe even treeview and multi-select list
|
--[[
This is CGC-specific configuration. The default settings are very close to
those that were used during the CGC final event.
]]--
-------------------------------------------------------------------------------
-- This plugin is to be used together with the Decree Linux Kernel.
-- The Decree kernel has a custom bin... |
if SERVER then
AddCSLuaFile()
AddCSLuaFile("taunt/sh_init.lua")
AddCSLuaFile("taunt/client/cl_init.lua")
AddCSLuaFile("taunt/client/cl_taunt.lua")
AddCSLuaFile("taunt/client/cl_networking.lua")
AddCSLuaFile("taunt/client/cl_commands.lua")
AddCSLuaFile("taunt/client/cl_extension_manager.lua")
AddCSLuaFile("taun... |
object_intangible_beast_bm_quenker = object_intangible_beast_shared_bm_quenker:new {
}
ObjectTemplates:addTemplate(object_intangible_beast_bm_quenker, "object/intangible/beast/bm_quenker.iff")
|
require'snippets'.snippets = {
-- The _global dictionary acts as a global fallback.
-- If a key is not found for the specific filetype, then
-- it will be lookup up in the _global dictionary.
_global = {
-- Insert a basic snippet, which is a string.
todo = "TODO: ",
uname = func... |
-----------------------------------
-- Area: Fort Ghelsba
-- NPC: Elevator Lever (upper)
-- !pos 8.112 -52.665 96.084 141
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
-- local va... |
--傀海兽影-鬼
local m=14000150
local cm=_G["c"..m]
cm.named_with_Unchurted=1
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
... |
--[[
#FreInclude <ctype\ctype_assert.lua>
]]--
--[[
This is a sample which shows how to use ctype_assert lib.
In this sample, user only can input digits to display on the screen.
P.S:This sample only can run under API2.0 or higher.
You'd better use this with iLua.
]]
platform.apiLevel = '2.0'
char... |
local socket = require ("socket")
local Utilities = {}
function Utilities.extend(child, parent)
return setmetatable(child, { __index = parent })
end
function Utilities.switch(t)
t.case = function (self, caseValue, data)
local f = self[caseValue] or self.default
if f then
if type(... |
--[[
Author: Alija Bobija
Website: http://abobija.com
]]
require 'config'
local BLUE_LED = 2
local syncer = require('syncer').create({
interval = CONFIG.sync_interval,
host = CONFIG.dyndns_rec_host,
domain = CONFIG.dyndns_rec_domain,
pass = CONFIG.dyndns_pass,
api_en... |
-------------------------------------
-- XAF Module - Utility:JSONWriter --
-------------------------------------
-- [>] This module is a pair with JSONParser class, which provides saving data in JSON format.
-- [>] It allows to write any data (tables, arrays, strings, numbers, booleans and nils) to JSON.
-- [>] Curren... |
game_over = {}
function game_over.init()
end
function game_over.update(dt)
end
function game_over.draw()
end
function game_over.keypressed(key)
if key == "escape" then
love.event.quit(0)
end
end
|
vim.g.bubbly_tabline = 1
vim.g.bubbly_statusline = {
'mode',
'path',
'filetype',
'divisor',
'progress',
}
vim.g.bubbly_palette = {
background = "#1B1717",
foreground = "Black",
black = "Black",
red = "Red",
green = "Green",
yellow = "Yellow",
blue = "Blue",
purple = "Magenta",
cyan = "Cya... |
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local headItem = player:getSlotItem(CONST_SLOT_HEAD)
if headItem and isInArray({5461, 12541, 15408}, headItem.itemid) then
player:teleportTo(Position(31914, 32713, 12))
player:get... |
-- ------------------------------------------------------------------------------
-- RP Tags
-- by Oraibi, Moon Guard (US) server
-- ------------------------------------------------------------------------------
--
-- This work is licensed under the Creative Commons Attribution 4.0 International
-- (CC BY 4.0) license.... |
position = {x = -3.56633567810059, y = 1.43728542327881, z = -17.7172756195068}
rotation = {x = -7.99551271484233E-05, y = 270.027221679688, z = -0.000316569348797202}
|
------------------------------
-- Translated by : xcrime33#5463
------------------------------
Locales['fr'] = {
['not_acces'] = 'Tu n a pas acces ',
['admin_menu_title'] = 'Gestion de Gangs',
['admin_menu_sub_title'] = 'Données des gangs de gestion',
['edit_show_gang_data'] ... |
local ffi = require "ffi"
local library_path = (function()
local dirname = string.sub(debug.getinfo(1).source, 2, #"/fzf_lib.lua" * -1)
if package.config:sub(1, 1) == "\\" then
return dirname .. "../build/libfzf.dll"
else
return dirname .. "../build/libfzf.so"
end
end)()
local native = ffi.load(library... |
local Shake = Object:extend()
function Shake:new(amplitude, frequency, duration)
self.amplitude = amplitude
self.frequency = frequency
self.duration = duration
local sample_count = (self.duration/1000)*frequency
self.samples = {}
for i = 1, sample_count do self.samples[i] = random(-1, 1) end
... |
local ldb = require("lua-db.lua_db")
local Tileset = {}
function Tileset.new(db, tile_w, tile_h)
local tileset = {}
local db = assert(db)
local tile_w, tile_h = assert(tonumber(tile_w)), assert(tonumber(tile_h))
local width, height = db:width(), db:height()
local tiles_x, tiles_y = math.floor(width/tile_w), ma... |
-----------------------------------
-- Area: Port Bastok
-- NPC: Flaco
-- Fame Checker
-- !zone 236
-----------------------------------
require("scripts/globals/quests");
require("scripts/globals/settings");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
... |
return {
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetHarmRandom",
targetAniEffect = "",
arg_list = {
weapon_id = 67741
}
},
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetHarmRandom",
target... |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* client/admin_ACL.lua
*
* Original File by lil_Toady
*
**************************************]]
_aclrights = {}
function hasPermissionTo(object)
if (_aclrights[object]) then
return true
end
return false
end
addEvent("aPer... |
-- Raytrace
local X = Vector( 1, 0, 0 )
local Y = Vector( 0, 1, 0 )
local Z = Vector( 0, 0, 1 )
local abs = math.abs
local min = math.min
local floor = math.floor
local ceil = math.ceil
local function sign( n )
return n > 0 and 1 or n < 0 and -1 or 0
end
local function trace( origin, normal, li... |
CameraTargetPoint = {
};
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function CameraTargetPoint:OnInit()
self:EnableUpdate(0);
end
-------------------------------------------... |
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local coords = GetEntityCoords(PlayerPedId())
for i, v in pairs (Conf... |
---@class SoundManager : zombie.SoundManager
---@field public SoundVolume float
---@field public MusicVolume float
---@field public AmbientVolume float
---@field public VehicleEngineVolume float
---@field private music SoundManager.Music
---@field public ambientPieces ArrayList|Unknown
---@field private muted boolean
-... |
package.path = package.path .. ";data/scripts/lib/?.lua"
-- Don't remove or alter the following comment, it tells the game the namespace this script lives in. If you remove it, the script will break.
-- namespace LLTEStory4AnimosityBehavior
LLTEStory4AnimosityBehavior = {}
local self = LLTEStory4AnimosityBehavior
fun... |
require('magic.lspconfig')
require('magic.vsnip')
-- require('magic.snippets')
require('magic.compe')
-- require('magic.format')
|
import("net.fasturl")
function mirror(url)
local configs = {}
local proxyurls = {"github.com.cnpmjs.org", "hub.fastgit.org"}
fasturl.add(proxyurls)
proxyurls = fasturl.sort(proxyurls)
if #proxyurls > 0 then
return url:replace("/github.com/", "/" .. proxyurls[1] .. "/", {plain = true})
e... |
-- Puts all the definitions below in blog's namespace
module("blog", package.seeall)
blog_title = "Blog"
cache_path = "page_cache"
copyright_notice = "Copyright 2007 Foobar"
about_blurb = [[This is an example of a blog built using Orbit. You
can browse posts and add comments, but to add new posts you have
to go di... |
ITEM.name = "Golf Club"
ITEM.desc = "Bent and battered after many years of exposure to the elements"
ITEM.model = "models/weapons/w_golf.mdl"
ITEM.class = "weapon_golf"
ITEM.weaponCategory = "melee"
ITEM.width = 1
ITEM.height = 4
ITEM.price = 50 |
--- Tests to make sure that if the turtle encounters gravel or
-- sand it while mining it can get through it while maintaining
-- the correct location.
--
-- Setup:
-- - Place turtle
-- - In front of the turtle put a gravel column 3 high
package.path = '../?.lua;turtles2/?.lua'
local home = require('utils/hom... |
--[[
-- 时间cd函数 2013-05-10编写
--]]--
local Timer = {}
Timer.__index = Timer
local function new()
return setmetatable({functions = {}}, Timer)
end
-- 每次减少一个
-- 间隔,这个timer效率不高
function Timer:update(dt)
local to_remove = {}
-- 更新时间
for func, delay in pairs(self.functions) do
delay = delay - dt -- 每次减少一... |
-----------------------------------------
-- ID: 4749
-- Scroll of Reraise II
-- Teaches the white magic Reraise II
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(141)
end
function onItemUse(target)
target:addSpell(141)
end
|
return function()
local tiny = require "tiny"
local cpml = require "cpml"
local particle = tiny.system()
particle.filter = tiny.requireAll("particles", "spawn_rate", "lifetime", "radius", "position")
particle.particle_data = {}
particle.time = 0
particle.default_texture = love.graphics.new... |
local test_env = require("test/test_environment")
local lfs = require("lfs")
local run = test_env.run
local testing_paths = test_env.testing_paths
test_env.unload_luarocks()
local extra_rocks = {
"lpeg-1.0.0-1.rockspec",
"/luasocket-3.0rc1-2.src.rock",
"/luasocket-3.0rc1-2.rockspec",
"/lxsh-0.8.6-2.src.ro... |
-- lua-lru, LRU cache in Lua
-- Copyright (c) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
local lru = {}
function lru.new(max_size, max_bytes)
assert(max_size >= 1, "max_size must be >= 1")
assert(not max_bytes or max_bytes >= 1,
"max_bytes must be >= 1")
-- current size
loc... |
--- === cp.collect.LazyList ===
---
--- A LazyList is a list that is lazily evaluated. It will dynamically create items on demand,
--- and may cache the results if configured to do so.
---
--- It works by requiring two functions which provide information about the length and item at a given index.
--- The `len` functio... |
--[================[
LibSpellLocks-1.0
Author: d87
Description: Provides information about spell lock status after successful interrupts
--]================]
local MAJOR, MINOR = "LibSpellLocks", 3
local lib = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
lib.callbacks = lib.callbacks or L... |
Quest.Config.Storylines["delivery_boy"] ={
name = "Delivery Boy",
id = "delivery_boy",
desc = "Delivering small loads could be so fun",
quests = {
[1] = {
name = "Become a UPS Driver",
desc = "Become a UPS Driver from the F4 menu",
func = function(ply, data)
return true
end
},
[2] = {
name ... |
local config = require('gitsigns.config').config
local Hunk = require('gitsigns.hunks').Hunk
return function(a, b)
local diff_opts = config.diff_opts
local f
if diff_opts.internal then
f = require('gitsigns.diff_int').run_diff
else
f = require('gitsigns.diff_ext').run_diff
end
return f(a,... |
local i = 0
while i < 1000000 do
i = i + 1
end
assert(i == 1000000)
|
workspace "zxShaderViz"
architecture "x64"
configurations { "Debug", "Release" }
startproject "zxShaderViz"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
ExtLibs = {}
ExtLibs["Glad"] = "build/ThirdParty/Glad/include"
ExtLibs["GLFW"] = "build/ThirdParty/GLFW/include"
ExtLibs["Ya... |
riven_broken_wings = class({})
LinkLuaModifier( "modifier_riven_broken_wings", "custom_abilities/riven_broken_wings/modifier_riven_broken_wings", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
-- Ability Start
function riven_broken_wings:CastFilterResult()
... |
--!strict
--[[
Copyright (c) 2021, Zach Curtis
Proportional Intergral Derivative Controller
See: https://www.csimn.com/CSI_pages/PIDforDummies.html
]]
local PID = {}
PID.__index = PID
---@param kP number proportional gain - counters current error
---@param kI number intergral gain - counters accumulated... |
local msg = "Hello World!"
return msg |
--------------------------------------------------------------------
-- This file was automatically generated by ProjectGenerator
-- which is tooling part the build system designed for GUCEF
-- (Galaxy Unlimited Framework)
-- For the latest info, see http://www.VanvelzenSoftware.com/
--
-- The contents of this file... |
-- TODO: change the use of let g:
H.cmd([[
let g:VM_maps = {}
let g:VM_maps['Add Cursor Down'] = '<c-s>'
let g:VM_maps['Add Cursor Up'] = '<c-w>'
]])
|
local TYPE = {
-- https://github.com/lua/lua/blob/master/lua.h#L60
LUA_TNIL = 0,
LUA_TBOOLEAN = 1,
LUA_TLIGHTUSERDATA = 2,
LUA_TNUMBER = 3,
LUA_TSTRING = 4,
LUA_TTABLE = 5,
LUA_TFUNCTION = 6,
LUA_TUSERDATA = 7,
LUA_TTHREAD = 8,
LUA_TNONE = -1,
}
return TYPE
|
------------------------
-- GUI library
-- https://github.com/KennyShields/LoveFrames
-- @lib loveframes
-- THIS IS A FAKE IMPLEMENTATION JUST TO ASSIST DOCUMENTATION GENERATION. DO NOT INCLUDE IN THE FRAMEWORK.
|
package.path = "?.lua;gen/?.lua;"
local fdoc = io.open("lua/lua_opengl.lua", "w+")
--gen lua_opengl.c
local srclist = require("gen_auto")
local addlist = require("gen_manual")
table.move(addlist, 1, #addlist, #srclist + 1, srclist)
local fd = io.open("src/lua_opengl.c", "w+")
fd:write("#include \"lua_opengl.h\"\n... |
size = {210, 110}
local currentPosition = get(position)
------------------- Aircraft power bus
defineProperty("avionics_power", globalPropertyi("sim/cockpit/electrical/battery_on"));
--replace with dataref fitting your aircraft electrical systems to simulate electrical system connection. example "sim/cockpit/electrica... |
local Util = {}
function Util.assign(toObj, ...)
for _, fromObj in ipairs({...}) do
for key, value in pairs(fromObj) do
toObj[key] = value
end
end
return toObj
end
function Util.makeToString(staticName)
return function(self)
return ("%s(%s)"):format(staticName, getmetatable(self).name)
end
end
functio... |
---@param num number
local function wantsNumber(num) end
---@type number
local aNumber
---@type string
local aString
---@type any
local unknown
wantsNumber(aNumber)
wantsNumber(aString) -- Expect error
wantsNumber(unknown)
aNumber = aNumber
aNumber = aString -- Expect error
aNumber = unknown
aString = aString
aSt... |
-- This is automatically generated using
-- templates/compile_templates.lua on Thu Sep 14 00:26:06 2017
-- luacheck: push ignore
local _={}
_[1]={["init.lua"]="--- Injects a loverocks-compatible module loader into your game.\n-- See http://github.com/Alloyed/loverocks for details\n-- (c) Kyle McLamb, 2016 <alloyed@tf... |
local l = { }
for x=1, 5 do ::redo::
local y = x^2 + 1
if x < 30 then
l[#l+1] = function() return y end
x = y
goto redo
end
end
for k = 1, #l do
print(l[k]())
end |
local config = require("waf.config")
local redis = require "resty.redis"
local cjson = require "cjson"
local red = redis:new()
red:set_timeouts(2000) -- 2 sec
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
red:close()
end
res, err = red:get("pass_proxy")
if r... |
--- Class that handles all Oracle encryption
local cipher=require ("resty.openssl.cipher")
local rand=require("resty.openssl.rand")
require "suproxy.utils.stringUtils"
require("suproxy.utils.pureluapack")
local aes = require "resty.aes"
local _M = {
getServerKey=function(self,pass,realpass,s_sesskey,auth_vrfy... |
local historylib = require("cmdbuf.lib.history")
local messagelib = require("cmdbuf.lib.message")
local M = {}
function M.histories()
return historylib.filter_map("cmd", function(cmd)
if cmd == "" then
return nil
end
return cmd
end)
end
function M.add_history(_, line)
vim.fn.histadd("cmd", li... |
----------------------------------------------------------------------------------------------
-- -- -- PATHS
----------------------------------------------------------------------------------------------
-- -- GENERIC PATHS
path_mod = "__science-not-invited__/"
-- Libraries
path_public_l... |
SWEP.ClassName = throwingneedles
SWEP.Category = "Labyrinth"
SWEP.Spawnable = false
SWEP.AdminOnly = false
SWEP.PrintName = "Throwing Needles"
SWEP.Base = "weapon_base"
SWEP.Author = "TB002"
SWEP.Instructions = "Throw needles at humans."
SWEP.ViewModel = "models/crossbow_bolt.mdl"
SWEP.WorldModel = "models/crossbow_bol... |
-----------------------------------------
-- Spell: Aero IV
-- Deals wind damage to an enemy.
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/magic")
-----------------------------------------
function onMagicCastingCheck(caster, target, spell)
return 0
end
func... |
function love.load()
x, y, w, h = 0, 0, 60, 20
end
function love.update(dt)
w = w + 1
h = h + 1
end
function love.draw()
love.graphics.setColor(0, 100, 0)
love.graphics.circle("fill", x, y, w, h)
end
|
return {
once = true,
mode = 2,
id = "FUYINGYINGHUA13",
continueBgm = true,
fadeType = 1,
fadein = 1.5,
scripts = {
{
mode = 1,
stopbgm = true,
sequence = {
{
"<size=51>长夜仍在继续</size>",
1
},
{
"<size=51>风暴仍未平息</size>",
3
},
{
"<size=51>若长夜就此不息</size>",
... |
-- Lua magic to not pollute the global namespace
_ENV = setmetatable({}, {__index = _ENV})
Lexer = { }
function Lexer.open (src)
Lexer.error = nil
source = src
char = src:sub(1,1)
eof = char == ""
pos = {line=1, col=1}
saved_pos = nil
end
function err (msg)
Lexer.error = pos.line .. ":" .. pos.col .. ... |
device_defaults = {}
device_defaults.properties = {
-- store preferences to the file system and restore them at startup;
-- when set to false, default nodes and routes are selected based on
-- their priorities and any runtime changes do not persist after restart
["use-persistent-storage"] = true,
}
function d... |
CookieView = {}
function CookieView:display()
local cktable = ''
local cookie = tab.lastjslogmsg
cookie = ctk.string.replace(cookie,'; ','\n')
if cookie ~= '' then
cktable = '<table border=1 width="100%"><tr style="color:gray;"><td>Cookie</td><td>Value</td></tr>'
p = ctk.string.loop:new()
p:load(cooki... |
Spawner = Entity:extend()
function Spawner:new()
Spawner.super.new(self)
self:loadImage("data/images/spawner.png", 8, 8)
self:addAnimation("main", { 1, 2, 3 }, 10)
self:playAnimation("main")
self.solid = false
end
function Spawner:update(dt)
Spawner.super.update(self, dt)
if love.math.random(0, 600) == 0 and... |
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local GainBias = require "Unit.ViewControl.GainBias"
local Task = require "Unit.MenuControl.Task"
local MenuHeader = require "Unit.MenuControl.Header"
local Encoder = require "Encoder"
local Uti... |
return {
init = function(self, pins)
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, 8, 16, spi.FULLDUPLEX)
self.disp = u8g.pcd8544_84x48_hw_spi(pins.cs or 8, pins.dc or 6, pins.res)
self:set_font()
end,
get_fonts = function(self)
local fonts = {}
for key,val in... |
-- Cache
local scrW, scrH = ScrW, ScrH
local vgui_create = vgui.Create
local color = Color
local draw_box = draw.RoundedBox
local surface_setdrawcolor = surface.SetDrawColor
local surface_setmaterial = surface.SetMaterial
local surface_drawtexturedrect = surface.DrawTexturedRect
local surface_drawtexturedrectrotated = ... |
-- Non-maximum suppression (NMS)
--
-- Greedily skip boxes that are significantly overlapping a previously
-- selected box.
--
-- Arguments
-- boxes Bounding boxes as nx4 tensor, each row specifies the
-- vertices of one box { min_x, min_y, max_x, max_y }.
-- overlap Intersection-over-union (IoU... |
--[[
Spectral warping
some parts based on Mutable Instruments Clouds "Spectral Madness"
see: https://github.com/pichenettes/eurorack/tree/master/clouds/dsp/pvoc
]]
require "include/protoplug"
stereoFx.init()
fftlib = script.ffiLoad("libfftw3.so.3", "libfftw3-3", "libfftw3.3.dylib")
ffi.cdef[[
typedef double fftw_c... |
-- Properties injected by the WoW API to the addon.
-- AddonName is the name of the addon as specficied in the .toc file.
-- AddonTable is an empty table injected to all .lua files of the addon. Can be used to store private
-- information.
local AddonName, AddonTable = ...
AddonTable.Storage = {}
function AddonTable.... |
local Root = script.Parent.Parent
local Players = game:GetService("Players")
local ErrorOccurred = require(Root.Actions.ErrorOccurred)
local RequestBundlePurchase = require(Root.Actions.RequestBundlePurchase)
local PurchaseError = require(Root.Enums.PurchaseError)
local getBundleDetails = require(Root.Network.getBundl... |
math.randomseed(os.time())
blink = 0
colors = {
{212, 200, 184, 255},
{170, 142, 130, 255},
{100, 121, 82, 255},
{62, 62, 74, 255},
{39, 41, 53, 255},
}
nsizes = 5
sizes = {
{1, 1, 1, 1},
{1, 2, 3, 4},
{10, 2, 3, 5},
{8, 2, 4, 1},
{0, 2, 3, 0},
}
prev = -1
trig = -1
Square =... |
-- 微信验证
-- 每个需要用到的服务都需要在启动的时候调wx.init
--
local http = require "bw.web.http_helper"
local sha256 = require "bw.auth.sha256"
local json = require "cjson.safe"
local map = {} -- appid -> access
local function request_access_token(appid, secret)
assert(appid and secret)
local ret, resp = http.get(... |
--- Funktionen für die KI
-- C
AI = {}
--- Fügt einen Wegpunkt für die Armee hinzu.
-- (Am Ende der Liste?)
function AI.Army_AddWaypoint(_player, _armyId, _entityId) end
--- Lässt die Armee alle Gegner in Sichtweite angreifen.
-- (Dauerhaft, kein abschalten!)
function AI.Army_BeAlwaysAggressive(_player, _armyId) end
... |
if not package.loaded['vim.lsp'] then
return
end
vim.lsp.set_log_level('info')
local default_available_servers = {
'pyright',
'intelephense',
'vuels',
'tsserver',
}
local custom_lsp_attach = function(client)
vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', {noremap = true})
vim.api.n... |
--[[
SorI/O
An adaptation from MarI/O by SethBling
Adapted by gsaurus
"MarI/O is a program made of neural networks and genetic algorithms that
kicks butt at Super Mario World."
Source Code by SethBling: http://pastebin.com/ZZmSNaHX
"NEAT" Paper: http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf
... |
data:extend({
{
type = "tree",
name = "5d-banner-1",
icon = "__5dim_decoration__/graphics/icon/icon_5d_banner1.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "5d-banner-1"},
max_health = 100,
corpse = "small-remnants",
collision_box = {{-0... |
local lisp = {}
lisp.sbcl = {
command = {"sbcl"},
}
lisp.clisp = {
command = {"clisp"},
}
return lisp
|
--package.path = package.path .. "rfc2544/?.lua"
package.path = package.path .. ";/opt/dpdk/MoonGen/rfc2544/?.lua"
local standalone = false
if master == nil then
standalone = true
master = "dummy"
end
local dpdk = require "dpdk"
local memory = require "memory"
local device ... |
Scripts = Scripts or {}
local Projectile = {}
Projectile.__index = Projectile
Scripts.Projectile = Projectile
function Projectile:New(damage)
local self = {}
self.damage = damage or 1
return setmetatable(self, Projectile)
end
function Projectile:OnCollision(collisionSelf, collisionOther)
-- Apply da... |
demonic_warrior_chase = class({})
LinkLuaModifier( 'demonic_warrior_chase_modifier', 'encounters/demonic_warrior/demonic_warrior_chase_modifier', LUA_MODIFIER_MOTION_NONE )
function demonic_warrior_chase:OnSpellStart()
--- Get Caster, Victim, Player, Point ---
local caster = self:GetCaster()
local caster_loc = c... |
local lrucache = require "resty.lrucache.pureffi"
local data = user_agent_parser_data
local cache = lrucache.new(500)
return function(user_agent)
if not user_agent then
return nil
end
local result = cache:get(user_agent)
if result then
return result
end
result = {}
for _, robot in ipairs(data... |
-- APIs
local component = require("component")
local tunnel = component.tunnel
local event = require("event")
local computer = require("computer")
local gpu = component.gpu
-- Boot Variable
function getBootVariable()
local file = io.open("bootVariable", "r")
if file:read() == "true" then
bootMode = true
el... |
return function(PluginService, assets, modules, widget)
local matcher = require(modules.util.matcher)
local candidates = {}
local search = widget.View.UI.Search
local list = widget.View.UI.List
for name, _ in pairs(require(modules.util.icons).icons) do
table.insert(candidates, name)
end... |
local utility = require('shared.utility')
local Page = require('settings.pages.page')
local Settings = require('settings.types')
local state = {
languages = { }
}
local updateLanguages
updateLanguages = function()
local path = 'cache\\languages.txt'
state.languages = { }
if io.fileExists(path) then
local fi... |
--
-- Copyright (c) 2014, 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 pl = requ... |
return {
tag = 'vectors',
summary = 'Create a temporary Vec4.',
description = [[
Creates a temporary 4D vector. This function takes the same arguments as `Vec4:set`.
]],
arguments = {},
returns = {},
related = {
'lovr.math.newVec4',
'Vec4'
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.