repo_name stringlengths 6 78 | path stringlengths 4 206 | copies stringclasses 281
values | size stringlengths 4 7 | content stringlengths 625 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
disslove2-bot/Mr.Mj-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 |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/saves.lua | 1 | 1469 |
local HTML = nil
spawnmenu.AddCreationTab( "#spawnmenu.category.saves", function()
HTML = vgui.Create( "DHTML" );
JS_Language( HTML )
HTML:SetAllowLua( true );
HTML:OpenURL( "asset://garrysmod/html/saves.html" );
HTML:Call( "SetMap( '" .. game.GetMap() .. "' );" );
ws_save = WorkshopFileBase( "save", { "... | mit |
project-icarus/editor | lunajson/encoder.lua | 12 | 3438 | local error = error
local byte, find, format, gsub, match = string.byte, string.find, string.format, string.gsub, string.match
local concat = table.concat
local tostring = tostring
local pairs, type = pairs, type
local setmetatable = setmetatable
local huge, tiny = 1/0, -1/0
local f_string_pat
if _VERSION == "Lua 5.1... | mit |
ZipFile/vlc | share/lua/playlist/googlevideo.lua | 113 | 2746 | --[[
$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 |
pazos/koreader | plugins/texteditor.koplugin/main.lua | 1 | 25043 | local BD = require("ui/bidi")
local ConfirmBox = require("ui/widget/confirmbox")
local DataStorage = require("datastorage")
local Dispatcher = require("dispatcher")
local Font = require("ui/font")
local QRMessage = require("ui/widget/qrmessage")
local InfoMessage = require("ui/widget/infomessage")
local InputDialog = r... | agpl-3.0 |
miraage/gladdy | Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua | 6 | 1650 | local AceGUI = LibStub("AceGUI-3.0")
--------------------------
-- Button --
--------------------------
do
local Type = "Button"
local Version = 7
local function OnAcquire(self)
end
local function OnRelease(self)
self.frame:ClearAllPoints()
self.frame:Hide()
self:SetDisabled(false)
end
loca... | mit |
REZATITAN/X | plugins/anti_spam.lua | 923 | 3750 |
--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 |
amirmrbad/flashbot | plugins/anti_spam.lua | 923 | 3750 |
--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 |
xXDarkBoyXx/Cloud- | plugins/anti_spam.lua | 923 | 3750 |
--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 |
izarov/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 |
FunctionalX/FunctionalX.lua | src/appFunctionalX/_table/_str.lua | 1 | 1662 | local M = { }
local T = require("PackageToolkit").module
local head = (T.import(..., "../_lists/_head")).head
local tail = (T.import(..., "../_lists/_tail")).tail
local append = (T.import(..., "../_lists/_append")).append
local get_keys = (T.import(..., "_keys")).keys
M.str = function(t, indent)
if indent == nil then... | mit |
gnuser/gocServer | d_3rd/LuaJIT-2.0.1/src/jit/v.lua | 78 | 5614 | ----------------------------------------------------------------------------
-- Verbose mode of the LuaJIT compiler.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | gpl-2.0 |
klyone/wishbone-gen | cgen_vhdl.lua | 1 | 23177 | -- -*- Mode: LUA; tab-width: 2 -*-
-- wbgen2, (c) 2010 Tomasz Wlostowski/CERN BE-Co-HT
-- LICENSED UNDER GPL v2
-- File: cgen_vhdl.lua
--
-- The VHDL code generator.
--
-- conversion table between VHDL data types and wbgen2 internal data types
fieldtype_2_vhdl={};
fieldtype_2_vhdl[BIT]="std_logic";
fieldtype_2_vhdl[... | gpl-2.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua | 18 | 1578 |
--------------------------------
-- @module RichElementCustomNode
-- @extend RichElement
-- @parent_module ccui
--------------------------------
-- brief Initialize a RichElementCustomNode with various arguments.<br>
-- param tag A integer tag value.<br>
-- param color A color in Color3B.<br>
-- param opacity A opaci... | mit |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/script/framework/display.lua | 41 | 21283 | --[[
Copyright (c) 2011-2014 chukong-inc.com
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... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/postprocess/overlay.lua | 1 | 3356 |
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
local pp_mat_overlay = CreateClientConVar( "pp_mat_overlay", "", false, false )
local pp_mat_overlay_refractamount = CreateClientCo... | mit |
philsiff/Red-Vs-Blue | Very Basic TDM [Gamemode]/gamemodes/vbtdm/entities/weapons/weapon_real_base/shared.lua | 1 | 19099 | -- English is not my first language, so sorry if I did some errors in my little "tutorial"
/*---------------------------------------------------------*/
local HitImpact = function(attacker, tr, dmginfo)
local hit = EffectData()
hit:SetOrigin(tr.HitPos)
hit:SetNormal(tr.HitNormal)
hit:SetScale(20)
util.Effect("ef... | mit |
musselwhizzle/Focus-Points | focuspoints.lrdevplugin/OlympusDelegates.lua | 5 | 4059 | --[[
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 |
IntelligentBot/IntelligentBot | plugins/Fantasy_Writer.lua | 1 | 27561 | local function run(msg, matches)
if not is_momod(msg) then
return "فقط برای مدیران"
end
if #matches < 2 then
return "بعد از این دستور، با قید یک فاصله کلمه یا جمله ی مورد نظر را جهت زیبا نویسی وارد کنید"
end
if string.len(matches[2]) > 20 then
return "حداکثر حروف مجاز 20 کاراکتر انگلیسی و عدد است"
end
loc... | gpl-2.0 |
joaofvieira/luci | applications/luci-app-asterisk/luasrc/model/cbi/asterisk.lua | 68 | 5120 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
cbimap = Map("asterisk", "asterisk", "")
asterisk = cbimap:section(TypedSection, "asterisk", "Asterisk General Options", "")
asterisk.anonymous = true
agidir... | apache-2.0 |
pazos/koreader | frontend/device/generic/device.lua | 2 | 19999 | --[[--
Generic device abstraction.
This module defines stubs for common methods.
--]]
local logger = require("logger")
local util = require("util")
local _ = require("gettext")
local T = require("ffi/util").template
local function yes() return true end
local function no() return false end
local Device = {
scree... | agpl-3.0 |
pazos/koreader | frontend/device/kindle/event_map_keyboard.lua | 6 | 1343 | --[[
event map for Kindle devices with an alphabetic and/or alphanumeric keyboard
--]]
return {
[2] = "1", [3] = "2", [4] = "3", [5] = "4", [6] = "5", [7] = "6", [8] = "7", [9] = "8", [10] = "9", [11] = "0",
[16] = "Q", [17] = "W", [18] = "E", [19] = "R", [20] = "T", [21] = "Y", [22] = "U", [23] = "I",... | agpl-3.0 |
sdgdsffdsfff/nginx-openresty-windows | LuaJIT-2.1-20150622/dynasm/dasm_arm.lua | 120 | 34598 | ------------------------------------------------------------------------------
-- DynASM ARM module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _in... | bsd-2-clause |
dromozoa/dromozoa-bind | test/test_callback.lua | 5 | 2180 | -- 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 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua | 7 | 1092 |
--------------------------------
-- @module FadeOutDownTiles
-- @extend FadeOutUpTiles
-- @parent_module cc
--------------------------------
-- brief Create the action with the grid size and the duration.<br>
-- param duration Specify the duration of the FadeOutDownTiles action. It's a value in seconds.<br>
-- param ... | mit |
REZATITAN/X | 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 |
judos/hardCrafting | source/prototypes/harder-copper-processing.lua | 1 | 3895 | -- Requirement: --
require "prototypes.dirt"
require "prototypes.gravel"
require "prototypes.crusher"
require "prototypes.pulverizer"
-- Minable ressources: --
data.raw["resource"]["copper-ore"].minable.result = nil
data.raw["resource"]["copper-ore"].minable.results = {
ressourceItemMinMaxProb("copper-ore", 1, 1, 0... | gpl-3.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ControlButton.lua | 7 | 13033 |
--------------------------------
-- @module ControlButton
-- @extend Control
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ControlButton] isPushed
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the title label to use fo... | mit |
yetsky/luci | applications/luci-statistics/luasrc/model/cbi/luci_statistics/olsrd.lua | 70 | 1672 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Manuel Munz <freifunk at somakoma dot 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
]]--
m... | apache-2.0 |
redxdev/Wake | dist/tests/native/vertex.lua | 1 | 1353 | local test = require('test')
local Vertex = Vertex
local Vector3 = Vector3
local Vector2 = Vector2
test.suite('Vertex Library')
test.test('creation', function()
local v = Vertex.new()
test.assert_equal(v:getPosition(), Vector3.new(0, 0, 0))
test.assert_equal(v:getNormal(), Vector3.new(1, 0, 0))
test.a... | mit |
pazos/koreader | frontend/luadata.lua | 5 | 4867 | --[[--
Handles append-mostly data such as KOReader's bookmarks and dictionary search history.
]]
local LuaSettings = require("luasettings")
local dbg = require("dbg")
local dump = require("dump")
local logger = require("logger")
local util = require("util")
local LuaData = LuaSettings:new{
name = "",
max_back... | agpl-3.0 |
pazos/koreader | frontend/ui/widget/htmlboxwidget.lua | 2 | 7836 | --[[--
HTML widget (without scroll bars).
--]]
local Device = require("device")
local DrawContext = require("ffi/drawcontext")
local Geom = require("ui/geometry")
local GestureRange = require("ui/gesturerange")
local InputContainer = require("ui/widget/container/inputcontainer")
local Mupdf = require("ffi/mupdf")
loca... | agpl-3.0 |
amirmrbad/flashbot | 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 |
Tarfand-pro/csgroup | system/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 |
MRMV2000/amira-o | system/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 |
mjarco/sysdig | userspace/sysdig/chisels/v_procs_errors.lua | 8 | 3080 | --[[
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 |
payamohajeri/telegram-bot | plugins/banhammer.lua | 175 | 5896 | local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id)... | gpl-2.0 |
githabbot/server22 | libs/mimetype.lua | 14 | 4951 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
miraage/gladdy | Modules/Classicon.lua | 1 | 1311 | local unpack = unpack
local CLASS_BUTTONS = CLASS_BUTTONS
local Gladdy = LibStub("Gladdy")
local Classicon = Gladdy:NewModule("Classicon", 80)
function Classicon:Initialise()
self.frames = {}
self:RegisterMessage("ENEMY_SPOTTED")
self:RegisterMessage("UNIT_DEATH")
end
function Classicon:CreateFrame(uni... | mit |
anonymous12212020/sbss | plugins/banhammer.lua | 29 | 12034 |
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 |
yetsky/luci | libs/nixio/axTLS/www/lua/test_main.lua | 176 | 1139 | cgilua.htmlheader()
cgilua.put[[
<html>
<head><title>Script Lua Test</title></head>
<body>
cgi = {
]]
for i,v in pairs (cgi) do
if type(v) == "table" then
local vv = "{"
for a,b in pairs(v) do
vv = string.format ("%s%s = %s<br>\n", vv, a, tostring(b))
end
v = vv.."}"
end
cgilua.put (string.format ("%s =... | apache-2.0 |
judos/hardCrafting | source/control/incinerators.lua | 1 | 1375 | entities["incinerator"]={}
entities["incinerator"].build = function(entity)
table.insert(global.hardCrafting.incinerators,entity)
end
entities["electric-incinerator"]={}
entities["electric-incinerator"].build = function(entity)
table.insert(global.hardCrafting.eincinerators,entity)
end
------------------------------... | gpl-3.0 |
joaofvieira/luci | applications/luci-app-tinyproxy/luasrc/model/cbi/tinyproxy.lua | 44 | 7158 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("tinyproxy", translate("Tinyproxy"),
translate("Tinyproxy is a small and fast non-caching HTTP(S)-Proxy"))
s = m:section(TypedSection, "tinyprox... | apache-2.0 |
pazos/koreader | frontend/ui/widget/container/widgetcontainer.lua | 3 | 3731 | --[[--
WidgetContainer is a container for one or multiple Widgets. It is the base
class for all the container widgets.
Child widgets are stored in WidgetContainer as conventional array items:
WidgetContainer:new{
ChildWidgetFoo:new{},
ChildWidgetBar:new{},
...
}
It handles event propa... | agpl-3.0 |
judos/hardCrafting | source/prototypes/easier-but-more-trains.lua | 1 | 1636 | require "libs.prototypes.recipe"
-- Change the cost of locomotives
local cost = settings.startup["hardcrafting-train-cost"].value
if cost ~= 1 then
local locomotiveItems = {}
for _,locomotive in pairs(data.raw.locomotive) do
local item = locomotive
if locomotive.minable then
item = locomoti... | gpl-3.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/plugin/samples/HelloPluginsLua/src/main.lua | 7 | 1120 | cc.FileUtils:getInstance():addSearchPath("src")
cc.FileUtils:getInstance():addSearchPath("res")
-- CC_USE_DEPRECATED_API = true
require "cocos.init"
-- cclog
cclog = function(...)
print(string.format(...))
end
-- for CCLuaEngine traceback
function __G__TRACKBACK__(msg)
cclog("---------------------------------... | mit |
yetsky/luci | applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua | 68 | 1140 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | apache-2.0 |
enginix/luasocket | src/smtp.lua | 123 | 8074 | -----------------------------------------------------------------------------
-- SMTP client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
-------------------------------------------------------------------------... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/autorun/server/sensorbones/tf2_scout.lua | 2 | 5451 | --
-- These are the physics bone numbers
--
local PLVS = 0;
local RTHY = 1;
local RCLF = 2;
local LTHY = 3;
local LCLF = 4;
local LFOT = 5;
local SPNE = 6;
local RSLD = 7;
local RARM = 8;
local LSLD = 9;
local LARM = 10;
local LHND = 11;
local NECK = 12;
local HEAD = 13;
local DGTG = 14;
local RHND = 15... | mit |
nimaghorbani/ghbotfool | plugins/ingroup.lua | 13 | 32144 | 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 |
project-icarus/editor | lunajson/_str_lib_lua53.lua | 12 | 2290 | local inf = math.huge
local byte, char, sub = string.byte, string.char, string.sub
local setmetatable = setmetatable
local _ENV = nil
local hextbl = {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, inf, inf, inf, inf, inf, inf,
inf, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, inf, inf, inf, inf, inf, inf, inf, inf, inf,
inf,... | mit |
IntelligentBot/IntelligentBot | plugins/Stats.lua | 1 | 4030 | do
-- Returns a table with `name` and `msgs`
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_prin... | gpl-2.0 |
Humbedooh/papersplease | docs/user/profile.lua | 1 | 1152 | local id = tonumber(r.args or 0) or 0
local usr = getUser(r, db, id)
if not usr then
print("<h4>No such user :(</h4>")
return
end
local img = ""
if usr.email and #usr.email > 0 then
img = "<img src='https://1.gravatar.com/avatar/" .. r:md5(usr.email) .. "'/>"
end
local fullname = r:escape_html(usr.fullname... | apache-2.0 |
SinZ163/TwilightsEveORPG | game/scripts/vscripts/abilities/druid/archdruid/modifier_teve_druid_archdruid_werebear.lua | 2 | 2165 | modifier_teve_druid_archdruid_werebear = class({})
function modifier_teve_druid_archdruid_werebear:OnCreated(kv)
if IsServer() then
self:GetCaster():SetAttackCapability(DOTA_UNIT_CAP_MELEE_ATTACK)
end
end
function modifier_teve_druid_archdruid_werebear:OnDestroy(kv)
if IsServer() then
self... | mit |
mp4saeed/energy28 | del.lua | 1 | 1430 | local function delmsg (i,naji)
msgs = i.msgs
for k,v in pairs(naji.messages_) do
msgs = msgs - 1
tdcli.deleteMessages(v.chat_id_,{[0] = v.id_}, dl_cb, cmd)
if msgs == 1 then
tdcli.deleteMessages(naji.messages_[0].chat_id_,{[0] = naji.messages_[0].id_}, dl_cb, cmd)
... | gpl-3.0 |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/Console.lua | 11 | 1206 |
--------------------------------
-- @module Console
-- @extend Ref
-- @parent_module cc
--------------------------------
-- starts listening to specifed TCP port
-- @function [parent=#Console] listenOnTCP
-- @param self
-- @param #int port
-- @return bool#bool ret (return value: bool)
--------------------... | mit |
cjtallman/luasocket | src/http.lua | 29 | 13216 | -----------------------------------------------------------------------------
-- HTTP/1.1 client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
---------------------------------------------------------------------... | mit |
henry4k/apoapsis-base-game | shaders/DefaultShaderProgramSet.lua | 1 | 1543 | local ShaderProgram = require 'core/graphics/ShaderProgram'
local ShaderProgramSet = require 'core/graphics/ShaderProgramSet'
local defaultProgram = ShaderProgram:load('base-game/shaders/Lighting.vert',
'base-game/shaders/Lighting.frag',
... | mit |
Sompom/minecraft_turtles | libs/StrUtils/StrUtilsAPI.lua | 3 | 38739 | --[[
Copyright (C) 2012 Thomas Farr a.k.a tomass1996 [farr.thomas@gmail.com]
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, co... | gpl-3.0 |
dangersuperbot/super_boomrange | plugins/wiki.lua | 7 | 4736 | -- http://git.io/vUA4M
local socket = require "socket"
local JSON = require "cjson"
local wikiusage = {
"!wiki [text]: ارسال مطلب از ویکی پدیای فارسی",
"!wiki(lang) [text]: خواندن مطلب از ویکی پدیای غیر فارسی مانند:!wikien iran",
"!wiki search [text]: جستجو مطلب در ویکی پدیای فارسی",
"!wiki(lang) search [text]... | gpl-2.0 |
wincinderith/awesome-config | rc.lua | 2 | 17266 | -- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = r... | gpl-3.0 |
daniel-slaney/demirogue | src/Voronoi.lua | 3 | 52077 | --[[
Voronoi.lua
Lua port of Raymond Hill's excellent Javascript implementation. I've tried to
keep this file as close to the original as possible, comments included.
--------
Author: Raymond Hill (rhill@raymondhill.net)
Contributor: Jesse Morgan (morgajel@gmail.com)
File: rhill-voronoi-core.js
Version: 0.98
Date: ... | bsd-3-clause |
miraage/gladdy | Libs/AceComm-3.0/ChatThrottleLib.lua | 2 | 12997 | --
-- ChatThrottleLib by Mikk
--
-- Manages AddOn chat output to keep player from getting kicked off.
--
-- ChatThrottleLib.SendChatMessage/.SendAddonMessage functions that accept
-- a Priority ("BULK", "NORMAL", "ALERT") as well as prefix for SendChatMessage.
--
-- Priorities get an equal share of available bandwidth... | mit |
dfst/deepforge | test/unit/test-cases/code/ninbn.lua | 2 | 1416 | -- thanks to https://github.com/soumith/imagenet-multiGPU.torch for this example
-- Achieves 62.6% top1 on validation set at 35 epochs with this regime:
-- { 1, 9, 1e-1, 5e-4, },
-- { 10, 19, 1e-2, 5e-4 },
-- { 20, 25, 0.001, 0 },
-- { 26, 30, 1e-4, 0 },
-- Trained model:
-- https://... | apache-2.0 |
yetsky/luci | libs/rpcc/luasrc/rpcc/ruci.lua | 93 | 1432 | --[[
LuCIRPCc
(c) 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 util = require "luci.ut... | apache-2.0 |
pazos/koreader | frontend/apps/cloudstorage/ftpapi.lua | 3 | 2764 | local DocumentRegistry = require("document/documentregistry")
local ftp = require("socket.ftp")
local ltn12 = require("ltn12")
local util = require("util")
local url = require("socket.url")
local FtpApi = {
}
function FtpApi:generateUrl(address, user, pass)
local colon_sign = ""
local at_sign = ""
if user... | agpl-3.0 |
SinZ163/TwilightsEveORPG | game/scripts/vscripts/abilities/druid/runemaster/modifier_teve_druid_runemaster_feral_rage.lua | 2 | 2442 | modifier_teve_druid_runemaster_feral_rage = class ({})
function modifier_teve_druid_runemaster_feral_rage:OnCreated( kv )
self.feral_rage_damage = 500 * self:GetAbility():GetLevel()
local hTarget = self:GetParent():GetAbsOrigin()
local nFXIndex = ParticleManager:CreateParticle( "particles/hero/druid/runem... | mit |
sdgdsffdsfff/nginx-openresty-windows | luajit-root/luajit/share/luajit-2.1.0-alpha/jit/dis_mips.lua | 17 | 13221 | ----------------------------------------------------------------------------
-- LuaJIT MIPS disassembler module.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
---------------------------------------------------------------------------... | bsd-2-clause |
sdgdsffdsfff/nginx-openresty-windows | luajit-root-x64/luajit/share/luajit-2.1.0-alpha/jit/dis_mips.lua | 17 | 13221 | ----------------------------------------------------------------------------
-- LuaJIT MIPS disassembler module.
--
-- Copyright (C) 2005-2013 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
---------------------------------------------------------------------------... | bsd-2-clause |
derElektrobesen/tntlua | rima.lua | 1 | 6158 | --
-- rima.lua
--
--
-- Task manager for imap collector.
-- Task's key is a user email address.
-- Rima can manage some tasks with the same key.
-- Tasks with identical keys will be groupped and managed as one bunch of tasks.
--
-- Producers can adds tasks by rima_put() calls.
-- Consumer request a bunch of tasks (wit... | bsd-2-clause |
parsaalemi/xybot | 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 |
redxdev/Wake | dist/tests/native/matrix2x3.lua | 1 | 3976 | local test = require('test')
local Matrix2x3 = Matrix2x3
local Vector3 = Vector3
test.suite('Matrix2x3 Library')
test.test('creation', function()
local m = Matrix2x3.new()
test.assert_equal(#m, 6)
test.expect_equal(m:get(1, 1), 1)
test.expect_equal(m:get(1, 2), 0)
test.expect_equal(m:get(1, 3), 0)... | mit |
lightcrest/nginx | debian/modules/nginx-lua/t/lib/CRC32.lua | 57 | 5575 | --Copyright (c) 2007-2008 Neil Richardson (nrich@iinet.net.au)
--
--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... | bsd-2-clause |
LuaDist2/luarocks | src/luarocks/download.lua | 3 | 3401 |
--- Module implementing the luarocks "download" command.
-- Download a rock from the repository.
local download = {}
package.loaded["luarocks.download"] = download
local util = require("luarocks.util")
local path = require("luarocks.path")
local fetch = require("luarocks.fetch")
local search = require("luarocks.searc... | mit |
joaofvieira/luci | modules/luci-base/luasrc/http.lua | 44 | 4772 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local ltn12 = require "luci.ltn12"
local protocol = require "luci.http.protocol"
local util = require "luci.util"
local string = require "string"
local coroutine = require "coroutine"
local table = require "tab... | apache-2.0 |
sontek/rethinkdb | external/v8_3.30.33.16/tools/gcmole/gcmole.lua | 48 | 12079 | -- 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 ... | agpl-3.0 |
joaofvieira/luci | applications/luci-app-splash/luasrc/model/cbi/splash/splash.lua | 68 | 3008 | -- Licensed to the public under the Apache License 2.0.
require("luci.model.uci")
m = Map("luci_splash", translate("Client-Splash"), translate("Client-Splash is a hotspot authentification system for wireless mesh networks."))
s = m:section(NamedSection, "general", "core", translate("General"))
s.addremove = false
s... | apache-2.0 |
yetsky/luci | applications/luci-asterisk/luasrc/model/cbi/asterisk-sip-connections.lua | 80 | 3921 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | apache-2.0 |
eggBOY91/Arctic-Core | src/scripts/lua/Lua/AUCHINDOUN/MANA_TOMBS/Instance_ManaTombs.lua | 18 | 1045 | local instance_mod = require("DUNGEON_AUCHINDOUN")
assert(instance_mod)
module(instance_mod._NAME..".INSTANCE_MANATOMBS",package.seeall)
local mod = getfenv(1)
assert(type(mod) == "table")
local info = debug.getinfo(1)
local src = string.reverse(string.sub(info.source,2,string.len(info.source)))
local file_sep;
if(GetP... | agpl-3.0 |
soolar/kolproxy-scripts | wikilink.lua | 1 | 3020 | ------------------------------------------------------------------
-- This script will add some convenient links to the official --
-- KoL wiki. Description popup windows will have the name of --
-- whatever is being described link to the wiki (while also --
-- closing the popup window), and monster and advent... | mit |
musselwhizzle/Focus-Points | focuspoints.lrdevplugin/MetaDataDialog.lua | 3 | 5054 | --[[
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 |
kahluamods/konferpug | KPG-Raiders.lua | 1 | 10417 | --[[
KahLua KonferPUG - an open roll loot distribution helper for PUGs.
WWW: http://kahluamod.com/kpug
SVN: http://kahluamod.com/svn/konferpug
IRC: #KahLua on irc.freenode.net
E-mail: cruciformer@gmail.com
Please refer to the file LICENSE.txt for the Apache License, Version 2.0.
Co... | apache-2.0 |
Samake/Minecraft | Minecraft/shared/utils.lua | 1 | 6888 | --[[
Name: Minecraft
Filename: utils.lua
Authors: Sam@ke, Jusonex, ZuluTangoDelta, 50p
--]]
-- ############# mainOutput ############## --
function mainOutput(text)
if (string.find(text, "CLIENT", 1, true)) then
outputChatBox("#CCFF00 INFO >> #FFFF99" .. text, 255, 255, 255, true)
elseif (string.find(text, "SERV... | gpl-3.0 |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/gamemodes/redvsblue/gamemode/shared.lua | 1 | 2841 | GM.Name = "Red Vs. Blue"
GM.Author = "ROODAY"
GM.Email = "N/A"
GM.Website = "N/A"
GM.Data = {}
GM.TeamBased = true // Team based game or a Free For All game?
GM.AllowAutoTeam = true
GM.AllowSpectating = true
GM.SecondsBetweenTeamSwitches = 10
GM.GameLength = 15
GM.RoundLimit = 10 // Maximum amount of rounds ... | mit |
alaycock/LaptopConfig | .config/awesome/vain/layout/termfair.lua | 1 | 4388 | -- Grab environment.
local tag = require("awful.tag")
local beautiful = require("beautiful")
local math = math
local tonumber = tonumber
module("vain.layout.termfair")
name = "termfair"
function arrange(p)
-- Layout with fixed number of vertical columns (read from nmaster).
-- New windows align ... | mit |
gsssrao/MozDef | examples/heka-lua-bro/bro_conn.lua | 8 | 3516 | -- 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) 2014 Mozilla Corporation
--
-- Contributors:
-- Anthony Verez averez@mozilla.com
-- Jeff Bryner jbryn... | mpl-2.0 |
bradchesney79/2015BeastRouterProject | openwrt/unsquash/squashfs-root/usr/lib/lua/luci/model/cbi/firewall/zone-details.lua | 19 | 6061 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2010-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local nw = require "luci.model.network"
local fw = require "luci.model.firewall"
local ds = require "luci.dispatcher"
local ut = require "luci.util"
loca... | cc0-1.0 |
LuaDist2/luarocks | spec/remove_spec.lua | 1 | 3360 | local test_env = require("test/test_environment")
local lfs = require("lfs")
local run = test_env.run
local testing_paths = test_env.testing_paths
test_env.unload_luarocks()
local extra_rocks = {
"/abelhas-1.0-1.rockspec",
"/lualogging-1.3.0-1.src.rock",
"/luasocket-3.0rc1-2.src.rock",
"/luasocket-3.0rc1-... | mit |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua | 7 | 1532 |
--------------------------------
-- @module ShuffleTiles
-- @extend TiledGrid3DAction
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ShuffleTiles] getDelta
-- @param self
-- @param #size_table pos
-- @return size_table#size_table ret (return value: size_table)
--------------... | mit |
pecio/RBP-Broker | Common/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua | 3 | 13093 | --- AceConfigRegistry-3.0 handles central registration of options tables in use by addons and modules.\\
-- Options tables can be registered as raw tables, OR as function refs that return a table.\\
-- Such functions receive three arguments: "uiType", "uiName", "appName". \\
-- * Valid **uiTypes**: "cmd", "dropdown"... | gpl-3.0 |
knowknowledge/Epiar | Resources/Scripts/universe.lua | 2 | 12508 |
-- This is the Introduction Message that greets new players.
-- Notice that we use spaces here since Label can't parse tabs.
welcomeMessage = [[
Welcome to Epiar
We hope you like it. We are still working on it.
The Epiar controls in a nutshell:
- Move the ship with the Arrow keys.
- Land ... | gpl-2.0 |
pazos/koreader | frontend/device/cervantes/device.lua | 1 | 7380 | local Generic = require("device/generic/device")
local logger = require("logger")
local function yes() return true end
local function no() return false end
local function getProductId()
local ntxinfo_pcb = io.popen("/usr/bin/ntxinfo /dev/mmcblk0 | grep pcb | cut -d ':' -f2", "r")
if not ntxinfo_pcb then retur... | agpl-3.0 |
LuaDist2/luarocks | src/luarocks/tools/zip.lua | 10 | 8683 |
--- A Lua implementation of .zip file archiving (used for creating .rock files),
-- using only lzlib or lua-lzib.
local zip = {}
local zlib = require("zlib")
local fs = require("luarocks.fs")
local dir = require("luarocks.dir")
-- zlib module can be provided by both lzlib and lua-lzib packages.
-- Create a compatibi... | mit |
philsiff/Red-Vs-Blue | Red Vs. Blue Files/lua/includes/gmsave/entity_filters.lua | 1 | 3133 |
local ClassInfo = {}
ClassInfo[ "scene_manager" ] = { ['save'] = false }
ClassInfo[ "predicted_viewmodel" ] = { ['save'] = false }
ClassInfo[ "player" ] = { ['save'] = false }
ClassInfo[ "physgun_beam" ] = { ['save'] = false }
ClassInfo[ "worldspawn" ] = { ['save'] = false }
ClassInfo[ "player_... | mit |
NatWeiss/RGP | src/cocos2d-js/frameworks/js-bindings/cocos2d-x/plugin/luabindings/auto/api/ProtocolAds.lua | 146 | 1442 |
--------------------------------
-- @module ProtocolAds
-- @extend PluginProtocol
-- @parent_module plugin
--------------------------------
-- brief show adview<br>
-- param info The information of adview will be shown<br>
-- Pay attention to the subclass definition<br>
-- param pos The position where the adview be s... | mit |
joaofvieira/luci | protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua | 47 | 3995 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local encaps, atmdev, vci, vpi, username, password
local ipv6, defaultroute, metric, peerdns, dns,
keepalive_failure, keepalive_interval, demand, mtu
encaps = section:tabop... | apache-2.0 |
pazos/koreader | spec/unit/widget_menu_spec.lua | 8 | 1176 | describe("Menu widget", function()
local Menu
setup(function()
require("commonrequire")
Menu = require("ui/widget/menu")
end)
it("should convert item table from touch menu properly", function()
local cb1 = function() end
local cb2 = function() end
local re = Menu... | agpl-3.0 |
yetsky/luci | applications/luci-statistics/luasrc/statistics/rrdtool/definitions/dns.lua | 85 | 2332 | --[[
Luci statistics - dns plugin diagram definition
Copyright 2011 Manuel Munz <freifunk at somakoma dot 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/license... | apache-2.0 |
bwarminski/tinyqs4j-core | src/main/java/co/tinyqs/tinyqs4j/core/acknowledge.lua | 1 | 1232 | --Message:
-- uuid
-- payload - HSET "data" -> uuid (first byte is version, the remainder is payload
-- expiration - ZSET "expirations:<channel>" -> (time) / uuid (optional)
-- deliveryCount - HSET "deliveries" -> uuid (int)
-- timestamp - HSET "timestamps" -> uuid
-- headers -... | bsd-3-clause |
pazos/koreader | frontend/ui/widget/pathchooser.lua | 3 | 4928 | local BD = require("ui/bidi")
local ButtonDialogTitle = require("ui/widget/buttondialogtitle")
local FileChooser = require("ui/widget/filechooser")
local Font = require("ui/font")
local UIManager = require("ui/uimanager")
local ffiutil = require("ffi/util")
local lfs = require("libs/libkoreader-lfs")
local util = requi... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.