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
emoon/ProDBG
bin/win32/scripts/tundra/syntax/native.lua
9
10662
-- native.lua -- support for programs, static libraries and such module(..., package.seeall) local util = require "tundra.util" local nodegen = require "tundra.nodegen" local path = require "tundra.path" local depgraph = require "tundra.depgraph" local _native_mt = nodegen.create_eval_subclass { DeclToEnv...
mit
Tele-Fox/best
bot/utils.lua
356
14963
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
mehrpouya81/y
plugins/vote.lua
615
2128
do local _file_votes = './data/votes.lua' function read_file_votes () local f = io.open(_file_votes, "r+") if f == nil then print ('Created voting file '.._file_votes) serialize_to_file({}, _file_votes) else print ('Values loaded: '.._file_votes) f:close() end return loadfile (_file_votes)()...
gpl-2.0
eugenkiss/mastermind
lua/strategies/dummy.lua
1
1461
-- A dummy mastermind miniproject strategy. -- Only two functions must be provided by a strategy: reset and guess. -- Additional utility/helper functions can be created of course. Two global -- variables are injected: T, a table representing the buttons, and -- CODE_LENGTH, the length of the claimed sequence. -- T[0].....
bsd-3-clause
RuiChen1113/luci
modules/luci-base/luasrc/cbi/datatypes.lua
46
5777
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local ip = require "luci.ip" local math = require "math" local util = require "luci.util" local tonumber, tostring, type, unpack, select = tonumber, tostring, type, unpack, select ...
apache-2.0
vipteam1/VIPTEAM
plugins/leave_ban.lua
1
1379
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #اسم الملف هنا ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀ ▀▄...
gpl-2.0
AbolDalton/king
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
kingmiladee/bot-man
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
adityaramesh/lantern
lt/init.lua
1
1107
lt = { F = require('F'), xlua = require('xlua'), io = require('io'), os = require('os'), lfs = require('lfs'), term = require('term'), path = require('pl.path'), nn = require('nn'), optim = require('optim'), } local try_require = function(name) local success, lib = pcall(function() return requir...
bsd-3-clause
RuiChen1113/luci
modules/luci-base/luasrc/sgi/uhttpd.lua
79
1956
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require "nixio.util" require "luci.http" require "luci.sys" require "luci.dispatcher" require "luci.ltn12" function handle_request(env) exectime = os.clock() local renv = { CONTENT_LENGTH = env.CONTENT_LEN...
apache-2.0
thenumbernine/hydro-cl-lua
hydro/int/all.lua
1
3628
local class = require 'ext.class' local ForwardEuler = require 'hydro.int.fe' local IterativeCrankNicolson = require 'hydro.int.icn' local BackwardEuler = require 'hydro.int.be' local BackwardEulerCPU = require 'hydro.int.be-cpu' local RungeKutta = require 'hydro.int.rk' --the following are from https://en.wikipedia.o...
mit
thenumbernine/hydro-cl-lua
tests/comparing state before and after reset/run.lua
1
1526
#!/usr/bin/env luajit require 'ext' local ffi = require 'ffi' local unistd = require 'ffi.c.unistd' require 'ffi.c.stdlib' local dirp = unistd.getcwd(nil, 0) local dir = ffi.string(dirp) ffi.C.free(dirp) unistd.chdir'../..' -- TODO make App accept this as a ctor argument cmdline = {sys='console'} local App = class(re...
mit
RuiChen1113/luci
applications/luci-app-freifunk-policyrouting/luasrc/model/cbi/freifunk/policyrouting.lua
68
1703
-- Copyright 2011 Manuel Munz <freifunk at somakoma de> -- Licensed to the public under the Apache License 2.0. local uci = require "luci.model.uci".cursor() m = Map("freifunk-policyrouting", translate("Policy Routing"), translate("These pages can be used to setup policy routing for certain firewall zones. ".. "This...
apache-2.0
LuaDist2/luaposix
lib/posix/init.lua
1
16378
--[[ POSIX library for Lua 5.1, 5.2 & 5.3. Copyright (C) 2013-2017 Gary V. Vaughan Copyright (C) 2010-2013 Reuben Thomas <rrt@sc3d.org> Copyright (C) 2008-2010 Natanael Copa <natanael.copa@gmail.com> ]] --[[-- Lua POSIX bindings. In addition to the convenience functions documented in this module, many APIs from...
mit
ardoises/formalisms
src/data/collection.lua
1
4811
-- Collection -- ========== -- -- A collection is a set, map or sequence of elements where keys or values -- always have the same type. -- -- To create a new collection type, refine this formalism and add the fields -- descriptions in its `[meta][collection]` table. -- -- `[meta][collection]` can define a `key_type` fi...
mit
zackp30/cuberite
MCServer/Plugins/HookNotify/HookNotify.lua
20
2130
-- HookNotify.lua --[[ Implements the entire plugin NOTE: This plugin is not meant for production servers. It is used mainly by developers to verify that things are working properly when implementing MCServer features. Do not enable this plugin on production servers! This plugin logs a notification for each hook th...
apache-2.0
sami2448/sam
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
parsagachkardev/AutoBotS
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
Tele-Sped/Tele-Sped
plugins/banhammer.lua
1085
11557
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
agpl-3.0
sigma-random/PrefSDK
processors/mips/instruction/macro.lua
1
6618
-- http://www.ric.edu/faculty/emcdowell/cs312/mars.txt local oop = require("oop") local pref = require("pref") local MacroInstruction = require("sdk.disassembler.macroinstruction") local Operand = require("sdk.disassembler.operand") local InstructionType = require("processors.mips.instruction.type") local OperandType ...
gpl-3.0
jav/freeciv
dependencies/tolua-5.1/src/bin/lua/variable.lua
5
6615
-- tolua: variable class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to provide maintenance, support, updates, -- enhancement...
gpl-2.0
kingmiladee/bot-man
libs/XMLElement.lua
569
4025
-- Copyright 2009 Leo Ponomarev. Distributed under the BSD Licence. -- updated for module-free world of lua 5.3 on April 2 2015 -- Not documented at all, but not interesting enough to warrant documentation anyway. local setmetatable, pairs, ipairs, type, getmetatable, tostring, error = setmetatable, pairs, ipairs, typ...
gpl-2.0
mms92/wire
lua/wire/client/hlzasm/hc_preprocess.lua
6
6694
-------------------------------------------------------------------------------- -- HCOMP / HL-ZASM compiler -- -- Preprocessor macro parser -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Load file f...
apache-2.0
hafez16/senator
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
RuiChen1113/luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
68
1118
-- Copyright 2013 Freifunk Augsburg / Michael Wendland <michael@michiwend.com> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.splash_leases", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) ...
apache-2.0
thenumbernine/hydro-cl-lua
tests/gem - earth/run.lua
1
1464
#!/usr/bin/env luajit require 'ext' local exec = require 'exec' -- TODO put this somewhere everyone can get it local ffi = require 'ffi' local unistd = require 'ffi.c.unistd' -- getcwd, chdir require 'ffi.c.stdlib' -- free local ccwd = unistd.getcwd(nil, 0) local cwd = ffi.string(ccwd) ffi.C.free(ccwd) assert(unistd.c...
mit
q-gears/q-gears-reversing-data
output/data/scripts/ffvii/ai/guard_hound.lua
1
1193
guard_hound = { on_start = function(self) return 0; end; on_action = function(self) local attack_id; if math.random(3) == 1 then attack_id = 275; -- Tentacle else attack_id = 274; -- Bite end; set_random_enemy_as_target...
gpl-2.0
Noneatme/mta-lostresources
[gamemodes]/Multistunt/main/stunts/server/skatepark/autos.lua
1
3948
local car = {} car[1] = createVehicle(522, 1865.1201171875, -1393.306640625, 13.065382957458, 359.24743652344, 0.087890625, 261.15600585938) -- NRG-500 car[2] = createVehicle(522, 1865.0849609375, -1394.7744140625, 13.061680793762, 359.88464355469, 0.0823974609375, 263.47961425781) -- NRG-500 car[3] = createVehicle(5...
gpl-2.0
sigma-random/PrefSDK
formats/dex/definition.lua
1
3311
local pref = require("pref") local MapItemTypes = require("formats.dex.mapitemtypes") local MapItemParser = require("formats.dex.mapitemparser") local DataType = pref.datatype local DexFormat = pref.format.create("Dalvik Executable", "Android", "Dax", "1.0") function DexFormat:validate(validator) validator:checkAsc...
gpl-3.0
xianjimli/ftk
script_binding/lua/demo_label.lua
9
1263
times=4 app_win=nil function OnTimer() label = app_win:Lookup(100) label:SetText("Quit after " .. times .. " seconds.") times=times-1 if times > 0 then return RET_OK else Ftk.Quit() return RET_REMOVE end end function AppInit() win=FtkAppWindow.Create() app_win=win win:SetText("Demo Label") win:S...
lgpl-3.0
pkdiego/BolScripts
KarthusMechanics.lua
2
16735
--[[ _____ _____ __ .__ / \_______ / _ \________/ |_|__| ____ __ __ ____ ____ / \ / \_ __ \ / /_\ \_ __ \ __\ |/ ___\| | \/ \ / _ \ / Y \ | \/ / | \ | \/| | | \ \___| | / | ( <_> ) \____|__ /__| \___...
gpl-2.0
GSRMOHAMMAD/forcetg
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
uhvhugvhhbbh545hhhyg/rekjx
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
mrvigeo/salib2
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
aqasaeed/hesamfix
libs/mimetype.lua
3662
2922
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-2.0
mms92/wire
lua/wire/zvm/zvm_opcodes.lua
10
62339
-------------------------------------------------------------------------------- -- Zyelios VM (Zyelios CPU/GPU virtual machine) -- -- Primary opcode set -------------------------------------------------------------------------------- -- Initialize opcode count lookup table ZVM.OperandCount = {} for _,instruction i...
apache-2.0
RuiChen1113/luci
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
45
3212
-- Copyright 2011-2012 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 defaultroute, metric, peerdns, dns, keepalive_failure, keepalive_interval, demand, mtu server = section:taboption("general", Value, "...
apache-2.0
vipteam1/VIPTEAM
plugins/lock_english.lua
1
1637
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #اسم الملف هنا ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀ ▀▄...
gpl-2.0
asanosoyokaze/skynet
service/multicastd.lua
18
5556
local skynet = require "skynet" local mc = require "multicast.core" local datacenter = require "datacenter" local harbor_id = skynet.harbor(skynet.self()) local command = {} local channel = {} local channel_n = {} local channel_remote = {} local channel_id = harbor_id local NORET = {} local function get_address(t, i...
mit
dan9550/OpenRA
mods/cnc/maps/nod06c/nod06c.lua
19
6786
NodStartUnitsVehicle = { 'bggy', 'bggy', 'ltnk', 'ltnk', 'ltnk', 'bike', 'bike'} NodStartUnitsRight = { 'e1', 'e1', 'e1', 'e1' } NodStartUnitsMiddle = { 'e6', 'e6', 'e6', 'e6', 'e3', 'e3' } NodStartUnitsLeft = { 'e4', 'e4', 'e4', 'e4' } Win1CellTriggerActivator = { CPos.New(24,22) } Win2CellTriggerActivator = { CPos.N...
gpl-3.0
thenumbernine/hydro-cl-lua
hydro/op/glm-mhd-update-psi.lua
1
1580
local class = require 'ext.class' local template = require 'template' local ffi = require 'ffi' local real = require 'hydro.real' local GLM_MHD_UpdatePsi = class() function GLM_MHD_UpdatePsi:init(args) self.solver = assert(args.solver) end function GLM_MHD_UpdatePsi:initCodeModules() local solver = self.solver so...
mit
ldantes/Leslie_Ducray_Games_Engine_Asssignment1
Dependancies/bullet-2.81-rev2613/build/findOpenCL.lua
16
1837
-- todo: add Apple OpenCL environment vars function findOpenCL_AMD() local amdopenclpath = os.getenv("AMDAPPSDKROOT") if (amdopenclpath) then return true end return false end function findOpenCL_NVIDIA() local nvidiaopenclpath = os.getenv("CUDA_PATH") if (nvidiaopenclpath) then return true end...
mit
zackp30/cuberite
MCServer/Plugins/APIDump/Hooks/OnCraftingNoRecipe.lua
8
1325
return { HOOK_CRAFTING_NO_RECIPE = { CalledWhen = " No built-in crafting recipe is found. Plugin may provide a recipe.", DefaultFnName = "OnCraftingNoRecipe", -- also used as pagename Desc = [[ This callback is called when a player places items in their {{cCraftingGrid|crafting grid}} and MCServer canno...
apache-2.0
jwise/naim
lua/examples/eliza.lua
1
6500
-- _ __ __ _ ___ __ __ -- | '_ \ / _` |_ _| \/ | naim -- | | | | | | || || |\/| | Copyright 1998-2006 Daniel Reed <n@ml.org> -- | | | | |_| || || | | | Lua support Copyright 2006 Joshua Wise <joshua@joshuawise.com> -- |_| |_|\__,_|___|_| |_| ncurses-based chat client -- -- eliza.lua -- Psychiatrist module for n...
gpl-2.0
DesolationStaging/android_external_skia
tools/lua/bbh_filter.lua
207
4407
-- bbh_filter.lua -- -- This script outputs info about 'interesting' skp files, -- where the definition of 'interesting' changes but is roughly: -- "Interesting for bounding box hierarchy benchmarks." -- -- Currently, the approach is to output, in equal ammounts, the names of the files that -- have most commands, and t...
bsd-3-clause
kingmiladee/bot-man
plugins/info.lua
4
22231
local function callback_reply(extra, success, result) --icon & rank ------------------------------------------------------------------------------------------------ userrank = "Member" if tonumber(result.from.id) == 122774063 then userrank = "Master ⭐⭐⭐⭐" send_document(org_chat_id,"umbrella/stickers/master.webp"...
gpl-2.0
mml/kubernetes
test/images/echoserver/template.lua
195
17200
-- vendored from https://raw.githubusercontent.com/bungle/lua-resty-template/1f9a5c24fc7572dbf5be0b9f8168cc3984b03d24/lib/resty/template.lua -- only modification: remove / from HTML_ENTITIES to not escape it, and fix the appropriate regex. --[[ Copyright (c) 2014 - 2017 Aapo Talvensaari All rights reserved. Redistribu...
apache-2.0
nkcfan/Dotfiles
.config/nvim/lua/telekasten_config.lua
1
4645
local home = vim.fn.expand("~/wiki") require('telekasten').setup({ home = home, -- if true, telekasten will be enabled when opening a note within the configured home take_over_my_home = true, -- auto-set telekasten filetype: if false, the telekasten filetype will not be used -- ...
mit
nikai3d/codecombat-scripts
mountain/cloudrip-siege.lua
1
1125
-- level 2 -- using "bash", "move" function pos2xy(pos) return pos['x'], pos['y'] end tp = 1 towerPos = {{x=68, y=41}, {x=50, y=41}, {x=77, y=41}, {x=32, y=41}, {x=23, y=41}} function dist2(a, b) local x, y = a.x - b.x, a.y - b.y return x*x + y*y end function bestCoin(xs) local r, maxR = nil, 0 for i ...
mit
adib1380/fu2
plugins/welcome.lua
3
3672
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
gdawg/ios-icons
tiger_blood/lib/itunes.lua
3
3919
local itunes = { -- sleep between itunes http reqs pause_between_downloads = 0.5, } local io = require "io" local json = require "json" local socket = require "socket" local http = require "socket.http" http.USERAGENT = "LuaSocket - ios springboard client" local function sleep(sec) socket.select(nil, ni...
mit
pinkysnowman/homedecor_modpack
homedecor/lighting.lua
3
17382
-- This file supplies glowlights local dirs1 = { 20, 23, 22, 21 } local dirs2 = { 9, 18, 7, 12 } local S = homedecor.gettext local colors = {"yellow","white"} for i in ipairs(colors) do local color = colors[i] minetest.register_abm({ nodenames = { "homedecor:glowlight_thin_"..color }, interval = 1, chance ...
lgpl-3.0
Lautitia/newfies-dialer
lua/test_db.lua
7
1296
-- test_db.lua -- Connects to a database using freeswitch.dbh connection pooling, checks PIN, reads balance -- A hangup function makes the code a bit cleaner package.path = package.path .. ";/usr/share/newfies-lua/?.lua"; package.path = package.path .. ";/usr/share/newfies-lua/libs/?.lua"; local inspect = require 'in...
mpl-2.0
Tele-Fox/best
plugins/isup.lua
741
3095
do local socket = require("socket") local cronned = load_from_file('data/isup.lua') local function save_cron(msg, url, delete) local origin = get_receiver(msg) if not cronned[origin] then cronned[origin] = {} end if not delete then table.insert(cronned[origin], url) else for k,v in pairs(cronned[...
gpl-2.0
nikai3d/codecombat-scripts
mountain/mixed-unit-tactics.lua
1
1580
-- using "bash" sol = true function summonMinion() if sol and self.gold >= self:costOf("soldier") then self:summon("soldier") sol = false elseif self.gold >= self:costOf("archer") then self:summon("archer") sol = true end end function distance2(a, b) local x, y = a.pos.x ...
mit
slembcke/elua.lua
elua.lua
1
1458
local template = {} local BEGIN = "[====[" local END = "]====]" local EQUALS = string.byte("=") local sub = string.sub function template.compile(source) local fragments = {"local __OUT, _ENV = ...;"} local cursor = 1 function push(...) for _, str in ipairs{...} do table.insert(fragments, str) end end while t...
mit
NPLPackages/TableDB
npl_mod/TableDB/SQLHandler.lua
1
8211
--[[ Title: Author: liuluheng Date: 2017.04.12 Desc: ------------------------------------------------------------ NPL.load("(gl)npl_mod/TableDB/SQLHandler.lua"); local SQLHandler = commonlib.gettable("TableDB.SQLHandler"); ------------------------------------------------------------ ]] -- NPL.load("(gl)script/ide/com...
gpl-2.0
IUdalov/u-test
u-test.lua
1
8785
-- COMMAND LINE ---------------------------------------------------------------- local function print_help() print "Usage: target.lua [options] [regex]" print "\t-h show this message" print "\t-q quiet mode" print "\t-s disable colours" end local quiet, grey, test_regex if arg then for i = 1, #arg ...
mit
Jfalcon1387/RollForLoot
Libs/AceSerializer-3.0/AceSerializer-3.0.lua
6
9157
--- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format, -- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially -- very large numbers or floating point numbers, and table structures. The only caveat currently is...
lgpl-3.0
vipteam1/VIPTEAM
plugins/sticker23.lua
1
1674
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #اسم الملف هنا ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀ ▀▄...
gpl-2.0
liuxuezhan/skynet
examples/login/client.lua
19
3958
package.cpath = "luaclib/?.so" local socket = require "client.socket" local crypt = require "client.crypt" if _VERSION ~= "Lua 5.3" then error "Use lua 5.3" end local fd = assert(socket.connect("127.0.0.1", 8001)) local function writeline(fd, text) socket.send(fd, text .. "\n") end local function unpack_line(tex...
mit
colesbury/fb.resnet.torch
datasets/imagenet.lua
11
2797
-- -- 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. -- -- ImageNet dat...
bsd-3-clause
fidlej/optim
test/rosenbrock.lua
14
1390
require 'torch' -- rosenbrock.m This function returns the function value, partial derivatives -- and Hessian of the (general dimension) rosenbrock function, given by: -- -- f(x) = sum_{i=1:D-1} 100*(x(i+1) - x(i)^2)^2 + (1-x(i))^2 -- -- where D is the dimension of x. The true minimum is 0 at x = (1 1 ... 1). -- ...
bsd-3-clause
jnehl701/ACS
scripts/core/Afflictions.lua
1
60351
echo("Afflictions loaded.") entangled = false writhing = false writhed = false plodding = false idiocy = false afflictedWithSomething = false afflictedWithSomethingMental = false -- Affliction tables. afflictionTable = { -- Organ cures stupidity = {name = "stupidity", cure ...
gpl-2.0
uhvhugvhhbbh545hhhyg/rekjx
plugins/arabic_lock.lua
234
1405
antiarabic = {}-- An empty table for solving multiple kicking problem do local function run(msg, matches) if is_momod(msg) then -- Ignore mods,owner,admins return end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['lock_arabic'] then if data[tostring(msg.to.id)...
gpl-2.0
coronalabs/framework-widget
spinner.lua
1
7140
-- Abstract: widget.newSpinner() 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() loc...
mit
aqasaeed/hesamfix
plugins/banhammer.lua
10
12148
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned ...
gpl-2.0
LuaDist2/luassert
src/languages/ja.lua
6
2604
local s = require('say') s:set_namespace('ja') s:set("assertion.same.positive", "オブジェクトの内容が同一であることが期待されています。\n実際の値:\n%s\n期待されている値:\n%s") s:set("assertion.same.negative", "オブジェクトの内容が同一でないことが期待されています。\n実際の値:\n%s\n期待されていない値:\n%s") s:set("assertion.equals.positive", "オブジェクトが同一であることが期待されています。\n実際の値:\n%s\n期待されている値:\n%s") ...
mit
Tele-Sped/Tele-Sped
bot/seedbot.lua
180
10314
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...
agpl-3.0
luadch/luadch
scripts/cmd_talk.lua
1
5079
--[[ cmd_talk.lua by pulsar description: sends your msg without nickname usage: [+!#]talk <MSG> v1.2 by blastbeat: - get rid of useless 'bot_opchat_activate' variable v1.1: - fixed pattern matching / thx Sopor v1.0: -...
gpl-3.0
Dr0virus/k
plugins/export_gban.lua
82
2310
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
Noneatme/mta-lostresources
[gamemodes]/carsoccer/client/CSelection.lua
1
8583
--[[ ########################################################################## ## ## ## Project: 'Carball' - Gamemode for MTA: San Andreas PROJECT X ## ## Developer: Noneatme ## ## License: See LICENSE in the top level directory ## ## ## #...
gpl-2.0
coronalabs/framework-widget
widget_theme_android_holo_dark.lua
1
9879
----------------------------------------------------------------------------------------- -- theme_android_holo_dark.lua ----------------------------------------------------------------------------------------- local modname = ... local theme = {} package.loaded[modname] = theme local imageSuffix = display.imageSuffix ...
mit
AlexarJING/space-war
obj/ships/abilities/annihilator.lua
1
1409
local drawPower={ ["enter"]=function(self,ship) ship.abActive=false ship.drawPowerCd=1 ship.drawPowerTimer=-1 ship.drawPowerRange=300 end, ["update"]=function(self,ship,dt) if ship.abActive then ship.drawPowerTimer=ship.drawPowerTimer-dt if ship.drawPowerTimer<0 then ship.drawPowerTimer=ship.dra...
apache-2.0
Just-D/ejoy2d
examples/ex08.lua
20
1363
-- This example show how user defined shader works local ej = require "ejoy2d" local fw = require "ejoy2d.framework" local pack = require "ejoy2d.simplepackage" pack.load { pattern = fw.WorkDir..[[examples/asset/?]], "sample", } -- define a shader local s = ej.define_shader { name = "EXAMPLE", fs = [[ varying v...
mit
jmespath/jmespath.lua
jmespath.lua
1
39653
local jmespath = { _VERSION = '0.1.0', _DESCRIPTION = 'Declaritively extract data from JSON like structures', _URL = 'https://github.com/mtdowling/jmespath.lua', _LICENSE = 'https://github.com/mtdowling/jmespath.lua/blob/master/LICENSE' } ------------------------------------------ -- Custom JSO...
mit
roelofr/HorrorStory
gamemodes/horrorstory/gamemode/vgui/hud.lua
1
2340
--[[ VGUI control, holds the hud ]] local HPHudConvar = CreateClientConVar( "horrorstory_hud_image", "default", { FCVAR_ARCHIVE } ) PANEL = {} function PANEL:Init( ) self:SetDrawBackground( false ) self.font = "DermaLarge" self.remeasure = 0 self.textHeight = 0 self.myHeight = 128 self.randomTexture = n...
agpl-3.0
zhukunqian/slua-1
build/luajit-2.0.4/src/jit/dis_arm.lua
88
19364
---------------------------------------------------------------------------- -- 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
johhnybritain/ettercap-with-ping
src/lua/share/third-party/stdlib/src/set.lua
12
3663
local list = require "list" -- Primitive methods (know about representation) -- The representation is a table whose tags are the elements, and -- whose values are true. --- Say whether an element is in a set -- @param s set -- @param e element -- @return <code>true</code> if e is in set, <code>false</code> -- otherw...
gpl-2.0
johhnybritain/ettercap-with-ping
src/lua/share/core/ettercap.lua
3
9678
--- -- Basic ettercap functionality! -- -- Copyright (C) Ryan Linn and Mike Ryan -- -- 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 y...
gpl-2.0
Noneatme/mta-lostresources
[gamemodes]/twd/server/CLogger.lua
1
2080
-- ####################################### -- ## Project:MTA:The Walking Death ## -- ## Name: Script ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ####################################### -- FUNCTIONS / METHODS -- local cFunc = {} -- Local Functions local cSe...
gpl-2.0
psychon/lgi
tests/test.lua
2
4322
--[[-------------------------------------------------------------------------- LGI core testsuite runner. Copyright (c) 2010, 2011 Pavel Holejsovsky Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php --]]-------------------------------------------------------------------------...
mit
vipteam1/VIPTEAM
plugins/raeplybot.lua
1
3319
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #اسم الملف هنا ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ▄▀ ▀▄...
gpl-2.0
grushnakk/ComputerCraftProgramming
Adrian/ores.lua
1
1894
local length local tArgs -- functions local function getFuelNeeded() return (6 * length) - turtle.getFuelLevel() end local function refuel() turtle.refuel() local fuelNeeded = getFuelNeeded() while fuelNeeded > 0 do print("For completing the tunnel the turtle needs " ..fuelNeeded.. " more fuel units.") write("...
gpl-3.0
SammyJames/Rave
Libs/LibAddonMenu-1.0/LibAddonMenu-1.0.lua
5
14674
local MAJOR, MINOR = "LibAddonMenu-1.0", 6 local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not lam then return end --the same or newer version of this lib is already loaded into memory --UPVALUES-- lam.lastAddedControl = {} local lastAddedControl = lam.lastAddedControl local wm = GetWindowManager() ...
mit
sami2448/sam
plugins/antibot.lua
29
3063
local function isBotAllowed (userId, chatId) local hash = 'anti-bot:allowed:'..chatId..':'..userId local banned = redis:get(hash) return banned end local function allowBot (userId, chatId) local hash = 'anti-bot:allowed:'..chatId..':'..userId redis:set(hash, true) end local function disallowBot (userId, cha...
gpl-2.0
eniallator/platformer
src/compression/compress.lua
1
3742
local binaryUtils = require 'src.utils.binary' local maxValues local function updateMaxVal(tbl1, tbl2) for key, val in pairs(tbl2) do local binLength = #binaryUtils.numToBin(val) tbl1[key] = (not tbl1[key] or binLength > tbl1[key]) and binLength or tbl1[key] end end local function getCoords(str) local x...
gpl-3.0
CG-F16-4-Rutgers/steersuite-rutgers
build/premake4.lua
8
15304
-- -- premake4 file to build SteerSuite -- http://steersuite.cse.yorku.ca -- Copyright (c) 2009-2015 Glen Berseth, Mubbasir Kapadia, Shawn Singh, Petros Faloutsos, Glenn Reinman -- See license.txt for complete license. -- local action = _ACTION or "" local todir = "./" .. action function file_exists(name) local f=...
gpl-3.0
RobertoMalatesta/ProDBG
bin/macosx/tundra/scripts/tundra/nodegen.lua
6
25902
module(..., package.seeall) local unitgen = require "tundra.unitgen" local util = require "tundra.util" local path = require "tundra.path" local depgraph = require "tundra.depgraph" local buildfile = require "tundra.buildfile" local native = require "tundra.native" local ide_backend = nil local curre...
mit
RuiChen1113/luci
applications/luci-app-polipo/luasrc/model/cbi/polipo.lua
3
5755
-- Copyright 2008 Aleksandar Krsteski <alekrsteski@gmail.com> -- Licensed to the public under the Apache License 2.0. m = Map("polipo", translate("Polipo"), translate("Polipo is a small and fast caching web proxy.")) -- General section s = m:section(NamedSection, "general", "polipo", translate("Proxy")) s:tab("gene...
apache-2.0
liuxuezhan/skynet
lualib/sproto.lua
31
5663
local core = require "sproto.core" local assert = assert local sproto = {} local host = {} local weak_mt = { __mode = "kv" } local sproto_mt = { __index = sproto } local sproto_nogc = { __index = sproto } local host_mt = { __index = host } function sproto_mt:__gc() core.deleteproto(self.__cobj) end function sproto...
mit
mms92/wire
lua/effects/jump_out.lua
17
1689
EFFECT.Mat = Material( "effects/select_ring" ) /*--------------------------------------------------------- Initializes the effect. The data is a table of data which was passed from the server. ---------------------------------------------------------*/ function EFFECT:Init( data ) local TargetEntity = data:G...
apache-2.0
hbl0307106015/packages
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua
111
1535
-- ------ member configuration ------ -- ds = require "luci.dispatcher" m5 = Map("mwan3", translate("MWAN Member Configuration")) m5:append(Template("mwan/config_css")) mwan_member = m5:section(TypedSection, "member", translate("Members"), translate("Members are profiles attaching a metric and weight to an MWAN ...
gpl-2.0
kkbjbj/LiteServer
test/class.lua
1
3591
function clone(object) local lookup_table = {} local function _copy(object) if type(object) ~= "table" then return object elseif lookup_table[object] then return lookup_table[object] end local new_table = {} lookup_table[object] = new_table ...
mit
vipteam1/VIPTEAM
plugins/arabic_lock.lua
1
2044
antiarabic = {}--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ File name : ( #arabic_lock ) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 )...
gpl-2.0
cryovat/lord-evil-game
src/behavior.lua
1
6800
local fw = require "fw.init" local Entity = require "Entity" local Endscreen = require "Endscreen" local M = {} local player_speed, player_jump_speed, player_gravity = 60, 80, 60 local respawn_delay = 0.5 M.types = { player="player"; spike="spike"; acid="acid"; damsel="damsel"; spawner="spanwer"; ...
mit
kamichidu/lua-jclass
lib/jmethod.lua
1
3203
local prototype= require 'prototype' local access_flags= require 'raw.access_flags' local parser= require 'util.parser_factory' local utf8= require 'util.utf8' local jmethod= prototype { default= prototype.assignment_copy, table= prototype.deep_copy, } jmethod.attrs= {} function jmethod.ne...
mit
coronalabs/framework-widget
widgetLibrary/widget_searchField.lua
1
10569
-- Abstract: widget.newSearchField() -- Code is MIT licensed; see https://www.coronalabs.com/links/code/license --------------------------------------------------------------------------------------- local M = { _options = {}, _widgetName = "widget.newSearchField", } -- Require needed widget files local _widget =...
mit
GSRMOHAMMAD/forcetg
forcee-bot.lua
1
14050
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") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This function is ...
gpl-2.0
airtaxi/ATLuaClass
ATLuaClass/test/inherit_test.lua
1
1549
-- Adding parent path into package.path since test is in subdirectory of module. package.path = package.path .. ";../?.lua" -- since we added parent directory into package.path, we require "class" in this case. local ATLuaClass = require("class") -- test case #1 : Basic inherit print("test case #1 : Basic inherit") ...
apache-2.0