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 |
|---|---|---|---|---|---|
sfosafa/sfo | plugins/stats.lua | 866 | 4001 | do
-- Returns a table with `name` and `msgs`
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_prin... | gpl-2.0 |
zcsteele/turbo | turbo/http_response_codes.lua | 14 | 2456 | --- Turbo.lua HTTP Response code list.
--
-- Copyright John Abrahamsen 2011, 2012, 2013 < JhnAbrhmsn@gmail.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, in... | apache-2.0 |
dvv/luvit-websocket | lib/hixie76.lua | 2 | 4600 | --
-- http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76
--
local Utils = require('utils')
local Crypto = require('_crypto')
local Bit = require('bit')
local band, bor, bxor, rshift, lshift = Bit.band, Bit.bor, Bit.bxor, Bit.rshift, Bit.lshift
local String = require('string')
local sub, gsub, match, byte... | mit |
annulen/premake-dev-rgeary | tests/actions/vstudio/cs2005/test_flags.lua | 1 | 2947 | --
-- tests/actions/vstudio/cs2005/test_flags.lua
-- Test the build flags block of a Visual Studio 2005+ C# project.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.vstudio_cs2005_flags = {}
local suite = T.vstudio_cs2005_flags
local cs2005 = premake.vstudio.cs2005
local project = premake5.project... | bsd-3-clause |
dani-sj/mahdii | plugins/location.lua | 185 | 1565 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
KlonZK/Zero-K | lups/ParticleClasses/NanoLasers.lua | 11 | 11424 | -- $Id: NanoLasers.lua 3357 2008-12-05 11:08:54Z jk $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local NanoLasers = {}
NanoLasers.__in... | gpl-2.0 |
KlonZK/Zero-K | units/armcom1.lua | 2 | 8113 | unitDef = {
unitname = [[armcom1]],
name = [[Strike Commander]],
description = [[Mobile Assault Commander, Builds at 10 m/s]],
acceleration = 0.18,
activateWhenBuilt = true,
amphibious = [[1]],
autoHeal = 5,
brakeRate ... | gpl-2.0 |
annulen/premake-dev-rgeary | src/host/luajit-2.0/lib/dis_ppc.lua | 2 | 20319 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2012 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | bsd-3-clause |
annulen/premake | tests/actions/vstudio/vc2010/test_item_def_group.lua | 5 | 1562 | --
-- tests/actions/vstudio/vc2010/test_item_def_group.lua
-- Check the item definition groups, containing compile and link flags.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local suite = test.declare("vs2010_item_def_group")
local vc2010 = premake.vstudio.vc2010
local project = premake.project
... | bsd-3-clause |
jkeywo/KFactorioMods | k-core_0.1.0/stdlib/area/tile.lua | 12 | 4773 | --- Tile module
--- <p>A tile represents a 1x1 area on a surface in factorio
-- @module Tile
require 'stdlib/core'
require 'stdlib/area/position'
require 'stdlib/area/chunk'
Tile = {}
MAX_UINT = 4294967296
--- Calculates the tile coordinates for the position given
-- @param position to calculate the tile for
-- @r... | mit |
Karakaz/railway-painter | src/player/gui/color/ColorManager.lua | 1 | 1916 |
local ColorManager = {}
function ColorManager:createGui(parentElement)
self.parentElement = parentElement
self:updateColorController()
end
function ColorManager:updateColorController()
if remote.interfaces["color-picker"] then
self:updateController(RailwayPainterConstants.ColorControlle... | mit |
hacker44-h44/original | plugins/id.lua | 226 | 4260 | local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, result)
local re... | gpl-2.0 |
focusworld/biig | plugins/info.lua | 4 | 9318 | --[[
#
# Show users information in groups
#
# author: Arian < @mamaligod >
# our channel: @focus_team
# Version: 2016-04-02
#
# Features added:
# -- setrank on reply
# -- get users info with their IDs and @username
#
]]
do
local mamali = 179286096 --put your id here(BOT OWNER ID)
local function setrank(msg, name, v... | gpl-2.0 |
rockneurotiko/telegram-bot | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
hacker44-h44/original | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
ollpu/telegram-bot | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
lawnight/skynet | test/testredis2.lua | 82 | 1043 | local skynet = require "skynet"
local redis = require "redis"
local db
function add1(key, count)
local t = {}
for i = 1, count do
t[2*i -1] = "key" ..i
t[2*i] = "value" .. i
end
db:hmset(key, table.unpack(t))
end
function add2(key, count)
local t = {}
for i = 1, count do
... | mit |
RezaBlack/RezaTest05 | plugins/cpu.lua | 244 | 1893 | function run_sh(msg)
name = get_name(msg)
text = ''
-- if config.sh_enabled == false then
-- text = '!sh command is disabled'
-- else
-- if is_sudo(msg) then
-- bash = msg.text:sub(4,-1)
-- text = run_bash(bash)
-- else
-- text = name .. ' you... | gpl-2.0 |
ArthurF5/tfs1.0 | data/actions/scripts/other/windows.lua | 2 | 1682 | local windows = {
[5303] = 6448, [5304] = 6449, [6438] = 6436, [6436] = 6438,
[6439] = 6437, [6437] = 6439, [6442] = 6440, [6440] = 6442,
[6443] = 6441, [6441] = 6443, [6446] = 6444, [6444] = 6446,
[6447] = 6445, [6445] = 6447, [6448] = 5303, [6449] = 5304,
[6452] = 6450, [6450] = 6452, [6453] = 6451, [6451] = 645... | gpl-2.0 |
soumith/lzmq | examples/zap.lua | 15 | 1952 | local zmq = require "lzmq"
local zloop = require "lzmq.loop"
local function recv_zap(sok)
local msg, err = sok:recv_all()
if not msg then return nil, err end
local req = {
version = msg[1]; -- Version number, must be "1.0"
sequence = msg[2]; -- Sequence number of request
domain = msg... | mit |
KlonZK/Zero-K | units/wolverine_mine.lua | 2 | 4402 | unitDef = {
unitname = [[wolverine_mine]],
name = [[Claw]],
description = [[Wolverine Mine]],
acceleration = 0,
activateWhenBuilt = false,
brakeRate = 0,
buildCostEnergy = 0,
buildCostMetal = 0,
builder ... | gpl-2.0 |
Kamshak/LibK | lua/libk/3rdparty/glib/unicode/unicodecategorytable.lua | 1 | 158561 | GLib.Unicode.CategoryStage1 =
{
--[[ U+000000 ]] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16,
--[[ U+001000 ]] 17, 18, 19, 20, 21, 18, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
--[[ U+002000 ]] 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 34, 42, 43, 44, 45,... | mit |
thuehn/Minstrel-Blues | measurement/minstrel-measurement/tests/AccessPointRef.lua | 2 | 1207 |
require 'AccessPointRef'
local misc = require 'misc'
local ps = require ('posix.signal') --kill
local lpc = require 'lpc'
local posix = require ('posix') -- sleep
local pprint = require ('pprint')
pid_l, in_l, out_l = misc.spawn ( "lua", "bin/runLogger.lua", "/tmp/m.log", "--use_stdout" )
pid_n, in_n, out_n = misc.sp... | gpl-2.0 |
annulen/premake | tests/config/test_linkinfo.lua | 4 | 2402 | --
-- tests/config/test_linkinfo.lua
-- Test the config object's link target accessor.
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
--
local suite = test.declare("config_linkinfo")
local config = premake.config
--
-- Setup and teardown
--
local sln, prj
function suite.setup()
_ACTION = "t... | bsd-3-clause |
tunneff/tef | app/mod/lzmq/ffi/error.lua | 15 | 2429 | --
-- Author: Alexey Melnichuk <mimir@newmail.ru>
--
-- Copyright (C) 2013-2014 Alexey Melnichuk <mimir@newmail.ru>
--
-- Licensed according to the included 'LICENCE' document
--
-- This file is part of lua-lzqm library.
--
local ok, zmq = pcall(require, "lzmq")
if not ok then zmq = nil end
local errors
if zmq t... | lgpl-3.0 |
antispamspider/AntiSpam_Spider | plugins/addsudo.lua | 1 | 2630 | do
--— By @ali_ghoghnoos ;)
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local ali_ghoghnoos = 'user#id' ..100577715 --Put you id Here !
local chat = get_receiver(msg)
if is_momod(msg) then -- you can set it to is_owner(msg)
chat_... | gpl-2.0 |
thuehn/Minstrel-Blues | measurement/minstrel-measurement/tests/tshark.lua | 2 | 1753 | require ('misc')
local tshark_bin = "/usr/bin/tshark"
--local fname = "/home/denis/data-udp-07.04.2017-HT40-40-far-all.bak/tp4300/tp4300-14-4-10-10M-1.pcap"
--local fname = "/home/denis/data-udp-27.04.2017-C13-HT20-noani-ldpc/tp3600/tp3600-7-10-d10-10M-1.pcap"
local fname = "/home/denis/data-udp-27.04.2017-C13-HT20-an... | gpl-2.0 |
aedansilver/wowlikearcemuold | src/scripts/lua/LuaBridge/Stable Scripts/Azeroth/Karazhan/BOSS_Karazhan_Malchezaar.lua | 30 | 4212 | function Malchezaar_Hellfire(Unit, event, miscunit, misc)
print "Malchezaar Hellfire"
Unit:FullCastSpellOnTarget(43465,Unit:GetClosestPlayer())
Unit:SendChatMessage(11, 0, "BURN...")
end
function Malchezaar_Thrash(Unit, event, miscunit, misc)
print "Malchezaar Thrash"
Unit:FullCastSpell(21919)
Unit:SendChatMessa... | agpl-3.0 |
aedansilver/wowlikearcemuold | src/scripts/lua/Lua/0Misc/0LCF_Includes/LCF_Extra.lua | 18 | 5425 | --[[
* ArcEmu MMORPG Server
* Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
* Copyright (C) 2008-2010 <http://www.ArcEmu.org/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Softwa... | agpl-3.0 |
DipColor/joon12 | bot/utils.lua | 646 | 23489 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
finnoleary/love-edit | vi.lua | 1 | 4147 | vi = {
modename = "Vi",
COMMAND = 0,
COMMAND_GET = 1,
INSERT = 2,
VISUAL = 3,
VISUAL_LINE = 4,
command_line = "-- COMMAND --",
cursor = cursor_uno,
show_line_num = false,
maxlines = 25,
offset = 1,
col = {
back = {r=255, g=255, b=255},
num = {r=1, g=1, b=1},
text = {r=1, g=1, b=1},
stat = {r=1, g=1... | lgpl-2.1 |
creker/thrift | lib/lua/TJsonProtocol.lua | 42 | 18656 | --
-- 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 |
jnhwkim/dp | data/notmnist.lua | 4 | 6405 | ------------------------------------------------------------------------
--[[ NotMnist ]]--
-- http://yaroslavvb.blogspot.ca/2011/09/notmnist-dataset.html
-- http://yaroslavvb.com/upload/notMNIST/
-- A 500k+ example alternative to MNIST using unicode fonts.
--------------------------------------------------------------... | bsd-3-clause |
lawnight/skynet | work/server/watch.lua | 53 | 1286 | local skynet = require "skynet"
local netpack = require "netpack"
local CMD = {}
local SOCKET = {}
local gate
local agent = {}
function SOCKET.open(fd, addr)
skynet.error("New client from : " .. addr)
agent[fd] = skynet.newservice("agent")
skynet.call(agent[fd], "lua", "start", { gate = gate, client = fd, watchdog... | mit |
sdgdsffdsfff/Luawa | template.lua | 2 | 6030 | -- Luawa
-- File: template.lua
-- Desc: lhtml templating
local require = require
local tostring = tostring
local pcall = pcall
local loadstring = loadstring
local type = type
local table = table
local io = io
local ngx = ngx
local luawa = require('luawa.core')
local template = {
config = {
dir = ''
... | mit |
zcsteele/turbo | turbo/web.lua | 5 | 46887 | --- Turbo.lua Web Framework module.
-- API for asynchronous web services.
--
-- The Turbo.lua Web framework is modeled after the framework offered by
-- Tornado, which again is based on web.py (http://webpy.org/) and
-- Google's webapp (http://code.google.com/appengine/docs/python/tools/webapp/)
-- Some modifications h... | apache-2.0 |
shenzhe/redis-storage | deps/lua/src/jit/dis_mips.lua | 17 | 13222 | ----------------------------------------------------------------------------
-- LuaJIT MIPS disassembler module.
--
-- Copyright (C) 2005-2011 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
---------------------------------------------------------------------------... | bsd-3-clause |
annulen/premake-dev-rgeary | src/host/luajit-2.0/lib/dis_mips.lua | 17 | 13222 | ----------------------------------------------------------------------------
-- LuaJIT MIPS disassembler module.
--
-- Copyright (C) 2005-2011 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
---------------------------------------------------------------------------... | bsd-3-clause |
KlonZK/Zero-K | effects/gundam_artillery_explosion.lua | 25 | 3488 | -- artillery_explosion
return {
["artillery_explosion"] = {
dirt = {
count = 4,
ground = true,
properties = {
alphafalloff = 2,
alwaysvisible = true,
color = [[0.2, 0.1, 0.05]],
pos = [[r-25 r25, 0, ... | gpl-2.0 |
lawnight/skynet | lualib/skynet/remotedebug.lua | 24 | 5595 | local skynet = require "skynet"
local debugchannel = require "debugchannel"
local socketdriver = require "socketdriver"
local injectrun = require "skynet.injectcode"
local table = table
local debug = debug
local coroutine = coroutine
local sethook = debugchannel.sethook
local M = {}
local HOOK_FUNC = "raw_dispatch_m... | mit |
henry4k/LittleTanks | debugtools.lua | 1 | 1214 | local config = require 'config'
local Vector = require 'Vector'
local debugtools = {}
function debugtools.drawText()
local yOffset = 0
for key, value in pairs(debugtools.values) do
local text = ('%s: %s'):format(key, value)
love.graphics.print(text, 10, 10+yOffset)
yOffset = yOffset + 30
end
end
l... | mit |
soumith/lzmq | examples/perf2/lat_nomsg/remote_lat.lua | 15 | 1289 | local ZMQ_NAME = "lzmq"
local argc = select("#", ...)
local argv = {...}
if (argc < 3) or (argc > 4)then
print("usage: local_lat <bind-to> <message-size> <roundtrip-count> [ffi]")
return 1
end
local connect_to = argv [1]
local message_size = assert(tonumber(argv [2]))
local roundtrip_count = assert(tonum... | mit |
rockneurotiko/telegram-bot | plugins/id.lua | 23 | 1918 | local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, resu... | gpl-2.0 |
zzzaidddddd/zzaiddd | plugins/ar-broadcast.lua | 1 | 1393 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ (@zzaiddd) : المطور ▀▄ ▄▀
▀▄ ▄▀ (@zzzaiddd) : قناة ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄▀▀▄▄... | gpl-2.0 |
mbattersby/LiteMount | Tests/SavedVariables/issue-95-1.lua | 1 | 27987 | LiteMountDB = {
char = {
["Carlcaneus - Gorgonnash"] = {
configVersion = 3
},
["Ceftriaxon - Gorgonnash"] = {
configVersion = 5
},
["Dusselkuh - Eredar"] = {
configVersion = 5
},
["Etanercept - Gorgonnash"] = {
c... | gpl-2.0 |
KlonZK/Zero-K | LuaRules/Gadgets/game_disable_take.lua | 7 | 1601 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
KlonZK/Zero-K | effects/gundam_prettypop.lua | 26 | 1976 | -- prettypop
return {
["prettypop"] = {
groundflash = {
air = true,
alwaysvisible = true,
circlealpha = 0.0,
circlegrowth = 8,
flashalpha = 0.9,
flashsize = 20,
ground = true,
ttl = 17,
... | gpl-2.0 |
morynicz/pyroshark | test/lua/dissector.lua | 6 | 26512 | ----------------------------------------
-- script-name: dns_dissector.lua
-- author: Hadriel Kaplan <hadrielk at yahoo dot com>
-- Copyright (c) 2014, Hadriel Kaplan
-- This code is in the Public Domain, or the BSD (3 clause) license if Public Domain does not apply
-- in your country.
--
-- BACKGROUND:
-- This is an e... | gpl-2.0 |
dani-sj/danymahan | plugins/anti_flood.lua | 281 | 2422 | local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 5
local function kick_user(user_id, chat_id)
local chat = 'chat#id'..chat_id
local user = 'user#id'..user_id
chat_del_user(chat, user, function (data, success, result)
if success ~= 1 then
local text = 'I can\'t k... | gpl-2.0 |
henry4k/LittleTanks | control.lua | 1 | 2968 | --- @module control
--- Manages @{Controllable}s.
--
-- Each control is identified by a name and must be registered before use.
-- Controls are mapped to input devices using configuration values.
--
-- E.g. when registering a control called `jump`, the engine reads the config
-- key `control.jump` to determine the mapp... | mit |
KlonZK/Zero-K | units/corflak.lua | 4 | 6003 | unitDef = {
unitname = [[corflak]],
name = [[Cobra]],
description = [[Anti-Air Flak Gun]],
acceleration = 0,
brakeRate = 0,
buildAngle = 8192,
buildCostEnergy = 500,
buil... | gpl-2.0 |
showpad/debian-lsyncd | default-rsyncssh.lua | 2 | 7914 | --
-- default-rsyncssh.lua
--
-- Improved rsync - sync with rsync, but moves and deletes executed over ssh.
-- A (Layer 1) configuration.
--
-- Note:
-- this is infact just a configuration using Layer 1 configuration
-- like any other. It only gets compiled into the binary by default.
-- You can simply u... | gpl-2.0 |
ynezz/librs232 | bindings/lua/test.lua | 1 | 8245 | port_name = "/dev/ttyUSB0"
platform = "linux"
-- port_name = "COM1"
-- platform = "win32"
rs232 = require("luars232")
function time_stamp()
t = os.date("*t")
return string.format("[%02s.%02s.%s %02s:%02s:%02s] ",
t.day, t.month, t.year,
t.hour, t.min, t.sec)
end
oldprint = print
function myprint... | mit |
Kamshak/LibK | lua/libk/3rdparty/glib/resources/resource.lua | 1 | 2855 | local self = {}
GLib.Resources.Resource = GLib.MakeConstructor (self)
--[[
Events:
StateChanged (ResourceState state)
Fired when the resource state has changed.
]]
function self:ctor (namespace, id)
self.Namespace = namespace or "Default"
self.Id = id or "Unknown"
self.VersionHash = nil
self.State = GLib.... | mit |
findstr/mmorpg-demo | server/lualib/slaxml.lua | 1 | 8019 | --[=====================================================================[
v0.7 Copyright © 2013-2014 Gavin Kistner <!@phrogz.net>; MIT Licensed
See http://github.com/Phrogz/SLAXML for details.
--]=====================================================================]
local SLAXML = {
VERSION = "0.7",
_call = {
pi = ... | mit |
aedansilver/wowlikearcemuold | src/scripts/lua/LuaBridge/AUCHINDOUN/MANA_TOMBS/shaffar.lua | 13 | 4734 | --?!MAP=557
assert( include("manatombs.lua") , "Failed to load manatombs.lua")
local mod = require("DUNGEON_AUCHINDOUN.INSTANCE_MANATOMBS")
assert(mod)
module(mod._NAME..".SHAFFAR",package.seeall)
local self = getfenv(1)
WorldDBQuery("DELETE FROM ai_agents WHERE entry = 18344;")
function OnSpawn(unit)
for i = 1,3 do
... | agpl-3.0 |
KlonZK/Zero-K | LuaRules/Gadgets/unit_carrier_drones.lua | 3 | 23484 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
zzzaidddddd/zzaiddd | plugins/invite.lua | 43 | 1335 | do
local function callbackres(extra, success, result)
--vardump(result)
local user = 'user#id'..result.peer_id
local chat = 'chat#id'..extra.chatid
local channel = 'channel#id'..extra.chatid
if is_banned(result.id, extra.chatid) then
send_large_msg(chat, 'User is banned.')
send_large_msg(c... | gpl-2.0 |
alimashmamali/fff | plugins/help.lua | 2 | 4962 | do
function pairsByKeys(t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
morynicz/pyroshark | test/lua/pcre_sets.lua | 35 | 6911 | -- See Copyright Notice in the file lrexlib.h
local luatest = require "luatest"
local N = luatest.NT
local function norm(a) return a==nil and N or a end
local function fill (n, m)
local t = {}
for i = n, m, -1 do table.insert (t, i) end
return t
end
local function set_named_subpatterns (lib, flg)
return {
... | gpl-2.0 |
DarkFaceMonster/wowoldhand | 3.0/DeathKnight/DeathKnight.lua | 1 | 81695 | DeathKnight_ActionTable = nil;
DeathKnight_SaveData = nil;
DeathKnight_Data = nil;
local DeathKnight_Buttons = {};
DeathKnight_PlayerTalentInfoDatas = {};
local info = GetInterfaceInfo();
local mianyi1 = 0; -- 冰冷触摸
local plagueTime = 0; -- 上次传染时间
local plagueMode = 0; -- 是否允许传染
local plageRune = 0; -- 使用哪... | apache-2.0 |
thuehn/Minstrel-Blues | measurement/minstrel-measurement/tests/rc_stats.lua | 2 | 2482 |
require ('parsers/rc_stats_csv')
local stats_str1 = "CCK,LP,1,, 1.0M,120,10548,0.7,0.7,100.0,0.0,100.0,0,0,0,6,6,7,3,1.0"
local stats1 = parse_rc_stats_csv ( stats_str1 )
print ( stats1 )
assert ( stats1.mode == "CCK" )
assert ( stats1.guard == "LP" )
assert ( stats1.count == "1" )
assert ( stats1.best_rate == "" )
... | gpl-2.0 |
zzzaidddddd/zzaiddd | plugins/stats.lua | 22 | 4011 | do
-- Returns a table with `name` and `msgs`
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_prin... | gpl-2.0 |
KlonZK/Zero-K | units/neebcomm.lua | 8 | 2422 | unitDef = {
unitname = [[neebcomm]],
name = [[Neeb Comm]],
description = [[Ugly Turkey]],
acceleration = 0.2,
brakeRate = 0.205,
buildCostEnergy = 1200,
buildCostMetal = 1200,
buildDistance = 120,
builder = true,
buildopt... | gpl-2.0 |
lawnight/skynet | test/testbson.lua | 12 | 1411 | local bson = require "bson"
sub = bson.encode_order( "hello", 1, "world", 2 )
local function tbl_next(...)
print("--- next.a", ...)
local k, v = next(...)
print("--- next.b", k, v)
return k, v
end
local function tbl_pairs(obj)
return tbl_next, obj.__data, nil
end
local obj_a = {
__data = {
[1] = 2,
[3] = ... | mit |
KlonZK/Zero-K | LuaRules/Gadgets/unit_capture.lua | 2 | 20976 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Capture",
desc = "Handles Yuri Style Capture System",
author = "Google Frog",
... | gpl-2.0 |
annulen/premake | tests/base/test_table.lua | 18 | 1436 | --
-- tests/base/test_table.lua
-- Automated test suite for the new table functions.
-- Copyright (c) 2008-2013 Jason Perkins and the Premake project
--
local suite = test.declare("table")
local t
--
-- table.contains() tests
--
function suite.contains_OnContained()
t = { "one", "two", "three" }
test.istru... | bsd-3-clause |
ids1024/naev | dat/missions/neutral/cargo_rush.lua | 2 | 8305 | --[[
-- These are rush cargo delivery missions. They can be failed! But, pay is higher to compensate.
-- These missions require fast ships, but higher tiers may also require increased cargo space.
--]]
include "dat/scripts/cargo_common.lua"
include "dat/scripts/numstring.lua"
lang = naev.lang()
if lang == "es" ... | gpl-3.0 |
aceforeverd/vimrc | lua/aceforeverd/finder/init.lua | 1 | 5075 | -- Copyright (C) 2022 Ace <teapot@aceforeverd.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This pr... | gpl-3.0 |
ibroadfo/libluaunit | luaunit.lua | 8 | 10612 | --[[
luaunit.lua
Description: A unit testing framework
Homepage: http://phil.freehackers.org/luaunit/
Initial author: Ryu, Gwang (http://www.gpgstudy.com/gpgiki/LuaUnit)
Lot of improvements by Philippe Fremy <phil@freehackers.org>
Version: 1.3
License: X11 License, see LICENSE.txt
Changes between 1.3 and 1.2a:
- p... | mit |
emadni/uzzbot | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- seconds
local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name.... | gpl-2.0 |
Karakaz/railway-painter | src/player/gui/selection/GuiRuleSelectionBuilder.lua | 1 | 1613 |
local GuiRuleSelectionBuilder = {}
function GuiRuleSelectionBuilder:build()
self:addSelectionDropdown()
self:addSelectionButtons()
self:addNewButton()
end
function GuiRuleSelectionBuilder:addSelectionDropdown()
self.selection.selectionDropdown = self.parentElement.add{
type = "drop-down",
... | mit |
KlonZK/Zero-K | LuaRules/Gadgets/unit_nofriendlyfire.lua | 11 | 2424 | -- $Id: unit_nofriendlyfire.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "No Friendly Fire",
desc = "Add... | gpl-2.0 |
Karakaz/railway-painter | src/player/gui/settings/GuiRuleSettingsBuilder.lua | 1 | 2517 |
local GuiRuleSettingsBuilder = {}
function GuiRuleSettingsBuilder:createGui(parentElement)
self.settings.frame = parentElement.add{
type = "frame",
name = RPName("settings_frame"),
direction = "vertical"
}
self.settings.frame.style.visible = false
self.settings.frameTable = se... | mit |
sebastiangabl/pd2-bot-weapons | lua/copactionshoot.lua | 1 | 1693 | TeamAIActionShoot = class(CopActionShoot)
function TeamAIActionShoot:_setup_weapon()
if not self._weap_tweak or not self._w_usage_tweak then
return
end
self._automatic_weap = self._weap_tweak.auto and self._w_usage_tweak.autofire_rounds and true
self._reload_speed = HuskPlayerMovement:get_reload_animation_time(s... | gpl-3.0 |
lawnight/skynet | service/sharedatad.lua | 11 | 3325 | local skynet = require "skynet"
local sharedata = require "sharedata.corelib"
local table = table
local cache = require "skynet.codecache"
cache.mode "OFF" -- turn off codecache, because CMD.new may load data file
local NORET = {}
local pool = {}
local pool_count = {}
local objmap = {}
local collect_tick = 600
local ... | mit |
zzzaidddddd/zzaiddd | data/plugins/ar-broadcast.lua | 3 | 1483 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY Memo ▀▄ ▄▀
▀▄ ▄▀ BY Memo (@ii02iI) ▀▄ ▄▀
▀▄ ▄▀ ChannelDev (@Ch_dev) ▀▄ ▄▀
▀▄ ▄▀ Making the file by Memo ▀▄ ▄▀
▀▄ ... | gpl-2.0 |
e7/openresty_app | projects/sms/sendcode.lua | 1 | 4041 | local cjson = require("cjson");
local redis = require("resty.redis");
local misc = require("misc");
local sms_conf = require("rongle.sms_conf");
local iconv = require("iconv");
local main = function ()
local rsp = {};
ngx.header.content_type = "application/json";
-- ngx.header["Access-Control-Allow-Origi... | gpl-2.0 |
Kamshak/LibK | lua/libk/3rdparty/glib/networking/networkablehost.lua | 2 | 12143 | local self = {}
GLib.Networking.NetworkableHost = GLib.MakeConstructor (self)
--[[
Events:
ConnectionCreated (ConnectionNetworkable connectionNetworkable)
Fired when a connection has been created.
CustomPacketReceived (destinationId, InBuffer packet)
Fired when a custom packet has been received.
DispatchP... | mit |
annulen/premake-dev-rgeary | tests/test_string.lua | 84 | 1550 | --
-- tests/test_string.lua
-- Automated test suite for the new string functions.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
T.string = { }
--
-- string.endswith() tests
--
function T.string.endswith_ReturnsTrue_OnMatch()
test.istrue(string.endswith("Abcdef", "def"))
end
function T.strin... | bsd-3-clause |
chroteus/the-bridge-of-life | lib/hump/camera.lua | 3 | 3732 | --[[
Copyright (c) 2010-2013 Matthias Richter
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... | gpl-2.0 |
tunneff/tef | deps/luasocket/test/ftptest.lua | 26 | 3156 | local socket = require("socket")
local ftp = require("socket.ftp")
local url = require("socket.url")
local ltn12 = require("ltn12")
-- override protection to make sure we see all errors
--socket.protect = function(s) return s end
dofile("testsupport.lua")
local host, port, index_file, index, back, err, ret
local t ... | lgpl-3.0 |
KlonZK/Zero-K | LuaUI/i18nlib/i18n/variants.lua | 36 | 1195 | local variants = {}
local function reverse(arr, length)
local result = {}
for i=1, length do result[i] = arr[length-i+1] end
return result, length
end
local function concat(arr1, len1, arr2, len2)
for i = 1, len2 do
arr1[len1 + i] = arr2[i]
end
return arr1, len1 + len2
end
function variants.ancestry(... | gpl-2.0 |
ids1024/naev | dat/missions/empire/collective/ec03.lua | 11 | 5015 | --[[
Collective Distraction
Author: bobbens
minor edits by Infiltrator
Fourth mission in the collective mini campaign.
You must distract the collective forces by breaching into their systems
while a commando lands to monitor wireless.
]]--
lang = naev.lang()
if lang == "es" then
-- not tr... | gpl-3.0 |
KlonZK/Zero-K | scripts/armwin.lua | 4 | 3191 | local base, fan, cradle, flaot = piece('base', 'fan', 'cradle', 'flaot')
include "constants.lua"
local baseDirection
local smokePiece = {base}
local tau = math.pi*2
local pi = math.pi
local hpi = math.pi*0.5
local pi34 = math.pi*1.5
local UPDATE_PERIOD = 1000
local BUILD_PERIOD = 500
local turnSpeed = math.rad(20)... | gpl-2.0 |
zzzaidddddd/zzaiddd | data/plugins/dev.lua | 1 | 1378 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY Memo ▀▄ ▄▀
▀▄ ▄▀ BY Memo (@ii02iI) ▀▄ ▄▀
▀▄ ▄▀ ChannelDev (@Ch_dev) ▀▄ ▄▀
▀▄ ▄▀ Making the file by Memo ▀▄ ▄▀
▀▄ ... | gpl-2.0 |
ids1024/naev | dat/missions/shark/sh02_tapping.lua | 1 | 12194 | --[[
This is the third mission of the Shark's teeth campaign. The player has to take illegal holophone recordings in his ship.
Stages :
0) Way to Sirius world
1) Way to Darkshed
TODO: I didn't test the case when the player tries to do the mission with a freighter, and the case when the player... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Giddeus/npcs/Altar_of_Offerings.lua | 13 | 1712 | -----------------------------------
-- Area: Windurst Waters
-- NPC: Alter Of Offering
-- Involved in Quest: A Crisis in the Making
-- Working 100%
-- @zone = 145
-- @pos = -137 17 177
-----------------------------------
package.loaded["scripts/zones/Giddeus/TextIDs"] = nil;
-----------------------------... | gpl-3.0 |
AdamGagorik/darkstar | scripts/zones/Mount_Kamihr/Zone.lua | 30 | 1254 | -----------------------------------
--
-- Zone: Mount Kamihr
--
-----------------------------------
package.loaded["scripts/zones/Mount_Kamihr/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Mount_Kamihr/TextIDs");
-----------------------------------
--... | gpl-3.0 |
Hostle/luci | applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua | 56 | 3828 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("upnpd", luci.util.pcdata(translate("Universal Plug & Play")),
translate("UPnP allows clients in the local network to automatically configure the... | apache-2.0 |
yaoqi/Atlas | examples/tutorial-monitor.lua | 40 | 5362 | --[[ $%BEGINLICENSE%$
Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the
License.
This program is dis... | gpl-2.0 |
Wiladams/cream | core/bitutils.lua | 1 | 1315 |
local INT8_MAX = 0x7f;
local INT8_MIN = (-INT8_MAX - 1);
local UINT8_MAX = 0xff;
local INT16_MAX = 0x7fff;
local INT16_MIN = (-INT16_MAX - 1);
local UINT16_MAX = 0xffff;
local INT32_MAX = 0x7fffffff;
local INT32_MIN = (-INT32_MAX - 1);
local UINT32_MAX = 0xffffffff;
local INT64_MAX = 0x7ffffffff... | mit |
rinstrum/LUA-LIB | tests/network/telnet.lua | 2 | 1631 | -------------------------------------------------------------------------------
-- FTP test.
-- @author Pauli
-- @copyright 2014 Rinstrum Pty Ltd
-------------------------------------------------------------------------------
describe("Telnet #telnet", function ()
local net = require "tests.network"
for _, hos... | gpl-3.0 |
paritoshmmmec/kong | spec/plugins/basicauth/api_spec.lua | 9 | 3667 | local json = require "cjson"
local http_client = require "kong.tools.http_client"
local spec_helper = require "spec.spec_helpers"
describe("Basic Auth Credentials API", function()
local BASE_URL, credential, consumer
setup(function()
spec_helper.prepare_db()
spec_helper.start_kong()
end)
teardown(fun... | mit |
pprimm/nodemcu-lua-mqtt | mqtt_test.lua | 1 | 2768 | -- https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en
mqttOnline = false
mqttSubSuccess = false
COUNTER_CMD_UP = "up"
counterUp = true
COUNTER_MAX = 100
COUNTER_MIN = 0
counter = 0
-- timer vars
mainTimerId = 0 -- we have seven timers! 0..6
mainInterval = 1000 -- milliseconds
statusTimerID = 1
statusInter... | mit |
TrurlMcByte/docker-prosody | etc/prosody-modules/mod_swedishchef/mod_swedishchef.lua | 32 | 1690 | -- Copyright (C) 2009 Florian Zeitz
-- Copyright (C) 2009 Matthew Wild
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local trigger_string = module:get_option_string("swedishchef_trigger");
trigger_string = (trigger_string and trigger_string .. " "... | mit |
AdamGagorik/darkstar | scripts/zones/Upper_Jeuno/npcs/Collet.lua | 13 | 2362 | -----------------------------------
-- Area: Upper Jeuno
-- NPC: Collet
-- Involved in Quests: A Clock Most Delicate, Save the Clock Tower
-- @zone 244
-- @pos -44 0 107
-----------------------------------
package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil;
-----------------------------------
require("scripts/g... | gpl-3.0 |
sbuettner/kong | spec/plugins/mashape-analytics/alf_serializer_spec.lua | 2 | 3683 | local fixtures = require "spec.plugins.mashape-analytics.fixtures.requests"
local ALFSerializer = require "kong.plugins.log_serializers.alf"
-- @see http://lua-users.org/wiki/CopyTable
local function deepcopy(orig)
local copy = {}
if type(orig) == "table" then
for orig_key, orig_value in next, orig, nil do
... | mit |
mohammad25253/seed238 | plugins/Dictionary.lua | 58 | 1663 |
--[[
-- Translate text using Google Translate.
-- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello
--]]
do
function translate(source_lang, target_lang, text)
local path = "http://translate.google.com/translate_a/single"
-- URL query parameters
local p... | gpl-2.0 |
AdamGagorik/darkstar | scripts/zones/Abyssea-Tahrongi/npcs/qm14.lua | 17 | 1888 | -----------------------------------
-- Zone: Abyssea-Tahrongi
-- NPC: ???
-- Spawns: Glavoid
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/keyitems");
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(play... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.