content stringlengths 5 1.05M |
|---|
Hephaistos.Recenter(ScreenData.QuestLog, 'ItemStartX', 'ItemStartY')
|
local enemy_meta = sol.main.get_metatable("enemy")
function enemy_meta:has_valid_patrol_route()
local enemy = self
local patrol_route_name = enemy:get_property("patrol_route_name")
local valid_route = true
if not patrol_route_name then
valid_route = false
print("enemy location: ", enemy:get_position())
err... |
local lsp_installer = require("nvim-lsp-installer")
-- local lspkind = require("lspkind")
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
-- Use an on_attach function to only map the following keys
-- after the language server... |
local nativeTitle = PREFSMAN:GetPreference("ShowNativeLanguage") and 1 or 0
return Def.ActorFrame{
-- A temporary frame for the jacket.
Def.Quad {
InitCommand=function(self)
self:horizalign(right):vertalign(bottom):xy(_screen.w-39,_screen.h-46):zoomto(192,192):diffuse(color("#00000075"))
end;
OnCommand=func... |
--- GENERATED CODE - DO NOT MODIFY
-- Elastic Load Balancing (elasticloadbalancingv2-2015-12-01)
local M = {}
M.metadata = {
api_version = "2015-12-01",
json_version = "",
protocol = "query",
checksum_format = "",
endpoint_prefix = "elasticloadbalancing",
service_abbreviation = "Elastic Load Balancing v2",
ser... |
include( "admin_buttons.lua" )
local PANEL = {}
/*---------------------------------------------------------
Name: PerformLayout
---------------------------------------------------------*/
function PANEL:Init()
self.InfoLabels = {}
self.InfoLabels[ 1 ] = {}
self.InfoLabels[ 2 ] = {}
self.btnBan = vgui.Cr... |
require 'cutorch'
require 'ctc'
t = torch.randn(100000):cuda()
t2 = torch.randn(100000)
timer = torch.Timer()
last = 0
for i = 1, (#t)[1] do
t[i] = t[i] + 1
end
now = timer:time().real
print(now - last)
last = now
for i = 1, (#t2)[1] do
t2[i] = t2[i] + 1
end
now = timer:time().real
print(now - last)
last = n... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
local GeometricEncoder = torch.class('unsup.GeometricEncoder','unsup.UnsupModule')
function GeometricEncoder:__init(encoder, decoder, beta)
self.encoder = encoder:cuda()
self.decoder = decoder:cuda()
self.beta = beta
self.loss = nn.MSECriterion():cuda()
self.loss.sizeAverage = false
end
function Geom... |
local playsession = {
{"teomarx", {69744}},
{"mad58max", {1819}}
}
return playsession |
polyline = {
color ="blue",
thickness = 2,
npoints = 4,
-- polyline[ 1]
{x = 0, y = 0},
-- polyline[ 2]
{x =-10, y = 0},
-- polyline[ 3]
{x =-10, y = 1},
-- polyline[ 4]
{x = 0, y = 1}
}
print(polyline[2].x) --> -10
print(polyline[4].y) --> 1
|
-- Copyright (C) 2016 Luke San Antonio
-- All rights reserved.
-- Standard no-frills sandbox for the configuration file
-- Making the sandbox environment in Lua is so much easier because we have to
-- make sure we don't mutate the global environment and properly references
-- variables that *are* in the global envir... |
function love.conf(t)
t.window.width = 368
t.window.height = 702
t.window.title = "Coco climber by kanatos 2016"
t.identity = "clone rainbow island "
end
|
-- device_list.lua
-- _______ _____ _______
-- |__ __| | __ \__ __|
-- | | ___ ___ _ __ _ _| | | | | |
-- | |/ _ \/ _ \ '_ \| | | | | | | | |
-- | | __/ __/ | | | |_| | |__| | | |
-- |_|\___|\___|_| |_|\__, |_____/ |_|
-- ... |
local helpers = require "spec.02-integration.02-dao.helpers"
local Factory = require "kong.dao.factory"
local utils = require "kong.tools.utils"
local api_tbl = {
name = "mockbin",
request_host = "mockbin.com",
request_path = "/mockbin",
strip_request_path = true,
upstream_url = "https://mockbin.com"
}
loca... |
local writeq = {}
local delq = {}
local von = include("lib/von.lua")
menup.von = von
if not sql.TableExists("menup_redux") then
print("Creating SQL table.")
sql.Query("CREATE TABLE IF NOT EXISTS menup_redux ( key TEXT NOT NULL PRIMARY KEY, value TEXT );")
end
local function dbget(key, default)
return delq... |
local jwt = require "resty.jwt"
local cjson = require "cjson"
local basexx = require "basexx"
local secret = os.getenv("JWT_SECRET")
assert(secret ~= nil, "Environment variable JWT_SECRET not set")
if os.getenv("JWT_SECRET_IS_BASE64_ENCODED") == 'true' then
-- convert from URL-safe Base64 to Base64
local r = ... |
---
-- @module Queue
-- @author Quenty
local Queue = {}
Queue.ClassName = "Queue"
Queue.__index = Queue
function Queue.new()
return setmetatable({
_first = 0;
_last = -1;
}, Queue)
end
function Queue:PushLeft(value)
self._first = self._first - 1
self[self._first] = value
end
function Queue:PushRight(value)
... |
if (getMilestone(MS_KILLED_GOLEMS)) then
music = "Flowey.ogg"
end
function start()
add_downward_light(41, 28, 8, 32, 48, 255, 255, 150, 60)
add_downward_light(73, 28, 8, 32, 48, 255, 255, 150, 60)
add_downward_light(105, 28, 8, 32, 48, 255, 255, 150, 60)
add_downward_light(233, 28, 8, 32, 48, 255, 255, 150, 60... |
local ErrorBase = require "SelenScript.error_base"
local Errors = {}
Errors.INTERNAL = ErrorBase.generate("INTERNAL", "Internal Error %u@%u: %s")
Errors.CONTINUE_MISSING_LOOP = ErrorBase.generate("CONTINUE_MISSING_LOOP", "Syntax %u@%u: `continue` is missing loop to continue.")
return Errors
|
local version = 1.0
-- Prefix: sm.color.
-- Commands:
--match(rgba) - Matches the paint gun colors to numbers (1-40)
--toRGB(hsv) - Turns HSV to RGB
--toHSV(rgba) - Turns RGB to HSV
-- Improved:
--color:match()
--color:toHSV()
--[[
Copyright (c) 2019 Scrap Essentials Team
]]--
-- Version check
if sm.__S... |
resource_manifest_version "05cfa83c-a124-4cfa-a768-c24a5811d8f9"
description 'AnimHotKey'
client_scripts {
"config.lua",
"warmenu.lua",
"client.lua"
}
|
object_tangible_food_spice_spice_muon_gold_01 = object_tangible_food_spice_shared_spice_muon_gold_01:new {
}
ObjectTemplates:addTemplate(object_tangible_food_spice_spice_muon_gold_01, "object/tangible/food/spice/spice_muon_gold_01.iff")
|
local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
local L = AceLocale:NewLocale("RaidSummon", "frFR", true, true)
if not L then return end
L["RaidSummon"] = "RaidSummon"
L["Language"] = "French"
L["AddonEnabled"] = function(X,Y)
return '|cff9482c9RaidSummon:|r version ' .. X .. ' by ' .. Y .. ' chargé'
end
L["Add... |
function split_namespace (identifier)
local ns = {}
return identifier:gsub('([%w_]*)::', function (s) if s then ns[#ns + 1] = s end return '' end), ns
end
|
require "babel"
lang_zh=true -- 显示中文为真,否则假
function love.load()
--初始化babel
babel.init({
locale = "zh-CN",--这里的对应语言文件名,不要".lua"后缀
locales_folders = {
"lang" --设置语言文件的存放的位置
}
})
--设置字体,显示中文还是需要字体的,
--这里没放字体,请到网上找YaHeiConsolas字体,或使用其它支持中文的字体
cnfont=love.graphics.n... |
function copy(e)
rule {
ins = e.ins,
outs = e.outs,
cmd = "cp @1 &1"
}
end
|
local AGENT = "NodeMCU 0.9.5"
local function configWIFI(name,pwd)
local wifi = require"wifi"
wifi.setmode(wifi.STATION)
wifi.sta.config(name,pwd)
return wifi.sta.getip()
end
--open telnet/http to debug
local function openServer(port,timeout,contentHandle)
local net = require"net"
local http = require"http"
if ... |
function Drifter:GetIsCamouflaged()
return self.camouflaged and self.hasCamouflage
end
if Server then
Drifter.kRegenHealRate = 0.03
local oldOnUpdate = Drifter.OnUpdate
function Drifter:OnUpdate(deltaTime)
oldOnUpdate(self, deltaTime)
self.hasCamouflage = GetHasTech(self, kTechId.ShadeHive)
self.hasCelerit... |
local M = {}
function M.add_cmp_source(source, priority)
local cmp = require('cmp')
local config = cmp.get_config()
table.insert(config.sources, { name = source, priority = priority })
cmp.setup(config)
end
return M
|
object_tangible_furniture_all_frn_all_decorative_lg_s2 = object_tangible_furniture_all_shared_frn_all_decorative_lg_s2:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_decorative_lg_s2, "object/tangible/furniture/all/frn_all_decorative_lg_s2.iff")
|
-- Enable this to do live debugging in ZeroBrane Studio
-- local ZBS = "/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio"
-- package.path = package.path .. ";" .. ZBS .. "/lualibs/?/?.lua;" .. ZBS .. "/lualibs/?.lua"
-- package.cpath = package.cpath .. ";" .. ZBS .. "/bin/?.dylib;" .. ZBS .. "/bin/clibs53/?.d... |
--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 26.0... |
--imports
local WIM = WIM;
local _G = _G;
local time = time;
local date = date;
--set namespace
setfenv(1, WIM);
local TimeStamps = WIM.CreateModule("TimeStamps", true);
-- define available timeStamps
local formats = {
"%I:%M", -- HH:MM (12hr)
"%I:%M %p", -- HH:MM AM/PM (12hr)
"%H:%M", -- HH:MM (24... |
local t = Def.ActorFrame{
}
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:zoomto(60,60):diffuse(getMainColor("frame")):diffusealpha(0.7):rotationz(90)
end
}
t[#t+1] = Def.Quad{
InitCommand=function(self)
self:x(-10):zoomto(50,25):diffuse(color("#ffffff")):diffusealpha(0.5):rotationz(90)
end
}
retur... |
--- MidTrackObjectSegmentBuilder
--- Builder Pattern constructor for a MidTrackObjectSegment
local MidTrackObjectSegment = require(script.Parent.MidTrackObjectSegment)
local root = script.Parent.Parent
local Builder = require(root.Builder)
local util = root.Util
local t = require(util.t)
local IsModelWithPrimaryPart... |
local hst = {}
function hst.in_history(player, entity)
if not (global.player_state[player.index].bp_method == "Auto-Mode") then return end
if entity.unit_number then
return (global.player_state[player.index].bp_entity_history[entity.unit_number] ~= nil)
elseif entity.position then
... |
pg = pg or {}
pg.enemy_data_statistics_205 = {
[12300437] = {
cannon = 75,
reload = 150,
speed_growth = 0,
cannon_growth = 800,
rarity = 1,
air = 0,
torpedo = 200,
dodge = 5,
durability_growth = 39000,
antiaircraft = 0,
luck = 18,
reload_growth = 0,
dodge_growth = 72,
hit_growth = 210,
st... |
local term = require("term")
print("testing term blink")
term.setCursorBlink(true)
io.write("this should blink for 1 second")
term.pull(1, "adsfasdfA")
print()
io.write("this should not blink for 1 second")
term.setCursorBlink(false)
term.pull(1, "adsfasdfA")
print()
io.write("this should blink for input [ENTER]: "... |
-- -*- lua -*-
local pkgName = "cmplr/intel"
local fn = myFileName():gsub("%.lua$","")
local fullVersion = barefilename(fn)
local pkgVersion = fullVersion:match("([0-9]+%.[0-9]+)%.?")
local pkgNameVer = pathJoin(pkgName,pkgVersion)
local modulepath_root = os.getenv("MODULEPATH_ROOT")
... |
function distance ( x1, y1, x2, y2 )
local dx = x1 - x2
local dy = y1 - y2
return math.sqrt ( dx * dx + dy * dy )
end
function sign(x)
if x > 0 then
return 1
elseif x < 0 then
return -1
else
return 0
end
end
function round(x)
local floor = math.floor(x)
if ((x - floor) >= 0.5) then
return math.... |
local EaseUI = require(script:GetCustomProperty("EaseUI"))
local mainPointer = script:GetCustomProperty("Main"):WaitForObject()
local reticleUI = script:GetCustomProperty("ReticleUI"):WaitForObject()
local truePointer = script:GetCustomProperty("TruePointer"):WaitForObject()
local sniperView = script:GetCustomProperty... |
LinkLuaModifier("modifier_old_lifestealer_feast", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_old_lifestealer_anabolic_frenzy", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_old_lifestealer_pois... |
local ColorMaskFX, super = Class(FXBase)
function ColorMaskFX:init(color, amount, priority)
super:init(self, priority or 0)
self.color = color or {1, 1, 1}
self.amount = amount or 1
end
function ColorMaskFX:setColor(r,g,b)
self.color = {r, g, b}
end
function ColorMaskFX:getColor()
return self.co... |
--[[@@@
@class BaseBuilding
class overview...
--]]
DefineClass.BaseBuilding = {
class_flags = { cfComponentSound = true },
__parents = { "Holder", "SyncObject" },
working = false,
ui_working = true,
ui_working_changed = 0,
fx_working = "",
suspended = false, -- thread or while the dust storm is active
suspe... |
require 'nn'
require('../../CDataLoader.lua')
local exprSetting = require('./lSettings.lua')
local cDataLoader = CDataLoader.new(exprSetting)
local taX_Sparse = cDataLoader:loadSparseInput()
--local teTarget = cDataLoader:loadTarget()
--print(teTarget)
----[[
table.insert(taX_Sparse, torch.Tensor({{1, 0}}))
local m... |
--[[
Author: Bude
Date: 30.09.2015
Removes HP for using Burning Spear
This is called everytime the ability is used (manual left-click or via auto-cast right-click)
]]
function DoHealthCost( event )
-- Variables
local caster = event.caster
local ability = event.ability
local health_cost ... |
-- 生成字牌表
local table_mgr = require "table_mgr"
local gui_tested = {}
local gui_eye_tested = {}
for i = 0, 8 do
gui_tested[i] = {}
gui_eye_tested[i] = {}
end
local function check_add(encode_cards, gui_num, eye)
local key = 0
for i = 1, 7 do
key = key * 10 + encode_cards[i]
end
if ke... |
---
--- Created by purcarea.
--- DateTime: 30/03/2018
---
local cjson = require "cjson"
local BaseValidatorMock, RedisConnectionProviderMock
local EXPECTED_RESPONSES = {
MISSING_KEY = { error_code = "403000", message = '{"message":"Api KEY is missing","error_code":"403000"}' },
UNKNOWN_ERROR = { error_code =... |
-- @Scootworks
SafeAddString(SI_JOGROUP_SLASH1, "Vielen Dank, dass du JoGroup verwendest!");
SafeAddString(SI_JOGROUP_SLASH2, "-- |cFAF0E6/jogroup unlock|r, damit du das Gruppenfenster verschieben kannst");
SafeAddString(SI_JOGROUP_SLASH3, "-- |cFAF0E6/jogroup lock|r, um das Gruppenfenster zu fixieren");
SafeAddStr... |
-----------------------------------
-- Area: Northern San d'Oria
-- NPC: Attarena
-- Only sells when San d'Oria controlls Li'Telor Region
-----------------------------------
local ID = require("scripts/zones/Northern_San_dOria/IDs")
require("scripts/globals/events/harvest_festivals")
require("scripts/glo... |
--[[
Variables
]]
--[[
Functions
]]
function isChargeActive(pEntity, pContext)
return exports["caue-base"]:getChar("job") == "bennys"
end
function isInGroup(pEntity, pContext)
return exports["caue-groups"]:GroupRank("bennys") > 0
end
--[[
Events
]]
AddEventHandler("caue-mechanic:sign", ... |
object_tangible_quest_imperial_itp_emperor_datadisk = object_tangible_quest_imperial_shared_itp_emperor_datadisk:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_imperial_itp_emperor_datadisk, "object/tangible/quest/imperial/itp_emperor_datadisk.iff")
|
local t = require(script.Parent.Parent.Parent.t)
local ISubscription: (obj: any) -> (boolean, string?) = require(script.Parent.ISubscription)
local IContext: (obj: any) -> (boolean, string?) = require(script.Parent.IContext)
local IParticle: (obj: any) -> (boolean, string?) = require(script.Parent.IParticle)
type ISu... |
--[[--
by ALA @ 163UI/网易有爱, http://wowui.w.163.com/163ui/
CREDIT shagu/pfQuest(MIT LICENSE) @ https://github.com/shagu
--]]--
----------------------------------------------------------------------------------------------------
local __addon, __ns = ...;
local _G = _G;
local _ = nil;
---------------------------------... |
--------------------------------
-- @module FlipX3D
-- @extend Grid3DAction
-- @parent_module cc
--------------------------------
-- brief Initializes an action with duration and grid size.<br>
-- param gridSize Specify the grid size of the FlipX3D action.<br>
-- param duration Specify the duration of the FlipX3D act... |
local _M = require "alien_c"
local alien = _M
local io = require "io"
local pairs, ipairs = pairs, ipairs
local setmetatable = setmetatable
local error = error
local pcall = pcall
local type = type
local rawset = rawset
local unpack = unpack
local math = math
local load, callback = alien.load, alien.callback
_M.load... |
local skynet = require "skynet"
require "skynet.manager"
local cluster = require "skynet.cluster"
local runconf = require(skynet.getenv("runconfig"))
local servconf = runconf.service
local nodename = skynet.getenv("nodename")
local function start_host()
for k,v in pairs(servconf.host_common) do
if... |
local Tunnel = module("vrp","lib/Tunnel")
local Proxy = module("vrp","lib/Proxy")
vRP = Proxy.getInterface("vRP")
--[ CONEXÃO ]----------------------------------------------------------------------------------------------------------------------------
src = {}
Tunnel.bindInterface("vrp_garages",src)
vSERVER = Tunnel.... |
-- Mining Turtle Quarry Script
-- Mines a quarry of the specified length, width, and depth.
-------------------------
-- To Do --
-- function for general turtle movement and digging
-- function (with parameters) for digging the specified dims
-------------------------
--function collection
local len... |
-- Copyright (C) 2016 Pau Carré Cardona - All Rights Reserved
-- You may use, distribute and modify this code under the
-- terms of the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt).
local torchFolder = require('paths').thisfile('..')
package.path = string.format("%s;%s/?.lua", os.getenv("LUA_PA... |
local TimeParser = {}
local converter = {}
converter.s = 1
converter.m = 60
converter.h = converter.m * 60
converter.d = converter.h * 24
converter.w = converter.d * 7
converter.mo = converter.d * 30
converter.y = converter.d * 365
function TimeParser:Parse(ctx, raw)
if raw:Trim() == "" then
return false,... |
--
--
-- ----------------------------------------------------------
-- Mosaic | OF Visual Patching Developer Platform
--
-- Copyright (c) 2018 Emanuele Mazza aka n3m3da
--
-- Mosaic is distributed under the MIT License. This gives everyone the
-- freedoms to use Mosaic in any context: commercial or non-commercial,
-- ... |
minerdream = {}
minerdream.path = minetest.get_modpath("minerdream")
minerdream.modname = minetest.get_current_modname()
minerdream.items={}
minerdream.itemdef={}
local S = dofile(minerdream.path .. "/intllib.lua")
minerdream.intllib = S
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- sta... |
local sx, sy = guiGetScreenSize()
local localPlayer = getLocalPlayer()
local statusLabel = nil
local openReports = 0
local handledReports = 0
local unansweredReports = {}
local ownReports = {}
-- Admin Titles
function getAdminTitle(thePlayer)
local adminLevel = tonumber(getElementData(thePlayer, "adminlev... |
local msg = require "toy.logger"
local bfs = require "toy.path"
local logname = "mylog.txt"
if bfs.exists(logname) then
bfs.remove(logname)
end
msg.as_file(logname)
msg.print("log system日誌系統")
msg.print("ToyBox;玩具箱;おもちゃ箱;장난감 상자;खिलौनो का बक्सा")
msg.reset()
msg.print("log system日誌系統")
msg.print("ToyBox;玩具箱;おもちゃ... |
return {
{
name = "2015-08-03-132400_init_basicauth",
up = [[
CREATE TABLE IF NOT EXISTS basicauth_credentials(
id varchar(50),
consumer_id varchar(50) ,
username varchar(100) UNIQUE,
password varchar(100),
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTA... |
return {
-- <cd src/arch/arm64/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort
'asm/auxvec.h',
'asm/bitsperlong.h',
'asm/bpf_perf_event.h',
'asm/byteorder.h',
'asm/fcntl.h',
'asm/hwcap.h',
'asm/kvm.h',
'asm/mman.h',
'asm/param.h',
'asm/perf_regs.h',
'asm/posix_types.h',
... |
return function(eva)
-------------------------------------------------------------------------------
local function translate(block,target,output,stack)
stack=stack or {}
local class,type_=block.block_type:match("(.+)_(.+)")
if target.blocks[class][type_] then
stack[#stack+1]=block
target.blocks... |
local constants = require "kong.constants"
return {
limit = { required = true, type = "number" },
period = { required = true, type = "string", enum = constants.RATELIMIT.PERIODS }
}
|
function drawDarkness()
love.graphics.setColor(0, 0, 0)
love.graphics.polygon("fill", 240, 0, 1683, 0, 960, 720)
love.graphics.setColor(255, 255, 255)
end |
local env,java=env,java
local event,packer,cfg,init=env.event.callback,env.packer,env.set,env.init
local set_command,exec_command=env.set_command,env.exec_command
local db2=env.class(env.db_core)
db2.module_list={
"sqlstate",
"snap",
"sql",
"chart",
"ssh",
}
function db2:ctor(isdefault)
self.ty... |
local LOG = {}
local _prompt = "[wagon]"
local _color = function (str)
return str:gsub("%%%{.-%}", "")
end
do
local ok, color = pcall(require, 'ansicolors')
if ok then
_prompt = color "%{yellow bright}[wagon]%{reset}"
_color = color
end
end
function LOG.info(line, ...)
return LOG.raw(_prompt .. " ... |
function get_remainder(n, m):
remainder = n
while remainder > m do
remainder = remainder - m
end
return remainder
end
for line in io.lines(arg[1]) do
n =
m =
io.write(get_remainder(n, m) .. '\n')
end
|
--- basic 9p interactions
class 'np_prot'
--- read stat from path specified
-- @tparam conn conn 9p connection
-- @tparam string path path of file for stat to be read
-- @treturn table stat
function np_prot.stat_read(conn, path)
local f = conn:newfid()
if path == "/" then
conn:clone(conn.rootfid, f)
... |
regex1 = "^[%w.+-=]+@%w+[%w.]*%w*%.%w%w%w?%w?$"
regex2 = "^\"[%w@.+-=]+\"@%w+[%w.]*%w*%.%w%w%w?%w?$"
for line in io.lines(arg[1]) do
print((line:find(regex1) or line:find(regex2)) and "true" or "false")
end
|
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
-- Your code here
local options =
{
width = 174,
height = 160,
numFrames = 4
}
local sheet_handmade = g... |
object_tangible_veteran_reward_frn_vet_6_year_painting = object_tangible_veteran_reward_shared_frn_vet_6_year_painting:new {
}
ObjectTemplates:addTemplate(object_tangible_veteran_reward_frn_vet_6_year_painting, "object/tangible/veteran_reward/frn_vet_6_year_painting.iff")
|
--[[ Copyright (c) 2015 Kzisor/Ysovuka ]]
local _G = _G or GLOBAL
local _M = env
local assert = _G.assert
local error = assert( _G.error )
local rawget = assert( _G.rawget )
local setmetatable = assert( _G.setmetatable )
local setfenv = assert( _G.setfenv )
--[[
The following is to prevent this file from ... |
object_building_general_srii_skyscraper_08 = object_building_general_shared_srii_skyscraper_08:new {
}
ObjectTemplates:addTemplate(object_building_general_srii_skyscraper_08, "object/building/general/srii_skyscraper_08.iff")
|
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 10,
"version_minor", 3,
}),
},
"title", "Waste Rock Grinder",
"id", "ChoGGi_WasteRockGrinder",
"steam_id", "2544246919",
"pops_any_uuid", "53a56418-38cd-4... |
--[[
Forward and backward combined.
]]--
require 'nn'
require 'nnx'
require 'cunn'
require 'cudnn'
require 'cutorch'
paths.dofile('para_model.lua')
local ParallelNet_Mod,ParallelNet = torch.class("nn.ParallelNet_Mod",'nn.ParallelNet')
function ParallelNet_Mod:__init(config, layer)
print("Parallel Model (Comb... |
local cfg = {}
-- paycheck and bill for users
cfg.message_paycheck = "Você recebeu seu salario: ~g~$" -- message that will show before payment of salary
cfg.message_bill = "Pagamento de contas: ~r~$" -- message that will show before payment of bill
cfg.post = "." -- message that will show after payment
cfg.bank = tr... |
-- type = github -- DO NOT REMOVE THIS LINE!
local name = "kubeval"
local release = "v0.16.1"
local version = "0.16.1"
local org = "instrumenta"
local repo = "kubeval"
local base_url = "https://github.com/" .. org .. "/" .. repo
food = {
name = name,
description = "Validate your Kubernetes configuration files,... |
require("Game/particleEffect.lua")
--this = SceneNode()
local waveData = {}
local statsBilboard = Core.getBillboard("stats")
-- function: updateDead
-- purpose: to garantee that no more updates are called
function updateDead()
return false
end
-- function: cleanUpCrystal
-- purpose: cleares up all debri when the cr... |
local map = vim.api.nvim_buf_set_keymap
local file = vim.fn.expand('%')
-- compile
map(0, "n", "<Leader>c", ":te arduino-cli compile --fqbn arduino:avr:uno " .. file .. "<CR>", {noremap = true})
-- execute
map(0, "n", "<Leader>e", ":te arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno " .. file .. "<CR>", {no... |
local Name="luxulux"
local char=workspace[Name]
color2=BrickColor:Black()
color=BrickColor:White()
pcall(function() workspace[Name].Suit:remove() end)
pcall(function() char.Eye:remove() end)
pcall(function() game.Players[Name].PlayerGui:children()[1]:remove() end)
player = game.Players[Name]
player.Character.Humanoid.... |
nodecore.register_aism({
label = "Pliant material itemstack drying increment",
interval = 5,
chance = 2,
itemnames = {"nc_concrete:terrain_stone_blank_ply"},
action = function(stack, data)
if(data.pos)then
local modif = 0;
if(data.player and data.list == "main")then
modif = data.inv:contai... |
return {'aelmans','aelbers','aelen'} |
if settings.startup["shipping-containers-enable-belts"].value then
local TECH_NAME = "gate-belts"
local VANILLA_BELTS = {
["transport-belt"]=true,
["fast-transport-belt"]=true,
["express-transport-belt"]=true,
["se-space-transport-belt"]=true,
}
-- Technology to unlock stuff (all mixed together... |
--
-- Create all HUD variables.
--
local Heart = Material("icon16/heart.png")
--
-- Create the font used throughout the HUD.
--
surface.CreateFont("HUDFont", {
font = "Default",
size = 15,
weight = 1000
})
--
-- Take all of the default HUD elements below and hide them.
--
local HiddenElements = {
... |
TriggerType = {}
---@type number
TriggerType.Sphere = 0
---@type number
TriggerType.Box = 1
|
--[[--
trace.enter_config{
name = name
}
This function is used by execute.config and logs the inclusion of a configuration.
--]]--
function trace.enter_config(args)
if not trace._disabled then
local name = args.name
if type(name) ~= "string" then
error("No name string passed to trace.enter_config{... |
mod_scale = 2/3
data:extend(
{
{
type = "assembling-machine",
name = "gasification-plant",
icon = "__base__/graphics/icons/chemical-plant.png",
icon_size = 32,
flags = {"placeable-neutral","placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "gasification-plant"}... |
#!/usr/local/bin/lua
Game = {}
function Game:play()
print("let's play a game")
end
function Game:quit()
print("I am going to quit")
end
return Game
|
--[[
____ _ _ _
/ ___| _ _ _ __ ___ / \ __| |_ __ ___ (_)_ __
\___ \| | | | '_ \ / __| / _ \ / _` | '_ ` _ \| | '_ \
___) | |_| | | | | (__ / ___ \ (_| | | | | | | | | | |
|____/ \__, |_| |_|\___/_/ \_\__,_|_| |_| |_|_|_| |_|
|___/ ... |
-- Create the item groups for the new big recipes
require("util")
local function itemGroupSetup()
for k,v in pairs(util.table.deepcopy(data.raw["item-group"])) do
v.localised_name = v.localised_name or {"item-group-name." .. v.name}
v.name = v.name .. "-big"
v.order = "y" .. v.order
... |
require('torch')
require('nn')
--- @class GaussianToBernoulli
local GaussianToBernoulli, GaussianToBernoulliParent = torch.class('nn.GaussianToBernoulli', 'nn.Module')
--- Initialize.
function GaussianToBernoulli:__init(mean)
self.logvar = -2
self.eps = 0.5
end
--- Print dimensions of last layer.
-- @param input... |
local SLEEKPANEL = {}
function SLEEKPANEL:Init()
self:SetBackgroundColor(Color(0, 0, 0, 0));
self:EnableVerticalScrollbar();
self:SetSpacing(10);
self.VBar.Paint = fn.Id
self.VBar.btnUp.Paint = fn.Id
self.VBar.btnDown.Paint = fn.Id
end
function SLEEKPANEL:fillLabels(tbl)
self:Clear();
for i, cmd in ipairs(tbl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.