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 |
|---|---|---|---|---|---|
Flourish-Team/Flourish | Premake/source/binmodules/luasocket/test/urltest.lua | 12 | 19140 | local socket = require("socket")
socket.url = require("socket.url")
dofile("testsupport.lua")
local check_build_url = function(parsed)
local built = socket.url.build(parsed)
if built ~= parsed.url then
print("built is different from expected")
print(built)
print(expected)
os.exi... | mit |
KayMD/Illarion-Content | triggerfield/elstree_air_661.lua | 4 | 1186 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
KayMD/Illarion-Content | item/id_316_sand.lua | 3 | 1447 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
Sweet-kid/Algorithm-Implementations | Derivative/Lua/Yonaba/derivative_test.lua | 26 | 1356 | -- Tests for derivative.lua
local drv = require 'derivative'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end
loc... | mit |
litnimax/luci | modules/base/luasrc/sys/iptparser.lua | 60 | 10704 | --[[
Iptables parser and query library
(c) 2008-2009 Jo-Philipp Wich <xm@leipzig.freifunk.net>
(c) 2008-2009 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
... | apache-2.0 |
mt246/mt246 | plugins/stats.lua | 458 | 4098 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- seconds
local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name.... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/applications/luci-diag-devinfo/dist/usr/lib/lua/luci/model/cbi/luci_diag/smap_devinfo_mini.lua | 141 | 1031 | --[[
smap_devinfo - SIP Device Information
(c) 2009 Daniel Dickinson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
require("luci.i18n")
re... | gpl-2.0 |
Flourish-Team/Flourish | Premake/source/modules/vstudio/tests/cs2005/test_compiler_props.lua | 10 | 1424 | --
-- tests/actions/vstudio/cs2005/test_compiler_props.lua
-- Test the compiler flags of a Visual Studio 2005+ C# project.
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_cs2005_compiler_props")
local dn2005 = p.vstudio.dotnetbase
local proj... | mit |
drogers141/mac-hammerspoon | util.lua | 1 | 8456 | -- General language and low level application utilities
-- see test.lua if questions
util = {}
---------------------------------------------------------------
-- CONFIG
---------------------------------------------------------------
-- read local configuration stored in json
-- module - code module
-- returns value ... | mit |
pdxmeshnet/mnigs | src/cjdnstools/contrib/lua/cjdns/addrcalc.lua | 19 | 1888 | -- Cjdns address conversion functions
-- Translated from Cjdns C code to lua code by Alex <alex@portlandmeshnet.org>
--- @module cjdns.addrcalc
local addrcalc = {}
local bit32 = require("bit32")
local sha2 = require("sha2")
function addrcalc.Base32_decode(input)
local numForAscii = {
99,99,99,99,99,99,99,99,99,9... | mit |
gajop/Zero-K | scripts/corcrw.lua | 5 | 8485 | include 'constants.lua'
include 'letsNotFailAtTrig.lua'
-- by MergeNine
-- shortcuts
local GetUnitPosition = Spring.GetUnitPosition
local SpawnCEG = Spring.SpawnCEG
local GetGroundHeight = Spring.GetGroundHeight
--pieces
local Base = piece "Base"
local RearTurretSeat = piece "RearTurretSeat"
local RearTurret = piece... | gpl-2.0 |
Minefix/MineFix | mods/nether/mapgen.lua | 4 | 7181 | -- Parameters
local NETHER_DEPTH = -5000
local TCAVE = 0.6
local BLEND = 128
-- Stuff
local yblmax = NETHER_DEPTH - BLEND * 2
-- Initialize noise object and localise noise buffer
local nobj_cave = nil
local nbuf_cave
-- Content ids
local c_air = minetest.get_content_id("air")
local c_stone_with_coal = minetest... | agpl-3.0 |
pixeltailgames/gm-mediaplayer | lua/mediaplayer/utils.lua | 1 | 5617 | if SERVER then AddCSLuaFile() end
local file = file
local math = math
local urllib = url
local ceil = math.ceil
local floor = math.floor
local Round = math.Round
local log = math.log
local pow = math.pow
local format = string.format
local tostring = tostring
local IsValid = IsValid
local utils = {}
---
-- Ceil the ... | mit |
Flourish-Team/Flourish | Premake/source/modules/gmake/tests/workspace/test_default_config.lua | 13 | 1465 | --
-- tests/actions/make/test_default_config.lua
-- Validate generation of default configuration block for makefiles.
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
--
local suite = test.declare("make_default_config")
local p = premake
--
-- Setup/teardown
--
local wks, prj
function suite.se... | mit |
jayman39tx/naev | dat/missions/flf/flf_pre01.lua | 2 | 14459 | --[[
-- This is the first "prelude" mission leading to the FLF campaign. The player takes a FLF agent onboard, then either turns him in to the Dvaered or delivers him to a hidden FLF base.
-- stack variable flfbase_intro:
-- 1 - The player has turned in the FLF agent or rescued the Dvaered crew. Conditional for dv... | gpl-3.0 |
kmfreeminer/km-freeminer-mods | mods/default/functions.lua | 2 | 14294 | --{{{ Sounds
function default.node_sound_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="", gain=1.0}
table.dug = table.dug or
{name="default_dug_node", gain=0.25}
table.place = table.place or
{name="default_place_node_hard", gain=1.0}
... | gpl-3.0 |
gajop/Zero-K | LuaUI/Configs/icontypes.lua | 2 | 21107 | -- $Id: icontypes.lua 4585 2009-05-09 11:15:01Z google frog $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: icontypes.lua
-- brief: icontypes definitions
--
----------------------------... | gpl-2.0 |
L1L1/cardpeek | dot_cardpeek_dir/scripts/etc/gsm-mobile-country-codes.lua | 16 | 7787 | -- from ITU Recommendation E.218 (05/04)
GSM_MCC = {
[202] = "Greece"
[204] = "Netherlands (Kingdom of the)"
[206] = "Belgium"
[208] = "France"
[212] = "Monaco (Principality of)"
[213] = "Andorra (Principality of)"
[214] = "Spain"
[216] = "Hungary (Republic of)"
[218] = "Bosnia and Herzegovina"
[219... | gpl-3.0 |
trappi-stone/Factorio-Stdlib | spec/config/config_spec.lua | 1 | 16396 | require 'spec/setup/defines'
require 'stdlib/config/config'
--[[ the table to be duplicated for all tests. ]]--
_G.config_template = {
a = true,
b = false,
c = "",
d = 100,
e = {},
f = nil,
g = {
a = true,
b = false,
c = "",
d = 100,
e = {},
f... | isc |
wxguidesigner/wxGUIDesigner | build/premake/4.3/premake4.lua | 2 | 2754 | --
-- Premake 4.x build configuration script
--
--
-- Define the project. Put the release configuration first so it will be the
-- default when folks build using the makefile. That way they don't have to
-- worry about the /scripts argument and all that.
--
solution "Premake4"
configurations { "Release", "Debug"... | gpl-3.0 |
davidBelanger/nn | View.lua | 41 | 2232 | local View, parent = torch.class('nn.View', 'nn.Module')
function View:__init(...)
parent.__init(self)
if select('#', ...) == 1 and torch.typename(select(1, ...)) == 'torch.LongStorage' then
self.size = select(1, ...)
else
self.size = torch.LongStorage({...})
end
self.numElements = 1
loc... | bsd-3-clause |
miralireza2/gpf | plugins/face.lua | 641 | 3073 | local https = require("ssl.https")
local ltn12 = require "ltn12"
-- 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 request(imageUrl)
local api_key = mashape.api_key
if api_key:isempt... | gpl-2.0 |
Mistranger/OpenRA | mods/cnc/maps/nod07a/nod07a-AI.lua | 7 | 6191 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
gajop/Zero-K | units/armraven.lua | 2 | 6208 | unitDef = {
unitname = [[armraven]],
name = [[Catapult]],
description = [[Heavy Saturation Artillery Strider]],
acceleration = 0.1092,
brakeRate = 0.1942,
buildCostEnergy = 3500,
buildCostMetal = 3500,
builder ... | gpl-2.0 |
KayMD/Illarion-Content | content/_gods/ushara.lua | 3 | 1956 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
KayMD/Illarion-Content | quest/hummi_olaficht_605.lua | 3 | 3346 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
casseveritt/premake | tests/test_string.lua | 84 | 1550 | --
-- tests/test_string.lua
-- Automated test suite for the new string functions.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
T.string = { }
--
-- string.endswith() tests
--
function T.string.endswith_ReturnsTrue_OnMatch()
test.istrue(string.endswith("Abcdef", "def"))
end
function T.strin... | bsd-3-clause |
KayMD/Illarion-Content | craft/final/roasting.lua | 3 | 2288 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
gajop/Zero-K | scripts/cordoom.lua | 7 | 5402 | include "constants.lua"
--pieces
local base = piece "Base"
local shellbase = piece "ShellBase"
local shell_1 = piece "Shell_1"
local shell_2 = piece "Shell_2"
-- guns
local cannonbase = piece "CannonBase"
local cannon = piece "Cannon"
local flare1 = piece "flare1"
local heatraybase = piece "HeatrayBase"
local heatr... | gpl-2.0 |
gajop/Zero-K | units/armspy.lua | 2 | 6167 | unitDef = {
unitname = [[armspy]],
name = [[Infiltrator]],
description = [[Cloaked Scout/Anti-Heavy]],
acceleration = 0.3,
activateWhenBuilt = true,
brakeRate = 0.3,
buildCostEnergy = 280,
buildCostMetal = 280,
buildPic ... | gpl-2.0 |
Flourish-Team/Flourish | Premake/source/src/base/http.lua | 17 | 1300 | --
-- http.lua
-- Additions to the http namespace.
-- Copyright (c) 2008-2014 Jason Perkins and the Premake project
--
if http == nil then
return
end
---
-- Simple progress bar on stdout for curl downloads.
---
function http.reportProgress(total, current)
local width = 70
local progress = math.floor(current... | mit |
casseveritt/premake | tests/actions/make/test_makesettings.lua | 57 | 1055 | --
-- tests/actions/make/test_makesettings.lua
-- Tests makesettings lists in generated makefiles.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.make_settings = { }
local suite = T.make_settings
local make = premake.make
local sln, prj, cfg
function suite.setup()
_ACTION = "gmake"
sln... | bsd-3-clause |
AnsonSmith/kong | kong/cli/utils/utils.lua | 13 | 3172 | --[[
Kong CLI utilities
- Logging
- Luarocks helpers
]]
local ansicolors = require "ansicolors"
local constants = require "kong.constants"
local Object = require "classic"
local lpath = require "luarocks.path"
local IO = require "kong.tools.io"
--
-- Colors
--
local colors = {}
for _, v in ipairs({"red", "green", "... | apache-2.0 |
INPStarfall/Starfall | lua/starfall/sfderma.lua | 2 | 23083 | -- Starfall Derma
-- This is for easily creating derma ui in the style of the Starfall Editor
-- Any derma added should not have anything to do with SF.Editor table apart from design elements e.g. colours, icons
-- Starfall Frame
local PANEL = {}
PANEL.windows = {}
function PANEL:Init ()
self.windows[ #se... | bsd-3-clause |
pixeltailgames/gm-mediaplayer | lua/mediaplayer/sh_services.lua | 1 | 2498 | MediaPlayer.Services = {}
function MediaPlayer.RegisterService( service )
local base
if service.Base then
base = MediaPlayer.Services[service.Base]
elseif MediaPlayer.Services.base then
base = MediaPlayer.Services.base
end
-- Inherit base service
setmetatable( service, { __index = base } )
-- Create bas... | mit |
gajop/Zero-K | lups/ParticleClasses/Jet.lua | 14 | 6334 | -- $Id: Jet.lua 3171 2008-11-06 09:06:29Z det $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local Jet = {}
Jet.__index = Jet
local jit... | gpl-2.0 |
ifoxhz/iFox | third-party/LuaJIT-2.0.3/src/jit/vmdef.lua | 56 | 6676 | -- This is a generated file. DO NOT EDIT!
module(...)
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI K... | gpl-3.0 |
gajop/Zero-K | LuaUI/Widgets/chili/Headers/util.lua | 3 | 8121 | --//=============================================================================
function IsTweakMode()
return widgetHandler.tweakMode
end
--//=============================================================================
function unpack4(t)
if t then
return t[1], t[2], t[3], t[4]
else
return 1, 2, 3, ... | gpl-2.0 |
KayMD/Illarion-Content | npc/base/patrol.lua | 2 | 8187 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
jayman39tx/naev | dat/scripts/proximity.lua | 17 | 4314 | -- Poll for player proximity to a point in space.
-- argument trigger: a table containing:
-- location: The location, OR
-- anchor: the pilot to use as the anchor for the trigger area
-- radius: The radius around the location or anchor
-- focus: The pilot that's polled for. If omitted, defaults to the player.
-- funcna... | gpl-3.0 |
Mutos/NAEV-StarsOfCall | dat/scripts/proximity.lua | 17 | 4314 | -- Poll for player proximity to a point in space.
-- argument trigger: a table containing:
-- location: The location, OR
-- anchor: the pilot to use as the anchor for the trigger area
-- radius: The radius around the location or anchor
-- focus: The pilot that's polled for. If omitted, defaults to the player.
-- funcna... | gpl-3.0 |
DeterGent-Legion/MeGa_SaTaN | plugins/linkpv.lua | 66 | 30275 | do
local function check_member(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.members) do
local member_id = v.id
if member_id ~= our_id then
-- Group configuration
data[tostring(msg.to.id)] = {
... | gpl-2.0 |
danteinforno/wesnoth | join.lua | 27 | 3343 | -- join.lua --
-- Try to join a game called "Test"
local function plugin()
local function log(text)
std_print("join: " .. text)
end
local counter = 0
local events, context, info
local helper = wesnoth.require("lua/helper.lua")
local function find_test_game(info)
local g = info.game_list()
... | gpl-2.0 |
miralireza2/gpf | plugins/bugzilla.lua | 611 | 3983 | do
local BASE_URL = "https://bugzilla.mozilla.org/rest/"
local function bugzilla_login()
local url = BASE_URL.."login?login=" .. _config.bugzilla.username .. "&password=" .. _config.bugzilla.password
print("accessing " .. url)
local res,code = https.request( url )
local data = json:decode(res)
return data
... | gpl-2.0 |
N3X15/spacebuild | lua/entities/base_sb_planet1/init.lua | 1 | 11089 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:Initialize()
self.BaseClass.Initialize(self)
self:PhysicsInit(SOLID_NONE)
self:SetMoveType(MOVETYPE_NONE)
self:SetSolid(SOLID_NONE)
-- TODO: Move this shit to sbenvironment.
self.sbenvironment.temperature... | apache-2.0 |
gajop/Zero-K | LuaRules/Gadgets/CAI/UnitListHandler.lua | 7 | 7249 | --[[ Handles Lists of Units
* Create as a list of unit with some functions.
* Can get total unit cost, a random unit, units in area etc..
* Elements can have custom data.
== CreateUnitList(losCheckAllyTeamID)
losCheckAllyTeamID is the point of view that the return functions should take
regarding LOS. A non-cheat... | gpl-2.0 |
Sweet-kid/Algorithm-Implementations | Breadth_First_Search/Lua/Yonaba/bfs_test.lua | 26 | 2339 | -- Tests for bfs.lua
local BFS = require 'bfs'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function same(t, p, comp)
for k,v in ipairs(t) do
if not comp(v, p[k]) then return false end
end
return true
end
... | mit |
KayMD/Illarion-Content | monster/race_90_black_imp/id_903_shadow_dancer.lua | 3 | 1215 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
casseveritt/premake | src/actions/make/make_csharp.lua | 18 | 8352 | --
-- make_csharp.lua
-- Generate a C# project makefile.
-- Copyright (c) 2002-2009 Jason Perkins and the Premake project
--
--
-- Given a .resx resource file, builds the path to corresponding .resource
-- file, matching the behavior and naming of Visual Studio.
--
local function getresourcefilename(cfg, fname)
... | bsd-3-clause |
gajop/Zero-K | units/amphassault.lua | 2 | 7171 | unitDef = {
unitname = [[amphassault]],
name = [[Grizzly]],
description = [[Heavy Amphibious Assault Walker]],
acceleration = 0.1,
brakeRate = 0.1,
buildCostEnergy = 2000,
buildCostMetal = 2000,
buildPic = [[amphassault.png]],
buil... | gpl-2.0 |
jayman39tx/naev | dat/ai/tpl/scout.lua | 5 | 2375 | include("dat/ai/include/basic.lua")
-- Variables
planet_dist = 1500 -- distance to keep from planets
enemy_dist = 800 -- distance to keep from enemies
-- Required control rate
control_rate = 2
-- Required "control" function
function control ()
task = ai.taskname()
if task == nil or task == "idle" then
... | gpl-3.0 |
KayMD/Illarion-Content | monster/base/quests.lua | 4 | 15012 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope th... | agpl-3.0 |
hossein101/Darkhand | bot/darkhandbot.lua | 1 | 10014 | 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 |
nobie/sesame_fw | feeds/luci/applications/luci-statistics/dist/usr/lib/lua/luci/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 |
litnimax/luci | 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... | apache-2.0 |
gajop/Zero-K | units/armkam.lua | 1 | 6213 | unitDef = {
unitname = [[armkam]],
name = [[Banshee]],
description = [[Raider Gunship]],
acceleration = 0.18,
brakeRate = 0.2,
buildCostEnergy = 220,
buildCostMetal = 220,
builder = false,
buildPic ... | gpl-2.0 |
KayMD/Illarion-Content | triggerfield/galmair_bridges_660.lua | 2 | 7563 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
wangtianhang/UnityLuaTest | UnityLuaTest/Luajit/jit/p.lua | 55 | 9135 | ----------------------------------------------------------------------------
-- LuaJIT profiler.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-- This modul... | mit |
nobie/sesame_fw | feeds/luci/libs/httpclient/luasrc/httpclient.lua | 41 | 9111 | --[[
LuCI - Lua Development Framework
Copyright 2009 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
$Id$
]]--
requi... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/applications/luci-vnstat/luasrc/model/cbi/vnstat.lua | 90 | 2019 | --[[
LuCI - Lua Configuration Interface
Copyright 2010-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
]]--
loc... | gpl-2.0 |
Flourish-Team/Flourish | Premake/source/tests/base/test_include.lua | 16 | 1678 | --
-- tests/base/test_include.lua
-- Test the include() function, for including external scripts
-- Copyright (c) 2011-2014 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("include")
--
-- Setup and teardown
--
function suite.teardown()
-- clear the list of included files... | mit |
tehran980/TeleSeed | 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 |
gajop/Zero-K | scripts/factoryplane.lua | 16 | 4552 | include "constants.lua"
local spGetUnitTeam = Spring.GetUnitTeam
--pieces
local base = piece "base"
local bay = piece "bay"
local narm1 = piece "narm1"
local nano1 = piece "nano1"
local emit1 = piece "emit1"
local arm1b = piece "arm1b"
local arm1 = piece "arm1"
local arm1top = piece "arm1top"
local arm1bot = piece "... | gpl-2.0 |
kkitsune/GoblinEngine | engine/libs/bgfx/bgfx/scripts/genie.lua | 4 | 8682 | --
-- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
newoption {
trigger = "with-amalgamated",
description = "Enable amalgamated build.",
}
newoption {
trigger = "with-ovr",
description = "Enable OculusVR integration.",
}
newoptio... | mit |
shahabsaf1/EMC-Project | plugins/sudo.lua | 14 | 1877 | function run_sh(msg)
name = get_name(msg)
text = ''
-- if config.sh_enabled == false then
-- text = '!sh command is disabled'
-- else
-- if is_sudo(msg) then
-- bash = msg.text:sub(4,-1)
-- text = run_bash(bash)
-- else
-- text = name .. ' yo... | gpl-2.0 |
KayMD/Illarion-Content | item/id_1208_sandpit.lua | 1 | 1057 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | agpl-3.0 |
nobie/sesame_fw | feeds/luci/modules/freifunk/luasrc/model/cbi/freifunk/basics.lua | 74 | 3518 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 Manuel Munz <freifunk at somakoma de>
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:... | gpl-2.0 |
kiarash14/BumperTG | plugins/media.lua | 376 | 1679 | 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 |
iainmerrick/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/template_class.lua | 41 | 1829 |
_global_templates = {}
classTemplateClass = {
name = '',
body = '',
parents = {},
args = {}, -- the template arguments
}
classTemplateClass.__index = classTemplateClass
function classTemplateClass:throw(types, local_scope)
--if table.getn(types) ~= table.getn(self.args) then
-- error("#invalid parameter co... | mit |
KayMD/Illarion-Content | content/oldSlimeFeeding.lua | 2 | 9889 | --[[
Illarion Server
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
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope th... | agpl-3.0 |
nobie/sesame_fw | feeds/luci/modules/niu/luasrc/model/cbi/niu/wireless/bridge.lua | 51 | 2481 | local uci = require "luci.model.uci"
local cursor = uci.cursor()
if not cursor:get("wireless", "bridge") then
cursor:section("wireless", "wifi-iface", "bridge",
{device = "_", doth = "1", _niu = "1", mode = "sta", wds = "1"})
cursor:save("wireless")
end
local function deviceroute(self)
cursor:unload("wireless")
... | gpl-2.0 |
adel8268adelad/Bot-thebest | plugins/gif.lua | 15 | 1758 | do
local BASE_URL = 'http://api.giphy.com/v1'
local API_KEY = 'dc6zaTOxFJmzC' -- public beta key
local function get_image(response)
local images = json:decode(response).data
if #images == 0 then return nil end -- No images
local i = math.random(#images)
local image = images[i] -- A random one
if image.ima... | agpl-3.0 |
coral-framework/coral | modules/co/compiler/module/componentBaseHeader.lua | 1 | 2310 | local function template( writer, c, t )
c.header( writer, c, "Base class generated for component '", t.fullName, "'" )
writer( [[
#ifndef _]], t.fullNameUpperUnderline, [[_BASE_H_
#define _]], t.fullNameUpperUnderline, [[_BASE_H_
]] )
local headers = t.includedHeaders
for i = 1, #headers do
writer( "#include ... | mit |
pixeltailgames/gm-mediaplayer | lua/mediaplayer/services/youtube/init.lua | 1 | 5331 | AddCSLuaFile "shared.lua"
include "shared.lua"
local TableLookup = MediaPlayerUtils.TableLookup
---
-- Helper function for converting ISO 8601 time strings; this is the formatting
-- used for duration specified in the YouTube v3 API.
--
-- http://stackoverflow.com/a/22149575/1490006
--
local function convertISO8601Ti... | mit |
cshore/packages | net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua | 12 | 11317 | module("luci.controller.mwan3", package.seeall)
sys = require "luci.sys"
ut = require "luci.util"
ip = "/usr/bin/ip -4 "
function index()
if not nixio.fs.access("/etc/config/mwan3") then
return
end
entry({"admin", "network", "mwan"},
alias("admin", "network", "mwan", "overview"),
_("Load Balancing"), 600)
... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/applications/luci-coovachilli/luasrc/model/cbi/coovachilli_network.lua | 79 | 1639 | --[[
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 |
nobie/sesame_fw | feeds/luci/applications/luci-coovachilli/dist/usr/lib/lua/luci/model/cbi/coovachilli_network.lua | 79 | 1639 | --[[
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 |
nanobox-io/tag | deps/cauterize/lib/group.lua | 2 | 1570 | -- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*-
-- vim: ts=4 sw=4 ft=lua noet
----------------------------------------------------------------------
-- @author Daniel Barney <daniel@pagodabox.com>
-- @copyright 2015, Pagoda Box, Inc.
-- @doc
--
-- @end
-- Created : 19 May 2015 by Daniel Barney... | mit |
nobie/sesame_fw | feeds/luci/applications/luci-asterisk/dist/usr/lib/lua/luci/model/cbi/asterisk/trunk_sip.lua | 80 | 2561 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
l... | gpl-2.0 |
arya5123/tell | setrank.lua | 1 | 8916 | do
local Dev = 98962756 --put your id here(BOT OWNER ID)
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, 'مقام کاربر ... | gpl-2.0 |
mardraze/prosody-modules | mod_carbons_adhoc/mod_carbons_adhoc.lua | 32 | 1256 | -- Implement a Adhoc command which will show a user
-- the status of carbons generation in regard to his clients
--
-- Copyright (C) 2012 Michael Holzt
--
-- This file is MIT/X11 licensed.
local st = require "util.stanza";
local jid_bare = require "util.jid".bare;
local adhoc_new = module:require "adhoc".new;
local xm... | mit |
drogers141/mac-hammerspoon | winops.lua | 1 | 2488 | -- Operations on windows that make use of lower level utils
-- among the functions here are those intended to be bound to keys
winops = {}
local winutil = dofile(package.searchpath("winutil", package.path))
local fn = hs.fnutils
-----------------------------------------------------------
-- Window Movement and Resizi... | mit |
duk3luk3/MoonGen | lua/include/lib/StackTracePlus/init.lua | 44 | 12501 | -- tables
local _G = _G
local string, io, debug, coroutine = string, io, debug, coroutine
-- functions
local tostring, print, require = tostring, print, require
local next, assert = next, assert
local pcall, type, pairs, ipairs = pcall, type, pairs, ipairs
local error = error
assert(debug, "debug table must... | mit |
cshore/packages | utils/luci-app-lxc/files/controller/lxc.lua | 26 | 4082 | --[[
LuCI LXC module
Copyright (C) 2014, Cisco Systems, 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
Author: Petar Koretic <petar.koretic@sart... | gpl-2.0 |
mua/BlockingBad | support.lua | 1 | 4793 | ----------------------------
-- Author: M. Utku Altinkaya
-- utkualtinkaya@gmail.com
----------------------------
-- some support functions I've took from Lua Wiki
function Class( baseClass )
local new_class = {}
local class_mt = { __index = new_class }
function new_class:create(...)
local newinst... | bsd-3-clause |
gajop/Zero-K | scripts/armpw.lua | 15 | 3943 |
include "constants.lua"
-- pieces
local head = piece "head"
local hips = piece "hips"
local chest = piece "chest"
-- left arm
local lshoulder = piece "lshoulder"
local lforearm = piece "lforearm"
local gun = piece "gun"
local magazine = piece "magazine"
local flare = piece "flare"
local ejector = piece "ejector"
--... | gpl-2.0 |
Shayan123456/bottt | plugins/Boobs.lua | 150 | 1613 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/applications/luci-olsr/dist/usr/lib/lua/luci/model/cbi/olsr/olsrdplugins.lua | 54 | 7297 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://w... | gpl-2.0 |
antoche/openvibe | openvibe-scenarios/trunc/share/openvibe-scenarios/bci/motor-imagery/motor-imagery-bci-graz-stimulator.lua | 4 | 2295 | dofile("../share/openvibe-plugins/stimulation/lua-stimulator-stim-codes.lua")
function initialize(box)
number_of_trials = box:get_setting(2)
first_class = _G[box:get_setting(3)]
second_class = _G[box:get_setting(4)]
baseline_duration = box:get_setting(5)
wait_for_beep_duration = box:get_setting(6)
wait_for_cue_... | lgpl-2.1 |
nobie/sesame_fw | feeds/luci/modules/admin-mini/dist/usr/lib/lua/luci/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 |
nobie/sesame_fw | feeds/luci/applications/luci-minidlna/luasrc/controller/minidlna.lua | 73 | 1448 | --[[
LuCI - Lua Configuration Interface - miniDLNA support
Copyright 2012 Gabor Juhos <juhosg@openwrt.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... | gpl-2.0 |
AnsonSmith/kong | spec/plugins/ssl/access_spec.lua | 5 | 4011 | local spec_helper = require "spec.spec_helpers"
local ssl_util = require "kong.plugins.ssl.ssl_util"
local url = require "socket.url"
local IO = require "kong.tools.io"
local http_client = require "kong.tools.http_client"
local cjson = require "cjson"
local ssl_fixtures = require "spec.plugins.ssl.fixtures"
local STUB... | apache-2.0 |
casseveritt/premake | tests/actions/codeblocks/codeblocks_files.lua | 21 | 1664 | --
-- tests/actions/codeblocks/codeblocks_files.lua
-- Validate generation of files block in CodeLite C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.codeblocks_files = { }
local suite = T.codeblocks_files
local codeblocks = premake.codeblocks
--
-- Setup
--
local sln, prj
f... | bsd-3-clause |
gajop/Zero-K | LuaUI/Widgets/unit_shield_guard.lua | 12 | 18168 | -- $Id$
--[[
local versionName = "v1.0b"
function widget:GetInfo()
return {
name = "Shield Guard",
desc = versionName .. " Units walking with Area Shield will move at same speed. Area Shield will slow down for slow unit and fast unit will slow down for Area Shield. Work with GUARD (Area Shield) co... | gpl-2.0 |
amir32002/feedback-networks | lib/CoarseFineCriterion2.lua | 1 | 5412 | ------------------------------------------------------------------------
--[[FineCoarseCriterion ]]--
-- Lin Sun 2016@Stanford
------------------------------------------------------------------------
require 'nn'
require 'rnn'
local FineCoarseCriterion, parent = torch.class('nn.FineCoarseCriterion2', 'nn.Criterion')
... | mit |
gajop/Zero-K | LuaUI/i18nlib/spec/i18n_variants_spec.lua | 21 | 2057 | require 'spec.assert_same'
local variants = require 'i18n.variants'
describe("i18n.variants", function()
it("is a table", function()
assert_equal('table', type(variants))
end)
describe(".ancestry", function()
it("returns just the locale for simple locales", function()
assert_same(variants.ancestry... | gpl-2.0 |
danteinforno/wesnoth | data/ai/micro_ais/cas/ca_patrol.lua | 26 | 6200 | local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local function get_patrol(cfg)
local filter = cfg.filter or { id = cfg.id }
local patrol = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }
}[1]... | gpl-2.0 |
Mistranger/OpenRA | mods/cnc/maps/gdi01/gdi01.lua | 5 | 3949 | --[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you 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 vers... | gpl-3.0 |
gajop/Zero-K | LuaRules/Configs/MetalSpots/Altair_Crossing-V1.lua | 38 | 1516 | return {
spots = {
{x = 3864, z = 2136, metal = 2.2},
{x = 888, z = 4024, metal = 1},
{x = 3944, z = 184, metal = 1},
{x = 568, z = 1928, metal = 2.2},
{x = 1528, z = 1560, metal = 2.6},
{x = 3640, z = 2056, metal = ... | gpl-2.0 |
mardraze/prosody-modules | mod_storage_multi/mod_storage_multi.lua | 32 | 2258 | -- mod_storage_multi
local storagemanager = require"core.storagemanager";
local backends = module:get_option_array(module.name); -- TODO better name?
-- TODO migrate data "upwards"
-- one → one successful write is success
-- all → all backends must report success
-- majority → majority of backends must report succes... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.