content
stringlengths
5
1.05M
-- Keyboard settings mod = "cmd" -- = cmd: finger pattern different than on linux -- = alt: conflicts with special characters like [, ] and \ -- = ctrl: complicated finger pattern with big reach from thumb to numbers
resource.AddFile( "materials/vgui/entities/weapon_acf_grenade.vmt" ) AddCSLuaFile( "shared.lua" ) SWEP.HoldType = "grenade" if (CLIENT) then SWEP.PrintName = "M68 Impact Hand Grenade" SWEP.Author = "" SWEP.Slot = 4 SWEP.SlotPos = 3 SWEP.IconLetter = "f" SWEP.DrawCrosshair = false ...
data:extend( { { type = "technology", name = "coalprocessing-4", icon = "__base__/graphics/icons/boiler.png", icon_size = 32, effects = { { type = "unlock-recipe", recipe = "carbon-nanotubes", } }, prerequisites = {"coalprocessing-3"}, unit = { coun...
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Watering Can" ENT.Spawnable = true ENT.Category = "Blue's Farm" function ENT:SetupDataTables() self:NetworkVar("Float", 0, "WaterAmount") self:NetworkVar("Bool" , 1 , "IsPouring") self:NetworkVar("Bool" , 2 , "IsOpen") self:NetworkVar("Angle", 3 , "P...
local K, C = unpack(select(2, ...)) local _G = _G local DAMAGE = _G.DAMAGE local DISABLE = _G.DISABLE local GUILD = _G.GUILD local GetCurrentRegion = _G.GetCurrentRegion local HEALER = _G.HEALER local ITEM_QUALITY2_DESC = _G.ITEM_QUALITY2_DESC local ITEM_QUALITY3_DESC = _G.ITEM_QUALITY3_DESC local ITEM_QUALITY4_DESC ...
local current_timestamp_ms = tonumber(ARGV[1]) local tokens_per_ms = tonumber(ARGV[2]) local bucket_size = tonumber(ARGV[3]) local new_content = tonumber(ARGV[3]) local tokens_to_take = tonumber(ARGV[4]) local ttl = tonumber(ARGV[5]) local current = redis.pcall('HMGET', ...
require "rooms"; used_colors = {}; function close_some_rooms() Log.print("Closing some rooms' doors"); for k, v in pairs(Rooms.rooms) do if not v.used then local run_once = true; while not Rooms.check_accessible_around(v) or run_once do local r = Rooms.random_doors(); local vlN = R...
return function(vars, args) -- d a [name] [type] [value] vars.declare(args[3], { type = 'a', value = { { type = args[4], value = args[5] } }}) end
local Storage = {} function Storage.vocabularyFile(dataDir) return path.join(dataDir, 'vocabulary.t7') end function Storage.tensorFile(dataDir) return path.join(dataDir, 'data.t7') end function Storage.filesExist(dataDir) return path.exists(Storage.vocabularyFile(dataDir)) and path.exists(Storage.tensorF...
require "strings.strings"
local LuaTreeMap = {} LuaTreeMap.__index = LuaTreeMap local RED, BLACK = 1, 0 local defaultComparer = function(x,y) return x < y end function LuaTreeMap.New(comparer) comparer = comparer or defaultComparer local NIL = {} NIL.color = BLACK NIL.left = NIL NIL.right = NIL return setmetatable...
--设置lua的垃圾回收参数;暂时引擎不考虑这方面的配置。 cc.FileUtils:getInstance():setPopupNotify(false) cc.FileUtils:getInstance():addSearchPath("src/") cc.FileUtils:getInstance():addSearchPath("res/") local startCheck = package.path:find(";") if not startCheck or startCheck>1 then package.path = ";" .. package.path end for i=1, 10 do ...
local process = require("process") local shell = require("shell") local text = require("text") local tx = require("transforms") local sh = {} sh.internal = {} function sh.internal.isWordOf(w, vs) return w and #w == 1 and not w[1].qr and tx.first(vs,{{w[1].txt}}) ~= nil end local isWordOf = sh.internal.isWordOf ---...
--- -- A pretty printer for our parsed tree. -- -- May be extented into a more general-purpose pretty printer later, but that’s -- really not something we should be willing to spend much time on. -- local function indent(n) for i = 1, n do io.write(" ") end end local function pprint(t, i) if not i then i = 0 ...
local cmd_win = "./taplo-lsp.exe" local script_win = [[ Invoke-WebRequest -UseBasicParsing "https://github.com/tamasfe/taplo/releases/latest/download/taplo-lsp-windows-x86_64.zip" -OutFile "taplo.zip" Expand-Archive .\taplo.zip -DestinationPath .\ Remove-Item taplo.zip ]] local cmd = "./taplo-lsp" local sc...
-- This is a part of uJIT's testing suite. -- Copyright (C) 2020-2021 LuaVela Authors. See Copyright Notice in COPYRIGHT -- Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT local m, e -- -- Trivial cases -- m, e = math.frexp(65536) assert(m == 0.5 and e == 17) m, e = math.frexp(0.5) assert(m =...
function norm(x, y) return math.sqrt(x ^ 2 + y ^ 2) end function twice(x) return 2.0 * x end
--[[ module:Employee author:DylanYang time:2021-02-09 15:53:22 ]] local _M = Class("Employee") local public = _M.public _M.private.name = nil _M.dept = nil _M.salary = nil _M.private.subordinates = nil function _M:ctor(name, dept, sal) self.name = name self.dept = dept self.salary = sal se...
local utils = {} local telescope_utils = require "telescope.utils" local path_sep = require("plenary.path").path.sep ---Emit a warning message. ---@param msg string function utils.warn(msg) vim.api.nvim_echo( { { "[telescope-bookmarks] " .. msg, "WarningMsg" } }, true, {} ) end ---Wrapper around tel...
config = { max_speed = 10, acceleration = 0.2, max_turn = math.pi/30, height = function() return 100 end, bottom = 20, target_speed = 1, min_distance = 10, margin_x = 0.1, -- left and right margin as a proportion of the screen draw_target = true, max_attract_speed = 20, growth_rate = 2, shrink_r...
function string.filter(input, pat, rep) pat = pat or "[%s%p%c]+" rep = rep or "" return input:gsub(pat, rep) end function string.block(text, block, line) local block = block or 5 local line = line or 60 local len = 0 local output = text:gsub(string.rep("%C", block), function(t) len = len + #t+1 if len>lin...
--[[ Coroutine dispatcher design questions, approach and constraints: - Dispatcher will have startup, mainloop and cleanup sections. Tasks can supply corresponding functions that runs for each of these sections. - Tasks that propogates an error are considered dead and will be removed ...
local MicroWorld = require 'refuge.micro_world' local HarvestTest = class(MicroWorld) function HarvestTest:__init() self[MicroWorld]:__init(128) self:create_world() local player_id = self:get_session().player_id local z = -35 [[self:place_item('stonehearth:trees:oak:ancient', -45, z) self:place_ite...
-------------------------------------------------------------------------------- local _ = require 'cherry.libs.underscore' local animation = require 'cherry.libs.animation' local Text = require 'cherry.components.text' -------------------------------------------------------------------------------- loc...
ITEM.ID = "backpack"; ITEM.Name = "Backpack"; ITEM.Description = "A backpack. Useful for carrying more things."; ITEM.Model = "models/props_junk/garbage_bag001a.mdl"; ITEM.Weight = 1; ITEM.FOV = 25; ITEM.CamPos = Vector( 2.56, -0.01, 50 ); ITEM.LookAt = Vector( 0, 0, 0 ); ITEM.CarryAdd = 15; ITEM.Bul...
local ffi = require('ffi') local bit = require('bit') local phm = require("apps.lwaftr.podhashmap") local stream = require("apps.lwaftr.stream") -- e.g. ./snabb snsh apps/lwaftr/test_phm_create.lua count occupancy filename local function run(params) if #params ~= 3 then error('usage: test_phm_create.lua COUNT OCCUP...
local app=require('app') local ray=require('ray') local string=require('string') local sqlite3=require('sqlite3') local grid=app.global("grid80") function createBoxDetails(boxnum) --[[ There are 4 + 8 + 12 + 16 big boxes, and 10x10 sub-boxes, in each hemisphere! Better make sure we go through them all. It might take s...
local _, private = ... -- Lua Globals -- -- luacheck: globals next type tinsert -- Libs -- local ace = _G.LibStub("AceAddon-3.0") local Aurora = _G.Aurora local Skin = Aurora.Skin -- RealUI -- local RealUI = private.RealUI local L = RealUI.L local db local MODNAME = "AddonControl" local AddonControl = RealUI:NewMo...
local grasses = require("asset.data.grass") TiledMap = GameObject:extend() local tileset_img = love.graphics.newImage("asset/image/tileset1.png", format) tileset_img:setFilter("nearest","linear") local tile_size = 32 local mw,mh = 33,21 local floorBatch = love.graphics.newSpriteBatch(tileset_img,mw*mh) local objBatch...
Items = {} itemTypes = {"HAT", "SHOE"} function Items:load() self.itemsByType = { ['HAT'] = require('src/items/hats/hats'), ['SHOE'] = require('src/items/shoes/shoes'), } self.items = {} for _, itemType in ipairs(itemTypes) do local itemsOfType = self.itemsByType[itemType] ...
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech / LuaPineapple -- Models By Jaanus ---------------------------------------- EFFECT.RenderGroup = RENDERGROUP_BOTH local WallModel = NULL function EFFECT:Init() if( WallModel == NULL ) the...
r1,g1,b1,r2,g2,b2 = 255,255,255,255,255,255 function openColorPicker() colorPicker.openSelect(colors) end function closeColorPicker() colorPicker.closeSelect() end function closedColorPicker() colorPicker.closeSelect() cpicker = false if vehicle and isElement(vehicle) then local r1, g1, b1, r2, g2, b2 = ge...
--Services local DataStoreService = game:GetService("DataStoreService") local RunService = game:GetService("RunService") local PlayersService = game:GetService("Players") local Comm = require(script.Parent.Parent.Comm) local Promise = require(script.Parent.Parent.Promise) local Signal = require(script.Parent.Parent.S...
if not E2Lib then return end E2Lib.RegisterExtension("impulse", true, "Allows E2 to interact with certain methods in the impulse framework.") local function checkOwner(self) return IsValid(self.player); end __e2setcost(35) e2function number impulseGetPlayerMoney(entity ent) if not IsValid(ent) then return end if...
help([[ The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. - Homepage: http://www.pcre.org/]]) whatis([[Description: The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax...
-- Word Buster Enable Lang command file (v1.0) -- Copyright (c) 2022, Jericho Crosby <jericho.crosby227@gmail.com> local Command = { name = 'wb_enable_lang', description = 'Enable lang file', admin_level = 4, help = 'Syntax: /$cmd', no_perm = 'You need to be level $lvl or higher to use this command...
function update() local speed = 5.0 local dt = getDeltaTime() local id = getEntityID() local px, py, pz = getTransformComponentPosition(id) if getKeyState("up") == 1 then pz = pz - speed * dt end if getKeyState("down") == 1 then pz = pz + speed * dt end if getKeyState("left") == 1 then px ...
-- Code created by Kwik - Copyright: kwiksher.com {{year}} -- Version: {{vers}} -- Project: {{ProjName}} -- local _Class = {} local _K = require("Application") -- function _Class:setMod(layer, custom) if custom then self.mod = require("custom.components."..self.page.."."..layer) else self.mod = require("com...
-- -- resnet16.lua -- -- Copyright (c) 2017, Mingyuan Luo -- require 'torch' require 'nn' require 'cunn' require 'cutorch' require 'cudnn' torch.setdefaulttensortype('torch.FloatTensor') model = nn.Sequential() model:add(cudnn.SpatialConvolution(3, 10, 11, 11, 2, 2, 0, 0, 1)) model:add(cudnn.SpatialBatchNormalizat...
local maxActivationDist = 32 local TweenService = game:GetService("TweenService") local remote = game.ReplicatedStorage.RequestCoffee local localPlayer = game.Players.LocalPlayer local function closeTo(obj) local char = localPlayer.Character local root = char and char:FindFirstChild("HumanoidRootPart") return root a...
local function a() local x=0 for i=1,1e3 do x=x+i end end local function b() local x=0 for i=1,1e3 do x=x+1 end end local function c() local x=0 for i=1,1e3 do x = x + 1 ("%d"):format(x) end end local annotate = require("jit.annotate") annotate.on() a() b() a() c() annotate.off() ...
require 'torch' require 'nn' require 'optim' require 'model' require 'image' require 'cutorch' require 'cunn' require('gnuplot') require('lfs') require('data') data = {} dtype = 'torch.CudaTensor' -- specify directories model_root = 'models/' data_root = 'data/deepbind/' viz_dir = 'visualization_results/' -- ********...
local Interface = require('vgit.Interface') local M = {} M.state = Interface:new({ current = {}, }) M.get = function() return M.state:get('current') end M.set = function(component) assert(type(component) == 'table', 'type error :: expected table') M.state:set('current', component) end M.exists = function()...
package.path = './?.lua;' .. package.path _G.sqlite = require('sqlite3') _G.discordia = require('discordia') local client = discordia.Client() local config = require('config') local debugmode = GetMainConfig("debugmode") _G.netlib = require('./lua/netlib') local process = netlib.Process local ...
local modpath = core.get_modpath(core.get_current_modname()) smoketest = { modpath = modpath, expect_infinite_stacks = core.setting_getbool("creative_mode"), sam = cubictest.dummies.Player:new() } local sam = smoketest.sam local orig_get_player_by_name = core.get_player_by_name core.get_player_by_name = function(na...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) TriggerEvent('esx_phone:registerNumber', 'banker', _('bank_customer'), false, false) TriggerEvent('esx_society:registerSociety', 'banker', 'Banquier', 'society_banker', 'society_banker', 'society_banker', {type = 'public'}) RegisterServerEven...
local local0 = 0.3 local local1 = 1 - local0 local local2 = 1 - local0 local local3 = 1 - local0 local local4 = 1 - local0 local local5 = 0 - local0 local local6 = 1 - local0 local local7 = 30 - local0 local local8 = 1 - local0 local local9 = 30 - local0 local local10 = 1 - local0 local local11 = 10 - local0 local loca...
require("strict") local hook = require("Hook") local http = require("socket.http") http.TIMEOUT = 30 function url_quote(str) if (str) then str = string.gsub (str, "\n", "\r\n") str = string.gsub (str, "([^%w %-%_%.%~])", function (c) return string.format ("%%%02X", string.byte(c)) end) str = stri...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' client_script "va_client.lua" server_script "va_server.lua"
local json = require "cjson" local http_client = require "kong.tools.http_client" local spec_helper = require "spec.spec_helpers" describe("OAuth 2 Credentials API", function() local BASE_URL, credential, consumer setup(function() spec_helper.prepare_db() spec_helper.start_kong() end) teardown(functi...
hs = { status="Progressing", message="No status available"} if obj.status ~= nil then if obj.status.phase ~= nil then hs.message = obj.status.phase if hs.message == "Succeeded" then hs.status = "Healthy" return hs elseif hs.message == "Failed" or hs.message == "Unknown" then hs.status = ...
local cv = {} return cv
ngx.log(ngx.INFO, 'mock_idp_init.lua start') ;(function() local xmlsec = require "saml.service_provider.xmlsec" local config = require "saml.mock_idp.config" config.response.idp_certificate = xmlsec.readfile('/etc/nginx/saml/idp.example.com.crt') config.mock_idp = { key = xmlsec.readfile('/etc/nginx/saml/id...
function clamp(v, min, max) return (v < min and min) or (v > max and max) or v end
------------------------------------------------------------------------------------------------ -- The Stars module. -- -- @module stars -- @author Łukasz Durniat -- @license MIT -- @copyright Łukasz Durniat, Mar-2018 ------------------------------------------------------------------------------------------------ --...
-- ================================== -- File Name : Phoenix.lua -- Author : Eroica -- Version : 3.1 -- Date : 2017.5.16 -- ================================== local Utility = require("Utility") local Phoenix = {} Phoenix.optionFireSpirit = Menu.AddOption({"Hero Specific","Phoenix"},"Auto Fire Spirit", "auto...
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT) local NUM_COLUMNS = 5 local SPEED = 80 local IMAGE_WIDTH = WIDTH / NUM_COLUMNS local IMAGE_HEIGHT = HEIGHT / NUM_COLUMNS local function alphanumsort(o) local function padnum(d) return ("%03d%s"):format(#d, d) end table.sort(o, function(a,b) return tostring(a):gsu...
local st = require "util.stanza"; local xmlns_starttls = 'urn:ietf:params:xml:ns:xmpp-tls'; local starttls_attr = { xmlns = xmlns_starttls }; local s2s_feature = st.stanza("starttls", starttls_attr); local starttls_failure = st.stanza("failure", starttls_attr); module:hook("s2s-stream-features", function(event) loca...
-- tl_ops_api -- en : get balance service node config list -- zn : 获取路由服务节点配置列表 -- @author iamtsm -- @email 1905333456@qq.com local cjson = require("cjson"); cjson.encode_empty_table_as_object(false) local cache = require("cache.tl_ops_cache"):new("tl-ops-service"); local tl_ops_constant_service = require("constant....
if mods["Bio_Industries"] then --order data:extend( { { type = "item-subgroup", name = "bio-coal-products", group = "bio-industries", order = "01-a", }, { type = "item-subgroup", name = "bio-raw-material", group = "bio-industries", order = "02-a", }, { type = "item-subgroup"...
local context = G.botContext context.name = function() return context.player:getName() end context.hp = function() return context.player:getHealth() end context.mana = function() return context.player:getMana() end context.hppercent = function() return context.player:getHealthPercent() end context.manapercent = funct...
-- BGProtocol.lua --[[ Implementation of Boundary Gateway Protocol (BGP) --]] local ffi = require("ffi"); local Timer = require("Timer") local IOCPSocket = require("IOCPSocket"); local SocketUtils = require("SocketUtils") local Network = require("Network") --[[ BGP Relies on the presence of a fully connected graph ...
---@class Deck2DAssetManager : AssetManager local Deck2DAssetManager = CLASS: Deck2DAssetManager ( AssetManager ) function Deck2DAssetManager:getName () return 'asset_manager.deck2d' end function Deck2DAssetManager:acceptAssetFile ( filePath ) if not checkFileExt ( filePath, '.deck2d' ) then return false end if not...
function a() end function foo2() end local function foo3 () end function foo4 () end function foo5__ () end function foo6 () end local func1 = function () end local t = {func2 = function() end} function ...
-- This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -- This file is based on Lua 5.x tests -- https://github.com/lua/lua/tree/master/testes print("testing numbers and math lib") do local a,b,c = "2", " 3e0 ", " 10 " assert(a+b == 5 and -b == -3 and ...
--[[ Synapse Xen v1.1.2 by Synapse GP VM Hash: 5a3468a1a2823d7042928bbea5a387659ff00a827392e002cabf1b598cb897cb ]] local SynapseXen_lililliIllII=select;local SynapseXen_iIiIII=string.byte;local SynapseXen_lIlIilIIIIlIi=string.sub;local SynapseXen_iIilIiiillIiIlllllii=string.char;local SynapseXen_liliIlili=type...
local mp = assert(require"mimeparse") -- public void testParseMediaRange() -- { -- assertEquals("('application', 'xml', {'q':'1',})", MIMEParse -- .parseMediaRange("application/xml;q=1").toString()); -- assertEquals("('application', 'xml', {'q':'1',})", MIMEParse -- ...
local class = require "xgame.class" local util = require "xgame.util" local runtime = require "xgame.runtime" local PluginEvent = require "xgame.PluginEvent" local Dispatcher = require "xgame.Dispatcher" local cjson = require "cjson.safe" local trace = util.trace("[huawei]") local i...
local Trainer = torch.class('Trainer') function Trainer:__init(model, criterion, opt) self.iter = 0 self.params, self.grad_params = model:getParameters() self.opt = opt self.optim_state = {learningRate=opt.learning_rate, momentum=opt.momentum,weightDecay=opt.weightDecay} self.init_learning_rate = opt.learnin...
local theme = require "gruvbox.theme" local util = require "gruvbox.util" local M = {} M.load = function() if vim.g.colors_name then vim.cmd "hi clear" end vim.g.colors_name = "gruvbox" local colors = require "gruvbox.colors" local groups = theme.groups(colors) util.syntax(groups) util.terminal(c...
local HealItem, super = Class(Item) function HealItem:init(o) -- Amount this item heals for by default self.heal_amount = 0 super:init(self, o) end function HealItem:getHealAmount(id) return self.heal_amount end function HealItem:onWorldUse(target) -- TODO: World healing return false end fu...
local PANEL = {} local FADE_TIME = 5 local VOLUME = nut.config.get("musicvolume", 0.25) function PANEL:Init() if (nut.menuMusic) then nut.menuMusic:Stop() nut.menuMusic = nil timer.Remove("nutMusicFader") end self:SetVisible(false) nut.menuMusicIsLocal = false timer.Remove("nutMusicFader") local source...
tape = {} for idx=0, 19999 do tape[idx] = 0 end idx = 0
class("GuildCancelTechCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot3 = slot1:getBody().id if not getProxy(GuildProxy):getData() then pg.TipsMgr:GetInstance():ShowTips(i18n("guild_no_exist")) return end if not slot5:getActiveTechnologyGroup() then pg.TipsMgr:GetInstance():ShowTips(i18n(...
local _, SilentRunning = ... SilentRunningMixin = {} function SilentRunningMixin:OnLoad() self:RegisterEvent("ADDON_LOADED") self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("UPDATE_STEALTH") end function SilentRunningMixin:OnEvent(event, ...) if ( event == "ADDON_LOADED" ) then local name = ... ...
init = function(args) seed = tonumber( tostring( {} ):sub(8) ) math.randomseed(seed) end request = function() requestID = math.random(0, 9) if requestID == 0 then path = "/favicon.ico" requestID = requestID + 1 elseif requestID == 1 then path = "/styles/fonts/source-sans-pro/styleshee...
-- ZOMBIE DATA OF EACH THING YOU CAN BECOME -- TODO: ADD MORE! local Box = Vector(5,5,5) local Zombies = { ["Zombie"] = { Name = "Zombie", Model = "models/Zombie/Classic.mdl", OffPos = Vector(0,0,70), CamDis = 130, RunSP = 150, WalkSP = 100, JumpP = 200, HP = 300, CD = 1, Animations = ...
--------------------------------------------------------------------------------------------------- -- User story: https://github.com/smartdevicelink/sdl_core/issues/2379 -- -- Description: -- 1. SDL does not respond NACK on second service. -- Steps to reproduce: -- 1 First service started as Protected. -- 1 Start vide...
local uranium_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 420, octaves = 3, persist = 0.7} local uranium_threshhold = 0.55 local chromium_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 421, octaves = 3, persist = 0.7} local chromium_threshhold = 0.55 lo...
-- FiveM Chat - github.com/bradley1337 -- ------ By NS100#0002 & bradley#1337 ----- Config = {} Config.Locale = 'en' Config.EnableESXIdentity = true -- only turn this on if you are using esx_identity and want to use RP names Config.OnlyFirstname = false -- Looking to blacklist words? Go to the server-side...
BaseTowerSprite = class("BaseTowerSprite", function (...) return BuildingBaseSprite:create(...) end) BaseTowerSprite.type = "UniqueBuilding" Temple:initBuildingHP(BaseTowerSprite) function BaseTowerSprite:onEnter() self:adjustBarPosition(0, 5) end function BaseTowerSprite:create(...) baseTowerSprite = BaseTower...
-- https://youtube.com/watch?v=1Bix44C1EzY local Stateful = require('lib/states') local Button = require('entities/button') local WinScreen = Stateful.newState() local text = "You've escaped Puzzle Prizon!" local bgColor = {.271, .157, .235} local button function WinScreen.enter() button = Button:new("Back to Me...
local OhYouLikeTrains = table.deepcopy(data.raw["cargo-wagon"]["cargo-wagon"]) OhYouLikeTrains.name = "RTPayloadWagon" OhYouLikeTrains.icons = { { icon = "__base__/graphics/icons/cargo-wagon.png", icon_size = 64, icon_mipmaps = 4, tint = {220,125,0} } } OhYouLikeTrains.minable = {mining_time = ...
function love.conf(t) t.releases = { title = "Generic Space Shootan Game", -- The project title (string) package = "shmup", -- The project command and package name (string) loveVersion = nil, -- The project LÖVE version version = nil, -- The project version author = ...
local Migration = { { name = "2015-06-09-jwt-auth", up = function(options) return [[ CREATE TABLE IF NOT EXISTS jwt_secrets( id uuid, consumer_id uuid, key text, secret text, created_at timestamp, PRIMARY KEY (id) ); C...
require("strict") local Dbg = require("Dbg"):dbg() local hook = require("Hook") local function set_props(t) ------------------------------------------------------------ -- table of properties for fullnames or sn local propT = { ["bowtie/1.2.3"] = { {name = "type_", value = "bioinfomatics"}, ...
-- number print('-- number') print(2) print(1.1) print(1 + 2.3) print(1 - 2.3) print(1 * 2.3) print(1 / 2.3) print(5 % 3) print(-1) print(10^13+1) print(10^14+1) print() print(tonumber("abc")) print(tonumber(nil))
local module = {} local fly_count = 0 local function onConfigMessagge(client, data) end local function onMessage(client, topic, data) print("Recieve message in topic `" .. topic .. "`:" ) print(data) if broker.getConfigTopic() == topic then onConfigMessagge(client, data) else if data ~= nil then ...
----------------------------------------- -- ID: 4613 -- Scroll of Cure V -- Teaches the white magic Cure V ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(5) end function onItemUse(target) target:addSpell(5) end
local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end if vim.fn.has('macunix') == 1 then require 'impa...
--------------------------------------------------------------- -- Popup.lua: Redirect cursor to an appropriate popup on show --------------------------------------------------------------- -- Since popups normally appear in response to an event or -- crucial action, the UI cursor will automatically move to -- a popup ...
local function reql_error_formatter(err) if type(err) ~= 'table' then return end if err.ReQLError then return err.message() end end describe('type', function() local r setup(function() assert:add_formatter(reql_error_formatter) r = require('rethinkdb') end) teardown(function() r = nil ...
Names = "royalwiryman" Player = game:GetService("Players").royalwiryman Character = Player.Character PlayerGui = Player.PlayerGui Backpack = Player.Backpack Humanoid = Character.Humanoid Torso = Character.Torso Head = Character.Head LeftArm = Character["Left Arm"] RightArm = Character["Right Arm"] LeftLeg = Character["...
Tween = {} return Tween
-- gets the directory containing this file, so that we can load other files in -- the directory. this is useful because the package may be installed anywhere, -- so `require` is not reliable. also used to read the prelude. local root = debug.getinfo(1, "S").source:match("@?(.+[/\\]).-$") assert(root, "could not get mod...
module:set_global(); local traceback = require "util.debug".traceback; require"util.signal".signal(module:get_option_string(module.name, "SIGUSR1"), function () module:log("info", "Received SIGUSR1, writing traceback"); local f = io.open(prosody.paths.data.."/traceback.txt", "a+"); f:write(traceback(), "\n"); f:c...
return function(s) end
require 'nn' require 'cutorch' require 'cunn' require 'rnn' require 'image' local im = image.load("1.png", 1)[1]:t() local size = im:size() local im_w = size[1] local im_h = size[2] local input_size = im_h local hidden_size = 400 local class_num = 10 local net = nn.Sequential() im = im:float():cuda() net:add(n...
--- This is for the /exit command -- This command issues the exit event. -- @classmod ExitCommand -- region imports local class = require('classes/class') local prototype = require('prototypes/prototype') require('prototypes/command') local adventurers = require('functional/game_context/adventurers') lo...
local cjson = require "cjson" local helpers = require "spec.helpers" local Errors = require "kong.db.errors" for _, strategy in helpers.each_strategy() do describe("Plugin: rate-limiting (API) [#" .. strategy .. "]", function() local admin_client local bp lazy_setup(function() bp = helpers.g...