code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3
values | license stringclasses 5
values | size int64 2 1.05M |
|---|---|---|---|---|---|
--setup the temp sensor
t=require("ds18b20")
t.setup(5)
--setup the distance sensor
dofile("hcsr04.lua")
device = hcsr04.init()
--setup the LED pin
ledpin=0
gpio.mode(ledpin,gpio.OUTPUT)
led_state=0
-- init mqtt client with keepalive timer 120sec
mqttconnected = 0
--Used to establish the mqtt connecttion
function c... | chrislbennett/NodeMCU-SensorFramework | src/ReaderProcess.lua | Lua | mit | 3,152 |
local webplot = require 'webplot'
local webplot_path = webplot.path
local webplot_host = webplot.host
local dygraph = {}
function dygraph.add(fig_path, data, options)
webplot.dojob(
function()
_data[fig_path] = data
_options[fig_path] = cjson.encode(options)
app.get(fig_path, function(req, re... | Po-Hsun-Su/webplot | webplot/dygraph.lua | Lua | mit | 1,102 |
-- Copyright (c) 2008 Mikael Lind
--
-- 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, publis... | elemel/moonshine | src/Game.lua | Lua | mit | 2,470 |
local base = require('litcord.structures.base')
local Emoji = class(base)
function Emoji:__updated ()
if not self.id then
-- default emojis
else
self.string = '<:'..self.name..':'..self.id..'>'
self.url = 'https://cdn.discordapp.com/emojis/'..self.id..'.png'
end
end
return Emoji | satom99/litcord | litcord/structures/Emoji.lua | Lua | mit | 291 |
--[[
bags.lua
Generic methods for accessing bag slot information
--]]
local ADDON, Addon = ...
--[[ Slot Type ]]--
function Addon:IsBackpack(slot)
return slot == BACKPACK_CONTAINER
end
function Addon:IsBackpackBag(bagSlot)
return bagSlot > 0 and bagSlot < (NUM_BAG_SLOTS + 1)
end
function Addon:IsBank(slot)
... | liruqi/bigfoot | Interface/AddOns/Bagnon/common/core/bags.lua | Lua | mit | 1,977 |
include ("monsterviz/monsterviz.lua")
local add = concommand.Add
add("mv_reload", function()
print("reloaded")
include ("monsterviz/monsterviz.lua")
end)
| Capster/MonsterViz | MonsterViz/lua/autorun/client/monsterviz.lua | Lua | apache-2.0 | 158 |
local luv = require('luv')
local zmq = luv.zmq.create(2)
local pub = zmq:socket(luv.zmq.PUSH)
pub:bind('tcp://127.0.0.1:1234')
local prod = luv.fiber.create(function()
print("enter prod:")
for i=1, 10 do
pub:send("tick: "..i)
end
pub:close()
end)
prod:ready()
prod:join()
| richardhundt/luv | examples/zmq_push.lua | Lua | apache-2.0 | 295 |
--
-- gmake2_workspace.lua
-- Generate a workspace-level makefile.
-- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project
--
local p = premake
local gmake2 = p.modules.gmake2
local tree = p.tree
local project = p.project
--
-- Generate a GNU make "workspace" makefile, with support for ... | mendsley/premake-core | modules/gmake2/gmake2_workspace.lua | Lua | bsd-3-clause | 4,391 |
--[[ WARP GATE LIST
warp_gate(<warp_alias>, <gate_to>, <this_gate_id>, <map_id>, <min_x_pos>, <min_y_pos>, <min_z_pos>, <max_x_pos>, <max_y_pos>, <max_z_pos>);
--]]
warp_gate("", 26, 5277.77, 4883.987, 15.25819, 27, 5149.823, 5515.776, 11.31921, 5155.54, 5522.08, 16.92542);
warp_gate("", 28, 5471.656, 4768.623, 27.7674... | dev-osrose/osIROSE-new | scripts/warps/fields/JG05.lua | Lua | apache-2.0 | 387 |
-------------------------------------------------------------------------------
-- Networking library.
-------------------------------------------------------------------------------
local net = net
--- Net message library. Used for sending data from the server to the client and back
local net_library, _ = SF.Librari... | Xandaros/Starfall | lua/starfall/libs_sh/net.lua | Lua | bsd-3-clause | 8,769 |
-- $Id: db.lua,v 1.79 2016/11/07 13:02:34 roberto Exp $
-- See Copyright Notice in file all.lua
-- testing debug library
local debug = require "debug"
local function dostring(s) return assert(load(s))() end
print"testing debug library and debug information"
do
local a=1
end
assert(not debug.gethook())
local test... | nodemcu/nodemcu-firmware | app/lua53/host/tests/db.lua | Lua | mit | 21,900 |
local n1 = name("foo", "bar", 1)
assert(n1:replace_prefix("foo", {"hello", "world"}) == name("hello", "world", "bar", 1))
assert(n1:replace_prefix("foo2", {"hello", "world"}) == name("foo", "bar", 1))
assert(n1:replace_prefix("foo", nil) == name("bar", 1))
assert(n1:replace_prefix("foo", name()) == name("bar", 1))
asse... | eigengrau/lean | tests/lua/n7.lua | Lua | apache-2.0 | 474 |
local Walk = {}
local Data = require "data.data"
local Control = require "ai.control"
local Paths = require("data."..Data.gameName..".paths")
local Input = require "util.input"
local Memory = require "util.memory"
local Player = require "util.player"
local Pokemon = require "storage.pokemon"
local pat... | frango9000/PokeBotBad | action/walk.lua | Lua | mit | 3,163 |
--------------------------------
-- @module EventListenerPhysicsContact
-- @extend EventListenerCustom
-- @parent_module cc
--------------------------------
-- Create the listener.
-- @function [parent=#EventListenerPhysicsContact] create
-- @param self
-- @return EventListenerPhysicsContact#EventListenerPhysicsCo... | dios-game/dios-cocos | src/oslibs/cocos/cocos-src/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua | Lua | mit | 974 |
-- Author: Divran
local Obj = EGP:NewObject( "3DTracker" )
Obj.material = nil
Obj.w = nil
Obj.h = nil
Obj.target_x = 0
Obj.target_y = 0
Obj.target_z = 0
Obj.r = nil
Obj.g = nil
Obj.b = nil
Obj.a = nil
Obj.parententity = NULL
Obj.Is3DTracker = true
Obj.angle = 0
function Obj:Draw(egp)
if egp.gmod_wire_egp_emitter then... | NezzKryptic/Wire | lua/entities/gmod_wire_egp/lib/objects/3dtracker.lua | Lua | apache-2.0 | 2,872 |
--
-- 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... | traceguide/api-php | vendor/apache/thrift/lib/lua/TFramedTransport.lua | Lua | mit | 2,926 |
return require('rrpg.lua'); | rrpgfirecast/firecast | SDK3/API/firecast.lua | Lua | apache-2.0 | 27 |
local intDefaultAuctionTime = 24 --1 Day
local intCleanUpTime = 168 --1 Week
PANEL = {}
function PANEL:Init()
self.AuctionsList = CreateGenericList(self, 3, false, true)
self:LoadAuctions()
end
function PANEL:PerformLayout()
self.AuctionsList:SetSize(self:GetWide(), self:GetTall())
end
function PANEL:LoadAucti... | Polkm/underdone | gamemode/core/clientfiles/menutabs/auctionmenu/pickupauctions.lua | Lua | mit | 1,187 |
function setup()
dofile("commun.lua")
dofile("p_crypto.lua")
commun.setup("pineapple", "notanapple")
base64_key = encoder.fromBase64("MJ4h1Le2SpWtbr93CuyrwQ==")
test = encoder.toBase64(p_crypto.p_encrypt("{\"device\": {\"blood_sugars\": [{\"level\": 10}, {\"level\": 20}]}}", base64_key))
... | jaspervandenberg/roselabs_project1 | webserver/public/system/firmwares/files/000/000/010/original/init.lua | Lua | mit | 980 |
GameLogic = CreateEmptyGameObject("GameLogic123")
function GameLogic.update( guid, elapsedTime )
end
function GameLogic.init( ... )
end
function GameLogic.destroy( ... )
-- body
logMessage("DESTROY!")
end
-------------------------------------------------------
-- Running State
-----------------... | pampersrocker/risky-epsilon | Game/data/scripts/GameLogic.lua | Lua | mit | 14,911 |
local utils = {}
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
function utils.opt(scope, key, value)
scopes[scope][key] = value
if scope ~= 'o' then scopes['o'][key] = value end
end
local map_default_options = {noremap = true, silent = true}
-- TODO: Unificar essas duas funções. Receber opt `local` para de... | dimascyriaco/dotfiles | nvim/.config/nvim/lua/utils/init.lua | Lua | mit | 1,143 |
CAST_SOUND_TABLE = {"nevermore_nev_anger_04", "nevermore_nev_anger_06", "nevermore_nev_anger_07", "nevermore_nev_arc_laugh_04", "nevermore_nev_arc_laugh_05", "nevermore_nev_arc_laugh_02"}
function spawnmobs(event)
local caster = event.caster
local ability = event.ability
abilityLevel = ability:GetLevel()
location ... | DiNaSoR/Angel_Arena | game/angel_arena/scripts/vscripts/abilities/lordofdeath_boss_mobs.lua | Lua | mit | 8,601 |
local K, C, L = select(2, ...):unpack()
if C.Chat.Enable ~= true then return end
-- Lua API
local _G = _G
local format = string.format
local gsub = string.gsub
local len = string.len
local pairs = pairs
local select = select
local strfind = string.find
local sub = string.sub
local unpack = unpack
-- Wow API
local FCF... | AutoJames/KkthnxUI_Legion | KkthnxUI/Modules/Chat/ChatFrames.lua | Lua | mit | 9,685 |
pfUI:RegisterModule("xpbar", "vanilla:tbc", function ()
local rawborder, default_border = GetBorderSize()
local parse_faction = SanitizePattern(FACTION_STANDING_INCREASED)
local data = CreateFrame("Frame", "pfExperienceBarData", UIParent)
data:RegisterEvent("CHAT_MSG_COMBAT_FACTION_CHANGE")
data:RegisterEven... | shagu/pfUI | modules/xpbar.lua | Lua | mit | 10,367 |
--[[
compose Longest Common Subsequence and Shortest Edit Script.
The algorithm implemented here is based on "An O(NP) Sequence Comparison Algorithm"
by described by Sun Wu, Udi Manber and Gene Myers
--]]
ONP = {}
function ONP.new (a, b)
local self = {
A = a,
... | cubicdaiya/onp | lua/onp.lua | Lua | mit | 4,043 |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Weapons\Alien\LerkBite\shared.lua
-- - Dragon
function LerkBite:OnTag(tagName)
PROFILE("LerkBite:OnTag")
if tagName == "hit" then
local player = self:GetParent()
if pla... | xToken/CompMod | lua/CompMod/Weapons/Alien/LerkBite/shared.lua | Lua | mit | 1,078 |
local is_present_better_escape, better_escape = pcall(require, "better_escape")
if not is_present_better_escape then
return
end
better_escape.setup({})
| rucas/derpfiles | neovim/lua/plugins/better-escape/init.lua | Lua | mit | 155 |
local ffi = require('ffi')
local sin = math.sin
local cos = math.cos
local sqrt = math.sqrt
local memcpy = ffi.copy
local abs = math.abs
local _M = {}
_M.__index = _M
local M00=0
local M01=4
local M02=8
local M03=12
local M10=1
local M11=5
local M12=9
local M13=13
local M20=2
local M21=6
local M22=10
local M23=14
loc... | ibawt/ev | lib/matrix4.lua | Lua | mit | 4,311 |
--Commands module (formerly players module) v2 for ULX GUI -- by Stickly Man!
--Handles all user-executable commands, such as kick, slay, ban, etc.
local cmds = xlib.makepanel{ parent=xgui.null }
cmds.selcmd = nil
cmds.mask = xlib.makepanel{ x=160, y=30, w=425, h=330, parent=cmds }
cmds.argslist = xlib.makelistlayout{... | OctoEnigma/shiny-octo-system | addons/ulx/lua/ulx/xgui/commands.lua | Lua | mit | 12,986 |
-- Game: Steal from merchants and become the most infamous pirate.
-- DO NOT MODIFY THIS FILE
-- Never try to directly create an instance of this class, or modify its member variables.
-- Instead, you should only be reading its variables and calling its functions.
local class = require("joueur.utilities.class")
local... | siggame/Joueur.lua | games/pirates/game.lua | Lua | mit | 4,978 |
-- Gemeinschaft 5 module: general gigaset model class
-- (c) Peter Kozak 2013
--
module(...,package.seeall)
Gigaset = {}
-- Create Gigaset object
function Gigaset.new(self, arg)
arg = arg or {}
object = arg.object or {}
setmetatable(object, self);
self.__index = self;
self.log = arg.log;
self.reboot = a... | funkring/gs5 | misc/freeswitch/scripts/phones/gigaset.lua | Lua | mit | 1,380 |
package.path = "../src/?.lua;../src/?/init.lua;".. package.path
require "luanode.utils"
local redis = require("redis-luanode").createClient(nil, nil, {
max_attempts = 2
})
--require("redis-luanode").debug_mode = true
redis:on("error", function (self, err)
console.log("Redis says: " .. err)
end)
redis:on("re... | ignacio/redis-luanode | benches/reconnect_test.lua | Lua | mit | 1,000 |
-- require("Test.InputTest") --requires keyboard input, may not want to run all the time
-- require('Test.ResourceMgrTest')
require('Test.TexturePackTest')
| kennethlombardi/moai-components | Data/Scripts/Test/TestAll.lua | Lua | mit | 159 |
VEHICLE = {};
VEHICLE.ID = 'z';
VEHICLE.Name = "Police Mustang";
VEHICLE.Make = "Ford";
VEHICLE.Model = "GT500 Mustang";
VEHICLE.Script = "gt500";
VEHICLE.Cost = 0;
VEHICLE.PaintJobCost = 0;
VEHICLE.DF = false;
VEHICLE.CustomBodyGroup = nil;
VEHICLE.PaintJobs = {
{model = 'mo... | msburgess3200/PERP | gamemodes/perp/gamemode/vehicles/cop_car_vip.lua | Lua | mit | 1,725 |
-------------------------------------------------------------------
--// PROJECT: Union of Clarity and Diversity
--// RESOURCE: UCDhousing
--// DEVELOPER(S): Lewis Watson (Noki)
--// DATE: 09/12/2015
--// PURPOSE: A network of exports for housing.
--// FILE: \exports\server.lua [server]
--------------------------------... | nokizorque/ucd | UCDhousing/exports/server.lua | Lua | mit | 1,148 |
local _, MySlot = ...
local MYSLOT_BINDS = {
["MOVEANDSTEER"] = 1,
["MOVEFORWARD"] = 2,
["MOVEBACKWARD"] = 3,
["TURNLEFT"] = 4,
["TURNRIGHT"] = 5,
["STRAFELEFT"] = 6,
["STRAFERIGHT"] = 7,
["JUMP"] = 8,
["SITORSTAND"] = 9,
["TOGGLESHEATH"] = 10,
["TOGGLEAUTORUN"]... | liruqi/bigfoot | Interface/AddOns/MySlot/keys.lua | Lua | mit | 13,968 |
ENT.Type = "brush"
ENT.Base = "base_brush"
function ENT:KeyValue(key, value)
if key == "WeaponsFound" then
-- this is our output, so handle it as such
self:StoreOutput(key, value)
end
end
local function VectorInside(vec, mins, maxs)
return (vec.x > mins.x and vec.x < maxs.x
and vec.y ... | TeslaCloud/TTTRewrite | terrortown/entities/entities/ttt_weapon_check.lua | Lua | mit | 2,825 |
function toBits(num)
local s = ''
while num > 0 do
rest = math.fmod(num,2)
s = s .. rest
num = (num-rest)/2
end
return s
end
n = io.read('*number', '*l')
s = toBits(n)
l = 0
for i in string.gmatch(s, "1+") do
l = math.max(l, i:len())
end
print(l)
| rho2/30DaysOfCode | day10.lua | Lua | mit | 295 |
LinkLuaModifier("modifier_boss_cursed_zeld_shadows_curse", "heroes/bosses/cursed_zeld/shadows_curse.lua", LUA_MODIFIER_MOTION_NONE)
boss_cursed_zeld_shadows_curse = {
GetIntrinsicModifierName = function() return "modifier_boss_cursed_zeld_shadows_curse" end,
}
modifier_boss_cursed_zeld_shadows_curse = {
IsPurgable... | ark120202/aabs | game/scripts/vscripts/heroes/bosses/cursed_zeld/shadows_curse.lua | Lua | mit | 2,714 |
-- Prosody IM
-- Copyright (C) 2016-2018 Kim Alvefur
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local t_insert = table.insert;
local t_concat = table.concat;
local setmetatable = setmetatable;
local pcall = pcall;
local type = type;
local next... | bjc/prosody | net/server_epoll.lua | Lua | mit | 28,272 |
--------------------------------
-- @module TransitionPageTurn
-- @extend TransitionScene
-- @parent_module cc
--------------------------------
-- @function [parent=#TransitionPageTurn] actionWithSize
-- @param self
-- @param #size_table size
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInter... | riidt/neox | frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua | Lua | mit | 1,157 |
-- Saga is Licensed under Creative Commons Attribution-NonCommerial-ShareAlike 3.0 License
-- http://creativecommons.org/licenses/by-nc-sa/3.0/
-- Generated By Quest Extractor on 2/8/2008 3:46:18 PM
local QuestID = 348;
local ReqClv = 7;
local ReqJlv = 0;
local NextQuest = 349;
local RewZeny = 121;
local RewCxp = 246;... | Darkin47/SagaRevised | Quests/348.lua | Lua | cc0-1.0 | 980 |
function roundtripimpl(value, opt)
local s, serr = string.serialize(value, opt)
if serr then
raise(serr)
end
local v, verr = s:deserialize()
if verr then
raise(verr)
end
return v
end
function roundtrip(round0)
local round1 = roundtripimpl(round0, false)
local round2... | waruqi/xmake | tests/modules/string/serialize/test.lua | Lua | apache-2.0 | 2,843 |
local Binarize, parent = torch.class('nn.Binarize', 'nn.Module')
function Binarize:__init(stcFlag)
parent.__init(self)
self.stcFlag = stcFlag
self.randmat = torch.Tensor();
self.outputR = torch.Tensor();
end
function Binarize:updateOutput(input)
self.randmat:resizeAs(input);
self.outputR:resiz... | iassael/learning-to-communicate | code/module/Binarize.lua | Lua | apache-2.0 | 829 |
-- Copyright (C) Guy Cheung
--
local shared = ngx.shared
local log = ngx.log
local ERR = ngx.ERR
local util = require "ngx_metric.util"
local PREFIX = "counter."
local _M = { _VERSION = '0.0.1' }
function _M.add(dict, metric, value)
util.dict_safe_incr(dict, PREFIX .. metric, tonumber(value))
end
function _M.g... | GuyCheung/falcon-ngx_metric | lua/ngx_metric/counter.lua | Lua | apache-2.0 | 560 |
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... | waruqi/xmake | xmake/modules/detect/tools/find_cl.lua | Lua | apache-2.0 | 1,637 |
-- vim:set ts=4 sts=4 sw=4 et:
--- jit-uuid
-- Fast and dependency-free UUID library for LuaJIT/ngx_lua.
-- @module jit-uuid
-- @author Thibault Charbonnier
-- @license MIT
-- @release 0.0.5
local bit = require 'bit'
local tohex = bit.tohex
local band = bit.band
local bor = bit.bor
local _M = {
_VERSION = '0... | zhaojun2066/lightning | lightning-gateway/lualib/resty/jit-uuid.lua | Lua | apache-2.0 | 13,573 |
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... | waruqi/xmake | xmake/platforms/android/xmake.lua | Lua | apache-2.0 | 3,914 |
local skynet = require "skynet"
local capture = function(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if raw then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end
local function split(... | yingnierxiao/piserver | work/cameraServer.lua | Lua | apache-2.0 | 1,252 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )
util.PrecacheSound( "SB/Gattling2.wav" )
function ENT:Initialize()
self.Entity:SetModel( "models/Slyfo/smuggler_single2.mdl" )
self.Entity:SetName("SmallMachineGun")
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveTyp... | X-Coder/SBEP-Weapons | lua/entities/sf-smugglerhold2/init.lua | Lua | apache-2.0 | 2,966 |
--!A cross-platform build utility based on Lua
--
-- 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 Apach... | tboox/xmake | xmake/core/base/deprecated.lua | Lua | apache-2.0 | 2,351 |
--[[-------------------------------------------------------------------------------
Broker Specializations
A Data Broker add-on for quickly switching your specialization with gear set and loot specialization
By: Shenton
Localization-ptBR.lua
-------------------------------------------------------------... | Shenton/broker-specializations | Localization/Locales-ptBR.lua | Lua | bsd-2-clause | 560 |
require('../common/NYU_params')
require('./DataPointer')
require 'image'
require 'xlua'
require 'csvigo'
local DataLoader = torch.class('DataLoader')
function DataLoader:__init(relative_depth_filename)
print(">>>>>>>>>>>>>>>>> Using DataLoader DIW")
self:parse_depth(relative_depth_filename)
... | wfchen-umich/relative_depth | src/experiment/DataLoader_DIW.lua | Lua | bsd-3-clause | 8,347 |
-- This file is part of muFORTH: http://muforth.nimblemachines.com/
-- Copyright (c) 2002-2015 David Frech. (Read the LICENSE for details.)
-- Common equates for Atmel atmega parts.
-- Be careful of pasted in endashes and ligatures! fl really got me...
-- To convert en- and em-dashes to normal (double) dashes, do th... | nickhen/muforth | mu/target/AVR/device/chipdefs.lua | Lua | bsd-3-clause | 24,183 |
local client = require "client"
local weixin_client = client:new()
local val, err = weixin_client:get('test', { grant_type = 'client_credential', access_token = true })
ngx.say(val)
ngx.say(err)
| sdgdsffdsfff/lua_weixinAPIs | weixin/weixin.lua | Lua | mit | 198 |
--[[
@Authors: Ben Dol (BeniS)
@Details: Auto rune maker event logic
]]
AfkModule.RuneMake = {}
RuneMake = AfkModule.RuneMake
function RuneMake.Event(event)
if g_game.isOnline() then
local words = AfkModule.getPanel():getChildById('RuneSpellText'):getText()
local player = g_game.getLocalPlayer()
--... | JoseEduardo/shaykie_bot | modules/01-afk/events/runemaker.lua | Lua | mit | 1,577 |
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*-
-- vim: ts=4 sw=4 ft=lua noet
---------------------------------------------------------------------
-- @author Daniel Barney <daniel@pagodabox.com>
-- @copyright 2014, Pagoda Box, Inc.
-- @doc
--
-- @end
-- Created : 6 Feb 2015 by Daniel Barney ... | fliping/flip | lib/lmmdb.lua | Lua | mit | 12,030 |
registerNpc(185, {
walk_speed = 175,
run_speed = 700,
scale = 95,
r_weapon = 203,
l_weapon = 0,
level = 48,
hp = 26,
attack = 200,
hit = 122,
def = 101,
res = 106,
avoid ... | RavenX8/osIROSE-new | scripts/mobs/ai/ranger_clown.lua | Lua | apache-2.0 | 1,071 |
--[[
Copyright (c) 2018, Vsevolod Stakhov <vsevolod@highsecure.ru>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... | moisseev/rspamd | lualib/rspamadm/cookie.lua | Lua | apache-2.0 | 3,090 |
local utils = require "kong.tools.utils"
local Errors = require "kong.dao.errors"
local crypto = require "crypto"
local SCHEMA = {
primary_key = {"id"},
table = "jwt_secrets",
cache_key = { "key" },
fields = {
id = {type = "id", dao_insert_value = true},
created_at = {type = "timestamp", immutable = tr... | shiprabehera/kong | kong/plugins/jwt/daos.lua | Lua | apache-2.0 | 1,591 |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* gui\admin_main.lua
*
* Original File by lil_Toady
*
**************************************]]
aAdminForm = nil
aLastCheck = 0
aCurrentVehicle = 429
aCurrentWeapon = 30
aCurrentAmmo = 90
aCurrentSlap = 20
aPlayers = {}
aBans = {}
aLastSync = ... | JarnoVgr/Mr.Green-MTA-Resources | resources/[admin]/admin/client/gui/admin_main.lua | Lua | mit | 72,892 |
require("tests/testsuite")
DocumentSet.addons.smartquotes.singlequotes = true
DocumentSet.addons.smartquotes.doublequotes = true
DocumentSet.addons.smartquotes.notinraw = true
Cmd.InsertStringIntoParagraph("'Hello, world!'")
Cmd.SplitCurrentParagraph()
Cmd.InsertStringIntoParagraph('"Hello, world!"')
Cmd.SplitCurrent... | Munchotaur/wordgrinder | tests/smartquotes-typing.lua | Lua | mit | 910 |
local size = cc.Director:getInstance():getWinSize()
local function CreateSpriteLayer()
local layer = cc.Layer:create()
local x, y
x = size.width
y = size.height
local sprite = cc.Sprite:create(s_pPathGrossini)
local spriteSister1 = cc.Sprite:create(s_pPathSister1)
local spriteSister2 = cc.Spri... | gibtang/CCNSCoding | samples/Lua/TestLua/Resources/luaScript/RotateWorldTest/RotateWorldTest.lua | Lua | mit | 3,266 |
--
-- Custom Addon Framework TOOLS HAPPY-FUN TIME-SAVER FUNCTIONS
--
if ( SERVER ) then
AddCSLuaFile( "vgui/caf_gui.lua" )
AddCSLuaFile( "vgui/caf_gui_button.lua" )
-- Global list of callbacks
CAF_CallbackFuncs = {}
--DO NOT register this function with the duplication, you MUST wrap this function in anot... | spacebuild/spacebuild | lua/caf/core/shared/caf_tools.lua | Lua | apache-2.0 | 10,661 |
-- msgpackffi.lua (internal file)
local ffi = require('ffi')
local buffer = require('buffer')
local builtin = ffi.C
local msgpack = require('msgpack') -- .NULL, .array_mt, .map_mt, .cfg
local MAXNESTING = 16
local int8_ptr_t = ffi.typeof('int8_t *')
local uint8_ptr_t = ffi.typeof('uint8_t *')
local uint16_ptr_t = ffi.... | Sannis/tarantool | src/lua/msgpackffi.lua | Lua | bsd-2-clause | 15,091 |
local Class = require (fuccboi_path .. '/libraries/classic/classic')
local HitFrameStop = Class:extend()
function HitFrameStop:hitFrameStopNew()
self.frames_left = 0
self.groups_stopped = {}
self.after_function = nil
end
function HitFrameStop:hitFrameStopUpdate(dt)
self.frames_left = math.max(self.fra... | AntonioModer/fuccboiGDX | fuccboi/world/HitFrameStop.lua | Lua | mit | 1,525 |
--@native fs.open
--@import see.io.InputStream
--@import see.io.IOException
--@import see.io.Path
--@import see.util.ArgumentUtils
--@extends see.io.InputStream
--[[
@throw see.util.InvalidArgumentException if the args are incorrect.
]]
function FileInputStream:init(path)
ArgumentUtils.check(1, path, Path)
... | Yevano/see | see/lib/see/io/FileInputStream.lua | Lua | mit | 706 |
-- Npc by TenPlus1
mobs.npc_drops = {
"default:pick_steel", "mobs:meat", "default:sword_steel",
"default:shovel_steel", "farming:bread", "bucket:bucket_water"
}
mobs:register_mob("mobs:npc", {
type = "npc",
passive = false,
damage = 3,
attack_type = "dogfight",
attacks_monsters = true,
hp_min = 10,
hp_max =... | Echoes91/mobs | npc.lua | Lua | mit | 2,382 |
ITEM.name = "Bag"
ITEM.desc = "A bag to hold items."
ITEM.model = "models/props_c17/suitcase001a.mdl"
ITEM.category = "Storage"
ITEM.width = 2
ITEM.height = 2
ITEM.invWidth = 4
ITEM.invHeight = 2
ITEM.isBag = true
ITEM.functions.View = {
icon = "icon16/briefcase.png",
onClick = function(item)
local index = item:get... | tltneon/NutScript | gamemode/items/base/sh_bags.lua | Lua | mit | 3,673 |
local localplayer
local hudText
local textCol1, textCol2 = Color(0, 0, 0, 200), Color(128, 30, 30, 255)
local plyMeta = FindMetaTable("Player")
local activeHitmen = {}
local postPlayerDraw
local minHitDistanceSqr = GM.Config.minHitDistance * GM.Config.minHitDistance
--[[------------------------------------------------... | FPtje/DarkRP | gamemode/modules/hitmenu/cl_init.lua | Lua | mit | 4,419 |
local inspect = require 'inspect'
local unindent = require 'spec.unindent'
local is_luajit, ffi = pcall(require, 'ffi')
describe( 'inspect', function()
describe('numbers', function()
it('works', function()
assert.equals(inspect(1), "1")
assert.equals(inspect(1.5), "1.5")
assert... | mpeterv/inspect.lua | spec/inspect_spec.lua | Lua | mit | 11,949 |
local sha2 = require('opus.crypto.sha2')
local Krist = { }
local function sha256(key)
return sha2.digest(key):toHex()
end
local function makeaddressbyte(byte)
byte = 48 + math.floor(byte / 7)
return string.char(byte + 39 > 122 and 101 or byte > 57 and byte + 39 or byte)
end
function Krist.makev2address(key)
loc... | kepler155c/opus-apps | swshop/apis/krist.lua | Lua | mit | 930 |
local Player = FindMetaTable("Player")
function Player:NewGame()
self:SetNWInt("exp", 0)
self:AddItem("money", 100)
self:AddItem("item_smallammo_small", 3)
self:AddItem("item_healthkit", 2)
self:AddItem("weapon_melee_axe", 1)
self:AddItem("weapon_ranged_junkpistol", 1)
--[[
self:AddItem("item_canspoili... | Polkm/underdone | gamemode/core/serverfiles/savingloading.lua | Lua | mit | 5,207 |
local pressDuration = ...
if pressDuration == nil then
pressDuration = 1
end
btnTimer = 0;
tempVar = 0;
-- multiply battery voltage by 5.70 to compensate for potential divider
-- 5.70 comes from potential divider of 470K & 100K resistors' ladder
-- i.e. battery voltage at adc pin = vbatt * 100 / (100 + 470)
-- ... | knewron-technologies/1btn | firmware/release v1/btn.lua | Lua | mit | 2,682 |
local common = require "sha1.common"
local ops = {}
local bytes_to_uint32 = common.bytes_to_uint32
local uint32_to_bytes = common.uint32_to_bytes
function ops.uint32_lrot(a, bits)
local power = 2 ^ bits
local inv_power = 0x100000000 / power
local lower_bits = a % inv_power
return (lower_bits * power) + (... | kikito/sha1.lua | src/sha1/pure_lua_ops.lua | Lua | mit | 5,765 |
local M = {}
M.argeocoordinate = require("arkit.argeocoordinate")
M.arcontroller = require("arkit.arcontroller")
M.argeolocations = require("arkit.geolocations")
function M:deviceSupportsAR()
local res = true
if system.getInfo("environment")=="simulator" then
res = false
end
if not system.has... | jyrkih/arkit-corona | arkit/arkit.lua | Lua | mit | 457 |
local awful = require "awful"
if custom_globalkeys == nil then
custom_globalkeys = {}
end
-- table.insert(custom_widgets_setup, function ()
-- idle timer
local lockTimer = timer({timeout = 30})
lockTimer:connect_signal("timeout", function()
local fd = io.popen("xscreensaver-command -time")
local output = fd:rea... | geneshki/awesome-cfg | widgets/lock.lua | Lua | mit | 641 |
local camera = {}
camera.x = 0
camera.y = 0
camera.scaleX = 1
camera.scaleY = 1
camera.rotation = 0
--rotation offset a.k.a point to rotate around
camera.OffSetX = 0
camera.OffSetY = 0
function camera:set()
love.graphics.push()
love.graphics.translate(self.OffSetX, self.OffSetY)
love.graphics.rotat... | shuttler67/Robert | MindBot/camera.lua | Lua | mit | 1,317 |
--- RoutingOperation
-- This module is based on the Operation one. The only difference is that
-- operations for the routing policy check request information that is not
-- available when the operation is instantiated, like headers, query arguments,
-- etc. That is the reason why in instances of this module, there are ... | 3scale/docker-gateway | gateway/src/apicast/policy/routing/routing_operation.lua | Lua | mit | 2,276 |
function run(msg)
sudo = {{"اضافه کردن تعداد محصول","آمار ادمین ها","لیست فروش ادمین ها"},{"قیمت کل فروش","تعیین تعداد محصول","اضافه کردن تعداد محصول به لیست"}}
member = {{"لیست محصولات","موجودی محصولات"},{"سایت شرکت","لینک پرداخت","ارتباط با ما"}}
chat = {{"ارسال درخواست چت"},{text="ارسال شماره شما",request_... | PouriaDev/PM-Resan | plugin.lua | Lua | mit | 20,728 |
---------------------------
-- AspectBar - 守护动作条
-- Terry@BF
---------------------------
local Addon = LibStub("AceAddon-3.0"):GetAddon("BFClassMod")
if not Addon then return end
local A = Addon:NewModule("AspectBar","AceEvent-3.0","AceHook-3.0","AceTimer-3.0")
if not A then return end
local _
local f ... | liruqi/bigfoot | Interface/AddOns/BFClassMods/Aspects.lua | Lua | mit | 40,488 |
--- Basic access to the League of Legends API
--
-- This module is one of the core modules that everything is built on top of.
-- If you want to use any of the premade endpoint modules such as
-- `lol.summoner` you will need to create an api object first and then use that
-- to create the specific endpoint module.
--
-... | dojoteef/lualol | src/lol/api.lua | Lua | mit | 8,605 |
player_manager.AddValidModel( "PMC4_14", "models/player/PMC_4/PMC__14.mdl" ) list.Set( "PlayerOptionsModel", "PMC4_14", "models/player/PMC_4/PMC__14.mdl" ) | FluffyGods/IBG-Afghan-War-TDM-Content | IBG Afghan War TDM Content/lua/autorun/pmc4_pmc__14.lua | Lua | apache-2.0 | 197 |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... | alexsong93/openwhisk-apigateway | scripts/lua/lib/dataStore.lua | Lua | apache-2.0 | 6,865 |
--
-- Created by IntelliJ IDEA.
-- User: junjie
-- Date: 2014/11/4
-- Time: 16:01
-- To change this template use File | Settings | File Templates.
--
-- RC4
-- http://en.wikipedia.org/wiki/RC4
local function KSA(key)
local key_len = string.len(key)
local S = {}
local key_byte = {}
for i = 0, 255 do
S[i] = i
e... | phpor/luaexample | crypto/rc4.lua | Lua | apache-2.0 | 2,000 |
-- mapgen.lua
-- Map generator algorithms and related functions.
local Terrain = require "lua/terrain"
local Mapgen = {}
-- Mapgen.fill - fills the whole map with a single terrain tile
-- map: the map to work on
-- tile: which tile to fill the map with
function Mapgen.fill(map, tile)
for i = 1, map.width do
... | deveah/zmeura | lua/mapgen.lua | Lua | bsd-2-clause | 2,274 |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0190-resumption-data-error-handling.md
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0188-get-inte... | smartdevicelink/sdl_atf_test_scripts | test_scripts/Resumption/Handling_errors_from_HMI/048_Same_RPC_IVD_RAI2_after_erroneous_response_from_HMI.lua | Lua | bsd-3-clause | 2,897 |
ENT.Type = "anim"
ENT.Base = "base_anim"
--------------------------------------------------
--
--------------------------------------------------
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "Rank")
end
--------------------------------------------------
--
-----------------------------------------------... | T3hArco/skeyler-gamemodes | sslobby/entities/entities/info_entry/shared.lua | Lua | bsd-3-clause | 463 |
local _path = ({...})[1]:gsub("%.init", "")
require( _path .. '.middleclass' )
| josh-perry/VNEngine | kikito-middleclass/init.lua | Lua | mit | 80 |
--[[
Copyright 2014-2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | rjeli/luvit | deps/dgram.lua | Lua | apache-2.0 | 2,390 |
add_rules("mode.debug", "mode.release")
add_requires("libxmake", {debug = is_mode("debug")})
target("${TARGETNAME}")
add_rules("xmake.cli")
add_files("src/lni/*.c")
add_packages("libxmake")
${FAQ} | waruqi/xmake | xmake/templates/c/xmake.cli/project/xmake.lua | Lua | apache-2.0 | 209 |
--
-- test_gmake2_file_rules.lua
-- Validate the makefile source building rules.
-- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project
--
local suite = test.declare("gmake2_file_rules")
local p = premake
local gmake2 = p.modules.gmake2
--
-- Setup
--
local wks, prj
function suite.setu... | tvandijck/premake-core | modules/gmake2/tests/test_gmake2_file_rules.lua | Lua | bsd-3-clause | 7,350 |
local meta = FindMetaTable("Entity")
local black = Color(0, 0, 0, 255)
local white = Color(255, 255, 255, 200)
local red = Color(128, 30, 30, 255)
function meta:drawOwnableInfo()
if LocalPlayer():InVehicle() then return end
-- Look, if you want to change the way door ownership is drawn, don't edit this file, ... | guillaume144/jeu-rp | gamemode/modules/doorsystem/cl_doors.lua | Lua | mit | 4,946 |
stds = stds or ... -- set stds if this script is called by another config script
local empty = { }
local read_write = {read_only = false}
stds.nodemcu_libs = {
read_globals = {
adc = {
fields = {
INIT_ADC = empty,
INIT_VDD33 = empty,
force_init_mode = empty,
read = empty,
... | nodemcu/nodemcu-firmware | tools/luacheck_config.lua | Lua | mit | 21,733 |
-- test suite for ljsyscall.
-- TODO stop using globals for tests
arg = arg or {}
local strict = require "test.strict"
local helpers = require "test.helpers"
local assert = helpers.assert
local S
local tmpabi
local short
if arg[1] == "rumplinuxshort" then short, arg[1] = true, "rumplinux" end -- don't run Linux ... | jsitnicki/rushit | vendor/github.com/justincormack/ljsyscall/test/test.lua | Lua | apache-2.0 | 89,311 |
--[[lit-meta
name = "creationix/weblit-cors"
version = "2.0.0"
description = "The logger middleware To add uncionditional CORS headers."
tags = {"weblit", "middleware", "cors"}
license = "MIT"
author = { name = "Tim Caswell" }
homepage = "https://github.com/creationix/weblit/blob/master/libs/weblit-cors.l... | DBReinitialized/SafeGuard | src/SGWebServices/deps/weblit-cors.lua | Lua | mit | 516 |
--
-- tests/config/test_targetinfo.lua
-- Test the config object's build target accessor.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("config_targetinfo")
local config = premake.config
--
-- Setup and teardown
--
local wks, prj
function suite.setup()
_ACTION... | prapin/premake-core | tests/config/test_targetinfo.lua | Lua | bsd-3-clause | 5,055 |
#!/usr/bin/env th
require 'torch'
require 'nn'
require 'dpnn'
torch.setdefaulttensortype('torch.FloatTensor')
local cmd = torch.CmdLine()
cmd:text()
cmd:text('Print network table.')
cmd:text()
cmd:text('Options:')
cmd:option('-modelDef', '/home/bamos/repos/openface/models/openface/nn4.small2.def.lua', 'Path to mode... | cmusatyalab/openface | util/print-network-table.lua | Lua | apache-2.0 | 845 |
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local ip = require "luci.ip"
local math = require "math"
local util = require "luci.util"
local tonumber, tostring, type, unpack, select = tonumber, tostring, type, unpack, select
... | Hostle/luci | modules/luci-base/luasrc/cbi/datatypes.lua | Lua | apache-2.0 | 7,855 |
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- F I N A L C U T P R O A P I --
-----------------------------------------------------------------------------... | cailyoung/CommandPost | src/extensions/cp/apple/finalcutpro/main/Inspector/InfoInspector/init.lua | Lua | mit | 2,118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.