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 |
|---|---|---|---|---|---|
u-engine/uEngine | premake5.lua | 1 | 17773 | -- https://github.com/premake/premake-core/wiki
local action = _ACTION or ""
-- require "XCode"
-- require "premake-android/android"
require "3rdparty/premake-androidmk/androidmk"
print (premake.path);
solution "chihuahua"
location ("_project")
configurations { "Debug", "Release" }
platform... | mit |
Sticklord/oUF | elements/assistant.lua | 7 | 2427 | --[[ Element: Assistant Icon
Toggles visibility of `self.Assistant` based on the units raid officer status.
Widget
Assistant - Any UI widget.
Notes
The default assistant icon will be applied if the UI widget is a texture and
doesn't have a texture or color defined.
Examples
-- Position and size
local... | mit |
galnegus/Glaskross | lib/sperm/loveframes/objects/grid.lua | 3 | 9518 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2013 Kenny Shields --
--]]------------------------------------------------
-- grid object
local newobject = loveframes.NewObject("grid", "loveframes_object_grid", true)
--[[------------------------------... | mit |
ArchShaman/Zero-K | scripts/nanoaim.h.lua | 15 | 2783 | -------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
--
-- Author: jK @ 2010
--
-- How to use:
--
-- 1. Add to the start of your script: include "nanoaim.h.lua"
-- 2. After you define your piec... | gpl-2.0 |
jokerdevv/Joker-Developer | plugins/me.lua | 4 | 1132 | --[[
# For More Information ....!
# Developer : Aziz < @devss_bot > #Dev
# our channel: @help_tele
]]
do
local function run(msg, matches)
if matches[1] == 'ุดูู ุงูู' then
if is_sudo(msg) then
send_document(get_receiver(msg), "./files/me/sudo.webp", ok_cb, false)
return"ูู ู
ู ุงูุช ู
ุญุฏ ู
ุณูููู ูุฏูุชฺฏ ๏ฟฝ... | gpl-2.0 |
crazyboy11/orgbot | plugins/admin.lua | 230 | 6382 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
ArchShaman/Zero-K | effects/feature_poof.lua | 22 | 1425 | -- feature_poof
return {
["feature_poof_spawner"] = {
poof01 = {
air = true,
class = [[CExpGenSpawner]],
count = [[10]],
ground = true,
properties = {
delay = [[i1 x0.1d]],
damage = [[d1]],... | gpl-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/tests/lua-tests/src/ParticleTest/ParticleTest.lua | 10 | 43736 |
local SceneIdx = -1
local MAX_LAYER = 42
local emitter = nil
local background = nil
local labelAtlas = nil
local titleLabel = nil
local subtitleLabel = nil
local baseLayer_entry = nil
local s = cc.Director:getInstance():getWinSize()
local function backAction()
SceneIdx = SceneIdx - 1
if SceneIdx < 0 then
... | mit |
lowne/hammerspoon | extensions/base64/init.lua | 18 | 1412 | --- === hs.base64 ===
---
--- Base64 encoding and decoding
---
--- Portions sourced from (https://gist.github.com/shpakovski/1902994).
local module = require("hs.base64.internal")
-- private variables and methods -----------------------------------------
-- Public interface -----------------------------------------... | mit |
rj1061/ds-ga-1008-a2 | models/sample.lua | 2 | 1464 | require 'nn'
local vgg = nn.Sequential()
-- building block
local function ConvBNReLU(nInputPlane, nOutputPlane)
vgg:add(nn.SpatialConvolution(nInputPlane, nOutputPlane, 3,3, 1,1, 1,1))
vgg:add(nn.SpatialBatchNormalization(nOutputPlane,1e-3))
vgg:add(nn.ReLU(true))
return vgg
end
-- Will use "ceil" MaxPooling... | mit |
hacker44-h44/1456 | plugins/search_youtube.lua | 674 | 1270 | do
local google_config = load_from_file('data/google.lua')
local function httpsRequest(url)
print(url)
local res,code = https.request(url)
if code ~= 200 then return nil end
return json:decode(res)
end
local function searchYoutubeVideos(text)
local url = 'https://www.googleapis.com/youtube/v3/search?'
u... | gpl-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/cocos/scripting/lua-bindings/auto/api/ActionManager.lua | 6 | 2041 |
--------------------------------
-- @module ActionManager
-- @extend Ref
--------------------------------
-- @function [parent=#ActionManager] getActionByTag
-- @param self
-- @param #int int
-- @param #cc.Node node
-- @return Action#Action ret (return value: cc.Action)
--------------------------------
-- @... | mit |
ArchShaman/Zero-K | units/spideranarchid.lua | 6 | 3732 | unitDef = {
unitname = [[spideranarchid]],
name = [[Anarchid]],
description = [[Riot EMP Spider]],
acceleration = 0.26,
brakeRate = 0.78,
buildCostMetal = 250,
buildPic = [[spideremp.png]],
canGuard = t... | gpl-2.0 |
DBReinitialized/PigBot | Source/RobloxLibraries/LuaSignals.lua | 1 | 1807 | --[[
PigBot Services
RobloxLibraries/LuaSignals ver 0.1.0
Handles
Change Log:
[452017a]
- Initial publication
Help us improve PigBot Services! Contribute to our source at our public GitHub:
https://github.com/DBReinitialized/PigBot
]]
local luaSignal = {}
local dependancies = {}
dependancies.S... | mit |
jokerdevv/Joker-Developer | plugins/replay.lua | 8 | 4083 | --[[
# For More Information ....!
# Developer : Aziz < @devss_bot > #Dev
# our channel: @help_tele
]]
do
ws = {}
rs = {}
-- some examples of how to use this :32
ws[1] = "ุงูุณูุงู
ุนูููู
" -- msg
rs[1] = "ูุนูููู
ุงูุณูุงู
ูุฑุญู
ุฉ ุงููู ููุง ุงุบุงุชู" -- reply
ws[2] = "ุจูุณูู" -- msg
rs[2] = "ู
ูููุงุญ ูุฏูู ูุฑุจูโค๏ธ๐" --... | gpl-2.0 |
ArchShaman/Zero-K | scripts/aimPosTerraform.lua | 8 | 1244 | function SetupAimPosTerraform(defaultMid, defaultAim, minAimOffset, maxAimOffset, cliffPeek, searchRange)
local baseX,_,baseZ = Spring.GetUnitPosition(unitID)
baseHeight = Spring.GetGroundHeight(baseX, baseZ)
if baseHeight < 0 and UnitDefs[unitDefID].floatOnWater then
baseHeight = 0
end
local updateTime = 1000... | gpl-2.0 |
mrbangi/t_e_l_e_b_o_t | plugins/boobs.lua | 731 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
mixflowtech/logsensor | src/lib/hash/murmur.lua | 15 | 6965 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- Implementation of the MurmurHash3 hash function according to the
-- reference implementation
-- https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp
--
-- This implementation does not include the variant MurmurMash3_x86... | apache-2.0 |
jchuang1977/my_luci | applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua | 76 | 2144 | --[[
Luci diag - Diagnostics controller module
(c) 2009 Daniel Dickinson
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
]]--
module("luci.cont... | apache-2.0 |
phi-psi/luci | modules/rpc/luasrc/jsonrpcbind/uci.lua | 81 | 1914 | --[[
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
ht... | apache-2.0 |
brahmi2/prosody-modules | mod_auth_custom_http/mod_auth_custom_http.lua | 32 | 1346 | -- Prosody IM
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local new_sasl = require "util.sasl".new;
local json_encode = require "util.json";
local http = require "socket.http";
local options = module:get... | mit |
ArchShaman/Zero-K | scripts/commsupport.lua | 12 | 16403 | include "constants.lua"
local spSetUnitShieldState = Spring.SetUnitShieldState
-- pieces
local base = piece 'base'
local pelvis = piece 'pelvis'
local turret = piece 'turret'
local torso = piece 'torso'
local head = piece 'head'
local armhold = piece 'armhold'
local ruparm = piece 'ruparm'
local rarm = piece '... | gpl-2.0 |
ashemedai/ProDBG | bin/win32/scripts/tundra/nodegen.lua | 20 | 26246 | module(..., package.seeall)
local unitgen = require "tundra.unitgen"
local util = require "tundra.util"
local path = require "tundra.path"
local depgraph = require "tundra.depgraph"
local buildfile = require "tundra.buildfile"
local native = require "tundra.native"
local ide_backend = nil
local curre... | mit |
ArchShaman/Zero-K | scripts/striderbantha.lua | 4 | 11373 | include "constants.lua"
-- body
local pelvis = piece "pelvis"
local body = piece "body"
local head = piece "head"
local headflare = piece "headflare"
local torso = piece "torso"
local lmissiles = piece "lmissiles"
local rmissiles = piece "rmissiles"
local lmissileflare = piece "lmissileflare"
local rmissileflare = pie... | gpl-2.0 |
acmiyaguchi/data-pipeline | hindsight/io_modules/derived_stream/tsv.lua | 5 | 1274 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local M = {}
local ipairs = ipairs
local tostring = tostring
local type = type
local read_message = re... | mpl-2.0 |
jchuang1977/my_luci | applications/luci-asterisk/luasrc/asterisk/cc_idd.lua | 92 | 7735 | --[[
LuCI - Asterisk - International Direct Dialing Prefixes and Country Codes
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
]]--
module "luci.asteri... | apache-2.0 |
TelTOP/TeleStar22 | bot/utils.lua | 473 | 24167 | 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 |
phi-psi/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk/dialzones.lua | 91 | 3529 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Jo-Philipp Wich <xm@subsignal.org>
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
$Id: trunks.l... | apache-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/camera_lockcamera.lua | 6 | 21078 | -- $Id$
local versionNumber = "v2.8"
function widget:GetInfo()
return {
name = "LockCamera",
desc = versionNumber .. " Allows you to lock your camera to another player's camera.\n"
.. "/luaui lockcamera_interval to set broadcast interval (minimum 0.25 s).",
author = "Evil4Zerggin",
date = "16 January 2009... | gpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/gui_lasso_terraform.lua | 4 | 55161 | function widget:GetInfo()
return {
name = "Lasso Terraform GUI",
desc = "Interface for lasso terraform.",
author = "Google Frog",
version = "v1",
date = "Nov, 2009",
license = "GNU GPL, v2 or later",
layer = 999, -- Before Chili
enabled = true,
handler = true,
}
end
in... | gpl-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/tests/lua-tests/src/XMLHttpRequestTest/XMLHttpRequestTest.lua | 5 | 5853 | require("json")
local function XMLHttpRequestLayer()
local layer = cc.Layer:create()
local winSize = cc.Director:getInstance():getWinSize()
local margin = 40
local space = 35
local function init()
local label = cc.Label:createWithTTF("XML Http Request Test", s_arialPath, 28)
label... | mit |
badboyam/mr | bot/SaTaN_bot.lua | 2 | 10021 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '2'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return... | gpl-2.0 |
Paaskehare/SurvivalTD | game/survival_td/scripts/vscripts/mechanics.lua | 1 | 1471 | -- Ground/Air Attack mechanics
function FindEnemiesInRadius( unit, radius )
local team = unit:GetTeamNumber()
local position = unit:GetAbsOrigin()
local target_type = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC
local flags = DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE
re... | mit |
kristiankaufmann/wrk | deps/luajit/src/jit/dis_ppc.lua | 88 | 20319 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | apache-2.0 |
brahmi2/prosody-modules | mod_s2s_auth_fingerprint/mod_s2s_auth_fingerprint.lua | 31 | 1380 | -- Copyright (C) 2013-2014 Kim Alvefur
-- This file is MIT/X11 licensed.
module:set_global();
local digest_algo = module:get_option_string(module:get_name().."_digest", "sha1");
local fingerprints = {};
local function hashprep(h)
return tostring(h):gsub(":",""):lower();
end
local function hashfmt(h)
return h:gsu... | mit |
mrbangi/t_e_l_e_b_o_t | plugins/img_google.lua | 660 | 3196 | do
local mime = require("mime")
local google_config = load_from_file('data/google.lua')
local cache = {}
--[[
local function send_request(url)
local t = {}
local options = {
url = url,
sink = ltn12.sink.table(t),
method = "GET"
}
local a, code, headers, status = http.request(options)
return tabl... | gpl-2.0 |
Shayan123456/botttttt8 | plugins/img_google.lua | 660 | 3196 | do
local mime = require("mime")
local google_config = load_from_file('data/google.lua')
local cache = {}
--[[
local function send_request(url)
local t = {}
local options = {
url = url,
sink = ltn12.sink.table(t),
method = "GET"
}
local a, code, headers, status = http.request(options)
return tabl... | gpl-2.0 |
azukiapp/lua-pry | lib/pry.lua | 1 | 26344 | #!/usr/bin/env lua
--
-- pry.lua
--
-- A more friendly Lua interactive prompt
-- doesn't need '='
-- will print out tables recursively
--
-- create another environment, _E, to help prevent coding mistakes
local g = _G
local _E = {}
g.setmetatable(_E, {
__index = g,
__newindex = function(t,k,v)
return g... | apache-2.0 |
amirilk22333322/uzzbot | plugins/domaintools.lua | 359 | 1494 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function check(name)
local api = "https://domainsearch.p.mashape.com/index.php?"... | gpl-2.0 |
Sticklord/oUF | elements/resting.lua | 7 | 1820 | --[[ Element: Resting Icon
Toggles visibility of the resting icon.
Widget
Resting - Any UI widget.
Notes
The default resting icon will be used if the UI widget is a texture and doesn't
have a texture or color defined.
Examples
-- Position and size
local Resting = self:CreateTexture(nil, 'OVERLAY')
... | mit |
jchuang1977/my_luci | applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua | 30 | 2105 | --[[
LuCI - Lua Configuration Interface
Copyright 2012 Christian Gagneraud <chris@techworks.ie>
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
$Id$
]]... | apache-2.0 |
ArchShaman/Zero-K | scripts/hoverassault.lua | 1 | 5511 | local base = piece 'base'
local shield = piece 'shield'
local turret = piece 'turret'
local gun = piece 'gun'
local flare1 = piece 'flare1'
local flare2 = piece 'flare2'
local wakes = {}
for i = 1, 8 do
wakes[i] = piece ('wake' .. i)
end
local ground1 = piece 'ground1'
local door1 = piece 'door1'
local door2 ... | gpl-2.0 |
Shayan123456/botttttt8 | plugins/webshot.lua | 919 | 1473 | local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
method = "GET",
sink = ltn12.sink.table(response_body),
header... | gpl-2.0 |
amirilk22333322/uzzbot | plugins/time.lua | 771 | 2865 | -- 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 |
rashed8271/bot | plugins/moderation.lua | 42 | 30441 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ยท__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
ArchShaman/Zero-K | effects/grav.lua | 17 | 3193 | -- grav
return {
["grav"] = {
drag = {
air = true,
class = [[CSimpleParticleSystem]],
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[1 .5 1 .1 0 0 0 0]],
direct... | gpl-2.0 |
ralic/wireshark | epan/wslua/console.lua | 13 | 3481 | -- console
-- A console and a window to execute commands in lua
--
-- (c) 2006 Luis E. Garcia Ontanon <luis@ontanon.org>
--
-- Wireshark - Network traffic analyzer
-- By Gerald Combs <gerald@wireshark.org>
-- Copyright 1998 Gerald Combs
--
-- This program is free software; you can redistribute it and/or
-- modify it un... | gpl-2.0 |
ArchShaman/Zero-K | scripts/jumpaa.lua | 16 | 9072 | --linear constant 65536
--modified from Argh\'s PURE Artillery Shell Script
include "constants.lua"
include "JumpRetreat.lua"
local base, hips, torso = piece('base', 'hips', 'torso')
local launcher, rflare, rblast, lflare, lblast, cflare, cblast = piece('launcher', 'rflare', 'rblast', 'lflare', 'lblast', 'cflare', 'c... | gpl-2.0 |
phi-psi/luci | applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua | 52 | 8016 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
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
htt... | apache-2.0 |
sinavafa/ERRORTG | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
amirilk22333322/uzzbot | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
dschoeffm/MoonState | examples/helloBye2Server.lua | 1 | 2206 | --- Layer 2 reflector, swaps src and dst MACs and echoes the packet
local lm = require "libmoon"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
local lacp = require "proto.lacp"
local helloBye = require "helloBye2Server"
local arp = require "proto.arp"
-- IP of ... | bsd-3-clause |
ArchShaman/Zero-K | units/spiderskirm.lua | 5 | 3678 | unitDef = {
unitname = [[spiderskirm]],
name = [[Recluse]],
description = [[Skirmisher Spider (Indirect Fire)]],
acceleration = 0.26,
brakeRate = 0.78,
buildCostMetal = 280,
buildPic = [[spiderskirm.png]],
canGuard ... | gpl-2.0 |
Shayan123456/botttttt8 | 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 |
Paaskehare/SurvivalTD | game/survival_td/scripts/vscripts/abilities/trojan_horse.lua | 1 | 1246 | -- Trojan Horse Servants created by Azarak
function HorseVisualInit(event)
local horse = event.caster
local ability = event.ability
local rotation = 90
local offset = 100
local horseDir = horse:GetForwardVector()
for i =1,4 do
local spawnPos = horse:GetAbsOrigin()
local rotationDir = RotatePosition(V... | mit |
jchuang1977/my_luci | modules/base/luasrc/model/firewall.lua | 84 | 11156 | --[[
LuCI - Firewall model
Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
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 applica... | apache-2.0 |
mixflowtech/logsensor | src/apps/lwaftr/ctable_wrapper.lua | 2 | 2612 | module(..., package.seeall)
local ctable = require('lib.ctable')
local math = require("math")
local os = require("os")
local S = require("syscall")
local bit = require("bit")
local bnot, bxor = bit.bnot, bit.bxor
local floor, ceil = math.floor, math.ceil
local HASH_MAX = 0xFFFFFFFF
-- This is only called when the ta... | apache-2.0 |
phi-psi/luci | applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua | 141 | 1038 | --[[
smap_devinfo - SIP Device Information
(c) 2009 Daniel Dickinson
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
$Id$
]]--
require("luci.i18n")
re... | apache-2.0 |
scholzd/MoonGen | test/testlib.lua | 8 | 5249 | -- Testlib.lua Library
-- Provides a set of master functions for the test framework.
-- Requires a valid config.lua to work.
-- Requires luaunit to deliver correct test results.
-- Some slaves need to return a boolean value for correct test results.
-- masterPairX-functions effectively execute each slave twice with sw... | mit |
erwincoumans/premake-dev-iphone-xcode4 | tests/solution/test_eachconfig.lua | 1 | 1765 | --
-- tests/solution/test_eachconfig.lua
-- Automated test suite for the solution-level configuration iterator.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.solution_eachconfig = { }
local suite = T.solution_eachconfig
--
-- Setup and teardown
--
local sln
function suite.setup()
sln = solu... | bsd-3-clause |
LinusU/nn | Euclidean.lua | 24 | 5711 | local Euclidean, parent = torch.class('nn.Euclidean', 'nn.Module')
function Euclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- state
self.gradInput:resize(inputSize)
self.output:resize(o... | bsd-3-clause |
scholzd/MoonGen | rfc2544/utils/testreport.lua | 9 | 7504 | local utils = require "utils.utils"
local mod = {}
mod.__index = mod
local texHdr = [[
\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{longtable,tabu}
\usepackage[margin=1in]{geometry}
\renewcommand{\thesubsection}{\arabic{subsection}}
\begin{document}
\section*{RFC 2544 Test Report}
]... | mit |
galnegus/Glaskross | lib/sperm/loveframes/objects/progressbar.lua | 3 | 8018 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2013 Kenny Shields --
--]]------------------------------------------------
-- progressbar object
local newobject = loveframes.NewObject("progressbar", "loveframes_object_progressbar", true)
--[[---------... | mit |
ioiasff/poi | 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 |
phi-psi/luci | modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 9 | 15436 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
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
htt... | apache-2.0 |
scholzd/MoonGen | rfc2544/benchmarks/frameloss.lua | 9 | 11801 | package.path = package.path .. "rfc2544/?.lua"
local standalone = false
if master == nil then
standalone = true
master = "dummy"
end
local dpdk = require "dpdk"
local memory = require "memory"
local device = require "device"
local ts = require "timestamping"
local filter = require... | mit |
jokerdevv/Joker-Developer | plugins/h1.lua | 4 | 2431 | do
local function run(msg, matches)
if is_momod(msg) and matches[1]== "h 1" then
return [[
ุงูุงูุงู
ุฑ ุงูุนุงู
ู ุงู ุงูุฑุฆูุณูุฉ
รรรรรรรรรรรรรรรรรร
โ๏ธ Group Promote commands
โ setadmin : ุฑูุน ุงุฏู
ู ูู ุงูู
ุฌู
ูุนุฉ
โ deadmin : ุญุฐู ุงุฏู
ู ูู ุงูู
ุฌูุนุฉ
โ promote : ุฑูุน ุงุฏู
ู
๐ญ demote : ุญุฐู ุงุฏู
ู
โ spromote : ุงุถุงูุฉ #ู
ุฏูุฑ
๐ญ modlist : ูุงุธูุงุฑ... | gpl-2.0 |
erwincoumans/premake-dev-iphone-xcode4 | src/base/action.lua | 1 | 3415 | --
-- action.lua
-- Work with the list of registered actions.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
premake.action = { }
--
-- The list of registered actions.
--
premake.action.list = { }
--
-- Register a new action.
--
-- @param a
-- The new action object.
--
function prema... | bsd-3-clause |
linearregression/sysdig | userspace/sysdig/chisels/v_spy_users.lua | 8 | 2137 | --[[
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 |
erwincoumans/premake-dev-iphone-xcode4 | src/actions/make/make_cpp.lua | 2 | 8910 | --
-- make_cpp.lua
-- Generate a C/C++ project makefile.
-- Copyright (c) 2002-2011 Jason Perkins and the Premake project
--
premake.make.cpp = { }
local cpp = premake.make.cpp
local make = premake.make
function premake.make_cpp(prj)
-- create a shortcut to the compiler interface
local cc = premake.gettool(p... | bsd-3-clause |
ArchShaman/Zero-K | units/factoryship.lua | 3 | 2547 | unitDef = {
unitname = [[factoryship]],
name = [[Shipyard]],
description = [[Produces Naval Units, Builds at 10 m/s]],
acceleration = 0,
brakeRate = 0,
buildCostMetal = Shared.FACTORY_COST,
builder = true,
buildopt... | gpl-2.0 |
ld-test/lua-smtps | moduleless.lua | 3 | 2907 | ------------------------------------------------------------------------
-- Copyright (C) 2012 Jay Kline
--
-- Adopted from LuaSec's https module
--
-- Author: Jay Kline
------------------------------------------------------------------------
local socket = require("socket")
local ssl = require("ssl")
local smtp ... | mit |
kgibm/problemdetermination | scripts/wireshark/tcpanomalies.lua | 1 | 21299 | -- Usage: tshark -q -r ${CAPTURE_FILE} -X lua_script:tcpanomalies.lua
--
-- tcpanomalies.lua: Find all TCP streams and:
-- 1) Print the time it takes for a response to a SYN (either direction). Modify minSynResponseDelta in script to only print those longer than X seconds,
-- 2) Print an ERROR if the response to a S... | apache-2.0 |
mixflowtech/logsensor | src/apps/test/match.lua | 12 | 2823 | module(...,package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local function dump (p)
return lib.hexdump(ffi.string(p.data, p.length))
end
Match = {
config = {
fuzzy = {}, modest = {}
}
}
function Match:new (conf)
return setmetatable({ fuzzy = conf.fuzzy,
... | apache-2.0 |
jchuang1977/my_luci | modules/base/luasrc/model/uci.lua | 86 | 10653 | --[[
LuCI - UCI model
Description:
Generalized UCI model
FileId:
$Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
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... | apache-2.0 |
danielg4/packages | utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx7.lua | 76 | 2091 | #!/usr/bin/lua
local json = require "cjson"
local function interpret_suffix(rate)
if rate ~= nil then
local value = string.sub(rate, 1, -2)
local suffix = string.sub(rate, -1)
if suffix == "K" then return tonumber(value) * 10^3 end
if suffix == "M" then return tonumber(value) * 10^6 end
if suffi... | gpl-2.0 |
mixflowtech/logsensor | src/lib/index_set.lua | 15 | 2598 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
--- index set object: keeps a set of indexed values
local NDX_mt = {}
NDX_mt.__index = NDX_mt
-- trivial constructor
function NDX_mt:new (max, name)
return setmetatable({
__nxt = 0,
__max = max,
__name = name,
}, se... | apache-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/tests/lua-tests/src/AssetsManagerTest/AssetsManagerTest.lua | 5 | 4588 | local targetPlatform = cc.Application:getInstance():getTargetPlatform()
local lineSpace = 40
local itemTagBasic = 1000
local menuItemNames =
{
"enter",
"reset",
"update",
}
local winSize = cc.Director:getInstance():getWinSize()
local function updateLayer()
local layer = cc.Layer:create()
local s... | mit |
ashemedai/ProDBG | bin/win32/scripts/tundra/syntax/files.lua | 20 | 1437 | module(..., package.seeall)
local decl = require "tundra.decl"
local depgraph = require "tundra.depgraph"
local common_blueprint = {
Source = {
Required = true,
Help = "Source filename",
Type = "string",
},
Target = {
Required = true,
Help = "Target filename",
Type = "string",
},
}... | mit |
lev1976g/NoxicCore | src/scripts/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 |
galnegus/Glaskross | lib/sperm/loveframes/objects/panel.lua | 3 | 3760 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2013 Kenny Shields --
--]]------------------------------------------------
-- panel object
local newobject = loveframes.NewObject("panel", "loveframes_object_panel", true)
--[[---------------------------... | mit |
Maxsteam/Test | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
phi-psi/luci | applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua | 80 | 1153 | --[[
LuCI - Lua Configuration Interface
(c) 2009 Daniel Dickinson
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
$Id$
]]--
require("luci.controller.l... | apache-2.0 |
phi-psi/luci | applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua | 78 | 7996 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
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
$Id$
]]--
lo... | apache-2.0 |
thiolliere/ligo | conf.lua | 1 | 2545 | function love.conf(t)
t.identity = nil -- The name of the save directory (string)
t.version = "0.9.1" -- The LรVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.window.title = "Ligo" -- The window title (string)
t.window.icon = nil -... | mit |
mixflowtech/logsensor | lib/ljsyscall/syscall/openbsd/fcntl.lua | 24 | 1202 | -- OpenBSD fcntl
-- TODO incomplete, lots missing
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
local funct... | apache-2.0 |
mixflowtech/logsensor | src/apps/bridge/flooding.lua | 14 | 1168 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- This class derives from lib.bridge.base and implements the simplest
-- possible bridge, which floods a packet arriving on a port to all
-- destination ports within its scope according to the split-horizon
-- topology.
module(..., packag... | apache-2.0 |
bbohling/keys | VSCOKeys.lrdevplugin/Utils.lua | 11 | 7411 | --[[----------------------------------------------------------------------------
VSCO Keys for Adobe Lightroom
Copyright (C) 2015 Visual Supply Company
Licensed under GNU GPLv2 (or any later version).
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | gpl-2.0 |
Phanx/oUF | ouf.lua | 2 | 14882 | local parent, ns = ...
local global = GetAddOnMetadata(parent, 'X-oUF')
local _VERSION = GetAddOnMetadata(parent, 'version')
local oUF = ns.oUF
local Private = oUF.Private
local argcheck = Private.argcheck
local print = Private.print
local error = Private.error
local styles, style = {}
local callback, objects, head... | mit |
LinusU/nn | ParallelCriterion.lua | 18 | 1309 | local ParallelCriterion, parent = torch.class('nn.ParallelCriterion', 'nn.Criterion')
function ParallelCriterion:__init(repeatTarget)
parent.__init(self)
self.criterions = {}
self.weights = {}
self.gradInput = {}
self.repeatTarget = repeatTarget
end
function ParallelCriterion:add(criterion, weight)
... | bsd-3-clause |
ArchShaman/Zero-K | effects/wolverine.lua | 25 | 3109 | -- wolvflash
-- wolvmuzzle1
-- wolvmuzzle0
return {
["wolvflash"] = {
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 0.9,
flashsize = 60,
ttl = 8,
color = {
[1] = 1,
[2] = 0.5,
[3] = 0,
... | gpl-2.0 |
ArchShaman/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 |
Lymia/CivV_Mod2DLC | src/patch/ui/lib/mppatch_softhook.lua | 3 | 2156 | -- Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.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, co... | mit |
ArchShaman/Zero-K | scripts/spideranarchid.lua | 16 | 4496 | include "constants.lua"
include "spider_walking.lua"
--------------------------------------------------------------------------------
-- pieces
--------------------------------------------------------------------------------
local body = piece 'body'
local turret = piece 'turret'
local gun = piece 'gun'
local flare... | gpl-2.0 |
ForgedAddons/StayFocused | tekKonfig/tekKonfigTopTab.lua | 5 | 2296 |
local lib, oldminor = LibStub:NewLibrary("tekKonfig-TopTab", 1)
if not lib then return end
oldminor = oldminor or 0
function lib:activatetab()
self.left:ClearAllPoints()
self.left:SetPoint("TOPLEFT")
self.left:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
self.middle:SetTexture("Interface\\Opt... | apache-2.0 |
mixflowtech/logsensor | lib/ljsyscall/syscall/linux/ppc64le/nr.lua | 18 | 10847 | -- ppc64le syscall numbers
local nr = {
zeropad = true,
SYS = {
restart_syscall = 0,
exit = 1,
fork = 2,
read = 3,
write = 4,
open = 5,
close = 6,
waitpid = 7,
c... | apache-2.0 |
ArchShaman/Zero-K | scripts/pw_dropfac.lua | 5 | 1466 | include "constants.lua"
local spGetUnitTeam = Spring.GetUnitTeam
--pieces
local base = piece("base")
local nano1, nano2 = piece("nano1", "nano2")
local build = piece("build")
--local vars
local nanoPieces = {nano1, nano2}
local nanoIdx = 1
local smokePiece = {base}
--opening animation
local function Open()
SetUnit... | gpl-2.0 |
DBReinitialized/PigBot | Source/deps/coro-spawn.lua | 6 | 2158 | --[[lit-meta
name = "creationix/coro-spawn"
version = "2.0.0"
dependencies = {
"creationix/coro-channel@2.0.0"
}
homepage = "https://github.com/luvit/lit/blob/master/deps/coro-spawn.lua"
description = "An coro style interface to child processes."
tags = {"coro", "spawn", "child", "process"}
license ... | mit |
ArchShaman/Zero-K | units/turretriot.lua | 5 | 3944 | unitDef = {
unitname = [[turretriot]],
name = [[Stardust]],
description = [[Anti-Swarm Turret]],
activateWhenBuilt = true,
buildCostMetal = 220,
builder = false,
buildingGroundDecalDecaySpeed =... | gpl-2.0 |
zhepama/rosa | src/engine/components/ImageDrawable.lua | 2 | 1238 | local rosa = require("__rosa")
local ImageDrawable = rosa.components.Drawable:extends()
ImageDrawable.__name = "ImageDrawable"
ImageDrawable.type = "drawable"
ImageDrawable.collect = true
function ImageDrawable:__init(entity)
ImageDrawable.super.__init(self, entity)
self.image = nil -- Resource referenc... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.