content stringlengths 5 1.05M |
|---|
require('cutorch')
local util = require('fb.util')
local OBSGD = require('fbcunn.OneBitSGD')
--[[ OneBitDataParallel implements the "1-Bit Stochastic Gradient
Descent and Application to Data-Parallel Distributed Training of
Speech DNNs" paper of Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and
Dong Yu.
The implementat... |
solution "libirr"
configurations { "Debug", "Release" }
configuration { "linux" }
links { "Irrlicht", "GL", "Xxf86vm", "Xext", "X11", "Xcursor", "BulletCollision", "BulletDynamics" }
includedirs { "/usr/include/irrlicht", "/usr/include/bullet" }
libdirs { "/usr/lib" }
configuration { "macosx" }
includedirs {... |
local colors = {
bg = "#24292e",
bg2 = "#1f2428",
fg_light = "#d1d5da",
blue = "#3b8eea",
green = "#23d18b",
magenta = "#bc3fbc",
yellow = "#e2e210",
red = "f14c4c",
}
return {
normal = {
a = {bg = colors.blue, fg = colors.bg},
b = {bg = colors.bg2, fg = colors.blue},
c = {bg = colors.bg,... |
local eal = require 'lib.eal.manager'
require 'factories.base'
local EmitterFactory = class(EntityFactory, function(self)
EntityFactory.init(self, "emitter")
end)
emitter = emitter or EmitterFactory()
emitter:register("damage", function(name)
local e = {
id = name,
vars = {
class = "damageEmitter",... |
--- concat 3 things
function concat_print(a, -- string
b, -- number: any number you like (with parentheses)
c) -- ?string|number: it can be either on nil!
print(a..tostring(b)..tostring(c))
end
concat_print("hello", 10, 2)
concat_print("hello", 10, "hello")
concat_print("hello", 10)
concat_print(10, "hello", {})... |
--[[
Experience management system
]]
require('components/experience/hero_kills_xp')
|
LinkLuaModifier("modifier_abyss_sword_rush_night_sword_qi", "heroes/hero_abyss_sword/abyss_sword_rush_night_sword_qi", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_abyss_sword_rush_night_sword_qi_spell", "heroes/hero_abyss_sword/abyss_sword_rush_night_sword_qi", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifie... |
local lanes = require "lanes" .configure{ with_timers = false, track_lanes = true}
local wait
do
local linda = lanes.linda()
wait = function( seconds_)
linda:receive( seconds_, "dummy_key")
end
end
print "hello"
local track = function( title_)
print( title_)
for k, v in pairs( lanes.threa... |
local realvim = vim
module('global_function_overwrite_test', vim.bridge)
FooBar = 17
realvim.command 'echo exists("*FooBar")'
function FooBar()
end
realvim.command 'echo exists("*FooBar")'
FooBar = nil
realvim.command 'echo exists("*FooBar")'
|
-- A Module to update pfUI to match vanilla plus server (enUS only)
-- based on research of @Heroclastus09 and @hawaiisa
-- https://github.com/Heroclastus09/pfUI @7b190e92656dc76884bdd5f342e064879a2c85c2
pfUI:RegisterModule("vanillaplus", function()
do -- add talent based debuffs to dynamic debuffs
pfUI_locale["e... |
local john = require('function_class')('init', 'John', 28)
package.loaded['function_class'] = nil
local rebecca = require('function_class')('init', 'Rebecca', 21)
john('say_hi')
rebecca('say_hi')
john('get_older')
print(john('get_age')) |
AddCSLuaFile()
if (CLIENT) then
SWEP.PrintName = "Pipe"
SWEP.Slot = 1
SWEP.SlotPos = 2
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end
SWEP.Author = "Zenolisk"
SWEP.Instructions = "Primary Fire: Strike"
SWEP.Purpose = "Hitting things."
SWEP.Base = "reb_melee_base"
SWEP.HoldType = "melee"
SWEP.Category =... |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2008-2016 (All Rights Reserved)
-- =============================================================
--
-- =============================================================
-- Last Updated: 23 NOV 2016
-- Last Validated:
-- ==... |
string.split = function(str, sep)
local res = {}
for v in str:gmatch("([^" .. sep .. "]+)") do
res[#res + 1] = v
end
return res
end
string.trim = function(str)
return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)'
end
string.starts = function(str, substr)
return string.sub(str, 1, #substr) == substr
end
... |
HedgewarsScriptLoad("/Scripts/SimpleMission.lua")
HedgewarsScriptLoad("/Scripts/Locale.lua")
local heroAmmo = {}
for a=0, amMinigun do
if a == amExtraTime then
heroAmmo[a] = 2
elseif a ~= amNothing and a ~= amCreeper then
heroAmmo[a] = 100
end
end
SimpleMission({
missionTitle = loc("Big Armory"),
missionIcon... |
local playsession = {
{"mewmew", {94615}},
{"vvictor", {59077}}
}
return playsession |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
----------------------------------------------------------------
------START------------------------------------------------
----------------------------------------------------------------
server_script "red_core.lua"
---------------------------------... |
local self = {}
GLib.MemoryUsageReport = GLib.MakeConstructor (self)
local pointerSize = 8
local hashSize = 4
local typeSize = 4
local functionSize = 64
local stringLengthSize = 4
local tableSizeSize = 4
function self:ctor ()
self.Pools = {}
self.CountedTables = GLib.WeakKeyTable ()
self.CountedStrings = {}
self.... |
-- Variables
g_Me = getLocalPlayer()
g_Resource = getThisResource()
g_Root = getRootElement()
g_ResourceRoot = getResourceRootElement(g_Resource)
g_Rooms = {}
-- Events
addEventHandler("onClientResourceStart",g_ResourceRoot,
function()
triggerServerEvent("requestServerRooms",localPlayer)
setTimer(updateRooms,50... |
--[[
Copyright 2017 wrxck <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local tpb = {}
local mattata = require('mattata')
function tpb:init()
tpb.commands = mattata.commands(
self.info.username
):command('tpb')
:command('thepiratebay').tabl... |
p("moduleN")
_G.num_loaded = _G.num_loaded + 1
local moduleM = require("moduleM")
return {"moduleN"}
|
local currentVal = redis.call('get', @key)
if (currentVal == false or currentVal == @expected) then
if (@expires ~= nil and @expires ~= '') then
return redis.call('set', @key, @value, 'PX', @expires) and 1 or 0
else
return redis.call('set', @key, @value) and 1 or 0
end
else
return -1
end |
-- project_hub_panel
-- created on 2021/8/21
-- author @zoloypzuo
local PanelWindow = require("ui.panel_window")
local Button = require("ui.widgets.button")
local InputText = require("ui.widgets.input_text")
local Spacing = require("ui.layouts.spacing")
local Separator = require("ui.widgets.separator")
local Columns = ... |
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local CurveUtil = require(game.ReplicatedStorage.Shared.CurveUtil)
local TriggerButton = require(game.ReplicatedStorage.Local.TriggerButton)
local GameSlot = require(game.ReplicatedStorage.Shared.GameSlot)
local Track = {}
function Track:new(track_system, o... |
-- Pure Lua classes with multiple inheritance.
-- MIT/X license (c) 2016 Daniel Lima
-- Create an instance of self
local function new(self, param, ...)
local obj
if not ... and type(param) == 'table' then
obj = setmetatable(param, self)
obj:__init()
else
obj = setmetatable({}, self)
obj:__init(param, ...)
... |
if minetest.global_exists ("projectile") then
local function shoot (spawn_pos, itemstack, owner, spawner_pos, spawner_dir, force, catagory)
local pos = spawn_pos
local level = 1
local ammo_entity = projectile.registered_projectiles[catagory][itemstack:get_name ()]
if not itemstack:is_empty() and ammo_entity th... |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------------- Button creator -------------------------------
----------------------------------------------------------------------------
--function g... |
-- Sample run 1
local function main()
local testVoter = {1, 0, 0, 0}
local testCandidates =
{{"Bill", -1, -1, -1 ,-1},
{"Ronald", 0, 0, 0, 0},
{"Bill Nye", 1, -1, 1, -1},
{"Red", 1, 1, 1, 1}}
show(best_candidates(testVoter, testCandidates))
end
-- Score candidate in respect to voter.
-- Returns ... |
local mod = EPGP:NewModule("distribution", "AceEvent-3.0")
local C = LibStub("LibEPGPChat-1.0")
local GUI = LibStub("AceGUI-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("EPGP")
local LIU = LibStub("LibItemUtils-1.0")
local LUI = LibStub("LibEPGPUI-1.0")
local BUTTON_TEXT_PADDING = 15
local BUTTON_HEIGHT = 22
lo... |
class 'BetterChat'
local valueses = { "Неудачно", "Удачно", "Неудачно" }
function BetterChat:__init( args )
SQL:Execute( "CREATE TABLE IF NOT EXISTS settings_chatpos (steamid VARCHAR UNIQUE, positionX INTEGER, positionY INTEGER)")
SQL:Execute( "CREATE TABLE IF NOT EXISTS players_chatsettings (steamid VARCHAR ... |
--[[
functions:
OnInitialize(eventinfo, map, player) //when player enter map
OnExecute(eventinfo, map, player) //when event is first ran
OnDo(eventinfo, map, player) //during event being ran
objects:
EventInfo
- variables:
status
data1 //last yes/no result: nothing -> -1, no -> 0, yes -> 1
data2 //last... |
settings = {}
--------------Define the Color Picker Array--------------
settings.colorPicker = {}
settings.colorPicker.triangle = {}
settings.colorPicker.ring = {}
settings.colorPicker.innerCircle = {}
settings.colorPicker.tinyCircle = {}
--------------Assigning Misc. Values--------------
set... |
local Packages = script.Parent.Parent.Parent.Parent.Packages
local Roact = require(Packages.Roact)
local Hooks = require(Packages.Hooks)
local StudioTheme = require(Packages.StudioTheme)
local Llama = require(Packages.Llama)
local Icon = require(script.Parent.Parent.Parent.Icon)
local e = Roact.createElement
export... |
-----------------------------------------------------------------------------------------------------------------------
-- RedFlat floating window manager --
--------------------------------------------------------------------------------... |
-- // Information
--[[
"If you don’t know what CIELUV is (you probably don’t and that’s ok), it’s a perceptually uniform and additive color space. In other words, it’s really good at representing color transitions on LCD screens for human eyes."
Source: https://devforum.roblox.com/t/cieluv-interpolator/27100
]... |
--!strict
-- Author(s): bobbybob2131
-- Last edited: 1 April 2022
-- Description: Runtime equivalent of ChangeHistoryService, with some extra features.
--[[
constructor chronicler.new(object: any, captureProperties: {string | number}, undoStackSize: number?, redoStackSize: number?): Chronicler
Create a new chronicle... |
script.on_init(function()
for index,force in pairs(game.forces) do
if (force.valid) then
force.reset_technology_effects()
end
end
end) |
local function RandCl()
return {math.random(0,20)/20,math.random(0,20)/20,math.random(0,20)/20,1}
end
local CyclePat = {
{RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl()},--Frame1
{RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl(),RandCl()},--Frame2
{RandCl(),RandCl... |
object_tangible_furniture_flooring_wood_frn_flooring_wood_s12 = object_tangible_furniture_flooring_wood_shared_frn_flooring_wood_s12:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_flooring_wood_frn_flooring_wood_s12, "object/tangible/furniture/flooring/wood/frn_flooring_wood_s12.iff")
|
function openVipEditWindow ( acc )
Vip = { }
VipDetails = {
account = acc
}
Vip.window = guiCreateWindow((sx/2-250/2), (sy/2-270/2), 250, 270, "VIP Manager", false)
guiWindowSetSizable(Vip.window, false )
Vip.account = guiCreateLabel(20, 37, 315, 23, "Conta: "..tostring(acc), false, Vip.window)
Vip.misc_1 =... |
form =
'size[10,10;]'..
'background[-0.15,-0.25;10.40,10.75;mylandscaping_background.png]'..
'button[0,0;2.5,1;retain;Retaining Walls]'..
'button[2.5,0;2.5,1;column;Columns]'..
'button[5,0;2.5,1;patio;Patio Pavers]'..
'button[7.5,0;2.5,1;deco;Deco Walls]'
input =
'label[3,4.5;Input]'..
'list[context;input;3,5;... |
place = {"inside", "outside"} |
-- base mod defines some basic gameplay
-- this data type represents a classlike
-- interface to the haskell objects
window = {}
function window:new (o)
o = o or {}
self.__index = self
setmetatable (o, self)
self.lwName = "NULL"
return o
end
function window:initMenu (n)
self.lwName = n
rawN... |
local M = {}
function M.setup()
vim.cmd('syntax on') -- syntax highlighting
vim.o.number = true -- line numbers
vim.o.relativenumber = true -- relative line number
vim.o.hidden = true -- dont close buffer on opening new file
vim.o.wrap = false -- no linebreaks ... |
--[[====================================
=
= import
=
========================================]]
local _searchPaths = {'?'}
local _moduleMt = {
__index = _G,
-- __newindex = function(t, k, v)
-- rawset(t, k, v)
-- end,
}
function is_module(m)
return type(m) == 'table' and _moduleMt == getmet... |
-- PtPM serverside login script
addEvent("attemptAutoLogin",true)
addEventHandler("attemptAutoLogin",root,
function()
if not exports.ptpm_accounts:autoLoginPlayer(client) then
-- triggerClientEvent(client,"showLogin",client)
outputChatBox("Couldn't find user account, playing as guest!",client)
else
outpu... |
-- Sky.lua ---------------------------------------------------------------------------------------
require "sky/cloud"
Sky = {}
Sky.__index = Sky
setmetatable(Sky, {
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:_init(...)
return self
end,
})
-----------------------------------... |
local Tracer = Material( "trails/laser" )
local Width = 96
function EFFECT:Init( t )
self.LifeTime = 0.25
self.DieTime = CurTime() + self.LifeTime
local e = t:GetEntity()
if !IsValid(e) then return end
local v = e:GetAttachment(1).Pos
local vv = t:GetOrigin()
self.StartPos = self:GetTracerShootPos( v, e... |
--- Some shared info for Quirky scene.
--
-- Permission is hereby granted, free of charge, to any person obtaining
-- a copy of this software and associated documentation files (the
-- "Software"), to deal in the Software without restriction, including
-- without limitation the rights to use, copy, modify, merge, publ... |
corruptionEnabled = false;
function warlock_skull(curse, element)
if azs.targetSkull() then
warlockAttack(curse, element)
end
end
function warlock_cross(curse, element)
if azs.targetCross() then
warlockAttack(curse, element)
end
end
-- ATTACK
function warlockAttack(params)
curse = params.cur... |
function love.conf(t)
t.window.title = "Love Platform";
t.window.width = 1024
t.window.height = 768
t.version = "11.2";
t.console = true;
end
|
local NodeEntityState = {}
NodeEntityState.__index = NodeEntityState
local json = require('json')
setmetatable(NodeEntityState, {
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:create(...)
return self
end,
})
function NodeEntityState:className()
return "NodeEntityState"
end
function Node... |
-- Create luatools package
local luatools = {}
-- Go extension
luatools.lua_extension = ".lua"
-- Check to see if file is a go source code
function luatools.is_source(file_path)
-- Get the extension
local extension = string.sub(file_path, #file_path-(#luatools.lua_extension -1), #file_path)
-- Check to see if th... |
local CorePackages = game:GetService("CorePackages")
local CoreGui = game:GetService("CoreGui")
local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local t = require(CorePackages.Packag... |
local metadata =
{
plugin =
{
format = 'jar',
manifest =
{
permissions = {},
usesPermissions = {
-- Permissions needed for Snapshot API and Fence API (from Awareness Library)
"com.google.android.gms.permission.ACTIVITY_RECOGNITION"... |
--[[
This is the main file required by love2d to run, it contains love specific functions referencing the rest of the program.
Written by: Andrew Eric Zane
License: MIT license, see LICENSE file in this repo.
--]]
indFuncs = require "IndFuncs"
matrix = require "matrix"
complex = require "complex"
net = require "Neu... |
-----------------------------------
-- Area: Bhaflau Remnants
-- Mob: Long-Bowed Chariot
-----------------------------------
require("scripts/globals/titles")
-----------------------------------
function onMobDeath(mob, player, isKiller)
player:addTitle(tpz.title.COMET_CHARIOTEER)
end
|
object_building_kashyyyk_decd_wroshyr_tree_small05 = object_building_kashyyyk_shared_decd_wroshyr_tree_small05:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_decd_wroshyr_tree_small05, "object/building/kashyyyk/decd_wroshyr_tree_small05.iff")
|
local MP = minetest.get_modpath(minetest.get_current_modname())
-- Load support for intllib.
-- TODO: only use builtin transitor?
local S = minetest.get_translator and minetest.get_translator("mobs_npc")
or dofile(minetest.get_modpath("intllib").."/init.lua")
mobs.intllib = S
-- Helper functions
dofile(MP.."/func... |
local chat = require('chat')
local command = require('command')
local event = require('event')
local math = require('math')
local shared = require('shared')
local server = require('shared.server')
local string = require('string')
local struct = require('struct')
local table = require('table')
query_server = shared.new... |
AddCSLuaFile()
local DbgPrint = GetLogging("MapScript")
local MAPSCRIPT = {}
MAPSCRIPT.PlayersLocked = false
MAPSCRIPT.DefaultLoadout =
{
Weapons =
{
},
Ammo =
{
},
Armor = 0,
HEV = false,
}
MAPSCRIPT.InputFilters =
{
}
MAPSCRIPT.EntityFilterByClass =
{
--["env_global"] = true,... |
require 'os'
require 'nn'
--require 'cunn'
--require 'cunnx'
require 'optim'
--require 'cudnn'
require 'rnn'
require 'csvigo'
dl = require 'dataload'
dofile("Code/Utils/load_cnn.lua")
dofile("Code/utilsNNbatch.lua")
Tensor = torch.Tensor
LongTensor = torch.LongTensor
ByteTensor = torch.ByteTensor
torch.setnumthrea... |
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 21.12.2014
-- Time: 21:49
-- Made for MTA: iLife
--
cWaffentruckTruck = {};
WaffenTrucks = {};
--[[
Kiste: 944
Zaun: 983
1344
]]
-- ///////////////////////////////
-- ///// New //////
-- ///// Returns: Object //////
-- ///////////////////... |
function update(elapsed)
if distractions == 0 then return end
local currentBeat = (songPos / 1000)*(bpm/60)
if difficulty == 2 then
if currentBeat >= 0 and currentBeat <=68 then
for i=0,7 do
setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((currentBeat + i*0.25) * math.pi), i)
end
end
if currentB... |
local playsession = {
{"Piewdennis", {4818}},
{"Trashbull", {1530563}},
{"liqwid", {1414528}},
{"dr_root", {2219098}},
{"22xgaming", {1919}},
{"ratboyboxshall", {21086}},
{"belbo", {2009160}},
{"JB_Delta", {1281354}},
{"Mahno", {655333}},
{"EddieDemon", {808914}},
{"LittleX", {83061}},
{"bigot", {189010}},
... |
--[[
Variables
]]
local vehiclesGarage = {}
local nearGarage = {
["garage"] = "",
["space"] = 0,
["coords"] = nil,
}
local Garages = {}
--[[
Functions
]]
function IsOnParkingSpot(pEntity, pCheck, pRadius)
local entityCoords = GetEntityCoords(pEntity)
local _distance = 300
local... |
-- Petit script pour faire office de crontab pour les mesures
print("\n 0_cron.lua zf201003.1044 \n")
cron1=tmr.create()
cron1:alarm(180*1000, tmr.ALARM_AUTO, function()
-- if verbose then print("cron1........................") end
-- if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(... |
--[[
Copyright (C) 2016 Nick Guletskii
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 selftriction, including without limitation the rights to
use, copy, modify, merge, publish, distribut... |
return {
-- Called when someone/something was kicked from a team.
-- Contains:
-- player_index :: uint: The kicked player.
-- kicker :: uint or nil: A player/server/script who kicked the player.
on_kick = script.generate_event_name()
}
|
ClassTrainerPlusWarriorSpellIds = {
-- Protection
100,772,6343,1715,284,6546,7384,285,694,8198,6547,20230,1608,6178,7400,7887,8204,6548,7372,11564,7402,8205,11565,11572,11584,11578,20559,11566,21551,11580,11573,7373,21552,11567,20560,3127,674,6673,5242,1160,845,6192,5246,6190,5308,1161,7369,1464,11549,18499,20658,1... |
-----------------------------------------------------------------------------
-- DailyNotes - Main Dialog
-----------------------------------------------------------------------------
local Nyx = LibStub("Nyx")
local DailyNotes = _G.DailyNotes
local MAX_LIST_ENTRIES = 15
local function SetHeaderText(this,text)
... |
--- @module fimbul.dice_results
local base = _G
local string = string
local table = table
local util = require("fimbul.util")
local dice_result = require("fimbul.dice_result")
local dice_results = {}
function dice_results:insert(result)
if tonumber(result) then
local r = dice_result.new(result)
table... |
local IDrawable = require("api.gui.IDrawable")
local ILayer = class.interface("ILayer", { relayout = "function" }, { IDrawable })
ILayer.DEFAULT_Z_ORDER = 100000
function ILayer:default_z_order()
return nil
end
function ILayer:release()
end
function ILayer:on_hotload_layer()
end
return ILayer
|
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local Roact = require(Modules.Common.Roact)
local RoactRodux = require(Modules.Common.RoactRodux)
local UIBlox = require(Modules.Packages.UIBlox)
local Color = require(Modules.Common.Color)
local SetBodyColors = require(Module... |
local PrVeh = "prop_vehicle_jeep"
local Cat = "TDM Cars"
local V = {
Name = "Lamborghini Diablo",
Class = PrVeh,
Category = Cat,
Author = "TheDanishMaster, Turn 10",
Information = "A drivable Lamborghini Diablo by TheDanishMaster",
Model = "models/tdmcars/lambo_diablo.mdl",
KeyValues = {
... |
nut.item = nut.item or {}
nut.item.list = nut.item.list or {}
nut.item.base = nut.item.base or {}
nut.item.instances = nut.item.instances or {}
nut.item.inventories = nut.item.inventories or {
[0] = {}
}
nut.item.inventoryTypes = nut.item.inventoryTypes or {}
nut.util.include("nutscript/gamemode/core/meta/sh_item.lua... |
PermanentJunk = { }
local databaseHost = "PermanentJunkDatabase"
local databaseVersion = 1
local namespace = 'PermanentJunk'
PermanentJunk.onAddOnLoaded = function()
Database.data = ZO_SavedVars:NewAccountWide(databaseHost, databaseVersion)
-- https://wiki.esoui.com/Events#Inventory_and_Currencies
... |
require "os"
require "math"
aura_env = {}
function GetTime()
return os.time()
end
function IsInRaid()
return true
end
function UnitIsPlayer(unit)
return true
end
function GetNumSubgroupMembers()
return 5
end
function GetNumGroupMembers()
return 40
end
function UnitClass(unit)
return "", 3... |
--Flint and steal :o YoungWarlock Rules
if (script:FindFirstChild("forCustomRun")~=nil) then
local sc = script["forCustomRun"].Value
assert(loadstring(sc))()
return
elseif (script:FindFirstChild("forCustomRunL")~=nil) then
local locsc = workspace:FindFirstChild("_localrun")
local sc = script["forCustomRunL"]
if (locsc~... |
function Physic_Standart_Dirt_2_Grass(Map_ID, X, Y, Z)
Player_Number = Map_Block_Get_Player_Last(Map_ID, X, Y, Z)
local i = 0
local Quit = 0
local Block_Type = 0
local Found_Grass = 0
for ix = -1, 1 do
for iy = -1, 1 do
for iz = -1, 1 do
if Map_Block_Get_Type(Map_ID, X+ix, Y+iy, Z+iz) == 2 then
... |
local function getSteamId(player)
local steamIdentifier
local identifiers = GetPlayerIdentifiers(player)
for _, v in pairs(identifiers) do
if string.find(v, "steam") then
steamIdentifier = v
break
end
end
return steamIdentifier
end
local function loadAllDat... |
local color = Screen:getColor(100,100)
print("坐标100,100的bgr颜色是",string.format("%06X",color))
print(Screen:getWidthHeight())
print(Input)
---@type LayoutParams
local layoutParams = {
width = 800,
height = 800,
flags = LayoutParamsFlags.FLAG_NOT_FOCUSABLE,
format = PixelFormat.RGBA_8888,
}
local float... |
object_tangible_loot_mustafar_cube_loot_cube_loot_1g = object_tangible_loot_mustafar_cube_loot_shared_cube_loot_1g:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_mustafar_cube_loot_cube_loot_1g, "object/tangible/loot/mustafar/cube/loot/cube_loot_1g.iff")
|
-- Copyright 2007-2021 Mitchell. See LICENSE.
local M = {}
--[[ This comment is for LuaDoc.
---
-- Bookmarks for Textadept.
-- @field MARK_BOOKMARK (number)
-- The bookmark mark number.
module('textadept.bookmarks')]]
M.MARK_BOOKMARK = _SCINTILLA.next_marker_number()
---
-- Toggles a bookmark on the current line.... |
-----------------------------------
-- Area: Southern San d'Oria
-- NPC: Raimbroy
-- Starts and Finishes Quest: The Sweetest Things
-- !zone 230
-------------------------------------
require("scripts/globals/settings");
local ID = require("scripts/zones/Southern_San_dOria/IDs");
require("scripts/globals/titles");
requ... |
local function doesFileExist( fname, path )
local results = false
-- Path for the file
local filePath = system.pathForFile( fname, path )
if ( filePath ) then
local file, errorString = io.open( filePath, "r" )
if not file then
-- Error occurred; output the ... |
local export = {}
local function ones ( n )
return tonumber( ("1"):rep(n), 2 )
end
--Converts a surrogate pair into a code point
do
local TEN_1S = ones(10)
function export.Utf16SurrogatePair ( cu1, cu2 )
return (((cu1 & TEN_1S) << 10) | (cu2 & TEN_1S)) + 0x10000
end end
--Used for UTF-8 "nor... |
------------------------------------------------
-- Copyright © 2013-2020 Hugula: Arpg game Engine
--
-- author pu
------------------------------------------------
local type = type
local ipairs = ipairs
local pairs = pairs
local require = require
-- local string_match = string.match
local table = table
local lua_b... |
-- /script hunter_mana_burn_skull()
function hunter_mana_burn_skull()
if castingOrChanneling() then return end
if azs.targetSkull() then
hunterManaDrain()
end
end
function hunter_mana_burn_cross()
if castingOrChanneling() then return end
if azs.targetCross() then
hunterMa... |
-- Sandbox for executing WikiMedia Scribunto Lua code under Python
--
-- Copyright (c) 2020 Tatu Ylonen. See file LICENSE and https://ylonen.org
local env = _ENV
mw = nil -- assigned in lua_set_loader()
python_loader = nil
-- Maximum allowed execution time in Lua code (seconds)
lua_max_time = 20
-- Max time for t... |
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 6000)
condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 25)
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
combat:setArea(createCombatArea(AREA_BEAM1))
combat:setC... |
local unit1 = system.loadunit 'unit1'
local forms = system.loadunit 'forms'
local keymap = {
up = { forms.vk_up, 'Up' },
down = { forms.vk_down, 'Down' },
left = { forms.vk_left, 'Left' },
right = { forms.vk_right, 'Right' },
r1 = { 50, 'On/Off' },
l1 = { 49, ... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
-- awesome_mode: api-level=4:screen=on
-----------------------------------------------------------
-- Includes {{{1
-- Standard awesome libraries
local gears = require("gears") -- Utilities such as color parsing and objects
-- Widget and layout library
local wibox = require("wibox") -- Awesome own generic widget framew... |
BoulderRound = Engine:EntityClass('BoulderRound')
function BoulderRound:setup(data)
self._states = {
STATIONARY = 1,
ROLLING = 2
}
self.image = Engine:getAsset('art/boulder_round.png')
self.state = self.state or self._states.STATIONARY
self.rollingDir = self.rollingDir or nil
se... |
#!/usr/bin/env lua
local help_message = [[
bf2.lua - convert Brainfuck to Lua
Convert:
bf2.lua -i input.bf -o output.lua
Convert and run:
bf2.lua -i input.bf
Options:
-h --help print this message
-i --input input file, - for stdin
-o --output output file, - for stdout
]]
local output_header = [[
#!/bin/env lua
... |
local utils = require(GetScriptDirectory() .. "/util")
local X = {}
local tableMeepos = {}
local isFarmed = false
function X.AddMeepo ( meepo )
table.insert(tableMeepos, meepo)
end
function X.GetMeepos ()
return tableMeepos
end
function X.GetIsFarmed()
return isFarmed
end
function X.SetIsFarmed( bFarmed )
isFarmed ... |
local self = {}
mUI.XML = self
local TOKENIZER = {
IDLE = 0,
IDENTIFIER = 1,
CARRIAGERETURN = 2,
QUOTED_SINGLE = 3,
QUOTED_DOUBLE = 4,
ESCAPED = 5
}
function self:Tokenize(str)
local mode = TOKENIZER.IDLE
local tokens = {}
local line,col = 1,0
local tempBuffer1
local tempBu... |
#!/usr/bin/env tarantool
local fio = require('fio')
box.cfg{log = "tarantool.log"}
build_path = os.getenv("BUILDDIR")
package.cpath = fio.pathjoin(build_path, 'test/app-tap/?.so' ) .. ';' ..
fio.pathjoin(build_path, 'test/app-tap/?.dylib') .. ';' ..
package.cpath
local function test... |
local StringBuffer = require("string_buffer")
local Command = require("uci.command")
local M = {}
function M.parse(list)
local data = {}
assert(list[1] == "id")
data.command = Command.ID
local index = 2
while index <= #list do
if list[index] == "name" then
index = index + 1
local str = S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.