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 |
|---|---|---|---|---|---|
yetsky/luci | modules/admin-full/luasrc/model/cbi/admin_system/fstab/swap.lua | 84 | 1922 | --[[
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 |
rigeirani/spm1 | plugins/plugins.lua | 17 | 5153 | 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 |
eggBOY91/Arctic-Core | src/scripts/lua/LuaBridge/0Misc/0LCF_Includes/LCF_Spell.lua | 13 | 2606 | --[[
* 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 |
yanarsin/arina | plugins/stats.lua | 43 | 4082 | do
-- Returns a table with `name` and `msgs`
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_prin... | gpl-2.0 |
thess/OpenWrt-packages | net/dynapoint/src/dynapoint.lua | 94 | 6369 | #!/usr/bin/lua
--[[
Copyright (C) 2016 Tobias Ilte <tobias.ilte@campus.tu-berlin.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later v... | gpl-2.0 |
joaofvieira/luci | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua | 58 | 2299 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local wa = require "luci.tools.webadmin"
local fs = require "nixio.fs"
m = Map("network",
translate("Routes"),
translate("Routes specify over which interface and gateway a certain host or network " ..
"can ... | apache-2.0 |
pazos/koreader | frontend/ui/widget/linkbox.lua | 6 | 1567 | local Blitbuffer = require("ffi/blitbuffer")
local Device = require("device")
local Geom = require("ui/geometry")
local GestureRange = require("ui/gesturerange")
local InputContainer = require("ui/widget/container/inputcontainer")
local Size = require("ui/size")
local UIManager = require("ui/uimanager")
local Screen = ... | agpl-3.0 |
xXDarkBoyXx/Cloud- | plugins/inpm.lua | 1114 | 3008 | do
local function pairsByKeys (t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
vsergeev/lua-periphery | tests/test_pwm.lua | 1 | 8738 | --
-- lua-periphery by vsergeev
-- https://github.com/vsergeev/lua-periphery
-- License: MIT
--
require('test')
local periphery = require('periphery')
local PWM = periphery.PWM
--------------------------------------------------------------------------------
local pwm_chip = nil
local pwm_channel = nil
-------------... | mit |
MathieuDuponchelle/gdx | demos/pax-britannica/pax-britannica-android/assets/data/blueprints.lua | 11 | 3729 | require 'dokidoki.module'
[[ background, debris, fish, background_fx, music_loader, game_flow, fade_in,
fade_out, fighter, bomber, frigate, selection_factory, player_factory,
easy_enemy_factory, laser, bomb, missile, countdown, splash ]]
local collision = require 'dokidoki.collision'
local game = require 'dokido... | apache-2.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua | 7 | 1219 |
--------------------------------
-- @module ShakyTiles3D
-- @extend TiledGrid3DAction
-- @parent_module cc
--------------------------------
-- brief Create the action with a range, shake Z vertices, a grid and duration.<br>
-- param duration Specify the duration of the ShakyTiles3D action. It's a value in seconds.<br... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/vgui/dslider.lua | 2 | 4880 | --[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DSlider
--]]
local PANEL = {}
AccessorFunc( PANEL, "NumSlider", "NumSlider" ... | mit |
musselwhizzle/Focus-Points | focuspoints.lrdevplugin/PointsRendererFactory.lua | 3 | 5579 | --[[
Copyright 2016 Whizzbang 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 writin... | apache-2.0 |
pazos/koreader | frontend/device/generic/powerd.lua | 3 | 4952 | local logger = require("logger")
local BasePowerD = {
fl_min = 0, -- min frontlight intensity
fl_max = 10, -- max frontlight intensity
fl_intensity = nil, -- frontlight intensity
battCapacity = 0, -- battery capacity
device = n... | agpl-3.0 |
dangersuperbot/super_boomrange | plugins/anti_fosh.lua | 3 | 1357 | local function run(msg, matches)
if is_owner(msg) then
return
end
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
if data[tostring(msg.to.id)]['settings'] then
if data[tostring(msg.to.id)]['settings']['antifosh'] then
lock_fos... | gpl-2.0 |
joaofvieira/luci | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/olsrd.lua | 43 | 1470 | -- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-- Licensed to the public under the Apache License 2.0.
m = Map("luci_statistics",
translate("OLSRd Plugin Configuration"),
translate("The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd."))
s = m:section(NamedSection,... | apache-2.0 |
yetsky/luci | modules/base/luasrc/cbi.lua | 76 | 40152 | --[[
LuCI - Configuration Bind Interface
Description:
Offers an interface for binding configuration values to certain
data types. Supports value and range validation and basic dependencies.
FileId:
$Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "Li... | apache-2.0 |
lopezloo/mta-csrw | csrw/server/mapchange.lua | 1 | 9342 | function onPlayerChat(message, messageType)
if messageType == 1 then
-- disable /me
cancelEvent()
end
if messageType == 0 or messageType == 2 then
cancelEvent()
-- RTV
if message == "rtv" or message == "rockthevote" or message == "rock the vote" then
if g_match.nextMap then
outputChatBox("New map ... | gpl-3.0 |
lopezloo/mta-csrw | csrw/client/grenade_lines.lua | 1 | 3934 | -- table of projectiles with lines to be rendered
local gl_lineProjectiles = {}
-- table of projectile lines
local gl_projectileLines = {}
local gl_projectileLines_lastIndex = 0
local PROJECTILE_LINES_RENDER_HANDLER = "onClientPreRender"
local DEBUG_ALWAYS_RENDER_PROJECTILE_LINES = DEBUG_MODE and true
local GRENADE_... | gpl-3.0 |
sdgdsffdsfff/nginx-openresty-windows | luajit-root/luajit/share/luajit-2.1.0-alpha/jit/v.lua | 17 | 5620 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | bsd-2-clause |
enginix/luasocket | src/tp.lua | 51 | 3766 | -----------------------------------------------------------------------------
-- Unified SMTP/FTP subsystem
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Declare... | mit |
pazos/koreader | spec/unit/readerpaging_spec.lua | 4 | 4096 | describe("Readerpaging module", function()
local sample_pdf = "spec/front/unit/data/sample.pdf"
local readerui, UIManager, Event, DocumentRegistry, ReaderUI, Screen
local paging
setup(function()
require("commonrequire")
UIManager = require("ui/uimanager")
Event = require("ui/eve... | agpl-3.0 |
cjtallman/luasocket | 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 |
InfiniteRain/CS2D-AmplifiedScripting | classes/debug.lua | 1 | 1637 | -- Initializing the debug class
cas.debug = cas.class()
----------------------
-- Instance methods --
----------------------
-- Constructor. Creates an instance of the debug class and returns it. Takes color and tag values
-- as parameters.
function cas.debug:constructor(color, tag)
if getmetatable(color) ~= cas.co... | mit |
BradSharp/roblox | Gizmo/gizmo.lua | 1 | 11880 | ------------------------------------------------------------------------------------------------------------------------
-- Name: gizmo.lua
-- Version: 1.1 (1/29/2021)
-- Author: Brad Sharp
--
-- Repository: https://github.com/BradSharp/Roblox-Miscellaneous/tree/master/Gizmo
-- License: MIT
--
-- Copyright (c) 2021... | mit |
enginix/luasocket | etc/forward.lua | 43 | 2066 | -- load our favourite library
local dispatch = require("dispatch")
local handler = dispatch.newhandler()
-- make sure the user knows how to invoke us
if #arg < 1 then
print("Usage")
print(" lua forward.lua <iport:ohost:oport> ...")
os.exit(1)
end
-- function to move data from one socket to the other
lo... | mit |
cjtallman/luasocket | etc/forward.lua | 43 | 2066 | -- load our favourite library
local dispatch = require("dispatch")
local handler = dispatch.newhandler()
-- make sure the user knows how to invoke us
if #arg < 1 then
print("Usage")
print(" lua forward.lua <iport:ohost:oport> ...")
os.exit(1)
end
-- function to move data from one socket to the other
lo... | mit |
pazos/koreader | frontend/ui/widget/scrollhtmlwidget.lua | 3 | 7027 | --[[--
HTML widget with vertical scroll bar.
--]]
local BD = require("ui/bidi")
local Device = require("device")
local HtmlBoxWidget = require("ui/widget/htmlboxwidget")
local Geom = require("ui/geometry")
local GestureRange = require("ui/gesturerange")
local HorizontalGroup = require("ui/widget/horizontalgroup")
loca... | agpl-3.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/plugin/samples/HelloPluginsLua/src/TestFBShareScene.lua | 6 | 13701 | local visibleSize = cc.Director:getInstance():getVisibleSize()
local origin = cc.Director:getInstance():getVisibleOrigin()
local posBR = cc.p(origin.x + visibleSize.width, origin.y)
local TestFBShareScene = class("TestFBShareScene",function()
return cc.Scene:create()
end)
function TestFBShareScene.create()
lo... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/weapons/flechette_gun.lua | 1 | 2377 |
if ( !IsMounted( "ep2" ) ) then return end
-- Variables that are used on both client and server
AddCSLuaFile()
SWEP.Author = ""
SWEP.Instructions = "Shoots flechettes"
SWEP.Spawnable = true
SWEP.AdminOnly = true
SWEP.UseHands = true
SWEP.ViewModel = "models/weapons/c_smg1.mdl"
SWEP.WorldModel = "model... | mit |
IntelligentBot/IntelligentBot | libs/fakeredis.lua | 650 | 40405 | local unpack = table.unpack or unpack
--- Bit operations
local ok,bit
if _VERSION == "Lua 5.3" then
bit = (load [[ return {
band = function(x, y) return x & y end,
bor = function(x, y) return x | y end,
bxor = function(x, y) return x ~ y end,
bnot = function(x) return ~x end,
rshift = function(x... | gpl-2.0 |
bottelebot/Umbrella | 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 |
philsiff/Red-Vs-Blue | Very Basic TDM [Gamemode]/gamemodes/vbtdm/entities/weapons/weapon_real_base_snip/shared.lua | 1 | 15867 | -- Read the weapon_real_base if you really want to know what each action does
if (SERVER) then
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
end
/*---------------------------------------------------------
Muzzle Effect + Shell Effect
---------------------------------------------------------*/
SWEP.MuzzleEf... | mit |
ZipFile/vlc | share/lua/playlist/koreus.lua | 57 | 4037 | --[[
Copyright © 2009 the VideoLAN team
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 ... | gpl-2.0 |
REZATITAN/X | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
yetsky/luci | applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua | 78 | 2765 | --[[
Luci configuration model for statistics - collectd netlink 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 Licen... | apache-2.0 |
xiaowa183/Atlas | lib/admin-sql.lua | 40 | 8858 | --[[ $%BEGINLICENSE%$
Copyright (c) 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 distribut... | gpl-2.0 |
disslove2-bot/Mr.Mj-BOT | libs/redis.lua | 566 | 1214 | local Redis = require 'redis'
local FakeRedis = require 'fakeredis'
local params = {
host = os.getenv('REDIS_HOST') or '127.0.0.1',
port = tonumber(os.getenv('REDIS_PORT') or 6379)
}
local database = os.getenv('REDIS_DB')
local password = os.getenv('REDIS_PASSWORD')
-- Overwrite HGETALL
Redis.commands.hgetall = ... | gpl-2.0 |
rigeirani/spm1 | libs/redis.lua | 566 | 1214 | local Redis = require 'redis'
local FakeRedis = require 'fakeredis'
local params = {
host = os.getenv('REDIS_HOST') or '127.0.0.1',
port = tonumber(os.getenv('REDIS_PORT') or 6379)
}
local database = os.getenv('REDIS_DB')
local password = os.getenv('REDIS_PASSWORD')
-- Overwrite HGETALL
Redis.commands.hgetall = ... | gpl-2.0 |
nfleet1080/DSSW_Mod | scripts/prefabs/pepperoniroll.lua | 1 | 1845 | local assets = {
Asset("ANIM", "anim/pepperoniroll.zip"),
Asset("ATLAS", "images/inventoryimages/pepperoniroll.xml")
}
local prefabs = {}
local function fn()
local inst = CreateEntity()
local trans = inst.entity:AddTransform()
local anim = inst.entity:AddAnimState()
MakeInventoryPhysics(inst)
... | mit |
InfiniteRain/CS2D-AmplifiedScripting | classes/player.lua | 1 | 38788 | -- Initializing the cas.player class.
cas.player = cas.class()
--------------------
-- Static methods --
--------------------
-- Returns the player instance from the passed player ID.
function cas.player.getInstance(playerID)
if type(playerID) ~= "number" then
error("Passed \"playerID\" parameter is not valid. Num... | mit |
SinZ163/TwilightsEveORPG | game/scripts/vscripts/abilities/druid/archdruid/Twister.lua | 2 | 2465 | teve_druid_archdruid_twister = class({})
function teve_druid_archdruid_twister:OnSpellStart()
print("Twister from Lua!")
self.archdruid_twister_speed = 1000
self.archdruid_twister_width_initial = 150
self.archdruid_twister_width_end = 200
self.archdruid_twister_distance = 600
self.archdruid_twi... | mit |
yetsky/luci | libs/px5g/lua/px5g/util.lua | 170 | 1148 | --[[
* px5g - Embedded x509 key and certificate generator based on PolarSSL
*
* Copyright (C) 2009 Steven Barth <steven@midlink.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License, version 2.1 as published by the Free ... | apache-2.0 |
FoxelBox/FoxBukkitLua | lua/src/main/lua/classes/Server.lua | 1 | 1471 | --[[
This file is part of FoxBukkitLua-lua.
FoxBukkitLua-lua 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 3 of the License, or
(at your option) any later version.
... | lgpl-3.0 |
pazos/koreader | spec/unit/filemanagerconverter_spec.lua | 8 | 2252 | describe("FileConverter module", function()
local FileConverter
setup(function()
require("commonrequire")
FileConverter = require("apps/filemanager/filemanagerconverter")
end)
it("should show conversion support for Markdown", function()
assert.is_true(FileConverter:isSupported("/... | agpl-3.0 |
musselwhizzle/Focus-Points | focuspoints.lrdevplugin/SonyDelegates.lua | 3 | 4990 | --[[
Copyright 2016 Whizzbang 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 writin... | apache-2.0 |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/menu/demo_to_video.lua | 2 | 10085 | --[[__ _
/ _| __ _ ___ ___ _ __ _ _ _ __ ___| |__
| |_ / _` |/ __/ _ \ '_ \| | | | '_ \ / __| '_ \
| _| (_| | (_| __/ |_) | |_| | | | | (__| | | |
|_| \__,_|\___\___| .__/ \__,_|_| |_|\___|_| |_|
|_| 2012 --]]
local ActiveVideo = nil
VideoSettings = nil
... | mit |
magicmoremagic/bengine-core | build.lua | 1 | 1168 | module 'core' {
lib {
src {
'src/*.cpp',
exclude 'src/id.cpp',
exclude 'src/namespaced_id.cpp',
pch_src 'src/pch.cpp'
},
src {
'src/native/*.cpp',
'src/native/$(toolchain)/*.cpp'
},
define 'BE_CORE_IMPL',
link_project 'zlib-sta... | mit |
joaofvieira/luci | build/luadoc/doc.lua | 78 | 3419 | #!/usr/bin/env lua
-------------------------------------------------------------------------------
-- LuaDoc launcher.
-- @release $Id: luadoc.lua.in,v 1.1 2008/02/17 06:42:51 jasonsantos Exp $
-------------------------------------------------------------------------------
--local source = debug.getinfo(1).source or "... | apache-2.0 |
IntelligentBot/IntelligentBot | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
bradchesney79/2015BeastRouterProject | openwrt/unsquash/squashfs-root/usr/lib/lua/luci/model/cbi/admin_system/admin.lua | 57 | 3150 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
m = Map("system", translate("Router Password"),
translate("Changes the administrator password for accessing the device"))
s = ... | cc0-1.0 |
mcdonnelldean/eso-pad-merchant | PadMerchant/lib/LibAddonMenu-2.0/controls/texture.lua | 7 | 1513 | --[[textureData = {
type = "texture",
image = "file/path.dds",
imageWidth = 64, --max of 250 for half width, 510 for full
imageHeight = 32, --max of 100
tooltip = "Image's tooltip text.", --(optional)
width = "full", --or "half" (optional)
reference = "MyAddonTexture" --(optional) unique global reference to cont... | mit |
hectron/dotfiles | nvim/.config/nvim/after/plugin/galaxyline.rc.lua | 1 | 5151 | -- this is evilline, from: https://github.com/glepnir/galaxyline.nvim/blob/eb81be07bf690c5ef7474ace72920b32ad089585/example/eviline.lua
local gl = require("galaxyline")
local colors = require("galaxyline.theme").default
local condition = require("galaxyline.condition")
local gls = gl.section
gl.short_line_list = { "Nvi... | mit |
ZerothAngel/FtDScripts | ai/repair-aicommon.lua | 1 | 3230 | --@ commonsfriends commonstargets commons control planarvector
-- Repair AI module (common)
ParentID = nil
RepairTargetID = nil
function CalculateRepairTargetWeight(Distance, ParentDistance, Friend)
return Distance * DistanceWeight +
ParentDistance * ParentDistanceWeight +
(1.0 - Friend.HealthFraction) ... | mit |
pazos/koreader | plugins/perceptionexpander.koplugin/main.lua | 2 | 8246 | local Widget = require("ui/widget/widget")
local LineWidget = require("ui/widget/linewidget")
local MultiInputDialog = require("ui/widget/multiinputdialog")
local WidgetContainer = require("ui/widget/container/widgetcontainer")
local HorizontalGroup = require("ui/widget/horizontalgroup")
local UIManager = require("ui/u... | agpl-3.0 |
demolitions/conkyurlio | jarvis-hud/AonGraph.lua | 1 | 9003 | require 'cairo'
require 'AonMath'
function AonGraph_Init()
c_yellow = NewColor(255,255,100);
c_black = NewColor(0,0,0);
c_transparent = NewColor(40,40,40,0);
c_white = NewColor(255,255,255);
c_red = NewColor(255,0,0);
c_celeste = NewColor(120,220,255);
c_blue = NewColor(60, 120, 255);
c_darkblue = NewC... | gpl-2.0 |
soumith/nn | SpatialConvolutionMM_BHWD.lua | 2 | 1705 | local SpatialConvolutionMM_BHWD, parent = torch.class('nn.SpatialConvolutionMM_BHWD', 'nn.Module')
function SpatialConvolutionMM_BHWD:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padding)
parent.__init(self)
dW = dW or 1
dH = dH or 1
self.nInputPlane = nInputPlane
self.nOutputPlane = nOutputPl... | bsd-3-clause |
aminfara/myzsh | vima/lua/vima/plugins/whichkey.lua | 1 | 1085 | local status_ok, which_key = pcall(require, 'which-key')
if not status_ok then
vim.notify('Failed to load which-key.')
return
end
which_key.setup({
window = {
border = 'rounded',
},
})
which_key.register({
f = {
name = 'find',
b = { '<cmd>Telescope buffers<cr>', 'Buffers' },
f = { '<cmd>Tele... | mit |
miraage/gladdy | Modules/Nameplates.lua | 1 | 1940 | local select = select
local pairs = pairs
local WorldFrame = WorldFrame
local Gladdy = LibStub("Gladdy")
local L = Gladdy.L
local Nameplates = Gladdy:NewModule("Nameplates")
LibStub("AceHook-3.0"):Embed(Nameplates)
LibStub("AceTimer-3.0"):Embed(Nameplates)
function Nameplates:Initialise()
self.frames = 0
se... | mit |
sdgdsffdsfff/nginx-openresty-windows | lua-resty-redis-0.20/lib/resty/redis.lua | 11 | 10409 | -- Copyright (C) 2012-2013 Yichun Zhang (agentzh), CloudFlare Inc.
local sub = string.sub
local byte = string.byte
local tcp = ngx.socket.tcp
local concat = table.concat
local null = ngx.null
local pairs = pairs
local unpack = unpack
local setmetatable = setmetatable
local tonumber = tonumber
local error = error
lo... | bsd-2-clause |
pazos/koreader | spec/unit/network_manager_spec.lua | 10 | 2643 | describe("network_manager module", function()
local Device
local turn_on_wifi_called
local turn_off_wifi_called
local obtain_ip_called
local release_ip_called
local function clearState()
G_reader_settings:saveSetting("auto_restore_wifi", true)
turn_on_wifi_called = 0
tur... | agpl-3.0 |
dangersuperbot/super_boomrange | plugins/expire.lua | 9 | 1950 | local filename='data/expire.lua'
local cronned = load_from_file(filename)
local function save_cron(msg, text,date)
local origin = get_receiver(msg)
if not cronned[date] then
cronned[date] = {}
end
local arr = { origin, text } ;
table.insert(cronned[date], arr)
serialize_to_file(cronned, file... | gpl-2.0 |
Samake/Minecraft | Minecraft/client/handler/ActionHandlerC.lua | 1 | 3421 | --[[
Name: Minecraft
Filename: ActionHandlerC.lua
Authors: Sam@ke
--]]
ActionHandlerC = {}
function ActionHandlerC:constructor(parent)
mainOutput("ActionHandlerC was loaded.")
self.mainClass = parent
self.player = getLocalPlayer()
self.blockPlaceButton = "mouse2"
self.blockDeleteButton = "mouse1"
self.act... | gpl-3.0 |
knowknowledge/Epiar | Resources/Scripts/editor.lua | 2 | 33977 | -- Use this script for a solar system
infoWindows = {}
--- View components
function componentDebugger()
local width = WIDTH/11
UI.newButton(0*width, 0, width, 30, "Alliance", "componentViewer('Alliance', Epiar.alliances)" )
UI.newButton(1*width, 0, width, 30, "Commodity", "componentViewer('Commodity', Epiar.commodi... | gpl-2.0 |
amirmrbad/flashbot | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
mahdikord/mahdiho | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
rmtew/demirogue | src/fringes.lua | 3 | 4203 | require 'Graph'
require 'graph2D'
require 'terrains'
fringes = {}
local styles = {}
function styles.empty( params, graph, sources, mask )
return {}
end
-- params = {
-- depth = <number>,
-- terrain = <terrain>,
-- }
function styles.solid( params, graph, sources, mask )
local depth = params.depth
local te... | bsd-3-clause |
enginix/luasocket | src/mime.lua | 149 | 2487 | -----------------------------------------------------------------------------
-- MIME support for the Lua language.
-- Author: Diego Nehab
-- Conforming to RFCs 2045-2049
-----------------------------------------------------------------------------
----------------------------------------------------------------------... | mit |
cjtallman/luasocket | src/mime.lua | 149 | 2487 | -----------------------------------------------------------------------------
-- MIME support for the Lua language.
-- Author: Diego Nehab
-- Conforming to RFCs 2045-2049
-----------------------------------------------------------------------------
----------------------------------------------------------------------... | mit |
mjarco/sysdig | userspace/sysdig/chisels/topprocs_net.lua | 11 | 1632 | --[[
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 |
openLuat/Luat | drive/AM2320.lua | 1 | 1182 | --- AM2320 温湿度传感器驱动
-- @module AM2320
-- @author 稀饭放姜
-- @license MIT
-- @copyright openLuat.com
-- @release 2017.10.19
require "utils"
module(..., package.seeall)
-- 初始化并打开I2C操作
-- @param I2C 内部ID
-- @return number ,I2C的速率
local function i2c_open(id)
if i2c.setup(id, i2c.SLOW) ~= i2c.SLOW then
log.error("... | mit |
DArt503/3rd-DCS-Lua-Framework | common/common.lua | 1 | 1399 | --------------------------------------------------------
-- Defines globals availables in all scripts
-- Author: DArt, Ked
--------------------------------------------------------
env.info( '*** LOADING 3rd DCS Lua Framework *** ' )
local _com = {
version = "0.0.1"
} -- Main object
-- Use to store initialistaion of ... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/gamemodes/base/entities/entities/base_entity/outputs.lua | 4 | 2274 |
-- This is called from ENT:KeyValue(key,value) to store the output from
-- the map, it could also be called from ENT:AcceptInput I think, so if
-- ent_fire addoutput is used, we can store that too (that hasn't been
-- tested though).
-- Usage: self:StoreOutput("<name of output>","<entities to fire>,<input name>,<para... | mit |
mrmetti/teleum-new-open | system/libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
Tarfand-pro/csgroup | system/libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
yetsky/luci | protocols/ipv6/luasrc/model/cbi/admin_network/proto_dslite.lua | 63 | 1662 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Copyright 2013 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://w... | apache-2.0 |
szszss/CharmingTremblePlus | lib/tbox/premake4.lua | 1 | 25099 | project "TBox"
language "C++" --TBox的确是个"纯C"项目,但在"纯"MSVC编译器里只有C++模式才能编译它...
kind "StaticLib" --这玩意只支持静态库...猹!
targetdir "../../bin/obj"
objdir "../../bin/obj"
includedirs {
"inc/**.h"
}
defines {
"TB_CONFIG_VERSION_MAJOR=1",
"TB_CONFIG_VERSION_MINOR=4",
"TB_CONFIG_VERSION_ALTER=7",
"TB_CONFIG_VERSION_BUILD=0",... | mit |
nimaghorbani/ghbotfool | bot/seedbot.lua | 1 | 9104 | 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 = '1.0'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
retu... | gpl-2.0 |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/gamemodes/base/gamemode/cl_pickteam.lua | 3 | 1660 |
--[[---------------------------------------------------------
Name: gamemode:ShowTeam( )
Desc:
-----------------------------------------------------------]]
function GM:ShowTeam()
if ( IsValid(self.TeamSelectFrame) ) then return end
-- Simple team selection box
self.TeamSelectFrame = vgui.Create( "DFrame"... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/gamemodes/sandbox/gamemode/persistence.lua | 1 | 1264 |
if ( SERVER ) then
local PersistPage = GetConVarString( "sbox_persist" )
hook.Add( "ShutDown", "SavePersistenceOnShutdown", function() hook.Run( "PersistenceSave" ) end )
hook.Add( "PersistenceSave", "PersistenceSave", function()
if ( PersistPage == "0" ) then return end
local Ents = ents.GetAll()
for k, v... | mit |
rmtew/demirogue | src/Graph.lua | 3 | 22785 |
--
-- Graph.lua
--
-- An incidence list based graph data structure.
-- There should be nothing game specific in here if possible.
--
-- Simple loops (vertex with an edge to itself) are not allowed.
--
-- Graph = {
-- vertices = {
-- [vertex] = { [vertex] = edge }*
-- }*,
-- edges = {
-- [ed... | bsd-3-clause |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua | 7 | 5428 |
--------------------------------
-- @module VideoPlayer
-- @extend Widget
-- @parent_module ccexp
--------------------------------
-- brief Get the local video filie name.<br>
-- return The video file name.
-- @function [parent=#VideoPlayer] getFileName
-- @param self
-- @return string#string ret (return value: stri... | mit |
ZipFile/vlc | share/lua/sd/assembleenationale.lua | 91 | 8388 | --[[
$Id$
Copyright © 2012 VideoLAN and AUTHORS
Authors: François Revol <revol at free dot fr>
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 op... | gpl-2.0 |
joaofvieira/luci | applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua | 34 | 6352 | -- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed to the public under the Apache License 2.0.
local CTRL = require "luci.controller.ddns" -- this application's controller
local DISP = require "luci.dispatcher"
local SYS = require "luci.sys"
local DDNS = require "luci.too... | apache-2.0 |
dangersuperbot/super_boomrange | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
mp4saeed/energy28 | JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-3.0 |
fegimanam/bib | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
theonlywild/copy | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
mrmetti/teleum-new-open | plugins/saveplug.lua | 20 | 1061 | --Created by: @janlou & @Alirezame
--Powered by: @SUDO_TM & @AdvanTM
--⚠️CopyRight all right reserved⚠️
local function saveplug(extra, success, result)
local msg = extra.msg
local name = extra.name
local receiver = get_receiver(msg)
if success then
local file = 'plugins/'..name..'.lua'
print('File savi... | gpl-2.0 |
yetsky/luci | protocols/ipv6/luasrc/model/cbi/admin_network/proto_hnet.lua | 40 | 1492 | --[[
LuCI - Lua Configuration Interface
Copyright 2013 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.org/licenses/LICENSE-2.0
]]--
local map... | apache-2.0 |
sgraham/nope | third_party/skia/tools/lua/bbh_filter.lua | 207 | 4407 | -- bbh_filter.lua
--
-- This script outputs info about 'interesting' skp files,
-- where the definition of 'interesting' changes but is roughly:
-- "Interesting for bounding box hierarchy benchmarks."
--
-- Currently, the approach is to output, in equal ammounts, the names of the files that
-- have most commands, and t... | bsd-3-clause |
yetsky/luci | modules/base/luasrc/template.lua | 8 | 3493 | --[[
LuCI - Template Parser
Description:
A template parser supporting includes, translations, Lua code blocks
and more. It can be used either as a compiler or as an interpreter.
FileId: $Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you... | apache-2.0 |
dromozoa/dromozoa-bind | test/test_driver.lua | 5 | 1261 | -- Copyright (C) 2018 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-bind.
--
-- dromozoa-bind 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
-... | gpl-3.0 |
wgapl/torch7 | Tester.lua | 58 | 7573 | local Tester = torch.class('torch.Tester')
function Tester:__init()
self.errors = {}
self.tests = {}
self.testnames = {}
self.curtestname = ''
end
function Tester:assert_sub (condition, message)
self.countasserts = self.countasserts + 1
if not condition then
local ss = debug.traceback('tester... | bsd-3-clause |
hechenfon/torch7 | Tester.lua | 58 | 7573 | local Tester = torch.class('torch.Tester')
function Tester:__init()
self.errors = {}
self.tests = {}
self.testnames = {}
self.curtestname = ''
end
function Tester:assert_sub (condition, message)
self.countasserts = self.countasserts + 1
if not condition then
local ss = debug.traceback('tester... | bsd-3-clause |
dangersuperbot/super_boomrange | plugins/supergroup.lua | 3 | 75121 | --Begin supergrpup.lua
--Check members #Add supergroup
local function check_member_super(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
if success == 0 then
send_large_msg(receiver, "Promote me to admin first!")
end
for k,v in pairs(result)... | gpl-2.0 |
pazos/koreader | plugins/kosync.koplugin/main.lua | 2 | 27610 | local Dispatcher = require("dispatcher")
local InputContainer = require("ui/widget/container/inputcontainer")
local LoginDialog = require("ui/widget/logindialog")
local InfoMessage = require("ui/widget/infomessage")
local ConfirmBox = require("ui/widget/confirmbox")
local NetworkMgr = require("ui/network/manager")
loca... | agpl-3.0 |
yetsky/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-res-feature.lua | 80 | 4201 | --[[
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... | apache-2.0 |
yetsky/luci | modules/base/luasrc/tools/status.lua | 49 | 5227 | --[[
LuCI - Lua Configuration Interface
Copyright 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
http://www.apache.org/licenses/LICENSE-2.0
]]--
module(... | apache-2.0 |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/vgui/dimage.lua | 2 | 6181 | --[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DImage
--]]
PANEL = {}
AccessorFunc( PANEL, "m_Material", "Material" )
Access... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.