repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
thedraked/darkstar
scripts/zones/Temenos/mobs/Light_Elemental.lua
28
1715
----------------------------------- -- Area: Temenos E T -- NPC: Light_Elemental ----------------------------------- package.loaded["scripts/zones/Temenos/TextIDs"] = nil; ----------------------------------- require("scripts/globals/limbus"); require("scripts/zones/Temenos/TextIDs"); -----------------------------...
gpl-3.0
Xkeeper0/emu-lua
gameboy-vba/x_functions.lua
2
6777
x_func_version = 7; --[[ Minor version history: v5 ----------- - Added Bisqwit's 'clone table' function. v6 ----------- - added pairs by keys - added hitbox functions v7 ----------- - added memory.readword, memory.readwordsigned, etc v8 ----------- - VBA-rr broke something fantastically, adding workaro...
mit
thedraked/darkstar
scripts/zones/Port_Windurst/npcs/Three_of_Clubs.lua
14
1465
----------------------------------- -- Area: Port Windurst -- NPC: Three of Clubs -- Type: Standard NPC -- @pos -7.238 -5 106.982 240 ----------------------------------- package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil; ----------------------------------- require("scripts/globals/quests"); require("scri...
gpl-3.0
OpenNMT/OpenNMT
onmt/Seq2Seq.lua
6
6775
--[[ Sequence to sequence model with attention. ]] local Seq2Seq, parent = torch.class('Seq2Seq', 'Model') local options = { { '-enc_layers', 0, [[If > 0, number of layers of the encoder. This overrides the global `-layers` option.]], { valid = onmt.utils.ExtendedCmdLine.isUInt(), structural ...
mit
mtroyka/Zero-K
units/corllt.lua
2
5285
unitDef = { unitname = [[corllt]], name = [[Lotus]], description = [[Light Laser Tower]], acceleration = 0, brakeRate = 0, buildCostEnergy = 90, buildCostMetal = 90, builder ...
gpl-2.0
mtroyka/Zero-K
units/factorygunship.lua
2
3264
unitDef = { unitname = [[factorygunship]], name = [[Gunship Plant]], description = [[Produces Gunships, Builds at 10 m/s]], acceleration = 0, brakeRate = 0, buildCostEnergy = 600, buildCostMe...
gpl-2.0
kumpuu/factorio-helicopters
stdlib/utils/vendor/serpent.lua
2
8684
-- luacheck: ignore local n, v = "serpent", "0.30" -- (C) 2012-17 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = ...
mit
stuta/Luajit-Tcp-Server
win_kernel32.lua
1
6957
local ffi = require "ffi" local C = ffi.C require "WinBase" local kernel32 = ffi.load("kernel32"); -- File System Calls -- ffi.cdef[[ DWORD GetCurrentDirectoryA(DWORD nBufferLength, LPTSTR lpBuffer); HANDLE CreateFileA(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityA...
bsd-3-clause
thedraked/darkstar
scripts/zones/Riverne-Site_B01/npcs/_0t3.lua
17
1368
----------------------------------- -- Area: Riverne Site #B01 -- NPC: Unstable Displacement ----------------------------------- package.loaded["scripts/zones/Riverne-Site_B01/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Riverne-Site_B01/TextIDs"); ...
gpl-3.0
thedraked/darkstar
scripts/zones/RuLude_Gardens/npcs/Magian_Moogle_Green.lua
14
2441
----------------------------------- -- Area: Ru'Lude Gardens -- NPC: Magian Moogle (Green Bobble) -- Type: Magian Trials NPC (Job Emotes) -- @pos -4.558 2.451 111.305 64 ----------------------------------- package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- require("sc...
gpl-3.0
ctfuckme/ctr
plugins/anti-flood.lua
1
3156
-- data saved to moderation.json do -- make sure to set with value that not higher than stats.lua local NUM_MSG_MAX = 3 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function is_anti_flood(msg) local data = load_data(_config.moderation.data) local anti_flood_stat = data[tostring(msg.t...
gpl-2.0
GitoriousLispBackup/praxis
prods/fugue/geometry.lua
5
1717
-- Name: geometry.lua Vector3D = {} local Vector3D_meta = {} function Vector3D.new(x,y,z) local vec = {x=x,y=y,z=z} setmetatable(vec, Vector3D_meta) return vec end function vec2d(x,z) return Vector3D.new(x, 0, z) end function vec3d(x,y,z) return Vector3D.new(x, y, z) end function rvec3d(radius,angle) ...
mit
GitoriousLispBackup/praxis
prods/Empty/geometry.lua
5
1717
-- Name: geometry.lua Vector3D = {} local Vector3D_meta = {} function Vector3D.new(x,y,z) local vec = {x=x,y=y,z=z} setmetatable(vec, Vector3D_meta) return vec end function vec2d(x,z) return Vector3D.new(x, 0, z) end function vec3d(x,y,z) return Vector3D.new(x, y, z) end function rvec3d(radius,angle) ...
mit
ukoloff/rufus-lua-win
vendor/lua/lib/lua/pl/List.lua
12
16426
--- Python-style list class. -- -- **Please Note**: methods that change the list will return the list. -- This is to allow for method chaining, but please note that `ls = ls:sort()` -- does not mean that a new copy of the list is made. In-place (mutable) methods -- are marked as returning 'the list' in this documentati...
mit
mtroyka/Zero-K
units/core_spectre.lua
3
4511
unitDef = { unitname = [[core_spectre]], name = [[Aspis]], description = [[Area Shield Walker]], acceleration = 0.25, activateWhenBuilt = true, brakeRate = 0.75, buildCostEnergy = 600, buildCostMetal = 600, buildPic ...
gpl-2.0
mtroyka/Zero-K
LuaRules/Gadgets/unit_bomber_command.lua
4
26807
------------------------------------------------------------------------------ -- HOW IT WORKS: -- After firing, set ammo to 0 and look for a pad -- Find first combat order and queue rearm order before it -- If bomber idle and out of ammo (UnitIdle), give it rearm order -- When bomber is in range of airpad (GameFrame...
gpl-2.0
thedraked/darkstar
scripts/globals/items/dil.lua
18
1304
----------------------------------------- -- ID: 5457 -- Item: Dil -- Food Effect: 5Min, Mithra only ----------------------------------------- -- Dexterity 4 -- Mind -6 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck --------------...
gpl-3.0
X-Coder/wire
lua/entities/gmod_wire_expression2/core/cl_files.lua
6
4554
--[[ File Extension By: Dan (McLovin) ]]-- local cv_max_transfer_size = CreateConVar( "wire_expression2_file_max_size", "100", { FCVAR_REPLICATED, FCVAR_ARCHIVE } ) //in kb local upload_buffer = {} local download_buffer = {} local upload_chunk_size = 20000 //Our overhead is pretty small so lets send it in moderate...
gpl-3.0
thedraked/darkstar
scripts/globals/abilities/pets/attachments/drum_magazine.lua
28
1126
----------------------------------- -- Attachment: Drum Magazine ----------------------------------- require("scripts/globals/status"); ----------------------------------- -- onUseAbility ----------------------------------- function onEquip(pet) pet:addMod(MOD_SNAP_SHOT, 2) pet:addMod(MOD_ACC, -2) end funct...
gpl-3.0
mika6020/pgotpro
libs/lua-redis.lua
580
35599
local redis = { _VERSION = 'redis-lua 2.0.4', _DESCRIPTION = 'A Lua client library for the redis key value storage system.', _COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri', } -- The following line is used for backwards compatibility in order to keep the `Redis` -- global module name. Using...
agpl-3.0
hleuwer/luayats
examples/test-13.lua
1
1631
require "yats" require "yats.stdlib" require "yats.statist" local lev = 0.9 local N = 10000 -- Init the random generator yats.sim:setRand(1) -- Create confidence object cid = yats.confid{"conf", level = lev} -- Add a couple of values for i=1,N do cid:add(yats.random(100000)) end -- Show a couple of values for k,v...
gpl-2.0
Source-Saraya/S.R.A
plugins/lock-edit.lua
1
2274
 do function promote(receiver, member_username, user_id) local data = load_data(_config.moderation.data) local group = string.gsub(receiver, 'channel#id', '') local member_tag_username = string.gsub(member_username, '@', '(at)') if not data[group] then return end if data[group]['moderators']...
gpl-3.0
hleuwer/luayats
yats/core.lua
1
39268
----------------------------------------------------------------------------------- -- @copyright GNU Public License. -- @author Herbert Leuwer, Backnang. -- @release 3.0 $Id: core.lua 420 2010-01-06 21:39:36Z leuwer $ -- @description Luayats - Yats programming in Lua. -- <br> -- <br><b>module: yats</b><br> -- <br> -- ...
gpl-2.0
tianxiawuzhei/cocos-quick-lua
quick/samples/tests/src/tests/framework/networkTest.lua
8
4409
local NetworkTestScene = game.createSceneClass("NetworkTestScene") function NetworkTestScene:ctor() self.requestCount = 0 self:prepare({ description = "Please check console output" }) local items = { "createHTTPRequest", "createHTTPRequestBadDomain", "send data to ser...
mit
tianxiawuzhei/cocos-quick-lua
quick/samples/coinflip/src/app/scenes/PlayLevelScene.lua
8
1890
local Levels = import("..data.Levels") local Board = import("..views.Board") local AdBar = import("..views.AdBar") local PlayLevelScene = class("PlayLevelScene", function() return display.newScene("PlayLevelScene") end) function PlayLevelScene:ctor(levelIndex) local bg = display.newSprite("#PlayLevelSceneBg....
mit
ZakariaRasoli/Venus
plugins/groupmanager.lua
1
174810
local function modadd(msg) local hash = "gp_lang:"..msg.to.id local lang = redis:get(hash) -- superuser and admins only (because sudo are always has privilege) if not is_admin(msg) then if not lang then return '☡ _You are not bot admin_' else return '⚠ شما مدیر ربات نمیباشید' end end loc...
gpl-3.0
ChristopherBiscardi/kong
spec/plugins/ratelimiting/daos_spec.lua
12
3625
local spec_helper = require "spec.spec_helpers" local timestamp = require "kong.tools.timestamp" local uuid = require "uuid" local env = spec_helper.get_env() local dao_factory = env.dao_factory local ratelimiting_metrics = dao_factory.ratelimiting_metrics describe("Rate Limiting Metrics", function() local api_id =...
mit
collinmsn/thrift
lib/lua/TMemoryBuffer.lua
100
2266
-- -- 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 ma...
apache-2.0
dmekersa/Gamecodeur
Atelier Donjon Procédural/AtelierDonjon-Lua-Step4/main.lua
1
4384
local donjon = {} donjon.nombreDeColonnes = 9 donjon.nombreDeLignes = 6 donjon.salleDepart = nil donjon.map = {} function CreeSalle(pLigne,pColonne) local newSalle = {} newSalle.ligne = pLigne newSalle.colonne = pColonne newSalle.estOuverte = false newSalle.porteHaut = false newSalle.porteDroite =...
cc0-1.0
cshore/luci
applications/luci-app-adblock/luasrc/model/cbi/adblock.lua
4
2131
-- Copyright 2016 Hannu Nyman -- Licensed to the public under the Apache License 2.0. m = Map("adblock", translate("Adblock"), translate("Configuration of the adblock package to block ad/abuse domains by using DNS.")) -- General options s = m:section(NamedSection, "global", "adblock", translate("Global options")) ...
apache-2.0
s0ph05/awesome
vicious/widgets/weather.lua
4
3807
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> --------------------------------------------------- -- {{{ Grab environment local tonumber = tonumber local io = { popen = io.popen } local setmetatable = setmetatable ...
mit
rasata/cardpeek
dot_cardpeek_dir/scripts/lib/compatibility-with-0.7.lua
17
1952
local DEPRECATED_FUNCS = {} function DEPRECATED_FOR(fname) local func = debug.getinfo(2, "n") local orig = debug.getinfo(3, "lS") if DEPRECATED_FUNCS[func.name]==nil then log.print(log.WARNING,orig.short_src .. "[" .. orig.currentline .. "]: " .. func.name .. "() is deprecated, please use " .. fn...
gpl-3.0
Meticulous95/factorio-calc
calc.lua
2
1880
function get_recipe(name, options) local rdata = data.raw.recipe[name] local recipe = {} if not rdata then return rdata end recipe.name = rdata.name recipe.time = rdata.energy_required or 0.5 if rdata.category == 'smelting' then console(options.smeltlvl) recipe.time = recipe.time / tonumber(options.smelt...
mit
mqmaker/witi-openwrt
package/ramips/ui/luci-mtk/src/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-res.lua
80
3097
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 h...
gpl-2.0
darkjavi/Jarvis
Varios/ScriptsLua/telnet.lua
3
1070
print("====Wicon, a LUA console over wifi.==========") print("Author: openthings@163.com. copyright&GPL V2.") print("Last modified 2014-11-19. V0.2") print("Wicon Server starting ......") function startServer() print("Wifi AP connected. Wicon IP:") print(wifi.sta.getip()) sv=net.createServer(net.TCP, 180) ...
gpl-2.0
vladimir-kotikov/clink
installer/premake4.lua
2
8446
-- -- Copyright (c) 2012 Martin Ridgers -- -- 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...
gpl-3.0
Weol/WUMA
lua/wuma/client/vgui/vgui_periodpicker.lua
1
1919
local PANEL = {} function PANEL:Init() self.from_hour = vgui.Create("WTextbox", self) self.from_hour:SetDefault("hh") self.from_hour:SetNumeric(true) self.from_hour:SetMinMaxNumeric(0, 23) self.from_minute = vgui.Create("WTextbox", self) self.from_minute:SetDefault("mm") self.from_minute:SetNume...
apache-2.0
stanfordhpccenter/soleil-x
testcases/legacy/taylor_with_smaller_particles/taylor_green_vortex_2048_2048_1024.lua
1
4170
-- This is a Lua config file for the Soleil code. return { xnum = 2048, -- number of cells in the x-direction ynum = 2048, -- number of cells in the y-direction znum = 1024, -- number of cells in the z-direction -- if you increase the cell number and the calculation diverges -- right away, decrease the tim...
gpl-2.0
dicebox/minetest-france
mods/moreblocks/ownership.lua
2
1281
--[[ More Blocks: ownership handling Copyright (c) 2011-2015 Calinou and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] local S = moreblocks.gettext function moreblocks.node_is_owned(pos, placer) local ownername = false if type(IsPlayerNodeOwner) == "function" then -- ...
gpl-3.0
wrxck/mattata
plugins/ispwned.lua
2
1338
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local ispwned = {} local mattata = require('mattata') local https = require('ssl.https') local url = require('socket.url') local json = require('dkjson') function ispwned:init() ...
mit
bigdogmat/wire
lua/wire/stools/gates.lua
1
9288
-- Made by Divran 06/01/2012 WireToolSetup.setCategory( "Chips, Gates" ) WireToolSetup.open( "gates", "Gates", "gmod_wire_gate", nil, "Gates" ) WireToolSetup.SetupMax(100) if SERVER then ModelPlug_Register("gate") end if CLIENT then ----------------------------------------------------------------------------------...
apache-2.0
Metastruct/luapack
lua/luapack/sv_core.lua
1
6504
AddCSLuaFile("sh_core.lua") AddCSLuaFile("cl_core.lua") AddCSLuaFile("cl_file.lua") AddCSLuaFile("cl_directory.lua") AddCSLuaFile("cl_overrides.lua") AddCSLuaFile("cl_entities.lua") if not file.IsDir("luapack", "DATA") then file.CreateDir("luapack") end include("sh_core.lua") luapack.Bypass = luapack.Bypass or fals...
bsd-3-clause
pkulchenko/ZeroBraneEduPack
complex-samples/intersect.lua
1
5166
require("wx") require("turtle") local crt = require("chartmap") local cmp = require("complex") local col = require("colormap") local com = require("common") io.stdout:setvbuf("no") local logStatus = com.logStatus local W, H = 400, 400 local dX, dY = 1,1 local xySize = 3 local greyLevel = 200 local minX, maxX = -20...
mit
MonkeyFirst/DisabledBoneSlerpWithShadowedAnimation
bin/Data/LuaScripts/Utilities/Touch.lua
32
2209
-- Mobile framework for Android/iOS -- Gamepad from Ninja Snow War -- Touches patterns: -- - 1 finger touch = pick object through raycast -- - 1 or 2 fingers drag = rotate camera -- - 2 fingers sliding in opposite direction (up/down) = zoom in/out -- Setup: Call the update function 'UpdateTouches()' from...
mit
dmekersa/Gamecodeur
Atelier Redemption of Sam/Step4/donjon.lua
10
4440
local donjon = {} donjon.nombreDeColonnes = 9 donjon.nombreDeLignes = 6 donjon.salleDepart = nil donjon.map = {} local function CreeSalle(pLigne,pColonne) local newSalle = {} newSalle.ligne = pLigne newSalle.colonne = pColonne newSalle.estOuverte = false newSalle.porteHaut = false newSalle.porteDr...
cc0-1.0
dmekersa/Gamecodeur
Atelier Redemption of Sam/Step3/donjon.lua
10
4440
local donjon = {} donjon.nombreDeColonnes = 9 donjon.nombreDeLignes = 6 donjon.salleDepart = nil donjon.map = {} local function CreeSalle(pLigne,pColonne) local newSalle = {} newSalle.ligne = pLigne newSalle.colonne = pColonne newSalle.estOuverte = false newSalle.porteHaut = false newSalle.porteDr...
cc0-1.0
dmekersa/Gamecodeur
Atelier Redemption of Sam/Step11/donjon.lua
10
4440
local donjon = {} donjon.nombreDeColonnes = 9 donjon.nombreDeLignes = 6 donjon.salleDepart = nil donjon.map = {} local function CreeSalle(pLigne,pColonne) local newSalle = {} newSalle.ligne = pLigne newSalle.colonne = pColonne newSalle.estOuverte = false newSalle.porteHaut = false newSalle.porteDr...
cc0-1.0
saeqe/botele
plugins/quotes.lua
651
1630
local quotes_file = './data/quotes.lua' local quotes_table function read_quotes_file() local f = io.open(quotes_file, "r+") if f == nil then print ('Created a new quotes file on '..quotes_file) serialize_to_file({}, quotes_file) else print ('Quotes loaded: '..quotes_file) f...
gpl-2.0
GPUOpen-LibrariesAndSDKs/ForwardPlus11
amd_sdk/premake/premake5_minimal.lua
8
1336
dofile ("../../premake/amd_premake_util.lua") workspace "AMD_SDK_Minimal" configurations { "Debug", "Release" } platforms { "x64" } location "../build" filename ("AMD_SDK_Minimal" .. _AMD_VS_SUFFIX) startproject "AMD_SDK_Minimal" filter "platforms:x64" system "Windows" architecture "x64"...
mit
dividuum/infon
level/pacman.lua
1
4675
-- Mapname: pacman -- code based on: castle -- Author: queaker, plaisthos -- Version: 0.1 function maplayout() tile = {} tile["@"] = TILE_GFX_SOLID; tile[" "] = TILE_GFX_PLAIN; tile["."] = TILE_GFX_PLAIN; tile["B"] = TILE_GFX_BORDER; tile["T"] = TILE_GFX_SNOW_SOLID; t...
gpl-2.0
jebtang/likwid
src/applications/likwid-memsweeper.lua
10
2687
#!<PREFIX>/bin/likwid-lua --[[ * ======================================================================================= * * Filename: likwid-memsweeper.lua * * Description: An application to clean up NUMA memory domains. * * Version: <VERSION> * Released: <DATE> * * Author: Th...
gpl-3.0
stanfordhpccenter/soleil-x
testcases/legacy/taylor_green_vortex/taylor_green_vortex_384_384_192.lua
1
4167
-- This is a Lua config file for the Soleil code. return { xnum = 384, -- number of cells in the x-direction ynum = 384, -- number of cells in the y-direction znum = 192, -- number of cells in the z-direction -- if you increase the cell number and the calculation diverges -- right away, decrease the time s...
gpl-2.0
dicebox/minetest-france
mods/sprint/init.lua
7
1090
--[[ Sprint mod for Minetest by GunshipPenguin To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. ]] --Configuration variables, these are all explained in ...
gpl-3.0
135yshr/Holocraft-server
world/Plugins/APIDump/Hooks/OnEntityAddEffect.lua
36
1593
return { HOOK_ENTITY_ADD_EFFECT = { CalledWhen = "An entity effect is about to get added to an entity.", DefaultFnName = "OnEntityAddEffect", -- also used as pagename Desc = [[ This hook is called whenever an entity effect is about to be added to an entity. The plugin may disallow the addition by returni...
mit
adamel/sysdig
userspace/sysdig/chisels/iobytes_file.lua
18
1602
--[[ Copyright (C) 2013-2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
gpl-2.0
ChristopherBiscardi/kong
spec/plugins/oauth2/schema_spec.lua
20
1863
local validate_entity = require("kong.dao.schemas_validation").validate_entity local oauth2_schema = require "kong.plugins.oauth2.schema" require "kong.tools.ngx_stub" describe("OAuth2 Entities Schemas", function() describe("OAuth2 Configuration", function() it("should not require a `scopes` when `mandatory_s...
mit
bigdogmat/wire
lua/wire/stools/indicator.lua
1
3933
WireToolSetup.setCategory( "Visuals/Indicators" ) WireToolSetup.open( "indicator", "Indicator", "gmod_wire_indicator", nil, "Indicators" ) if CLIENT then language.Add( "tool.wire_indicator.name", "Indicator Tool (Wire)" ) language.Add( "tool.wire_indicator.desc", "Spawns a indicator for use with the wire system." ) ...
apache-2.0
grimreaper/ValyriaTear
dat/maps/layna_village/layna_village_south_entrance_left_house_script.lua
1
4262
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_south_entrance_left_house_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "Mountain Village of Layna" map_image_filename = "img/menus/locations/mountain_village.png" map_su...
gpl-2.0
bigdogmat/wire
lua/entities/gmod_wire_cd_lock.lua
10
2953
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire CD Lock" ENT.WireDebugName = "CD Lock" if CLIENT then return end -- No more client //Time after losing one disk to search for another local NEW_DISK_WAIT_TIME = 2 local DISK_IN_SOCKET_CONSTRAINT_POWER = 5000 local DISK_IN_ATTACH_RANGE = 16 ...
apache-2.0
buf1024/redis-annotate
deps/lua/test/sort.lua
889
1494
-- two implementations of a sort function -- this is an example only. Lua has now a built-in function "sort" -- extracted from Programming Pearls, page 110 function qsort(x,l,u,f) if l<u then local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u x[l],x[m]=x[m],x[l] -- swap pivot to first posit...
bsd-3-clause
yuzhangjob/redis-3.0-annotated-unstable
deps/lua/test/sort.lua
889
1494
-- two implementations of a sort function -- this is an example only. Lua has now a built-in function "sort" -- extracted from Programming Pearls, page 110 function qsort(x,l,u,f) if l<u then local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u x[l],x[m]=x[m],x[l] -- swap pivot to first posit...
bsd-3-clause
jeremiahmarks/sl4a
lua/src/test/sort.lua
889
1494
-- two implementations of a sort function -- this is an example only. Lua has now a built-in function "sort" -- extracted from Programming Pearls, page 110 function qsort(x,l,u,f) if l<u then local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u x[l],x[m]=x[m],x[l] -- swap pivot to first posit...
apache-2.0
wallix/redemption
tools/c++-analyzer/lua-checker/checkers/log6.lua
1
3989
local utils = require'utils' local Log6, LogIds, NewLinePos do local peg = utils.peg local C = peg.C local P = peg.P local S = peg.S local V = peg.V local Ct = peg.Ct local Cp = peg.Cp() local After = peg.After local Until = peg.Until local ws0 = peg.ws0 local logid = P'Lo...
gpl-2.0
bigdogmat/wire
lua/wire/stools/light.lua
1
4207
WireToolSetup.setCategory( "Visuals/Lights" ) WireToolSetup.open( "light", "Light", "gmod_wire_light", nil, "Lights" ) if CLIENT then language.Add( "tool.wire_light.name", "Light Tool (Wire)" ) language.Add( "tool.wire_light.desc", "Spawns a Light for use with the wire system." ) language.Add( "WireLightTool_RopeLe...
apache-2.0
ZeroK-RTS/Zero-K-Infrastructure
Benchmarker/Benchmarks/Configs/ZKL_with_lights/LuaUI/Config/ZK_data.lua
12
4681
-- Widget Custom Data return { version = 9, ["Auto Group"] = { version = "3.031", groups = {}, }, ["Chili Docking"] = { Chat = { [1] = 1055, [2] = 0, [3] = 1475, [4] = 200, }, Minimap = { [1] = 0, [2] = 0, [3] = 565, [4] = 316.95123291016, }, ["Player List"]...
gpl-3.0
tianxiawuzhei/cocos-quick-lua
libs/quick/framework/crypto.lua
20
4963
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, publish, dis...
mit
ld-test/oil
lua/oil/arch/corba/common.lua
6
1511
local pairs = pairs local port = require "oil.port" local component = require "oil.component" local arch = require "oil.arch" local base = require "oil.arch.typed.common" local sysex = require "oil.corba.idl.sysex" --[[VERBOSE]] local verbose = require "oil.verbose" ...
mit
ld-test/oil
lua/loop/collection/UnorderedArray.lua
12
1495
-------------------------------------------------------------------------------- ---------------------- ## ##### ##### ###### ----------------------- ---------------------- ## ## ## ## ## ## ## ----------------------- ---------------------- ## ## ## ## ## ###### --------------------...
mit
alirezanile/Nilebot
plugins/time.lua
94
3004
-- Implement a command !time [area] which uses -- 2 Google APIs to get the desired result: -- 1. Geocoding to get from area to a lat/long pair -- 2. Timezone to get the local time in that lat/long location -- Globals -- If you have a google api key for the geocoding/timezone api api_key = nil base_api = "https://m...
gpl-2.0
FireFor/RPG_Other_Dream
otherdream/AdvTiledLoader/Tile.lua
2
2549
--------------------------------------------------------------------------------------------------- -- -= Tile =- --------------------------------------------------------------------------------------------------- -- Setup local assert = assert local Tile = {class = "Tile"} Tile.__index = Tile -- Creates a new tile a...
unlicense
ptsneves/ardupilot
Tools/CHDK-Scripts/Cannon SX260/3DR_EAI_SX260.lua
96
29666
--[[ KAP UAV Exposure Control Script v3.1 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script 3DR EAI 1.0 is a fork of KAP 3.1 with settings specific to Canon cameras triggered off the Pixhawk autopilot. Changelog: -Modified Tv, Av, and...
gpl-3.0
adamel/sysdig
userspace/sysdig/chisels/topfiles_bytes.lua
12
1656
--[[ Copyright (C) 2013-2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without e...
gpl-2.0
wrxck/mattata
plugins/administration/wordfilter.lua
2
7806
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local wordfilter = {} local mattata = require('mattata') local redis = require('libs.redis') function wordfilter:init() wordfilter.commands = mattata.commands(self.info.usernam...
mit
cshore/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool.lua
12
16110
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool", package.seeall) require("luci.statistics.datatree") require("luci.statistics.rrdtool.colors") require("luci.statistics.i18n") require("luci.model.uci") requi...
apache-2.0
kunkku/luaossl
regress/53-csr-extensions.lua
1
4982
local auxlib = require"openssl.auxlib" local pkey = require "openssl.pkey" local x509_csr = require"_openssl.x509.csr" local x509_altname = require"openssl.x509.altname" local x509_name = require"openssl.x509.name" local _basename = arg and arg[0] and arg[0]:match"([^/]+)$" or "UNKNOWN" local function cluck(fmt, ...)...
mit
kracwarlock/dp
observer/errorminima.lua
5
3545
------------------------------------------------------------------------ --[[ ErrorMinima ]]-- -- Observer. -- Notifies listeners when a new minima is found -- Should only be called on Experiment, Propagator or Model subjects. -- It is useful to use the Minima directly, as opposed to using a -- subclass like EarlyStop...
bsd-3-clause
ufo2000/ufo2000
extensions/unit-chameleon/ethereal.lua
2
1431
local frames = pck_image_set("$(xcom)/units/ethereal.pck", 0, 8 * 9 + 3) if not frames then return end -- check if the user actually has this pck file local function sprite_renderer(img, dir, phase, info) if info.collapse then img:draw(0, 0, frames[8 * 9 + math.floor(phase / 3)]) return end ...
gpl-2.0
zhangxiangxiao/Crepe
data/csv2t7b.lua
4
4967
--[[ Dataset converter from csv to t7b By Xiang Zhang @ New York University --]] require("io") require("os") require("math") require("paths") require("torch") ffi = require("ffi") -- Configuration table config = {} config.input = "train.csv" config.output = "train.t7b" -- Parse arguments cmd = torch.CmdLine() cmd:op...
bsd-3-clause
maciejmiklas/NodeMCUUtils
src/serial_api_clock.lua
3
1307
require "serial_api" require "ntp"; require "ntp_clock"; sapiClock = { utc_offset = 3600 } local df = DateFormat.new() -- return hours as local time in 24h format, range: 00-23 function scmd.CHH() df:set_time(ntpc.current, sapiClock.utc_offset) sapi.send(string.format("%02u", df.hour)) end -- return minutes ...
apache-2.0
ld-test/oil
lua/oil/corba/idl/Compiler.lua
6
4134
-------------------------------------------------------------------------------- ------------------------------ ##### ## ------------------------------ ------------------------------ ## ## # ## ------------------------------ ------------------------------ ## ## ## ## ---------------------------...
mit
xergio/Broker_ConsolidatedBuffs
libs/LibQTip-1.0/LibStub/LibStub.lua
10
2251
-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $ -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info -- LibStub is hereby placed in the Public Domain -- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke local LIBSTUB_MAJOR...
mit
AntiSpammer1313/mranti3
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
anonymou3Team/hackedanonymous
plugins/welcome.lua
190
3526
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
daned33/nodemcu-firmware
lua_examples/email/send_email_smtp.lua
82
4640
--- -- Working Example: https://www.youtube.com/watch?v=CcRbFIJ8aeU -- @description a basic SMTP email example. You must use an account which can provide unencrypted authenticated access. -- This example was tested with an AOL and Time Warner email accounts. GMail does not offer unecrypted authenticated access. -- To o...
mit
cpascal/skynet
service/cslave.lua
50
6448
local skynet = require "skynet" local socket = require "socket" require "skynet.manager" -- import skynet.launch, ... local table = table local slaves = {} local connect_queue = {} local globalname = {} local queryname = {} local harbor = {} local harbor_service local monitor = {} local monitor_master_set = {} local ...
mit
Brottus/demiota
game/dota_addons/demiota/scripts/vscripts/examples/notificationsExample.lua
4
2114
-- Send a notification to all players that displays up top for 5 seconds Notifications:TopToAll({text="Top Notification for 5 seconds ", duration=5.0}) -- Send a notification to playerID 0 which will display up top for 9 seconds and be green, on the same line as the previous notification Notifications:Top(0, {text="GRE...
gpl-2.0
facebook/fbcunn
fbcunn/AbstractParallel.lua
1
8938
-- Copyright 2004-present Facebook. All Rights Reserved. require('cutorch') local withDevice = cutorch.withDevice local gpu_local_copy_buffers = {} --[[ `nn.AbstractParallel` is the base class for modules controlling data/model-parallel behaviour in Torch. The key concept is that data/model-parallelism _splits_ a...
bsd-3-clause
TimVonsee/hammerspoon
Hammerspoon/setup.lua
7
11106
local modpath, prettypath, fullpath, configdir, docstringspath, hasinitfile, autoload_extensions = ... os.exit = hs._exit local function runstring(s) local fn, err = load("return " .. s) if not fn then fn, err = load(s) end if not fn then return tostring(err) end local str = "" local results = table.pack(p...
mit
czlc/skynet
examples/login/client.lua
1
4824
package.cpath = "luaclib/?.so" local socket = require "client.socket" local crypt = require "client.crypt" if _VERSION ~= "Lua 5.3" then error "Use lua 5.3" end local fd = assert(socket.connect("127.0.0.1", 8001)) -- Á¬½Óloginserver local function writeline(fd, text) socket.send(fd, text .. "\n") end local funct...
mit
grimreaper/ValyriaTear
dat/maps/layna_village/layna_village_center_script.lua
1
58468
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_center_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "Mountain Village of Layna" map_image_filename = "img/menus/locations/mountain_village.png" map_subname = "Village ce...
gpl-2.0
FrisKAY/MineOS_Server
Applications/github.lua
1
3632
local internet = require("internet") local fs = require("filesystem") local seri = require("serialization") local shell = require("shell") local config = require("config") local args, options = shell.parse(...) local function printUsage() io.write("\n Использование:\n") io.write(" github set <ссылка на репозитори...
gpl-3.0
ld-test/oil
lua/loop/component/contained.lua
12
2962
-------------------------------------------------------------------------------- ---------------------- ## ##### ##### ###### ----------------------- ---------------------- ## ## ## ## ## ## ## ----------------------- ---------------------- ## ## ## ## ## ###### --------------------...
mit
evolutional/flatbuffers
tests/MyGame/Example/TypeAliases.lua
1
4714
-- automatically generated by the FlatBuffers compiler, do not modify -- namespace: Example local flatbuffers = require('flatbuffers') local TypeAliases = {} -- the module local TypeAliases_mt = {} -- the class metatable function TypeAliases.New() local o = {} setmetatable(o, {__index = TypeAliases_mt}) ...
apache-2.0
anonymou3Team/hackedanonymous
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
imashiam/1
plugins/all.lua
1321
4661
do data = load_data(_config.moderation.data) local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print...
gpl-2.0
robert00s/koreader
frontend/ui/message/streammessagequeue.lua
4
2977
local ffi = require("ffi") local logger = require("logger") local MessageQueue = require("ui/message/messagequeue") local _ = require("ffi/zeromq_h") local zmq = ffi.load("libs/libzmq.so.4") local czmq = ffi.load("libs/libczmq.so.1") local StreamMessageQueue = MessageQueue:new{ host = nil, port = nil, } func...
agpl-3.0
Movimento5StelleLazio/WebMCP
demo-app/model/medium.lua
3
2663
Medium = mondelefant.new_class() Medium.table = 'medium' Medium:add_reference{ mode = 'm1', -- many (m) Medium entries can refer to one (1) MediaType to = "MediaType", -- name of referenced model (quoting avoids auto-loading here) this_key = 'media_type_id', -- own key ...
mit
dmekersa/Gamecodeur
Atelier Redemption of Sam/Step6/spritemanager.lua
4
1630
local spriteManager = {} spriteManager.liste_sprites = {} spriteManager.Reset = function() spriteManager.liste_sprites = {} end spriteManager.CreeSprite = function(pNomImage, pNbImages, pX, pY) sprite = {} sprite.x = pX sprite.y = pY sprite.frame = 1 sprite.vx = 0 sprite.vy = 0 sprite.flip = 1 s...
cc0-1.0
tianxiawuzhei/cocos-quick-lua
quick/samples/tests/src/scenes/MainScene.lua
8
1471
local MainScene = class("MainScene", function() return display.newScene("MainScene") end) function MainScene:ctor() local items = { "framework.helper", "framework.native", "framework.display", "framework.crypto", "framework.network", "framework.luabinding", ...
mit
arventwei/WioEngine
Tools/jamplus/src/luaplus/Src/Modules/lanes/tests/ehynes.lua
6
1510
-- -- Test from <ehynes at dharmagaia.com> -- local lanes = require "lanes" lanes.configure() local function PRINT_FMT( fmt, ... ) io.stderr:write( string.format(fmt,...).."\n" ) end -- a linda for sending messages local linda = lanes.linda() -- a linda message receiver local receiver_gen = lanes.gen( 'base', 'o...
mit