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
pazos/koreader
plugins/autosuspend.koplugin/main.lua
2
8480
local Device = require("device") if not Device:isCervantes() and not Device:isKobo() and not Device:isRemarkable() and not Device:isSDL() and not Device:isSonyPRSTUX() and not Device:isPocketBook() then return { disabled = true, } end local DataStorage = require("datastorage") local LuaSetting...
agpl-3.0
pecio/RBP-Broker
Common/AceDB-3.0/AceDB-3.0.lua
2
25843
--- **AceDB-3.0** manages the SavedVariables of your addon. -- It offers profile management, smart defaults and namespaces for modules.\\ -- Data can be saved in different data-types, depending on its intended usage. -- The most common data-type is the `profile` type, which allows the user to choose -- the active p...
gpl-3.0
mjarco/sysdig
userspace/sysdig/chisels/ansiterminal.lua
19
2230
--[[ Copyright (C) 2013-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...
gpl-2.0
philsiff/Red-Vs-Blue
Very Basic TDM [Gamemode]/gamemodes/vbtdm/gamemode/goal/cl_goal.lua
1
5861
//Set win goal! function vb_TEAM_2_win() surface.PlaySound( "vbtdm/us_win.mp3" ) local TEAM_2_TeamGoalFrame = vgui.Create( "DFrame" ) TEAM_2_TeamGoalFrame:SetPos( 50, 50 ) --Set the window in the middle of the players screen/game window TEAM_2_TeamGoalFrame:SetSize( 200, 100 ) --Set the size TEAM_2_TeamGoalFrame...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/remover.lua
1
2186
TOOL.Category = "Construction" TOOL.Name = "#tool.remover.name" TOOL.Command = nil TOOL.ConfigName = nil local function RemoveEntity( ent ) if ( ent:IsValid() ) then ent:Remove() end end local function DoRemoveEntity( Entity ) if ( !IsValid( Entity ) || Entity:IsPlayer() ) then return false end -- No...
mit
Maliv/Looper
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
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Event.lua
7
1134
-------------------------------- -- @module Event -- @extend Ref -- @parent_module cc -------------------------------- -- Checks whether the event has been stopped.<br> -- return True if the event has been stopped. -- @function [parent=#Event] isStopped -- @param self -- @return bool#bool ret (return value: bool) ...
mit
musselwhizzle/Focus-Points
focuspoints.lrdevplugin/DefaultPointRenderer.lua
3
18849
--[[ Copyright 2016 Whizzbang Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
apache-2.0
pazos/koreader
spec/unit/switch_plugin_spec.lua
13
5658
describe("SwitchPlugin", function() require("commonrequire") local SwitchPlugin = require("ui/plugin/switch_plugin") local createTestPlugin = function(default_enable, start, stop) return SwitchPlugin:new({ name = "test_plugin", menu_item = "test_plugin_menu", men...
agpl-3.0
payamohajeri/telegram-bot
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
Aminkavari/-xXD4RKXx-
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
yetsky/luci
applications/luci-qos_gargoyle/luasrc/model/cbi/qos_gargoyle/upload.lua
5
4625
--[[ ]]-- local wa = require "luci.tools.webadmin" local fs = require "nixio.fs" m = Map("qos_gargoyle", translate("upload"),translate("UpLoad set")) s = m:section(TypedSection, "upload_class", translate("upload_class")) s.addremove = true s.template = "cbi/tblsection" name = s:option(Value, "name", translate("nam...
apache-2.0
FoxelBox/FoxBukkitLua
lua/src/main/lua/classes/Chat.lua
1
5425
--[[ This file is part of FoxBukkitLua-lua. FoxBukkitLua-lua is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
lgpl-3.0
emadni/lordteami-bot
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
theonlywild/copy
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
sdgdsffdsfff/nginx-openresty-windows
luajit-root-x64/luajit/share/luajit-2.1.0-alpha/jit/dis_arm.lua
17
19363
---------------------------------------------------------------------------- -- LuaJIT ARM disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -...
bsd-2-clause
henry4k/apoapsis-base-game
world/GhostActor.lua
1
4189
--- @classmod base-game.world.GhostActor -- -- Extends @{base-game.world.PhysicalActor}. local class = require 'middleclass' local Vec = require 'core/Vector' local Quat = require 'core/Quaternion' local Timer = require 'core/Timer' local EmptyCollisionShape = require 'core/physics/EmptyCollisionShape' local S...
mit
rigeirani/spm1
plugins/invite.lua
20
2324
--[[ Invite other user to the chat group. Use !invite ********* (where ********* is id_number) to invite a user by id_number. This is the most reliable method. Use !invite @username to invite a user by @username. Less reliable. Some users don't have @username. Use !invite Type print_name Here to invite a user by print_...
gpl-2.0
soumith/nn
SpatialUpSamplingNearest.lua
6
1974
local SpatialUpSamplingNearest, parent = torch.class('nn.SpatialUpSamplingNearest', 'nn.Module') --[[ Applies a 2D up-sampling over an input image composed of several input planes. The upsampling is done using the simple nearest neighbor technique. The Y and X dimensions are assumed to be the last 2 tensor di...
bsd-3-clause
Aminkavari/-xXD4RKXx-
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
rigeirani/spm1
plugins/sp.lua
42
75166
local function run(msg) if msg.text == "[!/]spam" then return "".. [[ ...
gpl-2.0
dromozoa/dromozoa-bind
test/test_core.lua
5
3338
-- Copyright (C) 2018 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-bind. -- -- dromozoa-bind 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 3 of the License, or -...
gpl-3.0
nfleet1080/DSSW_Mod
scripts/speech_ehrieana.lua
1
41268
--[[ --- This is Wilson's speech file for Don't Starve Base --- Write your character's lines here. If you want to use another speech file as a base, get them from data\scripts\ If you have the DLC and want custom lines for those, use a speech file from data\DLC0001\scripts instead. If you want to use quotation ...
mit
rigeirani/satn
plugins/admin.lua
60
6680
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
google/flatbuffers
samples/lua/MyGame/Sample/Monster.lua
17
3936
-- automatically generated by the FlatBuffers compiler, do not modify -- namespace: Sample local flatbuffers = require('flatbuffers') local Monster = {} -- the module local Monster_mt = {} -- the class metatable function Monster.New() local o = {} setmetatable(o, {__index = Monster_mt}) return o end fun...
apache-2.0
HamidRavani/hamid
plugins/bot_manager.lua
89
6427
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(receiver, '...
gpl-2.0
hcqmaker/chattool
chatroom/chatroom.lua
1
1224
local skynet = require "skynet" require "skynet.manager" -- import skynet.register local user_list = {} local command = {} function command.LOGIN(conf) local agent = conf.agent; local name = conf.name; print("user:", name, "login ===>"); table.insert(user_list, {agent=agent,name=name}); return {value="login ok"}...
mit
drmingdrmer/lua-paxos
lib/acid/paxos/round.lua
2
1159
local _M = { _VERSION = require("acid.paxos._ver") } local tableutil = require( "acid.tableutil" ) function _M.new( elts ) assert( elts[ 2 ] ~= nil and elts[ 3 ] == nil, "invalid nr of elts while creating new round" ) local rnd = tableutil.duplist( elts ) return rnd end function _M.zero() ...
mit
xiaowa183/Atlas
lib/proxy/filter.lua
41
1906
module("proxy.filter", package.seeall) local config_file = string.format("proxy.conf.config_%s", proxy.global.config.instance) local config = require(config_file) local whitelist = config.whitelist local blacklist = config.blacklist local log = require("proxy.log") local level = log.level local write_log = log.writ...
gpl-2.0
mrmetti/teleum-new-open
plugins/security.lua
1
11509
--Begin scurity.lua --Begin pre_process function local function pre_process(msg) -- Begin 'RondoMsgChecks' text checks by @rondoozle and Edited by @janlou -- Powered by @AdvanTm -- CopyRight all right reserved if is_chat_msg(msg) or is_super_group(msg) then if msg and not is_momod(msg) and not is_whitelisted(msg.from....
gpl-2.0
soumith/nn
SpatialContrastiveNormalization.lua
3
1572
local SpatialContrastiveNormalization, parent = torch.class('nn.SpatialContrastiveNormalization','nn.Module') function SpatialContrastiveNormalization:__init(nInputPlane, kernel, threshold, thresval) parent.__init(self) -- get args self.nInputPlane = nInputPlane or 1 self.kernel = kernel or torch.Tensor(9...
bsd-3-clause
joaofvieira/luci
applications/luci-app-ltqtapi/luasrc/controller/ltqtapi.lua
73
1071
-- Copyright 2019 John Crispin <blogic@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.ltqtapi", package.seeall) function index() if not nixio.fs.access("/etc/config/telephony") then return end page = node("admin", "telephony") page.target = firstchild() page.title...
apache-2.0
pazos/koreader
frontend/apps/reader/modules/readerview.lua
1
34407
--[[-- ReaderView module handles all the screen painting for document browsing. ]] local AlphaContainer = require("ui/widget/container/alphacontainer") local Blitbuffer = require("ffi/blitbuffer") local ConfirmBox = require("ui/widget/confirmbox") local Device = require("device") local Geom = require("ui/geometry") lo...
agpl-3.0
mys007/cudnn.torch
test/test.lua
1
22263
require 'cudnn' require 'cunn' local cudnntest = {} local precision_forward = 1e-4 local precision_backward = 1e-2 local precision_jac = 1e-3 local nloop = 1 local times = {} local mytester function cudnntest.SpatialConvolution_forward_batch() local bs = math.random(1,32) local from = math.random(1,32) local...
bsd-2-clause
REZATITAN/X
plugins/ingroup.lua
202
31524
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
mjarco/sysdig
userspace/sysdig/chisels/v_connections.lua
4
3168
--[[ Copyright (C) 2013-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...
gpl-2.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/rope.lua
1
5221
TOOL.Category = "Constraints" TOOL.Name = "#tool.rope.name" TOOL.Command = nil TOOL.ConfigName = nil TOOL.ClientConVar[ "forcelimit" ] = "0" TOOL.ClientConVar[ "addlength" ] = "0" TOOL.ClientConVar[ "material" ] = "cable/rope" TOOL.ClientConVar[ "width" ] = "2" TOOL.ClientConVar[ "rigid" ] = "0" function TOOL:...
mit
Aminkavari/-xXD4RKXx-
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
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua
7
1162
-------------------------------- -- @module TransitionTurnOffTiles -- @extend TransitionScene,TransitionEaseScene -- @parent_module cc -------------------------------- -- -- @function [parent=#TransitionTurnOffTiles] easeActionWithAction -- @param self -- @param #cc.ActionInterval action -- @return ActionInterval#A...
mit
eggBOY91/Arctic-Core
src/scripts/lua/Lua/Stable Scripts/Azeroth/Karazhan/BOSS_Karazhan_Curator.lua
30
1319
function Curator_Evocation(Unit, event, miscunit, misc) if Unit:GetManaPct() < 1 and Didthat == 0 then print "Curator Evocation" Unit:FullCastSpell(30254) Didthat = 1 else end end function Curator_Enrage(Unit, event, miscunit, misc) if Unit:GetHealthPct() < 15 and Didthat == 1 then print "Curator_Enrage" ...
agpl-3.0
bradchesney79/2015BeastRouterProject
openwrt/unsquash/squashfs-root/usr/lib/lua/luci/controller/admin/uci.lua
40
1769
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.uci", package.seeall) function index() local redir = luci.http.formvalue("redir", true) or luci.dispatcher.build_url(unpack(...
cc0-1.0
joaofvieira/luci
applications/luci-app-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua
141
1038
--[[ smap_devinfo - SIP Device Information (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 $Id$ ]]-- require("luci.i18n") re...
apache-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/DirectionLight.lua
8
1377
-------------------------------- -- @module DirectionLight -- @extend BaseLight -- @parent_module cc -------------------------------- -- Returns the Direction in parent. -- @function [parent=#DirectionLight] getDirection -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) --------...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/winch.lua
1
6444
TOOL.Category = "Constraints" TOOL.Name = "#tool.winch.name" TOOL.Command = nil TOOL.ConfigName = nil TOOL.ClientConVar[ "rope_material" ] = "cable/rope" TOOL.ClientConVar[ "rope_width" ] = "3" TOOL.ClientConVar[ "fwd_speed" ] = "64" TOOL.ClientConVar[ "bwd_speed" ] = "64" TOOL.ClientConVar[ "fwd_group" ] = "8"...
mit
eggBOY91/Arctic-Core
src/scripts/lua/LuaBridge/Stable Scripts/Outland/Arcatraz/BOSS_Arcatraz_Drakonaar.lua
30
1349
function Drakonaar_Red(Unit, event, miscunit, misc) print "Drakonaar Red" Unit:FullCastSpellOnTarget(14264,Unit:GetClosestPlayer()) Unit:SendChatMessage(11, 0, "This spell will kill you...") end function Drakonaar_Blue(Unit, event, miscunit, misc) print "Drakonaar Blue" Unit:FullCastSpellOnTarget(14261,Unit:GetCl...
agpl-3.0
dangersuperbot/super_boomrange
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
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/entities/widget_bones.lua
1
3594
AddCSLuaFile() local matBone = Material( "widgets/bone.png", "unlitsmooth" ) local matBoneSmall = Material( "widgets/bone_small.png", "unlitsmooth" ) local widget_bone = { Base = "widget_base", a = 255, GetParentPos = function( self ) local p = self:GetParent() if ( !IsValid( p ) ) then return end loc...
mit
Samake/Minecraft
Minecraft/server/system/MainClassS.lua
1
1588
--[[ Name: Minecraft Filename: MainClassS.lua Authors: Sam@ke --]] local Instance = nil MainClassS = {} function MainClassS:constructor() mainOutput("SERVER // ***** Minecraft was started *****") mainOutput("MainClassS was loaded.") setFPSLimit(60) self:init() end function MainClassS:init() if (not se...
gpl-3.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua
7
1027
-------------------------------- -- @module EaseBackIn -- @extend ActionEase -- @parent_module cc -------------------------------- -- brief Create the action with the inner action.<br> -- param action The pointer of the inner action.<br> -- return A pointer of EaseBackIn action. If creation failed, return nil. -- @fu...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/includes/extensions/table.lua
1
15568
--[[--------------------------------------------------------- Name: Inherit( t, base ) Desc: Copies any missing data from base to t -----------------------------------------------------------]] function table.Inherit( t, base ) for k, v in pairs( base ) do if ( t[k] == nil ) then t[k] = v end end t["Base...
mit
yetsky/luci
modules/base/luasrc/model/uci.lua
86
10653
--[[ LuCI - UCI model Description: Generalized UCI model FileId: $Id$ License: 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...
apache-2.0
dangersuperbot/super_boomrange
plugins/inrealm.lua
3
36470
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_admin1(msg) then local group_creator = msg.from.print_name create_group_chat (group_creator, group_name,...
gpl-2.0
vitaliylag/waifu2x
tools/cudnn2cunn.lua
4
1404
require 'pl' local __FILE__ = (function() return string.gsub(debug.getinfo(2, 'S').source, "^@", "") end)() package.path = path.join(path.dirname(__FILE__), "..", "lib", "?.lua;") .. package.path require 'os' require 'w2nn' local srcnn = require 'srcnn' local function cudnn2cunn(cudnn_model) local cunn_model = srcn...
mit
yetsky/luci
protocols/ipv6/luasrc/model/network/proto_4x6.lua
63
1522
--[[ LuCI - Network model - 6to4, 6in4 & 6rd protocol extensions Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Copyright 2013 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 ...
apache-2.0
LuaDist2/luarocks
src/luarocks/cfg.lua
2
23504
--- Configuration for LuaRocks. -- Tries to load the user's configuration file and -- defines defaults for unset values. See the -- <a href="http://luarocks.org/en/Config_file_format">config -- file format documentation</a> for details. -- -- End-users shouldn't edit this file. They can override any defaults -- set in ...
mit
soumith/nn
SpatialConvolution.lua
2
1525
local SpatialConvolution, parent = torch.class('nn.SpatialConvolution', 'nn.Module') function SpatialConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH) parent.__init(self) dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.nOutputPlane = nOutputPlane self.kW = kW self.kH = ...
bsd-3-clause
Scripterity/Nebula-Hub
Nebula Hub V2 with Comments.lua
1
83304
-- asd -- repeat wait() until workspace.CurrentCamera -- Load previous settings -- local savedColor = game:service'CookiesService':GetCookieValue('nebulaBackgroundColor3')~="" and game:service'CookiesService':GetCookieValue('nebulaBackgroundColor3') or "152, 6, 235" local savedKey = game:service'CookiesServic...
gpl-3.0
derElektrobesen/tntlua
profiles.lua
3
15465
-- -- Store and serve user preferences. -- For every user, stores a list of preferences or attributes, -- as a list of pairs -- attribute_name, attribute_value -- -- It is assumed that each user may have a fairly large number -- of preferences (e.g. 500), but keep most of them set to -- default. Therefore, we only stor...
bsd-2-clause
miraage/gladdy
Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
5
10105
--[[ $Id: AceGUIWidget-DropDown-Items.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]-- local AceGUI = LibStub("AceGUI-3.0") local function fixlevels(parent,...) local i = 1 local child = select(i, ...) while child do child:SetFrameLevel(parent:GetFrameLevel()+1) fixlevels(child, child:GetChildren()) i = i + ...
mit
BradSharp/roblox
Network/Server.lua
1
1899
--[[ API void network:Fire(<string> id, <player> player, <tuple> ...) void network:Fire(<string> id, <players> players, <tuple> ...) void network:Invoke(<string> id, <player> player, <tuple> ..., <function(<player> player, <tuple> ...)> callback) void network:Invoke(<string> id, <players> players, <tuple> ...,...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/entities/gmod_ghost.lua
1
1150
DEFINE_BASECLASS( "base_gmodentity" ) ENT.Type = "anim" ENT.Spawnable = false ENT.AdminSpawnable = false --[[--------------------------------------------------------- -----------------------------------------------------------]] function ENT:Initialize() if (SERVER) then self:PhysicsInitBox( Vector( -4, ...
mit
payamohajeri/telegram-bot
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
yetsky/luci
modules/base/luasrc/sys/zoneinfo/tzoffset.lua
72
3904
--[[ LuCI - Autogenerated Zoneinfo Module 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.sys.zoneinfo.tzoffset" OFFSET = { gmt =...
apache-2.0
redxdev/Wake
dist/lib/camera.lua
1
1363
local Vector3 = Vector3 local Quat = Quat local math = math local class = require('class') local Camera = class() function Camera:construct(pos, orientation, up, projection) self.position = pos or Vector3.new(0, 0, 0) self.orientation = orientation or Vector3.new(0, 0, 0) self.up = up or Vector3.new(0, 1,...
mit
pazos/koreader
frontend/apps/reader/modules/readerrotation.lua
5
1031
local InputContainer = require("ui/widget/container/inputcontainer") local Device = require("device") local Event = require("ui/event") local _ = require("gettext") local ReaderRotation = InputContainer:new{ current_rotation = 0 } function ReaderRotation:init() if Device:hasKeyboard() then self.key_ev...
agpl-3.0
githabbot/server22
plugins/google.lua
3
1110
local function googlethat(query) local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&" local parameters = "q=".. (URL.escape(query) or "") -- Do the request local res, code = https.request(api..parameters) if code ~=200 then return nil end local data = json:decode(res) local r...
gpl-2.0
anonymous12212020/sbss
plugins/id.lua
50
4275
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, result) local re...
gpl-2.0
yetsky/luci
contrib/luadoc/lua/luadoc/util.lua
93
5826
------------------------------------------------------------------------------- -- General utilities. -- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local posix = require "nixio.fs" local type, table, string, io, as...
apache-2.0
telebombang2018/energy
bot/bot.lua
1
12018
-- #@ENERGY_TEAM -----my_name_is_ehsan*#@mafia_boy -----@ENERGY_TEAM FOR UPDATE -----لطفا پیام بالا رو پاک نکنید tdcli = dofile('./tg/tdcli.lua') serpent = (loadfile "./libs/serpent.lua")() feedparser = (loadfile "./libs/feedparser.lua")() require('./bot/utils') require('./libs/lua-redis') URL = require "socket.ur...
gpl-3.0
boundary/boundary-plugin-riak
init.lua
2
3837
-- Copyright 2015 Boundary, Inc. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to i...
apache-2.0
ZerothAngel/FtDScripts
main/yawtest.lua
1
1901
--! yawtest --@ commons control firstrun eventdriver sixdof ytdefaults MyHeading = -90 LastTurn = nil ThrottleIndex = 0 YawTest = EventDriver.new() function YawTest_FirstRun(_) YawTest:Schedule(0, YawTest_Throttle) end AddFirstRun(YawTest_FirstRun) function YawTest_Throttle(I) if VaryThrottle then Throt...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/base/entities/weapons/weapon_base/sh_anim.lua
2
2973
local ActIndex = { [ "pistol" ] = ACT_HL2MP_IDLE_PISTOL, [ "smg" ] = ACT_HL2MP_IDLE_SMG1, [ "grenade" ] = ACT_HL2MP_IDLE_GRENADE, [ "ar2" ] = ACT_HL2MP_IDLE_AR2, [ "shotgun" ] = ACT_HL2MP_IDLE_SHOTGUN, [ "rpg" ] = ACT_HL2MP_IDLE_RPG, [ "physgun" ] = ACT_HL2MP_IDLE_PHYSGUN, [ "crossbow" ] = AC...
mit
yanarsin/arina
plugins/invite.lua
47
1193
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then -- I...
gpl-2.0
notestudio/shall-I-kill-her
assets/scripts/arrows.lua
1
2082
local arrows = {} local padding = 10 function arrows.load(game, stage, camera) arrows.img_left = love.graphics.newImage('assets/sprites/arrows/left.png') arrows.left_x = padding arrows.left_y = (game.canvas.height / 2) - (arrows.img_left:getHeight() /2) arrows.img_right = love.graphics.newImage('assets/sprites/...
apache-2.0
xiaowa183/Atlas
lib/ro-balance.lua
40
6646
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
sdgdsffdsfff/nginx-openresty-windows
lua-resty-upload-0.09/lib/resty/upload.lua
10
5155
-- Copyright (C) Yichun Zhang (agentzh) local sub = string.sub local req_socket = ngx.req.socket local null = ngx.null local match = string.match local setmetatable = setmetatable local error = error local get_headers = ngx.req.get_headers local type = type -- local print = print local _M = { _VERSION = '0.08' } ...
bsd-2-clause
pazos/koreader
frontend/ui/widget/doublespinwidget.lua
1
10097
local Blitbuffer = require("ffi/blitbuffer") local ButtonTable = require("ui/widget/buttontable") local CenterContainer = require("ui/widget/container/centercontainer") local CloseButton = require("ui/widget/closebutton") local Device = require("device") local FrameContainer = require("ui/widget/container/framecontaine...
agpl-3.0
openLuat/Luat
lib/patch.lua
1
2374
--- AM2320 系统补丁 -- @license MIT -- @copyright openLuat.com -- @release 2017.10.19 --[[ 模块名称:Lua自带接口补丁 模块功能:补丁某些Lua自带的接口,规避调用异常时死机 模块最后修改时间:2017.02.14 ]] --保存Lua自带的os.time接口 local oldostime = os.time --[[ 函数名:safeostime 功能 :封装自定义的os.time接口 参数 : t:日期表,如果没有传入,使用系统当前时间 返回值:t时间距离1970年1月1日0时0分0秒所经过的秒数 ]] function safeost...
mit
sdgdsffdsfff/nginx-openresty-windows
lua-cjson-2.1.0.2/tests/bench.lua
145
3247
#!/usr/bin/env lua -- This benchmark script measures wall clock time and should be -- run on an unloaded system. -- -- Your Mileage May Vary. -- -- Mark Pulford <mark@kyne.com.au> local json_module = os.getenv("JSON_MODULE") or "cjson" require "socket" local json = require(json_module) local util = require "cjson.ut...
bsd-2-clause
JRTXGaming/GuildDing_RIFT
libs/LibVersionCheck/ApiBrowser.lua
1
1912
if(not ApiBrowser) then return -- Don't process the remaining file if ApiBrowser is not installed end local symbols = { } symbols["LibVersionCheck.register"] = { summary = [[ Registers an addon and its current version with the library. This should be called from Addon initialization code, typically in a han...
gpl-2.0
falsechicken/chickens_riddim_plugins
plugins/command_random.lua
1
2653
--[[ Command_Random Allows users to generate random things. Like numbers, picking a random user in muc room, etc. Licensed Under the GPLv2 --]] local tableUtils = require("riddim/ai_utils/tableutils"); local textUtils = require("riddim/ai_utils/textutils"); local jid_tool = require("riddim/ai_utils/jid_tool"); local p...
gpl-2.0
vitaliylag/waifu2x
lib/cleanup_model.lua
2
1327
-- ref: https://github.com/torch/nn/issues/112#issuecomment-64427049 local function zeroDataSize(data) if type(data) == 'table' then for i = 1, #data do data[i] = zeroDataSize(data[i]) end elseif type(data) == 'userdata' then data = torch.Tensor():typeAs(data) end return data end -- Res...
mit
pazos/koreader
spec/unit/luasettings_spec.lua
7
2854
describe("luasettings module", function() local Settings setup(function() require("commonrequire") Settings = require("frontend/luasettings"):open("this-is-not-a-valid-file") end) it("should handle undefined keys", function() Settings:delSetting("abc") assert.True(Setti...
agpl-3.0
philsiff/Red-Vs-Blue
Very Basic TDM [Gamemode]/gamemodes/vbtdm/gamemode/scoreboard/scoreboard.lua
1
9236
include( "player_row.lua" ) include( "player_frame.lua" ) surface.CreateFont( "suiscoreboardheader" , {font="coolvetica", size=28, weight=100, antialiasing=true}) surface.CreateFont( "suiscoreboardsubtitle", {font="coolvetica", size=20, weight=100, antialiasing=true}) surface.CreateFont( "suiscoreboardlogotext", {fon...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/gamemode/init.lua
2
5193
--[[--------------------------------------------------------- Sandbox Gamemode This is GMod's default gamemode -----------------------------------------------------------]] -- These files get sent to the client AddCSLuaFile( "cl_hints.lua" ) AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "cl_notice.lua" ) AddCSLu...
mit
bradchesney79/2015BeastRouterProject
openwrt/unsquash/squashfs-root/usr/lib/lua/luci/dispatcher.lua
31
19783
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local sys = require "luci.sys" local util = require "luci.util" local http = require "luci.http" local nixio = require "nixio", require "nixio.util" module("luci.dispatcher", packa...
cc0-1.0
pazos/koreader
spec/unit/readerrolling_spec.lua
4
8880
describe("Readerrolling module", function() local DocumentRegistry, ReaderUI, Event, Screen local readerui, rolling setup(function() require("commonrequire") DocumentRegistry = require("document/documentregistry") ReaderUI = require("apps/reader/readerui") Event = require("u...
agpl-3.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/dcombobox.lua
2
4730
--[[ _ ( ) _| | __ _ __ ___ ___ _ _ /'_` | /'__`\( '__)/' _ ` _ `\ /'_` ) ( (_| |( ___/| | | ( ) ( ) |( (_| | `\__,_)`\____)(_) (_) (_) (_)`\__,_) DComboBox --]] PANEL = {} Derma_Hook( PANEL, "Paint", "Paint", "ComboBox" ) D...
mit
breakds/corpus-accu
cnn-sentence/testing.lua
1
1834
require 'torch' require 'nn' require 'os' ---------- Command Line Options ---------- local cmd = torch.CmdLine() cmd:option('-dictionary', '/home/breakds/tmp/bilibili/input/word_vecs.bin', 'path to the word2vec binary dictionary.') cmd:option('-model', '', 'Specifies the folder where trained model resides....
mit
drmingdrmer/lua-paxos
lib/acid/impl/http.lua
2
9603
local strutil = require( "acid.strutil" ) local tableutil = require( "acid.tableutil" ) --example, how to use -- local h = s2http:new( ip, port, timeout ) -- h:request( uri, {method='GET', headers={}, body=''} ) -- status = h.status -- headers = h.headers -- buf = h:read_body( size ) --or -- local h = s2ht...
mit
breezechen/sumatrapdf
luatest/t00.lua
7
1101
require'setupluafiles' local winapi = require'winapi' require'mywin' require'winapi.messageloop' local c = winapi.MyWindow{title = 'Main', help_button = false, maximize_button = true, minimize_button = true, autoquit = true, w = 500, h = 300, visible = false} c:show() function c:WM_GETDLGCODE() return D...
gpl-3.0
pazos/koreader
frontend/apps/cloudstorage/webdav.lua
3
5507
local BD = require("ui/bidi") local ConfirmBox = require("ui/widget/confirmbox") local DocumentRegistry = require("document/documentregistry") local InfoMessage = require("ui/widget/infomessage") local MultiInputDialog = require("ui/widget/multiinputdialog") local UIManager = require("ui/uimanager") local ReaderUI = re...
agpl-3.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/base/entities/entities/base_point.lua
3
1127
ENT.Base = "base_entity" ENT.Type = "point" --[[--------------------------------------------------------- Name: Initialize Desc: First function called. Use to set up your entity -----------------------------------------------------------]] function ENT:Initialize() end --[[-------------------------------------...
mit
sdgdsffdsfff/nginx-openresty-windows
lua-cjson-2.1.0.2/lua/cjson/util.lua
170
6837
local json = require "cjson" -- Various common routines used by the Lua CJSON package -- -- Mark Pulford <mark@kyne.com.au> -- Determine with a Lua table can be treated as an array. -- Explicitly returns "not an array" for very sparse arrays. -- Returns: -- -1 Not an array -- 0 Empty table -- >0 Highest index ...
bsd-2-clause
pazos/koreader
frontend/ui/widget/keyvaluepage.lua
1
22739
--[[-- Widget that presents a multi-page to show key value pairs. Example: local Foo = KeyValuePage:new{ title = "Statistics", kv_pairs = { {"Current period", "00:00:00"}, -- single or more "-" will generate a solid line "----------------------------", ...
agpl-3.0
rstudio/redx
lua/src/lib/plugins/stickiness.lua
1
2053
local url = require('socket.url') local base64 = require('base64') local M = { } M.get_cookie = function(request, settings) local cookie = request.cookies[settings.COOKIE] if cookie ~= nil then return base64.decode(cookie) else return nil end end M.set_cookie = function(request, server, frontend, settin...
bsd-2-clause
InfiniteRain/CS2D-AmplifiedScripting
classes/dynObject.lua
1
11676
-- Initializing dynamic object class. cas.dynObject = cas.class() -------------------- -- Static methods -- -------------------- -- Checks if the dynamic object under the passed ID exists. function cas.dynObject.idExists(objectID) if type(objectID) ~= "number" then error("Passed \"objectID\" parameter is not valid...
mit
leMaik/RpgPlus
docs/lua-api/inventorywrapper.lua
1
1794
--- An inventory. -- @classmod Inventory --- Sets the items in this inventory. -- @param items table of items in the inventory, with slots as keys -- @param[opt=true] clear whether the inventory should be cleared before adding the items -- function setItems(items, clear) end --- Sets the item in the given slot of thi...
mit
lopezloo/mta-csrw
csrw/client/render/radar.lua
1
4085
local radar = { showing = false, -- background and border colors background = {51, 162, 37, 160}, disc = {0, 0, 0, 240}, -- position and size x = sY * 0.028, y = sY * 0.75, height = sY * 0.200, range = 100, blips = {} } radar.centerleft = radar.x + radar.height / 2 radar.centerTop = radar.y + radar.height...
gpl-3.0
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/base/entities/entities/base_nextbot/sv_nextbot.lua
3
7703
-- -- Name: NEXTBOT:BehaveStart -- Desc: Called to initialize the behaviour.\n\n You shouldn't override this - it's used to kick off the coroutine that runs the bot's behaviour. \n\nThis is called automatically when the NPC is created, there should be no need to call it manually. -- Arg1: -- Ret1: -- function ENT:Beha...
mit