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 |
|---|---|---|---|---|---|
Hozu/darkstar | scripts/zones/Temple_of_Uggalepih/npcs/qm15.lua | 1 | 1785 | -----------------------------------
-- Area: Temple of Uggalepih
-- NPC: ???
-- Involved in Quest: Knight Stalker
-- !pos 58 1 -70 159
-----------------------------------
local ID = require("scripts/zones/Temple_of_Uggalepih/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/npc_util")
require("scripts... | gpl-3.0 |
Valansch/RedMew | map_gen/shared/global_builders.lua | 1 | 1996 | local Token = require 'utils.token'
local Builders = {}
function Builders.unpack(shape)
local token = Token.register_global(shape)
return function(x, y, world)
local data = Token.get_global(token)
local func = Token.get(data.token)
return func(x, y, world, data)
end
end
function B... | gpl-3.0 |
anupritaisno1/Clannadbot | .luarocks/share/lua/5.2/luarocks/manif.lua | 20 | 18935 | --- Module for handling manifest files and tables.
-- Manifest files describe the contents of a LuaRocks tree or server.
-- They are loaded into manifest tables, which are then used for
-- performing searches, matching dependencies, etc.
--module("luarocks.manif", package.seeall)
local manif = {}
package.loaded["luaroc... | agpl-3.0 |
haste/oGlow | filter.lua | 1 | 2675 | local _, ns = ...
local oGlow = ns.oGlow
local argcheck = oGlow.argcheck
local pipesTable = ns.pipesTable
local filtersTable = {}
local activeFilters = {}
local numFilters = 0
function oGlow:RegisterFilter(name, type, filter, desc)
argcheck(name, 2, 'string')
argcheck(type, 3, 'string')
argcheck(filter, 4, 'funct... | mit |
Hozu/darkstar | scripts/globals/items/maringna.lua | 11 | 1035 | -----------------------------------------
-- ID: 5888
-- Item: maringna
-- Food Effect: 30Min, All Races
-----------------------------------------
-- HP +9% (cap 160)
-- Increases rate of combat skill gains by 80%
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")... | gpl-3.0 |
Tele-Sped/AdvanSource | plugins/off-on.lua | 2 | 1958 | do
function promote(receiver, member_username, user_id)
local data = load_data(_config.moderation.data)
local group = string.gsub(receiver, 'channel#id', '')
local member_tag_username = string.gsub(member_username, '@', '(at)')
if not data[group] then
return
end
if data[group]['moderators'][tostring(u... | gpl-2.0 |
Hozu/darkstar | scripts/globals/mobskills/chains_of_rage.lua | 12 | 1265 | ---------------------------------------------
-- Chains of Rage
--
---------------------------------------------
local ID = require("scripts/zones/Empyreal_Paradox/IDs")
require("scripts/globals/monstertpmoves")
require("scripts/globals/keyitems")
require("scripts/globals/settings")
require("scripts/globals/status")
re... | gpl-3.0 |
tullamods/Dominos | Dominos/core/overrideController.lua | 1 | 4087 | local _, Addon = ...
if not Addon:IsBuild('retail', 'wrath') then
return
end
local OverrideController = Addon:CreateHiddenFrame('Frame', nil, UIParent, 'SecureHandlerStateTemplate')
local overrideBarStates = {
bonusbar = '[bonusbar:5]1;0',
form = '[form]1;0',
overridebar = '[overridebar]1;0',
possessbar = '[p... | bsd-3-clause |
Hozu/darkstar | scripts/globals/mobskills/hydro_ball.lua | 11 | 1031 | ---------------------------------------------
-- Hydroball
-- Deals Water damage to targets in a fan-shaped area of effect. Additional effect: STR Down
-- Type: Breath
-- Utsusemi/Blink absorb: Ignores shadows
-- Notes: STR reduced by 15%.
---------------------------------------------
require("scripts/globals/set... | gpl-3.0 |
Hozu/darkstar | scripts/zones/Tavnazian_Safehold/npcs/Elysia.lua | 2 | 1322 | -----------------------------------
-- Area: Tavnazian Safehold
-- NPC: Elysia
-- Starts Quest: Unforgiven
-- !pos -50.410 -22.204 -41.640 26
-----------------------------------
require("scripts/globals/keyitems")
require("scripts/globals/quests")
-----------------------------------
function onTrade(player,npc,trade)... | gpl-3.0 |
ld-test/iris | iris.lua | 2 | 15656 | local socket = require "socket"
-- NOTE: draft 2 actually says v1-draft2,
-- but the server expects v1.0-draft2
local PROTO_VERSION = "v1.0-draft2"
local CLIENT_MAGIC = "iris-client-magic"
local RELAY_MAGIC = "iris-relay-magic"
local operations = {
"INIT", "DENY", "CLOSE", "BROADCAST", "REQUEST",
"REPLY", "SU... | mit |
sjznxd/luci-20121016 | libs/core/luasrc/fs.lua | 96 | 8670 | --[[
LuCI - Filesystem tools
Description:
A module offering often needed filesystem manipulation functions
FileId:
$Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may o... | apache-2.0 |
Valansch/RedMew | utils/table.lua | 1 | 9348 | local table = _G.table
local random = math.random
local floor = math.floor
local remove = table.remove
local tonumber = tonumber
local pairs = pairs
local table_size = table_size
--- Searches a table to remove a specific element without an index
-- @param t <table> to search
-- @param <any> table element to search for... | gpl-3.0 |
anupritaisno1/Clannadbot | .luarocks/lib/luarocks/rocks/luasocket/3.0rc1-2/samples/cddb.lua | 46 | 1419 | local socket = require("socket")
local http = require("socket.http")
if not arg or not arg[1] or not arg[2] then
print("luasocket cddb.lua <category> <disc-id> [<server>]")
os.exit(1)
end
local server = arg[3] or "http://freedb.freedb.org/~cddb/cddb.cgi"
function parse(body)
local lines = string.gfind(bo... | agpl-3.0 |
selboo/Atlas | lib/active-transactions.lua | 40 | 2468 | --[[ $%BEGINLICENSE%$
Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the
License.
This program is dis... | gpl-2.0 |
godzilaaa/alpha | plugins/all.lua | 18 | 5095 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
aminbotmaker/light | plugins/xkcd.lua | 628 | 1374 | do
function get_last_id()
local res,code = https.request("http://xkcd.com/info.0.json")
if code ~= 200 then return "HTTP ERROR" end
local data = json:decode(res)
return data.num
end
function get_xkcd(id)
local res,code = http.request("http://xkcd.com/"..id.."/info.0.json")
if code ~= 200 then return "HT... | gpl-2.0 |
10se1ucgo/iceball | pkg/base/mode/mode_tdm.lua | 4 | 2451 | -- TDM: this is about as simple as it gets.
--[[
This file is part of Ice Lua Components.
Ice Lua Components is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License,... | gpl-3.0 |
ENDrain/vRP-plusplus | vrp/lib/htmlEntities.lua | 1 | 58190 | -- Module options:
local error_msg_htmlEntities = false
local debug_htmlEntities = false
local ASCII_htmlEntities = true
local utf8_htmlEntities = true
local register_global_module_htmlEntities = false
local global_module_name_htmlEntities = 'htmlEntities'
local htmlEntities = {
version = '1.1.1',
name = '... | mit |
openwhisk/openwhisk-apigateway | scripts/lua/management/routes/subscriptions.lua | 3 | 5887 | --
-- 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 may ... | apache-2.0 |
Electrovirus/ThunderBolt | plugins/Management.lua | 2 | 60329 | do
-- Check Member
local function check_member_autorealm(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.peer_id
if member_id ~= our_id then
-- Group configuration
data[... | gpl-2.0 |
Hzj-jie/koreader | frontend/ui/widget/dictquicklookup.lua | 1 | 50803 | local BD = require("ui/bidi")
local Blitbuffer = require("ffi/blitbuffer")
local ButtonTable = require("ui/widget/buttontable")
local CenterContainer = require("ui/widget/container/centercontainer")
local CloseButton = require("ui/widget/closebutton")
local Device = require("device")
local Geom = require("ui/geometry")... | agpl-3.0 |
kiarash14/bumpertc1 | bot/utils.lua | 34 | 23031 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = require "serpent"
feedparser = require "feedparser"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/... | gpl-2.0 |
MrFastBot/Fast | bot/utils.lua | 2 | 33135 | URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.l... | gpl-2.0 |
SK83RJOSH/Spacewar | entities/sun.lua | 1 | 1170 | Sun = SpaceWarEntity:extend("Sun")
Sun.SCALE_FACTOR = 14
Sun.DEFAULT_COLOR = Color(255, 255, 102, 255)
Sun.ROTATION_SPEED = math.pi / 4
function Sun:init(position)
Sun.super.init(self, 2 * Sun.SCALE_FACTOR, false)
self.position = position
self:addLine(Vector2(2 * Sun.SCALE_FACTOR, 0), Vector2(-2 * Sun.SCALE_FACT... | gpl-2.0 |
plinkopenguin/wiremod | lua/wire/stools/soundemitter.lua | 8 | 2958 | WireToolSetup.setCategory( "Other/Sound" )
WireToolSetup.open( "soundemitter", "Sound Emitter", "gmod_wire_soundemitter", nil, "Sound Emitters" )
if CLIENT then
language.Add( "tool.wire_soundemitter.name", "Sound Emitter Tool (Wire)" )
language.Add( "tool.wire_soundemitter.desc", "Spawns a sound emitter for use with... | apache-2.0 |
plinkopenguin/wiremod | lua/entities/gmod_wire_expression2/core/entity.lua | 9 | 24254 | /******************************************************************************\
Entity support
\******************************************************************************/
registerType("entity", "e", nil,
nil,
function(self,output) return output or NULL end,
function(retval)
if IsValid(retval) then return ... | apache-2.0 |
Hzj-jie/koreader | spec/unit/background_runner_spec.lua | 1 | 10897 | describe("BackgroundRunner widget tests", function()
local Device, PluginShare, MockTime, UIManager
setup(function()
require("commonrequire")
package.unloadAll()
require("document/canvascontext"):init(require("device"))
-- Device needs to be loaded before UIManager.
Devi... | agpl-3.0 |
otbr/forsaken | data/actions/scripts/other/windows.lua | 14 | 1991 | local windows = {
[5303] = 6448, [5304] = 6449, [6438] = 6436, [6436] = 6438,
[6439] = 6437, [6437] = 6439, [6442] = 6440, [6440] = 6442,
[6443] = 6441, [6441] = 6443, [6446] = 6444, [6444] = 6446,
[6447] = 6445, [6445] = 6447, [6448] = 5303, [6449] = 5304,
[6452] = 6450, [6450] = 6452, [6453] = 6451, [6451] = 645... | gpl-2.0 |
liucong3/chen | trans/CrossEntropyCriterion2.lua | 1 | 2019 | require 'nn'
local CrossEntropyCriterion2, parent = torch.class('nn.CrossEntropyCriterion2', 'nn.Criterion')
function CrossEntropyCriterion2:__init()
parent.__init(self)
end
function CrossEntropyCriterion2:updateOutput(input, target)
local out = target:gt(input:size(2))
if out:sum() == 0 then
out =... | mit |
mamad007/mamad007 | plugins/exchange.lua | 352 | 2076 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local function comma_value(n) -- credit http://richard.warburton.it
local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$')
return left..(num:reverse():gsub('... | gpl-2.0 |
sajjadhooshi/sajjadhush | plugins/yoda.lua | 642 | 1199 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function request(text)
local api = "https://yoda.p.mashape.com/yoda?"
text = ... | gpl-2.0 |
aminbotmaker/light | plugins/yoda.lua | 642 | 1199 | local ltn12 = require "ltn12"
local https = require "ssl.https"
-- Edit data/mashape.lua with your Mashape API key
-- http://docs.mashape.com/api-keys
local mashape = load_from_file('data/mashape.lua', {
api_key = ''
})
local function request(text)
local api = "https://yoda.p.mashape.com/yoda?"
text = ... | gpl-2.0 |
TwistedScorpio/OTHire | data/talkactions/scripts/teleportto.lua | 2 | 1586 | function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type the parameter.")
return false
end
local destPos = getWaypointPositionByName(param)
local creature = getCreatureByName(param)
local tile = string.explode(param, ",")
local pos =... | gpl-3.0 |
xsmart/opencvr | 3rdparty/civetweb/test/websocket.lua | 9 | 2853 | timerID = "timeout"
--timerID = "interval"
function trace(text)
local f = io.open("websocket.trace", "a")
f:write(os.date() .. " - " .. text .. "\n")
f:close()
end
function iswebsocket()
return mg.lua_type == "websocket"
--return pcall(function()
-- if (string.upper(mg.request_info.http_headers.Upg... | mit |
Hzj-jie/koreader | spec/unit/util_spec.lua | 3 | 23443 | describe("util module", function()
local DataStorage, util
setup(function()
require("commonrequire")
DataStorage = require("datastorage")
util = require("util")
end)
it("should strip punctuation marks around word", function()
assert.is_equal("hello world", util.stripPunc... | agpl-3.0 |
kikito/kongame | lib/middleclass.lua | 14 | 5677 | local middleclass = {
_VERSION = 'middleclass v4.1.0',
_DESCRIPTION = 'Object Orientation for Lua',
_URL = 'https://github.com/kikito/middleclass',
_LICENSE = [[
MIT LICENSE
Copyright (c) 2011 Enrique García Cota
Permission is hereby granted, free of charge, to any person obtaining... | mit |
lipp/lua-jet | examples/players.lua | 3 | 1474 | #!/usr/bin/env lua
local peer = require'jet.peer'.new({
-- url = 'ws://jet.nodejitsu.com:80',
name = 'players',
on_connect = function()
print('connected to Jet Daemon')
end
})
local ev = require'ev'
local players = {
{
name = 'John Doe',
age = 32,
score = 0
},
{
name = 'Mark... | mit |
abbasgh12345/abbasamirpa | plugins/mod.lua | 35 | 10153 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
local username = v.username
data[tostring(m... | gpl-2.0 |
GHackAnonymous/OpenRA | mods/cnc/maps/gdi04c/gdi04c.lua | 21 | 4573 | LoseTriggerHouses = { TrigLos2Farm1, TrigLos2Farm2, TrigLos2Farm3, TrigLos2Farm4 }
TownAttackTrigger = { CPos.New(54, 38), CPos.New(55, 38), CPos.New(56, 38), CPos.New(57, 38) }
GDIReinforcementsTrigger = { CPos.New(32, 51), CPos.New(32, 52), CPos.New(33, 52) }
GDIReinforcementsPart1 = { "jeep", "jeep" }
GDIReinforcem... | gpl-3.0 |
fduch2k/mal | lua/printer.lua | 45 | 1770 | local string = require('string')
local table = require('table')
local types = require('types')
local utils = require('utils')
local M = {}
function M._pr_str(obj, print_readably)
local _r = print_readably
if utils.instanceOf(obj, types.Symbol) then
return obj.val
elseif types._list_Q(obj) then
... | mpl-2.0 |
Hzj-jie/koreader | frontend/ui/widget/notification.lua | 2 | 4681 | --[[--
Widget that displays a tiny notification at the top of the screen.
--]]
local Blitbuffer = require("ffi/blitbuffer")
local CenterContainer = require("ui/widget/container/centercontainer")
local Device = require("device")
local Font = require("ui/font")
local FrameContainer = require("ui/widget/container/frameco... | agpl-3.0 |
heryii/snabb | src/lib/io/virtual_ether_mux.lua | 5 | 3504 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local pci = require("lib.hardware.pci")
local RawSocket = require("apps.socket.raw").RawSocket
local LearningBridge = require("apps.bridge.learning").bridge
local FloodingBridge = require("apps.bridge.flooding").... | apache-2.0 |
sumowares/killpro | libs/AceHook-2.1/AceHook-2.1.lua | 1 | 15081 | --[[
Name: AceHook-2.1
Revision: $Rev: 40869 $
Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
Inspired By: Ace 1.x by Turan (turan@gryphon.com)
Website: http://www.wowace.com/
Documentation: http://www.wowace.com/index.php/AceHook-2.1
SVN: http://svn.wowace.com/root/tr... | gpl-3.0 |
Xkeeper0/fortune-street-smart | main.lua | 1 | 6455 |
require "map"
require "squaretypes"
require "districtcolors"
function pointInBox(x, y, bX, bY, bW, bH)
if (x >= bX) and (x < (bX + bW)) and (y >= bY) and (y < (bY + bH)) then
return true
else
return false
end
end
function angleMove(x, y, a, r)
local xM = x + math.sin(math.rad(a)) * r
local ... | mit |
idtek/extendwork | sample/luatest/scripts/EffectsTest/EffectsTest.lua | 1 | 12011 | require "EffectsTest.EffectsName"
local ActionIdx = -1
local size = CCDirector:sharedDirector():getWinSize()
local kTagTextLayer = 1
local kTagBackground = 1
local kTagLabel = 2
local MAX_LAYER = 22
local testLayer = nil
local titleLabel = nil
local entry = nil
local function checkAnim(dt)
loca... | apache-2.0 |
Hzj-jie/koreader | frontend/ui/widget/textwidget.lua | 3 | 14640 | --[[--
A TextWidget puts a string on a single line.
Example:
UIManager:show(TextWidget:new{
text = "Make it so.",
face = Font:getFace("cfont"),
bold = true,
fgcolor = Blitbuffer.COLOR_DARK_GRAY,
})
--]]
local Blitbuffer = require("ffi/blitbuffer")
local Font = require("ui/fon... | agpl-3.0 |
heryii/snabb | src/program/snabbnfv/nfvconfig.lua | 7 | 6819 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(...,package.seeall)
local VhostUser = require("apps.vhost.vhost_user").VhostUser
local PcapFilter = require("apps.packet_filter.pcap_filter").PcapFilter
local RateLimiter = require("apps.rate_limiter.rate_limiter").RateLimiter
local... | apache-2.0 |
pixeljetstream/r3e-open-championship | tracks.lua | 1 | 10262 | return
{
-- the app will look for the tracklength that is close
--{tracklength, shortname, official asset name (look it up in assets.txt to get icons) }
{ 4224.0947, "Most", "Autodrom Most - Grand Prix"},
{ 4930.280273, "AragonFast", "Motorland Aragón - Fast Circuit"},
{ 5342.080078, "AragonGP",... | mit |
Hzj-jie/koreader | spec/unit/focusmanager_spec.lua | 7 | 3413 | describe("FocusManager module", function()
local FocusManager
local layout
local Up,Down,Left,Right
Up = function(self) self:onFocusMove({0, -1}) end
Down = function(self) self:onFocusMove({0, 1}) end
Left = function(self) self:onFocusMove({-1, 0}) end
Right = function(self) self:onFocusMove... | agpl-3.0 |
JackHopkins/torch-rnn | util/DataLoader.lua | 5 | 1459 | require 'torch'
require 'hdf5'
local utils = require 'util.utils'
local DataLoader = torch.class('DataLoader')
function DataLoader:__init(kwargs)
local h5_file = utils.get_kwarg(kwargs, 'input_h5')
self.batch_size = utils.get_kwarg(kwargs, 'batch_size')
self.seq_length = utils.get_kwarg(kwargs, 'seq_length')
... | mit |
sanikoyes/skynet | lualib/skynet/db/redis.lua | 8 | 6860 | local socketchannel = require "skynet.socketchannel"
local tostring = tostring
local tonumber = tonumber
local table = table
local string = string
local assert = assert
local setmetatable = setmetatable
local ipairs = ipairs
local type = type
local select = select
local pairs = pairs
local redis = {}
local command =... | mit |
plinkopenguin/wiremod | lua/weapons/gmod_tool/stools/wire_debugger.lua | 9 | 11219 | TOOL.Category = "Tools"
TOOL.Name = "Debugger"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.Tab = "Wire"
if ( CLIENT ) then
language.Add( "Tool.wire_debugger.name", "Debugging Tool" )
language.Add( "Tool.wire_debugger.desc", "Shows selected components info on the HUD." )
language.Add( "Tool.wire_debugger.0",... | apache-2.0 |
MacaroonCookie/CCSkynet | src/apis/d_structs/graph/graph.lua | 1 | 1893 | graph_module = { }
local Graph = {
nodes = {}
}
function graph_module.new()
new = {}
setmetatable(new, Graph)
return new
end
function Graph._array_has_value(arr, value)
for i=1,#arr do
if arr[i] == value then
return true
end
end
return false
end
function Graph:create(object)
new_node =... | gpl-2.0 |
jasonwhite/bblua | scripts/rules/cc/gcc.lua | 2 | 7294 | --[[
Copyright (c) Jason White. MIT license.
Description:
Generates rules for compiling and linking C/C++ with gcc.
]]
local rules = require "rules"
--[[
Helper functions.
]]
local cc_srcs = {".cc", ".cpp", ".cxx", ".c++.C"}
local cc_hdrs = {".h", ".hh", ".hpp", ".hxx", ".inc"}
local function is_c_source(ext)
... | mit |
jarun/sysdig | userspace/sysdig/chisels/common.lua | 8 | 6832 | --[[
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 |
wangyanxing/Judge-at-fgdsb | judge/lua/tests/three-increasing-elements.lua | 1 | 1552 | require("../solution")
local num_test = 120
local in_0 = {}
local in_org_0 = {}
local out = {}
function test(answer, i)
if #out[i] ~= #answer then return false end
if out[i][1] == -1 and out[i][2] == -1 and out[i][3] == -1 then
return answer[1] == -1 and answer[2] == -1 and answer[3] == -1
else
... | mit |
Shayan123456/shayanhallaji123 | 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 |
WACcCKER/Guard | 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 |
adib1380/gold-bot | plugins/weather.lua | 351 | 1443 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= 200 then return nil end
local weather = ... | gpl-2.0 |
Shayan123456/shayanhallaji123 | 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 |
aminbotmaker/light | 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 |
m0fqn/test | GameData/Skins/midi-note/noteskin.lua | 1 | 4740 | function doMidiNote()
-- All notes have their origin centered.
normalNotes = {}
holdBodiesInactive = {}
holdBodiesActive = {}
holdTailsInactive = {}
holdTailsActive = {}
holdHeads = {}
fTable = {1, 2, 3, 4, 6, 8, 16, 48}
yTable = {}
xTable = {}
xTableFake = {}
rotTable = {90, 0, 180, 270}
rotTableNo... | gpl-3.0 |
agisga/dotfiles | awesome/volume-control.lua | 1 | 3164 | local awful = require("awful")
local wibox = require("wibox")
-- Volume Control
-- vcontrol.mt: module (class) metatable
-- vcontrol.wmt: widget (instance) metatable
local vcontrol = { mt = {}, wmt = {} }
vcontrol.wmt.__index = vcontrol
------------------------------------------
-- Private utility functions
-------... | gpl-3.0 |
TwistedScorpio/OTHire | data/talkactions/scripts/teleportntiles.lua | 2 | 1105 | function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type the parameter.")
return false
end
local ntiles = tonumber(param)
if(ntiles == nil or ntiles <= 0) then
return false
end
local oldPos = getPlayerPosition(cid)
if(oldPos == fal... | gpl-3.0 |
jarun/sysdig | userspace/sysdig/chisels/echo_fds.lua | 11 | 4115 | --[[
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 e... | gpl-2.0 |
masterteam1/MASTER | plugins/lockemoji.lua | 1 | 3691 | --" ╭━╮╭━╮╱╱╱╱╱╭╮ "
--" ┃┃╰╯┃┃╱╱╱╱╭╯╰╮ "
--" ┃╭╮╭╮┣━━┳━┻╮╭╋━━┳━╮ "
--" ┃┃┃┃┃┃╭╮┃━━┫┃┃┃━┫╭┫ "
--" ┃┃┃┃┃┃╭╮┣━━┃╰┫┃━┫┃ "
--" ╰╯╰╯╰┻╯╰┻━━┻━┻━━┻╯ "
do
local function run(msg, matches)
local monster = msg['id']
local emojx = 'emojx:'..msg.to.i... | gpl-2.0 |
bananu7/Prison-Breakage | libraries/loveframes/objects/button.lua | 3 | 5547 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- button object
local newobject = loveframes.NewObject("button", "loveframes_object_button", true)
--[[-------------------... | mit |
stevedekorte/lua_ios | luasocket-2.0.2/etc/dispatch.lua | 57 | 10272 | -----------------------------------------------------------------------------
-- A hacked dispatcher module
-- LuaSocket sample files
-- Author: Diego Nehab
-- RCS ID: $$
-----------------------------------------------------------------------------
local base = _G
local table = require("table")
local socket = require("... | mit |
idaisuke/scandium-cocos2dx | cocos2d/plugin/luabindings/auto/api/FacebookAgent.lua | 130 | 1488 |
--------------------------------
-- @module FacebookAgent
-- @parent_module plugin
--------------------------------
-- brief Notifies the events system that the app has launched & logs an activatedApp event.
-- @function [parent=#FacebookAgent] activateApp
-- @param self
--------------------------------
--... | mit |
live-clones/luatex | source/libs/luajit/LuaJIT-src/dynasm/dasm_arm.lua | 30 | 34598 | ------------------------------------------------------------------------------
-- DynASM ARM module.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _in... | gpl-2.0 |
sys4-fr/server-minetestSys4 | mods/sea/clams/init.lua | 1 | 12776 | -- NODES
minetest.register_node("clams:sandalgae", {
description = "Sandalgae",
tiles = {"default_sand.png^clams_algae.png"},
paramtype = "light",
is_ground_content = true,
groups = {crumbly=3, falling_node=1, sand=1},
drop = {
items = {
{
items = {'"clams:collectedalgae" 4'},
},
{
items = {'c... | gpl-3.0 |
diacritic/wssdl | src/wssdl/specifiers.lua | 1 | 7573 | --
-- Copyright 2016 diacritic <https://diacritic.io>
--
-- This file is part of wssdl <https://github.com/diacritic/wssdl>.
--
-- wssdl 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 ... | gpl-3.0 |
idtek/extendwork | sample/luatest/scripts/VisibleRect.lua | 6 | 2175 | require "extern"
VisibleRect = class("VisibleRect")
VisibleRect.__index = VisibleRect
VisibleRect.s_visibleRect = CCRect:new()
function VisibleRect:lazyInit()
if (self.s_visibleRect.size.width == 0.0 and self.s_visibleRect.size.height == 0.0) then
local pEGLView = CCEGLView:sharedOpenGLView();
s... | apache-2.0 |
TeleDALAD/AAA | 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 |
Hzj-jie/koreader | frontend/ui/widget/multiinputdialog.lua | 4 | 5317 | local Blitbuffer = require("ffi/blitbuffer")
local CenterContainer = require("ui/widget/container/centercontainer")
local Device = require("device")
local Font = require("ui/font")
local FrameContainer = require("ui/widget/container/framecontainer")
local Geom = require("ui/geometry")
local InputDialog = require("ui/wi... | agpl-3.0 |
10se1ucgo/iceball | pkg/base/ent/tpl_gun.lua | 4 | 8969 | --[[
This file is part of Ice Lua Components.
Ice Lua Components is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-3.0 |
Hzj-jie/koreader | frontend/apps/reader/modules/readerconfig.lua | 2 | 6126 | local ConfigDialog = require("ui/widget/configdialog")
local Device = require("device")
local Event = require("ui/event")
local Geom = require("ui/geometry")
local InputContainer = require("ui/widget/container/inputcontainer")
local UIManager = require("ui/uimanager")
local CreOptions = require("ui/data/creoptions")
lo... | agpl-3.0 |
zdimension/FreeRaider | FreeRaider/FreeRaider/bin/Debug/scripts/autoexec/tr1/LEVEL1.lua | 3 | 1032 | function autoexec_PreLoad()
static_tbl[06] = {coll = COLLISION_TYPE_NONE, shape = COLLISION_SHAPE_BOX}; -- Hanging plant
static_tbl[08] = {coll = COLLISION_TYPE_NONE, shape = COLLISION_SHAPE_BOX}; -- Hanging plant
static_tbl[10] = {coll = COLLISION_TYPE_STATIC, shape = COLLISION_SHAP... | lgpl-3.0 |
pctoools23/ali | plugins/owners.lua | 194 | 23755 | 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)]['settings'... | gpl-2.0 |
heryii/snabb | src/apps/lwaftr/ipv4_apps.lua | 1 | 8617 | module(..., package.seeall)
local arp = require("apps.lwaftr.arp")
local constants = require("apps.lwaftr.constants")
local fragmentv4 = require("apps.lwaftr.fragmentv4")
local fragv4_h = require("apps.lwaftr.fragmentv4_hardened")
local lwutil = require("apps.lwaftr.lwutil")
local icmp = require("apps.lwaftr.icmp")
lo... | apache-2.0 |
heryii/snabb | lib/pflua/tests/properties/opt_eq_unopt.lua | 25 | 2452 | #!/usr/bin/env luajit
-- -*- lua -*-
module(..., package.seeall)
package.path = package.path .. ";../?.lua;../../src/?.lua"
local ffi = require("ffi")
local parse = require("pf.parse")
local savefile = require("pf.savefile")
local expand = require("pf.expand")
local optimize = require("pf.optimize")
local codegen = re... | apache-2.0 |
Hzj-jie/koreader | frontend/ui/data/keyboardlayouts/keypopup/ru_popup.lua | 5 | 1464 | return {
_Je_ = {
"Ж",
north = "Ӂ", -- Ж with breve (Moldavian)
},
_je_ = {
"ж",
north = "ӂ", -- ж with breve (Moldavian)
},
_Ye_ = {
"Е",
north = "Ё",
},
_ye_ = {
"е",
north = "ё",
},
_SH_ = {
"Ь",
north... | agpl-3.0 |
jarun/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 |
openwhisk/openwhisk-apigateway | scripts/lua/management/lib/apis.lua | 3 | 6001 | --
-- 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 may ... | apache-2.0 |
avgbot/avgbot | plugins/invite.lua | 84 | 2540 | --[[
Invite other user to the chat group.
Use !invite ********* (where ********* is id_number) to invite a user by id_number.
This is the most reliable method.
Use !invite @username to invite a user by @username.
Less reliable. Some users don't have @username.
Use !invite Type print_name Here to invite a user by ... | gpl-2.0 |
sanikoyes/skynet | examples/agent.lua | 20 | 2212 | local skynet = require "skynet"
local socket = require "skynet.socket"
local sproto = require "sproto"
local sprotoloader = require "sprotoloader"
local WATCHDOG
local host
local send_request
local CMD = {}
local REQUEST = {}
local client_fd
function REQUEST:get()
print("get", self.what)
local r = skynet.call("SIM... | mit |
plinkopenguin/wiremod | lua/wire/gates/entity.lua | 9 | 25689 | --[[
Entity gates
]]
GateActions("Entity")
local function checkv( v )
return -math.huge < v.x and v.x < math.huge and
-math.huge < v.y and v.y < math.huge and
-math.huge < v.z and v.z < math.huge
end
local function checka( v )
return -math.huge < v.p and v.p < math.huge and
-math.huge < v.y and v.y < m... | apache-2.0 |
mandre/kolla | docker/heka/plugins/decoders/os_keystone_apache_log.lua | 6 | 2259 | -- Copyright 2015 Mirantis, 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 ... | apache-2.0 |
Hzj-jie/koreader | frontend/ui/widget/numberpickerwidget.lua | 2 | 9528 | --[[--
A customizable number picker.
Example:
local NumberPickerWidget = require("ui/widget/numberpickerwidget")
local numberpicker = NumberPickerWidget:new{
-- for floating point (decimals), use something like "%.2f"
precision = "%02d",
value = 0,
value_min = 0,
value_m... | agpl-3.0 |
tst2005/lua-lockbox | lockbox/cipher/mode/ctr.lua | 1 | 5262 | local Array = require("lockbox.util.array");
local Stream = require("lockbox.util.stream");
local Queue = require("lockbox.util.queue");
local String = require("string");
local Bit = require("lockbox.util.bit");
local AND = Bit.band;
local OR = Bit.bor;
local NOT = Bit.bnot;
local XOR = Bit.bxor;
local LROT = Bit.lr... | mit |
masterteam1/MASTER | plugins/tagall.lua | 1 | 2159 | local function tagall(cb_extra, success, result)
local receiver = cb_extra.receiver
local text = ''
local msgss = 0
for k,v in pairs(result.members) do
if v.username then
msgss = msgss + 1
text = text..msgss.."- @"..v.username.."\n"
end
end
text = text.."\n"..cb_extra.ms... | gpl-2.0 |
cecile/Cecile_RecipeTooltip | src/Cecile_RecipeTooltip/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua | 17 | 6554 | --[[-----------------------------------------------------------------------------
ScrollFrame Container
Plain container that scrolls its content and doesn't grow in height.
-------------------------------------------------------------------------------]]
local Type, Version = "ScrollFrame", 24
local AceGUI = LibStub an... | artistic-2.0 |
tst2005/lua-lockbox | lockbox/digest/md2.lua | 1 | 3807 | require("lockbox").insecure();
local Bit = require("lockbox.util.bit");
local String = require("string");
local Queue = require("lockbox.util.queue");
local SUBST = {
0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13,
0x62, 0xA7, 0x05, 0xF3, 0xC0, 0xC7, 0x73, 0x8C, 0x9... | mit |
sanikoyes/skynet | test/testselect.lua | 10 | 1813 | local skynet = require "skynet"
local mode = ...
if mode == "slave" then
local COMMAND = {}
function COMMAND.ping(ti, str)
skynet.sleep(ti)
return str
end
function COMMAND.error()
error "ERROR"
end
function COMMAND.exit()
skynet.exit()
end
skynet.start(function()
skynet.dispatch("lua", function(_,_, cmd, ..... | mit |
otbr/forsaken | data/creaturescripts/scripts/offlinetraining.lua | 17 | 2368 | function onLogin(player)
local lastLogout = player:getLastLogout()
local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0
local offlineTrainingSkill = player:getOfflineTrainingSkill()
if offlineTrainingSkill == -1 then
player:addOfflineTrainingTime(offlineTime * 1000)
return t... | gpl-2.0 |
heryii/snabb | src/program/lwaftr/setup.lua | 1 | 22411 | module(..., package.seeall)
local config = require("core.config")
local worker = require("core.worker")
local leader = require("apps.config.leader")
local follower = require("apps.config.follower")
local Intel82599 = require("apps.intel.intel_app").Intel82599
local PcapFilter = require("apps.packet_filte... | apache-2.0 |
sanikoyes/skynet | lualib/http/httpc.lua | 5 | 4551 | local skynet = require "skynet"
local socket = require "http.sockethelper"
local internal = require "http.internal"
local dns = require "skynet.dns"
local string = string
local table = table
local httpc = {}
local async_dns
function httpc.dns(server,port)
async_dns = true
dns.server(server,port)
end
local funct... | mit |
joshkel/qdz | boot/load.lua | 1 | 2029 | -- Qi Daozei
-- Copyright (C) 2013 Josh Kelley
--
-- based on
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini
--
-- 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 F... | gpl-3.0 |
heryii/snabb | src/apps/lwaftr/fragmentv4.lua | 3 | 5392 | module(..., package.seeall)
local constants = require("apps.lwaftr.constants")
local lwutil = require("apps.lwaftr.lwutil")
local packet = require("core.packet")
local ipsum = require("lib.checksum").ipsum
local bit = require("bit")
local ffi = require("ffi")
local lib = require("core.lib")
local rd16, wr16, get_ihl_... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.