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 |
|---|---|---|---|---|---|
wagonrepairer/Zero-K | effects/freedom_fighter.lua | 25 | 5564 | -- ffejector
-- ff_wingtips
-- ffmuzzle
-- ff_engine
-- ff_puff
return {
["ffejector"] = {
usedefaultexplosions = false,
shells = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = ... | gpl-2.0 |
diz-vara/nn | hessian.lua | 8 | 16620 | ----------------------------------------------------------------------
-- hessian.lua: this file appends extra methods to modules in nn,
-- to estimate diagonal elements of the Hessian. This is useful
-- to condition learning rates individually.
----------------------------------------------------------------------
nn.... | bsd-3-clause |
shingenko/darkstar | scripts/zones/Windurst_Walls/npcs/Yoriri.lua | 38 | 1403 | -----------------------------------
-- Area: Windurst Walls
-- NPC: Yoriri
-- Type: Standard NPC
-- @pos 65.268 -8.5 -58.309 239
-----------------------------------
package.loaded["scripts/zones/Windurst_Walls/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts... | gpl-3.0 |
shingenko/darkstar | scripts/zones/Spire_of_Vahzl/npcs/_0n0.lua | 17 | 1491 | -----------------------------------
-- Area: Spire of Vahzl
-- NPC: Web of Recollection
-----------------------------------
package.loaded["scripts/zones/Spire_of_Vahzl/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/bcnm");
require("scripts/globals/quests");
require("scripts/gl... | gpl-3.0 |
shingenko/darkstar | scripts/zones/North_Gustaberg/MobIDs.lua | 36 | 1422 | -----------------------------------
-- Area: North Gustaberg
-- Comments: -- posX, posY, posZ
--(Taken from 'mob_spawn_points' table)
-----------------------------------
-- Stinging Sophie
Stinging_Sophie=17211561;
Stinging_Sophie_PH={
[17211532] = '1', -- 352.974, -40.359, 472.914
[17211534] = '1', -- ... | gpl-3.0 |
shingenko/darkstar | scripts/zones/Southern_San_dOria/npcs/qm3.lua | 31 | 1464 | -----------------------------------
-- Area: Southern San d'Oria
-- NPC: The Picture ??? in Vemalpeau's house
-- Involved in Quests: Under Oath
-----------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
... | gpl-3.0 |
shingenko/darkstar | scripts/zones/Spire_of_Vahzl/Zone.lua | 17 | 1582 | -----------------------------------
--
-- Zone: Spire_of_Vahzl (23)
--
-----------------------------------
package.loaded["scripts/zones/Spire_of_Vahzl/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Spire_of_Vahzl/TextIDs");
require("scripts/g... | gpl-3.0 |
lixiantai/barrier_breaker | feeds/luci/applications/luci-statistics/luasrc/statistics/rrdtool.lua | 69 | 15320 | --[[
Luci statistics - rrdtool interface library / diagram model interpreter
(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
... | gpl-2.0 |
shingenko/darkstar | scripts/globals/mobskills/Vitriolic_spray.lua | 16 | 1053 | ---------------------------------------------
-- Vitriolic Spray
-- Family: Wamouracampa
-- Description: Expels a caustic stream at targets in a fan-shaped area of effect. Additional effect: Burn
-- Type: Magical
-- Utsusemi/Blink absorb: Wipes shadow
-- Range: Cone
-- Notes: Burn is 10-30/tic
----------... | gpl-3.0 |
obsy/luci | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua | 68 | 2536 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("luci_statistics",
translate("Exec Plugin Configuration"),
translate(
"The exec plugin starts external commands to read values " ..
"from or to notify external processes when cer... | apache-2.0 |
wagonrepairer/Zero-K | LuaRules/Gadgets/mex_placement.lua | 2 | 4955 | --------------------------------------------------------------------------------
-- SYNCED
--------------------------------------------------------------------------------
if (not gadgetHandler:IsSyncedCode()) then
return
end
function gadget:GetInfo()
return {
name = "Mex Placement",
desc = "Cont... | gpl-2.0 |
emoon/ProDBG | bin/macosx/tundra/scripts/tundra/ide/xcode7.lua | 9 | 39473 | -- Xcode 7 Workspace/Project file generation
module(..., package.seeall)
local path = require "tundra.path"
local nodegen = require "tundra.nodegen"
local util = require "tundra.util"
local native = require "tundra.native"
local os = require "os"
local function newid(data)
local string = native.digest_guid(data)
... | mit |
uhvhugvhhbbh545hhhyg/rekjx | plugins/on-off.lua | 11 | 1983 | -- Checks if bot was disabled on specific chat
local function is_channel_disabled( receiver )
if not _config.disabled_channels then
return false
end
if _config.disabled_channels[receiver] == nil then
return false
end
return _config.disabled_channels[receiver]
end
local function enable_channel(receiver)
if... | gpl-2.0 |
RuiChen1113/luci | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/startup.lua | 74 | 2567 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2010-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2010 Manuel Munz <freifunk at somakoma dot de>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local inits = { }
for _, name ... | apache-2.0 |
mms92/wire | lua/wire/client/hlzasm/hc_compiler.lua | 6 | 26826 | --------------------------------------------------------------------------------
-- HCOMP / HL-ZASM compiler
--
-- This is a high-level assembly language compiler, based on ZASM2 and C syntax.
--
-- I tried to make the compiler as understandable as possible, but you will need
-- to read the source files in this order t... | apache-2.0 |
zhukunqian/slua-1 | build/luajit-2.1.0/src/jit/dis_arm.lua | 78 | 19363 | ----------------------------------------------------------------------------
-- LuaJIT ARM disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
-... | mit |
mms92/wire | lua/entities/gmod_wire_expression2/core/serverinfo.lua | 7 | 1485 | /******************************************************************************\
Server Information
\******************************************************************************/
e2function string map()
return game.GetMap()
end
local hostname = GetConVar("hostname")
e2function string hostname()
return hostname:... | apache-2.0 |
NPLPackages/TableDB | npl_mod/Raft/RaftClient.lua | 1 | 7143 | --[[
Title:
Author: liuluheng
Date: 2017.03.25
Desc:
------------------------------------------------------------
NPL.load("(gl)npl_mod/Raft/RaftClient.lua");
local RaftClient = commonlib.gettable("Raft.RaftClient");
------------------------------------------------------------
]]
--
NPL.load("(gl)npl_mod/Raft/Rpc.lua... | gpl-2.0 |
RailTracker/OpenRA | mods/cnc/maps/nod06b/nod06b.lua | 25 | 7008 | NodUnitsVehicle1 = { 'bggy', 'bggy', 'bike', 'bike', 'bike' }
NodUnitsVehicle2 = { 'ltnk', 'ltnk', 'ltnk' }
NodUnitsGunner = { 'e1', 'e1', 'e1', 'e1', 'e1', 'e1' }
NodUnitsRocket = { 'e3', 'e3', 'e3', 'e3', 'e3', 'e3' }
Gdi1Units = { 'e1', 'e1', 'e2', 'e2', 'e2' }
HuntCellTriggerActivator = { CPos.New(61,34), CPos.New... | gpl-3.0 |
mms92/wire | lua/entities/gmod_wire_expression2/core/e2doc.lua | 10 | 5189 | local eliminate_varname_conflicts = true
if not e2_parse_args then include("extpp.lua") end
local readfile = readfile or function(filename)
return file.Read("entities/gmod_wire_expression2/core/" .. filename, "LUA")
end
local writefile = writefile or function(filename, contents)
print("--- Writing to file 'data/e2d... | apache-2.0 |
jnehl701/ACS | scripts/settings/Vel.lua | 1 | 2760 | -- Settings for the system.
-- These are true or false
canFocus = false
canTree = true
canClot = true
canParry = true
living = false
artiPipes = false
PRERESTORE_THRESHOLD = 15
-- Your preferred pagelength
defaultPagelength = 30
-- If you want selfishness to be kept up.
keepSelfishUp = false
-- If you have an allsi... | gpl-2.0 |
aqasaeed/hesamfix | plugins/inpm.lua | 10 | 4114 | 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 |
jnehl701/ACS | scripts/settings/Neithan.lua | 1 | 3269 | -- Settings for the system.
-- These are true or false
canFocus = true
canTree = true
canClot = true
canParry = true
living = true
artiPipes = false
-- If you want selfishness to be kept up.
keepSelfishUp = false
-- If you have an allsignt enchantment, put it here.
-- If not, leave a blank string.
all... | gpl-2.0 |
Noneatme/mta-lostresources | [gamemodes]/Multistunt/server/spawnveh.lua | 1 | 5329 | addEvent("onMultistuntVehicleSpawn", true)
addEvent("onMultistuntVehicleDelete", true)
addEvent("onMultistuntVehicleCall", true)
local function createPlayerCar(thePlayer, id)
local veh1, veh2, nextveh = getElementData(thePlayer, "msv.1"), getElementData(thePlayer, "msv.2"), getElementData(thePlayer, "msv.nextveh")
l... | gpl-2.0 |
foxey/Ventilator | test/test-mcl.lua | 1 | 2536 | -- Tests for avg.lua (Mathematical class library)
-- Written by Michiel Fokke <michiel@fokke.org>
-- MIT license, http://opensource.org/licenses/MIT
-- use with 'shake' (http://shake.luaforge.net)
package.path = package.path..';../?.lua'
require 'mcl'
a = newRingbuffer()
assert (type(a) == 'table', "a should be a tab... | mit |
RobertoMalatesta/ProDBG | bin/macosx/tundra/scripts/tundra/boot.lua | 25 | 4138 | module(..., package.seeall)
-- Use "strict" when developing to flag accesses to nil global variables
-- This has very low perf impact (<0.1%), so always leave it on.
require "strict"
local os = require "os"
local platform = require "tundra.platform"
local util = require "tundra.util"
local depgraph = re... | mit |
sigma-random/PrefSDK | formats/pe/definition.lua | 1 | 2548 | local pref = require("pref")
local Address = require("sdk.math.address")
local PeFunctions = require("formats.pe.functions")
local DosHeader = require("formats.pe.dosheader")
local NtHeaders = require("formats.pe.ntheaders")
local SectionTable = require("formats.pe.sectiontable")
local DataDirectory = require("formats.... | gpl-3.0 |
nkcfan/Dotfiles | .config/nvim/lua/gitsigns_config.lua | 1 | 1882 | local gitsigns = require("gitsigns")
local function map(mode, lhs, rhs, opts)
opts = vim.tbl_extend("force", { noremap = true, silent = true }, opts or {})
vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts)
end
gitsigns.setup({
current_line_blame = true,
current_line_blame_opts = {
virt_text... | mit |
shkan/telebot7 | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
mohammadtofani/seedmn | plugins/all.lua | 36 | 4653 | do
data = load_data(_config.moderation.data)
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_print... | gpl-2.0 |
zackp30/cuberite | MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua | 6 | 2109 | return
{
HOOK_PLAYER_PLACING_BLOCK =
{
CalledWhen = "Just before a player places a block. Plugin may override / refuse.",
DefaultFnName = "OnPlayerPlacingBlock", -- also used as pagename
Desc = [[
This hook is called just before a {{cPlayer|player}} places a block in the {{cWorld|world}}. The
block is no... | apache-2.0 |
kamichidu/lua-jclass | lib/util/parser/field_descriptor.lua | 1 | 2108 | local prototype= require 'prototype'
local lookahead_queue= require 'util.lookahead_queue'
local field_descriptor= prototype {
default= prototype.assignment_copy,
}
function field_descriptor:parse(s)
assert(s, 'cannot parse nil value')
local input= lookahead_queue.from_string(s)
local t= self:field_... | mit |
coronalabs/framework-widget | widgetLibrary/widget_button.lua | 1 | 52381 |
-- Abstract: widget.newButton()
-- Code is MIT licensed; see https://www.coronalabs.com/links/code/license
---------------------------------------------------------------------------------------
local M =
{
_options = {},
_widgetName = "widget.newButton",
}
-- Require needed widget files
local _widget = require(... | mit |
Digitrick-ir/TabChi | dkjson.lua | 1 | 26555 | -- Module options:
local always_try_using_lpeg = true
local register_global_module_table = false
local global_module_name = 'json'
--[==[
David Kolf's JSON module for Lua 5.1/5.2
========================================
*Version 2.4*
In the default configuration this module writes no global values, no... | gpl-3.0 |
PradheepShrinivasan/redis | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
hbl0307106015/packages | net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua | 82 | 4185 | -- ------ extra functions ------ --
function ruleCheck() -- determine if rule needs a protocol specified
local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".src_port"))
local destPort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".dest_port"))
if sourcePort ~= "" or d... | gpl-2.0 |
luadch/luadch | scripts/bot_opchat.lua | 1 | 13910 | --[[
bot_opchat.lua by blastbeat
- this script regs a op chat with chat history
- it exports also a module to access the op chat from other scripts
v0.17: by pulsar
- completed the 'hide bot on missing permission' part
v0.16: by pulsar
- remove... | gpl-3.0 |
liuxuezhan/skynet | lualib/skynet/db/mongo.lua | 1 | 16884 | local bson = require "bson"
local socket = require "skynet.socket"
local socketchannel = require "skynet.socketchannel"
local skynet = require "skynet"
local driver = require "skynet.mongo.driver"
local md5 = require "md5"
local crypt = require "skynet.crypt"
local rawget = rawget
local assert = assert
local table = ta... | mit |
keneanung/mudlet | src/mudlet-lua/lua/geyser/GeyserMapper.lua | 21 | 1556 | --------------------------------------
-- --
-- The Geyser Layout Manager by guy --
-- createMapper support by Vadi --
-- --
--------------------------------------
--- Represents a mapper primitive
-- @class table
-- @name Geyser.Mapper
-- @field wrapAt Where line wrapping occurs. Default is 300 characters.
Geyser.Map... | gpl-2.0 |
LuaDist2/luassert | src/languages/fr.lua | 6 | 1195 | local s = require('say')
s:set_namespace("fr")
s:set("assertion.same.positive", "Objets supposes de meme nature attendus.\nArgument passe:\n%s\nAttendu:\n%s")
s:set("assertion.same.negative", "Objets supposes de natures differentes attendus.\nArgument passe:\n%s\nNon attendu:\n%s")
s:set("assertion.equals.positive",... | mit |
rosejn/lua-fn | test/test_seq.lua | 1 | 4486 | require 'fn'
require 'fn/seq'
function tests.test_realizers()
local coll = {a = 1, b = 2, c = 3}
local res = seq.table(seq.keys(coll))
table.sort(res)
tester:assertTableEq(res, {'a', 'b', 'c'}, "test seq.table")
-- TODO: can't really test seq.tensor like this because we can't guarantee
-- the ... | bsd-3-clause |
AbolDalton/king | plugins/ap.lua | 1 | 1589 | -- GNU nano 2.2.6 File: ...i/a/plugins/addplug.lua Modified
local function run(msg, matches)
if is_sudo(msg) then
local text = matches[1]
local b = 1... | gpl-2.0 |
RailTracker/OpenRA | mods/ra/maps/soviet-07/soviet07.lua | 6 | 12673 | if Map.LobbyOption("difficulty") == "easy" then
remainingTime = DateTime.Minutes(7)
elseif Map.LobbyOption("difficulty") == "normal" then
remainingTime = DateTime.Minutes(6)
elseif Map.LobbyOption("difficulty") == "hard" then
remainingTime = DateTime.Minutes(5)
end
Dogs = { Dog1, Dog2, Dog3, Dog4, Dog5, Dog6, Dog7,... | gpl-3.0 |
cryovat/lord-evil-game | src/level/test.lua | 1 | 1094 | local fw = require "fw.init"
local level = fw.gamestate.newLevel()
function level:load()
local dude, atlas, sprite, batch, map = nil, nil, nil, nil, nil
dude = love.graphics.newImage("gfx/external/dynamiteguy.png")
batch = love.graphics.newSpriteBatch(dude)
atlas = fw.graphics.newAtlas(dude:getWidth(),... | mit |
zackp30/cuberite | MCServer/Plugins/APIDump/Classes/WebAdmin.lua | 28 | 2144 | return
{
cWebAdmin =
{
Desc = "",
Functions =
{
GetHTMLEscapedString = { Params = "string", Return = "string", Notes = "(STATIC) Gets the HTML-escaped representation of a requested string. This is useful for user input and game data that is not guaranteed to be escaped already." },
},
}, -- cWebAdmin
... | apache-2.0 |
vipteam1/VIPTEAM | plugins/sudo.lua | 1 | 1227 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ File name : ( #اسم الملف هنا ) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀
▀▄... | gpl-2.0 |
zhukunqian/slua-1 | build/luajit-2.1.0/src/jit/dis_ppc.lua | 78 | 20318 | ----------------------------------------------------------------------------
-- LuaJIT PPC disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------... | mit |
lovetoys/Lovetoys-Astar | src/helper/tables.lua | 3 | 4481 | -- Returns the key of an element inside that table
function table.getKey(list, element)
for index, value in pairs(list) do
if value == element then
return index
end
end
return false
end
function table.count(list)
local counter = 0
for index, value in pairs(list) do
... | mit |
TeleDALAD/f | plugins/welcome.lua | 190 | 3526 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
Noneatme/mta-lostresources | [gameplay]/FlappyBirds/client/cFlappyUI.lua | 1 | 4159 | -- #######################################
-- ## Project: MTA FlappyBird ##
-- ## Name: FlappyUI.lua ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSe... | gpl-2.0 |
botiiing/BDReborn | libs/dateparser.lua | 114 | 6213 | local difftime, time, date = os.difftime, os.time, os.date
local format = string.format
local tremove, tinsert = table.remove, table.insert
local pcall, pairs, ipairs, tostring, tonumber, type, setmetatable = pcall, pairs, ipairs, tostring, tonumber, type, setmetatable
local dateparser={}
--we shall use the host OS's... | gpl-3.0 |
tpoisot/dotfiles | .config/awesome/themes/default/theme.lua | 1 | 5968 | ---------------------------
-- Default awesome theme --
---------------------------
theme = {}
theme.font = "Dina 11"
function get_x_color(x)
command = "xrdb -q | grep color" .. x .. ": | awk '{print $2}'"
f = io.popen(command, 'r')
text = f:read("*a")
text = text:gsub("%s+", ""):lower()
f:cl... | mit |
liuxuezhan/skynet | service/cslave.lua | 5 | 6499 | local skynet = require "skynet"
local socket = require "skynet.socket"
require "skynet.manager" -- import skynet.launch, ...
local table = table
local slaves = {}
local connect_queue = {}
local globalname = {}
local queryname = {}
local harbor = {}
local harbor_service
local monitor = {}
local monitor_master_set = {}
... | mit |
Ettercap/ettercap | src/lua/share/third-party/stdlib/src/object.lua | 12 | 1911 | --- Prototype-based objects
-- <ul>
-- <li>Create an object/class:</li>
-- <ul>
-- <li>Either, if the <code>_init</code> field is a list:
-- <ul>
-- <li><code>object/Class = prototype {value, ...; field = value, ...}</code></li>
-- <li>Named values are assigned to the corresponding fields, and u... | gpl-2.0 |
Habbie/hammerspoon | extensions/websocket/test_websocket.lua | 2 | 2712 | local websocket = require "hs.websocket"
local timer = require "hs.timer"
local doAfter = timer.doAfter
--
-- Variables:
--
local TEST_STRING = "ABC123"
local ECHO_URL = "wss://echo.websocket.org/"
local FAKE_URL = "wss://fake.com/"
--
-- Test creating a new obje... | mit |
Hajimokhradi/tabtab | redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | agpl-3.0 |
thenumbernine/hydro-cl-lua | hydro/mesh/quad2d_with_cylinder_removed.lua | 1 | 1264 | local class = require 'ext.class'
local Quad2DMeshFactory = require 'hydro.mesh.quad2d'
local Quad2DWithCylinderRemovedMeshFactory = class(Quad2DMeshFactory)
Quad2DWithCylinderRemovedMeshFactory.cylinderRadius = .2
function Quad2DWithCylinderRemovedMeshFactory:coordChart(x, y, z)
-- morph it from a square to a circ... | mit |
mms92/wire | lua/entities/gmod_wire_expression2/core/custom/prop.lua | 4 | 14131 | /******************************************************************************\
Prop Core by MrFaul started by ZeikJT
report any wishes, issues to Mr.Faul@gmx.de (GER or ENG pls)
\******************************************************************************/
E2Lib.RegisterExtension("propcore", false)
PropCore = {}
l... | apache-2.0 |
kikito/middleclass | spec/classes_spec.lua | 5 | 3285 | local class = require 'middleclass'
describe('A Class', function()
describe('Default stuff', function()
local AClass
before_each(function()
AClass = class('AClass')
end)
describe('name', function()
it('is correctly set', function()
assert.equal(AClass.name, 'AClass')
end... | mit |
cogwerkz/DiabolicUI | modules/unitframes/elements/cast.lua | 2 | 14432 | local _, Engine = ...
local L = Engine:GetLocale()
local Handler = Engine:GetHandler("UnitFrame")
-- Lua API
local _G = _G
local math_floor = math.floor
local setmetatable = setmetatable
local tonumber = tonumber
local unpack = unpack
-- WoW API
local CreateFrame = _G.CreateFrame
local GetNetStats = _G.GetNetStats
lo... | mit |
luadch/luadch | examples/etc/other_available_scripts/cmd_regme.lua | 2 | 2799 | --[[
cmd_regme.lua v0.04 by blastbeat
- this script adds a command "regme" to let users themselfs
- usage: [+!#]regme <password>
- changelog 0.04:
- updated script api
- regged hubcommand
- changelog 0.03:
- some clean ups
... | gpl-3.0 |
akopytov/sysbench | third_party/luajit/luajit/dynasm/dynasm.lua | 2 | 31013 | ------------------------------------------------------------------------------
-- DynASM. A dynamic assembler for code generation engines.
-- Originally designed and implemented for LuaJIT.
--
-- Copyright (C) 2005-2020 Mike Pall. All rights reserved.
-- See below for full copyright notice.
----------------------------... | gpl-2.0 |
jzbontar/mc-cnn | preprocess_kitti.lua | 1 | 4475 | #!/usr/bin/env luajit
require 'image'
require 'nn'
require 'cutorch'
require 'libadcensus'
for _, dataset in ipairs({2012, 2015}) do
print(('dataset %d'):format(dataset))
torch.manualSeed(42)
if dataset == 2012 then
n_tr = 194
n_te = 195
path = 'data.kitti'
image_0 = 'image_0'
... | bsd-2-clause |
dan9550/OpenRA | mods/ra/maps/allies-05a/AI.lua | 34 | 6702 |
IdlingUnits = { }
AttackGroupSize = 6
Barracks = { Barracks2, Barracks3 }
Rallypoints = { VehicleRallypoint1, VehicleRallypoint2, VehicleRallypoint3, VehicleRallypoint4, VehicleRallypoint5 }
WaterLZs = { WaterLZ1, WaterLZ2 }
Airfields = { Airfield1, Airfield2 }
Yaks = { }
SovietInfantryTypes = { "e1", "e1", "e2", ... | gpl-3.0 |
omid1212/hgbok | plugins/meme.lua | 637 | 5791 | local helpers = require "OAuth.helpers"
local _file_memes = './data/memes.lua'
local _cache = {}
local function post_petition(url, arguments)
local response_body = {}
local request_constructor = {
url = url,
method = "POST",
sink = ltn12.sink.table(response_body),
headers = {},
red... | gpl-2.0 |
sigma-random/PrefSDK | formats/pe/functions.lua | 1 | 1163 | local PeFunctions = { }
function PeFunctions.rvaInSection(rva, section)
local sectrva = section.VirtualAddress.value
local sectsize = section.VirtualSize.value
if (rva >= sectrva) and (rva < (sectrva + sectsize)) then
return true
end
return false
end
function PeFunctions.sectionFromRva(rva, format... | gpl-3.0 |
Darvame/thuja | thuja.lua | 1 | 10758 | local T = { _VERSION = 100 };
local next = next;
local type = type;
local unpack = unpack;
local tostring = tostring;
local tonumber = tonumber;
local tconcat = table.concat;
local split;
local table_empty = {};
local node_empty = {1, ""};
local null_function = function() end
local table_empty_function = function() r... | mit |
cogwerkz/DiabolicUI | modules/actionbars/elements/xp.lua | 2 | 23872 | local _, Engine = ...
local Module = Engine:GetModule("ActionBars")
local BarWidget = Module:SetWidget("Bar: XP")
local StatusBar = Engine:GetHandler("StatusBar")
local L = Engine:GetLocale()
local C = Engine:GetDB("Data: Colors")
local F = Engine:GetDB("Library: Format")
-- Lua API
local _G = _G
local math_floor = ma... | mit |
mahdib9/mb | plugins/admin.lua | 15 | 6722 | -- https://github.com/amirhmz/
-- https://telegram.me/AmirDark/
local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_... | gpl-2.0 |
pinkysnowman/homedecor_modpack | homedecor/handlers/sit.lua | 13 | 1049 | function homedecor.sit(pos, node, clicker)
do return end -- delete it when the engine is stabler for the player's physics
local meta = minetest.get_meta(pos)
local param2 = node.param2
local name = clicker:get_player_name()
if name == meta:get_string("is_sit") then
meta:set_string("is_sit", "")
pos.y = pos.y-... | lgpl-3.0 |
mpiannucci/go-qt5 | make/makelib.lua | 2 | 19571 | --[[
// Copyright 2012 visualfc <visualfc@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
--]]
-- tag +,-,@,*
function get_func(s)
local tag,name,input,output = string.match(s,"([%+%-%@%*]?)%s*([_%w%*%[%]]+)%s*(%b())%s*(%b())")
... | bsd-2-clause |
emoon/ProDBG | bin/win32/scripts/tundra/dagsave.lua | 3 | 10564 | module(..., package.seeall)
local depgraph = require "tundra.depgraph"
local util = require "tundra.util"
local scanner = require "tundra.scanner"
local dirwalk = require "tundra.dirwalk"
local platform = require "tundra.platform"
local native = require "tundra.native"
local njson = require "tundra.native.j... | mit |
mms92/wire | lua/entities/gmod_wire_expression2/core/e2lib.lua | 8 | 22142 | AddCSLuaFile()
E2Lib = {}
local type = type
local function checkargtype(argn, value, argtype)
if type(value) ~= argtype then error(string.format("bad argument #%d to 'E2Lib.%s' (%s expected, got %s)", argn, debug.getinfo(2, "n").name, argtype, type(text)), 2) end
end
-- -------------------------- Helper functions -... | apache-2.0 |
omid1212/hgbok | plugins/boobs.lua | 731 | 1601 | 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 |
psychon/lgi | samples/giostream.lua | 5 | 3555 | #! /usr/bin/env lua
--
-- Sample lgi application for Gio files, streams and usage of
-- Gio.Async It also serves as very crude timing 'benchmark' showing
-- overhead of assorted types operations.
--
local lgi = require 'lgi'
local GLib = lgi.GLib
local Gio = lgi.Gio
local assert = lgi.assert
local app = Gio.Applica... | mit |
thenumbernine/hydro-cl-lua | hydro/eqn/wave_metric.lua | 1 | 5207 | -- check out my 'wave equation hyperbolic form' worksheet
local ffi = require 'ffi'
local class = require 'ext.class'
local table = require 'ext.table'
local Equation = require 'hydro.eqn.eqn'
local WaveMetric = class(Equation)
WaveMetric.name = 'wave_metric'
WaveMetric.roeUseFluxFromCons = true
WaveMetric.initCond... | mit |
mms92/wire | lua/entities/gmod_wire_exit_point.lua | 9 | 4525 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Vehicle Exit Point"
if CLIENT then return end -- No more client
function ENT:Initialize()
self.BaseClass.Initialize(self)
self.Inputs = WireLib.CreateInputs(self, {"Entity [ENTITY]", "Entities [ARRAY]", "Position [VECTOR]", "Local Positi... | apache-2.0 |
mms92/wire | lua/wire/client/hlzasm/hc_tokenizer.lua | 6 | 18676 | --------------------------------------------------------------------------------
-- HCOMP / HL-ZASM compiler
--
-- Tokenizer
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- All symbols (tokens) recog... | apache-2.0 |
luadch/luadch | examples/etc/other_available_scripts/etc_example.lua | 2 | 2850 | --[[
etc_example.lua v0.03 by blastbeat
]]--
local scriptname = "etc_example"
local scriptversion = "0.03"
local check_failed = function( user, rank )
if not user:isregged( ) or user:rank( ) < rank then
return true
end
return false
end
hub.setlisten... | gpl-3.0 |
Freeeaky/GTALua | build/GTALua/internal/game/Player.lua | 2 | 2751 | -- Player
class 'Player'(Ped)
-- Player CTor
function Player:__init(playerid)
self.PlayerID = playerid
Ped.__init(self, natives.PLAYER.GET_PLAYER_PED(playerid))
self._type = "Player"
end
-- Local Player
function LocalPlayer()
return Player(natives.PLAYER.GET_PLAYER_INDEX())
end
-- Name
function Player:GetName(... | gpl-2.0 |
RuiChen1113/luci | applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-app.lua | 137 | 15546 | cbimap = Map("asterisk", "asterisk", "")
module = cbimap:section(TypedSection, "module", "Modules", "")
module.anonymous = true
app_alarmreceiver = module:option(ListValue, "app_alarmreceiver", "Alarm Receiver Application", "")
app_alarmreceiver:value("yes", "Load")
app_alarmreceiver:value("no", "Do Not Load")
app_al... | apache-2.0 |
LuaDist2/luassert | src/mock.lua | 5 | 1402 | -- module will return a mock module table, and will not register any assertions
local spy = require 'luassert.spy'
local stub = require 'luassert.stub'
local function mock_apply(object, action)
if type(object) ~= "table" then return end
if spy.is_spy(object) then
return object[action](object)
end
for k,v i... | mit |
zhukunqian/slua-1 | build/luajit-2.0.4/src/jit/dump.lua | 84 | 19509 | ----------------------------------------------------------------------------
-- LuaJIT compiler dump module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-... | mit |
emoon/ProDBG | bin/macosx/tundra/scripts/tundra/tools/msvc.lua | 22 | 2788 | -- msvc.lua - common definitions for all flavors of MSVC
module(..., package.seeall)
function apply(env, options)
-- load the generic C toolset first
tundra.unitgen.load_toolset("generic-cpp", env)
-- load support for win32 resource compilation
tundra.unitgen.load_toolset("win32-rc", env)
env:set_many {
... | mit |
echohenry2006/neural-style | loadcaffe_wrapper.lua | 58 | 2411 | local ffi = require 'ffi'
require 'loadcaffe'
local C = loadcaffe.C
--[[
Most of this function is copied from
https://github.com/szagoruyko/loadcaffe/blob/master/loadcaffe.lua
with some horrible horrible hacks added by Justin Johnson to
make it possible to load VGG-19 without any CUDA dependency.
--]]
local fu... | mit |
uzlonewolf/proxmark3 | client/scripts/mifarePlus.lua | 5 | 11089 | local cmds = require('commands')
local lib14a = require('read14a')
getopt = require('getopt') -- Used to get command line arguments
example = "script run mifarePlus"
author = "Dominic Celiano"
desc =
[[
Purpose: Lua script to communicate with the Mifare Plus EV1, including personalization (setting the keys) and ... | gpl-2.0 |
Tele-Sped/Tele-Sped | 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/... | agpl-3.0 |
omid1212/hgbok | bot/bot.lua | 1 | 7067 | 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 |
RailTracker/OpenRA | mods/d2k/maps/atreides-01a/atreides01a.lua | 6 | 4914 |
HarkonnenReinforcements = { }
HarkonnenReinforcements["easy"] =
{
{ "light_inf", "light_inf" }
}
HarkonnenReinforcements["normal"] =
{
{ "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" },
}
HarkonnenReinforcements["hard"] =
{
{ "light_inf", "light_inf" },
{ "trike"... | gpl-3.0 |
akopytov/sysbench | src/lua/internal/sysbench.sql.lua | 1 | 14704 | -- Copyright (C) 2017 Alexey Kopytov <akopytov@gmail.com>
-- 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 ... | gpl-2.0 |
Abollfazl2/KingManager | 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 |
parsagachkardev/AutoBotS | 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 |
mms92/wire | lua/wire/gates/selection.lua | 18 | 3682 | --[[
Selection Gates
]]
GateActions("Selection")
GateActions["min"] = {
name = "Minimum (Smallest)",
inputs = { "A", "B", "C", "D", "E", "F", "G", "H" },
compact_inputs = 2,
output = function(gate, ...)
return math.min(unpack({...}))
end,
label = function(Out, ...)
local txt = "min("
for k,v in ipairs({... | apache-2.0 |
simcop2387/nimbus-esp8266 | http/dabomb.lua | 1 | 1231 | return function (connection, req, args)
connection:send("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nCache-Control: private, no-store\r\n\r\n")
connection:send('<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Arguments</title></head>')
connection:send('<body>')
connection:send('<h1>Argum... | gpl-2.0 |
CrackedP0t/LuaNoise | tutorial/tutorial_6.lua | 1 | 1822 | local noise = require ("noise")
local mountainTerrain = noise.RidgedMulti ()
local baseFlatTerrain = noise.Billow ()
baseFlatTerrain:SetFrequency (2)
local flatTerrain = noise.ScaleBias ()
flatTerrain:SetSourceModule (0, baseFlatTerrain)
flatTerrain:SetScale (0.125)
flatTerrain:SetBias (-0.75);
local terrainType = ... | lgpl-3.0 |
asanosoyokaze/skynet | lualib/redis.lua | 20 | 6194 | local skynet = require "skynet"
local socket = require "socket"
local socketchannel = require "socketchannel"
local table = table
local string = string
local assert = assert
local redis = {}
local command = {}
local meta = {
__index = command,
-- DO NOT close channel in __gc
}
---------- redis response
local redcm... | mit |
RailTracker/OpenRA | mods/cnc/maps/nod08b/nod08b-AI.lua | 1 | 6487 | AttackPaths = { { AttackPath1 }, { AttackPath2 }, { AttackPath3 } }
GDIBase = { GDICYard, GDIPyle, GDIWeap, GDIHQ, GDINuke1, GDINuke2, GDINuke3, GDINuke4, GDIProc, GDIBuilding1, GDIBuilding2, GDIBuilding3, GDIBuilding4, GDIBuilding5, GDIBuilding6, GDIBuilding7, GDIBuilding8, GDIBuilding9, GDIBuilding10, GDIBuilding11, ... | gpl-3.0 |
psychon/lgi | samples/gtk-demo/demo-comboboxes.lua | 6 | 5185 | return function(parent, dir)
local lgi = require 'lgi'
local GObject = lgi.GObject
local Gtk = lgi.Gtk
local Gdk = lgi.Gdk
local GdkPixbuf = lgi.GdkPixbuf
local ComboColumn = {
PIXBUF = 1,
TEXT = 2,
}
local function create_stock_icon_store()
local cellview = Gtk.CellView {}
local store = Gtk.ListStore.ne... | mit |
RailTracker/OpenRA | mods/cnc/maps/nod06a/nod06a.lua | 25 | 7746 | NodStartUnitsRight = { 'ltnk', 'bike', 'e1', 'e1', 'e3', 'e3' }
NodStartUnitsLeft = { 'ltnk', 'ltnk', 'bggy', 'e1', 'e1', 'e1', 'e1', 'e3', 'e3', 'e3', 'e3' }
Chn1Units = { 'e1', 'e1', 'e1', 'e1', 'e1' }
Chn2Units = { 'e2', 'e2', 'e2', 'e2', 'e2' }
Obj2Units = { 'ltnk', 'bike', 'e1', 'e1', 'e1' }
Chn3CellTriggerActiva... | gpl-3.0 |
emoon/ProDBG | bin/win32/scripts/tundra/ide/xcode5.lua | 25 | 28102 | -- Xcode 5 Workspace/Project file generation
module(..., package.seeall)
local path = require "tundra.path"
local nodegen = require "tundra.nodegen"
local util = require "tundra.util"
local native = require "tundra.native"
local xcode_generator = {}
xcode_generator.__index = xcode_generator
function xcode_generator... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.