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
robert00s/koreader
spec/unit/cache_spec.lua
4
1555
describe("Cache module", function() local DocumentRegistry, Cache, DEBUG local doc local max_page = 1 setup(function() require("commonrequire") DocumentRegistry = require("document/documentregistry") Cache = require("cache") DEBUG = require("dbg") local sample_pd...
agpl-3.0
quill18/ProjectPorcupine
Assets/StreamingAssets/LUA/RoomBehavior.lua
36
3668
------------------------------------------------------- -- Project Porcupine Copyright(C) 2016 Team Porcupine -- This program comes with ABSOLUTELY NO WARRANTY; This is free software, -- and you are welcome to redistribute it under certain conditions; See -- file LICENSE, which is part of this source code package, for ...
gpl-3.0
cshore/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
68
1180
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.disk", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) return { { title = "%H: Disk I/O operations on %pi", vlab...
apache-2.0
daned33/nodemcu-firmware
lua_examples/yet-another-ds18b20.lua
79
1924
------------------------------------------------------------------------------ -- DS18B20 query module -- -- LICENCE: http://opensource.org/licenses/MIT -- Vladimir Dronnikov <dronnikov@gmail.com> -- -- Example: -- dofile("ds18b20.lua").read(4, function(r) for k, v in pairs(r) do print(k, v) end end) ------------------...
mit
tupperkion/computercraft-programs
encryption.lua
1
7189
local function decimalToBinary(n) local left = n local max = 128 local current = max local result = {} repeat result[#result + 1] = (left >= current and "1" or "0") left = left >= current and left - current or left current = current / 2 until current < 1 return table.concat(result) end local function bina...
mit
tianxiawuzhei/cocos-quick-lua
libs/quick/framework/cc/utils/Gettext.lua
21
3518
--[[ Load a mo file, retuan a lua function or table. A sample and description(in chinese): http://zengrong.net/post/1986.htm @see http://lua-users.org/lists/lua-l/2010-04/msg00005.html Modifier zrong(zengrong.net) Creation 2013-11-29 usage: local mo_data=assert(require("utils.Gettext").loadMOFromFile("main.mo")...
mit
NSAKEY/prosody-modules
mod_s2s_auth_monkeysphere/mod_s2s_auth_monkeysphere.lua
32
1870
module:set_global(); local http_request = require"socket.http".request; local ltn12 = require"ltn12"; local json = require"util.json"; local json_encode, json_decode = json.encode, json.decode; local gettime = require"socket".gettime; local serialize = require"util.serialization".serialize; local msva_url = assert(os...
mit
dicebox/minetest-france
minetest/builtin/common/filterlist.lua
2
9943
--Minetest --Copyright (C) 2013 sapier -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU Lesser General Public License as published by --the Free Software Foundation; either version 2.1 of the License, or --(at your option) any later version. -- --This program is ...
gpl-3.0
jugglerchris/textredux
examples/init.lua
2
1734
-- Copyright 2011-2012 Nils Nordman <nino at nordman.org> -- Copyright 2012-2014 Robert Gieseke <rob.g@web.de> -- License: MIT (see LICENSE) --[[ This directory contains a few examples that show how to build text based interfaces with the modules in `textredux.core`. When Textredux is installed you can paste the foll...
mit
4w/xtend
xfurniture/furniture/couches.lua
1
4580
local _register = _xtend.mods.xfurniture.register local _p2r = _xtend.mods.xfurniture.pattern_to_recipe for node in pairs(_xtend.mods.xfurniture.nodes) do ---------------------------------------------------------------------------- _register('couch_frame_u', { name = _xtend.translate('Couch U Frame'),...
gpl-3.0
bigdogmat/wire
lua/entities/gmod_wire_button.lua
1
4524
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire Button" ENT.WireDebugName = "Button" function ENT:SetupDataTables() self:NetworkVar( "Bool", 0, "On" ) end if CLIENT then local halo_ent, halo_blur function ENT:Initialize() self.PosePosition = 0.0 end function ENT:Think() b...
apache-2.0
ioiasff/qrt
plugins/qr.lua
637
1730
--[[ * qr plugin uses: * - http://goqr.me/api/doc/create-qr-code/ * psykomantis ]] local function get_hex(str) local colors = { red = "f00", blue = "00f", green = "0f0", yellow = "ff0", purple = "f0f", white = "fff", black = "000", gray = "ccc" } for color, value in pairs(colors)...
gpl-2.0
robert00s/koreader
frontend/device/input.lua
1
21627
local Event = require("ui/event") local TimeVal = require("ui/timeval") local input = require("ffi/input") local DEBUG = require("dbg") local logger = require("logger") local _ = require("gettext") local Key = require("device/key") local GestureDetector = require("device/gesturedetector") local framebuffer = require("f...
agpl-3.0
ProtectiveTeam/protectiveBot
bot/protectivebot.lua
1
9983
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
GarfieldJiang/UGFWithToLua
Assets/ToLua/ToLua/Lua/socket/url.lua
16
11058
----------------------------------------------------------------------------- -- URI parsing, composition and relative URL resolution -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- --------------------------------------------------------------...
mit
dicebox/minetest-france
mods/farming/hoes.lua
4
3457
local S = farming.intllib -- Hoe registration function farming.register_hoe = function(name, def) -- Check for : prefix (register new hoes in your mod's namespace) if name:sub(1,1) ~= ":" then name = ":" .. name end -- Check def table if def.description == nil then def.description = "Hoe" end if def.in...
gpl-3.0
cshore/luci
protocols/luci-proto-3g/luasrc/model/cbi/admin_network/proto_3g.lua
52
4346
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local device, apn, service, pincode, username, password, dialnumber local ipv6, maxwait, defaultroute, metric, peerdns, dns, keepalive_failure, keepalive_interval, demand d...
apache-2.0
kracwarlock/dp
test/testDataset.lua
7
1918
require 'chex' local ffi = require 'ffi' require 'gfx.js' dataset = chex.dataset{paths={'../../toyset'}, sampleSize={3,256,226}} print('Saving to test.t7') torch.save('test.t7', dataset) print('Class names', dataset.classes) print('Total images in dataset: ' .. dataset:size()) print('Training size: ' .. dataset:size...
bsd-3-clause
xuminic/ezthumb
external/iup/srclua5/elem/backgroundbox.lua
2
1075
------------------------------------------------------------------------------ -- BackgroundBox class ------------------------------------------------------------------------------ local ctrl = { nick = "backgroundbox", parent = iup.BOX, subdir = "elem", creation = "I", funcname = "BackgroundBox", callback...
gpl-3.0
s0ph05/awesome
vicious/widgets/mem.lua
15
1850
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Adrian C. <anrxc@sysphere.org> -- * (c) 2009, Lucas de Vries <lucas@glacicle.com> --------------------------------------------------- -- {{{ Grab environment local io = { lines = io.lines } local se...
mit
Relintai/Relintais-Enemy-Kooldown-Tracker-WotLK
lib/CallbackHandler-1.0/CallbackHandler-1.0.lua
4
8961
--[[ $Id: CallbackHandler-1.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ ]] local MAJOR, MINOR = "CallbackHandler-1.0", 5 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -...
mit
mqmaker/witi-openwrt
package/ramips/ui/luci-mtk/src/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
78
1934
--[[ Luci configuration model for statistics - collectd email plugin configuration (c) 2008 Freifunk Leipzig / 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...
gpl-2.0
tupperkion/computercraft-programs
newType.lua
1
17200
local function dostring(...) return loadstring(...) end do local _G = getfenv(0) -- foolproof _G variable local rawType = type local rawTostring = tostring local uuid = "" local protectedEnv = {} local rawOs = os local firstSetfenv = setfenv local envMeta = {__index = function(t, i) return _G[i] end, __newind...
mit
siktirmirza/seed
plugins/inrealm.lua
850
25085
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
bigdogmat/wire
lua/wire/timedpairs.lua
17
3271
-- Timedpairs by Grocel. (Rewrite by Divran) -- It allows you to go through long tables, but without game freezing. -- Its like a for-pairs loop. -- -- How to use: -- WireLib.Timedpairs(string unique name, table, number ticks done at once, function tickcallback[, function endcallback, ...]) -- -- tickcallback is called...
apache-2.0
bizkut/BudakJahat
Rotations/Priest/Discipline/DisciplineAuraV2.lua
1
94772
local rotationName = "Aura" -------------- --- COLORS --- -------------- local colorGreen = "|cff00FF00" local colorRed = "|cffFF0000" local colorWhite = "|cffFFFFFF" --------------- --- Toggles --- --------------- local function createToggles() -- Cooldown Button CooldownModes = { [1] = {mode = "Auto...
gpl-3.0
adamel/sysdig
userspace/sysdig/chisels/common.lua
2
6833
--[[ 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
tianxiawuzhei/cocos-quick-lua
quick/cocos/cocos2d/Cocos2dConstants.lua
1
15966
cc = cc or {} cc.SPRITE_INDEX_NOT_INITIALIZED = 0xffffffff cc.TMX_ORIENTATION_HEX = 0x1 cc.TMX_ORIENTATION_ISO = 0x2 cc.TMX_ORIENTATION_ORTHO = 0x0 cc.Z_COMPRESSION_BZIP2 = 0x1 cc.Z_COMPRESSION_GZIP = 0x2 cc.Z_COMPRESSION_NONE = 0x3 cc.Z_COMPRESSION_ZLIB = 0x0 cc.BLEND_DST = 0x303 cc.BLEND_SRC = 0x1...
mit
hleuwer/luayats
examples/test-1-src.lua
1
4518
require "yats.stdlib" require "yats.core" require "yats.src" require "yats.muxdmx" require "yats.misc" -- Example test-1.lua: Derived from yats example 'tst'. -- -- cbrsrc_1 --> |\ /|--> line_1 --> sink_1 -- cbrsrc_2 --> | | | |--> line_2 --> sink_2 -- cbrsrc_3 --> | | -->| |--> line_3 --> sink_3 -- cbrsrc_4 -...
gpl-2.0
tianxiawuzhei/cocos-quick-lua
quick/framework/cc/utils/Timer.lua
19
4779
local scheduler = require(cc.PACKAGE_NAME .. ".scheduler") --[[-- Timer 实现了一个计时器容器,用于跟踪应用中所有需要计时的事件。 ]] local Timer = {} --[[-- 创建一个计时器。 **Returns:** - Timer 对象 ]] function Timer.new() local timer = {} cc(timer):addComponent("components.behavior.EventProtocol"):exportMethods() ---- local ha...
mit
robert00s/koreader
frontend/optmath.lua
5
1502
--[[-- Simple math helper functions ]] local Math = {} function Math.roundAwayFromZero(num) if num > 0 then return math.ceil(num) else return math.floor(num) end end function Math.round(num) return math.floor(num + 0.5) end function Math.oddEven(number) if number % 2 == 1 then ...
agpl-3.0
robert00s/koreader
frontend/device/android/device.lua
2
1671
local Generic = require("device/generic/device") local _, android = pcall(require, "android") local ffi = require("ffi") local logger = require("logger") local function yes() return true end local function no() return false end local Device = Generic:new{ model = "Android", hasKeys = yes, hasDPad = no, ...
agpl-3.0
stanfordhpccenter/soleil-x
testcases/legacy/taylor_green_vortex/taylor_green_vortex_particles.lua
1
4674
-- This is a Lua config file for the Soleil code. -- This defines the 64^3 TaylorGreen Vortex problem w/out particles or radiation return { ----------------------------------------------------------- ----------------------------------------------------------- -- Options of interest for Liszt/Legion tests --...
gpl-2.0
dschoeffm/MoonGen
rfc2544/utils/manual.lua
9
2056
local mod = {} mod.__index = mod local namespaces = require "namespaces" local ns = namespaces.get() function confirm() local answer repeat io.write("continue (y/n)? ") answer = io.read() until answer == "y" or answer == "n" return answer == "y" and 0 or -1 end function mod.addIn...
mit
wrxck/mattata
plugins/administration/setgrouplang.lua
2
5769
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local setgrouplang = {} local mattata = require('mattata') local redis = require('libs.redis') local json = require('dkjson') function setgrouplang:init() setgrouplang.commands...
mit
rickvanbodegraven/nodemcu-firmware
lua_modules/bmp085/bmp085.lua
69
5037
-------------------------------------------------------------------------------- -- BMP085 I2C module for NODEMCU -- NODEMCU TEAM -- LICENCE: http://opensource.org/licenses/MIT -- Christee <Christee@nodemcu.com> -------------------------------------------------------------------------------- local moduleName = ... ...
mit
TimVonsee/hammerspoon
extensions/location/init.lua
13
7506
--- === hs.location === --- --- Determine the machine's location and useful information about that location local location = require("hs.location.internal") local internal = {} internal.__callbacks = {} --- hs.location.register(tag, fn[, distance]) --- Function --- Registers a callback function to be called when the ...
mit
amirsafa/bot-superGps
plugins/weather.lua
29
1436
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) local url = BASE_URL url = url..'?q='..location..'&APPID=eedbc05ba060c787ab0614cad1f2e12b' url = url..'&units=metric' local b, c, h = http.request(url) if c ~= 200...
gpl-2.0
rickvanbodegraven/nodemcu-firmware
lua_modules/ds3231/ds3231-web.lua
84
1338
require('ds3231') port = 80 -- ESP-01 GPIO Mapping gpio0, gpio2 = 3, 4 days = { [1] = "Sunday", [2] = "Monday", [3] = "Tuesday", [4] = "Wednesday", [5] = "Thursday", [6] = "Friday", [7] = "Saturday" } months = { [1] = "January", [2] = "Febuary", [3] = "March", [4] = "Apri...
mit
feiltom/domoticz
scripts/dzVents/runtime/HistoricalStorage.lua
3
11178
local Time = require('Time') local MAXLIMIT = 100 local utils = require('Utils') if (_G.TESTMODE) then MAXLIMIT = 10 end local function setIterators(object, collection) local res object['forEach'] = function(func) for i, item in ipairs(collection) do res = func(item, i, collection) if (res == false) then -...
gpl-3.0
silverhammermba/awesome
lib/awful/layout/suit/max.lua
1
1435
--------------------------------------------------------------------------- --- Maximized and fullscreen layouts module for awful -- -- @author Julien Danjou &lt;julien@danjou.info&gt; -- @copyright 2008 Julien Danjou -- @release @AWESOME_VERSION@ -- @module awful.layout.suit.max ---------------------------------------...
gpl-2.0
wrxck/mattata
configuration.example.lua
2
16702
--[[ _ _ _ _ __ ___ __ _| |_| |_ __ _| |_ __ _ | '_ ` _ \ / _` | __| __/ _` | __/ _` | | | | | | | (_| | |_| || (_| | || (_| | |_| |_| |_|\__,_|\__|\__\__,_|\__\__,_| Configuration file for mattata v1.5 Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com...
mit
135yshr/Holocraft-server
world/Plugins/APIDump/Hooks/OnWeatherChanging.lua
42
1369
return { HOOK_WEATHER_CHANGING = { CalledWhen = "The weather is about to change", DefaultFnName = "OnWeatherChanging", -- also used as pagename Desc = [[ This hook is called when the current weather has expired and a new weather is selected. Plugins may override the new weather being set.</p> <p> T...
mit
bizkut/BudakJahat
Rotations/Demon Hunter/Havoc/HavocCuteOne.lua
1
58025
local rotationName = "CuteOne" --------------- --- Toggles --- --------------- local function createToggles() -- Rotation Button RotationModes = { [1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps between Single and Multiple based on number of targets in range.", highlight...
gpl-3.0
arventwei/WioEngine
Tools/jamplus/src/luaplus/Src/Modules/getopt/test/testgetopt.lua
1
2573
getopt = require 'getopt' do local options = getopt.makeOptions{ getopt.Option {{"gen"}, "Set a project generator", "Req", 'GENERATOR'}, getopt.Option {{"gui"}, "Pop up a GUI to set options"}, getopt.Option {{"compiler"}, "Set the default compiler used to build with", "Req", 'COMPILER'}, getopt.Option {{"post...
mit
guard163/tarantool
test/app/lua/serializer_test.lua
7
11702
local ffi = require('ffi') local function rt(test, s, x, t) local buf1 = s.encode(x) local x1, offset1 = s.decode(buf1) local xstr if type(x) == "table" then xstr = "table" elseif ffi.istype('float', x) then xstr = string.format('%0.2f (ffi float)', tonumber(x)) elseif ffi.istyp...
bsd-2-clause
tianxiawuzhei/cocos-quick-lua
quick/bin/mac/jit/bcsave.lua
41
18267
---------------------------------------------------------------------------- -- LuaJIT module to save/list bytecode. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
mit
aperezdc/lua-eol
examples/upng-info.lua
2
1348
#! /usr/bin/env lua -- -- upnginfo.lua -- Copyright (C) 2015 Adrian Perez <aperez@igalia.com> -- -- Distributed under terms of the MIT license. -- local upng = require "modularize" { "upng", prefix = "upng_" } local function enum_value_string(enum, value) for i = 1, #enum do local item = enum[i] if value == item...
mit
dicebox/minetest-france
games/minetest_game/mods/fire/init.lua
6
8613
-- Global namespace for functions fire = {} -- -- Items -- -- Flame nodes minetest.register_node("fire:basic_flame", { drawtype = "firelike", tiles = { { name = "fire_basic_flame_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1 }, }, },...
gpl-3.0
silverhammermba/awesome
lib/wibox/widget/systray.lua
3
5410
--------------------------------------------------------------------------- -- @author Uli Schlachter -- @copyright 2010 Uli Schlachter -- @release @AWESOME_VERSION@ -- @classmod wibox.widget.systray --------------------------------------------------------------------------- local wbase = require("wibox.widget.base") ...
gpl-2.0
interfaceware/iguana-web-apps
scratch/shared/channelmanager/backend.lua
2
11761
-- -- Private helpers -- --local function unpackC local function statuses() local StatusHtml = '<div class="%s"></div>' local Statuses = { on='status-green', off='status-grey', error='status-red', transition='status-yellow'} return StatusHtml, Statuses end local function compo...
mit
135yshr/Holocraft-server
world/Plugins/APIDump/Hooks/OnBlockToPickups.lua
36
2438
return { HOOK_BLOCK_TO_PICKUPS = { CalledWhen = "A block is about to be dug ({{cPlayer|player}}, {{cEntity|entity}} or natural reason), plugins may override what pickups that will produce.", DefaultFnName = "OnBlockToPickups", -- also used as pagename Desc = [[ This callback gets called whenever a block is ...
mit
mqmaker/witi-openwrt
package/ramips/ui/luci-mtk/src/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
73
11663
--[[ 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
matija-hustic/OpenRA
mods/ra/maps/soviet-04b/soviet04b-AI.lua
19
3108
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end IdlingUnits = function() local lazyUnits = Greece.GetGroundAttackers() Utils.Do(lazyUnits, function(unit) Trigger.OnDamaged(unit, function() Trigger.ClearAll(unit) Trigger.AfterDelay(0, function() IdleHunt(unit) end) ...
gpl-3.0
Olivine-Labs/luassert
src/languages/ar.lua
7
1694
local s = require('say') s:set_namespace("ar") s:set("assertion.same.positive", "تُوُقِّعَ تَماثُلُ الكائِنات.\nتَمَّ إدخال:\n %s.\nبَينَما كانَ مِن المُتَوقَّع:\n %s.") s:set("assertion.same.negative", "تُوُقِّعَ إختِلافُ الكائِنات.\nتَمَّ إدخال:\n %s.\nبَينَما كانَ مِن غَيرِ المُتَوقَّع:\n %s.") s:set("assertion.e...
mit
135yshr/Holocraft-server
world/Plugins/ProtectionAreas/CommandHandlers.lua
6
7921
-- CommandHandlers.lua -- Defines the individual command handlers --- Handles the ProtAdd command function HandleAddArea(a_Split, a_Player) -- Command syntax: /protection add username1 [username2] [username3] ... if (#a_Split < 3) then a_Player:SendMessage(g_Msgs.ErrExpectedListOfUsernames); return true; e...
mit
mahdibagheri/mahdi
plugins/info.lua
4
2156
do local function action_by_reply(extra, success, result) local user_info = {} local uhash = 'user:'..result.from.id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..result.from.id..':'..result.to.id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print_name(user)..' ['....
gpl-2.0
nyov/luakit
lib/downloads_chrome.lua
4
12213
-- Grab what we need from the Lua environment local table = table local string = string local io = io local print = print local pairs = pairs local ipairs = ipairs local math = math local assert = assert local setmetatable = setmetatable local rawget = rawget local rawset = rawset local type = type local os = os local ...
gpl-3.0
Naliwe/IntelliJ_WowAddOnSupport
resources/Wow_sdk/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1
8120
--[[----------------------------------------------------------------------------- EditBox Widget -------------------------------------------------------------------------------]] local Type, Version = "EditBox", 27 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or...
mit
ShieldTeams/oldsdp
plugins/azan.lua
1
3556
do function run_bash(str) local cmd = io.popen(str) local result = cmd:read('*all') return result end local api_key = nil local base_api = "https://maps.googleapis.com/maps/api" function get_latlong(area) local api = base_api .. "/geocode/json?" local parameters = "address=".. (URL.escape(area) or ...
agpl-3.0
bizkut/BudakJahat
Rotations/Old/old_HolyOdan.lua
1
35114
local rotationName = "Odan(Svs+)" --------------- --- Toggles --- --------------- local function createToggles() -- Rotation Button RotationModes = { [1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps between Single and Multiple based on number of targets in range", highlight =...
gpl-3.0
cshore/luci
modules/luci-mod-admin-mini/luasrc/model/cbi/mini/luci.lua
76
1122
-- 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. require "luci.config" local fs = require "nixio.fs" m = Map("luci", translate("Web <abbr title=\"User Interface\">UI</abbr>"), translate("Here you can customi...
apache-2.0
bizkut/BudakJahat
Rotations/Priest/Discipline/Disclo.lua
1
34269
local rotationName = "PangDisc" -- Version: 1350-02-09-2020 local function createToggles() -- Cooldown Button CooldownModes = { [1] = {mode = "Auto", value = 1, overlay = "Cooldowns Automated", tip = "Automatic Cooldowns - Boss Detection.", highlight = 1, icon = br.player.spell.divineStar}, [2...
gpl-3.0
philanc/plc
test/test_sha3.lua
1
3977
-- Copyright (c) 2015 Phil Leblanc -- see LICENSE file ------------------------------------------------------------ -- sha3 tests local sha3 = require "plc.sha3" local bin = require "plc.bin" -- for hex conversion local insert, concat = table.insert, table.concat local function test_sha3() -- checked with sha3 ...
mit
ld-test/oil
lua/oil/kernel/base/Proxies/asynchronous.lua
6
2034
local oo = require "oil.oo" --[[VERBOSE]] local verbose = require "oil.verbose" local utils = require "oil.kernel.base.Proxies.utils" local assertresults = utils.assertresults local unpackrequest = utils.unpackrequest ---------------------------------------------...
mit
bigdogmat/wire
lua/wire/client/cl_modelplug.lua
2
32743
--Msg("=== Loading Wire Model Packs ===\n") CreateConVar("cl_showmodeltextbox", "0") --[[ -- Loads and converts model lists from the old WireModelPacks format do local converted = {} MsgN("WM: Loading models...") for _,filename in ipairs( file.Find("WireModelPacks/*", "DATA") ) do --for _,filename in ipairs{"b...
apache-2.0
matija-hustic/OpenRA
mods/ra/maps/fort-lonestar/fort-lonestar.lua
9
8618
Patrol = { "e1", "e2", "e1" } Infantry = { "e4", "e1", "e1", "e2", "e1", "e2" } Vehicles = { "arty", "ftrk", "ftrk", "apc", "apc" } Tank = { "3tnk" } LongRange = { "v2rl" } Boss = { "4tnk" } SovietEntryPoints = { Entry1, Entry2, Entry3, Entry4, Entry5, Entry6, Entry7, Entry8 } PatrolWaypoints = { Entry2, Entry4, Entry...
gpl-3.0
ioiasff/qrt
plugins/google.lua
722
1037
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
bigdogmat/wire
lua/wire/stools/lever.lua
1
2120
WireToolSetup.setCategory( "Input, Output" ) WireToolSetup.open( "lever", "Lever", "gmod_wire_lever", nil, "Levers" ) if CLIENT then language.Add( "tool.wire_lever.name", "Lever Tool (Wire)" ) language.Add( "tool.wire_lever.desc", "Spawns a Lever for use with the wire system." ) language.Add( "tool.wire_lever.minva...
apache-2.0
dwnld/thrift
lib/lua/TSocket.lua
113
2996
---- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may...
apache-2.0
ZeroK-RTS/Zero-K-Infrastructure
MissionEditor/MissionEditor2/MissionBase/LuaUI/Widgets/mission_selection_monitor.lua
9
1836
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Monitors Unit Selections", desc = "For the \"Unit Selected\" condition.", author ...
gpl-3.0
ZeroK-RTS/Zero-K-Infrastructure
PlanetWars.old/Mods/BA66PW.sdd/LuaUI/Fonts/KOMTXT___16.lua
9
35223
-- $Id: KOMTXT___16.lua 3171 2008-11-06 09:06:29Z det $ local fontSpecs = { srcFile = [[KOMTXT__.ttf]], family = [[Komika Text]], style = [[Regular]], yStep = 20, height = 16, xTexSize = 512, yTexSize = 256, outlineRadius = 2, outlineWeight = 100, } local glyphs = {} glyp...
gpl-3.0
interfaceware/iguana-web-apps
shared/test.lua
2
13295
local test = {} test.ui = require 'testui' zip = require 'zip' queue = require 'mockqueue' test.EXPECTED_DATA = "~/iguana_expected" test.IGUANA_PORT = "7500" local REDLIGHT = '<div class="status-red"></div>' local GREENLIGHT = '<div class="status-green"></div>' test.TheTrans = {} function test.cleanConfig() tes...
mit
ariakabiryan/tnt_aria_bot
plugins/plugins.lua
325
6164
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( ...
gpl-2.0
javarange/mongrel2
examples/bbs/ui.lua
96
2026
local coroutine = coroutine module 'ui' local SCREENS = { ['welcome'] = [[ __ __ ____ ____ ____ ____ | \/ |___ \| __ )| __ ) ___| | |\/| | __) | _ \| _ \___ \ | | | |/ __/| |_) | |_) |__) | |_| |_|_____|____/|____/____/ Welcome to the Mongrel2 BBS. ]], ['name']...
bsd-3-clause
GarfieldJiang/UGFWithToLua
Assets/ToLua/ToLua/Lua/socket/tp.lua
51
3766
----------------------------------------------------------------------------- -- Unified SMTP/FTP subsystem -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare...
mit
bigdogmat/wire
lua/entities/gmod_wire_expression2/core/complex.lua
17
11243
/******************************************************************************\ Complex numbers support \******************************************************************************/ -- faster access to some math library functions local abs = math.abs local Round = math.Round local sqrt = math.sqrt local exp ...
apache-2.0
ioiasff/qrt
plugins/btc.lua
289
1375
-- See https://bitcoinaverage.com/api local function getBTCX(amount,currency) local base_url = 'https://api.bitcoinaverage.com/ticker/global/' -- Do request on bitcoinaverage, the final / is critical! local res,code = https.request(base_url..currency.."/") if code ~= 200 then return nil end local data = j...
gpl-2.0
TimVonsee/hammerspoon
extensions/milight/init.lua
5
4490
--- === hs.milight === --- --- Simple controls for the MiLight LED WiFi bridge (also known as LimitlessLED and EasyBulb) local milight = require "hs.milight.internal" milight.cmd = milight._cacheCommands() local milightObject = hs.getObjectMetatable("hs.milight") --- hs.milight.minBrightness --- Constant --- Specifie...
mit
MonkeyFirst/DisabledBoneSlerpWithShadowedAnimation
bin/Data/LuaScripts/18_CharacterDemo.lua
3
20531
-- Moving character example. -- This sample demonstrates: -- - Controlling a humanoid character through physics -- - Driving animations using the AnimationController component -- - Manual control of a bone scene node -- - Implementing 1st and 3rd person cameras, using raycasts to avoid the 3rd person ca...
mit
arventwei/WioEngine
Tools/jamplus/src/luaplus/Src/Modules/lanes/tests/launchtest.lua
7
2050
-- -- LAUNCHTEST.LUA Copyright (c) 2007-08, Asko Kauppi <akauppi@gmail.com> -- -- Tests launching speed of N threads -- -- Usage: -- [time] lua -lstrict launchtest.lua [threads] [-libs[=io,os,math,...]] -- -- threads: number of threads to launch (like: 2000) :) -- libs: combination of "os","io","ma...
mit
arventwei/WioEngine
Tools/jamplus/src/luaplus/Src/Modules/socket/test/mimetest.lua
44
8413
local socket = require("socket") local ltn12 = require("ltn12") local mime = require("mime") local unpack = unpack or table.unpack dofile("testsupport.lua") local qptest = "qptest.bin" local eqptest = "qptest.bin2" local dqptest = "qptest.bin3" local b64test = "b64test.bin" local eb64test = "b64test.bin2" local db6...
mit
wrxck/mattata
plugins/help.lua
2
16362
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local help = {} local mattata = require('mattata') function help:init(configuration) help.commands = mattata.commands(self.info.username):command('help'):command('start').table...
mit
feiltom/domoticz
scripts/dzVents/examples/check dead devices by desc.lua
3
1557
--Check dead device using their description --This allow to configure device to be checked directly in domoticz GUI by accessing to device details and add "CDA:<delayInMinute>" --You have to active http fetching ! return { active = true, on = { ['timer'] = 'every 60 minutes' }, ...
gpl-3.0
ld-test/oil
lua/loop/compiler/Conditional.lua
12
1934
-------------------------------------------------------------------------------- ---------------------- ## ##### ##### ###### ----------------------- ---------------------- ## ## ## ## ## ## ## ----------------------- ---------------------- ## ## ## ## ## ###### --------------------...
mit
bigdogmat/wire
lua/wire/gates/comparison.lua
17
2192
--[[ Comparison Gates ]] GateActions("Comparison") GateActions["="] = { name = "Equal", inputs = { "A", "B" }, output = function(gate, A, B) if (math.abs(A-B) < 0.001) then return 1 end return 0 end, label = function(Out, A, B) return A.." == "..B.." = "..Out end } GateActions["!="] = { name = "Not Eq...
apache-2.0
bizkut/BudakJahat
System/Functions/Action.lua
1
1448
function canFly() local hasDraenorFly = select(4,GetAchievementInfo(10018)) local hasLegionFly = select(4,GetAchievementInfo(11446)) return IsOutdoors() and IsFlyableArea() and ((not isInDraenor() and not isInLegion()) or (hasDraenorFly and isInDraenor()) or (hasLegionFly and isInLegion())) end -- if canHeal("targe...
gpl-3.0
asmagill/hammerspoon_asm
turtle/init.lua
1
51873
--- === hs.canvas.turtle === --- --- Creates a view which can be assigned to an `hs.canvas` object of type "canvas" which displays graphical images rendered in a style similar to that of the Logo language, sometimes referred to as "Turtle Graphics". --- --- Briefly, turtle graphics are vector graphics using a relative ...
mit
wrxck/mattata
plugins/time.lua
2
3199
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local time = {} local mattata = require('mattata') local https = require('ssl.https') local url = require('socket.url') local json = require('dkjson') local setloc = require('plugin...
mit
grimreaper/ValyriaTear
dat/maps/layna_village/layna_village_center_sophia_house_script.lua
1
3928
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_center_sophia_house_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "Mountain Village of Layna" map_image_filename = "img/menus/locations/mountain_village.png" map_subname ...
gpl-2.0
czlc/skynet
examples/login/gated.lua
1
2467
-- Ï൱ÓÚwatchdog local msgserver = require "snax.msgserver" local crypt = require "skynet.crypt" local skynet = require "skynet" local loginservice = tonumber(...) local server = {} local users = {} local username_map = {} local internal_id = 0 -- login server disallow multi login, so login_handler never be reentry...
mit
cpascal/skynet
lualib/sharedata/corelib.lua
64
2453
local core = require "sharedata.core" local type = type local next = next local rawget = rawget local conf = {} conf.host = { new = core.new, delete = core.delete, getref = core.getref, markdirty = core.markdirty, incref = core.incref, decref = core.decref, } local meta = {} local isdirty = core.isdirty local...
mit
tianxiawuzhei/cocos-quick-lua
quick/welcome/src/app/scenes/ListViewEx.lua
1
2422
local ListViewEx = class("ListViewEx", cc.ui.UIListView) function ListViewEx:ctor(params) params.bgScale9 = true ListViewEx.super.ctor(self, params) self.currentIndex_ = 0 self.currentItem_ = nil self:onTouch(handler(self, self.touchCallback)) end function ListViewEx:setHighlightNode(node) ...
mit
abbasgh12345/abbas
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
hfjgjfg/shatel
plugins/wiki.lua
735
4364
-- http://git.io/vUA4M local socket = require "socket" local JSON = require "cjson" local wikiusage = { "!wiki [text]: Read extract from default Wikipedia (EN)", "!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola", "!wiki search [text]: Search articles on default Wikipedia (EN)", "!...
gpl-2.0
tianxiawuzhei/cocos-quick-lua
quick/framework/cc/ui/init.lua
10
3321
--[[ 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
bizkut/BudakJahat
Rotations/Monk/Mistweaver/Laksweaver.lua
1
71794
local rotationName = "Laksweaver" local function createToggles() -- Define custom toggles -- Cooldown Button DPSModes = { [1] = { mode = "Auto", value = 1, overlay = "DPS Auto", tip = "Auto DPS Enabled", highlight = 0, icon = br.player.spell.tigerPalm }, [2] = { mode = "Single", value = ...
gpl-3.0
bigdogmat/wire
lua/wire/gates/logic.lua
18
2870
--[[ Logic Gates ]] GateActions("Logic") GateActions["not"] = { name = "Not (Invert)", inputs = { "A" }, output = function(gate, A) if (A > 0) then return 0 end return 1 end, label = function(Out, A) return "not "..A.." = "..Out end } GateActions["and"] = { name = "And (All)", inputs = { "A", "B", "C...
apache-2.0
FireFor/RPG_Other_Dream
otherdream/AdvTiledLoader/Map.lua
1
13858
--------------------------------------------------------------------------------------------------- -- -= Map =- --------------------------------------------------------------------------------------------------- -- Setup -- Import the other classes TILED_LOADER_PATH = TILED_LOADER_PATH or ({...})[1]:gsub("[%.\\/][Mm]...
unlicense
mahdikord/baran
plugins/media.lua
297
1590
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0