content stringlengths 5 1.05M |
|---|
HedgewarsScriptLoad("/Scripts/Locale.lua")
HedgewarsScriptLoad("/Scripts/Achievements.lua")
local playerTeamName
local player = nil
local enemy = nil
local firedShell = false
local turnNumber = 0
local hhs = {}
local numhhs = 0
function onGameInit()
Seed = 0
TurnTime = 20000
CaseFreq = 0
MinesNum = 0
Exp... |
local image = require 'image'
local paths = require 'paths'
local t = require 'datasets/transforms'
local ffi = require 'ffi'
local M = {}
local LaneDataset = torch.class('resnet.LaneDataset', M)
function LaneDataset:__init(imageInfo, opt, split)
self.imageInfo = imageInfo[split]
self.opt = opt
self.split = ... |
-- -*- lua -*-
help(
[[ This module loads the gpaw environment version 0.10.0
Note that this module removes all other modules during load
]])
purgeAndLoad('gcc/4.7.2', 'intelmpi/4.1.0', 'ase/3.9.1', 'openblas/0.2.6', 'python/2.7.3', 'mkl/11.0.2',
'hdf5-par/1.8.10', 'gpaw/0.11.0', 'gpaw-setups/0.9.11271')
|
-- Beatmap Select Button
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
local love = require("love")
local Luaoop = require("libs.Luaoop")
local MainFont = require("main_font")
local color = require("color")
local ImageButton = require("game.ui.image_button")
local beatmapSelButton = Lua... |
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local Action = require(Modules.Common.Action)
return Action(script.Name, function(left, top, right, bottom)
return {
left = left,
top = top,
right = right,
bottom = bottom,
}
end) |
return {
name = "Česky [Built-in]",
description = "Překlad do češtiny.",
api_version = 4,
-- incomplete
skip = true,
-- please use ISO 639-1 plus country code if required
language_code = "cs"
}
|
--[[
desc: Pathgate, a article of path gate.
author: Musoucrow
since: 2018-6-5
alter: 2019-5-7
]]--
local _Point = require("graphics.drawunit.point")
---@class Actor.Component.Article.Pathgate
---@field public lightTweener Util.Gear.Tweener
---@field public doorTweener Util.Gear.Tweener
---@field public isO... |
local folderOfThisFile = (...):match("(.-)[^%/%.]+$")
local class = require(folderOfThisFile.."/middleclass")
local LineSegment = class("LineSegment")
function LineSegment:init(p0, p1)
-- p0, p1: type(Point)
self.p0 = p0
self.p1 = p1
end
function LineSegment.compareLengths_MAX(segment0, segment1)
-- ... |
local webhook = {}
function webhook:modify(callback, payload)
self.client:modifyWebhook(callback, self.id, payload)
end
function webhook:modifyWithToken(callback, payload)
self.client:modifyWebhookWithToken(callback, self.id, self.token, payload)
end
function webhook:delete(callback)
self.client:deleteWebhook(cal... |
-- ShowUserGuide
-- created on 2021/9/4
-- author @zoloypzuo
function ImGui.ShowUserGuide()
-- ImGuiIO& io = ImGui.GetIO();
ImGui.BulletText("Double-click on title bar to collapse window.");
ImGui.BulletText("Click and drag on lower corner to resize window\n" ..
"(double-click to auto fit window... |
Locales['de'] = {
-- Cloakroom
['cloakroom'] = 'Umkleide',
['ems_clothes_civil'] = 'Zivil',
['ems_clothes_ems'] = 'Uniform',
-- Vehicles
['ambulance'] = 'Rettungsdienst',
['helicopter_prompt'] = 'Drücke ~INPUT_CONTEXT~ um auf das ~y~Helikopter-Menü~s~ zuzugreifen.',
['garage_prompt'] = 'Drücke ~INPUT_CO... |
local _, ns = ...
local oUF = ns.oUF or oUF
assert(oUF, 'oUF not loaded')
local Update = function(self, event, ...)
local _, instanceType = IsInInstance()
if instanceType ~= 'arena' then
self.Trinket.Icon:SetTexture("Interface\\Icons\\Ability_pvp_gladiatormedallion")
self.Trinket:Hide()
return
else
self.T... |
-- config: (lint (only syntax:misplaced-dots))
local function f(..., x) end
local function f(x, ...) end -- ok
|
--====================================================================--
-- dmc_corona/dmc_websockets/frame.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (C) 2014-2015 David McCuskey. All Rights Re... |
#!/usr/bin/env tarantool
-- Instance file for one of the 10 swarm nodes. They bootstrap the cluster, each
-- bump their vclock component and then do nothing and serve as replication
-- masters for the eleventh node.
local id = tonumber(arg[1])
assert(id ~= nil, 'Please pass a numeric instance id')
assert(id >= 2 and ... |
local Game = {}
function Game.getDistance(xa, ya, xb, yb)
local xDist = xb - xa
local yDist = yb - ya
return math.sqrt((xDist ^ 2) + (yDist ^ 2))
end
function Game.getPokemonNumberWithMove(move, joy) -- optional parameter happiness
joy = joy or 0
for i = 1, getTeamSize() do
if hasMove(i, ... |
MAX_SKILLS = 8
-- Skill type tree
SkillTypeSkill = 0 -- Everything is a skill
SkillTypeAttack = 1
SkillTypeRangedAttack = SkillTypeAttack | 1 << 16
SkillTypeBowAttack = SkillTypeRangedAttack | 1 << 32
SkillTypeSpearAttack = SkillTypeRangedAttack | 2 << 32
Skill... |
local LoveUI=LoveUI
LoveUI.require("LoveUIRect.lua")
LoveUI.require("LoveUIResponder.lua")
LoveUI.View=LoveUI.Responder:new();
function LoveUI.View:init(frame, ...)
-- e.g local o=LoveUI.Object:alloc():init();
LoveUI.Responder.init(self, frame, ...);
self.frame=frame or LoveUI.Rect:new(-1,-1,-1,-1);
self.scissor... |
---@class CS.FairyEditor.Framework.Gears.FGearDisplay2 : CS.FairyEditor.Framework.Gears.FGearBase_CS.System.String
---@field public pages String[]
---@type CS.FairyEditor.Framework.Gears.FGearDisplay2
CS.FairyEditor.Framework.Gears.FGearDisplay2 = { }
---@return CS.FairyEditor.Framework.Gears.FGearDisplay2
---@param o... |
object_tangible_item_crusader_armor_dye_kit = object_tangible_item_shared_crusader_armor_dye_kit:new {
}
ObjectTemplates:addTemplate(object_tangible_item_crusader_armor_dye_kit, "object/tangible/item/crusader_armor_dye_kit.iff")
|
local ngx_abort = require('acid.ngx_abort')
local function callback_func()
end
function test.basic(t)
ngx.ctx.callbacks = nil
local cb_1, err, errmsg = ngx_abort.add_callback(callback_func)
t:eq(nil, err)
t:eq(nil, errmsg)
t:eq(cb_1, ngx.ctx.callbacks[1][1])
local cb_2, err, errmsg = ngx_a... |
local isInRagdoll = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
if isInRagdoll then
SetPedToRagdoll(PlayerPedId(), 1000, 1000, 0, 0, 0, 0)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(2, Config.RagdollKeybi... |
return {'ace','acetaat','aceton','acetylcholine','acetyleen','acetyleenbrander','acetyleengas','acetylsalicylzuur','aceh','acetyleenbranders','aces','acetaten'} |
local InCombat = {
}
local OutCombat = {
}
XB.CR:Add(269, '[XB] Monk - Windwalker', inCombat, outCombat) |
if kunkka_tidebringer_ff == nil then
kunkka_tidebringer_ff = class({})
end
LinkLuaModifier("modifier_tidebringer_ff", "heroes/kunkka/modifier_tidebringer_ff.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_tidebringer_ff_weapon_effect", "heroes/kunkka/modifier_tidebringer_ff_weapon_effect.lua", LUA_MODIFIER_... |
-- 自定义函数指针
local type = type
local u_each = require("app.utils.each")
local s_cache = require("app.store.cache.base_cache")
-----------------------------------------------------------------------------------------------------------------
local _obj = s_cache:extend()
------------------------------------------ 通用配置信... |
function getNearbyElementsByType( x, y, z, type, distance )
local elements = { }
for _, element in ipairs( getElementsByType( type ) ) do
if ( getDistanceBetweenPoints3D( x, y, z, getElementPosition( element ) ) < distance ) then
table.insert( elements, element )
end
end
return elements
end |
---
-- Placeholder for false
---
do
local function __eq(a, b)
return (lemma.type(a) == lemma.type(b)) and (tostring(a) == tostring(b))
end
local function __tostring(e)
return 'False'
end
local t = {}
local mt = {
class = 'False',
implements = nil,
__index = t,
__tostring = __tostring,
__eq = __eq
}
False = ... |
--[[ Day 16: Chronal Classification
]]--
local fname = arg[1]
local verbose = (fname == '-v')
local printf = function(s,...)
return io.write(s:format(...))
end
local regs = {[0] = 0, 0, 0, 0}
local qregs = 4
local regok = function (n) return n >= 0 and n < qregs end
local _I = {} -- instruction table
--[[... |
local format = { }
for _, module in ipairs(script:GetChildren()) do
format[module.Name] = require(module)
end
return format |
-- Thu Aug 30 13:59:57 2018
-- (c) Alexander Veledzimovich
-- scr SWARM
local Tmr = require('lib/tmr')
local cls = require('lib/cls')
local ctrl = require('lib/lovctrl')
local ui = require('lib/lovui')
local cmp = require('lib/lovcmp')
local b2d = require('lib/lovb2d')
local fl = require('lib/lovfl')
local obj = req... |
#!./hive
require("common/log");
require("common/tree");
require("common/alt_getopt");
require("common/signal");
lbus = require("lbus")
lredis = require("lredis");
_G.s2s = s2s or {};
if not hive.init_flag then
local long_opts =
{
routers=1, --router addr: 127.0.0.1:6000;127.0.0.1:6001
index=1... |
return {'sweater','sweatshirt','sweelinck','sweder','swen','sweep','sweers','sweere','sweet','swertz','swets','sweegers','sweelssen','sweerts','sweens','swenne','swenker','sweaters','sweatshirts','sweders','swens'} |
-----------------------------------
-- Area: The Celestial Nexus
-- Mob: Eald'narche (Phase 2)
-- Zilart Mission 16 BCNM Fight
-----------------------------------
require("scripts/globals/titles")
require("scripts/globals/status")
require("scripts/globals/magic")
-----------------------------------
function onMobInit... |
addEvent ( "doSendDriveBySettings", true )
addEvent ( "deletePedForDrivebyFix", true )
addEvent ( "savePedForDrivebyFix", true )
---Left/right toggling
local bikes = { [581]=true,[509]=true,[481]=true,[462]=true,[521]=true,[463]=true,
[510]=true,[522]=true,[461]=true,[448]=true,[468]=true,[586]=true }
local driver =... |
includeFile("custom_content/intangible/vendor/generic_vendor_control_device.lua")
|
object_mobile_dressed_corellia_ragtag_anita_bath = object_mobile_shared_dressed_corellia_ragtag_anita_bath:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_corellia_ragtag_anita_bath, "object/mobile/dressed_corellia_ragtag_anita_bath.iff")
|
-- vim.cmd [[packadd nvim-compe]]
-- vim.cmd [[packadd vim-vsnip]]
-- vim.cmd [[packadd vim-vsnip-integ]]
local map = vim.api.nvim_set_keymap
local protocol = require "vim.lsp.protocol"
-- vim.cmd "au BufEnter *.jsx set filetype=javascript"
vim.o.completeopt = "menuone,noselect"
require "compe".setup {
enabled = tru... |
if minetest.get_modpath("basic_materials") == nil then
--------------
-- PLASTICS --
--------------
minetest.register_craftitem(":basic_materials:oil_extract", {
description = "Oil Extract",
inventory_image = "elepower_oil_extract.png",
})
minetest.register_craftitem(":basic_materials:paraffin", {
... |
--[[ Akilzon- Gauntlet Event
This script was written and is protected
by the GPL v2. This script was released
by Paroxysm of the Blua Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation commUnity.
~~End of License Agreement
-- Paroxysm, October 23,... |
local scope={}
-------------------------------------------------------------------------------
scope.address=function(address,next_scope)
local block={
block_type = "scope_address",
address = address or {},
next_scope = next_scope
}
return block
end
scope.index=function(index,next_scope)
... |
--[[
TheNexusAvenger
Runs the TODO list plugin.
--]]
local NexusPluginComponents = require(script:WaitForChild("NexusPluginComponents"))
local TodoListWindow = require(script:WaitForChild("TodoListWindow"))
--Create the window.
local Window = TodoListWindow.new(plugin)
--Create the button.
local NexusWidgetsToolb... |
UnitPopupButtons["GM_MENU"] = { text = "GM Menu", dist = 0, nested = 1 };
UnitPopupMenus["GM_MENU"] = { "GM_PRINT_GUID" }
tinsert(UnitPopupMenus["TARGET"], 1, "GM_MENU")
tinsert(UnitPopupMenus["PLAYER"], 1, "GM_MENU")
tinsert(UnitPopupMenus["RAID_PLAYER"], 1, "GM_MENU")
tinsert(UnitPopupMenus["PARTY"], 1, "GM_MENU")
U... |
AddCSLuaFile( 'cl_init.lua' )
AddCSLuaFile( 'shared.lua' )
include( 'shared.lua' )
timer.Destroy( 'HostnameThink' )
hook.Add( 'PreGamemodeLoaded', 'widgets_disabler_cpu', function()
function widgets.PlayerTick()
end
hook.Remove( 'PlayerTick', 'TickWidgets' )
end )
|
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local count = {}
local transfer = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
... |
local has_iter, iter = pcall(require, "kk.iter")
if not has_iter then
print "lua/kesav/tabline.lua: install kesav21/lua-stdlib"
return
end
local function choose(first, second, condition)
if condition then
return first
else
return second
end
end
local function is_equal(a)
return function(b)
return a == b
... |
local M = {}
local hotfix_helper = require("hotfix_helper")
local test = require("test")
local function sleep(sec)
local end_time = os.time() + sec
while os.time() < end_time do end
end -- sleep()
function M.run()
hotfix_helper.init()
while true do
test.func()
sleep(2)
hotfix_helper.check()
en... |
function genMiningDrills(inputs)
-- Copy electric furnace
local item = table.deepcopy(data.raw.item["electric-mining-drill"])
local recipe = table.deepcopy(data.raw.recipe["electric-mining-drill"])
local entity = table.deepcopy(data.raw["mining-drill"]["electric-mining-drill"])
local tech = table.de... |
local HighlighterFactory = require("searcho.lib.highlight").HighlighterFactory
local bufferlib = require("searcho.lib.buffer")
local M = {}
local SearchHighlight = {}
SearchHighlight.__index = SearchHighlight
M.SearchHighlight = SearchHighlight
function SearchHighlight.new(window_id)
local bufnr = vim.api.nvim_win... |
GUI = {}
Menu = {}
Menus = {}
--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
--==============================================================================================--
-- Settings ... |
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
client_script 'carhud.lua' |
local etcd = require "resty.etcd"
local _M = {}
local mt = {__index = _M}
function _M.new(conf)
conf = conf or {}
local self = setmetatable({}, mt)
local options = {
http_host = conf.http_host or "http://127.0.0.1:4001",
protocol = conf.protocol or "v2",
key_prefix = conf.key_prefix or "",
time... |
--- Administration functions (topology related).
--
-- @module cartridge.lua-api.topology
local checks = require('checks')
local errors = require('errors')
local membership = require('membership')
local pool = require('cartridge.pool')
local topology = require('cartridge.topology')
local confapplier = require('cartri... |
local localizer = require("localization/localizer")
local gameplay_data = require("resources/gameplay_data")
-- class holding persistent information on the fighter, pc or npc
local fighter_progression = new_class()
--[[
Parameters
character_type: character_types is the fighter representing a player or an npc?
... |
--[[
MIT License
Copyright (c) 2019 Michael Wiesendanger
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, mod... |
-- luacheck: std lua53
if _VERSION < 'Lua 5.3' then
require ('compat53')
end
local Bits = require ('map.file.bits')
local Flags = require ('map.file.flags')
local W3I = {}
local map_flags = {
[0x00001] = 'hide_minimap_in_preview_screens',
[0x00002] = 'modify_ally_priorities',
[0x00004] = 'melee_map',
[0x00008] ... |
local function loadMapData()
local map = game.GetMap():lower();
if (map ~= "rp_evocity_v2d") then
MsgN("Elevatr doesn't know ", map, "!");
return
end
return {
SearchArea = { Vector(-7000, -9000, 2800), Vector(-7300, -9500, 60) };
Stops = {
{
Name = "Ground";
Pos = Vector(-7114, -9382, 134.0679)... |
object_tangible_food_bar_drink_bar_s05 = object_tangible_food_bar_shared_drink_bar_s05:new {
}
ObjectTemplates:addTemplate(object_tangible_food_bar_drink_bar_s05, "object/tangible/food/bar/drink_bar_s05.iff")
|
require("mods")
require("modutil")
local function modprint(...)
--print(type(...) == "table" and unpack(...) or ...)
end
local mod_config_path = "mod_config_data/"
ModIndex = Class(function(self)
self.startingup = false
self.cached_data = {}
self.savedata =
{
known_mods = { },
known_api_version = 0,
}
end... |
-- ARGV[1] = queue name
-- ARGV[2] = batch name
-- ARGV[3] = max batch
for i=0,ARGV[3] do
redis.call("RPOPLPUSH",ARGV[1],ARGV[2])
end
local element = redis.call("LRANGE",ARGV[2],0,-1)
return element |
--[[
LuCI - SGI-Module for WSAPI
Description:
Server Gateway Interface for WSAPI
FileId:
$Id: wsapi.lua 2656 2008-07-23 18:52:12Z Cyrus $
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... |
hatoffsetindex = {}
hatoffsetindex["idleanim"] = "idle"
hatoffsetindex["run"] = "running"
hatoffsetindex["runfast"] = "running"
hatoffsetindex["slide"] = "sliding"
hatoffsetindex["jump"] = "jumping"
hatoffsetindex["fall"] = "falling"
hatoffsetindex["climb"] = "climbing"
hatoffsetindex["swim"] = "swimming"
hatoffsetinde... |
return {
up = function()
local utils = require('migrator.utils')
local owners = box.schema.space.create("owners", { if_not_exists = true })
owners:format({
{ name = "id", type = "uuid" },
{ name = "first_name", type = "string" },
{ name = "last_name", typ... |
--[[
Test loading the hms (body joints predictor) networks (LSTM + ConvNet3D).
]]
require 'torch'
require 'paths'
require 'string'
require 'nn'
require 'nngraph'
require 'image'
require 'cutorch'
require 'cunn'
require 'cudnn'
torch.manualSeed(4)
torch.setdefaulttensortype('torch.FloatTensor')
paths.dofile('../p... |
--!strict
local NONE = require(script.Parent.None)
return function<T>(schema: T, input: any): T
local options = {}
for key, value in pairs(schema) do
options[key] = if value == NONE then nil else value
end
if type(input) ~= "table" then
return options::any
end
for key, _ in pairs(schema::any) do... |
ESX = nil
blip = nil
blips = {}
RegisterCommand("co", function(source, args, rawcommand)
local pos = GetEntityCoords(PlayerPedId())
print(pos.x..", "..pos.y..", "..pos.z)
end, false)
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = o... |
local cute = require("cute")
local shapes = require("src.shapes")
notion("Can execute tests in subfolders", function ()
check("exterminate").is("exterminate")
end)
|
ITEM.name = "Tuborg GREEN, 330ml"
ITEM.description = "A bottle of beer"
ITEM.longdesc = "The story of Tuborg starts in Hellerup, north of Copenhagen, where the Tuborg Brewery brewed Denmark’s first pilsner-type beer in 1880 and packaged it in bottles with a distinctive green label. It instantly became popular with the ... |
target("libco")
set_kind("$(kind)")
set_basename("co")
add_files("**.cc")
add_options("with_openssl")
add_options("with_libcurl")
if has_config("with_libcurl") then
add_packages("libcurl")
add_packages("openssl")
elseif has_config("with_openssl") then
ad... |
-- I have little to no idea of what the hell I'm even doing to be honest
local composer = require( "composer" )
composer.gotoScene( "game" ) |
-----------------------------------------------------------------------------------------------------------------------------------------
-- GETHEALTH
-----------------------------------------------------------------------------------------------------------------------------------------
function tvRP.getHealth()
retu... |
local client_async = require "websocket.client_async"
local log = require "nakama.util.log"
local b64 = require "nakama.util.b64"
local uri = require "nakama.util.uri"
local json = require "nakama.util.json"
local uuid = require "nakama.util.uuid"
local b64_encode = b64.encode
local b64_decode = b64.decode
local uri_... |
--[[=============================================================================
# FileName: util.lua
# Desc: 工具函数
# Author: hanxi
# Email: hanxi.com@gmail.com
# HomePage: http://hanxi.cnblogs.com
# Version: 0.0.1
# LastChange: 2013-08-22 10:09:03
# History:
===================... |
local Alignment = {}
local triggers = {}
local function setup(args)
local tempTriggers = {}
tempTriggers.Alignment =
tempRegexTrigger("^(?:> )?You (\\w+) believe in (\\w+)\\."
,[[
local conviction = matches[2]
local alignment = matches[3]
... |
local t = require "tests.luaunit"
-- XML module tests
local X = require "openLuup.xml"
local N = 0 -- total test count
local D = [[
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:sche... |
function init()
connect(g_game, {onGameStart = online, onGameEnd = offline})
if g_game.isOnline() then online() end
end
function terminate()
disconnect(g_game, {onGameStart = online, onGameEnd = offline})
offline()
end
function online() g_keyboard.bindKeyDown('Ctrl+R', toggleMount) end
function offli... |
--[[
This module defines all AST shapes.
It also servers as a documentation for AST nodes schemas.
These shapes are used for shape checking in tests
and when manually creating AST nodes.
]]
local aster = require 'nelua.aster'
local shaper = aster.shaper
-- Block containing a list of statements.
aster.register('Block... |
-- We write save data to the general purpose buffer, until a save platform
-- is triggered.
-- DEBUG_BEGIN
g_debug = false
-- DEBUG_END
g_card_fade = 8
poke(0x5f5c, 15) -- set the initial delay before repeating.
poke(0x5f5d, 15) -- set the repeating delay.
function _init()
music(0, 3000)
g_tl = ztable([[
... |
local games = require("Games")
local misc = require("Misc")
local mafia = {}
local jester3, chicagoPD, jungle
local known_setups = "Jester3 (!start Mafia Jester3)\nChicago PD (!start Mafia Chicago)\nJungle of Bullshit (!start Mafia Jungle)\nWin Lose Banana (!start Mafia Banana)"
--####################################... |
--local DEBUG = true
local g_DbgPerfData = {}
if ( DEBUG ) then
function DbgPrint ( fmt, ... )
outputDebugString ( fmt:format ( ... ), 3 )
end
function DbgDump ( str, title )
local bytes = { str:byte ( 1, str:len () ) }
local buf = "";
for i, byte in ipairs ( bytes ) do
buf = buf..( " %02X" ... |
class("S1mple_Timer")
function S1mple_Timer:__init()
self.clocks = {}
AddTickCallback(function ()
self:updateClocks()
end)
end
function S1mple_Timer:updateClocks()
for i,v in pairs(self.clocks) do
if v and GetGameTimer() > v.t then
if v.r > 0 then
self.clocks[i].r = v.r-1
v.c()
self.clocks[i].t ... |
require "android"
android.makeToast("Hello, Android!")
|
local util = require 'util'
local lovetoys = require 'lovetoys.lovetoys'
local rot = require 'rot'
local Component = lovetoys.Component.create('Actor')
function Component:initialize(speed)
self.speed = speed or 100
self.eventQueue = rot.EventQueue()
self.added = false
end
function Component:getSpeed()... |
for i,v in pairs(game.Players:GetPlayers()) do
if v.Participating.Value == true then
i = Instance.new("IntValue", script.Parent)
i.Name = "Punching_" ..v.Name.. ""
script.TaskGUI:Clone().Parent = v.PlayerGui
scriptclone = script.PressedScript:Clone()
scriptclone.Parent = v.PlayerGui
cameragiverclone = scri... |
-- can be used for both /proc/cmdline, and /proc/[pid]/cmdline
local sutil= require("lj2procfs.string-util")
local function decoder(path)
-- open the file
-- return full contents as a string
local f = io.open(path)
local str = f:read("*a")
local tbl = {}
-- can possibly be a string of '\0' delimited values
for... |
local Plugin = script.Parent.Parent.Parent.Parent
local Libs = Plugin.Libs
local Roact = require(Libs.Roact)
local Utility = require(Plugin.Core.Util.Utility)
local Constants = require(Plugin.Core.Util.Constants)
local ContextGetter = require(Plugin.Core.Util.ContextGetter)
local ContextHelper = require(Plugin.Core.U... |
local RunService = game:GetService("RunService")
local Selection = game:GetService("Selection")
local Modules = script.Parent.Parent.Parent.Parent
local Roact = require(Modules.Roact)
local StudioComponents = require(Modules.StudioComponents)
local ComponentManager = require(script.Parent.Parent.Parent.ComponentManag... |
local Analytics = {}
local isDevice = (system.getInfo("environment") == "device")
local platform = system.getInfo("platform")
local platform_list = {"android", "ios"}
local firebaseAnalytics = nil
local isInit = false
local isPlatformAllowed
function Analytics.init()
if isDevice then
if isPlatformAllowed() then... |
local host_immunity = GetModConfigData( "host_immunity" )
local afk_time = GetModConfigData( "afk_time" )
local max_afk_time = GetModConfigData( "max_afk_time" )
local max_afk_action = GetModConfigData( "max_afk_action" )
local stop_death = GetModConfigData( "stop_death" )
local stop_hunger = GetModConfigData( "hunger... |
local M = {}
local Highlighter = {}
Highlighter.__index = Highlighter
function Highlighter.add(self, hl_group, row, start_col, opts)
opts.hl_group = hl_group
vim.api.nvim_buf_set_extmark(self._bufnr, self._ns, row, start_col, opts)
end
function Highlighter.add_virtual(self, chunks, row, start_col, opts)
opts.v... |
require 'util'
local manhattan = curry(function(a,b)
return math.abs(a.x - b.x) + math.abs(a.y - b.y)
end)
local input = '06 - Input.txt'
local coords = keyBy(map(lines_from(input), function(v,k,t)
local point = {
x = tonumber(v:match('(%d+),')),
... |
-- my task
dofile("sendtemp.lua")
|
module(..., package.seeall)
--====================================================================--
-- Test: Json module
--====================================================================--
-- Semantic Versioning Specification: http://semver.org/
local VERSION = "0.1.0"
--===================================... |
local L = LibStub("AceLocale-3.0"):NewLocale("BuloLayer", "enUS", true, true)
L = L or {}
L["Layer Hopper"] = true
L["BuloLayer"] = true
L["optionsDesc"] = [=[Layer Hopper Config (You can type /lh config to open this).
Auto inviting will be disabled automatically if inside an instance or battleground and when in a batt... |
AddCSLuaFile()
CustomizableWeaponry.registeredSoundNames = {}
CustomizableWeaponry.reloadSoundVolume = 60
-- default settings
CustomizableWeaponry.reloadSoundTable = {
channel = CHAN_AUTO,
volume = 1,
level = CustomizableWeaponry.reloadSoundVolume,
pitchstart = 100,
pitchend = 100,
name = "noName",
sound = "... |
------------------------------
-- library
------------------------------
require 'torch'
require 'xlua'
require 'optim'
require 'cunn'
------------------------------
-- function
------------------------------
function valid()
collectgarbage()
print("")
-- Load valid images
print(" => Load valid images")
path.... |
cmd = torch.CmdLine()
cmd:text()
cmd:text()
cmd:text('Training a simple network')
cmd:text()
cmd:text('Options')
cmd:option('-seed',123,'initial random seed')
cmd:option('-booloption',false,'boolean option')
cmd:option('-stroption','mystring','string option')
cmd:text()
-- parse input params
params = cmd:parse(arg)
p... |
vim.g.mapleader = " "
-- when in terminal mode(:term), map ESC to exit instead of the default c-\ c-n
vim.api.nvim_set_keymap("t", "<Esc>", [[<C-\><C-n>]], {noremap = true, silent = true})
-- create new file
vim.api.nvim_set_keymap("n", "<Leader>fn", [[<Cmd> DashboardNewFile<CR>]], {noremap = true, silent = true})
--... |
-- English localization file for enUS and enGB.
local L = LibStub("AceLocale-3.0"):NewLocale("DrinkIt", "enUS", true)
L["Created macro:"] = true
L["Can't create new macro:"] = true
L["Make enough space in your general macro section."] = true
L["mage"] = true
L["conjure"] = true
L["conjured"] = true
L["refreshment"] =... |
local mesecons_mod = minetest.get_modpath("mesecons")
-- How far lights can be from a plant. 0 = infinite
local height_max = 2
local grow_light_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = 0, z = -1},
{x = 0, y = 0, z = 1},
}
function hydro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.