repo_name stringlengths 6 78 | path stringlengths 4 206 | copies stringclasses 281
values | size stringlengths 4 7 | content stringlengths 625 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_hudindicator/init.lua | 1 | 10397 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "HUD Indicator"
function ENT:Initialize()
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
self.A = 0
self.AR = 0
se... | gpl-3.0 |
nathdwek/projetBa2 | oOLua/oO1.lua | 1 | 1712 | --**l'orienté objet en lua, exemples 1**
--En lua, toute représentation d'une valeur trop complexe pour se ramener à un des 4+1 types primitifs nil (absence de donnée), string, number, boolean + function se fait par l'usage de tables:
a1={bank="UPS", country="Suisse", balance="1000"}
print(a1.bank)
-- >>UPS
--Il est ... | gpl-3.0 |
jiangzhw/QSanguosha | lang/zh_CN/Audio/StandardWuLines.lua | 6 | 3047 |
return {
-- 孙权
["$zhiheng1"] = "容我三思。",
["$zhiheng2"] = "且慢。",
["$jiuyuan1"] = "有汝辅佐,甚好!",
["$jiuyuan2"] = "好舒服啊。",
["~sunquan"] = "父亲,大哥,仲谋愧矣……",
-- 甘宁
["$qixi1"] = "接招吧!",
["$qixi2"] = "你的牌太多了!",
["~ganning"] = "二十年后,又是一条好汉!",
-- 吕蒙
["$keji1"] = "不是不报,时候未到!",
["$keji2"] = "留得青山在,不怕没柴烧!",
["~lvmeng"... | gpl-3.0 |
comedinha/New-Poke-Lite | data/spells/scripts/custom/apocalypse.lua | 17 | 1215 | local combat = createCombatObject()
local area = createCombatArea({
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
... | gpl-2.0 |
NiLSPACE/PreciousBlocks | hooks.lua | 1 | 2398 |
function InitHooks()
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_BREAKING_BLOCK, OnPlayerBreakingBlock)
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_PLACING_BLOCK, OnPlayerPlacingBlock)
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_RIGHT_CLICK, OnPlayerRightClick);
cPluginManager:AddHook(cPlugin... | unlicense |
kkamdooong/hammerspoon | extensions/_coresetup/init.lua | 3 | 18996 | --- === hs ===
---
--- Core Hammerspoon functionality
return {setup=function(...)
local modpath, prettypath, fullpath, configdir, docstringspath, hasinitfile, autoload_extensions = ...
local tostring,pack,tconcat,sformat=tostring,table.pack,table.concat,string.format
local crashLog = require("hs.crash").crashLog... | mit |
bestroidd/advan | plugins/me2.lua | 15 | 11247 | local function checktodaygr(cb_extra, success, result)
local hash = ''
local thash=''
for k,user in pairs(result.members) do
thash = 'today:'..user.peer_id
if redis:get(thash) then
if redis:get(thash) < os.date("%x",os.time() + 16200) then
hash = 'utmsgst:'..user.peer_id..':'..cb_extra
redis:set(hash,0)
... | gpl-2.0 |
dani-sj/evilbot | plugins/sticker.lua | 1 | 15957 | -- data saved to data/moderation.json
do
local function export_chat_link_cb(extra, success, result)
local msg = extra.msg
local data = extra.data
if success == 0 then
return send_large_msg(get_receiver(msg), 'Cannot generate invite link for this group.\nMake sure you are an admin or a sudoer.')
... | gpl-2.0 |
lsmoura/dtb | inc/AceAddon-3.0/AceAddon-3.0.lua | 1 | 25877 | --- **AceAddon-3.0** provides a template for creating addon objects.
-- It'll provide you with a set of callback functions that allow you to simplify the loading
-- process of your addon.\\
-- Callbacks provided are:\\
-- * **OnInitialize**, which is called directly after the addon is fully loaded.
-- * **OnEnable... | unlicense |
futesobriquet/Tower_D_beta | Tower_Beta/lib/anim8/spec/anim8/grid_spec.lua | 6 | 4839 | require 'spec.love-mocks'
local anim8 = require 'anim8'
local newQuad = love.graphics.newQuad
local newGrid = anim8.newGrid
describe("anim8", function()
describe("newGrid", function()
it("throws error if any of its parameters is not a positive integer", function()
assert.error(function() newGrid() e... | apache-2.0 |
fegimanam/pm | plugins/boobs.lua | 24 | 1601 | do
-- Recursive function
local function getRandomButts(attempt)
attempt = attempt or 0
attempt = attempt + 1
local res,status = http.request("http://api.obutts.ru/noise/1")
if status ~= 200 then return nil end
local data = json:decode(res)[1]
-- The OpenBoobs API sometimes returns an empty array
if no... | gpl-2.0 |
hfjgjfg/ccc111 | plugins/all.lua | 264 | 4202 | 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 |
resistor58/deaths-gmod-server | wire/lua/effects/thruster_ring_grow/init.lua | 1 | 1781 |
EFFECT.Mat = Material( "effects/select_ring" )
/*---------------------------------------------------------
Initializes the effect. The data is a table of data
which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
local size = 16
... | gpl-3.0 |
mahdikord/mahdi4 | plugins/inpm.lua | 1114 | 3008 | do
local function pairsByKeys (t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
resistor58/deaths-gmod-server | Mad Cows Weapons/lua/weapons/weapon_mad_engineer/shared.lua | 1 | 4290 | // Variables that are used on both client and server
SWEP.Base = "weapon_mad_base"
SWEP.ViewModel = "models/weapons/v_physcannon.mdl"
SWEP.WorldModel = "models/weapons/w_physics.mdl"
SWEP.Spawnable = true
SWEP.AdminSpawnable = false
SWEP.Primary.Sound = Sound("Weapon_MegaPhysCannon.HoldSound"... | gpl-3.0 |
sanger-pathogens/companion | bin/pfam_to_gff3.lua | 4 | 3175 | #!/usr/bin/env gt
--[[
Author: Sascha Steinbiss <ss34@sanger.ac.uk>
Copyright (c) 2015 Genome Research Ltd
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all co... | isc |
cyrillePrigent/kmod-ng | umod/modules/admins.lua | 1 | 5442 | -- Admin management.
-- From kmod script.
-- Global var
admin = {
-- Admin list
-- key => admin guid
-- value => admin name
["name"] = {},
-- Admin levels
-- key => admin level (0 to maxAdminLevel cvar value)
-- value => table with : key = guid and value = true / false
["level"... | gpl-2.0 |
LuaDist2/lua-capnproto | lua/test.lua | 4 | 1990 | --local test_capnp = require "handwritten_capnp"
--package.path = "lua/?.lua;proto/?.lua;" .. package.path
local data_generator = require "data_generator"
local example_capnp = require "example_capnp"
local handwritten_capnp = require "handwritten_capnp"
-- local log_capnp = require "log_capnp"
local capnp = require "... | bsd-2-clause |
team-smart/smart_team | plugins/inpm.lua | 1 | 9657 | --[[
🔱➖➖➖➖➖➖➖➖➖➖➖➖➖➖🔱
#:[[
#For info file
#Developer :
#JOker < @lua_3 >
#JoZef < @jozef3 >
#our channel: @Smart_Team
#File type : (info)
🔱➖➖➖➖➖➖➖➖➖➖➖➖➖➖🔱
—]]
local function pre_process(msg)
local to = msg.to.type
local service = msg.service
if to == 'user' and msg.fwd_from then
if not is_support(msg.from.id)... | gpl-2.0 |
DEVN0VAR/N0VAR-V2 | plugins/mymsg.lua | 1 | 10556 | 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):gsub... | gpl-2.0 |
adonaac/yaoui | yaoui/UI/popo/Text.lua | 9 | 21777 | local text_path = (...):match('(.-)[^%.]+$') .. '.'
local Text = {}
Text.__index = Text
require(text_path .. 'utf8-l')
local tableContains = function(t, value) for k, v in pairs(t) do if v == value then return true end end end
local stringToAny = function(str) return loadstring("return " .. str)() end
function Text.n... | mit |
rickyHong/dptorchLib | feedback/facialkeypointfeedback.lua | 2 | 4224 | ------------------------------------------------------------------------
--[[ FacialKeypointFeedback ]]--
-- Feedback
-- Measures error with respect to targets and optionaly compares this to
-- constant (mean) value baseline
------------------------------------------------------------------------
local FacialKeypointF... | bsd-3-clause |
lujingwei002/erhzb | server/3rd/tolua++/lua/feature.lua | 1 | 2583 | -- tolua: abstract feature class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide maintenance, support, updates,
-- enh... | apache-2.0 |
zeta0134/LuaGB | gameboy/z80/bitwise.lua | 1 | 2946 | local bit32 = require("bit")
local lshift = bit32.lshift
local band = bit32.band
local band = bit32.band
local bxor = bit32.bxor
local bor = bit32.bor
local bnor = bit32.bnor
function apply(opcodes, opcode_cycles, z80, memory)
local read_at_hl = z80.read_at_hl
local set_at_hl = z80.set_at_hl
local read_nn = z80... | bsd-3-clause |
milos-korenciak/heroku-buildpack-tex | buildpack/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua | 1 | 5008 | -- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd... | mit |
tkdrob/Battle-Tag | Data/Script/Lua/Classes/UTGame.Ui.Connected.lua | 1 | 9633 |
--[[--------------------------------------------------------------------------
--
-- File: UTGame.Ui.Connected.lua
-- Copyright (c) Ubisoft Entertainment. All rights reserved.
--
-- Project: Ubitoys.Tag
-- Date: September 2, 2010
--
------------------------------... | mit |
chewi/Aquaria | files/scripts/maps/node_pushleft.lua | 6 | 1045 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
chewi/Aquaria | files/scripts/entities/cavefishcommon.lua | 6 | 4074 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
tkdrob/Battle-Tag | Packages/Introduction/Data/Script/Lua/UAIntroduction.Ui.Seq_Stage4.lua | 1 | 4353 |
--[[--------------------------------------------------------------------------
--
-- File: UAIntroduction.Ui.Seq_Stage4.lua
-- Copyright (c) Ubisoft Entertainment. All rights reserved.
--
-- Project: Ubitoys.Tag
-- Date: September 20, 2010
--
--------------------... | mit |
chewi/Aquaria | files/scripts/entities/roundvirus-bg.lua | 6 | 2965 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
lujingwei002/erhzb | server/3rd/tolua++/lua/verbatim.lua | 44 | 1667 | -- tolua: verbatim class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: verbatim.lua,v 1.3 2000/01/24 20:41:16 celes Exp $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to prov... | apache-2.0 |
milos-korenciak/heroku-buildpack-tex | buildpack/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua | 3 | 5718 | -- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd... | mit |
TeleGram-Real/RealBot | libs/fakeredis.lua | 650 | 40405 | local unpack = table.unpack or unpack
--- Bit operations
local ok,bit
if _VERSION == "Lua 5.3" then
bit = (load [[ return {
band = function(x, y) return x & y end,
bor = function(x, y) return x | y end,
bxor = function(x, y) return x ~ y end,
bnot = function(x) return ~x end,
rshift = function(x... | gpl-2.0 |
oralius/antiv6 | plugins/autolock.lua | 1 | 10439 | local function TLG(msg, matches)
if matches[1]:lower() == 'lock auto' or matches[1] == 'قفل هوشمند' and is_mod(msg) then
redis:setex("atolc"..msg.chat_id_..msg.sender_user_id_,45,true)
if redis:get("atolct1"..msg.chat_id_) and redis:get("atolct2"..msg.chat_id_) then
tdcli.sendMessage(msg.chat_id_, msg.id_, 1, '*زمان ب... | gpl-3.0 |
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_egp/lib/objects/textlayout.lua | 1 | 3121 | -- Author: Divran
local Obj = EGP:NewObject( "TextLayout" )
Obj.h = 512
Obj.w = 512
Obj.text = ""
Obj.fontid = 1
Obj.size = 18
Obj.valign = 0
Obj.halign = 0
Obj.Draw = function( self )
if (self.text and #self.text>0) then
surface.SetTextColor( self.r, self.g, self.b, self.a )
if (!EGP.ValidFonts[se... | gpl-3.0 |
mrgloom/eyescream | cifar/datasets/coarse_to_fine_cifar10.lua | 3 | 2911 | require 'torch'
require 'paths'
require 'image'
image_utils = require 'utils.image'
cifar = {}
cifar.path_dataset = 'cifar-10-batches-t7/'
cifar.coarseSize = 16
cifar.fineSize = 32
function cifar.init(fineSize, coarseSize)
cifar.fineSize = fineSize
cifar.coarseSize = coarseSize
end
function cifar.loadTrainSet(... | bsd-3-clause |
eagle14/kia14 | plugins/wiki.lua | 735 | 4364 | -- http://git.io/vUA4M
local socket = require "socket"
local JSON = require "cjson"
local wikiusage = {
"!wiki [text]: Read extract from default Wikipedia (EN)",
"!wiki(lang) [text]: Read extract from 'lang' Wikipedia. Example: !wikies hola",
"!wiki search [text]: Search articles on default Wikipedia (EN)",
"!... | gpl-2.0 |
resistor58/deaths-gmod-server | NPC_Control2/lua/custom_spawnlist.lua | 1 | 1359 | //How to use:
//Using the functions described below, you can add NPCs and Actors to the spawnlists (also, weapons)
//Function: npc_AddSpawn( Name, Class )
//Adds an npc class to the NPC spawnlist
//Function: npc_AddNPC( Class, KeyValues )
//OPTIONAL: Used to set custom data for NPCs that spawn with that class ... | gpl-3.0 |
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_socket/init.lua | 1 | 8804 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "Socket"
------------------------------------------------------------
-- Helper functions & variables
------------------------------------------------------------
local NEW_PLUG_WAIT_TIME = 2
local LETTE... | gpl-3.0 |
team-smart/smart_team | plugins/writer.lua | 1 | 15670 | --[[
🔱➖➖➖➖➖➖➖➖➖➖➖➖➖➖🔱
#:[[
#For info file
#Developer :
#JOker < @lua_3 >
#JoZef < @jozef3 >
#our channel: @Smart_Team
#File type : (زخرفه النصوص)
🔱➖➖➖➖➖➖➖➖➖➖➖➖➖➖🔱
—]]
local function run(msg, matches)
if #matches < 2 then
return "اكتب الامر /write ثم ضع فاصلة واكتب الجملة وستظهر لك نتائج الزخرفة " end
if stri... | gpl-2.0 |
danielmiw/marshal_123 | files/dkjson.lua | 63 | 26559 | -- 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-3.0 |
abbasgh12345/abbasah | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
ruvolof/telegram-bot | plugins/weather.lua | 274 | 1531 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
location = string.gsub(location," ","+")
local url = BASE_URL
url = url..'?q='..location
url = url..'&units=metric'
url = url..'&appid=bd82977b86bf27fb59a04b61b6... | gpl-2.0 |
theonlywild/erfan | plugins/ingroup.lua | 527 | 44020 | 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.id
if member_id ~= our_id then
-- Group configuration
data[tostr... | gpl-2.0 |
eagle14/kia14 | plugins/groupmanager.lua | 136 | 11323 | -- data saved to moderation.json
-- check moderation plugin
do
local function create_group(msg)
-- superuser and admins only (because sudo are always has privilege)
if not is_admin(msg) then
return "You're not admin!"
end
local group_creator = msg.from.print_name
create_group_chat (group_cr... | gpl-2.0 |
Fir3element/tfs11 | data/npc/lib/npcsystem/modules.lua | 9 | 39048 | -- Advanced NPC System by Jiddo
if Modules == nil then
-- default words for greeting and ungreeting the npc. Should be a table containing all such words.
FOCUS_GREETWORDS = {"hi", "hello"}
FOCUS_FAREWELLWORDS = {"bye", "farewell"}
-- The words for requesting trade window.
SHOP_TRADEREQUEST = {"trade"}
-- The w... | gpl-2.0 |
zhaoxx063/luci | applications/luci-app-pbx/luasrc/model/cbi/pbx-users.lua | 146 | 5623 | --[[
Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com>
This file is part of luci-pbx.
luci-pbx is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
... | apache-2.0 |
chewi/Aquaria | files/scripts/maps/node_killentity.lua | 6 | 1106 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
borromeotlhs/nodemcu-httpserver | http/garage_door_opener.lua | 1 | 1228 | -- garage_door_opener.lua
-- Part of nodemcu-httpserver, example.
-- Author: Marcos Kirsch
local function pushTheButton(connection, pin)
-- push the button!
-- Note that the relays connected to the garage door opener are wired
-- to close when the GPIO pin is low. This way they don't activate when
... | gpl-2.0 |
adonaac/yaoui | yaoui/UI/input/Input.lua | 2 | 6995 | local input_path = (...):match('(.-)[^%.]+$') .. '.'
local Input = {}
Input.__index = Input
local major, minor, rev = love.getVersion()
local love_version = major .. '.' .. minor .. '.' .. rev
Input.all_keys = {
" ", "return", "escape", "backspace", "tab", "space", "!", "\"", "#", "$", "&", "'", "(", ")", "*", "+... | mit |
Aico/mudlet | src/LuaGlobal.lua | 12 | 61444 |
----------------------------------------------------------------------------------
-- Useful global LUA functions that are accessible from within Mudlet
----------------------------------------------------------------------------------
-- These general functions can be used from anywhere within Mudlet scripts
-- They ... | gpl-2.0 |
kkamdooong/hammerspoon | extensions/logger/init.lua | 4 | 11669 | --- === hs.logger ===
---
--- Simple logger for debugging purposes
---
--- Note: "methods" in this module are actually "static" functions - see `hs.logger.new()`
local date,time = os.date,os.time
local min,max,tmove=math.min,math.max,table.move
local sformat,ssub,slower,srep,sfind=string.format,string.sub,string.lower,... | mit |
TestMaster12/Dynamic | plugins/plugins.lua | 2 | 5861 | 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 |
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_numpad/init.lua | 1 | 2701 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "Numpad"
ENT.OverlayDelay = 0
local keynames = {"0","1","2","3","4","5","6","7","8","9",".","enter","+","-","*","/"}
local lookupkeynames = {}
for k,v in ipairs(keynames) do
lookupkeynames[v] = k-1
lo... | gpl-3.0 |
Fir3element/tfs11 | data/migrations/14.lua | 55 | 1362 | function onUpdateDatabase()
print("> Updating database to version 15 (moving groups to data/XML/groups.xml)")
db.query("ALTER TABLE players DROP FOREIGN KEY players_ibfk_2")
db.query("DROP INDEX group_id ON players")
db.query("ALTER TABLE accounts DROP FOREIGN KEY accounts_ibfk_1")
db.query("DROP INDEX group_id ... | gpl-2.0 |
dunn/ntopng | scripts/lua/examples/debug.lua | 13 | 3427 | --
-- (C) 2013 - ntop.org
--
-- debug lua example
-- Set package.path information to be able to require lua module
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
-- Here you can choose the type of your HTTP message {'text/html','application/j... | gpl-3.0 |
eagle14/kia14 | bot/utils.lua | 356 | 14963 | 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 |
stormraiser/GAN-weight-norm | torch/modules/WeightNormalizedLinear.lua | 1 | 3872 | local WNL, parent = torch.class('nn.WeightNormalizedLinear', 'nn.Module')
function WNL:__init(nInput, nOutput, hasScale, hasBias, initWeightFactor)
parent.__init(self)
if hasScale == nil then
self.hasScale = true
else
self.hasScale = hasScale
end
if hasBias == nil then
self.hasBias = true
else
self.hasBi... | gpl-3.0 |
chewi/Aquaria | files/scripts/maps/node_whalespawnorb.lua | 6 | 1459 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
mamaddeveloper/mmddev | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
tehran980/tele_HSN | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
fegimanam/telegram-bot-supergroups | plugins/vote.lua | 615 | 2128 | do
local _file_votes = './data/votes.lua'
function read_file_votes ()
local f = io.open(_file_votes, "r+")
if f == nil then
print ('Created voting file '.._file_votes)
serialize_to_file({}, _file_votes)
else
print ('Values loaded: '.._file_votes)
f:close()
end
return loadfile (_file_votes)()... | gpl-2.0 |
petrkr/nodemcu-firmware | lua_modules/ds18b20/ds18b20.lua | 18 | 3492 | --------------------------------------------------------------------------------
-- DS18B20 one wire module for NODEMCU
-- NODEMCU TEAM
-- LICENCE: http://opensource.org/licenses/MIT
-- Vowstar <vowstar@nodemcu.com>
-- 2015/02/14 sza2 <sza2trash@gmail.com> Fix for negative values
---------------------------------------... | mit |
chewi/Aquaria | files/scripts/entities/spooter.lua | 6 | 5090 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
resistor58/deaths-gmod-server | Ultimate Vehicle Pack/lua/autorun/VP_Gimmick.lua | 1 | 6789 | -- Vehicle Pack Gimmicks
local Category = "GMow+ Gimmick Vehicles"
local V = {
// Required information
Name = "DMC Delorean",
Class = "prop_vehicle_jeep",
Category = Category,
// Optional information
Author = "Kuno86",
Information = "DMC Delorean",
Model = "models/dolo... | gpl-3.0 |
maxmax1/fooniks | resources/phoenix_ServerTab/combobox_rep.lua | 2 | 8994 | local comboBoxes = { };
local cOpen = false;
function _guiCreateComboBox( x, y, width, height, caption, relative, parent )
local edit = guiCreateEdit( x, y, width, height, caption, relative, parent );
comboBoxes[edit] = { };
comboBoxes[edit].btn = guiCreateStaticImage( x+width-height, y, height, heigh... | gpl-3.0 |
zhaoxx063/luci | libs/luci-lib-nixio/docsrc/CHANGELOG.lua | 68 | 1043 | --- Changes and improvements.
module "nixio.CHANGELOG"
--- Service Release.
-- <ul>
-- <li>Added getifaddrs() function.</li>
-- <li>Added getsockopt(), setsockopt(), getsockname() and getpeername()
-- directly to TLS-socket objects unifying the socket interface.</li>
-- <li>Added support for CyaSSL as cryptographical ... | apache-2.0 |
mamaddeveloper/mmddev | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
tgclonerteam/goodday | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
tehran980/https-github.com-uziins-uzzbot | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
shahabsaf1/tg | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
amirik22/uzzbot | plugins/lyrics.lua | 695 | 2113 | do
local BASE_LNM_URL = 'http://api.lyricsnmusic.com/songs'
local LNM_APIKEY = '1f5ea5cf652d9b2ba5a5118a11dba5'
local BASE_LYRICS_URL = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect'
local function getInfo(query)
print('Getting info of ' .. query)
local url = BASE_LNM_URL..'?api_key='..LNM_APIKEY
... | gpl-2.0 |
Nottinghster/OTServ_SVN-0.6.4 | src/data/npc/scripts/promotion.lua | 2 | 1207 | -- This is an example NPC script that can be used on Jiddo's NPC system
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(c... | gpl-2.0 |
NiLSPACE/PreciousBlocks | storage_sqlite.lua | 1 | 4617 |
-- storage_sqlite.lua
-- Implements the sql storage system.
-- Load all the queries
local g_Queries = {}
local Path = cPluginManager:Get():GetCurrentPlugin():GetLocalFolder() .. "/Queries"
for _, FileName in ipairs(cFile:GetFolderContents(Path)) do
if (FileName:match("%.sql$")) then
g_Queries[FileName:match("... | unlicense |
milos-korenciak/heroku-buildpack-tex | buildpack/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua | 4 | 2193 | --
-- This is file `oberdiek.luatex.lua',
-- generated with the docstrip utility.
--
-- The original source files were:
--
-- luatex.dtx (with options: `lua')
--
-- This (was) a generated file.
--
-- Project: luatex
-- Version: 2013/04/28 v0.4-roux
--
-- Copyright (C) 2007, 2009, 2010, 2013, 2014 by
-... | mit |
zeta0134/LuaGB | gameboy/z80/stack.lua | 1 | 1983 | local bit32 = require("bit")
local band = bit32.band
local lshift = bit32.lshift
local rshift = bit32.rshift
function apply(opcodes, opcode_cycles, z80, memory)
local reg = z80.registers
local read_byte = memory.read_byte
local write_byte = memory.write_byte
-- push BC
opcode_cycles[0xC5] = 16
opcodes[0... | bsd-3-clause |
RobertZenz/minetest-australopithecus-utils | test/list.lua | 2 | 6488 |
-- Load the test file.
dofile("./mods/utils/test.lua")
-- Load the file for testing.
dofile("./mods/utils/list.lua")
dofile("./mods/utils/mathutil.lua")
dofile("./mods/utils/tableutil.lua")
test.start("list")
test.run("add", function()
local list = List:new("a", "b")
list:add("c")
list:add("d", "e", "f")
... | bsd-2-clause |
Billiam/wheeler | src/conf.lua | 1 | 2944 | function love.conf(t)
t.identity = "wheeler" -- The name of the save directory (string)
t.version = "0.9.1" -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.window.title = "Wheeler" -- The w... | mit |
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_lamp/init.lua | 1 | 5163 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "Lamp"
local MODEL = Model( "models/props_wasteland/prison_lamp001c.mdl" )
AccessorFunc( ENT, "Texture", "FlashlightTexture" )
ENT:SetFlashlightTexture( "effects/flashlight001" )
/*-----------------... | gpl-3.0 |
fegimanam/pm | plugins/banhammer.lua | 1085 | 11557 |
local function pre_process(msg)
-- SERVICE MESSAGE
if msg.action and msg.action.type then
local action = msg.action.type
-- Check if banned user joins chat by link
if action == 'chat_add_user_link' then
local user_id = msg.from.id
print('Checking invited user '..user_id)
local banned ... | gpl-2.0 |
chewi/Aquaria | files/scripts/entities/_unused/collectiblebabycrib.lua | 6 | 1319 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
tkdrob/Battle-Tag | Packages/Disarm/Data/Script/ByteCode/UADisarm.ByteCode.lua | 1 | 6204 | byteCode =
{
0x13,
0x53, 0x43, 0x30, 0x35, 0x00, 0x00,
0x53, 0x43, 0x30, 0x33, 0x00, 0x00,
0x41, 0x53, 0x48, 0x54, 0x00, 0x00,
0x53, 0x57, 0x35, 0x36, 0x00, 0x00,
0x53, 0x57, 0x32, 0x32, 0x00, 0x00,
0x53, 0x43, 0x30, 0x31, 0x00, 0x00,
0x53, 0x43, 0x30, 0x38, 0x00, 0x00,
0x53, 0x43, 0x31, 0x31, 0x00, 0x00,
... | mit |
flamewing/sonic-gens-hud | headers/ui-icons.lua | 1 | 1767 | --------------------------------------------------------------------------------
-- This file is part of the Lua HUD for TASing Sega Genesis Sonic games.
--
-- This program 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 ... | lgpl-3.0 |
ruvolof/telegram-bot | plugins/steam.lua | 645 | 2117 | -- See https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI
do
local BASE_URL = 'http://store.steampowered.com/api/appdetails/'
local DESC_LENTH = 200
local function unescape(str)
str = string.gsub( str, '<', '<' )
str = string.gsub( str, '>', '>' )
str = string.gsub( str, '"', '"' )
str... | gpl-2.0 |
OSGConnect/modulefiles | modulefiles/python/3.5.2/parsl.lua | 1 | 1215 | help(
[[
Parsl is a Python-based parallel scripting library that supports development and execution of asynchronous and parallel data-oriented workflows (dataflows) that glue together existing executables (called Apps) and functions. Building upon the Swift parallel scripting language, Parsl brings implicit parallel ex... | apache-2.0 |
chewi/Aquaria | files/scripts/entities/mermoth.lua | 6 | 8316 | -- Copyright (C) 2007, 2010 - Bit-Blot
--
-- This file is part of Aquaria.
--
-- Aquaria is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later vers... | gpl-2.0 |
robertbrook/lib | pl/operator.lua | 37 | 4310 | --- Lua operators available as functions.
--
-- (similar to the Python module of the same name)
--
-- There is a module field `optable` which maps the operator strings
-- onto these functions, e.g. `operator.optable['()']==operator.call`
--
-- Operator strings like '>' and '{}' can be passed to most Penlight functions
... | bsd-3-clause |
jiangzhw/QSanguosha | extension-doc/14-Responsing.lua | 15 | 22422 | --[[
通过前面三个 lua 文件的介绍,相信大家对 AI 的编写已经有了基本的认识。
这一文档将集中介绍与 smart-ai.lua 中第三部分“响应请求”的相关函数和类表。
从这一文档介绍的内容开始,需要为 AI 编写作决策的代码了。
为了让 AI 作出正确的决策,必须给 AI 以足够的信息,其中一个方法就是通过 data 传递数据。
这在 11-Fundamentals.lua 中已经有所提及,下面深入地介绍一下 data 相关的一些内容。
++ data 是什么?
data 是一个 QVariant 对象,这一特殊的类型使得它可以传递任意类型的信息。
可以是一个整数、一张牌,一个使用牌的结构体(CardUseStru... | gpl-3.0 |
TeleGram-Real/RealBot | libs/XMLElement.lua | 569 | 4025 | -- Copyright 2009 Leo Ponomarev. Distributed under the BSD Licence.
-- updated for module-free world of lua 5.3 on April 2 2015
-- Not documented at all, but not interesting enough to warrant documentation anyway.
local setmetatable, pairs, ipairs, type, getmetatable, tostring, error = setmetatable, pairs, ipairs, typ... | gpl-2.0 |
DEVN0VAR/N0VAR-V2 | libs/XMLElement.lua | 569 | 4025 | -- Copyright 2009 Leo Ponomarev. Distributed under the BSD Licence.
-- updated for module-free world of lua 5.3 on April 2 2015
-- Not documented at all, but not interesting enough to warrant documentation anyway.
local setmetatable, pairs, ipairs, type, getmetatable, tostring, error = setmetatable, pairs, ipairs, typ... | gpl-2.0 |
Fir3element/tfs11 | data/migrations/10.lua | 58 | 2306 | function onUpdateDatabase()
print("> Updating database to version 11 (improved guild and players online structure)")
db.query("CREATE TABLE IF NOT EXISTS `guild_membership` (`player_id` int(11) NOT NULL, `guild_id` int(11) NOT NULL, `rank_id` int(11) NOT NULL, `nick` varchar(15) NOT NULL DEFAULT '', PRIMARY KEY (`pla... | gpl-2.0 |
aspiraboo/kappa | vc14/data/actions/scripts/tools/fishing.lua | 30 | 2222 | local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499, 15401, 15402}
local lootTrash = {2234, 2238, 2376, 2509, 2667}
local lootCommon = {2152, 2167, 2168, 2669, 7588, 7589}
local lootRare = {2143, 2146, 2149, 7158, 7159}
local loo... | gpl-2.0 |
milos-korenciak/heroku-buildpack-tex | buildpack/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua | 3 | 10304 | -- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
-- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd... | mit |
Abollfazl2/VGMbot | libs/JSON.lua | 3765 | 34843 | -- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY "Attribution" License:
-- http://creativecommons.org/licenses... | gpl-2.0 |
ld-test/loverocks | spec/commands/install_spec.lua | 1 | 2322 | local lfs = require 'lfs'
local util = require 'loverocks.util'
local purge = require 'loverocks.commands.purge'
local cwd = lfs.currentdir()
describe("loverocks install", function()
local Install = require 'loverocks.commands.install'
require 'spec.test_config'()
setup(function()
local New = require 'love... | mit |
resistor58/deaths-gmod-server | wire/lua/entities/gmod_wire_data_satellitedish/init.lua | 1 | 1222 |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "Satellite Dish"
function ENT:Initialize()
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
self:ShowOutput()
end
fu... | gpl-3.0 |
DreanorESOUI/HideElements | src/libs/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/dropdown.lua | 3 | 9142 | --[[dropdownData = {
type = "dropdown",
name = "My Dropdown", -- or string id or function returning a string
choices = {"table", "of", "choices"},
choicesValues = {"foo", 2, "three"}, -- if specified, these values will get passed to setFunc instead (optional)
getFunc = function() return db.var ... | mit |
maxmax1/fooniks | resources/traffic/server/traffic_server.lua | 2 | 6839 |
addEventHandler ( "onResourceStart", _local, function ()
-- Make sure our definitions exist and match the paths file
if ( not AREA_WIDTH or not AREA_HEIGHT or not AREA_MAX or not AREA_STEP ) then
outputDebugString ( "Paths file definitions missing! Unloading.." )
cancelEvent ()
return
elseif ( AREA_M... | gpl-3.0 |
alireza1516/self1 | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
ruvolof/telegram-bot | libs/mimetype.lua | 3662 | 2922 | -- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types
do
local mimetype = {}
-- TODO: Add more?
local types = {
["text/html"] = "html",
["text/css"] = "css",
["text/xml"] = "xml",
["image/gif"] = "gif",
["image/jpeg"] = "jpg",
["application/x-javascript"] = "js",
["application/atom... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.