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
MRAHS/SBSS-Pro
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
mehrpouya81/y
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
Tele-Fox/best
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
mahdib9/mb
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
mms92/wire
lua/weapons/remotecontroller.lua
9
2091
AddCSLuaFile() SWEP.Author = "Divran" -- Originally by ShaRose, rewritten by Divran at 2011-04-03 SWEP.Contact = "" SWEP.Purpose = "Remote control for Pod Controllers in wire." SWEP.Instructions = "Left Click on Pod Controller to link up, and use to start controlling." SWEP.Category = "Wiremod" SWEP.PrintName = "Remo...
apache-2.0
mpiannucci/go-qt5
make/ui/systemtray.lua
5
1046
module("systemtray") name = "SystemTray" base = "object" funcs = [[ + Init() - Close() @ SetContextMenu(menu *Menu) @ ContextMenu() (menu *Menu) @ SetIcon(icon *Icon) @ Icon() (icon *Icon) @ SetToolTip(text string) @ ToolTip() (text string) @ SetVisible(b bool) @ IsVisible() (b bool) ShowMessage(title string, message...
bsd-2-clause
Justinon/LorePlay
code/LPCategoryStrings.lua
1
1079
Appearance, Hats, Costumes, Skins, Polymorphs, Hair, FacialAcc, FacialHair, BodyMarkings, HeadMarkings, Jewelry, Personalities, VanityPets = "Appearance", "Hat", "Costume", "Skin", "Polymorph", "Hair", "Facial Accessory", "Facial Hair", "Body Marking", "Head Marking", "Jewelry", "Personality", "Vanity Pet" City, Housin...
artistic-2.0
aramunn/wildstar-account-wide-settings
AccountWideSettings.lua
1
17813
require "Window" local AccountWideSettings = {} --selection local bShowSaveWindow = true local nSaverNumSelected = 0 local nLoaderIndex = 0 --filters local strFilterAddonSearch = "" local bFilterShowCustom = true local bFilterShowCarbine = false local strFilterRestoreSearch = "" --enums local eColum...
mit
sigma-random/PrefSDK
processors/mips/definition.lua
1
3189
-- http://www.eng.ucy.ac.cy/mmichael/courses/ECE314/LabsNotes/02/MIPS_Instruction_Coding_With_Hex.pdf -- http://web.engr.oregonstate.edu/~walkiner/cs271-wi13/slides/04-IntroAssembly.pdf local oop = require("oop") local pref = require("pref") local Instruction = require("sdk.disassembler.instruction") local Processor =...
gpl-3.0
lbt/scratchbox2
lua_scripts/create_reverse_rules.lua
4
9970
-- Copyright (c) 2008 Nokia Corporation. -- Author: Lauri T. Aarnio -- -- Licensed under MIT license -- This script is executed once after a new SB2 session has been created, -- to create reversing rules for path mapping (see utils/sb2). -- This is still simple, and may not work in all cases: This script -- will shut...
lgpl-2.1
adib1380/fu2
bot/seedbot.lua
1
8922
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
mms92/wire
lua/entities/gmod_wire_expression2/core/array.lua
6
17514
-------------------------------------------------------------------------------- -- Array Support -- Original author: Unknown (But the Wiki mentions Erkle) -- Rewritten by Divran at 2010-12-21 -------------------------------------------------------------------------------- ---------------------------------------------...
apache-2.0
luadch/luadch
scripts/usr_desc_prefix.lua
1
3306
--[[ usr_desc_prefix.lua by blastbeat - this script adds a prefix to the desc of an user - you can use the prefix table to define different prefixes for different user levels v0.08: by pulsar - removed table lookups - simplify 'activate' logic ...
gpl-3.0
thenumbernine/hydro-cl-lua
hydro/init/init.lua
1
7251
local class = require 'ext.class' local table = require 'ext.table' local time = table.unpack(require 'hydro.util.time') local Struct = require 'hydro.code.struct' local half = require 'cl.obj.half' --[[ name = name of the initial condition guiVars = any gui variables that the initial conditions wants to expose TODO ...
mit
mehrpouya81/y
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
hafez16/senator
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
badboyam/zc
plugins/cpu.lua
244
1893
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 .. ' you...
gpl-2.0
shkan/telebot7
plugins/cpu.lua
244
1893
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 .. ' you...
gpl-2.0
NPLPackages/TableDB
npl_mod/Raft/StateMachine.lua
1
3134
--[[ Title: Author: liuluheng Date: 2017.03.25 Desc: ------------------------------------------------------------ NPL.load("(gl)npl_mod/Raft/StateMachine.lua"); local StateMachine = commonlib.gettable("Raft.StateMachine"); ------------------------------------------------------------ ]]-- local StateMachine = comm...
gpl-2.0
adib1380/fu2
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
LuaDist2/kong-cassandra
spec/functional_spec.lua
8
20510
package.path = "src/?.lua;spec/?.lua;" .. package.path _G.ngx = require("fake_ngx") local cassandra = require("cassandra") local constants = require("cassandra.constants") describe("cassandra", function() before_each(function() session = cassandra.new() session:set_timeout(1000) connected, err = sessi...
mit
mms92/wire
lua/wire/stools/thruster.lua
9
5526
WireToolSetup.setCategory( "Physics/Force" ) WireToolSetup.open( "thruster", "Thruster", "gmod_wire_thruster", nil, "Thrusters" ) if CLIENT then language.Add( "tool.wire_thruster.name", "Thruster Tool (Wire)" ) language.Add( "tool.wire_thruster.desc", "Spawns a thruster for use with the wire system." ) language.Add...
apache-2.0
Justinon/LorePlay
code/locales/de.lua
1
8999
--[[ ################################################################### A huge thank you to @iladrion for providing this de_ translation of LorePlay! ################################################################### ]]-- languageTable = {} function languageTable.CreateZoneToRegionEmotesTable() languageTable....
artistic-2.0
ardoises/formalisms
src/graph.lua
1
2453
-- Graph -- ===== -- -- Base graph structure for all graph-based formalisms. -- This formalism defines a special kind of graphs, the most generic we could -- find: hyper multi graphs. -- -- For more information of Hyper and Multi Graph, see -- [hypergraph](https://en.wikipedia.org/wiki/Hypergraph) and -- [multigraph](h...
mit
mohammadtofani/seedmn
plugins/inrealm.lua
6
24921
-- 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
mms92/wire
lua/wire/gates/array.lua
6
1361
--[[ Array Gates ]] GateActions("Array") GateActions["table_8merge"] = { name = "8x merger", timed = true, inputs = { "A", "B", "C", "D", "E", "F", "G", "H" }, outputs = { "Tbl" }, outputtypes = { "ARRAY" }, output = function(gate, A, B, C, D, E, F, G, H) if A then return { A, B, C, D, E, F, G, H } else r...
apache-2.0
zackp30/cuberite
MCServer/Plugins/APIDump/Hooks/OnHopperPushingItem.lua
44
1338
return { HOOK_HOPPER_PUSHING_ITEM = { CalledWhen = "A hopper is pushing an item into another block entity. ", DefaultFnName = "OnHopperPushingItem", -- also used as pagename Desc = [[ This hook is called whenever a {{cHopperEntity|hopper}} transfers an {{cItem|item}} from its own internal storage into an...
apache-2.0
coronalabs/framework-widget
picker.lua
1
7833
-- Abstract: widget.newPickerWheel() unit test -- Code is MIT licensed; see https://www.coronalabs.com/links/code/license --------------------------------------------------------------------------------------- local widget = require( "widget" ) local composer = require( "composer" ) local scene = composer.newScene() ...
mit
torch/optim
adadelta.lua
6
2125
--[[ ADADELTA implementation for SGD http://arxiv.org/abs/1212.5701 ARGS: - `opfunc` : a function that takes a single input (X), the point of evaluation, and returns f(X) and df/dX - `x` : the initial point - `config` : a table of hyper-parameters - `config.rho` : interpolation parameter - `config.eps` : f...
bsd-3-clause
cornernote/minetest-armor
armor/init.lua
1
2799
--[[ Armor for Minetest Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com> Source Code: https://github.com/cornernote/minetest-armor License: BSD-3-Clause https://raw.github.com/cornernote/minetest-armor/master/LICENSE ]]-- -- load api dofile(minetest.get_modpath("armor").."/api.lua") -- get_for...
bsd-3-clause
thenumbernine/hydro-cl-lua
tests/test-order/run.lua
1
12026
#!/usr/bin/env luajit --[[ this will run some order of accuracy tests on different configurations --]] local ffi = require 'ffi' require 'ffi.c.stdlib' -- free local clnumber = require 'cl.obj.number' local template = require 'template' local sdl = require 'ffi.sdl' local class = require 'ext.class' local table = ...
mit
mms92/wire
lua/entities/gmod_wire_socket.lua
9
10980
AddCSLuaFile() DEFINE_BASECLASS( "base_wire_entity" ) ENT.PrintName = "Wire Socket" ENT.Purpose = "Links with a plug" ENT.Instructions = "Move a plug close to a plug to link them, and data will be transferred through the link." ENT.WireDebugName = "Socket" local PositionOffsets = { ["models/wingf0x/i...
apache-2.0
uhvhugvhhbbh545hhhyg/rekjx
plugins/boobs.lua
2
1615
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
RuiChen1113/luci
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
17
1665
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local server, username, password local ipv6, defaultroute, metric, peerdns, dns, mtu server = section:taboption("general", Value, "server", translate("L2TP Server")) server.datat...
apache-2.0
zackp30/cuberite
MCServer/Plugins/APIDump/Hooks/OnExploding.lua
8
3000
return { HOOK_EXPLODING = { CalledWhen = "An explosion is about to be processed", DefaultFnName = "OnExploding", -- also used as pagename Desc = [[ This hook is called before an explosion has been processed in a world.</p> <p> See also {{OnExploded|HOOK_EXPLODED}} for a similar hook called after the e...
apache-2.0
TeleDALAD/f
plugins/face.lua
1
3079
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
AlexarJING/space-war
obj/ships/behavior/collector.lua
1
2304
local ship=res.shipClass.collector function ship:findTarget () if self.target and self.target.dead then self.target=nil self.rot=self.moveRot return false end local dist local pos local tar= self.state=="battle" and game.ship or game.rock local len= self.state=="battle" and self.visualRange or self....
apache-2.0
vipteam1/VIPTEAM
plugins/set_type.lua
1
1253
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #اسم الملف هنا ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀ ▀▄...
gpl-2.0
ArchShaman/Zero-K
scripts/turrettorp.lua
16
2934
include "constants.lua" local base = piece 'base' local arm1 = piece 'arm1' local arm2 = piece 'arm2' local turret = piece 'turret' local firepoint = piece 'firepoint' local waterFire = false local smokePiece = {base} -- Signal definitions local SIG_AIM = 2 local function Bob(rot) while true do Turn(base, ...
gpl-2.0
thiolliere/ligo
lib/jumper/search/dfs.lua
6
2559
--- <strong>`Depth First Search` algorithm</strong>. -- Implementation of <a href="http://en.wikipedia.org/wiki/Depth-first_search">Depth First Search</a> search algorithm. -- -- @author Roland Yonaba -- @copyright 2012-2013 -- @license <a href="http://www.opensource.org/licenses/mit-license.php">MIT</a> -- @script jum...
mit
nordfjord/dotFiles
nvim/lua/plugin/telescope.lua
1
1032
local actions = require('telescope.actions') require('telescope').setup { defaults = { file_ignore_patterns = { "node_modules", ".git" }, mappings = { i = { -- ['<esc>'] = actions.close, ['<C-j>'] = actions.move_selection_next, ['<C-k>'] = actions.move_selection_previous, ...
gpl-2.0
ryanplusplus/xlua
exercises/rail-fence-cipher/rail-fence-cipher_spec.lua
3
1541
local rfc = require('rail-fence-cipher') describe('rail-fence-cipher', function() describe('encode', function() it('should encode with 2 rails', function() assert.equal('XXXXXXXXXOOOOOOOOO', rfc.encode('XOXOXOXOXOXOXOXOXO', 2)) end) it('should encode with 3 rails', function() assert.equal('W...
mit
thisverygoodhhhh/orange
orange/plugins/signature_auth/handler.lua
1
5872
local ipairs = ipairs local type = type local encode_base64 = ngx.encode_base64 local string_format = string.format local string_gsub = string.gsub local tabel_insert = table.insert local utils = require("orange.utils.utils") local orange_db = require("orange.store.orange_db") local judge_util = require("orange.utils....
mit
Siapran/discord-biobot
deps/discordia/client/EventHandler.lua
1
14446
local format = string.format local insert = table.insert local function warning(client, object, id, event) return client:warning(format('Uncached %s (%s) on %s', object, id, event)) end local function checkReady(socket) local client = socket._client for _, v in pairs(socket._loading) do if next(v) then r...
mit
phi-psi/luci
modules/admin-mini/luasrc/model/cbi/mini/luci.lua
81
1335
--[[ 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
Julzso23/blowthedoorsoff
lib/middleclass.lua
63
6117
local middleclass = { _VERSION = 'middleclass v3.0.1', _DESCRIPTION = 'Object Orientation for Lua', _URL = 'https://github.com/kikito/middleclass', _LICENSE = [[ MIT LICENSE Copyright (c) 2011 Enrique García Cota Permission is hereby granted, free of charge, to any person obtaining...
mit
Corvass/BorrowedTime
Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
38
6512
--[[----------------------------------------------------------------------------- Keybinding Widget Set Keybindings in the Config UI. -------------------------------------------------------------------------------]] local Type, Version = "Keybinding", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not Ace...
gpl-3.0
ArchShaman/Zero-K
units/tankriot.lua
2
3690
unitDef = { unitname = [[tankriot]], name = [[Ogre]], description = [[Heavy Riot Support Tank]], acceleration = 0.02181, brakeRate = 0.04282, buildCostMetal = 520, builder = false, buildPic = [[tankriot.png]], canGuard ...
gpl-2.0
ArchShaman/Zero-K
gamedata/modularcomms/weapons/riotcannon.lua
5
1120
local name = "commweapon_riotcannon" local weaponDef = { name = [[Riot Cannon]], areaOfEffect = 144, avoidFeature = true, avoidFriendly = true, burnblow = true, craterBoost = 1, craterMult = 2, customParams = ...
gpl-2.0
jchuang1977/my_luci
applications/luci-polipo/luasrc/model/cbi/polipo.lua
79
5961
--[[ LuCI - Lua Configuration Interface Copyright 2008 Aleksandar Krsteski <alekrsteski@gmail.com> 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$...
apache-2.0
mrbangi/t_e_l_e_b_o_t
plugins/invite.lua
299
1025
-- Invite other user to the chat group. -- Use !invite name User_name or !invite id id_number -- The User_name is the print_name (there are no spaces but _) do local function callback(extra, success, result) vardump(success) vardump(result) end local function run(msg, matches) local user = matches[2] -- Use...
gpl-2.0
zhepama/rosa
src/engine/core/mouse.lua
2
4974
local rosa = require("__rosa") local mouse = {} function mouse.start() mouse.mapping = { l = "lmb", m = "mmb", r = "rmb", wd = "wheel_down", wu = "wheel_up", x1 = "extra1", x2 = "extra2" } mouse.base_modkeys = rosa.keyboard.base_mod...
mit
ArchShaman/Zero-K
LuaRules/Gadgets/CustomUnitShaders/main.lua
11
14157
-- $Id$ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- author: jK -- -- Copyright (C) 2008,2009,2010. -- Licensed under the terms of the GNU GPL, v2 or later. -- ---------------------------------...
gpl-2.0
ArchShaman/Zero-K
gamedata/modularcomms/weapons/missilelauncher.lua
5
1344
local name = "commweapon_missilelauncher" local weaponDef = { name = [[Missile Launcher]], areaOfEffect = 48, avoidFeature = true, cegTag = [[missiletrailyellow]], craterBoost = 1, craterMult = 2, customParams = { sl...
gpl-2.0
ashemedai/ProDBG
bin/win32/scripts/tundra/tools/msvc-vscommon.lua
13
10620
-- msvc-vscommon.lua - utility code for all versions of Visual Studio module(..., package.seeall) local native = require "tundra.native" local os = require "os" -- Visual Studio tooling layout local vc_bin_map = { ["x86"] = { ["x86"] = "", ["x64"] = "x86_amd64", ["arm"] = "x86_arm", }, ["x64"] = {...
mit
SeanPackham/Gloves
build/main.lua
1
2267
require('gloves') local Map Map = gloves.map.Map local Camera, Renderer do local _obj_0 = gloves.renderer Camera, Renderer = _obj_0.Camera, _obj_0.Renderer end local Entity, Platform, Elevator, Player do local _obj_0 = gloves.entity Entity, Platform, Elevator, Player = _obj_0.Entity, _obj_0.Platform, _obj_0.Ele...
mit
qyli/test
lualib/snax/hotfix.lua
21
2186
local si = require "snax.interface" local io = io local hotfix = {} local function envid(f) local i = 1 while true do local name, value = debug.getupvalue(f, i) if name == nil then return end if name == "_ENV" then return debug.upvalueid(f, i) end i = i + 1 end end local function collect_uv(f , ...
mit
jchuang1977/my_luci
applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-format.lua
80
3636
--[[ 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
ArchShaman/Zero-K
LuaUI/Widgets/chili_new/controls/layoutpanel.lua
9
28081
--//============================================================================= --// This control is the base of any auto-layout panel, this includes: --// grid, stackpanel, tables, itemlistview, listbox, radiogroups, ... --// --// Internal all childrens/items are handled via cells, which can be --// freely aligned...
gpl-2.0
crazyboy11/orgbot
plugins/setrank.lua
40
8897
do local Dev = 122774063 --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
ArchShaman/Zero-K
LuaUI/Widgets/gui_chili_endgraph.lua
5
15891
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "EndGame Stats", desc = "v0.913 Chili replacement for default end game statistics", author = "Funken...
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/chili/simple examples/Widgets/gui_chiliguidemo.lua
17
8506
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "chiliGUIDemo", desc = "GUI demo for robocracy", author = "quantum", date = "WI...
gpl-2.0
ArchShaman/Zero-K
ModelMaterials_103/1_normalmapping.lua
11
4407
-- $Id$ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- local materials = { normalMappedS3o = { shaderDefinitions = { "#define use_perspective_correct_shadows", "#define use_nor...
gpl-2.0
amirilk22333322/uzzbot
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
mixflowtech/logsensor
lib/ljsyscall/syscall/bsd/ffi.lua
18
10586
-- define general BSD system calls for ffi -- note that some functions may not be available in all, but so long as prototype is standard they can go here local require, error, assert, tonumber, tostring, setmetatable, pairs, ipairs, unpack, rawget, rawset, pcall, type, table, string = require, error, assert, tonumbe...
apache-2.0
linearregression/sysdig
userspace/sysdig/chisels/lscontainers.lua
10
2456
--[[ Copyright (C) 2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even t...
gpl-2.0
sternold/Love2DRL
src/libraries/loveconsole.lua
1
4154
--a small library to give some console-like functionality to the love2d window --requires colors, util love.graphics.console = {} function love.graphics.console.init(width, height, scale, font) love.graphics.console.scale = scale or 16 love.graphics.console.width = width or 80 love.graphics.console.height =...
mit
gevero/S4
examples/patterns/ellipse.lua
7
1268
-- Run as -- S4 ellipse.lua >ellipse_eps_cell.txt 2>ellipse_eps_real.txt S = S4.NewSimulation() S:SetLattice({1,0}, {0,1}) S:SetNumG(80) -- Material definition S:AddMaterial('Silicon', {12,0}) -- real and imag parts S:AddMaterial('Vacuum', {1,0}) -- Structure definition S:AddLayer('AirAbove', -- layer...
gpl-2.0
PansyLabs/Timers
PL_Timers.lua
1
12117
--[[ PansyLabs Timers. Refer to LICENSE and README.md for details ]]-- function PL_Timers:New(control) instance = {} instance.control = control setmetatable(instance, { __index = PL_Timers }) instance:Initialise() return instance end function PL_Timers:Initialise() self:InitialisePools() s...
mit
LinusU/nn
CMulTable.lua
31
1238
local CMulTable, parent = torch.class('nn.CMulTable', 'nn.Module') function CMulTable:__init() parent.__init(self) self.gradInput = {} end function CMulTable:updateOutput(input) self.output:resizeAs(input[1]):copy(input[1]) for i=2,#input do self.output:cmul(input[i]) end return self.output e...
bsd-3-clause
ArchShaman/Zero-K
LuaUI/Widgets/map_edge_extension.lua
5
14855
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Map Edge Extension", version = "v0.5", desc = "Draws a mirrored map next to the edges of ...
gpl-2.0
ktosiu/nodemcu-firmware
lua_examples/email/read_email_imap.lua
82
4543
--- -- Working Example: https://www.youtube.com/watch?v=PDxTR_KJLhc -- @author Miguel (AllAboutEE.com) -- @description This example will read the first email in your inbox using IMAP and -- display it through serial. The email server must provided unecrypted access. The code -- was tested with an AOL and Time Warner c...
mit
DevFalcon/Falcon
plugins/msg_checks.lua
1
10826
-- تـم التعديـل والتعريب بواسطه @Sudo_Sky -- msg-checks local function pre_process(msg) if not msg.query then local status = getChatAdministrators(msg.to.id) local data = load_data(_config.moderation.data) local chat = msg.to.id local user = msg.from.id local is_channel = msg.to.type == "supergroup" local is_chat = msg...
gpl-3.0
ashemedai/ProDBG
bin/win32/scripts/tundra/dagsave.lua
25
10957
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
mixflowtech/logsensor
lib/ljsyscall/test/ctest-linux.lua
18
13141
-- generate C test file to check type sizes etc -- Linux specific as there are a lot of workarounds -- luajit ctest.lua > ctest.c && cc -std=c99 ctest.c -o ctest && ./ctest -- TODO we are replacing this with new tests against clean kernel headers, test/linux-constants.lua is first part -- however testing against both ...
apache-2.0
darkstalker/moonhowl
src/moonhowl/gui/info_bar.lua
1
1048
local lgi = require "lgi" local Gtk = lgi.Gtk local GLib = lgi.GLib local object = require "moonhowl.object" local info_bar = object:extend() function info_bar:_init() self.handle = Gtk.InfoBar{ id = "info_bar", show_close_button = true, no_show_all = true, } self.lbl_info = Gtk.L...
mpl-2.0
scholzd/MoonGen
rfc2544/utils/ssh.lua
9
3315
local conf = require "config" local ssh = require "utils.ffi.ssh" local mod = {} mod.__index = mod local session = nil function mod.addInterfaceIP(interface, ip, pfx) return mod.exec("ip addr add " .. ip .. "/" .. pfx .. " dev " .. interface) end function mod.delInterfaceIP(interface, ip, pfx) return mo...
mit
Corvass/BorrowedTime
Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
46
4441
--[[----------------------------------------------------------------------------- Label Widget Displays text and optionally an icon. -------------------------------------------------------------------------------]] local Type, Version = "Label", 23 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or...
gpl-3.0
ArchShaman/Zero-K
LuaUI/Widgets/api_gadget_icons.lua
4
8416
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Gadget Icons", desc = "Shows icons from gadgets that cannot access the widget stuff ...
gpl-2.0
zaeem998/Bollywood1
libs/serpent.lua
656
7877
local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = true, cdata = true} lo...
gpl-2.0
DevFalcon/Falcon
libs/serpent.lua
656
7877
local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = true, cdata = true} lo...
gpl-3.0
ArchShaman/Zero-K
LuaUI/Widgets/gui_command_indicator.lua
5
6804
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Command Indicator (beta)", desc = "Simple visual feedback of received commands", author = "Kin...
gpl-2.0
sternold/Love2DRL
src/libraries/bitser.lua
4
11078
--[[ Copyright (c) 2016, Robin Wellner Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT...
mit
dschoeffm/MoonState
examples/dtlsClient.lua
1
4771
--- Layer 2 reflector, swaps src and dst MACs and echoes the packet local lm = require "libmoon" local memory = require "memory" local device = require "device" local stats = require "stats" local lacp = require "proto.lacp" local dtls = require "dtlsClient" local arp = require "proto.arp" local utils = re...
bsd-3-clause
thiolliere/ligo
lib/jumper/search/jps.lua
6
14347
--- <strong>`Jump Point Search` algorithm</strong>. -- This file holds an implementation of <a href="http://harablog.wordpress.com/2011/09/07/jump-point-search/">Jump Point Search</a> algorithm. -- To quote its authors, __Jump Point Search__ is basically -- "*an online symmetry breaking algorithm which speeds up pathfi...
mit
ryanplusplus/xlua
exercises/bowling/example.lua
3
1373
return function() local current = {} local frames = {} local function strike() return current[1] == 10 end local function spare() return current[1] + current[2] == 10 end local function complete() return #frames == 10 end return { roll = function(pins) assert(not complete(), ...
mit
abasshacker/abas0
plugins/Feedback.lua
49
1048
do function run(msg, matches) local fuse = '#DearAdmin😜 we have recived a new feedback just now : #newfeedback \n\nID▶️ : ' .. msg.from.id .. '\n\nName▶ : ' .. msg.from.print_name ..'\n\nusername▶️ :@ ' .. msg.from.username ..'\n\n🅿️♏️ :\n\n\n' .. matches[1] local fuses = '!printf user#id' .. msg.from.id lo...
gpl-2.0
ArchShaman/Zero-K
LuaRules/Utilities/tablefunctions.lua
5
4207
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- --deep not safe with circular tables! defaults To false function Spring.Utilities.CopyTable(tableToCopy, deep) local copy = {} for key, value in...
gpl-2.0
LinusU/nn
SpatialSubSampling.lua
44
1412
local SpatialSubSampling, parent = torch.class('nn.SpatialSubSampling', 'nn.Module') function SpatialSubSampling:__init(nInputPlane, kW, kH, dW, dH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.kW = kW self.kH = kH self.dW = dW self.dH = dH self.weight...
bsd-3-clause
sinavafa/ERRORTG
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
Maxsteam/Test
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
ArchShaman/Zero-K
LuaUI/Widgets/cmd_select_load.lua
2
6166
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Transport Load Double Tap", desc = "Matches selected tranaports and units when load is double ...
gpl-2.0
ArchShaman/Zero-K
units/hoversonic.lua
2
3478
unitDef = { unitname = [[hoversonic]], name = [[Morningstar]], description = [[Antisub Hovercraft]], acceleration = 0.048, activateWhenBuilt = true, brakeRate = 0.043, buildCostMetal = 300, builder = false, buildPic = [[h...
gpl-2.0
brahmi2/prosody-modules
mod_message_logging/mod_message_logging.lua
32
3943
module:set_global(); local jid_bare = require "util.jid".bare; local jid_split = require "util.jid".split; local stat, mkdir = require "lfs".attributes, require "lfs".mkdir; -- Get a filesystem-safe string local function fsencode_char(c) return ("%%%02x"):format(c:byte()); end local function fsencode(s) return (s:...
mit
jokerdevv/Joker-Developer
plugins/ar-supergroup.lua
4
80211
--[[ # For More Information ....! # Developer : Aziz < @devss_bot > #Dev # our channel: @help_tele ]] local function check_member_super(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg if success == 0 then send_large_msg(receiver, "👌🏻لتلع...
gpl-2.0
shahin20nice/nic
plugins/write.lua
2
28812
--edit By @mohammadrezajiji function string:split(sep) local sep, fields = sep or ":", {} local pattern = string.format("([^%s]+)", sep) self:gsub(pattern, function(c) fields[#fields+1] = c end) return fields end local function run(msg, matches) if #matches < 2 then return "بعد از این دستور، با قید یک فاصل...
gpl-3.0
anguyen8/mnist-cluttered
convert.lua
1
1640
require 'torch' -- local train = torch.load("train_32x32.t7", 'ascii') -- print(train) -- local test = torch.load("test_32x32.t7", 'ascii') -- print(test) function convert(train) -- convert data local data = train.data local size = data:size(1) -- number of images local labels = train.labels -- new c...
bsd-3-clause
siktirmirza/infernal
plugins/Feedback.lua
18
1055
do function run(msg, matches) local fuse = '#DearAdmin😜 we have recived a new feedback just now : #newfeedback \n\n🆔 : ' .. msg.from.id .. '\n\nNAME▶️ : ' .. msg.from.print_name ..'\n\nusername▶️ :@ ' .. msg.from.username ..'\pm :\n\n' .. matches[1] local fuses = '!printf user#id' .. msg.from.id local text ...
gpl-2.0
MinetestForFun/minetest-minetestforfun-server
mods/throwing/fire_arrow.lua
6
4283
minetest.register_craftitem("throwing:arrow_fire", { description = "Fire Arrow", inventory_image = "throwing_arrow_fire.png", }) minetest.register_node("throwing:arrow_fire_box", { drawtype = "nodebox", node_box = { type = "fixed", fixed = { -- Shaft {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, ...
unlicense
Amorph/premake-dev
tests/base/test_tree.lua
3
4325
-- -- tests/base/test_tree.lua -- Automated test suite source code tree handling. -- Copyright (c) 2009-2012 Jason Perkins and the Premake project -- T.tree = { } local suite = T.tree local tree = premake.tree -- -- Setup/teardown -- local tr function suite.setup() tr = tree.new() end local function p...
bsd-3-clause