repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278
values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15
values |
|---|---|---|---|---|---|
tianxiawuzhei/cocos-quick-lua | quick/framework/cc/ui/UIInput.lua | 3 | 7377 |
--[[
Copyright (c) 2011-2014 chukong-inc.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, di... | mit |
vladimir-kotikov/clink | clink/dll/git.lua | 4 | 2098 | --
-- Copyright (c) 2012 Martin Ridgers
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publ... | gpl-3.0 |
bizkut/BudakJahat | Libs/LibRangeCheck-2.0/LibRangeCheck-2.0.lua | 1 | 32626 | --[[
Name: LibRangeCheck-2.0
Revision: $Revision: 168 $
Author(s): mitch0
Website: http://www.wowace.com/projects/librangecheck-2-0/
Description: A range checking library based on interact distances and spell ranges
Dependencies: LibStub
License: Public Domain
]]
--- LibRangeCheck-2.0 provides an easy way to check for... | gpl-3.0 |
parhamhp/supersp | 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 |
tianxiawuzhei/cocos-quick-lua | quick/samples/statemachine/src/scenes/MainScene.lua | 2 | 6454 |
local MainScene = class("MainScene", function()
return display.newScene("MainScene")
end)
function MainScene:ctor()
-- create Finite State Machine
self.fsm_ = {}
cc.GameObject.extend(self.fsm_)
:addComponent("components.behavior.StateMachine")
:exportMethods()
self.fsm_:setupState... | mit |
kunkku/luaossl | regress/82-bn_prepops-null-deref.lua | 3 | 1643 | #!/usr/bin/env lua
--
-- The following code could trigger a NULL dereference.
--
-- bn_prepops(lua_State *L, BIGNUM **r, BIGNUM **a, BIGNUM **b, _Bool commute) {
-- ...
-- *b = checkbig(L, 2, &lvalue);
-- ...
-- }
--
-- bn_sqr(lua_State *L) {
-- BIGNUM *r, *a;
--
-- bn_prepops(L, &r, &a, NULL, 1);
-- ...... | mit |
saeqe/botele | 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 |
aperezdc/lua-eol | examples/nanovg-noise.lua | 2 | 1095 | #! /usr/bin/env lua
--
-- nanovg-noise.lua
-- Copyright (C) 2015 Adrian Perez <aperez@igalia.com>
--
-- Distributed under terms of the MIT license.
--
local eol = require "eol"
local nvg = require "modularize" {
"nanovg", prefix = "nvg", type_prefix = "NVG"
}
local inttype = eol.type(nvg.__library, "long int")
local... | mit |
Source-Saraya/S.R.A | plugins/addtime.lua | 1 | 4088 |
local function check_member_superrem2(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration removal
data[tostring(msg.to.id)] = nil
save_data(_config.modera... | gpl-3.0 |
mahdikord/baran | 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 |
anonymou3Team/hackedanonymous | 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 |
ufo2000/ufo2000 | script/lumikki.lua | 2 | 63417 | -- !!! Modified version of lumikki (added support for lua sources
-- syntax highlighting)
--
-- FILTERS.LUA Lumikki built-in filter functions
--
-- Note: This file should be read in by '-l filters.lua' as part of the Lua
-- command line to launch Lumikki. This in order to allow easy modifications
-- ... | gpl-2.0 |
TimVonsee/hammerspoon | extensions/applescript/init.lua | 13 | 2635 | --- === hs.applescript ===
---
--- Execute AppleScript code
---
--- This module is based primarily on code from the previous incarnation of Mjolnir by [Steven Degutis](https://github.com/sdegutis/).
local module = require("hs.applescript.internal")
-- private variables and methods ------------------------------------... | mit |
Olivine-Labs/luassert | src/formatters/init.lua | 1 | 6658 | -- module will not return anything, only register formatters with the main assert engine
local assert = require('luassert.assert')
local match = require('luassert.match')
local util = require('luassert.util')
local isatty, colors do
local ok, term = pcall(require, 'term')
isatty = io.type(io.stdout) == 'file' and ... | mit |
s0ph05/awesome | BatteryWidget/battery.lua | 1 | 1818 | local wibox = require("wibox")
local awful = require("awful")
local naughty = require("naughty")
function showBatteryWidgetPopup()
local save_offset = offset
naughty.notify({
text = awful.util.pread("acpi | cut -d, -f 2,3"),
title = "Battery status",
timeout = 5, hover_timeout = 0.5,
width = 160,
... | mit |
nyov/luakit | lib/lousy/widget/menu.lua | 8 | 8385 | -------------------------------------------------------------
-- @author Mason Larobina <mason.larobina@gmail.com> --
-- @copyright 2010 Mason Larobina --
-------------------------------------------------------------
-- Grab environment we need
local capi = { widget = widget }
local setm... | gpl-3.0 |
rasata/cardpeek | dot_cardpeek_dir/scripts/calypso/c376n3.lua | 15 | 44100 | --
-- This file is part of Cardpeek, the smart card reader utility.
--
-- Copyright 2009-2013 by Alain Pannetrat <L1L1@gmx.com>
--
-- Cardpeek 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... | gpl-3.0 |
dufferzafar/Project-Euler-Solutions | Problems 51-100/87.lua | 1 | 1260 | --[[
Problem No. 87
Numbers that can be expressed as the sum of a prime square, cube, and fourth power?
Saturday, February 04, 2012
]]--
--Sub Routines
function isPrime(x)
if (x%3 == 0) then return false
else
local f = 5;
while f <= math.floor(x^0.5) do
if (x%f) == 0 then return false end
i... | unlicense |
mqmaker/witi-openwrt | package/ramips/ui/luci-mtk/src/modules/rpc/luasrc/controller/rpc.lua | 70 | 4443 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | gpl-2.0 |
fengshao0907/Atlas-1 | lib/xtab.lua | 40 | 13591 | --[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2008, 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 |
silverhammermba/awesome | tests/examples/shims/screen.lua | 1 | 2662 | local gears_obj = require("gears.object")
local screen, meta = awesome._shim_fake_class()
screen.count = 1
local function create_screen(args)
local s = gears_obj()
s.data = {}
-- Copy the geo in case the args are mutated
local geo = {
x = args.x ,
y = args.y ,
... | gpl-2.0 |
mqmaker/witi-openwrt | package/ramips/ui/luci-mtk/src/libs/nixio/docsrc/nixio.lua | 151 | 15824 | --- General POSIX IO library.
module "nixio"
--- Look up a hostname and service via DNS.
-- @class function
-- @name nixio.getaddrinfo
-- @param host hostname to lookup (optional)
-- @param family address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param service service name or port (optional)
-- @return ... | gpl-2.0 |
cshore/luci | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua | 3 | 38983 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local wa = require "luci.tools.webadmin"
local nw = require "luci.model.network"
local ut = require "luci.util"
local nt = require "luci.sys".net
local fs = require "nixio.fs"
arg[1] = arg[1] or ""
m = Map("wi... | apache-2.0 |
kracwarlock/dp | feedback/compositefeedback.lua | 5 | 1613 | ------------------------------------------------------------------------
--[[ CompositeFeedback ]]--
-- Feedback
-- Composite of many Feedback components
------------------------------------------------------------------------
local CompositeFeedback, parent = torch.class("dp.CompositeFeedback", "dp.Feedback")
Composit... | bsd-3-clause |
cshore/luci | protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua | 17 | 1270 | -- Copyright 2016 David Thornley <david.thornley@touchstargroup.com>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local device, apn, pincode, username, password
local auth, ipv6
device = section:taboption("general", Value, "device", translate("Modem device"))
device.rmempty ... | apache-2.0 |
bigdogmat/wire | lua/entities/gmod_wire_simple_explosive.lua | 8 | 2407 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Simple Explosive"
ENT.WireDebugName = "Simple Explosive"
if CLIENT then return end -- No more client
local wire_explosive_delay = CreateConVar( "wire_explosive_delay", 0.2, FCVAR_ARCHIVE )
local wire_explosive_range = CreateConVar( "wir... | apache-2.0 |
FrisKAY/MineOS_Server | Beta/Printer.lua | 1 | 9182 |
------------------------------------------ Библиотеки -----------------------------------------------------------------
local component = require("component")
local colorlib = require("colorlib")
local event = require("event")
local gpu = component.gpu
local printer = component.printer3d
local hologram = component.h... | gpl-3.0 |
Movimento5StelleLazio/WebMCP | framework/env/ui/tag.lua | 3 | 1113 | --[[--
ui.tag{
tag = tag, -- HTML tag, e.g. "a" for <a>...</a>
attr = attr, -- table of HTML attributes, e.g. { class = "hide" }
content = content -- string to be HTML encoded, or function to be executed
}
This function writes a HTML tag into the active slot.
NOTE: ACCELERATED FUNCTION
Do not cha... | mit |
robert00s/koreader | frontend/apps/filemanager/filemanagerhistory.lua | 1 | 3855 | local ButtonDialog = require("ui/widget/buttondialog")
local CenterContainer = require("ui/widget/container/centercontainer")
local FileManagerBookInfo = require("apps/filemanager/filemanagerbookinfo")
local Font = require("ui/font")
local InputContainer = require("ui/widget/container/inputcontainer")
local Menu = requ... | agpl-3.0 |
bizkut/BudakJahat | Rotations/Warrior/Protection/ProtectionPanglo2.lua | 1 | 40854 | --Version 1.0.0
local rotationName = "Panglo2"
---------------
--- Toggles ---
---------------
local function createToggles()
-- Rotation Button
RotationModes = {
[1] = {mode = "Auto", value = 1, overlay = "Automatic Rotation", tip = "Enable Rotation", highlight = 1, icon = br.player.spell.thunderClap}... | gpl-3.0 |
robert00s/koreader | spec/unit/nickel_conf_spec.lua | 1 | 4417 | describe("Nickel configuation module", function()
local lfs, NickelConf
setup(function()
require("commonrequire")
lfs = require("libs/libkoreader-lfs")
NickelConf = require("device/kobo/nickel_conf")
end)
describe("Frontlight module", function()
it("should read value", f... | agpl-3.0 |
nielsutrecht/computercraft | hydraLogApi.lua | 1 | 1310 | local urlbase = "http://localhost:8080/reactor"
local headers = {
["Content-Type"] = "application/json"
}
if(not os.loadAPI("hydraApi")) then
error("Could not load hydraApi")
end
function getReactorInfo(reactor)
local info = {}
info['energy'] = reactor.getEnergyStored()
info['energyProduction'] =... | mit |
robert00s/koreader | frontend/ui/widget/closebutton.lua | 1 | 2073 | --[[--
Button widget that shows an "×" and handles closing window when tapped
Example:
local CloseButton = require("ui/widget/closebutton")
local parent_widget = OverlapGroup:new{}
table.insert(parent_widget, CloseButton:new{
window = parent_widget,
})
UIManager:show(parent_widget)
]]
lo... | agpl-3.0 |
FrisKAY/MineOS_Server | Beta/bufferNotOptimized.lua | 1 | 21823 |
-- Адаптивная загрузка необходимых библиотек и компонентов
local libraries = {
["component"] = "component",
["unicode"] = "unicode",
["image"] = "image",
["colorlib"] = "colorlib",
}
local components = {
["gpu"] = "gpu",
}
for library in pairs(libraries) do if not _G[library] then _G[library] = require(librarie... | gpl-3.0 |
bigdogmat/wire | lua/entities/gmod_wire_hdd.lua | 1 | 8647 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Flash EEPROM"
ENT.WireDebugName = "WireHDD"
if CLIENT then return end -- No more client
function ENT:OnRemove()
for k,v in pairs(self.CacheUpdated) do
file.Write(self:GetStructName(k),self:MakeFloatTable(self.Cache[k]))
end
end
functio... | apache-2.0 |
s0ph05/awesome | net.lua | 1 | 1339 | local naughty = require("naughty")
function readNetFile(adapter, ...)
local basepath = "/sys/class/net/"..adapter.."/"
for i, name in pairs({...}) do
file = io.open(basepath..name, "r")
if file then
local str = file:read()
file:close()
return str
end
end
end
function setMarkup(stri... | mit |
bigdogmat/wire | lua/effects/thruster_ring_grow.lua | 10 | 1652 |
EFFECT.Mat = Material( "effects/select_ring" )
/*---------------------------------------------------------
Initializes the effect. The data is a table of data
which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
local size = 16
self:SetCol... | apache-2.0 |
dufferzafar/Project-Euler-Solutions | Problems 1-50/27.lua | 1 | 1620 | --[[
Problem No. 27
Find a quadratic formula that produces the maximum number of primes for consecutive values of n.
Wednesday, January 25, 2012
]]--
--Global Declarations
local max = math.max
--The isPrime Function
local function isPrime(x)
if (x < 2) then return false
elseif (x==2) or (x==3) then ... | unlicense |
135yshr/Holocraft-server | world/Plugins/APIDump/Hooks/OnHopperPushingItem.lua | 44 | 1338 | return
{
HOOK_HOPPER_PUSHING_ITEM =
{
CalledWhen = "A hopper is pushing an item into another block entity. ",
DefaultFnName = "OnHopperPushingItem", -- also used as pagename
Desc = [[
This hook is called whenever a {{cHopperEntity|hopper}} transfers an {{cItem|item}} from its own
internal storage into an... | mit |
hleuwer/luayats | examples/pvlan-1.lua | 1 | 3792 | require "yats"
require "yats.stdlib"
require "yats.rstp"
require "yats.misc"
local function sdel(t,u,v)
if regression == true then
return u
end
if t == "r" then
return math.random(u,v)
elseif t == "c" then
return u
end
end
del = {
sdel("c", 10, 2000),
sdel("c", 10, 2000),
sdel("c", 10, ... | gpl-2.0 |
kracwarlock/dp | utils/torch.lua | 7 | 6666 | --useful for validating if an object is an instance of a class,
--even when the class is a super class.
--e.g pattern = "^torch[.]%a*Tensor$"
--typepattern(torch.Tensor(4), pattern) and
--typepattern(torch.DoubleTensor(5), pattern) are both true.
--typepattern(3, pattern)
function torch.typepattern(obj, pattern)
lo... | bsd-3-clause |
guard163/tarantool | test/app/cfg.test.lua | 4 | 5414 | #!/usr/bin/env tarantool
local tap = require('tap')
local test = tap.test('cfg')
local socket = require('socket')
local fio = require('fio')
test:plan(33)
--------------------------------------------------------------------------------
-- Invalid values
----------------------------------------------------------------... | bsd-2-clause |
Source-Saraya/S.R.A | plugins/lock_fwd.lua | 1 | 1201 | do
local function pre_procces(msg)
local hash = "lock:"..msg.to.id
if redis:get(hash)
and msg.fwd_from
and not is_momod(msg)
then
delete_msg(msg.id,ok_cb,true)
reply_msg(msg.id,"✋🏻😒ممنوع عمل اعادة توجيه اذا قمت/ي بعمل اعادة توجيه مرة ثانية سوف اقوم بطردك/ي من المجموعه ❌ ",ok_cb,true)
redis:... | gpl-3.0 |
krawthekrow/spike | forward/rewriting.lua | 1 | 8319 | local P = require("core.packet")
local L = require("core.link")
local Datagram = require("lib.protocol.datagram")
local Ethernet = require("lib.protocol.ethernet")
local IPV4 = require("lib.protocol.ipv4")
local IPV6 = require("lib.protocol.ipv6")
local GRE = require("lib.protocol.gre")
local TCP = require("lib.protoco... | mit |
4w/xtend | xfurniture/system/get_nodes.lua | 1 | 3534 | -- Checks node ID for dependency status
--
-- Checks if the provided node ID is the ID of a node from a mod that is in
-- xFurniture’s `depends.txt` file.
--
-- @param id The node ID to be checked
-- @return boolean `true` if it is from a mod as described, `false` if not
local is_in_depends = function (id)
fo... | gpl-3.0 |
dicebox/minetest-france | mods/locks/init.lua | 2 | 22561 |
--[[
Shared locked objects (Mod for MineTest)
Allows to restrict usage of blocks to a certain player or a group of
players.
Copyright (C) 2013 Sokomine
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licens... | gpl-3.0 |
hfjgjfg/shatel | 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 |
silverhammermba/awesome | lib/menubar/index_theme.lua | 4 | 5505 | ---------------------------------------------------------------------------
--- Class module for parsing an index.theme file
--
-- @author Kazunobu Kuriyama
-- @copyright 2015 Kazunobu Kuriyama
-- @release @AWESOME_VERSION@
-- @classmod menubar.index_theme
---------------------------------------------------------------... | gpl-2.0 |
tianxiawuzhei/cocos-quick-lua | libs/quick/framework/transition.lua | 20 | 19757 | --[[
Copyright (c) 2011-2014 chukong-inc.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | mit |
MonkeyFirst/DisabledBoneSlerpWithShadowedAnimation | bin/Data/LuaScripts/Utilities/ScriptCompiler.lua | 29 | 1247 | -- Script to recursively compile lua files located in specified rootFolder to luc (bytecode)
-- Usage: require "LuaScripts/Utilities/LuaScriptCompiler"
-- Set root folder containing lua files to convert
local rootFolder = "Data/LuaScripts/" -- Starting from bin folder
if not fileSystem:DirExists(rootFolder) then log:... | mit |
ChristopherBiscardi/kong | kong/resolver/access.lua | 2 | 7070 | local url = require "socket.url"
local cache = require "kong.tools.database_cache"
local stringy = require "stringy"
local constants = require "kong.constants"
local responses = require "kong.tools.responses"
local _M = {}
-- Take a public_dns and make it a pattern for wildcard matching.
-- Only do so if the public_d... | mit |
ChristopherBiscardi/kong | kong/resolver/handler.lua | 21 | 1037 | -- Kong resolver core-plugin
--
-- This core-plugin is executed before any other, and allows to map a Host header
-- to an API added to Kong. If the API was found, it will set the $backend_url variable
-- allowing nginx to proxy the request as defined in the nginx configuration.
--
-- Executions: 'access', 'header_filt... | mit |
wrxck/mattata | plugins/meme.lua | 2 | 12424 | --[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local meme = {}
local mattata = require('mattata')
function meme:init()
meme.commands = mattata.commands(self.info.username)
:command('meme')
:command('memegen').table
... | mit |
FrisKAY/MineOS_Server | lib/syntax.lua | 1 | 14502 | _G.buffer = require("doubleBuffering")
_G.unicode = require("unicode")
local syntax = {}
----------------------------------------------------------------------------------------------------------------------------------------
--Стандартные цветовые схемы
syntax.colorSchemes = {
midnight = {
background = 0x262626,... | gpl-3.0 |
LuaDist2/lzmq-ffi | test/lunit/console.lua | 19 | 3798 |
--[[--------------------------------------------------------------------------
This file is part of lunit 0.6.
For Details about lunit look at: http://www.mroth.net/lunit/
Author: Michael Roth <mroth@nessie.de>
Copyright (c) 2006-2008 Michael Roth <mroth@nessie.de>
Permission is hereby granted... | mit |
dschoeffm/MoonGen | interface/flow/instance.lua | 4 | 2016 | local Flow = {}
Flow.__index = Flow
local function separateUid(uid)
-- luacheck: globals read bit
return
bit.band(bit.rshift(uid, 24), 0xff),
bit.band(bit.rshift(uid, 16), 0xff),
bit.band(bit.rshift(uid, 8), 0xff),
bit.band(bit.rshift(uid, 0), 0xff)
end
function Flow:prepare(error, final)
self.isDynamic = ... | mit |
bigdogmat/wire | lua/entities/gmod_wire_light.lua | 10 | 7999 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Light"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.WireDebugName = "Light"
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "Glow" )
self:NetworkVar( "Float", 0, "Brightness" )
self:NetworkVar( "Float", 1, "Size" )
self:Network... | apache-2.0 |
rasata/cardpeek | dot_cardpeek_dir/scripts/vitale_2.lua | 17 | 5057 | --
-- This file is part of Cardpeek, the smartcard reader utility.
--
-- Copyright 2009-2013 by 'L1L1'
--
-- Cardpeek 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
-- (a... | gpl-3.0 |
asmagill/hammerspoon_asm | iokit/examples/iokit.lua | 1 | 1739 | local module = {}
local iokit = require("hs._asm.iokit")
module.idleTime = function()
local hid = iokit.servicesForClass("IOHIDSystem")[1]
local idle = hid:properties().HIDIdleTime
if type(idle) == "string" then idle = string.unpack("J", idle) end
return idle >> 30
end
module.vramSize = function()
... | mit |
wrxck/mattata | plugins/administration/trust.lua | 2 | 4129 | --[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local trust = {}
local mattata = require('mattata')
local redis = require('libs.redis')
function trust:init()
trust.commands = mattata.commands(self.info.username):command('tru... | mit |
arventwei/WioEngine | Tools/jamplus/src/luaplus/Src/Modules/socket/src/ltn12.lua | 71 | 8331 | -----------------------------------------------------------------------------
-- LTN12 - Filters, sources, sinks and pumps.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
------------------------------------------------------------------------... | mit |
dschoeffm/MoonGen | examples/netronome-packetgen/packetgen.lua | 4 | 59878 | --[[
Copyright (C) 2016 Netronome Systems, Inc. All rights reserved.
Description : Generates a bursty traffic pattern using the rules specified
below.
-- All packets generated will share the same source IP, source MAC and size
profile (fixed or IMIX).
-- The destination IP and... | mit |
xuminic/ezthumb | external/iup/srclua5/elem/menu.lua | 4 | 1517 | ------------------------------------------------------------------------------
-- Menu class
------------------------------------------------------------------------------
local ctrl = {
nick = "menu",
parent = iup.BOX,
subdir = "elem",
creation = "-",
callback = {
open_cb = "",
menuclose_cb = "",
... | gpl-3.0 |
dschoeffm/MoonGen | interface/init.lua | 4 | 2108 | local mg = require "moongen"
local log = require "log"
local base = debug.getinfo(1, "S").source:sub(2,-9) -- remove "init.lua"
package.path = ("%s;%s?.lua;%s?/init.lua"):format(package.path, base, base)
local Flow = require "flow"
local parse = require "flowparse"
local counter = require "counter"
lo... | mit |
ld-test/oil | lua/loop/component/wrapped.lua | 12 | 6490 | --------------------------------------------------------------------------------
---------------------- ## ##### ##### ###### -----------------------
---------------------- ## ## ## ## ## ## ## -----------------------
---------------------- ## ## ## ## ## ###### --------------------... | mit |
tianxiawuzhei/cocos-quick-lua | quick/samples/towerdefense/src/app/map/MapRuntime.lua | 2 | 14242 |
local MapEvent = require("app.map.MapEvent")
local MapConstants = require("app.map.MapConstants")
local Decoration = require("app.map.Decoration")
local ObjectBase = require("app.map.ObjectBase")
local math2d = require("math2d")
local MapRuntime = class("MapRuntime", function()
return display.newNod... | mit |
ZakariaRasoli/Venus | tg/tdcli.lua | 7 | 89156 | --[[
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 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be use... | gpl-3.0 |
robert00s/koreader | frontend/apps/filemanager/filemanagerfilesearcher.lua | 1 | 5762 | local CenterContainer = require("ui/widget/container/centercontainer")
local DocumentRegistry = require("document/documentregistry")
local Font = require("ui/font")
local InputDialog = require("ui/widget/inputdialog")
local InfoMessage = require("ui/widget/infomessage")
local InputContainer = require("ui/widget/contain... | agpl-3.0 |
ChargeIn/Charges-Sorted-Bags | ChargeSortedBags.lua | 1 | 34149 | -----------------------------------------------------------------------------------------------
-- Client Lua Script for ChargeSortedBags
-- Copyright (c) NCsoft. All rights reserved
-----------------------------------------------------------------------------------------------
--[[
todo:
SplittStack Funktion
TrashCan... | apache-2.0 |
interfaceware/iguana-web-apps | scratch/shared/server/simplewebserver.lua | 2 | 3156 | local server = {}
server.simplewebserver = {}
local ws = server.simplewebserver
local wsutils = require 'server.utils'
function ws.default()
return ws.template(app.config.approot..'/index.html', app.default())
end
-- Find the method for the action.
function ws.serveRequest(Data)
local R = net.http.parseRequest... | mit |
bigdogmat/wire | lua/entities/gmod_wire_expression2/core/custom/cl_constraintcore.lua | 9 | 3758 | language.Add("Undone_e2_axis", "Undone E2 Axis")
language.Add("Undone_e2_ballsocket", "Undone E2 Ballsocket")
language.Add("Undone_e2_winch", "Undone E2 Winch")
language.Add("Undone_e2_hydraulic", "Undone E2 Hydraulic")
language.Add("Undone_e2_rope", "Undone E2 Rope")
language.Add("Undone_e2_slider", "Undone E2 Slider"... | apache-2.0 |
Movimento5StelleLazio/WebMCP | framework/env/request/__init.lua | 2 | 2728 | request._status = nil
request._forward = nil
request._forward_processed = false
request._redirect = nil
request._absolute_baseurl = nil
request._is_404 = false
request._404_route = nil
request._force_absolute_baseurl = false
request._perm_params = {}
request._csrf_secret = nil
request._json_requests_allowed = false
re... | mit |
Movimento5StelleLazio/WebMCP | demo-app/locale/translations.de.lua | 2 | 2249 | #!/usr/bin/env lua
return {
["Admin"] = "Admin";
["Are you sure?"] = "Bist Du sicher?";
["Back"] = "Zurück";
["Copy protected"] = "Kopiergeschützt";
["Create new genre"] = "Neues Genre anlegen";
["Create new media type"] = "Neuen Medientyp anlegen";
["Create new medium"] = "Neues Medium anlegen";
["Create new user"] = ... | mit |
interfaceware/iguana-web-apps | Bed Monitor - 2.ADT In_to/main.lua | 2 | 1040 | require 'bedmonitor.db'
require 'node'
bedmonitor.db.init()
function main(Data)
local Hl7 = hl7.parse{vmd='app/bedmonitor/demo.vmd', data=Data}
local T = db.tables{vmd="app/bedmonitor/bedtables.vmd", name="ADT"}
local Db = bedmonitor.db.connect()
if Hl7.MSH[9][1]:nodeValue() == 'ADT' then
if H... | mit |
boundary/boundary-nagios-plugins | nagios_output_parser_test.lua | 1 | 1694 | -- Copyright 2014 Boundary,Inc.
--
-- 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 or agreed to in... | apache-2.0 |
cpascal/skynet | lualib/skynet/manager.lua | 72 | 1923 | local skynet = require "skynet"
local c = require "skynet.core"
function skynet.launch(...)
local addr = c.command("LAUNCH", table.concat({...}," "))
if addr then
return tonumber("0x" .. string.sub(addr , 2))
end
end
function skynet.kill(name)
if type(name) == "number" then
skynet.send(".launcher","lua","REMO... | mit |
tianxiawuzhei/cocos-quick-lua | quick/framework/cocos2dx/NodeEx.lua | 1 | 15871 | --[[
Copyright (c) 2011-2014 chukong-inc.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | mit |
arventwei/WioEngine | Tools/jamplus/src/luaplus/Src/Modules/socket/test/ltn12test.lua | 12 | 8625 | local ltn12 = require("ltn12")
dofile("testsupport.lua")
local function format(chunk)
if chunk then
if chunk == "" then return "''"
else return string.len(chunk) end
else return "nil" end
end
local function show(name, input, output)
local sin = format(input)
local sout = format(output... | mit |
tst2005/hate | hate/init.lua | 2 | 11746 | local current_folder = (...):gsub('%.[^%.]+$', '') .. "."
local ffi = require "ffi"
local sdl = require(current_folder .. "sdl2")
local opengl = require(current_folder .. "opengl")
local flags
local hate = {
_LICENSE = "HATE is distributed under the terms of the MIT license. See LICENSE.md.",
_URL = "https://githu... | mit |
arventwei/WioEngine | Tools/jamplus/tests/helloworld/test.lua | 1 | 2752 | function Test()
-- Test for a clean directory.
local originalFiles =
{
'Jamfile.jam',
'file.c',
'main.c',
}
local originalDirs =
{
}
RunJam{ 'clean' }
TestDirectories(originalDirs)
TestFiles(originalFiles)
if Platform == 'win32' then
-- First build
local pattern = [[
*** found 18 target(s)...
**... | mit |
cshore/luci | applications/luci-app-coovachilli/luasrc/model/cbi/coovachilli_network.lua | 79 | 1459 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local sys = require"luci.sys"
local ip = require "luci.ip"
m = Map("coovachilli")
-- tun
s1 = m:section(TypedSection, "tun")
s1.anonymous = true
s1:option(... | apache-2.0 |
TimVonsee/hammerspoon | extensions/inspect/init.lua | 11 | 10601 | --- === hs.inspect ===
---
--- Produce human-readable representations of Lua variables (particularly tables)
---
--- This extension is based on inspect.lua by Enrique García Cota
--- https://github.com/kikito/inspect.lua
local inspect ={
_VERSION = 'inspect.lua 3.0.0',
_URL = 'http://github.com/kikito/inspect.... | mit |
grimreaper/ValyriaTear | dat/maps/layna_forest/layna_forest_north_east_script.lua | 1 | 27958 | -- Set the namespace according to the map name.
local ns = {};
setmetatable(ns, {__index = _G});
layna_forest_north_east_script = ns;
setfenv(1, ns);
-- The map name, subname and location image
map_name = "Layna Forest"
map_image_filename = "img/menus/locations/layna_forest.png"
map_subname = ""
-- The music file use... | gpl-2.0 |
ld-test/oil | lua/loop/object/Exception.lua | 12 | 2141 | --------------------------------------------------------------------------------
---------------------- ## ##### ##### ###### -----------------------
---------------------- ## ## ## ## ## ## ## -----------------------
---------------------- ## ## ## ## ## ###### --------------------... | mit |
silverhammermba/awesome | spec/wibox/widget/base_spec.lua | 14 | 3351 | ---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2016 Uli Schlachter
---------------------------------------------------------------------------
local base = require("wibox.widget.base")
local no_parent = base.no_parent_I_know_what_I_am_doing
describe... | gpl-2.0 |
s0ph05/awesome | themes/default/theme.lua | 1 | 5028 | ---------------------------
-- Default awesome theme --
---------------------------
theme = {}
theme.font = "sans 8"
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
theme.bg_systray = theme.bg_normal
theme.fg_normal = "#... | mit |
rickvanbodegraven/nodemcu-firmware | app/cjson/lua/cjson/util.lua | 170 | 6837 | local json = require "cjson"
-- Various common routines used by the Lua CJSON package
--
-- Mark Pulford <mark@kyne.com.au>
-- Determine with a Lua table can be treated as an array.
-- Explicitly returns "not an array" for very sparse arrays.
-- Returns:
-- -1 Not an array
-- 0 Empty table
-- >0 Highest index ... | mit |
ld-test/oil | lua/loop/compiler/Expression.lua | 7 | 8937 | --------------------------------------------------------------------------------
---------------------- ## ##### ##### ###### -----------------------
---------------------- ## ## ## ## ## ## ## -----------------------
---------------------- ## ## ## ## ## ###### -----------------... | mit |
jonmaur/draggin-framework | src/draggin/physics.lua | 1 | 19698 | --[[
Copyright (c) 2014 Jon Maur
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, distribute, subl... | mit |
grimreaper/ValyriaTear | dat/tilesets/harrvah_house_interior.lua | 2 | 9907 | local ns = {};
setmetatable(ns, {__index = _G});
harrvah_house_interior = ns;
setfenv(1, ns);
file_name = "dat/tilesets/harrvah_house_interior.lua"
image = "img/tilesets/harrvah_house_interior.png"
num_tile_cols = 16
num_tile_rows = 16
-- The general walkability of the tiles in the tileset. Zero indicates walkable. O... | gpl-2.0 |
grimreaper/ValyriaTear | dat/tilesets/mountain_landscape.lua | 2 | 10238 | local ns = {};
setmetatable(ns, {__index = _G});
mountain_landscape = ns;
setfenv(1, ns);
file_name = "dat/tilesets/mountain_landscape.lua"
image = "img/tilesets/mountain_landscape.png"
num_tile_cols = 16
num_tile_rows = 16
autotiling = {}
autotiling[10] = "CrackedEarth"
autotiling[14] = "Pavers"
autotiling[15] = "Pa... | gpl-2.0 |
hleuwer/luayats | yats/compat.lua | 7 | 4074 | -------------------------------------------------------------------
-- Real globals
-- _ALERT
-- _ERRORMESSAGE
-- _VERSION
-- _G
-- assert
-- error
-- metatable
-- next
-- print
-- require
-- tonumber
-- tostring
-- type
-- unpack
-------------------------------------------------------------------
-- collectgarbage
--... | gpl-2.0 |
bigdogmat/wire | lua/wire/server/debuggerlib.lua | 15 | 5802 | local formatPort = {}
WireLib.Debugger = { formatPort = formatPort } -- Make it global
function formatPort.NORMAL(value)
return string.format("%.3f",value)
end
function formatPort.STRING(value)
return '"' .. value .. '"'
end
function formatPort.VECTOR(value)
return string.format("(%.1f,%.1f,%.1f)", value[1], value... | apache-2.0 |
kracwarlock/dp | data/mnist.lua | 1 | 5407 | ------------------------------------------------------------------------
--[[ Mnist ]]--
-- http://yann.lecun.com/exdb/mnist/
-- A simple but widely used handwritten digits classification problem.
------------------------------------------------------------------------
local Mnist, DataSource = torch.class("dp.Mnist", ... | bsd-3-clause |
arventwei/WioEngine | Tools/jamplus/src/luaplus/Src/Modules/luaexpat/src/lxp/lom.lua | 14 | 1422 | -- See Copyright Notice in license.html
-- $Id: lom.lua,v 1.6 2005/06/09 19:18:40 tuler Exp $
local lxp = require "lxp"
local tinsert, tremove = table.insert, table.remove
local assert, type, print = assert, type, print
local function starttag (p, tag, attr)
local stack = p:getcallbacks().stack
local newelement... | mit |
cpascal/skynet | lualib/snax/loginserver.lua | 42 | 5057 | local skynet = require "skynet"
require "skynet.manager"
local socket = require "socket"
local crypt = require "crypt"
local table = table
local string = string
local assert = assert
--[[
Protocol:
line (\n) based text protocol
1. Server->Client : base64(8bytes random challenge)
2. Client->Server : base64(8bytes... | mit |
akalend/tarantool-sql | sql.lua | 1 | 4202 | local string = require "std.string"
function parse_insert(sql)
local s1,s2 = string.match(sql, '[iI][nN][sS][Ee][Rr][tT] [iI][nN][tT][oO] *([%d%a]+) *[Vv][Aa][lL][Uu][Ee][Ss] ?%((.+)%)')
return {s1,s2}
end
function parse_values( values )
local res = string.split(values, ",")
if type(res) ~= 'table' then
erro... | mit |
dicebox/minetest-france | mods/moreblocks/redefinitions.lua | 2 | 1161 | --[[
More Blocks: redefinitions of default stuff
Copyright (c) 2011-2015 Calinou and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
-- Redefinitions of some default crafting recipes:
minetest.register_craft({
output = "default:sign_wall 4",
recipe = {
{"default:wood", "d... | gpl-3.0 |
Naliwe/IntelliJ_WowAddOnSupport | resources/Wow_sdk/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 1 | 4264 | --[[-----------------------------------------------------------------------------
Icon Widget
-------------------------------------------------------------------------------]]
local Type, Version = "Icon", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >=... | mit |
SinisterRectus/JC2MP-MazeGenerator | client/cMazeManager.lua | 1 | 1868 | class 'MazeManager'
function MazeManager:__init()
self.mazes = {}
self.triggers = {}
self.ceilings = true -- whether to construct maze ceilings
Events:Subscribe("ShapeTriggerEnter", self, self.TriggerEnter)
Events:Subscribe("ShapeTriggerExit", self, self.TriggerExit)
Events:Subscribe("WorldNetworkObjectCreat... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.