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
Crazy-Duck/junglenational
game/dota_addons/junglenational/scripts/vscripts/libraries/abilities/containers_lua_targeting_tree.lua
1
6663
containers_lua_targeting_tree = class({}) -------------------------------------------------------------------------------- function containers_lua_targeting_tree:GetBehavior() local result = CustomNetTables:GetTableValue("containers_lua", tostring(self:entindex())) if not result then return self.BaseClass.GetBehav...
mit
vanjikumaran/wrk
deps/luajit/src/jit/v.lua
88
5614
---------------------------------------------------------------------------- -- Verbose mode of the LuaJIT compiler. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
apache-2.0
xinjuncoding/skynet
examples/agent.lua
65
2082
local skynet = require "skynet" local netpack = require "netpack" local socket = require "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) ...
mit
masterweb121/telegram-bot
plugins/btc.lua
289
1375
-- See https://bitcoinaverage.com/api local function getBTCX(amount,currency) local base_url = 'https://api.bitcoinaverage.com/ticker/global/' -- Do request on bitcoinaverage, the final / is critical! local res,code = https.request(base_url..currency.."/") if code ~= 200 then return nil end local data = j...
gpl-2.0
deepak78/new-luci
protocols/luci-proto-relay/luasrc/model/cbi/admin_network/proto_relay.lua
70
1945
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local ipaddr, network local forward_bcast, forward_dhcp, gateway, expiry, retry, table ipaddr = section:taboption("general", Value, "ipaddr", translate("Local IPv4 address"), t...
apache-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/applications/luci-multiwan/luasrc/model/cbi/multiwan/multiwanmini.lua
7
2330
require("luci.tools.webadmin") m = Map("multiwan", translate("Multi-WAN"), translate("Multi-WAN allows for the use of multiple uplinks for load balancing and failover.")) s = m:section(NamedSection, "config", "multiwan", "") e = s:option(Flag, "enabled", translate("Enable")) e.rmempty = false function e.write(self,...
gpl-2.0
hoelzl/Xbt.lua
src/sci/root/_newtonm.lua
2
2700
-------------------------------------------------------------------------------- -- Newton-type methods for root finding module. -- -- Copyright (C) 2011-2014 Stefano Peluchetti. All rights reserved. -- -- Features, documentation and more: http://www.scilua.org . -- -- This file is part of the SciLua library, which is...
mit
LuaDist2/lua-resty-hoedown
lib/resty/hoedown/document.lua
2
8189
local buffer = require "resty.hoedown.buffer" local new_buf = buffer.new local lib = require "resty.hoedown.library" local ffi = require "ffi" local ffi_gc = ffi.gc local ffi_cdef = ffi.cdef local bit = require "bit" local bor = bit.bor local type = type ...
bsd-2-clause
MmxBoy/test2
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
topkecleon/otouto
otouto/plugins/admin/temp_ban.lua
1
2522
--[[ temp_ban.lua Copyright 2018 topkecleon <drew@otou.to> This code is licensed under the GNU AGPLv3. See /LICENSE for details. ]]-- local anise = require('anise') local bindings = require('extern.bindings') local utilities = require('otouto.utilities') local autils = require('otouto.autils') local P = {...
agpl-3.0
Dadido3/D3classic
Lua/Events/Wireworld.lua
2
2072
local function tonum(x) if x==nil then return 0 else return x end end function Event_Timer_Wireworld(Map_ID) local Type_Empty = 0 local Type_Wire = 41 local Type_Electron_Head = 27 local Type_Electron_Tail = 21 local Size_X = 128 local Size_Y = 128 local Size_Z = 0 local iz = 1 local Counter = {} --[[...
mit
JamesWilko/GoonMod
GoonMod/mods/push_to_interact.lua
1
4408
local interact_menu_id = "goonbase_pushtointeract_menu" -- Mod Definition local Mod = class( BaseMod ) Mod.id = "PushToInteract" Mod.Name = "Push to Interact" Mod.Desc = "Push interact key to toggle interacting with an object." Mod.Requirements = {} Mod.Incompatibilities = {} Hooks:Add("GoonBaseRegisterMods", "GoonB...
mit
misterdustinface/Lua-Synergy
Lua-Synergy/src/Error/trycatch.lua
1
1322
require 'Stack' local catchStack = Stack() function getStackTrace() return catchStack:toString() end function printStackTrace() print(getStackTrace()) end --[[ CURRENTLY NOT SAFE FOR MULTITHREADED APPLICATIONS ]]-- function try(f, ...) if not pcall(f, ...) then catchStack:push(f) end end local canCatch...
gpl-2.0
InkblotAdmirer/packages
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx6.lua
78
1115
#!/usr/bin/lua local json = require "cjson" local function interpret_suffix(rate) local value = string.sub(rate, 1, -2) local suffix = string.sub(rate, -1) if suffix == "K" then return tonumber(value) * 10^3 end if suffix == "M" then return tonumber(value) * 10^6 end if suffix == "G" then return tonumber(va...
gpl-2.0
ziz/solarus
quests/zsdx/data/maps/map0072.lua
1
1030
-- Smith cave (battle against the thiefs) function event_map_started(destination_point_name) sol.map.door_set_open("door", true) sol.map.enemy_set_group_enabled("enemy", false) end function event_hero_on_sensor(sensor_name) if sensor_name == "close_door_sensor" and sol.map.door_is_open("door") and...
gpl-3.0
MmxBoy/test2
libs/redis.lua
566
1214
local Redis = require 'redis' local FakeRedis = require 'fakeredis' local params = { host = os.getenv('REDIS_HOST') or '127.0.0.1', port = tonumber(os.getenv('REDIS_PORT') or 6379) } local database = os.getenv('REDIS_DB') local password = os.getenv('REDIS_PASSWORD') -- Overwrite HGETALL Redis.commands.hgetall = ...
gpl-2.0
m-creations/openwrt
feeds/routing/luci-app-bmx6/files/usr/lib/lua/luci/model/cbi/bmx6/main.lua
16
3464
--[[ Copyright (C) 2011 Pau Escrich <pau@dabax.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Th...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/modules/rpc/luasrc/jsonrpc.lua
12
2238
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
3
8354
--[[ LuCI - Lua Configuration Interface 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 obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: freifunk....
gpl-2.0
madratman/nuklei-code
contrib/ticpp-r97/src/ticpp.lua
5
4536
--***************************************************************************** --* Author: RJP Computing <rjpcomputing@gmail.com> --* Date: 01/21/2008 --* Version: 1.02 --* Copyright (C) 2008 RJP Computing --* --* Permission is hereby granted, free of charge, to any person obtaining a copy of --* this softwar...
gpl-3.0
masterweb121/telegram-bot
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
mamaddeveloper/outo
plugins/eightball.lua
5
1082
local doc = [[ /8ball Returns an answer from a magic 8-ball! ]] local triggers = { '^/8ball', 'y/n%p?$' } local ball_answers = { "It is certain.", "It is decidedly so.", "Without a doubt.", "Yes, definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook: good.", "Yes.", "Signs p...
gpl-2.0
iamliqiang/prosody-modules
mod_broadcast/mod_broadcast.lua
32
1043
local is_admin = require "core.usermanager".is_admin; local allowed_senders = module:get_option_set("broadcast_senders", {}); local from_address = module:get_option_string("broadcast_from"); local jid_bare = require "util.jid".bare; function send_to_online(message) local c = 0; for hostname, host_session in pairs(h...
mit
paulmarsy/Console
Libraries/nmap/App/nselib/rpc.lua
1
108400
--- -- RPC Library supporting a very limited subset of operations. -- -- The library works over both the UDP and TCP protocols. A subset of nfs and -- mountd procedures are supported. The nfs and mountd programs support -- versions 1 through 3. Authentication is supported using the NULL RPC -- Authentication protocol -...
mit
plinkopenguin/wire-extras
lua/weapons/gmod_tool/stools/wire_painter.lua
4
5737
TOOL.Category = "Wire Extras/Visuals" TOOL.Name = "Painter" TOOL.Command = nil TOOL.ConfigName = "" TOOL.Tab = "Wire" if ( CLIENT ) then language.Add( "Tool.wire_painter.name", "Painter Tool (Wire)" ) language.Add( "Tool.wire_painter.desc", "Spawns a decal painter for use with the wire system." ...
gpl-3.0
aryajur/luarocks
src/luarocks/fetch/git.lua
13
3617
--- Fetch back-end for retrieving sources from GIT. --module("luarocks.fetch.git", package.seeall) local git = {} local unpack = unpack or table.unpack local fs = require("luarocks.fs") local dir = require("luarocks.dir") local util = require("luarocks.util") --- Git >= 1.7.10 can clone a branch **or tag**, < 1.7.1...
mit
ferstar/openwrt-dreambox
feeds/luci/luci/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
4
11273
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua
12
1085
--[[ smap_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: smap_devinfo_mini.lua 5448 20...
gpl-2.0
alirezanile/Newsha
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
deepak78/new-luci
modules/luci-base/luasrc/sgi/uhttpd.lua
79
1956
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require "nixio.util" require "luci.http" require "luci.sys" require "luci.dispatcher" require "luci.ltn12" function handle_request(env) exectime = os.clock() local renv = { CONTENT_LENGTH = env.CONTENT_LEN...
apache-2.0
m-creations/openwrt
feeds/luci/modules/luci-base/luasrc/sgi/uhttpd.lua
79
1956
-- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. require "nixio.util" require "luci.http" require "luci.sys" require "luci.dispatcher" require "luci.ltn12" function handle_request(env) exectime = os.clock() local renv = { CONTENT_LENGTH = env.CONTENT_LEN...
gpl-2.0
paulmarsy/Console
Libraries/nmap/App/nselib/rdp.lua
2
11264
--- -- A minimal RDP (Remote Desktop Protocol) library. Currently has functionality to determine encryption -- and cipher support. -- -- -- @author "Patrik Karlsson <patrik@cqure.net>" -- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html -- local bin = require("bin") local nmap = require("nmap") local s...
mit
ferstar/openwrt-dreambox
feeds/luci/luci/luci/libs/nixio/axTLS/samples/lua/axssl.lua
176
19286
#!/usr/local/bin/lua -- -- Copyright (c) 2007, Cameron Rich -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -...
gpl-2.0
osgcc/ryzom
ryzom/common/data_common/r2/r2_features_empty.lua
3
6724
-- In Translation file -- Category : uiR2EdEmptyFeature -- -- CreationFrom : uiR2EdEmptyParameters r2.Features.EmptyFeature = {} local feature = r2.Features.EmptyFeature feature.Name="EmptyFeature" feature.Description="An empty feature" feature.Components = {} -- ######################### -- # FEATURE FUNC...
agpl-3.0
pavel-odintsov/snabbswitch
src/apps/solarflare/solarflare.lua
15
10778
module(...,package.seeall) local lib = require("core.lib") local freelist = require("core.freelist") local packet = require("core.packet") require("apps.solarflare.ef_vi_h") local pci = require("lib.hardware.pci") local ethernet = require("lib.protocol.ethernet") local ffi = require("ffi"...
apache-2.0
m-creations/openwrt
feeds/luci/applications/luci-app-freifunk-policyrouting/luasrc/model/cbi/freifunk/policyrouting.lua
68
1703
-- Copyright 2011 Manuel Munz <freifunk at somakoma de> -- Licensed to the public under the Apache License 2.0. local uci = require "luci.model.uci".cursor() m = Map("freifunk-policyrouting", translate("Policy Routing"), translate("These pages can be used to setup policy routing for certain firewall zones. ".. "This...
gpl-2.0
samuelctabor/ardupilot
libraries/AP_Scripting/examples/set-target-velocity.lua
18
3704
-- command a Copter to takeoff to 10m and fly a square pattern -- -- CAUTION: This script only works for Copter -- this script waits for the vehicle to be armed and RC6 input > 1800 and then: -- a) switches to Guided mode -- b) takeoff to 10m -- c) flies a 20m x 20m square pattern using the velocity controller...
gpl-3.0
saeqe/telebot
plugins/anti_spam.lua
102
3744
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
deepak78/new-luci
modules/luci-mod-freifunk/luasrc/controller/freifunk/remote_update.lua
68
1475
-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.freifunk.remote_update", package.seeall) function index() if not nixio.fs.access("/usr/sbin/remote-update") then return end entry({"admin", "system", "remote_update"}, call("act_re...
apache-2.0
m-creations/openwrt
feeds/luci/modules/luci-mod-freifunk/luasrc/controller/freifunk/remote_update.lua
68
1475
-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.freifunk.remote_update", package.seeall) function index() if not nixio.fs.access("/usr/sbin/remote-update") then return end entry({"admin", "system", "remote_update"}, call("act_re...
gpl-2.0
Ennea/eUI
eActionBindings/libs/LibKeyBound-1.0/LibKeyBound-1.0.lua
2
16768
--[[ Name: LibKeyBound-1.0 Revision: $Rev: 98 $ Author(s): Gello, Maul, Toadkiller, Tuller Website: http://www.wowace.com/wiki/LibKeyBound-1.0 Documentation: http://www.wowace.com/wiki/LibKeyBound-1.0 SVN: http://svn.wowace.com/wowace/trunk/LibKeyBound-1.0 Description: An intuitive keybindings system: mouseover frame, ...
mit
jiankers/Atlas
examples/tutorial-prep-stmts.lua
46
2699
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
deepak78/new-luci
applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
69
1137
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. m = Map("luci_statistics", translate("Ping Plugin Configuration"), translate( "The ping plugin will send icmp echo replies to selected " .. "hosts and measure the roundtrip time for each...
apache-2.0
plinkopenguin/wire-extras
lua/weapons/gmod_tool/stools/wire_dynmemory.lua
4
4259
/******************************* Adv. Consolescreen Wrapper for Wiremod (C) Sebastian J. ********************************/ TOOL.Category = "Wire Extras/Memory" TOOL.Name = "Dynamic Memory" TOOL.Command = nil TOOL.ConfigName = "" TOOL.Tab = "Wire" if ( CLIENT ) then language.Add( "Tool.w...
gpl-3.0
rigeirani/ma
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
fdalvi/nmt-repr-analysis
src/eval.lua
1
15194
-- uses code from: https://github.com/harvardnlp/seq2seq-attn local beam = require 's2sa.beam' require 'nn' require 'xlua' require 'optim' seq = require 'pl.seq' stringx = require 'pl.stringx' function main() print(arg) beam.init(arg) opt = beam.getOptions() skip_start_end = model_opt.start_symbol == 1 --p...
mit
kusl/sumatrapdf
luatest/t02.lua
7
1207
require'setupluafiles' local winapi = require'winapi' require'winapi.showcase' require'winapi.icon' require'winapi.buttonclass' local window = winapi.ShowcaseWindow{w=300,h=300} local b1 = winapi.Button{parent = window, default = true} b1:focus() function b1:on_click() print'b1 clicked' end --b1:__inspect() ...
gpl-3.0
topkecleon/otouto
otouto/plugins/core/control.lua
1
3460
--[[ control.lua Provides various commands to manage the bot. /reload [-config] Reloads the bot, optionally without reloading config. /halt Safely stops the bot. /do Runs multiple, newline-separated commands as if they were individual messages. Copyright 2016 ...
agpl-3.0
fegimanam/a
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
rigeirani/ma
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
qweru/Moon
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
aryajur/luarocks
src/luarocks/validate.lua
20
4669
--- Sandboxed test of build/install of all packages in a repository (unfinished and disabled). --module("luarocks.validate", package.seeall) local validate = {} package.loaded["luarocks.validate"] = validate local fs = require("luarocks.fs") local dir = require("luarocks.dir") local path = require("luarocks.path") lo...
mit
emptyrivers/WeakAuras2
WeakAuras/SubRegionTypes/Glow.lua
1
9758
if not WeakAuras.IsCorrectVersion() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); local LCG = LibStub("LibCustomGlow-1.0") local MSQ, MSQ_Version = LibStub("Masque", true); if MSQ then if MSQ_Version <= 80100 then MSQ = nil end end local L = WeakAuras.L; loc...
gpl-2.0
alexd2580/igjam2016
src/lib/StackHelper.lua
1
1195
local StackHelper = class("StackHelper") function StackHelper:initialize() self.states = {} self.backCounter = 0 end function StackHelper:current() if #self.states == 0 then return nil elseif #self.states > 0 then return self.states[#self.states] end end function StackHelper:push(eleme...
mit
ziz/solarus
quests/zsdx/data/enemies/generic_soldier.lua
1
3293
-- Generic script for a soldier with a sword -- Example of use from an enemy script: -- sol.main.include("enemies/generic_soldier") -- set_properties({ -- main_sprite = "enemies/green_knight_soldier", -- sword_sprite = "enemies/green_knight_soldier_sword", -- life = 4, -- damage = 2, -- play_hero_seen_sound ...
gpl-3.0
cochrane/OpenTomb
scripts/level/tr1/LEVEL5.lua
2
1111
-- OPENTOMB STATIC MESH COLLISION SCRIPT -- FOR TOMB RAIDER, LEVEL1 (CAVES) print("Level script loaded (LEVEL5.lua)"); -- STATIC COLLISION FLAGS ------------------------------------------------------ -------------------------------------------------------------------------------- static_tbl[06] = {coll = COLLISION_T...
lgpl-3.0
deepak78/new-luci
applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
43
3728
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Licensed to the public under the Apache License 2.0. local fs = require "nixio.fs" local sys = require "luci.sys" local uci = require "luci.model.uci".cursor() local testfullps = luci.sys.exec("ps --help 2>&1 | grep BusyBox") --check which ps do we have local pss...
apache-2.0
iamliqiang/prosody-modules
mod_profile/mod_profile.lua
16
6947
-- mod_profile local st = require"util.stanza"; local jid_split = require"util.jid".split; local jid_bare = require"util.jid".bare; local is_admin = require"core.usermanager".is_admin; local vcard = require"util.vcard"; local base64 = require"util.encodings".base64; local sha1 = require"util.hashes".sha1; local t_inse...
mit
paulmarsy/Console
Libraries/nmap/App/nselib/data/psexec/examples.lua
8
2358
---This configuration file contains the examples given in smb-psexec.nse. -- Any variable in the 'config' table in smb-psexec.nse can be overriden in the -- 'overrides' table. Most of them are not really recommended, such as the host, -- key, etc. overrides = {} overrides.timeout = 40 modules = {} local mod mod = {}...
mit
yaringal/BayesianRNN
LM_code/main_naive_dropout.lua
1
13521
-- Author: original with my comments, sequences init with 0 rather than prev state local ok,cunn = pcall(require, 'fbcunn') if not ok then ok,cunn = pcall(require,'cunn') if ok then print("warning: fbcunn not found. Falling back to cunn") LookupTable = nn.LookupTable else print("Cou...
mit
xinjuncoding/skynet
test/testcoroutine.lua
24
1214
local skynet = require "skynet" -- You should use skynet.coroutine instead of origin coroutine in skynet local coroutine = require "skynet.coroutine" local profile = require "profile" local function status(co) repeat local status = coroutine.status(co) print("STATUS", status) skynet.sleep(100) until status == ...
mit
loringmoore/The-Forgotten-Server
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
alinfrat/nefratrobot
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
zfu2/MBC2
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-3.0
Shopify/sky
deps/LuaJIT-2.0.1/dynasm/dasm_mips.lua
74
28080
------------------------------------------------------------------------------ -- DynASM MIPS module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _i...
mit
deepak78/new-luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
68
1118
-- Copyright 2013 Freifunk Augsburg / Michael Wendland <michael@michiwend.com> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.splash_leases", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) ...
apache-2.0
Maurogik/GRIP
eval.lua
1
3303
require "functions" --The recursive evaluation function, return a table of the evaluated functions and their arity --After recursing back to the top, the size of the table should always be 1 (if not, ERROR) --The formula parameter is expected to be a table containing -- each of the symbols or predicates saved as str...
gpl-3.0
Dadido3/D3classic
Lua/Map_Fill/hspace.lua
2
1027
function Mapfill_hspace(Map_ID, Map_Size_X, Map_Size_Y, Map_Size_Z) local hx,hy,hz = Map_Size_X-1, Map_Size_Y-1, Map_Size_Z-1 local mat = 49 for iz=0,1 do local z = iz*hz for x=0,hx do for y=0,hy do mat = 49 if math.random(100) == 1 then mat = math.random(21,36) end Map_Block_Change(-1, M...
mit
jcmoyer/hug
tests/test-timer.lua
1
1112
require('path') local framework = require('tt') local timer = require('hug.timer') local function overstep() local t = timer.new(1) framework.compare('active', t:status()) t:update(math.huge) framework.compare('finished', t:status()) framework.compare(0, t:remaining()) end local function evaluate() local ...
apache-2.0
Crazy-Duck/junglenational
game/dota_addons/junglenational/scripts/vscripts/internal/events.lua
1
3879
-- The overall game state has changed function JungleNational:_OnGameRulesStateChange(keys) if JungleNational._reentrantCheck then return end local newState = GameRules:State_Get() if newState == DOTA_GAMERULES_STATE_WAIT_FOR_PLAYERS_TO_LOAD then self.bSeenWaitForPlayers = true elseif newState == DOT...
mit
plinkopenguin/wire-extras
lua/weapons/gmod_tool/stools/wire_dupeport.lua
1
4078
TOOL.Category = "Wire Extras/Physics" TOOL.Name = "Adv. Dupe. Teleporter" TOOL.Command = nil TOOL.ConfigName = "" TOOL.Tab = "Wire" if ( CLIENT ) then language.Add( "Tool.wire_dupeport.name", "Adv. Dupe. Teleporter Tool (Wire)" ) language.Add( "Tool.wire_dupeport.desc", "Spawns an Adv. Dupe. Tel...
gpl-3.0
hoelzl/Xbt.lua
src/sci/diff.lua
2
10745
-------------------------------------------------------------------------------- -- Automatic differentiation module. -- -- Copyright (C) 2011-2014 Stefano Peluchetti. All rights reserved. -- -- Features, documentation and more: http://www.scilua.org . -- -- This file is part of the SciLua library, which is released un...
mit
sajjad94/ASD_KARBALA
plugins/en-ASD_KARBALA1.lua
3
4367
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ BY SAJAD NOORI (@SAJJADNOORI) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY SAJJAD NOORI ▀▄ ▄▀ ▀▄ ▄▀ help1 : مساعدة ▀▄ ▄▀ ▀▄▀...
gpl-2.0
KNIGHTTH0R/uzz
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
allwenandashi/1
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
alinfrat/nefratrobot
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
rigeirani/sg1
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
vzaramel/kong
kong/cli/utils/ssl.lua
11
2658
local cutils = require "kong.cli.utils" local utils = require "kong.tools.utils" local IO = require "kong.tools.io" local _M = {} function _M.get_ssl_cert_and_key(kong_config) local ssl_cert_path, ssl_key_path if (kong_config.ssl_cert_path and not kong_config.ssl_key_path) or (kong_config.ssl_key_path and no...
apache-2.0
cochrane/OpenTomb
scripts/entity/entity_functions.lua
2
65964
-- OPENTOMB ENTITY FUNCTIONS SCRIPT -- By TeslaRus, Lwmte, 2014-2015 -------------------------------------------------------------------------------- -- This script contains routines for all entity functions. Note that it is not -- just entity functions, but "function creation" routines, which usually -- includes some...
lgpl-3.0
disslove85/NOVM-BOT
bot/utils.lua
12
15072
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
Sevenanths/boson-t-nouveau
NewBosonT/NewBosonT/bin/Debug/boson/data/gameover.lua
2
16541
local game_state = ... local swidth = lt.right - lt.left if not game_state then game_state = { score = 0.97, stage_id = 1 } end local particle_trace = gen_particle_trace(game_state) local stage_id = game_state.stage_id local score = game_state.score local experiment_no = lt.state.games_played local prev_best ...
gpl-2.0
KNIGHTTH0R/uzz
plugins/sudo.lua
359
1878
function run_sh(msg) name = get_name(msg) text = '' -- if config.sh_enabled == false then -- text = '!sh command is disabled' -- else -- if is_sudo(msg) then -- bash = msg.text:sub(4,-1) -- text = run_bash(bash) -- else -- text = name .. ' yo...
gpl-2.0
m-creations/openwrt
feeds/luci/modules/luci-mod-rpc/luasrc/jsonrpc.lua
75
1979
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.jsonrpc", package.seeall) require "luci.json" function resolve(mod, method) local path = luci.util.split(method, ".") for j=1, #path-1 do i...
gpl-2.0
alexd2580/igjam2016
src/systems/SwarmSystem.lua
1
1500
local SwarmSystem = class("SwarmSystem", System) function SwarmSystem:update() for k, entity in pairs(self.targets) do --player_x, player_y = player:get('Physical').body:getPosition() --player_vector = Vector(player_x, player_y) local mother_x, mother_y = entity:get('SwarmMember').mothershi...
mit
loringmoore/The-Forgotten-Server
data/npc/scripts/items.lua
1
25141
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCre...
gpl-2.0
ferstar/openwrt-dreambox
feeds/luci/luci/luci/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua
6
1088
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
gpl-2.0
deepak78/new-luci
applications/luci-app-firewall/luasrc/model/cbi/firewall/forward-details.lua
57
3722
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local sys = require "luci.sys" local dsp = require "luci.dispatcher" local ft = require "luci.tools.firewall" local m, s, o arg[1] = arg[1] or "" m = Map("firewall", translate("Firewall - Port Forwards"), ...
apache-2.0
tangentialism/google-diff-match-patch
lua/diff_match_patch_test.lua
264
39109
--[[ * Test Harness for Diff Match and Patch * * Copyright 2006 Google Inc. * http://code.google.com/p/google-diff-match-patch/ * * Based on the JavaScript implementation by Neil Fraser * Ported to Lua by Duncan Cross * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except...
apache-2.0
cartman300/LuaBintils
bin/lulu/lulu.lua
1
25205
------------------------------------------------------------------------------ -- LuLu - Lua VM on Lua version 0.05, June 8th, 2008 -- -- Copyright (C) 2008 hzkr <binhzkr@gmail.com> -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for...
unlicense
peterfox/proxmark3
client/lualibs/commands.lua
9
9253
--[[ These are command definitions. This file should correspond exactly to usb_cmd.h. --]] --// For the bootloader local _commands = { CMD_DEVICE_INFO = 0x0000, CMD_SETUP_WRITE = 0x0001, CMD_FINISH_WRITE = ...
gpl-2.0
slowglass/Restacker
Lang.de.lua
1
2125
-- German Lang bundle Dunkare local b = Slowglass.Restacker.langBundle b["BAG"] = "Tasche" b["LOADED"] = "Restacker geladen" b["SRC_ITEM"] = "Gegenstand: <<1>>" b["DST_ITEM"] = "Ziel: <<1>>" b["EVALUATION"] = "Restacker Auswertung:" b["RESTACK_AVAILABLE"] = "...gefundene Stapel <<1>>: <<2>>" b["RESTACKING"] = "<<2>> <...
mit
loringmoore/The-Forgotten-Server
data/spells/scripts/attack/plague.lua
1
1142
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) local area = createCombatArea(AREA_CIRCLE3X3) combat:setArea(area) local condition = Condition(CONDITION_POISON) condition:setTicks(30000) condition:setParameter(CONDITION...
gpl-2.0
Dadido3/D3classic
Lua/Physic/Special/D-Projectile.lua
2
4163
local Directional_Projectile_List = {} function Physic_Directional_Projectile_Add(Player_Number, Map_ID, X, Y, Z, Rot, Look) local Rot, Look = Rot + math.random()-0.5, Look + math.random()-0.5 local VX, VY, VZ = math.cos(math.rad(Rot-90))*math.cos(math.rad(Look)), math.sin(math.rad(Rot-90))*math.cos(math.rad(Look)),...
mit
samuelctabor/ardupilot
libraries/AP_Scripting/examples/arming-check-wp1-takeoff.lua
18
1073
-- This script runs a custom arming check for index == 1 and it must be a takeoff missionn item local auth_id = arming:get_aux_auth_id() local MAV_CMD_NAV_TAKEOFF = 22 local MAV_CMD_NAV_VTOL_TAKEOFF = 84 function update() -- this is the loop which periodically runs if auth_id then local cmd_id = mission:get_cu...
gpl-3.0
SlimSaber/android_external_skia
tools/lua/bbh_filter.lua
207
4407
-- bbh_filter.lua -- -- This script outputs info about 'interesting' skp files, -- where the definition of 'interesting' changes but is roughly: -- "Interesting for bounding box hierarchy benchmarks." -- -- Currently, the approach is to output, in equal ammounts, the names of the files that -- have most commands, and t...
bsd-3-clause
Lleafll/void-raid-setup
libs/AceConsole-3.0/AceConsole-3.0.lua
31
8339
--- **AceConsole-3.0** provides registration facilities for slash commands. -- You can register slash commands to your custom functions and use the `GetArgs` function to parse them -- to your addons individual needs. -- -- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(...
mit
elixboy/Yelixboy
bot/utils.lua
494
23873
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
cjshmyr/OpenRA
mods/cnc/maps/nod09/nod09-AI.lua
7
6857
--[[ Copyright 2007-2017 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-3.0
Native-Software/Krea
CoronaGameEditor/bin/Release/Lua Repository/generator.lua
3
11829
--- This module is provided as it by Native-Software for use into a Krea project. -- @author Frederic Raimondi -- @copyright Native-Software 2012 - All Rights Reserved. -- @release 1.0 -- @description Generator is a module to duplicate a Object Instance (see also object.lua) -- <br>Changing the content of this file i...
gpl-2.0
Native-Software/Krea
CoronaGameEditor/bin/Debug/Lua Repository/generator.lua
3
11829
--- This module is provided as it by Native-Software for use into a Krea project. -- @author Frederic Raimondi -- @copyright Native-Software 2012 - All Rights Reserved. -- @release 1.0 -- @description Generator is a module to duplicate a Object Instance (see also object.lua) -- <br>Changing the content of this file i...
gpl-2.0