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 |
|---|---|---|---|---|---|
Alireza5928/pv | extra.lua | 8 | 1180 | function send_fwrd(chat_id, from_id, msg_id)
local urla = send_api.."/forwardMessage?chat_id="..chat_id.."&from_chat_id="..from_id.."&message_id="..msg_id
return send_req(urla)
end
function send_phone(chat_id, number, name)
local urla = send_api.."/sendContact?chat_id="..chat_id.."&phone_number="..url.escape(tonumb... | apache-2.0 |
yang2507366/Savanna | Savanna.bundle/UIKit/UIActionSheet.lua | 1 | 4623 | require "UIView"
require "AppContext"
require "CommonUtils"
require "StringUtils"
class(UIActionSheet, UIView);
function UIActionSheet:create(title, cancelButtonTitle, destructiveButtonTitle, ...--[[button titles]])
if not cancelButtonTitle then
cancelButtonTitle = "";
end
if not destructiveButton... | apache-2.0 |
TelegramDev/TeleMoon | bot/utils.lua | 473 | 24167 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
danteinforno/wesnoth | host.lua | 26 | 2733 | -- host.lua --
-- Try to host a game called "Test"
local function plugin()
local function log(text)
std_print("host: " .. text)
end
local counter = 0
local events, context, info
local helper = wesnoth.require("lua/helper.lua")
local function idle_text(text)
counter = counter + 1
if counter... | gpl-2.0 |
kmfreeminer/km-freeminer-mods | mods/jabber/lib/verse/client.lua | 2 | 6104 | local verse = require "verse";
local stream = verse.stream_mt;
local jid_split = require "util.jid".split;
local adns = require "net.adns";
local lxp = require "lxp";
local st = require "util.stanza";
-- Shortcuts to save having to load util.stanza
verse.message, verse.presence, verse.iq, verse.stanza, verse.reply, v... | gpl-3.0 |
litnimax/luci | applications/luci-p910nd/luasrc/model/cbi/p910nd.lua | 74 | 1512 | --[[
LuCI p910nd
(c) 2008 Yanira <forum-2008@email.de>
(c) 2012 Jo-Philipp Wich <jow@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.0... | apache-2.0 |
gajop/Zero-K | units/empmissile.lua | 2 | 3504 | unitDef = {
unitname = [[empmissile]],
name = [[Shockley]],
description = [[EMP missile]],
buildCostEnergy = 600,
buildCostMetal = 600,
builder = false,
buildPic = [[empmissile.png]],
buildTime = 600,
c... | gpl-2.0 |
CodeAnxiety/premake-core | tests/actions/vstudio/vc2010/test_vectorextensions.lua | 5 | 2057 | ---
-- tests/actions/vstudio/vc2010/test_vectorextensions.lua
-- Validate handling of vectorextensions() in VS 2010 C/C++ projects.
--
-- Created 26 Mar 2015 by Jason Perkins
-- Copyright (c) 2015 Jason Perkins and the Premake project
---
local suite = test.declare("vs2010_vc_vectorextensions")
local m = premake.vst... | bsd-3-clause |
gajop/Zero-K | scripts/armbrtha.lua | 11 | 1839 | local ground = piece 'ground'
local base = piece 'base'
local flare = piece 'flare'
local muzzle = piece 'muzzle'
local turret = piece 'turret'
local barrel = piece 'barrel'
local barrel_back = piece 'barrel_back'
local sleeve = piece 'sleeve'
include "constants.lua"
include "pieceControl.lua"
local spGetUnit... | gpl-2.0 |
punisherbot/botpunisher | plugins/ingroup.lua | 202 | 31524 | 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 |
KayMD/Illarion-Content | quest/iradona_goldschein_630_galmair.lua | 3 | 2984 | --[[
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 | LuaRules/Gadgets/weapon_area_damage.lua | 11 | 3637 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
Mutos/NAEV-StarsOfCall | dat/missions/flf/flf_pre02.lua | 4 | 18088 | --[[
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warra... | gpl-3.0 |
MOSAVI17/Anchor | plugins/img_google.lua | 660 | 3196 | do
local mime = require("mime")
local google_config = load_from_file('data/google.lua')
local cache = {}
--[[
local function send_request(url)
local t = {}
local options = {
url = url,
sink = ltn12.sink.table(t),
method = "GET"
}
local a, code, headers, status = http.request(options)
return tabl... | gpl-2.0 |
KayMD/Illarion-Content | triggerfield/donation_cadomyr.lua | 4 | 1768 | --[[
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 |
shahabsaf1/EMC-Project | bot/utils.lua | 28 | 14994 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
miralireza2/gpf | plugins/webshot.lua | 919 | 1473 | local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
method = "GET",
sink = ltn12.sink.table(response_body),
header... | gpl-2.0 |
kiarash14/BumperTG | plugins/webshot.lua | 919 | 1473 | local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
method = "GET",
sink = ltn12.sink.table(response_body),
header... | gpl-2.0 |
kiarash14/BumperTG | plugins/time.lua | 771 | 2865 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
ESMAILESMAIL/su | plugins/moderation.lua | 42 | 30441 | --------------------------------------------------
-- ____ ____ _____ --
-- | \| _ )_ _|___ ____ __ __ --
-- | |_ ) _ \ | |/ ·__| _ \_| \/ | --
-- |____/|____/ |_|\____/\_____|_/\/\_| --
-- --
--------------... | gpl-2.0 |
KayMD/Illarion-Content | npc/base/consequence/arena.lua | 3 | 1856 | --[[
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 |
torhve/ivar2 | modules/title/init.lua | 1 | 11482 | --- HTML Title resolving module
local util = require'util'
local simplehttp = util.simplehttp
local trim = util.trim
local uri_parse = util.uri_parse
local iconv = require"iconv"
local html2unicode = require'html'
local lfs = require'lfs'
local exif = require'exif'
local googlevision = require'googlevision' -- requires... | mit |
flexiti/nodemcu-firmware | lua_modules/ds18b20/ds18b20.lua | 54 | 3437 | --------------------------------------------------------------------------------
-- DS18B20 one wire module for NODEMCU
-- NODEMCU TEAM
-- LICENCE: http://opensource.org/licenses/MIT
-- Vowstar <vowstar@nodemcu.com>
-- 2015/02/14 sza2 <sza2trash@gmail.com> Fix for negative values
---------------------------------------... | mit |
ifoxhz/iFox | scripts/lua/if_pkt_distro.lua | 2 | 1241 | --
-- (C) 2013-15 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
interface.select(ifname)
ifstats = aggregateInterfaceStats(interface.getStats())
type = _GET["distr"]
if((type =... | gpl-3.0 |
litnimax/luci | applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua | 52 | 8016 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... | apache-2.0 |
abasshacker/abbas3 | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
tst2005/luacheck | spec/parser_spec.lua | 3 | 46935 | local parser = require "luacheck.parser"
local function strip_locations(ast)
ast.location = nil
ast.end_location = nil
ast.end_column = nil
ast.equals_location = nil
ast.first_token = nil
for i=1, #ast do
if type(ast[i]) == "table" then
strip_locations(ast[i])
end
end
end
lo... | mit |
nobie/sesame_fw | feeds/luci/contrib/luadoc/dist/usr/lib/lua/luadoc/taglet/standard/tags.lua | 93 | 5221 | -------------------------------------------------------------------------------
-- Handlers for several tags
-- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $
-------------------------------------------------------------------------------
local luadoc = require "luadoc"
local util = require "luadoc.util"... | gpl-2.0 |
arya5123/tell | plugins/stats.lua | 866 | 4001 | 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 |
cecile/Cecile_QuickLaunch | src/Cecile_QuickLaunch/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua | 20 | 12722 | --- AceConfigRegistry-3.0 handles central registration of options tables in use by addons and modules.\\
-- Options tables can be registered as raw tables, OR as function refs that return a table.\\
-- Such functions receive three arguments: "uiType", "uiName", "appName". \\
-- * Valid **uiTypes**: "cmd", "dropdown", "... | artistic-2.0 |
arya5123/tell | plugins/location.lua | 185 | 1565 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/libs/core/luasrc/model/firewall.lua | 84 | 11156 | --[[
LuCI - Firewall model
Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | gpl-2.0 |
KayMD/Illarion-Content | quest/lotte_silberstreif_672.lua | 3 | 2793 | --[[
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 | craft/final/armourer.lua | 2 | 29557 | --[[
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 |
kooiot/kooweb | apps/cloud/model/device/actions.lua | 1 | 2381 | --- The actions saved the redis first then will be polled by device
--
local redis = require 'resty.redis'
local logger = require 'lwf.logger'
local cjson = require 'cjson'
local _M = {}
local class = {}
_M.new = function(m)
local obj = {
lwf = m.lwf,
app = m.app,
con = con
}
return setmetatable(obj, {__ind... | gpl-2.0 |
kw217/omim | 3party/osrm/osrm-backend/profiles/testbot.lua | 69 | 3444 | -- Testbot profile
-- Moves at fixed, well-known speeds, practical for testing speed and travel times:
-- Primary road: 36km/h = 36000m/3600s = 100m/10s
-- Secondary road: 18km/h = 18000m/3600s = 100m/20s
-- Tertiary road: 12km/h = 12000m/3600s = 100m/30s
-- modes:
-- 1: normal
-- 2: route
-- 3: river downstream
... | apache-2.0 |
kooiot/kooweb | lwf/ltp/template.lua | 1 | 6553 | --
-- Copyright 2007-2008 Savarese Software Research Corporation.
--
-- 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.savarese.com/software/ApacheLicense-2.0
--
-- Unless... | gpl-2.0 |
wangtianhang/UnityLuaTest | toluaSnapshotTest/toluaRuntime/luajit-2.1/src/jit/v.lua | 54 | 5783 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | mit |
saydulk/newfies-dialer | lua/playarea/fsm.lua | 15 | 7426 | -- ==========================================================================================
--
-- Finite State Machine Class for Lua 5.1 & Corona SDK
--
-- Written by Erik Cornelisse, inspired by Luiz Henrique de Figueiredo
-- E-mail: e.cornelisse@gmail.com
--
-- Version 1.0 April 27, 2011
--
-- Class is MIT Lice... | mpl-2.0 |
jzbontar/nn | Euclidean.lua | 24 | 5711 | local Euclidean, parent = torch.class('nn.Euclidean', 'nn.Module')
function Euclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- state
self.gradInput:resize(inputSize)
self.output:resize(o... | bsd-3-clause |
wangtianhang/UnityLuaTest | toluaSnapshotTest/toluaUnityProject/Assets/ToLua/Lua/UnityEngine/Ray.lua | 6 | 1419 | --------------------------------------------------------------------------------
-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com
-- All rights reserved.
-- Use, modification and distribution are subject to the "MIT License"
-----------------------------------------------------------------... | mit |
flexiti/nodemcu-firmware | lua_examples/u8glib/u8g_graphics_test.lua | 43 | 4007 |
-- setup I2c and connect display
function init_i2c_display()
-- SDA and SCL can be assigned freely to available GPIOs
local sda = 5 -- GPIO14
local scl = 6 -- GPIO12
local sla = 0x3c
i2c.setup(0, sda, scl, i2c.SLOW)
disp = u8g.ssd1306_128x64_i2c(sla)
end
-- setup SPI and connect display
... | mit |
jzbontar/nn | SelectTable.lua | 24 | 1393 | local SelectTable, parent = torch.class('nn.SelectTable', 'nn.Module')
function SelectTable:__init(index)
parent.__init(self)
self.index = index
self.gradInput = {}
end
function SelectTable:updateOutput(input)
assert(math.abs(self.index) <= #input, "arg 1 table idx out of range")
if self.index < 0 then... | bsd-3-clause |
nobie/sesame_fw | feeds/luci/applications/luci-asterisk/dist/usr/lib/lua/luci/model/cbi/asterisk-voice.lua | 80 | 1493 | --[[
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 |
litnimax/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-voice.lua | 80 | 1493 | --[[
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 |
miralireza2/gpf | plugins/minecraft.lua | 624 | 2605 | local usage = {
"!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565",
"!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.",
}
local ltn12 = require "ltn12"
local function mineSearch(ip, port, receiver) --25565
local responseText = ""
l... | gpl-2.0 |
alirezafodaji/tele-Avast | plugins/location.lua | 93 | 1704 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
flike/Atlas | lib/histogram.lua | 40 | 5165 | --[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the
License.
This program is dis... | gpl-2.0 |
alirezafodaji/tele-Avast | plugins/boobs.lua | 90 | 1731 | 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 |
cecile/Cecile_QuickLaunch | src/Cecile_QuickLaunch/modules/utils/debug.lua | 2 | 7522 | ----------------------------------------------------------------------------------------------------
-- debug module, based on LibDebug-1.0.lua by Alkis & Evlogimenos
-- using lib debug will make all add-ons debug lines to show in the same window.
--get the engine and create the module
local Engine = select(2,...);
l... | artistic-2.0 |
CodeAnxiety/premake-core | src/_premake_main.lua | 4 | 7929 | --
-- _premake_main.lua
-- Script-side entry point for the main program logic.
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
--
local shorthelp = "Type 'premake5 --help' for help"
local versionhelp = "premake5 (Premake Build Script Generator) %s"
local startTime = os.clock()
-- set a g... | bsd-3-clause |
imLinder/dotfiles | .config/hammerspoon/Spoons/ControlEscape.spoon/init.lua | 3 | 3040 | --- === ControlEscape ===
---
--- Make the `control` key more useful: If the `control` key is tapped, treat it
--- as the `escape` key. If the `control` key is held down and used in
--- combination with another key, then provide the normal `control` key
--- behavior.
local obj={}
obj.__index = obj
-- Metadata
obj.nam... | mit |
DustinMorado/tomoauto | src/lib/tomoauto/settings/MOTIONCORR.lua | 1 | 4702 | --[[
Copyright (c) 2015 Dustin Reed Morado
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, publi... | mit |
cecile/Cecile_QuickLaunch | src/Cecile_QuickLaunch/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua | 22 | 7162 | --[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or... | artistic-2.0 |
thomas-schultz/sdn-cert | feature-tests/config/action_group_select.lua | 1 | 1275 | --[[
Feature test for group type SELECT
]]
require "feature_config"
local Feature = FeatureConfig.new()
Feature.require = "OpenFLow11"
Feature.state = "optional"
Feature.loadGen = "moongen"
Feature.files = "feature_test.lua"
Feature.lgArgs = "$file=1 $name $link=1 $link=2"
Feature.ofArgs = "$link=2"
... | gpl-2.0 |
dhotson/prosody-modules | mod_checkcerts/mod_checkcerts.lua | 29 | 2809 | local ssl = require"ssl";
local datetime_parse = require"util.datetime".parse;
local load_cert = ssl.loadcertificate;
local st = require"util.stanza"
-- These are in days.
local nag_time = module:get_option_number("checkcerts_notify", 7) * 86400;
if not load_cert then
module:log("error", "This version of LuaSec (%s)... | mit |
KayMD/Illarion-Content | monster/race_11_skeleton/default.lua | 3 | 1059 | --[[
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 |
Tarfand-pro/BDReborn | bot/utils.lua | 3 | 22540 | --Begin Utils.lua By #BeyondTeam :)
local clock = os.clock
function sleep(time) -- seconds
local t0 = clock()
while clock() - t0 <= time do end
end
function var_cb(msg, data)
-------------Get Var------------
bot = {}
msg.to = {}
msg.from = {}
msg.media = {}
msg.id = msg.id_
msg.to.type = gp_type(data.ch... | gpl-3.0 |
gajop/Zero-K | units/gunshipaa.lua | 2 | 6262 | unitDef = {
unitname = [[gunshipaa]],
name = [[Trident]],
description = [[Anti-Air Gunship]],
acceleration = 0.18,
airStrafe = 0,
amphibious = true,
bankingAllowed = false,
brakeRate = 0.5,
buildCostEner... | gpl-2.0 |
danteinforno/wesnoth | data/ai/micro_ais/cas/ca_hunter.lua | 26 | 8246 | local H = wesnoth.require "lua/helper.lua"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local function hunter_attack_weakest_adj_enemy(ai, hunter)
-- Attack the enemy with the fewest hitpoints adja... | gpl-2.0 |
nobie/sesame_fw | feeds/luci/libs/nixio/lua/nixio/util.lua | 179 | 5824 | --[[
nixio - Linux I/O library for lua
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$
]]--
local... | gpl-2.0 |
pixeltailgames/gm-mediaplayer | lua/mediaplayer/players/base/cl_init.lua | 1 | 3723 | include "shared.lua"
include "cl_draw.lua"
include "cl_fullscreen.lua"
include "net.lua"
local CeilPower2 = MediaPlayerUtils.CeilPower2
function MEDIAPLAYER:NetReadUpdate()
-- Allows for another media player type to extend update net messages
end
function MEDIAPLAYER:OnNetReadMedia( media )
-- Allows for another m... | mit |
litnimax/luci | modules/base/luasrc/ltn12.lua | 83 | 11303 | --[[
LuaSocket 2.0.2 license
Copyright � 2004-2007 Diego Nehab
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, me... | apache-2.0 |
KayMD/Illarion-Content | triggerfield/northernislands_air_661.lua | 4 | 1249 | --[[
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 |
elyasgalikeshi/renjer_bot | bot/utils.lua | 646 | 23489 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
wangtianhang/UnityLuaTest | protoBufTest/tolua_runtime_2019-09-08/luajit-2.1/src/jit/dis_arm64.lua | 59 | 30904 | ----------------------------------------------------------------------------
-- LuaJIT ARM64 disassembler module.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
-- S... | mit |
safavi1381/Mr_bot | plugins/twitter_send.lua | 627 | 1555 | do
local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local client = OAuth.new(consumer_key, consumer_secret, {
RequestToken = "https://api.twitter.com/oauth/request_token",
AuthorizeUser = {"https://api.twitter.com/oauth/autho... | gpl-2.0 |
gajop/Zero-K | LuaUI/Widgets/unit_ghostSite.lua | 3 | 7194 | -- $Id$
local versionNumber = "1.03"
local devCompat = Spring.Utilities.IsCurrentVersionNewerThan(100, 0)
function widget:GetInfo()
return {
name = "Ghost Site",
desc = "[v" .. string.format("%s", versionNumber) .. "] Displays ghosted buildings in progress and features",
author = "very_bad_soldier"... | gpl-2.0 |
lin-zhang/collision_avoidance | app_scripts/serial_PS2X_youbot_twist_uno.lua | 2 | 15177 | #!/usr/bin/env luajit
local ffi = require("ffi")
local ubx = require "ubx"
local ts = tostring
time=require("time")
ubx_utils = require("ubx_utils")
require"strict"
ni=ubx.node_create("testnode")
ubx.load_module(ni, "std_types/stdtypes/stdtypes.so")
ubx.load_module(ni, "std_types/testtypes/testtypes.so")
ubx.load_mod... | gpl-2.0 |
szaszg/lxc | src/lua-lxc/lxc.lua | 26 | 10159 | --
-- lua lxc module
--
-- Copyright © 2012 Oracle.
--
-- Authors:
-- Dwight Engen <dwight.engen@oracle.com>
--
-- This library 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.... | lgpl-2.1 |
gajop/Zero-K | effects/gundam_artillery_explosion.lua | 25 | 3488 | -- artillery_explosion
return {
["artillery_explosion"] = {
dirt = {
count = 4,
ground = true,
properties = {
alphafalloff = 2,
alwaysvisible = true,
color = [[0.2, 0.1, 0.05]],
pos = [[r-25 r25, 0, ... | gpl-2.0 |
jayman39tx/naev | dat/scripts/jumpdist.lua | 16 | 2247 | --[[
-- @brief Fetches an array of systems from min to max jumps away from the given
-- system sys.
--
-- The following example gets a random Sirius M class planet between 1 to 6 jumps away.
--
-- @code
-- local planets = {}
-- getsysatdistance( system.cur(), 1, 6,
-- function(s)
-- for i, v in ipair... | gpl-3.0 |
wangtianhang/UnityLuaTest | toluaSnapshotTest/toluaRuntime/luajit-2.1/src/host/genminilua.lua | 47 | 12039 | ----------------------------------------------------------------------------
-- Lua script to generate a customized, minified version of Lua.
-- The resulting 'minilua' is used for the build process of LuaJIT.
----------------------------------------------------------------------------
-- Copyright (C) 2005-2017 Mike P... | mit |
nobie/sesame_fw | feeds/luci/contrib/luadoc/lua/luadoc/taglet/standard.lua | 93 | 16319 | -------------------------------------------------------------------------------
-- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $
-------------------------------------------------------------------------------
local assert, pairs, tostring, type = assert, pairs, tostring, type
local io = require "io... | gpl-2.0 |
amir32002/feedback-networks | datasets/imagenet-gen.lua | 5 | 3893 | --
-- Copyright (c) 2016, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Script to co... | mit |
Proxmark/proxmark3 | client/scripts/didump.lua | 6 | 12186 | local cmds = require('commands')
local getopt = require('getopt')
local utils = require('utils')
local lib14a = require('read14a')
example =[[
script run didump
script run didump -k aabbccddeeff
]]
author = "Iceman"
usage = "script run didump -k <key> "
desc = [[
This is a script to dump and decrypt the data of a sp... | gpl-2.0 |
amir32002/feedback-networks | lib/ConvLSTM_resnet5aifc.lua | 1 | 12729 | --[[
Convolutional LSTM for short term visual cell
inputSize - number of input feature planes
outputSize - number of output feature planes
rho - recurrent sequence length
stride - convolutional stride, used for the larger images input
kc - convolutional filter size to convolve input
km - convolutional f... | mit |
gajop/Zero-K | gamedata/modularcomms/dyncomm_chassis_generator.lua | 2 | 4209 | local chassisDefs = {
{
name = "dynstrike1",
weapons = {
"commweapon_peashooter",
"commweapon_beamlaser",
"commweapon_lparticlebeam",
"commweapon_shotgun",
"commweapon_shotgun_disrupt",
"commweapon_disruptor",
"commweapon_heavymachinegun",
"commweapon_heavymachinegun_disrupt",
"commweapo... | gpl-2.0 |
gajop/Zero-K | scripts/armca.lua | 2 | 1097 | include "constants.lua"
local base = piece 'base'
local emit = piece 'emit'
local leftwing = piece 'leftwing'
local rightwing = piece 'rightwing'
local thrustb = piece 'thrustb'
local smokePiece = {base, emit, thrustb}
local nanoPieces = {emit}
function script.Create()
StartThread(SmokeUnit, smokePiece)
Spring.Se... | gpl-2.0 |
Zalgo2462/CSC542-DIP-1 | ip.lua | 1 | 136080 | package.preload["argumentDialog"] = load( "\27LJ\1\2\8\0\2\13\1(\0³\0017\2\0\1\7\2\1\0T\2Q7\2\2\1\6\2\3\0T\2\37\2\2\1\14\0\2\0T\2\264\2\4\0007\2\5\2\16\3\0\0004\4\4\0007\4\6\4%\5\7\0004\6\4\0007\6\8\0064\7\4\0007\7\9\0074\8\4\0007\8\
\0087\9\11\1\14\0\9\0T\
\1'\9\0\0007\
\12\1\14\0\
\0T\11\1'\
d\0007\11\13\1\14\0... | mit |
Mistranger/OpenRA | mods/d2k/maps/atreides-02a/atreides02a.lua | 5 | 3976 | --[[
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 |
nobie/sesame_fw | feeds/luci/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/disk.lua | 86 | 1449 | --[[
Luci statistics - df plugin diagram definition
(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 at
http://www.apache.... | gpl-2.0 |
arya5123/tell | plugins/danbooro.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
kapouer/upcache | upcache/lock.lua | 2 | 3930 | local jwt = require 'resty.jwt'
local validators = require "resty.jwt-validators"
local common = require 'upcache.common'
local console = common.console
local module = {}
local headerLock = common.prefixHeader .. "-Lock"
local headerKey = common.prefixHeader .. "-Lock-Key"
local headerVar = common.prefixHeader .. "-... | mit |
gajop/Zero-K | LuaUI/Widgets/gui_replace_cloak_con_order.lua | 12 | 2136 |
function widget:GetInfo()
return {
name = "Replace Cloak Con Orders",
desc = "Prevents constructor accidental decloak in enemy territory by replacing Repair, Reclaim and Rez with Move. .\n\nNOTE:Use command menu or command hotkeys to override.",
author = "GoogleFrog",
date = "13 Au... | gpl-2.0 |
Flourish-Team/Flourish | Premake/source/binmodules/luasocket/test/testmesg.lua | 45 | 2957 | -- load the smtp support and its friends
local smtp = require("socket.smtp")
local mime = require("mime")
local ltn12 = require("ltn12")
function filter(s)
if s then io.write(s) end
return s
end
source = smtp.message {
headers = { ['content-type'] = 'multipart/alternative' },
body = {
[1] = {
... | mit |
Flourish-Team/Flourish | Premake/source/src/base/field.lua | 15 | 9480 | ---
-- base/field.lua
--
-- Fields hold a particular bit of information about a configuration, such
-- as the language of a project or the list of files it uses. Each field has
-- a particular data "kind", which describes the structure of the information
-- it holds, such a simple string, or a list of paths.
--
-- The ... | mit |
hussian1997/bot-of-iraq | plugins/banhammer.lua | 8 | 16439 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY(@AHMED_ALOBIDE) ▀▄ ▄▀
▀▄ ▄▀ BY(@hussian_9) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄▀... | agpl-3.0 |
kidaa/lua-path | lua/path/win32/fs.lua | 3 | 35241 | --[[ note GetTempPath
GetTempPath() might ignore the environment variables it's supposed to use (TEMP, TMP, ...) if they are more than 130 characters or so.
http://blogs.msdn.com/b/larryosterman/archive/2010/10/19/because-if-you-do_2c00_-stuff-doesn_2700_t-work-the-way-you-intended_2e00_.aspx
---------------
Limit of... | mit |
miralireza2/gpf | bot/bot.lua | 4 | 7095 | 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 = '0.14.6'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
r... | gpl-2.0 |
KayMD/Illarion-Content | item/id_126_sickle.lua | 1 | 1989 | --[[
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 |
Mutos/NAEV-StarsOfCall | docs/ai/examples/attacked.lua | 19 | 1323 | --[[
-- Based on when pilot is hit by something, then will attempt to retaliate
--]]
-- triggered when pilot is hit by something
function attacked ( attacker )
task = ai.taskname()
if task ~= "attack" and task ~= "runaway" then
-- some taunting
taunt( attacker )
-- now pilot fights back
... | gpl-3.0 |
dansen/luacode | bin/debug/lua/util/json.lua | 3 | 18228 | -----------------------------------------------------------------------------
-- JSON4Lua: JSON encoding / decoding support for the Lua language.
-- json Module.
-- Author: Craig Mason-Jones
-- Homepage: http://json.luaforge.net/
-- Version: 0.9.50
-- This module is released under the MIT License (MIT).
-- Please see L... | mit |
cecile/Cecile_QuickLaunch | src/Cecile_QuickLaunch/libs/LibStub/LibStub.lua | 184 | 1367 | -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVI... | artistic-2.0 |
gajop/Zero-K | scripts/cruisemissile.lua | 7 | 1222 | include "constants.lua"
local base = piece 'base'
function script.AimWeapon1(heading, pitch) return true end
local function RemoveMissile()
Spring.SetUnitNoSelect(unitID, true)
Spring.SetUnitNoDraw(unitID, true)
Spring.SetUnitNoMinimap(unitID, true)
Spring.SetUnitHealth(unitID, {paralyze=99999999})
Spring.SetU... | gpl-2.0 |
pixeltailgames/gm-mediaplayer | lua/mediaplayer/players/base/cl_fullscreen.lua | 1 | 2312 | local pcall = pcall
local Color = Color
local RealTime = RealTime
local ScrW = ScrW
local ScrH = ScrH
local ValidPanel = ValidPanel
local Vector = Vector
local cam = cam
local draw = draw
local math = math
local string = string
local surface = surface
local FullscreenCvar = MediaPlayer.Cvars.Fullscreen
--[[----------... | mit |
Sojerbot/javan | plugins/music.lua | 1 | 2312 | --[[
#
# Music Downloader
#
# @Dragon_Born
# @GPMod
#
#
]]
local function musiclink(msg, musicid)
local value = redis:hget('music:'..msg.to.id, musicid)
if not value then
return
else
value = value..'\n\n@GPMod'
return value
end
end
------------------ Seconds To Minutes alg ------------------
function se... | gpl-2.0 |
gajop/Zero-K | LuaRules/Configs/tactical_ai_defs.lua | 2 | 23803 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local function Union(t1, t2)
local ret = {}
for i, v in pairs(t1) do
ret[i] = v
end
for i, v in pairs(t2) do
ret[i] = v
end
return ret
end
local f... | gpl-2.0 |
Sweet-kid/Algorithm-Implementations | Lempel_Ziv_Welch/Lua/Yonaba/lzw_test.lua | 26 | 1030 | -- Tests for lzw.lua
local lzw = require 'lzw'
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
local status = ok... | mit |
jayman39tx/naev | dat/missions/empire/longdistanceshipping/emp_longdistancecargo2.lua | 2 | 3098 | --[[
Second diplomatic mission to Dvaered space that opens up the Empire long-distance cargo missions.
Author: micahmumper
]]--
include "dat/scripts/numstring.lua"
include "dat/scripts/jumpdist.lua"
bar_desc = _("Lieutenant Czesc from the Empire Armada Shipping Division is sitting at the bar.")
misn_title = ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.