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 |
|---|---|---|---|---|---|
yxdunc/fbcunn | test/benchmark_cublas.lua | 8 | 3885 | -- Copyright 2004-present Facebook. All Rights Reserved.
require('fb.luaunit')
require 'cunn'
require 'fbcunn'
torch.setdefaulttensortype('torch.FloatTensor')
local test = {}
-- Let C = m-by-n and A = m-by-k
-- Format is m, n, k, seqIter, batch, numHandles, numStreams
local problemSize = {
-- Sanity tests
-- Trivi... | bsd-3-clause |
ffxijuggalo/darkstar | scripts/zones/Southern_San_dOria/npcs/Miogique.lua | 11 | 1523 | -----------------------------------
-- Area: Southern San d'Oria
-- NPC: Miogique
-- Standard Merchant NPC
-----------------------------------
local ID = require("scripts/zones/Southern_San_dOria/IDs")
require("scripts/globals/npc_util")
require("scripts/globals/quests")
require("scripts/globals/shop")
function onTra... | gpl-3.0 |
etown/sysdig | userspace/sysdig/chisels/v_connections.lua | 1 | 4083 | --[[
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 |
angt/overthebox | feeds/luci/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua | 3 | 1379 | -- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com>
-- Licensed to the public under the Apache License 2.0.
local ds = require "luci.dispatcher"
local ss = require "luci.model.shadowsocks-libev"
local sname = arg[1]
local redirect_url = ds.build_url("admin/services/shadowsocks-libev/instances")
local s, o
local m... | gpl-3.0 |
Deadwing888/darkstar | scripts/zones/Manaclipper/Zone.lua | 32 | 1550 | -----------------------------------
--
-- Zone: Manaclipper
--
-----------------------------------
package.loaded["scripts/zones/Manaclipper/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/zones/Manaclipper/TextIDs");
-----------------------------------
-- o... | gpl-3.0 |
destdev/ygopro-scripts | c30299166.lua | 4 | 1383 | --ワーム・テンタクルス
function c30299166.initial_effect(c)
--multi atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30299166,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c30299166.mtcon)
e1:SetCost(c30299166.mtcost)
e1:SetTarget(c30299166.mttg)
... | gpl-2.0 |
ZhaoTianze/BehaviorTree_Cocos2dx | BehaviorTree3/uuid.lua | 2 | 8452 | ---------------------------------------------------------------------------------------
-- Copyright 2012 Rackspace (original), 2013 Thijs Schreijer (modifications)
--
-- 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... | mit |
aqasaeed/spartafox | plugins/torrent_search.lua | 411 | 1622 | --[[ NOT USED DUE TO SSL ERROR
-- See https://getstrike.net/api/
local function strike_search(query)
local strike_base = 'http://getstrike.net/api/v2/torrents/'
local url = strike_base..'search/?phrase='..URL.escape(query)
print(url)
local b,c = http.request(url)
print(b,c)
local search = json:decode(b)
v... | gpl-2.0 |
destdev/ygopro-scripts | c22873798.lua | 6 | 1309 | --ハイエナ
function c22873798.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22873798,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c22873798.condition)
e1:SetTarg... | gpl-2.0 |
angt/overthebox | feeds/luci/modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua | 6 | 2594 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
if luci.http.formvalue("cbid.luci.1._list") then
luci.http.redirect(luci.dispatcher.build_url("admin/system/flashops/backupfiles") .. "?display=list")
elseif ... | gpl-3.0 |
Deadwing888/darkstar | scripts/zones/La_Theine_Plateau/npcs/Yaucevouchat.lua | 13 | 1610 | -----------------------------------
-- Area: La Theine Plateau
-- NPC: Yaucevouchat
-- Involved in Mission: The Rescue Drill
-- @pos -318 39 183 102
-----------------------------------
package.loaded["scripts/zones/La_Theine_Plateau/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/mission... | gpl-3.0 |
angt/overthebox | feeds/luci/applications/luci-app-p910nd/luasrc/model/cbi/p910nd.lua | 78 | 1340 | -- Copyright 2008 Yanira <forum-2008@email.de>
-- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local uci = luci.model.uci.cursor_state()
local net = require "luci.model.network"
local m, s, p, b
m = Map("p910nd", translate("p910nd - Printer server"),
... | gpl-3.0 |
destdev/ygopro-scripts | c63492244.lua | 2 | 6056 | --トリックスター・ライトアリーナ
function c63492244.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63492244,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMO... | gpl-2.0 |
destdev/ygopro-scripts | c57996334.lua | 4 | 2222 | --ドドドバスター
function c57996334.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c57996334.spcon)
e1:SetOperation(c57996334.spop)
c:RegisterEffect(e1)
... | gpl-2.0 |
destdev/ygopro-scripts | c83407038.lua | 1 | 4127 | --アマゾネスの急襲
function c83407038.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83407038,0))
e2:SetCatego... | gpl-2.0 |
Deadwing888/darkstar | scripts/zones/Aht_Urhgan_Whitegate/npcs/Famad.lua | 13 | 3520 | -----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Famad
-- Type: Assault Mission Giver
-- @pos 134.098 0.161 -43.759 50
-----------------------------------
package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/keyit... | gpl-3.0 |
alexsuslov/esp8266-lua-httpd | httpd.lua | 1 | 1452 | -- Tiny http server
local http = {}
-- parse req
http.req = function(req)
local err = nil
local REQ = {query={}, head={}}
local _, _, method, path, vars = string.find(req, "^([A-Z]+) (.+)%?(.+) HTTP");
if ( method == nil ) then
local _, _, method, path = string.find(req, "(^[A-Z]+) (.+) HTTP")
else
-- разобр... | mit |
ffxijuggalo/darkstar | scripts/zones/LaLoff_Amphitheater/bcnms/divine_might.lua | 9 | 2685 | -----------------------------------
-- Area: LaLoff Amphitheater
-- Name: Divine Might
--[[ caps:
7d01, 0, 529, 1, 950, 180, 6, 0, 0 --Neo AA HM
7d01, 0, 1400, 5, 1400, 180, 11, 0, 0 --Neo DM
7d01, 1, 405, 1, 1599, 180, 7, 0, 0 -- Neo AA TT
7d01, 1, 378, 3, 903, 180, 8, 0, 0 -- Neo AA MR
7d02, 0, 8... | gpl-3.0 |
destdev/ygopro-scripts | c33323657.lua | 9 | 1140 | --サイコ・ソウル
function c33323657.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33323657.reccost)
e1:SetTarget(c33323657.rectg)
e1:SetOperation(c33323657... | gpl-2.0 |
destdev/ygopro-scripts | c54320860.lua | 2 | 1482 | --インフェルニティ・ビショップ
function c54320860.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,54320860)
e1:SetCondition(c54320860.spcon)
c:RegisterEffect(... | gpl-2.0 |
RwNigma/darkstar | scripts/globals/fieldsofvalor.lua | 12 | 19311 | -------------------------------------------------
require("scripts/globals/settings");
require("scripts/globals/conquest");
-- require("scripts/globals/teleports");
require("scripts/globals/status");
require("scripts/globals/regimereward");
require("scripts/globals/regimeinfo");
require("scripts/globals/common... | gpl-3.0 |
RwNigma/darkstar | scripts/globals/spells/regen_iv.lua | 18 | 1389 | -----------------------------------------
-- Spell: Regen IV
-- Gradually restores target's HP.
-----------------------------------------
-- Cleric's Briault enhances the effect
-- Scale down duration based on level
-- Composure increases duration 3x
-----------------------------------------
require("scripts/... | gpl-3.0 |
MeGaReborn/megareborn | bot/bot.lua | 1 | 12981 | -- #Beyond Reborn Robot
-- #@BeyondTeam
tdcli = dofile('./tg/tdcli.lua')
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
require('./bot/utils')
URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
json = (loadfile "./l... | gpl-3.0 |
asmagill/hammerspoon_asm | __for_future_consideration/btle/init.lua | 1 | 20514 | --- === hs._asm.btle ===
---
--- Hammerspoon module for Core Bluetooth Objects.
---
--- This module provides an interface to the Core Bluetooth OS X Object classes for accessing BTLE devices.
---
--- Currently this module only supports Hammerspoon as a BTLE Manager, not as a BTLE Peripheral.
---
--- This code is still ... | mit |
robert00s/koreader | frontend/ui/widget/linkbox.lua | 1 | 1516 | local Blitbuffer = require("ffi/blitbuffer")
local Device = require("device")
local Geom = require("ui/geometry")
local GestureRange = require("ui/gesturerange")
local InputContainer = require("ui/widget/container/inputcontainer")
local UIManager = require("ui/uimanager")
local Screen = Device.screen
local LinkBox = I... | agpl-3.0 |
imashiam/1 | plugins/owners.lua | 1467 | 12478 |
local function lock_group_namemod(msg, data, target)
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'yes' then
return 'Group name is already locked'
else
data[tostring(target)]['setting... | gpl-2.0 |
GarfieldJiang/UGFWithToLua | Assets/ToLua/ToLua/Lua/UnityEngine/Vector4.lua | 8 | 4551 | --------------------------------------------------------------------------------
-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com
-- All rights reserved.
-- Use, modification and distribution are subject to the "MIT License"
------------------------------------------------------------------------... | mit |
cshore/luci | protocols/luci-proto-openconnect/luasrc/model/cbi/admin_network/proto_openconnect.lua | 15 | 2664 | -- Copyright 2014 Nikos Mavrogiannopoulos <nmav@gnutls.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local server, username, password, cert, ca
local oc_cert_file, oc_key_file, oc_ca_file
local ifc = net:get_interface():name()
oc_cert_file = "/etc/openconnect/user-cert-"... | apache-2.0 |
ChristopherBiscardi/kong | spec/unit/schemas_spec.lua | 12 | 22841 | local schemas = require "kong.dao.schemas_validation"
local validate_entity = schemas.validate_entity
require "kong.tools.ngx_stub"
describe("Schemas", function()
-- Ok kids, today we're gonna test a custom validation schema,
-- grab a pair of glasses, this stuff can literally explode.
describe("#validate_enti... | mit |
bizkut/BudakJahat | System/UI/Elements/Text.lua | 1 | 1500 | local DiesalGUI = LibStub("DiesalGUI-1.0")
local DiesalTools = LibStub("DiesalTools-1.0")
function br.ui:createText(parent, text, isCheckbox)
if isCheckbox == nil then isCheckbox = false end
-------------------------------
----Need to calculate Y Pos----
-------------------------------
local Y = -5... | gpl-3.0 |
ioiasff/qrt | plugins/translate.lua | 674 | 1637 |
--[[
-- Translate text using Google Translate.
-- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello
--]]
do
function translate(source_lang, target_lang, text)
local path = "http://translate.google.com/translate_a/single"
-- URL query parameters
local p... | gpl-2.0 |
guard163/tarantool | test/sophia/transaction.test.lua | 6 | 1959 |
-- basic transaction tests
space = box.schema.space.create('test', { engine = 'sophia' })
index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} })
-- begin/rollback
box.begin()
for key = 1, 10 do space:insert({key}) end
t = {}
for key = 1, 10 do table.insert(t, space:select({key})[1]) end
t
box.rol... | bsd-2-clause |
tianxiawuzhei/cocos-quick-lua | quick/bin/win32/lua/jit/bc.lua | 43 | 5620 | ----------------------------------------------------------------------------
-- LuaJIT bytecode listing module.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
-... | mit |
Naliwe/IntelliJ_WowAddOnSupport | resources/Wow_sdk/AceEvent-3.0/AceEvent-3.0.lua | 1 | 4824 | --- AceEvent-3.0 provides event registration and secure dispatching.
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
--
-- **AceEvent-3.0** can be embeded into your addon, either explicit... | mit |
matija-hustic/OpenRA | mods/cnc/maps/gdi02/gdi02.lua | 46 | 3301 | nodInBaseTeam = { RushBuggy, RushRifle1, RushRifle2, RushRifle3 }
MobileConstructionVehicle = { "mcv" }
EngineerReinforcements = { "e6", "e6", "e6" }
VehicleReinforcements = { "jeep" }
AttackerSquadSize = 3
ReinforceWithLandingCraft = function(units, transportStart, transportUnload, rallypoint)
local transport = Act... | gpl-3.0 |
robert00s/koreader | platform/android/llapp_main.lua | 2 | 1757 | local A = require("android")
A.dl.library_path = A.dl.library_path .. ":" .. A.dir .. "/libs"
A.log_name = 'KOReader'
local ffi = require("ffi")
ffi.cdef[[
char *getenv(const char *name);
int putenv(const char *envvar);
]]
-- check uri of the intent that starts this application
local file = A.jni:context(A.ap... | agpl-3.0 |
FrisKAY/MineOS_Server | lib/tetris.lua | 1 | 13654 |
-------------------------------------------- Библиотеки -------------------------------------------------------------
local component = require("component")
local colorlib = require("colorlib")
local gpu = component.gpu
local tetris = {}
-------------------------------------------- Переменные ----------------------... | gpl-3.0 |
jonmaur/draggin-framework | src/draggin/gamestatemanager.lua | 1 | 3552 | --[[
Copyright (c) 2014 Jon Maur
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, distribute, subl... | mit |
jugglerchris/textredux | examples/multi_column_list.lua | 2 | 1258 | -- Copyright 2011-2012 Nils Nordman <nino at nordman.org>
-- Copyright 2012-2014 Robert Gieseke <rob.g@web.de>
-- License: MIT (see LICENSE)
--[[
This example shows how to use the list with multi column items. It also
illustrates the optional use of headers, as well as the fact that the
`on_selection` callback will be... | mit |
bizkut/BudakJahat | Rotations/Old/old_THFrost.lua | 1 | 52973 | local rotationName = "THFrost"
---------------
--- Toggles ---
---------------
local function createToggles()
-- Rotation Button
RotationModes = {
[1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps between Single and Multiple based on number of targets in range.", highlight = ... | gpl-3.0 |
wrxck/mattata | plugins/administration/fban.lua | 2 | 6830 | --[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local fban = {}
local mattata = require('mattata')
local redis = require('libs.redis')
function fban:init()
fban.commands = mattata.commands(self.info.username):comma... | mit |
tianxiawuzhei/cocos-quick-lua | quick/samples/anysdk/src/main.lua | 2 | 24577 |
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 |
NSAKEY/prosody-modules | mod_muc_intercom/mod_muc_intercom.lua | 32 | 2004 | -- Relay messages between rooms
-- By Kim Alvefur <zash@zash.se>
local host_session = prosody.hosts[module.host];
local st_msg = require "util.stanza".message;
local jid = require "util.jid";
local now = require "util.datetime".datetime;
local function get_room_by_jid(mod_muc, jid)
if mod_muc.get_room_by_jid then
... | mit |
NSAKEY/prosody-modules | mod_statistics/prosodytop.lua | 11 | 3159 | local curses = require "curses";
local server = require "net.server_select";
local timer = require "util.timer";
assert(curses.timeout, "Incorrect version of curses library. Try 'sudo luarocks install luaposix'");
local top = require "top";
function main()
local stdscr = curses.stdscr() -- it's a userdatum
--stds... | mit |
ChristopherBiscardi/kong | kong/tools/ngx_stub.lua | 8 | 1369 | -- Stub _G.ngx for unit testing Kong's modules and using them in the CLI, such as the DAO.
local reg = require "rex_pcre"
_G.ngx = {
req = {},
ctx = {},
header = {},
exit = function() end,
say = function() end,
log = function() end,
socket = { tcp = {} },
now = function() return os.time() end,
time ... | mit |
kracwarlock/dp | view/dataview.lua | 5 | 15094 | -----------------------------------------------------------------------
--[[ DataView ]]--
-- Allows for efficiently communicating tensors between Models.
-- Exists at the output of a Model or a DataSource
------------------------------------------------------------------------
local DataView, parent = torch.class("dp... | bsd-3-clause |
dicebox/minetest-france | mods/minetest-3d_armor/3d_armor/admin.lua | 2 | 1478 | minetest.register_alias("adminboots","3d_armor:boots_admin")
minetest.register_alias("adminhelmet","3d_armor:helmet_admin")
minetest.register_alias("adminchestplate","3d_armor:chestplate_admin")
minetest.register_alias("adminleggings","3d_armor:leggings_admin")
minetest.register_tool("3d_armor:helmet_admin", {
descri... | gpl-3.0 |
viluon/CCJam-2016 | wait_for_players.lua | 1 | 13050 |
-- Gravity Girl, a Gravity Guy clone by @viluon
local arguments = ( { ... } )[ 1 ]
local GAME_CHANNEL = arguments.GAME_CHANNEL
local ENABLE_LOGGING = arguments.ENABLE_LOGGING
local PARTICLE_SPACING_VERTICAL = 9
local PARTICLE_SPACING_HORIZONTAL = 5.9
local LOADING_HINT_SHOW_TIME = 8
local GAME_INFO_REQUEST_INTERVAL ... | gpl-3.0 |
tianxiawuzhei/cocos-quick-lua | quick/bin/win32/lua/jit/p.lua | 40 | 9092 | ----------------------------------------------------------------------------
-- LuaJIT profiler.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-- This modul... | mit |
bigdogmat/wire | lua/entities/gmod_wire_egp/lib/objects/text.lua | 10 | 3692 | -- Author: Divran
local Obj = EGP:NewObject( "Text" )
Obj.h = nil
Obj.w = nil
Obj.text = ""
Obj.fontid = 1
Obj.size = 18
Obj.valign = 0
Obj.halign = 0
Obj.angle = 0
local surface_SetTextPos
local surface_DrawText
local surface_SetTextColor
local surface_CreateFont
local surface_SetFont
local surface_GetTextSize
local ... | apache-2.0 |
jintiao/some-mmorpg | server/service/agent.lua | 4 | 4924 | local skynet = require "skynet"
local queue = require "skynet.queue"
local sharemap = require "sharemap"
local socket = require "socket"
local syslog = require "syslog"
local protoloader = require "protoloader"
local character_handler = require "agent.character_handler"
local map_handler = require "agent.map_handler"
... | mit |
bocaaust/BellBoy | App/BellBoy Console/Libs/RuntimeResources.bundle/tween.lua | 6 | 17270 | -- tween.lua
-- v1.0.1 (2012-02)
-- Based on:
-- Enrique García Cota - enrique.garcia.cota [AT] gmail [DOT] com
-- tweening functions for lua
-- inspired by jquery's animate function
-- Modified for Codea by John Millard 2013-02
-----------------------------------------------------------------------------------------... | apache-2.0 |
silverhammermba/awesome | tests/test-resize.lua | 2 | 12440 | local test_client = require("_client")
local placement = require("awful.placement")
local amouse = require("awful.mouse")
local steps = {}
table.insert(steps, function(count)
if count == 1 then -- Setup.
test_client("foobar", "foobar")
elseif #client.get() > 0 then
client.get()[1] : geometry... | gpl-2.0 |
dmekersa/Gamecodeur | Atelier Redemption of Sam/Step1/main.lua | 1 | 1602 | io.stdout:setvbuf('no')
if arg[#arg] == "-debug" then require("mobdebug").start() end
local spriteManager = require("spritemanager")
-- Globales utiles
local largeurEcran
local hauteurEcran
-- Constantes
local LARGEURTILE = 64
local HAUTEURTILE = 64
-- Le donjon
local donjon = require("donjon")
local samSprite = {... | cc0-1.0 |
grimreaper/ValyriaTear | img/sprites/map/npcs/npc_girl01_idle.lua | 2 | 1058 | -- Sprite animation file descriptor
-- This file will describe the frames used to load the sprite animations
-- This files is following a special format compared to other animation scripts.
local ANIM_SOUTH = hoa_map.MapMode.ANIM_SOUTH;
local ANIM_NORTH = hoa_map.MapMode.ANIM_NORTH;
local ANIM_WEST = hoa_map.MapMode.... | gpl-2.0 |
bizkut/BudakJahat | Rotations/Shaman/Restoration/Blank.lua | 1 | 8766 | local rotationName = "None" -- Change to name of profile listed in options drop down
---------------
--- Toggles ---
---------------
local function createToggles() -- Define custom toggles
-- Rotation Button
RotationModes = {
[1] = { mode = "Auto", value = 1 , overlay = "Automatic Rotation", tip = "Swaps b... | gpl-3.0 |
ld-test/oil | lua/oil/corba/giop.lua | 6 | 14823 | --------------------------------------------------------------------------------
------------------------------ ##### ## ------------------------------
------------------------------ ## ## # ## ------------------------------
------------------------------ ## ## ## ## ---------------------------... | mit |
ChristopherBiscardi/kong | kong/api/routes/kong.lua | 13 | 1053 | local constants = require "kong.constants"
local route_helpers = require "kong.api.route_helpers"
return {
["/"] = {
GET = function(self, dao, helpers)
local db_plugins, err = dao.plugins_configurations:find_distinct()
if err then
return helpers.responses.send_HTTP_INTERNAL_SERVER_ERROR(err)
... | mit |
robert00s/koreader | frontend/document/djvudocument.lua | 2 | 4348 | local KoptOptions = require("ui/data/koptoptions")
local Document = require("document/document")
local DrawContext = require("ffi/drawcontext")
local DjvuDocument = Document:new{
_document = false,
-- libdjvulibre manages its own additional cache, default value is hard written in c module.
is_djvu = true,
... | agpl-3.0 |
dicebox/minetest-france | mods/locks/shared_locked_furnace.lua | 2 | 14588 |
-- this is a (slightly!) modified copy of minetest_game/mods/default/nodes.lua,
-- containing only the furnace and adopted slightly for my locks mod
-- 09.01.13 Added support for pipeworks.
locks.furnace_add = {};
locks.furnace_add.tiles_normal = {"default_furnace_top.png", "default_furnace_bottom.png", "... | gpl-3.0 |
bigdogmat/wire | lua/entities/gmod_wire_egp/lib/objects/wedge.lua | 12 | 1549 | -- Author: Divran
local Obj = EGP:NewObject( "Wedge" )
Obj.angle = 0
Obj.size = 45
Obj.fidelity = 180
local rad, cos, sin = math.rad, math.cos, math.sin
Obj.Draw = function( self )
if (self.a>0 and self.w > 0 and self.h > 0 and self.size != 360) then
local vertices = {}
vertices[1] = { x = self.x, y = self.y, u =... | apache-2.0 |
overt/openpref-fork | qt-support.lua | 1 | 16971 | --
-- qt-support.lua
-- Support for Qt Framework for Premake
-- Copyright (c) 2011 Konstantin Tokarev
--
-- Known limitations:
-- don't support static Qt builds yet
-- only gmake
-- no Windows support yet
-- QTDIR is hardcoded into Makefile
-- no dependencies for ui-generated headers (they shou... | gpl-3.0 |
dicebox/minetest-france | mods/areas/api.lua | 4 | 4242 | local hudHandlers = {}
--- Adds a function as a HUD handler, it will be able to add items to the Areas HUD element.
function areas:registerHudHandler(handler)
table.insert(hudHandlers, handler)
end
function areas:getExternalHudEntries(pos)
local areas = {}
for _, func in pairs(hudHandlers) do
func(pos, areas)
... | gpl-3.0 |
abbasgh12345/abbas | plugins/helo.bye.lua | 39 | 3527 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
mqmaker/witi-openwrt | package/ramips/ui/luci-mtk/src/applications/luci-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua | 76 | 3395 | --[[
Luci diag - Diagnostics controller module
(c) 2009 Daniel Dickinson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
module("luci.cont... | gpl-2.0 |
bocaaust/BellBoy | App/BellBoy Console/Libs/RuntimeResources.bundle/ftp.lua | 6 | 9229 | -----------------------------------------------------------------------------
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- D... | apache-2.0 |
philanc/plc | plc/chacha20.lua | 1 | 6973 | -- Copyright (c) 2018 Phil Leblanc -- see LICENSE file
------------------------------------------------------------
--[[
Chacha20 stream encryption
Pure Lua implementation of the chacha20 algorithm
This implements the IETF variant of chacha20 encryption
as defined in RFC 7539 (12-byte nonce) and the xchacha20
va... | mit |
dicebox/minetest-france | mods/minetest_hbhunger/hunger.lua | 3 | 18030 | -- Keep these for backwards compatibility
function hbhunger.save_hunger(player)
hbhunger.set_hunger_raw(player)
end
function hbhunger.load_hunger(player)
hbhunger.get_hunger_raw(player)
end
-- wrapper for minetest.item_eat (this way we make sure other mods can't break this one)
local org_eat = core.do_item_eat
core.... | gpl-3.0 |
alirezanile/Nilebot | plugins/anti_fosh.lua | 49 | 1591 | local function run(msg, matches)
if is_owner(msg) then
return
end
local data = load_data(_config.moderation.data)
if data[tostring(msg.to.id)] then
if data[tostring(msg.to.id)]['settings'] then
if data[tostring(msg.to.id)]['settings']['antifosh'] then
lock_fos... | gpl-2.0 |
siktirmirza/seed | plugins/welcome.lua | 2 | 3549 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
MonkeyFirst/DisabledBoneSlerpWithShadowedAnimation | bin/Data/LuaScripts/04_StaticScene.lua | 3 | 6767 | -- Static 3D scene example.
-- This sample demonstrates:
-- - Creating a 3D scene with static content
-- - Displaying the scene using the Renderer subsystem
-- - Handling keyboard and mouse input to move a freelook camera
require "LuaScripts/Utilities/Sample"
function Start()
-- Execute the common sta... | mit |
mqmaker/witi-openwrt | package/ramips/ui/luci-mtk/src/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua | 80 | 10048 | --[[
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
ht... | gpl-2.0 |
philanc/plc | plc/aead_chacha_poly.lua | 2 | 2875 | -- Copyright (c) 2015 Phil Leblanc -- see LICENSE file
------------------------------------------------------------
--[[
aead_chacha_poly
Authenticated Encryption with Associated Data (AEAD) [1], based
on Chacha20 stream encryption and Poly1305 MAC, as defined
in RFC 7539 [2].
[1] https://en.wikipedia.org/wiki/Aut... | mit |
feiltom/domoticz | scripts/lua/script_time_chauffage.lua | 1 | 12110 | --[[
Type: time
Name: chauffage
Description: Ce script permet de maintenir une température de confort,
suivant la détection de notre présence (dans une plage horaire donnée),
puis de progressivement abaisser la température en notre abscence.
Usage: un interrupteu... | gpl-3.0 |
dmekersa/Gamecodeur | Atelier Redemption of Sam/Step10/spritemanager.lua | 7 | 1667 | local spriteManager = {}
spriteManager.liste_sprites = {}
spriteManager.Reset = function()
spriteManager.liste_sprites = {}
end
spriteManager.CreeSprite = function(pNomImage, pNbImages, pX, pY)
local sprite = {}
sprite.x = pX
sprite.y = pY
sprite.frame = 1
sprite.vx = 0
sprite.vy = 0
sprite.flip =... | cc0-1.0 |
bizkut/BudakJahat | Libs/LibRangeCheck-2.0/LibStub-1.0/LibStub.lua | 92 | 2200 | -- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LI... | gpl-3.0 |
tianxiawuzhei/cocos-quick-lua | libs/quick/framework/ui.lua | 20 | 8495 | --[[
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 |
bigdogmat/wire | lua/entities/gmod_wire_screen.lua | 5 | 5990 | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Screen"
ENT.WireDebugName = "Screen"
ENT.Editable = true
function ENT:SetupDataTables()
self:NetworkVar("Bool", 0, "SingleValue", { KeyName = "SingleValue",
Edit = { type = "Boolean", title = "#Tool_wire_screen_singlevalue", order = 1... | apache-2.0 |
tianxiawuzhei/cocos-quick-lua | libs/libzq/draw/shader_mask_sprite_fsh.lua | 1 | 1982 | kShaderMaskSpriteFsh = [[
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
// 是否考虑遮罩的alpha值
uniform int u_mask_alpha;
// 纹理的原点在左上角,往右、往下增长
// this包围框相对于node坐标,node长宽假设都是1
uniform vec2 u_mask_this_tl; // 左上角
uniform vec2 u_mask_this_br; // 右下角
// node真实纹理坐标
un... | mit |
GarfieldJiang/UGFWithToLua | Assets/ToLua/ToLua/Lua/UnityEngine/Color.lua | 8 | 5782 | --------------------------------------------------------------------------------
-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com
-- All rights reserved.
-- Use, modification and distribution are subject to the "MIT License"
-----------------------------------------------------------------... | mit |
dicebox/minetest-france | mods/mapfix/init.lua | 5 | 1363 | local function mapfix(minp, maxp)
local vm = minetest.get_voxel_manip(minp, maxp)
vm:update_liquids()
vm:write_to_map()
vm:update_map()
end
local previous = os.time()
local default_size = tonumber(minetest.setting_get("mapfix_default_size")) or 40
local max_size = tonumber(minetest.setting_get("mapfix_max_size"))... | gpl-3.0 |
arventwei/WioEngine | Tools/jamplus/bin/scripts/JamToWorkspace.lua | 1 | 32843 | -------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------
OS = os.getenv("OS")
OSPLAT = os.getenv("OSPLAT")
JAM_EXECUTABLE = os.getenv("JAM_EXECUTABLE")
if not OS or not OSPLAT or not JAM_EXECUTABLE then
print(... | mit |
maciejmiklas/NodeMCUUtils | src/test/unit/test_date_format_europe.lua | 3 | 3327 | require "date_format_europe";
local testCnt = 0;
local function parseDate(expDate)
local _, _, expYearStr, expMonthStr, expDayStr, expHourStr, expMinStr, expSecStr =
string.find(expDate, "(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)")
local expYear, expMonth, expDay = tonumber(expYearStr), tonumber(expMonthStr), to... | apache-2.0 |
mqmaker/witi-openwrt | package/ramips/ui/luci-mtk/src/applications/luci-commands/luasrc/model/cbi/commands.lua | 77 | 1141 | --[[
LuCI - Lua Configuration Interface
Copyright 2012 Jo-Philipp Wich <jow@openwrt.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
]]--
local m,... | gpl-2.0 |
cshore/luci | applications/luci-app-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo.lua | 132 | 1057 | --[[
netdiscover_devinfo - SIP Device Information
(c) 2009 Daniel Dickinson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
require("luci.i1... | apache-2.0 |
cshore/luci | applications/luci-app-radvd/luasrc/model/cbi/radvd/dnssl.lua | 61 | 2025 | -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local sid = arg[1]
local utl = require "luci.util"
m = Map("radvd", translatef("Radvd - DNSSL"),
translate("Radvd is a router advertisement daemon for IPv6. " ..
"It listens to router solicitations and sends... | apache-2.0 |
ChristopherBiscardi/kong | spec/integration/dao/cassandra/base_dao_spec.lua | 6 | 24289 | local spec_helper = require "spec.spec_helpers"
local cassandra = require "cassandra"
local constants = require "kong.constants"
local DaoError = require "kong.dao.error"
local utils = require "kong.tools.utils"
local cjson = require "cjson"
local uuid = require "uuid"
-- Raw session for double-check purposes
local se... | mit |
iceman1001/proxmark3 | client/lualibs/read14a.lua | 1 | 4445 | --[[
This is a library to read 14443a tags. It can be used something like this
local reader = require('read14a')
result, err = reader.read14443a()
if not result then
print(err)
return
end
print(result.name)
--]]
-- Loads the commands-library
local cmds = require('commands')
local TIMEOUT = 2000 -- Shouldn't... | gpl-2.0 |
Olivine-Labs/luassert | src/mock.lua | 2 | 1611 | -- module will return a mock module table, and will not register any assertions
local spy = require 'luassert.spy'
local stub = require 'luassert.stub'
local function mock_apply(object, action)
if type(object) ~= "table" then return end
if spy.is_spy(object) then
return object[action](object)
end
for k,v i... | mit |
cpascal/skynet | lualib/socketchannel.lua | 31 | 9447 | local skynet = require "skynet"
local socket = require "socket"
local socketdriver = require "socketdriver"
-- channel support auto reconnect , and capture socket error in request/response transaction
-- { host = "", port = , auth = function(so) , response = function(so) session, data }
local socket_channel = {}
loca... | mit |
arventwei/WioEngine | Tools/jamplus/src/luaplus/Src/Modules/socket/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... | mit |
wrxck/mattata | helpers/transcribe.lua | 2 | 4403 | package.path = '/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;../?.lua;./?/init.lua'
local redis = require('libs.redis')
local configuration = require('configuration')
local api = require('telegram-bot-lua.core').configure(configuration... | mit |
tianxiawuzhei/cocos-quick-lua | quick/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua | 40 | 1137 | -- This is the DeprecatedCocosBuilderClass
DeprecatedCocosBuilderClass = {} or DeprecatedCocosBuilderClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--CCBReader class will be Deprecated,begin
f... | mit |
Vivitarut/darkstar | scripts/zones/Castle_Zvahl_Baileys/TextIDs.lua | 3 | 1092 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6537; -- You cannot obtain the item <item>. come back after sorting your inventory.
ITEM_OBTAINED = 6540; -- Obtained: <item>.
GIL_OBTAINED = 6541; -- Obtained <number> gil.
KEYITEM_OBTAINED = 6543; -- Obtained... | gpl-3.0 |
Gwynthell/FFDB | scripts/zones/Lower_Jeuno/npcs/Navisse.lua | 4 | 4707 | -----------------------------------
-- Area: Lower Jeuno
-- NPC: Navisse
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
require("scripts/zones/Lower_Jeuno/TextIDs");
require("scripts/globals/pathfind");
local path = {
-- -59.562683, 6.000051, -90.89... | gpl-3.0 |
Joeyjohjjo/Johjjodarkfork | scripts/globals/items/flask_of_holy_water.lua | 23 | 1801 | -----------------------------------------
-- ID: 4154
-- Item: Flask of Holy Water
-- Item Effect: Removes curse
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)... | gpl-3.0 |
Bubbus/ACF-Missiles | lua/acf/shared/missiles/pod.lua | 1 | 12121 | --define the class
ACF_DefineRackClass("POD", {
spread = 0.5,
name = "Rocket Pod",
desc = "An accurate, lightweight rocket launcher which can explode if its armour is pierced.",
muzzleflash = "40mm_muzzleflash_noscale",
rofmod = 2,
sound = "acf_extra/airfx/roc... | mit |
Vivitarut/darkstar | scripts/zones/Bibiki_Bay/npcs/Tswe_Panipahr.lua | 19 | 1862 | -----------------------------------
-- Area: Bibiki Bay
-- NPC: Tswe Panipahr
-- Type: Manaclipper
-- @pos 484.604 -4.035 729.671 4
-----------------------------------
package.loaded["scripts/zones/Bibiki_Bay/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Bibiki_Bay/TextIDs");
require... | gpl-3.0 |
dnet/proxmark3 | client/scripts/emul2dump.lua | 19 | 1497 | local getopt = require('getopt')
local bin = require('bin')
local dumplib = require('html_dumplib')
example =[[
1. script run emul2dump
2. script run emul2dump -i myfile.eml
3. script run emul2dump -i myfile.eml -o myfile.bin
]]
author = "Iceman"
usage = "script run emul2dump [-i <file>] [-o <file>]"
des... | gpl-2.0 |
Gwynthell/FFDB | scripts/zones/Batallia_Downs_[S]/npcs/Cavernous_Maw.lua | 4 | 1274 | -----------------------------------
-- Cavernous Maw
-- Teleports Players to Batallia Downs
-- @pos -48 0 435 84
-----------------------------------
package.loaded["scripts/zones/Batallia_Downs_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/teleports");
require("scripts/globals/campa... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.