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 |
|---|---|---|---|---|---|
graydon/monotone | tests/generating_and_extracting_keys_and_certs/__driver__.lua | 1 | 2462 |
mtn_setup()
tkey = "happy@bogus.com"
-- empty passphrase
check(mtn("genkey", tkey .. ".empty"), 0, false, false)
-- fail to enter passphrase 3 times
check(mtn("genkey", tkey), 1, false, false, tkey .. "\n" .. "\n" .. "\n" .. tkey .. "\n" .. tkey .. "\n")
-- generate a new key
check(mtn("genkey", tkey), 0, false, f... | gpl-2.0 |
gusew/cate | examples/tuplesizes.lua | 1 | 2798 | algLinSearch2 = createAlgorithm("../algorithms/lib/LinearSearch2tpl.so", {10000})
algLinSearch4 = createAlgorithm("../algorithms/lib/LinearSearch4tpl.so", {10000})
algLinSearch10 = createAlgorithm("../algorithms/lib/LinearSearch10tpl.so", {10000})
algBitvector2 = createAlgorithm("../algorithms/lib/Bitvector2tpl.so", {... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/alert_definitions/flow/alert_custom_lua_script.lua | 1 | 1563 | --
-- (C) 2019-22 - ntop.org
--
-- ##############################################
local flow_alert_keys = require "flow_alert_keys"
-- Import the classes library.
local classes = require "classes"
-- Make sure to import the Superclass!
local alert = require "alert"
-- ##############################################
... | gpl-3.0 |
Banderi/OpenTomb | scripts/level/tr3/CITY.lua | 2 | 2389 | -- OPENTOMB LEVEL SCRIPT
-- FOR TOMB RAIDER 3, CITY.TR2
print("Level script loaded (CITY.lua)");
-- STATIC COLLISION FLAGS ------------------------------------------------------
--------------------------------------------------------------------------------
static_tbl[10] = {coll = COLLISION_TYPE_STATIC, shape = CO... | lgpl-3.0 |
ntop/ntopng | scripts/lua/admin/get_ndpi_applications.lua | 1 | 4764 | --
-- (C) 2013-22 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local protos_utils = require("protos_utils")
local page_utils = require("page_utils")
local json = require("dkjson")
sendHTTPContentTypeHeader('text/html')
-- Tab... | gpl-3.0 |
lemones/dotfiles | home/.config/awesome/lain/layout/cascadetile.lua | 6 | 5883 |
--[[
Licensed under GNU General Public License v2
* (c) 2014, projektile
* (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
lo... | gpl-3.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[race]/race_ghost/nametags.lua | 4 | 7088 | nametag = {}
local nametags = {}
local g_screenX,g_screenY = guiGetScreenSize()
local bHideNametags = false
local NAMETAG_SCALE = 0.3 --Overall adjustment of the nametag, use this to resize but constrain proportions
local NAMETAG_ALPHA_DISTANCE = 50 --Distance to start fading out
local NAMETAG_ALPHA_DISSAPEAR_DISTANCE... | mit |
gajop/chiliui | luaui/chili/chili/skins/DarkGlass/skin.lua | 1 | 1145 | --// =============================================================================
--// GlassSkin
local skin = {
info = {
name = "DarkGlass",
version = "0.11",
author = "jK",
depend = {
"Glass",
},
}
}
--// ===========================================================================... | gpl-2.0 |
jasonrudolph/dotfiles | hammerspoon/do-not-disturb.lua | 1 | 2198 | --------------------------------------------------------------------------------
--- Function
--- Determine whether "Do Not Disturb" is enabled.
---
--- Parameters:
--- * None
---
--- Returns:
--- * A boolean value indicating whether "Do Not Disturb" is enabled.
-------------------------------------------------------... | mit |
icetoggle/skynet | examples/simplewebsocket.lua | 12 | 2952 | local skynet = require "skynet"
local socket = require "skynet.socket"
local service = require "skynet.service"
local websocket = require "http.websocket"
local handle = {}
local MODE = ...
if MODE == "agent" then
function handle.connect(id)
print("ws connect from: " .. tostring(id))
end
function... | mit |
Altenius/cuberite | Server/Plugins/APIDump/Hooks/OnPlayerShooting.lua | 36 | 1175 | return
{
HOOK_PLAYER_SHOOTING =
{
CalledWhen = "When the player releases the bow, shooting an arrow (other projectiles: unknown)",
DefaultFnName = "OnPlayerShooting", -- also used as pagename
Desc = [[
This hook is called when the {{cPlayer|player}} shoots their bow. It is called for the actual
release o... | apache-2.0 |
cere-bro/telegram-bot | plugins/location.lua | 625 | 1564 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
safavi1381/Master-bot | plugins/location.lua | 625 | 1564 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
mamadtnt/um | plugins/location.lua | 625 | 1564 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/test_gmake_cpp.lua | 7 | 4003 | --
-- tests/test_gmake_cpp.lua
-- Automated test suite for GNU Make C/C++ project generation.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
T.gmake_cpp = { }
--
-- Configure a solution for testing
--
local sln, prj
function T.gmake_cpp.setup()
_ACTION = "gmake"
_OPTIONS.os = "linux"
sln = ... | gpl-2.0 |
gajop/chiliui | luaui/chili/chili/controls/scrollpanel.lua | 1 | 11367 | --// =============================================================================
--- ScrollPanel module
--- ScrollPanel fields.
-- Inherits from Control.
-- @see control.Control
-- @table ScrollPanel
-- @int[opt = 12] scrollBarSize size of the scrollbar
-- @int[opt = 0] scrollPosX position of the scrollbar... | gpl-2.0 |
WeiNSteiN-Dev/The_New_Satan | plugins/invite.lua | 393 | 1225 | 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 |
focusworld/focus | plugins/tweet.lua | 634 | 7120 | local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json"
local client = OAuth.new(consumer_key,
consumer_secret,
... | gpl-2.0 |
Mortezarohandeh1/hack_shop2bot | plugins/tweet.lua | 634 | 7120 | local OAuth = require "OAuth"
local consumer_key = ""
local consumer_secret = ""
local access_token = ""
local access_token_secret = ""
local twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json"
local client = OAuth.new(consumer_key,
consumer_secret,
... | gpl-2.0 |
drandell/btmn | conf.lua | 1 | 3960 | --[[
-- Love Configuration File
-- Created In a different project, a long time ago...
-- Dan
]]--
-- Some helpful globals
version = "11.1";
width = 720;
height = 400;
-- Locals
local title = "BTMN";
local author = "Wizardry Games";
local url = "www.wizardrygames.com";
local iconPath = "Content/Images/icon.png";
--... | gpl-3.0 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/tests/base/test_path.lua | 7 | 5328 | --
-- tests/base/test_path.lua
-- Automated test suite for the action list.
-- Copyright (c) 2008-2010 Jason Perkins and the Premake project
--
T.path = { }
local suite = T.path
--
-- path.getabsolute() tests
--
function suite.getabsolute_ReturnsCorrectPath_OnMissingSubdir()
local expected = path.translate(os.... | gpl-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[admin]/admin/server/admin_serverprefs.lua | 7 | 2150 | --
--
-- admin_serverprefs.lua
--
--
---------------------------------------------------------------------------
--
-- Prefs
--
--
--
---------------------------------------------------------------------------
function cachePrefs()
g_Prefs = {}
g_Prefs.maxmsgs = getNumber('maxmsgs',99)
g_Prefs.bandurations = get... | mit |
rigeirani/a | 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 |
ntop/ntopng | scripts/lua/iface_local_stats.lua | 1 | 3153 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if((dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end
require "lua_utils"
sendHTTPContentTypeHea... | gpl-3.0 |
graydon/monotone | tests/resolve_conflicts_all_resolutions/__driver__.lua | 1 | 5513 | -- Test showing and setting all possible conflict resolutions in a
-- conflict file. Also test 'conflict show_remaining'.
mtn_setup()
get("merge3_hook.lua")
-- Generate a conflicts file, with one conflict for each type of
-- resolution. The list of currently supported resolutions is in
-- roster_merge.cc, syms declar... | gpl-2.0 |
windofthesky/thrift | lib/lua/TBufferedTransport.lua | 72 | 2288 | --
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | apache-2.0 |
blackmiaool/kexie_game | old/lua/nature_test.lua | 1 | 2953 | p.nature_test=function()
ts(res.tushuguanyejing)
tc("入学一段时间后,你对神大的陌生感逐渐消失。望着暮色中的图书馆,你陷入了沉思。")
tc("你接下来的选择会影响你的属性,你决定")
local result = tm("使用默认属性(不推荐)", "开始进行属性测试");
if (result == 1) then
tc("首先请选择你的名字")
local result,value = tm({
type="input_with_btn",
data... | mit |
vikas17a/Algorithm-Implementations | Weighted_Random_Distribution/Lua/Yonaba/weighted_random.lua | 27 | 1445 | -- Weighted/Biased random distribution implementation
-- See : http://codetheory.in/weighted-biased-random-number-generation-with-javascript-based-on-probability/
-- Note: The sum of weights should be 1. That is, all
-- weights are decimal values lower than 1.
-- Note: As all the implementations given below uses
-- ... | mit |
ntop/ntopng | scripts/lua/rest/v1/delete/interface/alerts.lua | 1 | 1180 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path
local alert_utils = require "alert_utils"
local alert_consts = require "alert_consts"
... | gpl-3.0 |
caohongtao/quick-cocos-demo | src/framework/functions.lua | 9 | 36775 | --[[
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... | apache-2.0 |
deveNovar/DEveNovar | plugins/locklinks.lua | 3 | 1332 |
do
local function pre_process(msg)
local aboskrop = 'mate:'..msg.to.id
if redis:get(aboskrop) and msg.text:match("[Hh][Tt][Tt][Pp][Ss]") or msg.text:match("[Hh][Tt][Tt][Pp]") or msg.text:match("[Tt][Ee][Ll][Ee][Gg][Rr][Aa][Mm].[Mm][Ee]") or msg.text:match("[Tt].[Mm][Ee]") or msg.text:match("[Ww][Ww][Ww]") or msg.te... | gpl-2.0 |
Bierbuikje/Mr.Green-MTA-Resources | editorplugin/mrgreen/mrgreen/edf_c.lua | 3 | 2502 | function createRocket()
local occupiedVehicle = getPedOccupiedVehicle(localPlayer)
local x,y,z = getElementPosition(occupiedVehicle)
local rX,rY,rZ = getElementRotation(occupiedVehicle)
local x = x+4*math.cos(math.rad(rZ+90))
local y = y+4*math.sin(math.rad(rZ+90))
createProjectile(occupiedVehicle, 19, x, y, z, 1... | mit |
graydon/monotone | tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua | 1 | 1190 |
mtn_setup()
writefile("foo1", "foo file 1")
writefile("foo2", "foo file 2")
check(mtn("add", "foo1"), 0, false, false)
commit()
rev = base_revision()
remove("_MTN")
check(mtn("log", "--from", rev, "foo1"), 0, false, false)
-- should work without any --root argument, too. we do this in a
-- special temporary direc... | gpl-2.0 |
graydon/monotone | tests/log_hides_deleted_renamed_files/__driver__.lua | 1 | 1114 |
-- This test checks that 'mtn log' of deleted and renamed files shows
-- nothing in a further revision, as they are not applicable any more.
mtn_setup()
addfile("foo", "foo")
commit("testbranch", "Addition of foo.")
addfile("bar", "bar")
commit("testbranch", "Addition of bar.")
addfile("baz", "baz")
commit("testbr... | gpl-2.0 |
ntop/ntopng | scripts/lua/rest/v1/delete/ntopng/user.lua | 1 | 1238 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/pools/?.lua;" .. package.path
require "lua_utils"
local json = require ("dkjson")
local rest_utils = require("rest_utils")... | gpl-3.0 |
shironecko/LuaMaze | source/listbox.lua | 1 | 36479 | --listbox by Luiz Renato @darkmetalic v1.0 for LÖVE2D 0.10+
-- https://github.com/darkmetalic/ListBox
--Default values
local listbox={
x=100,y=100, -- listbox position x,y (number)
w=200,h=400, -- listbox size Width x Height (number)
hor=true,ver=true, -- Show scroller Horizontal and Vertical (boolean)
sort=fa... | mit |
Banderi/OpenTomb | scripts/audio/common_sounds.lua | 3 | 5428 | -- OPENTOMB GLOBAL SOUND ID MAPPER SCRIPT
-- by Lwmte, May 2014
--------------------------------------------------------------------------------
-- All TR games shared some sound sample indexes. Mostly, it's generic and menu
-- sounds. While sound samples themselves may have changed, index always remain
-- the same. H... | lgpl-3.0 |
xianjiec/nn | VolumetricAveragePooling.lua | 19 | 1404 | local VolumetricAveragePooling, parent = torch.class(
'nn.VolumetricAveragePooling', 'nn.Module')
function VolumetricAveragePooling:__init(kT, kW, kH, dT, dW, dH)
parent.__init(self)
dT = dT or kT
dW = dW or kW
dH = dH or kH
self.kT = kT
self.kH = kH
self.kW = kW
self.dT = dT
self.dW = ... | bsd-3-clause |
Planimeter/lgameframework | lib/socket/smtp.lua | 142 | 7961 | -----------------------------------------------------------------------------
-- SMTP client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp $
-----------------------------------------------------------------------------
---------... | mit |
RockySeven3161/Unknown8765 | plugins/trivia.lua | 647 | 6784 | do
-- Trivia plugin developed by Guy Spronck
-- Returns the chat hash for storing information
local function get_hash(msg)
local hash = nil
if msg.to.type == 'chat' then
hash = 'chat:'..msg.to.id..':trivia'
end
if msg.to.type == 'user' then
hash = 'user:'..msg.from.id..':trivia'
end
return hash
en... | gpl-2.0 |
pgl/prat | modules/ServerNames.lua | 2 | 12883 | ---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2007 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public Lice... | gpl-3.0 |
Cibico99/DockerESP | ESP/filebin/servernode.lua | 1 | 1036 | pl = nil;
-- create a server
sv=net.createServer(net.TCP, 10)
-- server listen on 80
sv:listen(80,function(conn)
conn:on("receive", function(conn, pl)
payload = pl;
conn:send("<html />")
conn:send("<body bgcolor='#E6E6E6'>")
conn:send("<B/>ESP8266 chipID: "..node.chipid())
conn:send("<br/>Runnin... | gpl-3.0 |
maikerumine/aftermath | mods/scifi_nodes/doors.lua | 2 | 7933 | -- mydoors mod by don
-- DO WHAT YOU WANT TO PUBLIC LICENSE
-- or abbreviated DWYWPL
-- December 2nd 2015
-- License Copyright (C) 2015 Michael Tomaino (PlatinumArts@gmail.com)
-- www.sandboxgamemaker.com/DWYWPL/
-- DO WHAT YOU WANT TO PUBLIC LICENSE
-- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
... | lgpl-2.1 |
Banderi/OpenTomb | scripts/level/tr1/LEVEL8B.lua | 2 | 1112 | -- OPENTOMB STATIC MESH COLLISION SCRIPT
-- FOR TOMB RAIDER, LEVEL1 (CAVES)
print("Level script loaded (LEVEL8B.lua)");
-- STATIC COLLISION FLAGS ------------------------------------------------------
--------------------------------------------------------------------------------
static_tbl[06] = {coll = COLLISION_... | lgpl-3.0 |
Bierbuikje/Mr.Green-MTA-Resources | resources/[admin]/admin/server/admin_sync.lua | 3 | 12079 | --[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* admin_sync.lua
*
* Original File by lil_Toady
*
**************************************]]
function aSynchCoroutineFunc( type, data )
local source = source -- Needed
if checkClient( false, source, 'aSync', type ) then return end
local cor ... | mit |
delram/seed3 | 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 |
eagle14/telesnippy | 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 |
eaufavor/AwesomeWM-powerarrow-dark | customMenu/logout.lua | 2 | 1364 | local setmetatable = setmetatable
local button = require( "awful.button" )
local beautiful = require( "beautiful" )
local naughty = require( "naughty" )
local tag = require( "awful.tag" )
local util = require( "awful.util" )
local tooltip2 = require( "radi... | apache-2.0 |
phpgao/Atlas | lib/proxy/test.lua | 44 | 6366 | --[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2008, 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 |
xianjiec/nn | LookupTable.lua | 1 | 4292 | local THNN = require 'nn.THNN'
local LookupTable, parent = torch.class('nn.LookupTable', 'nn.Module')
LookupTable.__version = 4
function LookupTable:__init(nIndex, nOutput, paddingValue, maxNorm, normType)
parent.__init(self)
self.weight = torch.Tensor(nIndex, nOutput)
self.gradWeight = torch.Tensor(nIndex,... | bsd-3-clause |
Noneatme/MTA-NFS | client/CCameraMover.lua | 2 | 2863 | -- ###############################
-- ## Project: MTA:Speedrace ##
-- ## Name: CameraMover ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- ###############################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSetting = {}; -- Local Settin... | mit |
graydon/monotone | tests/rosterify_migrates_file_dir_attrs/__driver__.lua | 1 | 1335 |
mtn_setup()
-- This is a db containing two revisions. Both contain the files
-- "testfile" and "testdir/otherfile". The first has a .mt-attrs file
-- that contains:
------
-- file "testfile"
--execute "true"
--
-- file "testdir"
--manual_merge "yes"
--
-- file "nonexistent"
--execute "true"
------
-- The... | gpl-2.0 |
ntop/ntopng | scripts/lua/rest/v2/acknowledge/network/alerts.lua | 1 | 1092 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path
local alert_utils = require "alert_utils"
local alert_consts = require "alert_consts"
... | gpl-3.0 |
Altenius/cuberite | Server/Plugins/APIDump/Hooks/OnPlayerUsingBlock.lua | 22 | 2511 | return
{
HOOK_PLAYER_USING_BLOCK =
{
CalledWhen = "Just before a player uses a block (chest, furnace...). Plugin may override / refuse.",
DefaultFnName = "OnPlayerUsingBlock", -- also used as pagename
Desc = [[
This hook is called when a {{cPlayer|player}} has right-clicked a block that can be used, such as... | apache-2.0 |
v1993/cocos2d-x-lua-i18n | cocos2d-x-test/src/cocos/framework/extends/UIWidget.lua | 5 | 1572 | --[[
Copyright (c) 2014-2017 Chukong Technologies Inc.
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, pu... | mit |
sina99/sina | plugins/locklink.lua | 3 | 1315 | local function kick_user(user_id, chat_id)
local chat = 'chat#id'..chat_id
local user = 'user#id'..user_id
chat_del_user(chat, user, function (data, success, result)
if success ~= 1 then
send_msg(data.chat, 'Error while kicking user', ok_cb, nil)
end
end, {chat=chat, user=user})
end
local functio... | gpl-2.0 |
peterhj/wgs-assembler | samtools/misc/vcfutils.lua | 42 | 21028 | #!/usr/bin/env luajit
-----------------------------------
-- BEGIN: routines from klib.lua --
-----------------------------------
-- Description: getopt() translated from the BSD getopt(); compatible with the default Unix getopt()
--[[ Example:
for o, a in os.getopt(arg, 'a:b') do
print(o, a)
end
]]--
function os... | gpl-2.0 |
maikerumine/aftermath | mods/doors/init.lua | 3 | 23660 | -- our API object
doors = {}
-- private data
local _doors = {}
_doors.registered_doors = {}
_doors.registered_trapdoors = {}
-- returns an object to a door object or nil
function doors.get(pos)
local node_name = minetest.get_node(pos).name
if _doors.registered_doors[node_name] then
-- A normal upright door
retu... | lgpl-2.1 |
trompetin17/wxFormBuilder-Atlas | build/premake/4.3/src/actions/codeblocks/codeblocks_cbp.lua | 7 | 4449 | --
-- codeblocks_cbp.lua
-- Generate a Code::Blocks C/C++ project.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
function premake.codeblocks_cbp(prj)
-- alias the C/C++ compiler interface
local cc = premake.gettool(prj)
_p('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>')
_p('<Co... | gpl-2.0 |
ophal/core | modules/user/init.lua | 1 | 9440 | local seawolf = require 'seawolf'.__build('other', 'variable', 'contrib')
local json, hash, tonumber = require 'dkjson', seawolf.other.hash, tonumber
local print, exit, _SESSION, config = print, exit, env._SESSION, settings.user or {}
local error, empty, header, l = error, seawolf.variable.empty, header, l
local theme,... | agpl-3.0 |
kristofe/mlskeleton | torch_src/A_slicing.lua | 3 | 3458 | ----------------------------------------------------------------------
-- slicing.lua
--
-- This script demonstrates tensor slicing / manipulation.
-- To run this script, simply do:
-- torch slicing.lua
-- and then press 'y' or 'return' at each step, to keep going.
-- little function to pause execution, and request ... | mit |
Jar-Chi/JarChi | bot/api.lua | 1 | 10631 | tabchi = dofile('./bot/funcation.lua')
tabchi_id = 448654876
---------------------------------
json = dofile('./libs/JSON.lua')
----~~~~~~~~~~~~~~~~
URL = require "socket.url"
----~~~~~~~~~~~~~~~~
serpent = dofile("./libs/serpent.lua")
------~~~~~~~~~~~~~~~~
http = require "socket.http"
-----~~~~~~~~~~~~~~~~
https = r... | gpl-3.0 |
caohongtao/quick-cocos-demo | runtime/ios/PrebuiltRuntimeLua.app/src/cocos/init.lua | 39 | 1826 |
require "cocos.cocos2d.Cocos2d"
require "cocos.cocos2d.Cocos2dConstants"
require "cocos.cocos2d.extern"
require "cocos.cocos2d.bitExtend"
require "cocos.cocos2d.DrawPrimitives"
-- opengl
require "cocos.cocos2d.Opengl"
require "cocos.cocos2d.OpenglConstants"
-- cocosbuilder
require "cocos.cocosbuilder.CCBReaderLoad"
... | apache-2.0 |
vikas17a/Algorithm-Implementations | Floyd_Warshall/Lua/Yonaba/floyd_warshall_test.lua | 26 | 1638 | -- Tests for floyd_warshall.lua
local fw = require 'floyd_warshall'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function same(t, d)
if #t ~= #d then return false end
if #t[1] ~= #d[1] then return false end
loc... | mit |
millerlogic/ludebot | lua/dbotconfig.lua | 1 | 15384 | -- Copyright 2012-2014 Christopher E. Miller
-- License: GPLv2, see LICENSE file.
require "serializer"
require "timers"
if testmode then
datx = ".test"
end
if not dbotData and irccmd then
dbotData = nil
dbotDirty = false
local t, xerr = deserialize("dbot.dat" .. (datx or ''))
if not t then
assert(not nextrun,... | gpl-2.0 |
Playermet/luajit-tcc | tcc.lua | 2 | 4758 | -----------------------------------------------------------
-- Binding for TCC v0.9.26
-----------------------------------------------------------
local ffi = require 'ffi'
local jit = require 'jit'
local const = {}
const.output_memory = 0
const.output_exe = 1
const.output_dll = 2
const.output_obj... | mit |
ryangmor/myrep | plugins/invite.lua | 2 | 1110 | 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) or is_gbanned(result.id) then -- Ignore bans and globall bans
send_large_msg(chat, 'User is banned.')
else
... | gpl-2.0 |
HertzDevil/MGCInts | src/mgcints/util/nsffile.lua | 1 | 8437 | -- 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/.
--- Helper class for reading NSF files.
-- Writing and creating NSF files is not supported.
-- @classmod util.NSFFile... | mpl-2.0 |
ntop/ntopng | scripts/lua/modules/template.lua | 1 | 18139 | --
-- (C) 2013-22 - ntop.org
--
NTOP_BASE_ID = 57472
NTOP_BASE_NETFLOW_ID = NTOP_BASE_ID+1024
-- template name to id
template = {
['IN_BYTES'] = 1,
--['SYSTEM_ID'] = 1,
['IN_PKTS'] = 2,
--['INTERFACE_ID'] = 2,
['FLOWS'] = 3,
--['LINE_CARD'] = 3,
['PROTOCOL'] = 4,
['PROTOCOL_MAP'] = NTOP_BASE_N... | gpl-3.0 |
Fawk/CleanUI | modules/units/pet.lua | 1 | 2129 | local A, L = unpack(select(2, ...))
local E, T, U, Units, media = A.enum, A.Tools, A.Utils, A.Units, LibStub("LibSharedMedia-3.0")
local Pet = {}
local frameName = "Pet"
function Pet:Init()
local db = A.db.profile.units[frameName:lower()]
local frame = Units:Get(frameName) or A:CreateUnit(frameName)
fr... | gpl-3.0 |
ntop/ntopng | scripts/lua/hash_table_details.lua | 1 | 1866 | --
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if(ntop.isPro()) then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local snmp_utils = require "snmp_utils"
end
require "lua_utils"
l... | gpl-3.0 |
deveNovar/DEveNovar | plugins/masg.lua | 3 | 10837 | local function pre_process(msg)
-- Begin 'RondoMsgChecks' text checks by @rondoozle
if is_chat_msg(msg) or is_super_group(msg) then
if msg and not is_momod(msg) and not is_whitelisted(msg.from.id) then --if regular user
local data = load_data(_config.moderation.data)
local print_name = user_print_name(msg.from)... | gpl-2.0 |
noa/nn | MixtureTable.lua | 23 | 5638 | local MixtureTable, parent = torch.class('nn.MixtureTable', 'nn.Module')
function MixtureTable:__init(dim)
parent.__init(self)
self.dim = dim
self.size = torch.LongStorage()
self.batchSize = 0
self.size2 = torch.LongStorage()
self.backwardSetup = false
self.gradInput = {}
end
function MixtureTabl... | bsd-3-clause |
ac-minetest/smart_mobs | sheep.lua | 1 | 4485 |
local all_colours = {
"grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta",
"white", "orange", "violet", "brown", "pink", "dark_grey", "dark_green"
}
-- Sheep by PilzAdam
for _, col in pairs(all_colours) do
mobs:register_mob("mobs:sheep_"..col, {
type = "animal",
passive = true,
hp_min = 8,... | mit |
sevenbot/seventmbot | 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 |
matinbot/telebot | 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 |
zhtlancer/vicious | widgets/mpd.lua | 16 | 2221 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
... | gpl-2.0 |
ntop/ntopng | scripts/lua/modules/check_definitions/flow/iec_invalid_transition.lua | 1 | 1120 | --
-- (C) 2019-22 - ntop.org
--
local checks = require("checks")
local flow_alert_keys = require "flow_alert_keys"
local CHECKS_IEC_INVALID_TRANSITION = "ntopng.checks.iec104_invalid_transition_enabled"
-- #################################################################
local script = {
-- Script category
cat... | gpl-3.0 |
Scoth42/rfkasm | fceux-2.2.2-win32/luaScripts/SMB-Mouse.lua | 3 | 16844 | --Super Mario Bros. - Drag and Drop
--Written by XKeeper
--Allows you to use the mouse to pick up enemies and movie them around!
debugmodes = {
enabled = false; -- CHANGE THIS AT YOUR PERIL
showenemydata = false;
drawmouse = false;
locktimer = false;
invincible = false;
ver = "03/29 15:00:00";
};
contr... | gpl-2.0 |
ntop/ntopng | scripts/lua/rest/v2/get/all/alert/list.lua | 1 | 1608 | --
-- (C) 2021-21 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. package.path
local rest_utils = require("rest_utils")
local all_alert_store = require "all_alert_st... | gpl-3.0 |
graydon/monotone | tests/db_kill_tag_locally/__driver__.lua | 1 | 1515 |
mtn_setup()
addfile("testfile", "blah blah")
commit()
R1=base_revision()
writefile("testfile", "foo foo")
commit()
R2=base_revision()
writefile("testfile", "bar bar")
commit()
R3=base_revision()
writefile("testfile", "baz baz")
commit()
R4=base_revision()
check(mtn("tag", R1, "ambig_tag"), 0, false, false)
check(... | gpl-2.0 |
irandevtelegramrobots/sudorobot | 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 |
ntop/ntopng | scripts/lua/rest/v2/get/datasource/interface/packet_distro.lua | 2 | 2788 | --
-- (C) 2019-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/datamodel/?.lua;" .. package.path
-- ##############################################
-- Import the classes library.
local ... | gpl-3.0 |
ntop/ntopng | scripts/lua/rest/v1/get/datasource/interface/packet_distro.lua | 2 | 2788 | --
-- (C) 2019-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/datamodel/?.lua;" .. package.path
-- ##############################################
-- Import the classes library.
local ... | gpl-3.0 |
caohongtao/quick-cocos-demo | runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/src/framework/cocos2dx/Cocos2d.lua | 19 | 9397 | -- require "CocoStudio"
cc = cc or {}
cc.DIRECTOR_PROJECTION_2D = 0
cc.DIRECTOR_PROJECTION_3D = 1
function cc.clampf(value, min_inclusive, max_inclusive)
-- body
local temp = 0
if min_inclusive > max_inclusive then
temp = min_inclusive
min_inclusive = max_inclusive
max_inclusive ... | apache-2.0 |
luciash/jitsi-meet-bootstrap | prosody-plugins/mod_token_verification.lua | 3 | 2709 | -- Token authentication
-- Copyright (C) 2015 Atlassian
local log = module._log;
local host = module.host;
local st = require "util.stanza";
local is_admin = require "core.usermanager".is_admin;
local parentHostName = string.gmatch(tostring(host), "%w+.(%w.+)")();
if parentHostName == nil then
log("error", "Failed ... | apache-2.0 |
ntop/ntopng | attic/scripts/plugins/alerts/internals/flow_calls_drops/user_scripts/interface/flow_calls_drops.lua | 2 | 1622 | --
-- (C) 2019-21 - ntop.org
--
local alerts_api = require("alerts_api")
local alert_severities = require "alert_severities"
local alert_consts = require "alert_consts"
local user_scripts = require("user_scripts")
local script
-- #################################################################
local function check... | gpl-3.0 |
eaufavor/AwesomeWM-powerarrow-dark | extern/vicious/widgets/mpd.lua | 1 | 2228 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
... | apache-2.0 |
maikerumine/aftermath | mods/wieldview/init.lua | 4 | 2004 | local time = 0
local update_time = tonumber(minetest.setting_get("wieldview_update_time"))
if not update_time then
update_time = 2
minetest.setting_set("wieldview_update_time", tostring(update_time))
end
local node_tiles = minetest.setting_getbool("wieldview_node_tiles")
if not node_tiles then
node_tiles = false
mi... | lgpl-2.1 |
charbaak/conky_script_kde | conky/Personal1/clock01_rings.lua | 2 | 9725 | --[[
# Clock Rings by Linux Mint (2012) reEdited by Altin.
#
# This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script.
# This script is based off a combination of my clock.lua script and my rings.lua script.
#
# IMPORTANT... | gpl-3.0 |
graydon/monotone | tests/restricted_commands_are_consistent/__driver__.lua | 1 | 4325 |
mtn_setup()
-- the following commands accept file arguments and --exclude and --depth
-- options used to define a restriction on the files that will be processed:
--
-- ls unknown
-- ls ignored
-- ls missing
-- ls known
-- status
-- diff
-- commit
-- revert
--
-- this test ensures that these commands operate on the... | gpl-2.0 |
graydon/monotone | tests/importing_files_with_non-english_names/__driver__.lua | 1 | 3388 |
mtn_setup()
european_utf8 = "\195\182\195\164\195\188\195\159"
-- "\xC3\xB6\xC3\xA4\xC3\xBc\xC3\x9F"
european_8859_1 = "\246\228\252\223"
-- "\xF6\xE4\xFC\xDF"
japanese_utf8 = "\227\129\166\227\129\153\227\129\168"
-- "\xE3\x81\xA6\xE3\x81\x99\xE3\x81\xA8"
japanese_euc_jp = "... | gpl-2.0 |
numo16/wesnoth | data/ai/micro_ais/cas/ca_bottleneck_attack.lua | 26 | 3244 | local AH = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "lua/helper.lua"
local ca_bottleneck_attack = {}
function ca_bottleneck_attack:evaluation(ai, cfg, self)
local attackers = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "filter_adjacent", {
{ "filt... | gpl-2.0 |
maikerumine/aftermath | mods/farming/mapgen.lua | 2 | 2069 | -- decoration function
local function register_plant(name, min, max, spawnby, num)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.006,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,... | lgpl-2.1 |
shayanchabok555/tigerantispam | 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 |
mesosphere-mergebot/dcos | packages/adminrouter/extra/src/lib/auth/common.lua | 4 | 7184 | local cjson = require "cjson"
local cookiejar = require "resty.cookie"
local jwt = require "resty.jwt"
local jwt_validators = require "resty.jwt-validators"
local util = require "util"
local errorpages_dir_path = os.getenv("AUTH_ERROR_PAGE_DIR_PATH")
if errorpages_dir_path == nil then
ngx.log(ngx.WARN, "AUTH_ERR... | apache-2.0 |
shangjiyu/openwrt-extra | luci/modules/luci-mod-wifidogauth/luasrc/wifidogsession.lua | 4 | 1719 | --[[
Copy from sauth.lua and modify.
]]--
module("luci.wifidogsession", package.seeall)
require("luci.util")
require("luci.sys")
local wdcfg = require("luci.wifidogconfig")
local nixio = require "nixio", require "nixio.util"
local fs = require "nixio.fs"
spath = wdcfg.auth.sessionpath
timeout = tonumber(wdcfg.auth.se... | gpl-2.0 |
mamadtnt/um | plugins/Map.lua | 87 | 1499 | -- Implement a command !loc [area] which uses
-- the static map API to get a location image
-- Not sure if this is the proper way
-- Intent: get_latlong is in time.lua, we need it here
-- loadfile "time.lua"
-- Globals
-- If you have a google api key for the geocoding/timezone api
do
local api_key = nil
local base_... | gpl-2.0 |
Arashbrsh/copymer | plugins/help.lua | 290 | 1653 | do
-- Returns true if is not empty
local function has_usage_data(dict)
if (dict.usage == nil or dict.usage == '') then
return false
end
return true
end
-- Get commands for that plugin
local function plugin_help(name)
local plugin = plugins[name]
if not plugin then return nil end
local text = ""
if ... | gpl-2.0 |
nsimplex/snailking | rc.template.lua | 1 | 1280 | ---
--- All measures of time are in seconds.
---
STRINGS.NAMES.SNAILKING = "Snail King"
STRINGS.CHARACTERS.GENERIC.DESCRIBE.SNAILKING = "It's a... thing. A big one."
--[[
-- The builds in place are:
-- "snailking_build", "snailking_death01_build" and "snailking_death02_build"
--]]
-- Which base build to use.
SNAILKI... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.