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
amirmrbad/flashbot
plugins/plugins.lua
285
6096
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( ...
gpl-2.0
pazos/koreader
frontend/apps/filemanager/filemanagershortcuts.lua
2
8733
local BD = require("ui/bidi") local ButtonDialog = require("ui/widget/buttondialog") local InfoMessage = require("ui/widget/infomessage") local InputContainer = require("ui/widget/container/inputcontainer") local InputDialog = require("ui/widget/inputdialog") local Menu = require("ui/widget/menu") local Screen = requir...
agpl-3.0
enginix/luasocket
samples/tinyirc.lua
44
2711
----------------------------------------------------------------------------- -- Select sample: simple text line server -- LuaSocket sample files. -- Author: Diego Nehab ----------------------------------------------------------------------------- local socket = require("socket") host = host or "*" port1 = port1 or 808...
mit
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua
18
5278
-------------------------------- -- @module TMXTiledMap -- @extend Node -- @parent_module ccexp -------------------------------- -- Set object groups. <br> -- param groups An object groups. -- @function [parent=#TMXTiledMap] setObjectGroups -- @param self -- @param #array_table groups -- @return experimental::TMXTi...
mit
ld-test/dromozoa-prl
select_image.lua
1
1612
-- Copyright (C) 2015 Tomoyuki Fujimori <moyu@dromozoa.com> -- -- This file is part of dromozoa-prl. -- -- dromozoa-prl 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
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/paint.lua
1
4035
TOOL.Category = "Render" TOOL.Name = "#tool.paint.name" TOOL.Command = nil TOOL.ConfigName = "" game.AddDecal( "Eye", "decals/eye" ); game.AddDecal( "Smile", "decals/smile" ); game.AddDecal( "Light", "decals/light" ); game.AddDecal( "Dark", "decals/dark" ); game.AddDecal( "Noughtsncrosses", "dec...
mit
sdgdsffdsfff/nginx-openresty-windows
lua-resty-core-0.1.1/lib/resty/core/exit.lua
9
1125
-- Copyright (C) Yichun Zhang (agentzh) local ffi = require 'ffi' local ffi_string = ffi.string local C = ffi.C local ngx = ngx local tostring = tostring local error = error local base = require "resty.core.base" local get_string_buf = base.get_string_buf local get_size_ptr = base.get_size_ptr local base = require "r...
bsd-2-clause
bradchesney79/2015BeastRouterProject
openwrt/unsquash/squashfs-root/usr/lib/lua/luci/http/protocol/conditionals.lua
68
3024
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. -- This class provides basic ETag handling and implements most of the -- conditional HTTP/1.1 headers specified in RFC2616 Sct. 14.24 - 14.28 . module("luci.http.protocol.conditionals", packag...
cc0-1.0
pazos/koreader
frontend/readhistory.lua
2
9754
local DataStorage = require("datastorage") local DocSettings = require("docsettings") local dump = require("dump") local ffiutil = require("ffi/util") local util = require("util") local joinPath = ffiutil.joinPath local lfs = require("libs/libkoreader-lfs") local realpath = ffiutil.realpath local history_file = joinPa...
agpl-3.0
notestudio/shall-I-kill-her
assets/scripts/vendor/HC/class.lua
26
3446
--[[ Copyright (c) 2010-2011 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
apache-2.0
payamohajeri/telegram-bot
plugins/twitter.lua
632
2555
local OAuth = require "OAuth" -- EDIT data/twitter.lua with the API keys local twitter_config = load_from_file('data/twitter.lua', { -- DON'T EDIT HERE. consumer_key = "", consumer_secret = "", access_token = "", access_token_secret = "" }) local client = OAuth.new(twitter_config.consumer_key, twitter_c...
gpl-2.0
pazos/koreader
plugins/terminal.koplugin/main.lua
2
17173
local ButtonDialog = require("ui/widget/buttondialog") local CenterContainer = require("ui/widget/container/centercontainer") local DataStorage = require("datastorage") local Dispatcher = require("dispatcher") local Font = require("ui/font") local InfoMessage = require("ui/widget/infomessage") local InputDialog = requi...
agpl-3.0
pecio/RBP-Broker
Common/AceConfig-3.0/AceConfig-3.0.lua
3
2246
--- AceConfig-3.0 wrapper library. -- Provides an API to register an options table with the config registry, -- as well as associate it with a slash command. -- @class file -- @name AceConfig-3.0 -- @release $Id: AceConfig-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $ --[[ AceConfig-3.0 Very light wrapper ...
gpl-3.0
lopezloo/mta-csrw
csrw/shared/utils/definitions.lua
1
3690
-- Explosions EXPLOSION_GRENADE = 0 EXPLOSION_MOLOTOV = 1 EXPLOSION_ROCKET = 2 EXPLOSION_ROCKET_WEAK = 3 EXPLOSION_CAR = 4 EXPLOSION_CAR_QUICK = 5 EXPLOSION_BOAT = 6 EXPLOSION_HELI = 7 EXPLOSION_MINE = 8 EXPLOSION_OBJECT = 9 EXPLOSION_TANK_GRENADE = 10 EXPLOSION_SMALL = 11 EXPLOSION_TINY = 12 -- Weapon slots WEAPON_SL...
gpl-3.0
philsiff/Red-Vs-Blue
Very Basic TDM [Gamemode]/gamemodes/vbtdm/gamemode/menus/cl_new_menu.lua
1
27026
// Client Side Mr. Apple :p function set_team3() chat.AddText( Color( 255, 255, 255 ), "[", Color( 255, 0, 0 ), "TDM", Color( 255, 255, 255 ), "] ", Color( 255, 255, 255 ), "Welcome to our server! Type !teams or press F2 to get started!" ) surface.PlaySound( "vbtdm/info.mp3" ) end function set_team2(ply) local GAMEMO...
mit
eggBOY91/Arctic-Core
src/scripts/lua/LuaBridge/Stable Scripts/Outland/Magisters Terrace/UNIT-MagistersTerrace-SunbladeWarlock.lua
30
1589
--[[ ******************************** * * * The Moon Project * * * ******************************** This software is provided as free and open source by the staff of The Moon Project, in accordance with the GPL license. This means we provide the so...
agpl-3.0
pazos/koreader
frontend/dispatcher.lua
1
32439
--[[-- This module is responsible for dispatching events. To add a new action an entry must be added to `settingsList` & `dispatcher_menu_order` This can also be done at runtime via @{registerAction}(). `settingsList` contains the list of dispatchable settings. Each setting contains: * category: one of: * none:...
agpl-3.0
MelCoderDojo/love
libraries/bump.lua/bump.lua
2
20591
local bump = { _VERSION = 'bump v3.1.0', _URL = 'https://github.com/kikito/bump.lua', _DESCRIPTION = 'A collision detection library for Lua', _LICENSE = [[ MIT LICENSE Copyright (c) 2014 Enrique García Cota Permission is hereby granted, free of charge, to any person obtaining a ...
mit
yetsky/luci
applications/luci-asterisk/luasrc/model/cbi/asterisk/meetme.lua
80
1246
--[[ LuCI - Lua Configuration Interface Copyright 2009 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
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/dcolorpalette.lua
2
5655
--[[ _ ( ) _| | __ _ __ ___ ___ _ _ /'_` | /'__`\( '__)/' _ ` _ `\ /'_` ) ( (_| |( ___/| | | ( ) ( ) |( (_| | `\__,_)`\____)(_) (_) (_) (_)`\__,_) DColorPalette --]] local color_Error = Color( 255, 0, 255 ) local PANEL = {} AccessorFunc( PANEL, "m_ConVarR", "ConVarR" ) AccessorFunc( PANEL, "m...
mit
persianstar/AdvanSource
plugins/security.lua
3
11708
--Begin security.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
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua
19
1088
-------------------------------- -- @module AnchorPointFrame -- @extend Frame -- @parent_module ccs -------------------------------- -- -- @function [parent=#AnchorPointFrame] setAnchorPoint -- @param self -- @param #vec2_table point -- @return AnchorPointFrame#AnchorPointFrame self (return value: ccs.AnchorPointFr...
mit
ZipFile/vlc
share/lua/sd/librivox.lua
108
3015
--[[ $Id$ Copyright © 2010 VideoLAN and AUTHORS Authors: Rémi Duraffort <ivoire at videolan dot org> 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 ...
gpl-2.0
mjarco/sysdig
userspace/sysdig/chisels/v_procs_fd_usage.lua
8
2790
--[[ Copyright (C) 2013-2015 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
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua
7
1171
-------------------------------- -- @module EaseCircleActionIn -- @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 EaseCircleActionIn action. If creation failed, re...
mit
lightcrest/nginx
debian/modules/nginx-http-push/tests/memparse.lua
11
6855
#!/usr/bin/luajit local lines_tailed=100000 local filename="errors.log" local follow=false local write=io.write local shm, size_by_label, count_by_label, weird_log function init() print "initialize" shm, size_by_label, count_by_label, weird_log={}, {}, {}, {} memmap={} end function err(str, ...) str = str or...
bsd-2-clause
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/dcolorcombo.lua
2
1539
--[[ _ ( ) _| | __ _ __ ___ ___ _ _ /'_` | /'__`\( '__)/' _ ` _ `\ /'_` ) ( (_| |( ___/| | | ( ) ( ) |( (_| | `\__,_)`\____)(_) (_) (_) (_)`\__,_) DColorMixer --]] local PANEL = {} AccessorFunc( PANEL, "m_Color", "Color" ) function PANEL:Init() self:SetSize( 256, 256 ) self:BuildControls(...
mit
joaofvieira/luci
protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_hnet.lua
68
1416
-- Copyright 2013 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local mode = section:taboption("general", ListValue, "mode", translate("Category")) mode:value("auto", translate("Automatic")) mode:value("external", translate("External")) mode:va...
apache-2.0
eggBOY91/Arctic-Core
src/scripts/lua/Lua/Stable Scripts/Outland/Auchenai Crypts/BOSS_AuchenaiCrypts_Maladaar.lua
30
1080
function Maladaar_HealthCheck(Unit) if Unit:GetHealthPct() < 25 and Didthat == 0 then Unit:SpawnCreature(18478, 57.4, -390.8, 26.6, 0, 18, 36000000); Didthat = 1 else end end function Maladaar_SoulSteal(Unit, event, miscunit, misc) print "Maladaar SoulSteal" Unit:FullCastSpellOnTarget(36778,Unit:GetRandomPlay...
agpl-3.0
eggBOY91/Arctic-Core
src/scripts/lua/Lua/Stable Scripts/Outland/Shattered Halls/BOSS_ShatteredHalls_Omrogg.lua
30
1049
function Omrogg_Fear(Unit, event, miscunit, misc) print "Omrogg Fear" Unit:FullCastSpellOnTarget(33547,Unit:GetClosestPlayer()) Unit:SendChatMessage(11, 0, "You are afraid...") end function Omrogg_Thunderclap(Unit, event, miscunit, misc) print "Omrogg Thunderclap" Unit:FullCastSpellOnTarget(30633,Unit:GetClosestP...
agpl-3.0
pazos/koreader
plugins/gestures.koplugin/defaults.lua
3
7325
-- we can read Lua syntax here! local Device = require("device") return { gesture_fm = { tap_top_left_corner = nil, tap_top_right_corner = nil, tap_right_bottom_corner = nil, tap_left_bottom_corner = Device:hasFrontlight() and {toggle_frontlight = true,} or nil, hold_top_lef...
agpl-3.0
pazos/koreader
frontend/ui/data/settings_migration.lua
3
2414
--[[ Centralizes migration concerns for LuaSettings & DocSettings --]] local DocSettings = require("docsettings") local LuaSettings = require("luasettings") local logger = require("logger") local SettingsMigration = {} -- Shockingly, handles settings migration -- NOTE: supports LuaSettings & DocSettings objects as i...
agpl-3.0
ZipFile/vlc
share/lua/intf/modules/host.lua
41
12409
--[==========================================================================[ host.lua: VLC Lua interface command line host module --[==========================================================================[ Copyright (C) 2007-2012 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> ...
gpl-2.0
cjbrigato/mysql-proxy-cache
mysql-proxy-cache.lua
3
3104
require('luarocks.require') require('md5') require('Memcached') local memcache = Memcached.Connect() cache_hits = 0 cache_misses = 0 cache_timeout = 30 function is_query(packet) return packet:byte() == proxy.COM_QUERY end function is_cacheable(query) return query:sub(1,6):lower() == 'select' end function to_h...
bsd-3-clause
ZipFile/vlc
share/lua/playlist/joox.lua
113
1637
--[[ $Id$ Copyright © 2007 the VideoLAN team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distribut...
gpl-2.0
kurybr/kury.settings
awesome-config/lain/widget/imap.lua
4
3131
--[[ Licensed under GNU General Public License v2 * (c) 2013, Luca CPZ --]] local helpers = require("lain.helpers") local naughty = require("naughty") local wibox = require("wibox") local awful = require("awful") local string = string local type = type local tonumber = tonumber -- Mail IMAP...
mit
Maliv/Looper
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
blind-coder/PZ-UI-Overhaul
pzuioverhaul/media/lua/client/uio/Button.lua
1
1894
require 'uio/BaseElement' UIO.Button = {}; function UIO.Button.new(x, y, w, h) local self = UIO.BaseElement.new(x, y, w, h); local tw = 0; local th = 0; local text = "Foo"; local onClick = nil; local arguments = nil; local textColor = {r=1, g=1, b=1, a=1}; local mouseDownBackgroundColor = {r=0.15, g=0.15, b=0...
mit
hfjgjfg/seed353
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
joaofvieira/luci
build/luadoc/luadoc/taglet/standard.lua
78
16474
------------------------------------------------------------------------------- -- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $ ------------------------------------------------------------------------------- local assert, pairs, tostring, type = assert, pairs, tostring, type local io = require "io...
apache-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/CSLoader.lua
10
2704
-------------------------------- -- @module CSLoader -- @parent_module cc -------------------------------- -- -- @function [parent=#CSLoader] createNodeFromJson -- @param self -- @param #string filename -- @return Node#Node ret (return value: cc.Node) -------------------------------- -- -- @function [pare...
mit
miraage/gladdy
Modules/Powerbar.lua
1
8384
local pairs = pairs local floor = math.floor local CreateFrame = CreateFrame local Gladdy = LibStub("Gladdy") local L = Gladdy.L local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists local Powerbar = Gladdy:NewModule("Powerbar", 90, { powerBarHeight = 16, powerBarTexture = "Minimalist", powerBarFontColor = {r...
mit
LuaDist2/luarocks
src/luarocks/fetch/git.lua
9
3570
--- Fetch back-end for retrieving sources from GIT. local git = {} local unpack = unpack or table.unpack local fs = require("luarocks.fs") local dir = require("luarocks.dir") local util = require("luarocks.util") --- Git >= 1.7.10 can clone a branch **or tag**, < 1.7.10 by branch only. We -- need to know this in or...
mit
mahdikord/mahdiho
plugins/anti_spam.lua
435
3886
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
theonlywild/copy
plugins/anti_spam.lua
435
3886
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
LuaDist2/luarocks
src/luarocks/loader.lua
8
9690
--- A module which installs a Lua package loader that is LuaRocks-aware. -- This loader uses dependency information from the LuaRocks tree to load -- correct versions of modules. It does this by constructing a "context" -- table in the environment, which records which versions of packages were -- used to load previous...
mit
soumith/nn
VolumetricConvolution.lua
2
1590
local VolumetricConvolution, parent = torch.class('nn.VolumetricConvolution', 'nn.Module') function VolumetricConvolution:__init(nInputPlane, nOutputPlane, kT, kW, kH, dT, dW, dH) parent.__init(self) dT = dT or 1 dW = dW or 1 dH = dH or 1 self.nInputPlane = nInputPlane self.nOutputPlane = nOutputPl...
bsd-3-clause
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/base/entities/effects/dof_node/init.lua
3
1681
EFFECT.Mat = Material( "pp/dof" ) --[[--------------------------------------------------------- Initializes the effect. The data is a table of data which was passed from the server. -----------------------------------------------------------]] function EFFECT:Init( data ) table.insert( DOF_Ents, self.Entit...
mit
joaofvieira/luci
applications/luci-app-splash/luasrc/controller/splash/splash.lua
40
4649
module("luci.controller.splash.splash", package.seeall) local uci = luci.model.uci.cursor() local util = require "luci.util" function index() entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90) entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), _("Splas...
apache-2.0
rmtew/demirogue
src/themes.lua
3
15262
-- -- themes.lua -- require 'roomgen' require 'terrains' require 'fringes' themes = { db = {}, sortedDB = {}, } local _emptyRuleset = [[ return { { leftGraph = { vertices = {}, edges = {}, }, rightGraph = { vertices = {}, edges = {}, }, map = {}, },...
bsd-3-clause
cjtallman/luasocket
src/smtp.lua
123
8074
----------------------------------------------------------------------------- -- SMTP client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- -------------------------------------------------------------------------...
mit
LuaDist2/luarocks
src/luarocks/new_version.lua
3
6284
--- Module implementing the LuaRocks "new_version" command. -- Utility function that writes a new rockspec, updating data from a previous one. local new_version = {} local util = require("luarocks.util") local download = require("luarocks.download") local fetch = require("luarocks.fetch") local persist = require("lua...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/includes/modules/ai_schedule.lua
2
2773
-- Serverside only. if ( CLIENT ) then return end local setmetatable = setmetatable local tostring = tostring local table = table local ai_task = ai_task module( "ai_schedule" ) -- Define the Schedule object local Schedule = {} Schedule.__index = Schedule --[[------------------------------------------------...
mit
izarov/nginx
debian/modules/nginx-lua/t/lib/Redis.lua
49
35692
--[[ Copyright (c) 2009-2011 Daniele Alessandri Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
bsd-2-clause
IntelligentBot/IntelligentBot
plugins/Abjad.lua
2
4040
local numbers = {} numbers['ا'] = 1 numbers['ب'] = 2 numbers['ج'] = 3 numbers['د'] = 4 numbers['ه'] = 5 numbers['و'] = 6 numbers['ز'] = 7 numbers['ح'] = 8 numbers['ط'] = 9 numbers['ی'] = 10 numbers['ک'] = 20 numbers['ل'] = 30 numbers['م'] = 40 numbers['ن'] = 50 numbers['س'] = 60 numbers['ع'] = 70 numbers['ف'] = 80 numb...
gpl-2.0
snowsnail/codis
extern/redis-2.8.21/deps/lua/test/life.lua
888
2635
-- life.lua -- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l -- modified to use ANSI terminal escape sequences -- modified to use for instead of while local write=io.write ALIVE="¥" DEAD="þ" ALIVE="O" DEAD="-" function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary for i=1,10000 do...
mit
helifu/redis-migration
deps/lua/test/life.lua
888
2635
-- life.lua -- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l -- modified to use ANSI terminal escape sequences -- modified to use for instead of while local write=io.write ALIVE="¥" DEAD="þ" ALIVE="O" DEAD="-" function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary for i=1,10000 do...
bsd-3-clause
bottelebot/Umbrella
plugins/groupmanager.lua
166
11272
-- 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 not is_admin(msg) then return "You're not admin!" end local group_creator = msg.from.print_name create_group_chat (group_cr...
gpl-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua
18
1671
-------------------------------- -- @module PhysicsJointRotaryLimit -- @extend PhysicsJoint -- @parent_module cc -------------------------------- -- Get the max rotation limit. -- @function [parent=#PhysicsJointRotaryLimit] getMax -- @param self -- @return float#float ret (return value: float) ------------...
mit
joaofvieira/luci
libs/luci-lib-nixio/root/usr/lib/lua/nixio/fs.lua
184
3723
--[[ nixio - Linux I/O library for lua Copyright 2009 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$ ]]-- local...
apache-2.0
bradchesney79/2015BeastRouterProject
openwrt/unsquash/squashfs-root/usr/lib/lua/nixio/fs.lua
184
3723
--[[ nixio - Linux I/O library for lua Copyright 2009 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$ ]]-- local...
cc0-1.0
mjarco/sysdig
userspace/sysdig/chisels/v_cpus.lua
8
1571
--[[ 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
persianstar/AdvanSource
plugins/all.lua
32
4484
do 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_name(user)..' ['..user_id..']' return u...
gpl-2.0
theonlywild/copy
bot/seedbot.lua
1
10386
package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua' ..';.luarocks/share/lua/5.2/?/init.lua' package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so' require("./bot/utils") VERSION = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
gpl-2.0
duzc2/luajava
test/hibernateConfig.lua
8
2250
return { name="class", attributes={{name="name", value="Recipient"}, {name="table", value="RECIPIENTS"}}, body= { { name="cache", attributes={{name="usage", value="read-write"}}, body={} }, { ...
mit
project-icarus/editor
main.lua
1
12470
require("imgui") local lunajson = require("lunajson") local filename = "" local mode = "idle" local waypoints = { } local selected = 0 local next_waypoint = 1 local runways = { } local next_runway = 1 local selected_runway = 0 local selected_runway_point = 0 local runway_drag_offset local font local dimensions = { 50...
mit
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Liquid.lua
7
2243
-------------------------------- -- @module Liquid -- @extend Grid3DAction -- @parent_module cc -------------------------------- -- brief Get the amplitude rate of the effect.<br> -- return Return the amplitude rate of the effect. -- @function [parent=#Liquid] getAmplitudeRate -- @param self -- @return float#float r...
mit
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ActionObject.lua
19
4542
-------------------------------- -- @module ActionObject -- @extend Ref -- @parent_module ccs -------------------------------- -- Sets the current time of frame.<br> -- param fTime the current time of frame -- @function [parent=#ActionObject] setCurrentTime -- @param self -- @param #float fTime -- @return ActionOb...
mit
LuaDist2/lua-path
test/each_perf.lua
5
3132
local TIMER = require "lzmq.timer".monotonic() local COUNT = 0 local function counter_reset() COUNT = 0 end local function counter() COUNT = COUNT + 1 end local function etime(name, fn) counter_reset() TIMER:reset() TIMER:start() fn() local elapsed = TIMER:stop() io.write(name, ' - elapsed: ', elapsed, '(m...
mit
wgapl/torch7
random.lua
72
1364
local wrap = require 'cwrap' require 'torchcwrap' local interface = wrap.CInterface.new() interface:print( [[ #include "luaT.h" #include "TH.h" extern void torch_Generator_init(lua_State *L); extern void torch_Generator_new(lua_State *L); ]]) for _,name in ipairs({"seed", "initialSeed"}) do interface:wrap...
bsd-3-clause
peterbarker/ardupilot-1
Tools/CHDK-Scripts/Cannon S100/3DR_EAI_S100.lua
96
29695
--[[ KAP UAV Exposure Control Script v3.2 -- Released under GPL by waterwingz and wayback/peabody http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script 3DR EAI 1.0 is a fork of KAP 3.1 with settings specific to Canon cameras triggered off the Pixhawk autopilot. Changelog: -Modified Tv, Av, and...
gpl-3.0
nimaghorbani/ghbotfool
plugins/banhammer.lua
7
12350
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
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/balloon.lua
1
5895
TOOL.Category = "Construction" TOOL.Name = "#tool.balloon.name" TOOL.ClientConVar[ "ropelength" ] = "64" TOOL.ClientConVar[ "force" ] = "500" TOOL.ClientConVar[ "r" ] = "255" TOOL.ClientConVar[ "g" ] = "255" TOOL.ClientConVar[ "b" ] = "0" TOOL.ClientConVar[ "model" ] = "models/MaxOfS2D/balloon_classic.mdl"...
mit
githabbot/server22
plugins/owners.lua
1467
12478
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
lzpfmh/oceanbase
oceanbase_0.4/tests/liboblog/liboblog.partition.lua
12
1318
--database partition function ipm_inventory_db_partition(...) split = arg[1]; --split = string.sub(split, -4, -1); partition = split % 16; return partition; end function ipm_inventory_detail_db_partition(...) split = arg[1]; --split = string.sub(split, -4, -1); partition = split % 16; return partition;...
gpl-2.0
musselwhizzle/Focus-Points
focuspoints.lrdevplugin/PentaxDelegates.lua
5
7426
--[[ 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
mjarco/sysdig
userspace/sysdig/chisels/spy_logs.lua
12
6681
--[[ Copyright (C) 2014 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even t...
gpl-2.0
siktirmirza/seq
plugins/anti_spam.lua
417
3978
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
disslove2-bot/Mr.Mj-BOT
plugins/translate.lua
674
1637
--[[ -- Translate text using Google Translate. -- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello --]] do function translate(source_lang, target_lang, text) local path = "http://translate.google.com/translate_a/single" -- URL query parameters local p...
gpl-2.0
Aminkavari/-xXD4RKXx-
plugins/translate.lua
674
1637
--[[ -- Translate text using Google Translate. -- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello --]] do function translate(source_lang, target_lang, text) local path = "http://translate.google.com/translate_a/single" -- URL query parameters local p...
gpl-2.0
LuaDist2/luarocks
src/luarocks/fetch/git_ssh.lua
15
1382
--- Fetch back-end for retrieving sources from Git repositories -- that use ssh:// transport. For example, for fetching a repository -- that requires the following command line: -- `git clone ssh://git@example.com/path/foo.git -- you can use this in the rockspec: -- source = { url = "git+ssh://git@example.com/path/foo....
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/entities/gmod_button.lua
1
2695
AddCSLuaFile() DEFINE_BASECLASS( "base_gmodentity" ) ENT.PrintName = "" ENT.Author = "" ENT.Contact = "" ENT.Purpose = "" ENT.Instructions = "" function ENT:SetupDataTables() self:NetworkVar( "Int", 0, "Key" ); self:NetworkVar( "Bool", 0, "On" ); self:NetworkVar( "Bool", 1, "IsToggle" ); self:SetOn( fa...
mit
HamidRavani/hamid
plugins/inrealm.lua
92
25223
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
cjtallman/luasocket
src/ltn12.lua
48
8698
----------------------------------------------------------------------------- -- LTN12 - Filters, sources, sinks and pumps. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ------------------------------------------------------------------------...
mit
soumith/nn
SpatialConvolutionMap.lua
2
4617
local SpatialConvolutionMap, parent = torch.class('nn.SpatialConvolutionMap', 'nn.Module') nn.tables = nn.tables or {} function nn.tables.full(nin, nout) local ft = torch.Tensor(nin*nout,2) local p = 1 for j=1,nout do for i=1,nin do ft[p][1] = i ft[p][2] = j p = p + 1 end end return f...
bsd-3-clause
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua
7
2256
-------------------------------- -- @module TransitionPageTurn -- @extend TransitionScene -- @parent_module cc -------------------------------- -- Returns the action that will be performed with size.<br> -- param vector A given size.<br> -- return The action that will be performed. -- @function [parent=#TransitionPa...
mit
agingrasc/config
ansible/roles/editor/files/nvim/plugins.lua
1
3942
--Tree-sitter -- require'nvim-treesitter.configs'.setup { -- ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages -- -- ignore_install = { "javascript" }, -- List of parsers to ignore installing -- highlight = { -- enable = true, ...
mit
musselwhizzle/Focus-Points
focuspoints.lrdevplugin/SonyRX10M4Delegates.lua
3
3826
--[[ 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
miraage/gladdy
Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
6
1757
local AceGUI = LibStub("AceGUI-3.0") -------------------------- -- Heading -- -------------------------- do local Type = "Heading" local Version = 3 local function OnAcquire(self) self:SetText("") end local function OnRelease(self) self.frame:ClearAllPoints() self.frame:Hide() end local functio...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/autorun/server/sv_autovote.lua
1
1097
hook.Add( "Initialize", "AutoTTTMapVote", function() if GAMEMODE_NAME == "terrortown" then function CheckForMapSwitch() -- Check for mapswitch local rounds_left = math.max(0, GetGlobalInt("ttt_rounds_left", 6) - 1) SetGlobalInt("ttt_rounds_left", rounds_left) ...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/vgui/dhtmlcontrols.lua
2
5411
--[[__ _ / _| __ _ ___ ___ _ __ _ _ _ __ ___| |__ | |_ / _` |/ __/ _ \ '_ \| | | | '_ \ / __| '_ \ | _| (_| | (_| __/ |_) | |_| | | | | (__| | | | |_| \__,_|\___\___| .__/ \__,_|_| |_|\___|_| |_| |_| 2010 --]] local PANEL = {} --[[------------...
mit
zaeem55/meme
plugins/ar-banhammer.lua
1
13160
local function pre_process(msg) local data = load_data(_config.moderation.data) -- 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('Ch...
gpl-2.0
pazos/koreader
frontend/ui/otamanager.lua
2
19468
--[[-- Checks for updates on the specified nightly build server. ]] local BD = require("ui/bidi") local ConfirmBox = require("ui/widget/confirmbox") local DataStorage = require("datastorage") local Device = require("device") local Event = require("ui/event") local InfoMessage = require("ui/widget/infomessage") local M...
agpl-3.0
judos/hardCrafting
source/prototypes/long-filter-inserter.lua
1
1036
if settings.startup["hardcrafting-extra-inserters"].value == true then data:extend( { { type = "item", name = "long-filter-inserter", icon = "__"..fullModName.."__/graphics/icons/long-filter-inserter.png", icon_size = 32, subgroup = "inserter", order = "f[inserter]-e[smart-inserter]-2", place_result ...
gpl-3.0
arkana-fts/cegui
cegui/src/ScriptModules/Lua/support/tolua++bin/lua/package.lua
14
10085
-- tolua: package 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, -- enhancements, ...
mit
anonymous12212020/sbss
plugins/Anti_spam.lua
16
3749
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id ==...
gpl-2.0
radixdev/flang
lang/base/scope.lua
1
5444
--[[ Implements scope for the Interpreter. We're creating a tree of scopes to facilitate variable lookup and scope backtracking. ]] Scope = {} Flang.Scope = Scope Scope.__index = Scope function Scope:new(o) if not o then error("nil constructor!") end -- Each "ptr" points to another Scope object ...
mit
joaofvieira/luci
applications/luci-app-asterisk/luasrc/model/cbi/asterisk/voicemail_settings.lua
68
2203
-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require "luci.sys.zoneinfo" cbimap = Map("asterisk", "Voicemail - Common Settings") voicegeneral = cbimap:section(TypedSection, "voicegeneral", "General Voicemail Options", "Common settings for all mailboxes...
apache-2.0
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/PointLight.lua
8
1061
-------------------------------- -- @module PointLight -- @extend BaseLight -- @parent_module cc -------------------------------- -- get or set range -- @function [parent=#PointLight] getRange -- @param self -- @return float#float ret (return value: float) -------------------------------- -- -- @function...
mit
sgraham/nope
third_party/skia/tools/lua/count_reduced_clipstacks.lua
147
3116
stats = {} -- switch this to run on the automated scraper system newline = "\n" -- newline = "\\n" function sk_scrape_startcanvas(c, fileName) canvas = c oldstackstr = "<invalid>" end function sk_scrape_endcanvas(c, fileName) canvas = nil end function string.starts(String,Start) return string.sub(Str...
bsd-3-clause