repo_name
stringlengths
6
69
path
stringlengths
6
178
copies
stringclasses
278 values
size
stringlengths
4
7
content
stringlengths
671
917k
license
stringclasses
15 values
TrossSoftwareAndTech/webvt
lib/node-v7.2.0/deps/v8/tools/gcmole/gccause.lua
157
2313
-- Copyright 2011 the V8 project authors. All rights reserved. -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- -- * Redistributions of source code must retain the above copyright -- notice, this list of ...
gpl-3.0
nstockton/mushclient-mume
lua/getch.lua
1
1417
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- Copyright (C) 2019 Nick Stockton <https://github.com/nstockton> -- For compatibility with Lua >= 5.2. lo...
mpl-2.0
SiENcE/APE
ui_scripts/ui_collection.lua
2
2143
-- undrawable container element -- you can hold stuff in it, strings, numbers, tables, userdata etc -- has simple adding, deleting and getting interface -- UIManager's version of an array Collection = {} Collection.__index = Collection Collection.ident = "ui_collection" Collection.name = "Collection" Collection.update...
mit
mrmhxx82/JokerBot
plugins/all.lua
1321
4661
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
uonline/debut
src/day2/act3/bazaar_stories.dlg.lua
1
11993
-- Диалог с продавцом пряностей bazaar_stories = dlg { nam = 'Продавец пряностей'; hideinv = true; entered = [[ -- И чего мы так шумим? -- обращаешься ты к торговцу, на столе которого расставлено множество баночек самых разных размеров и форм. ^ Тот в ответ с досадой разводит руками. ^ -- Да ведь не поку...
gpl-3.0
cyanskies/OpenRA
mods/ra/maps/survival02/survival02.lua
10
13010
FrenchSquad = { "2tnk", "2tnk", "mcv" } TimerTicks = DateTime.Minutes(10) AttackTicks = DateTime.Seconds(52) AttackAtFrame = DateTime.Seconds(18) AttackAtFrameIncrement = DateTime.Seconds(18) Producing = true SpawningInfantry = true ProduceAtFrame = DateTime.Seconds(12) ProduceAtFrameIncrement = DateTime.Seconds(12) S...
gpl-3.0
opentechinstitute/luci
applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua
36
1043
--[[ LuCI hd-idle (c) 2008 Yanira <forum-2008@email.de> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- require("nixio.fs") m = Map...
apache-2.0
tinydanbo/Impoverished-Starfighter
lib/loveframes/objects/progressbar.lua
7
8120
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- progressbar object local newobject = loveframes.NewObject("progressbar", "loveframes_object_progressbar", true) --[[----...
mit
adamflott/wargus
scripts/ai/passive.lua
3
1938
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (____ /__| (____ /\___ /|____/...
gpl-2.0
hfjgjfg/seed355
plugins/admin.lua
230
6382
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_profile_photo(file, ok_cb, false) send_large_msg(rec...
gpl-2.0
lizh06/premake-core
modules/codelite/tests/test_codelite_workspace.lua
6
3637
--- -- codelite/tests/test_codelite_workspace.lua -- Validate generation for CodeLite workspaces. -- Author Manu Evans -- Copyright (c) 2015 Manu Evans and the Premake project --- local suite = test.declare("codelite_workspace") local codelite = premake.modules.codelite -- -- Setup -- local wks, prj function s...
bsd-3-clause
RickvanMiltenburg/vktut
project/android/app/include/vulkan/spirv.lua
6
23353
-- Copyright (c) 2014-2016 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), -- to deal in the Materials without restriction, including without limitation -- the rights to use, copy, mod...
mit
Frenzie/koreader-base
spec/unit/common_spec.lua
3
2111
package.path = "common/?.lua;" .. package.path package.cpath = "common/?.so;" .. package.cpath require("ffi_wrapper") local url = require("socket.url") local http = require("socket.http") local https = require("ssl.https") local buffer = require("string.buffer") local Blitbuffer = require("ffi/blitbuffer") describe("...
agpl-3.0
opentechinstitute/luci
protocols/ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua
59
3798
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- local ma...
apache-2.0
mahdib9/89
plugins/search_youtube.lua
674
1270
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end local function searchYoutubeVideos(text) local url = 'https://www.googleapis.com/youtube/v3/search?' u...
gpl-2.0
ioiasff/khp
plugins/search_youtube.lua
674
1270
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end local function searchYoutubeVideos(text) local url = 'https://www.googleapis.com/youtube/v3/search?' u...
gpl-2.0
leanlyne/ShootColorX
cocos2d/external/lua/luajit/src/src/jit/dis_x86.lua
99
29330
---------------------------------------------------------------------------- -- LuaJIT x86/x64 disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h --------------------------------------------------------------------------...
mit
HEYAHONG/nodemcu-firmware
lua_modules/ds3231/ds3231-web.lua
7
1339
local ds3231 = require('ds3231') -- ESP-01 GPIO Mapping local gpio0, gpio2 = 3, 4 local port = 80 local days = { [1] = "Sunday", [2] = "Monday", [3] = "Tuesday", [4] = "Wednesday", [5] = "Thursday", [6] = "Friday", [7] = "Saturday" } local months = { [1] = "January", [2] = "Febuary", [3] = "March"...
mit
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/-shaders-palette/c_rtpool.lua
4
2366
-- -- c_rtpool.lua -- scx, scy = guiGetScreenSize () ----------------------------------------------------------------------------------- -- Pool of render targets ----------------------------------------------------------------------------------- RTPool = {} RTPool.list = {} function RTPool.frameStart() for rt,info...
mit
mrvigeo/NewTelegram
plugins/owners.lua
284
12473
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
opentechinstitute/luci
applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
76
2144
--[[ Luci diag - Diagnostics controller module (c) 2009 Daniel Dickinson Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- module("luci.cont...
apache-2.0
opentechinstitute/luci
modules/rpc/luasrc/jsonrpcbind/uci.lua
81
1914
--[[ 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 ht...
apache-2.0
lsaint/act
script/room.lua
1
13673
require "utility" require "round" require "gift" require "db" GameRoom = {} GameRoom.__index = GameRoom function GameRoom.new(tsid, sid) local self = setmetatable({}, GameRoom) self.tsid = tsid self.sid = sid self.uid2player = {} self.presenters = {} self.status = "Ready" self.mode = "MOD...
apache-2.0
adib1380/antispam
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
opentechinstitute/luci
applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua
74
3766
--[[ LuCI - Lua Configuration Interface Copyright 2010 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- lo...
apache-2.0
tinydanbo/Impoverished-Starfighter
game/enemies/mediumFrigate.lua
1
2348
Class = require "lib.hump.class" Enemy = require "entities.enemy" vector = require "lib.hump.vector" EnemyBullet = require "entities.enemyBullet" EntityTypes = require "entities.types" MediumFrigate = Class{__includes = Enemy, init = function(self, x, y, state) Enemy.init(self, x, y, state) self.health = 200 se...
mit
opentechinstitute/luci
applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
92
6917
-- wizard rewrite wip local uci = require "luci.model.uci".cursor() local sys = require "luci.sys" local util = require "luci.util" local ip = require "luci.ip" local community = "profile_" .. (uci:get("freifunk", "community", "name") or "Freifunk") local mesh_network = ip.IPv4(uci:get_first(community, "community", "...
apache-2.0
minecraftgame-andrd/minecraftgame
bot/utils.lua
473
24167
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0
tinydanbo/Impoverished-Starfighter
lib/loveframes/objects/internal/columnlist/columnlistrow.lua
10
6336
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- columnlistrow class local newobject = loveframes.NewObject("columnlistrow", "loveframes_object_columnlistrow", true) --[...
mit
HEYAHONG/nodemcu-firmware
app/lua53/host/tests/all.lua
7
7745
#!../lua -- $Id: all.lua,v 1.95 2016/11/07 13:11:28 roberto Exp $ -- See Copyright Notice at the end of this file local version = "Lua 5.3" if _VERSION ~= version then io.stderr:write("\nThis test suite is for ", version, ", not for ", _VERSION, "\nExiting tests\n") return end _G._ARG = arg -- save arg fo...
mit
darkdukey/sdkbox-facebook-sample-v2
samples/Lua/TestLua/Resources/luaScript/PerformanceTest/PerformanceSpriteTest.lua
9
16025
local kMaxNodes = 50000 local kBasicZOrder = 10 local kNodesIncrease = 250 local TEST_COUNT = 7 local s = CCDirector:sharedDirector():getWinSize() ----------------------------------- -- For test functions ----------------------------------- local function performanceActions(sprite) sprite:setPosition(CCPointMake(ma...
mit
lipp/tinker
tinker/voltage.lua
1
1843
return { methods = { get_voltage = { funcid = 1, outs = 'H' }, get_analog_value = { funcid = 2, outs = 'H' }, set_voltage_callback_period = { funcid = 3, ins = 'I' }, get_voltage_callback_period = { funcid = 4, ...
mit
merlokk/proxmark3
client/scripts/ndef_dump.lua
12
7084
-- Ability to read what card is there local getopt = require('getopt') local cmds = require('commands') local taglib = require('taglib') local desc = [[This script will automatically recognize and dump full content of a NFC NDEF Initialized tag; non-initialized tags will be ignored. It also write the dump to an eml...
gpl-2.0
cyanskies/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
Arashbrsh/a1wez-
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- 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 check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
ashkanpj/fire
plugins/domaintools.lua
359
1494
local ltn12 = require "ltn12" local https = require "ssl.https" -- 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 check(name) local api = "https://domainsearch.p.mashape.com/index.php?"...
gpl-2.0
cyberz-eu/octopus
extensions/database/src/controller/DatabaseAddReferenceController.lua
1
2107
local json = require "json" local param = require "param" local exception = require "exception" local exit = require "exit" local util = require "util" local database = require "database" local from = param.from local to = param.to local parentId = param.parentId local id = param.id local db = databas...
bsd-2-clause
ioiasff/khp
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
paulfertser/packages
net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua
14
4185
-- ------ extra functions ------ -- function ruleCheck() -- determine if rule needs a protocol specified local sourcePort = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".src_port")) local destPort = ut.trim(sys.exec("uci get -p /var/state mwan3." .. arg[1] .. ".dest_port")) if sourcePort ~= "" or d...
gpl-2.0
nstockton/mushclient-mume
lua/sha2.lua
1
2859
--sha256/384/512 hash and digest local ffi = require'ffi' local C = ffi.load'sha2.dll' ffi.cdef[[ enum { SHA1_BLOCK_LENGTH = 40, SHA1_DIGEST_LENGTH = 20, SHA224_BLOCK_LENGTH = 56, SHA224_DIGEST_LENGTH = 28, SHA256_BLOCK_LENGTH = 64, SHA256_DIGEST_LENGTH = 32, SHA384_BLOCK_LENGTH = 128, SHA384_D...
mpl-2.0
adamflott/wargus
scripts/ui.lua
1
19866
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (____ /__| (____ /\___ /|____//...
gpl-2.0
Frenzie/koreader-base
ffi/harfbuzz.lua
1
3910
local coverage = require("ffi/harfbuzz_coverage") local ffi = require("ffi") local hb = ffi.load("libs/libharfbuzz." .. (ffi.os == "OSX" and "0.dylib" or "so.0")) local HB = setmetatable({}, {__index = hb}) require("ffi/harfbuzz_h") local hb_face_t = {} hb_face_t.__index = hb_face_t ffi.metatype("hb_face_t", hb_face_...
agpl-3.0
cyberz-eu/octopus
extensions/editor/config.lua
1
5205
local config = {} -- extension configuration local editorHeaderStyleButton = [[style="font-size: 21px; padding-top: 5px;"></i>]] config.frontend = { mainColor = "#49bf9d", selectedColor = "#1e90ff", editorUrl = "/editor", editorHomeUrl = "", editorFileContentUrl = "/fileContent", editorDirectoryUr...
bsd-2-clause
Arashbrsh/a1wez-
plugins/moderation.lua
336
9979
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 local username = v.username data[tostring(m...
gpl-2.0
Frenzie/koreader-base
ffi/giflib_h.lua
3
2072
local ffi = require("ffi") ffi.cdef[[ static const int GIF_OK = 1; static const int GIF_ERROR = 0; typedef int GifWord; typedef unsigned char GifByteType; typedef struct GifColorType GifColorType; struct GifColorType { GifByteType Red; GifByteType Green; GifByteType Blue; }; typedef struct ColorMapObject ColorMa...
agpl-3.0
opentechinstitute/luci
applications/luci-qos/luasrc/model/cbi/qos/qos.lua
41
2689
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- loc...
apache-2.0
daurnimator/lua-http
http/stream_common.lua
1
4479
--[[ This module provides common functions for HTTP streams no matter the underlying protocol version. This is usually an internal module, and should be used by adding the `methods` exposed to your own HTTP stream objects. ]] local cqueues = require "cqueues" local monotime = cqueues.monotime local new_headers = requ...
mit
Arashbrsh/a1wez-
plugins/id.lua
355
2795
local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name..' ' end if user.lastname then text = text..user.last_name end return text end local function returnids(cb_extra, success, resu...
gpl-2.0
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua
2
44338
require "cocos.3d.3dConstants" local size = cc.Director:getInstance():getWinSize() local scheduler = cc.Director:getInstance():getScheduler() local attributeNames = { "a_position", "a_color", "a_texCoord", "a_texCoord1", "a_texCoord2", "a_texCoord3", "a_texCoord4", "a_texCoord5", "...
mit
LuaDist2/oil
lua/loop/component/base.lua
12
6632
-------------------------------------------------------------------------------- ---------------------- ## ##### ##### ###### ----------------------- ---------------------- ## ## ## ## ## ## ## ----------------------- ---------------------- ## ## ## ## ## ###### --------------------...
mit
stubbfel/blob2wireshark
src/b2ws-plugin/b2ws_import.lua
1
2554
require "b2ws_const" local loaded_b2ws_util= assert(loadfile(b2ws_const.B2WS_PLUGIN_PATH .. b2ws_const.B2WS_UTIL_FILE)) loaded_b2ws_util() function b2ws_import_blob(config_string) -- create config object local b2ws_config = create_b2ws_config_object(config_string) -- read blob file local bytes = read_b2ws_file(b2...
mit
satanevil/copy-creed
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
sumefsp/zile
lib/zile/redisplay.lua
1
2400
-- Terminal independent redisplay routines -- -- Copyright (c) 2010-2014 Free Software Foundation, Inc. -- -- This file is part of GNU Zile. -- -- 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;...
gpl-3.0
FarGroup/FarManager
plugins/luamacro/api.lua
1
26154
-- coding: utf-8 local Shared = ... local checkarg, utils, yieldcall = Shared.checkarg, Shared.utils, Shared.yieldcall local MCODE_F_USERMENU = 0x80C66 local MCODE_F_FAR_GETCONFIG = 0x80C69 local F=far.Flags local band,bor = bit64.band,bit64.bor local MacroCallFar = Shared.MacroCallFar local function SetProperties (...
bsd-3-clause
HEYAHONG/nodemcu-firmware
lua_examples/gossip_example.lua
7
2136
-- need a wifi connection -- enter your wifi credentials local credentials = {SSID = "SSID", PASS = "PASS"}; -- push a message onto the network -- this can also be done by changing gossip.networkState[gossip.ip].data = {temperature = 78}; local function sendAlarmingData() Gossip.pushGossip({temperature = 78}); pri...
mit
mobarski/sandbox
scite/old/wscite_zzz/lexers/notused/vb.lua
5
1773
-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. -- VisualBasic LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'vb'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local com...
mit
darkdukey/sdkbox-facebook-sample-v2
samples/Lua/TestLua/Resources/luaScript/TransitionsTest/TransitionsTest.lua
7
10467
require "luaScript/TransitionsTest/TransitionsName" local SceneIdx = -1 local CurSceneNo = 2 local TRANSITION_DURATION = 1.2 local s = CCDirector:sharedDirector():getWinSize() local function switchSceneTypeNo() if CurSceneNo == 1 then CurSceneNo = 2 else CurSceneNo = 1 end end local func...
mit
alfredtofu/thrift
lib/lua/TBinaryProtocol.lua
90
6141
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ma...
apache-2.0
sartura/packages
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx7.lua
76
2091
#!/usr/bin/lua local json = require "cjson" local function interpret_suffix(rate) if rate ~= nil then local value = string.sub(rate, 1, -2) local suffix = string.sub(rate, -1) if suffix == "K" then return tonumber(value) * 10^3 end if suffix == "M" then return tonumber(value) * 10^6 end if suffi...
gpl-2.0
youssef-emad/shogun
examples/undocumented/lua_modular/kernel_comm_word_string_modular.lua
21
1375
require 'modshogun' require 'load' traindat = load_dna('../data/fm_train_dna.dat') testdat = load_dna('../data/fm_test_dna.dat') parameter_list = {{traindat,testdat,4,0,false, false},{traindat,testdat,4,0,False,False}} function kernel_comm_word_string_modular (fm_train_dna,fm_test_dna, order, gap, reverse, use_sign) ...
gpl-3.0
Telecat-full/-Telecat-Full
plugins/feedback.lua
3
1031
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
cooljeanius/CEGUI
datafiles/lua_scripts/demo8.lua
6
3719
----------------------------------------- -- Start of handler functions ----------------------------------------- ----------------------------------------- -- Alpha slider handler (not used!) ----------------------------------------- function sliderHandler(args) CEGUI.System:getSingleton():getGUISheet():setAlpha(CE...
gpl-3.0
jithumon/Kochu
plugins/setlang.lua
8
1864
local config = require 'config' local u = require 'utilities' local api = require 'methods' local plugin = {} local function doKeyboard_lang() local keyboard = { inline_keyboard = {} } for lang, flag in pairs(config.available_languages) do local line = {{text = flag, callback_data = 'langselected:'..lang}} t...
gpl-2.0
pratik2709/RayCasting-Engine
game/utilities.lua
1
1777
function print_r(t) local print_r_cache = {} local function sub_print_r(t, indent) if (print_r_cache[tostring(t)]) then print(indent .. "*" .. tostring(t)) else print_r_cache[tostring(t)] = true if (type(t) == "table") then for pos, val in pair...
mit
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/SceneReader.lua
19
1434
-------------------------------- -- @module SceneReader -- @parent_module ccs -------------------------------- -- -- @function [parent=#SceneReader] setTarget -- @param self -- @param #function selector -- @return SceneReader#SceneReader self (return value: ccs.SceneReader) --------------------------------...
mit
Xirotegnicrev/Specialized_Industry
prototypes/recipe/recipe.lua
1
2328
data:extend({ --Train products assembling machines { type = "recipe", name = "trains-rails-assembling-machine", enabled = true, ingredients = { {"iron-plate", 1}, }, result = "trains-rails-assembling-machine" }, { type = "recipe", name = "trains-locomotives-assembling-machine", enabled = t...
mit
meirfaraj/tiproject
finance/src/ui/gcutils.lua
1
4919
Color = { ["black"] = { 0, 0, 0 }, ["red"] = { 255, 0, 0 }, ["green"] = { 0, 255, 0 }, ["blue "] = { 0, 0, 255 }, ["white"] = { 255, 255, 255 }, ["brown"] = { 165, 42, 42 }, ["cyan"] = { 0, 255, 255 }, ["darkblue"] = { 0, 0, 139 }, ["darkred"] = { 139, 0, 0 }, ["fuchsia"] = { 25...
apache-2.0
durandtibo/wsl.resnet.torch
trainMultiLabel.lua
1
7235
-- -- 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. -- -- The training...
mit
mobarski/sandbox
scite/old/wscite_zzz/lexers/notused/python.lua
1
5674
-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. -- Python LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'python'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local comm...
mit
caicloud/ingress
rootfs/etc/nginx/lua/balancer.lua
2
10252
local ngx_balancer = require("ngx.balancer") local cjson = require("cjson.safe") local util = require("util") local dns_lookup = require("util.dns").lookup local configuration = require("configuration") local round_robin = require("balancer.round_robin") local chash = require("balancer.chash") local chashsubset = requi...
apache-2.0
UB12/y_r
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
ioiasff/khp
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
hfjgjfg/amir2
plugins/danbooru.lua
616
1750
do local URL = "http://danbooru.donmai.us" local URL_NEW = "/posts.json" local URL_POP = "/explore/posts/popular.json" local scale_day = "?scale=day" local scale_week = "?scale=week" local scale_month = "?scale=month" local function get_post(url) local b, c, h = http.request(url) if c ~= 200 then return nil end ...
gpl-2.0
shadoalzupedy/shadow
plugins/lock_emoji.lua
17
2548
--[[ # #ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ #:(( # For More Information ....! # Developer : Aziz < @TH3_GHOST > # our channel: @DevPointTeam # Version: 1.1 #:)) #ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ # ]] lo...
gpl-2.0
cyanskies/OpenRA
mods/ra/maps/soviet-06a/soviet06a.lua
5
5989
ArmorAttack = { } AttackPaths = { { AttackWaypoint1 }, { AttackWaypoint2 } } BaseAttackers = { BaseAttacker1, BaseAttacker2 } InfAttack = { } IntroAttackers = { IntroEnemy1, IntroEnemy2, IntroEnemy3 } Trucks = { Truck1, Truck2 } AlliedInfantryTypes = { "e1", "e1", "e3" } AlliedArmorTypes = { "jeep", "jeep", "1tnk", "1...
gpl-3.0
Frenzie/koreader-base
ffi/utf8proc.lua
1
3144
--[[-- Module for utf8 string operations. This is a LuaJIT FFI wrapper for utf8proc. @module ffi.utf8proc ]] local ffi = require("ffi") local C = ffi.C require("ffi/posix_h") require("ffi/utf8proc_h") local libutf8proc if ffi.os == "Windows" then libutf8proc = ffi.load("libs/libutf8proc-2.dll") elseif ffi.os =...
agpl-3.0
snowplow/snowplow-lua-tracker
spec/unit/snowplow_spec.lua
1
3247
--- snowplow_spec.lua -- -- Copyright (c) 2013 - 2022 Snowplow Analytics Ltd. All rights reserved. -- -- This program is licensed to you under the Apache License Version 2.0, -- and you may not use this file except in compliance with the Apache License Version 2.0. -- You may obtain a copy of the Apache License Version...
apache-2.0
gedads/Neodynamis
scripts/zones/Abyssea-Attohwa/npcs/qm3.lua
3
1347
----------------------------------- -- Zone: Abyssea-Attohwa -- NPC: qm3 (???) -- Spawns Pallid Percy -- !pos ? ? ? 215 ----------------------------------- require("scripts/globals/status"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) -...
gpl-3.0
gedads/Neodynamis
scripts/zones/Selbina/npcs/Explorer_Moogle.lua
17
1855
----------------------------------- -- Area: Selbina -- NPC: Explorer Moogle ----------------------------------- package.loaded["scripts/zones/Selbina/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Selbina/TextIDs"); require("scripts/globals/settings"); require("scripts/globals/teleports"...
gpl-3.0
starlightknight/darkstar
scripts/globals/mobskills/spirit_tap.lua
11
1292
--------------------------------------------- -- Spirit Tap -- Attempts to absorb one buff from a single target, or otherwise steals HP. -- Type: Magical -- Utsusemi/Blink absorb: Ignores Shadows -- Range: Melee -- Notes: Can be any (positive) buff, including food. Will drain about 100HP if it can't take any buffs ----...
gpl-3.0
starlightknight/darkstar
scripts/globals/spells/bluemagic/grand_slam.lua
4
1517
----------------------------------------- -- Spell: Grand Slam -- Delivers an area attack. Damage varies with TP -- Spell cost: 24 MP -- Monster Type: Beastmen -- Spell Type: Physical (Blunt) -- Blue Magic Points: 2 -- Stat Bonus: INT+1 -- Level: 30 -- Casting Time: 1 seconds -- Recast Time: 14.25 seconds -- Skillchain...
gpl-3.0
gedads/Neodynamis
scripts/zones/West_Ronfaure/npcs/qm4.lua
3
1701
----------------------------------- -- Area: West Ronfaure -- NPC: qm4 (???) -- Involved in Quest: The Dismayed Customer -- !pos -399 -10 -438 100 ----------------------------------- package.loaded["scripts/zones/West_Ronfaure/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); r...
gpl-3.0
gedads/Neodynamis
scripts/zones/North_Gustaberg/npcs/Quellebie_RK.lua
3
3339
----------------------------------- -- Area: North Gustaberg -- NPC: Quellebie, R.K. -- Type: Border Conquest Guards -- !pos -520.704 38.75 560.258 106 ----------------------------------- package.loaded["scripts/zones/North_Gustaberg/TextIDs"] = nil; ----------------------------------- require("scripts/globals/conque...
gpl-3.0
gedads/Neodynamis
scripts/zones/Lower_Jeuno/npcs/_l09.lua
3
2850
----------------------------------- -- Area: Lower Jeuno -- NPC: Streetlamp -- Involved in Quests: Community Service -- !pos -32 0 -28 245 ----------------------------------- package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("sc...
gpl-3.0
gedads/Neodynamis
scripts/zones/Valley_of_Sorrows/npcs/relic.lua
3
1876
----------------------------------- -- Area: Valley of Sorrows -- NPC: <this space intentionally left blank> -- !pos -14 -3 56 128 ----------------------------------- package.loaded["scripts/zones/Valley_of_Sorrows/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Valley_of_Sorrows/TextIDs")...
gpl-3.0
hades2013/openwrt-mtk
package/ralink/ui/luci-mtk/src/contrib/luasrcdiet/lua/optlex.lua
125
31588
--[[-------------------------------------------------------------------- optlex.lua: does lexer-based optimizations This file is part of LuaSrcDiet. Copyright (c) 2008 Kein-Hong Man <khman@users.sf.net> The COPYRIGHT file describes the conditions under which this software may be distributed. See the Chan...
gpl-2.0
O-P-E-N/CC-ROUTER
feeds/luci/contrib/luasrcdiet/lua/optlex.lua
125
31588
--[[-------------------------------------------------------------------- optlex.lua: does lexer-based optimizations This file is part of LuaSrcDiet. Copyright (c) 2008 Kein-Hong Man <khman@users.sf.net> The COPYRIGHT file describes the conditions under which this software may be distributed. See the Chan...
gpl-2.0
mishin/Algorithm-Implementations
Breadth_First_Search/Lua/Yonaba/bfs.lua
26
3153
-- Generic Breadth-First search algorithm implementation -- See : http://en.wikipedia.org/wiki/Breadth-first_search -- Notes : this is a generic implementation of Breadth-First search algorithm. -- It is devised to be used on any type of graph (point-graph, tile-graph, -- or whatever. It expects to be initialized with...
mit
starlightknight/darkstar
scripts/zones/The_Garden_of_RuHmet/mobs/Ixaern_DRK.lua
9
2524
----------------------------------- -- Area: The Garden of Ru'Hmet -- NM: Ix'aern DRK -- !pos -240 5.00 440 35 -- !pos -280 5.00 240 35 -- !pos -560 5.00 239 35 -- !pos -600 5.00 440 35 ----------------------------------- local ID = require("scripts/zones/The_Garden_of_RuHmet/IDs"); mixins = {require("scripts/mixins/...
gpl-3.0
alomina007/asli
plugins/weather.lua
1
1899
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) local url = BASE_URL url = url..'?q='..location..'&APPID=eedbc05ba060c787ab0614cad1f2e12b' url = url..'&units=metric' local b, c, h = http.request(url) if c ~= 200...
gpl-2.0
starlightknight/darkstar
scripts/zones/Throne_Room/IDs.lua
8
1338
----------------------------------- -- Area: Throne_Room ----------------------------------- require("scripts/globals/zone") ----------------------------------- zones = zones or {} zones[dsp.zone.THRONE_ROOM] = { text = { ITEM_CANNOT_BE_OBTAINED = 6382, -- You cannot obtain the <item>. Come back after...
gpl-3.0
gedads/Neodynamis
scripts/globals/abilities/haste_samba.lua
4
1434
----------------------------------- -- Ability: Haste Samba -- Inflicts the next target you strike with Haste daze, increasing the attack speed of all those engaged in battle with it. -- Obtained: Dancer Level 45 -- TP Cost: 35% -- Recast Time: 1:00 -- Duration: 1:30 ----------------------------------- require("scripts...
gpl-3.0
dismantl/commotion-apps
lua/commotion_helpers.lua
1
1809
function DIE(str) luci.http.status(500, "Internal Server Error") luci.http.write(str) luci.http.close() end function uci_encode(str) if (str) then str = string.gsub (str, "([^%w])", function(c) return '_' .. tostring(string.byte(c)) end) end return str end function html_encode(str) return string.gsub(s...
gpl-3.0
XanDDemoX/ESOFasterTravel
FasterTravel/WayshrineData.lua
1
17379
local Utils = FasterTravel.Utils local Data = {} -- Hardcoded lookup of all fast travel nodes in all zones =( But at least it is automatically generated by WayshrineDataGenerator =D local _zoneNodeLookup = { [-2147483648] = { }, [353] = { [1] = { ["nodeIndex"] = 217, ["poiIndex"]...
unlicense
pedro-andrade-inpe/terrame
ide/zerobrane/terrame-examples/gis/06-fill.lua
3
3247
--[[ [previous](05-cellularspace.lua) | [contents](00-contents.lua) | [next](07-visualize.lua) After creating a cellular layer, now it is possible to add attributes using the data available. Depending on the geometric representation and the semantics of the input data attributes, different operations can be applied. S...
lgpl-3.0
keplerproject/luarocks
src/luarocks/build.lua
2
14816
local build = {} local path = require("luarocks.path") local util = require("luarocks.util") local fun = require("luarocks.fun") local fetch = require("luarocks.fetch") local fs = require("luarocks.fs") local dir = require("luarocks.dir") local deps = require("luarocks.deps") local cfg = require("luarocks.core.cfg") ...
mit
starlightknight/darkstar
scripts/globals/items/lungfish.lua
11
1043
----------------------------------------- -- ID: 4315 -- Item: Lungfish -- Food Effect: 5Min, Mithra only ----------------------------------------- -- Dexterity -2 -- Mind 4 ----------------------------------------- require("scripts/globals/status") require("scripts/globals/msg") ---------------------------------------...
gpl-3.0
dantezhu/neon
examples/tpl/src/cocos/extension/DeprecatedExtensionEnum.lua
62
1410
if nil == cc.Control then return end _G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS _G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS _G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE _G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN _G.CC...
mit
starlightknight/darkstar
scripts/zones/QuBia_Arena/bcnms/undying_promise.lua
9
1217
----------------------------------- -- Undying Promise -- Qu'Bia Arena BCNM40, Star Orb -- !additem 1131 ----------------------------------- require("scripts/globals/battlefield") ----------------------------------- function onBattlefieldInitialise(battlefield) battlefield:setLocalVar("loot", 1) battlefield:se...
gpl-3.0
gedads/Neodynamis
scripts/zones/Upper_Jeuno/npcs/Emitt.lua
3
2226
----------------------------------- -- Area: Upper Jeuno -- NPC: Emitt -- !pos -95 0 160 244 ------------------------------------- package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/glo...
gpl-3.0