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 |
|---|---|---|---|---|---|
LuckyGameCn/LHCocosGame | cocos2d/tests/lua-tests/src/FontTest/FontTest.lua | 5 | 3691 | local kTagLabel1 = 0
local kTagLabel2 = 1
local kTagLabel3 = 2
local kTagLabel4 = 3
local fontList = {
"fonts/A Damn Mess.ttf",
"fonts/Abberancy.ttf",
"fonts/Abduction.ttf",
"fonts/Paint Boy.ttf",
"fonts/Schwarzwald Regular.ttf",
"fonts/Scissor Cuts.ttf"
}
local fontCount = table.getn(fon... | mit |
ioiasff/poi | plugins/chat.lua | 6 | 1252 | local function run(msg)
if msg.text == "hi" then
return "سلام"
end
if msg.text == "Hi" then
return "سلام جیگر"
end
if msg.text == "Hello" then
return "سلاممم"
end
if msg.text == "hello" then
return "سسلامم"
end
if msg.text == "Salam" then
return "سلام علیکم "
end
if msg.text == "salam" then
return "سلام "
end
if ... | gpl-2.0 |
lowne/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 |
ArchShaman/Zero-K | units/turretantiheavy.lua | 4 | 4351 | unitDef = {
unitname = [[turretantiheavy]],
name = [[Lucifer]],
description = [[Tachyon Projector - Requires connection to a 50 energy grid]],
activateWhenBuilt = true,
buildCostMetal = 2200,
builder ... | gpl-2.0 |
starius/pasta | src/pasta/views/edit.lua | 1 | 2261 | local Widget
Widget = require("lapis.html").Widget
local filesize = require("filesize")
local config = require("lapis.config").get()
local Edit
do
local _class_0
local _parent_0 = Widget
local _base_0 = {
content = function(self)
return form({
method = "POST",
action = self:url_for("edit... | mit |
phi-psi/luci | libs/sgi-cgi/luasrc/sgi/cgi.lua | 87 | 2260 | --[[
LuCI - SGI-Module for CGI
Description:
Server Gateway Interface for CGI
FileId:
$Id$
License:
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at... | apache-2.0 |
undidish/CharacterLinks | CharacterLinks/CharacterLinks.lua | 1 | 18998 | -- Coded by Iokanaan from Bloodlust @ Archimonde EU
-- Based on ArmoryQuickLink, MPH and WoWProgressLink
-- Menu structure
UnitPopupButtons["CL"]={text = "Character Links", dist = 0, nested = 1,}
UnitPopupButtons["A"] = {text = "Armory", dist = 0, checkable = nil}
UnitPopupButtons["MHP"] = {text = "Mythic Plus Helper"... | gpl-3.0 |
ArchShaman/Zero-K | LuaUI/Widgets/init_startup_info_selector.lua | 3 | 15975 | local versionNumber = "1.337"
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Startup Info and Selector",
desc = "[v" .. string.format("%s", versionNumber ) .... | gpl-2.0 |
goblinr/omim | 3party/osrm/osrm-backend/profiles/examples/postgis.lua | 70 | 3445 |
-- This example shows how to query external data stored in PostGIS when processing ways.
-- This profile assumes that OSM data has been imported to PostGIS using imposm to a db
-- with the name 'imposm', the default user and no password. It assumes areas with
-- landusage=* was imported to the table osm_landusages, ... | apache-2.0 |
mrbangi/t_e_l_e_b_o_t | 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 |
amirilk22333322/uzzbot | 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 |
MarchM4/Milkyway-home-server-expansion | nbody/tests/CheckpointTest.lua | 3 | 2783 | --
-- Copyright (C) 2011 Matthew Arsenault
--
-- This file is part of Milkway@Home.
--
-- Milkyway@Home 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
-- (at your option... | gpl-3.0 |
thisverygoodhhhh/orange | bin/main.lua | 3 | 1926 | local version = require("orange.version")
local args_util = require("bin.utils.args_util")
local logger = require("bin.utils.logger")
local cmds = {
start = "Start the Orange Gateway",
stop = "Stop current Orange",
restart = "Restart Orange",
reload = "Reload the config of Orange",
store = "Init/Up... | mit |
brahmi2/prosody-modules | mod_firewall/mod_firewall.lua | 31 | 13709 |
local resolve_relative_path = require "core.configmanager".resolve_relative_path;
local logger = require "util.logger".init;
local set = require "util.set";
local it = require "util.iterators";
local add_filter = require "util.filters".add_filter;
local definitions = module:shared("definitions");
local active_definit... | mit |
trelemar/TM-Paint | colorpicker.lua | 2 | 4325 | colorpicker = {}
function colorpicker.load()
colorpicker.enabled = false
gooi.setStyle(window)
colorpicker.layout = gooi.newPanel(compactWindowArgs):setOpaque(true):setGroup("colorpicker")
:setColspan(1, 1, 4)
:setColspan(2, 1, 2)
:setColspan(2, 3, 2)
:setColspan(3, 1, 3)
:setColspan(4, 1, 3)
:setColspan(5, 1... | mit |
ArchShaman/Zero-K | LuaRules/Configs/StartBoxes/FataMorganaV2.lua | 17 | 1040 | return {
[0] = {
startpoints = {
{1679,1188},
},
boxes = {
{
{1638,1147},
{1720,1147},
{1720,1229},
{1638,1229},
},
},
},
[1] = {
startpoints = {
{4874,1024},
},
boxes = {
{
{4833,983},
{4915,983},
{4915,1065},
{4833,1065},
},
},
},
[2] = {
startp... | gpl-2.0 |
dschoeffm/MoonState | examples/astraeusServer.lua | 1 | 2700 | --- Layer 2 reflector, swaps src and dst MACs and echoes the packet
local lm = require "libmoon"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
local lacp = require "proto.lacp"
local astraeus = require "astraeusServer"
local arp = require "proto.arp"
local uti... | bsd-3-clause |
thisverygoodhhhh/orange | orange/utils/judge.lua | 4 | 3962 | local ipairs = ipairs
local type = type
local tonumber = tonumber
local tostring = tostring
local loadstring = loadstring
local table_insert = table.insert
local string_gsub = string.gsub
local utils = require("orange.utils.utils")
local condition = require("orange.utils.condition")
local _M = {}
function _M.parse_c... | mit |
leehomyc/Photo-Realistic-Super-Resoluton | run_test.lua | 1 | 1057 | require 'torch'
require 'nn'
require 'optim'
require 'image'
require 'nngraph'
require 'cudnn'
util = paths.dofile('util.lua')
torch.setdefaulttensortype('torch.FloatTensor')
opt = {
dataset = 'folder',
batchSize=32,
niter=250,
ntrain = math.huge,
gpu=1,
nThreads = 4,
scale=4,
loadSize=96,
t_folder... | mit |
PansyLabs/Timers | lib/LibAddonMenu-2.0/controls/checkbox.lua | 6 | 5709 | --[[checkboxData = {
type = "checkbox",
name = "My Checkbox",
tooltip = "Checkbox's tooltip text.",
getFunc = function() return db.var end,
setFunc = function(value) db.var = value doStuff() end,
width = "full", --or "half" (optional)
disabled = function() return db.someBooleanSetting end, --or boolean (o... | mit |
dschoeffm/MoonState | lua/dtlsClient.lua | 1 | 2190 | local ffi = require "ffi"
local memory = require "memory"
local log = require "log"
local utils = require "utils"
ffi.cdef[[
void *DtlsClient_init(uint32_t dstIP, uint16_t dstPort);
void *DtlsClient_connect(void *obj, struct rte_mbuf **inPkts, unsigned int inCount,
unsigned int *sendCount, unsigned int *freeCount, u... | bsd-3-clause |
ioiasff/poi | 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 |
abasshacker/abas0 | 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 |
phi-psi/luci | modules/niu/luasrc/model/cbi/niu/traffic/qos1.lua | 49 | 3073 | --[[
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... | apache-2.0 |
starius/pasta | src/pasta/app.lua | 1 | 1374 | local ngx = require("ngx")
local lapis = require("lapis")
local config = require("lapis.config").get()
local app = lapis.Application()
app.layout = require("pasta.views.layout")
app.views_prefix = "pasta.views"
local view = require("pasta.view")
if not config.print_stack_to_browser then
-- http://leafo.net/lapis... | mit |
brahmi2/prosody-modules | mod_privacy_lists/mod_privacy_lists.lua | 32 | 15782 | -- Prosody IM
-- Copyright (C) 2009-2014 Matthew Wild
-- Copyright (C) 2009-2014 Waqas Hussain
-- Copyright (C) 2009 Thilo Cestonaro
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
module:add_feature("jabber:iq:privacy");
local st = require "util.... | mit |
jokerdevv/Joker-Developer | plugins/supergroup.lua | 4 | 103472 | --[[
# For More Information ....!
# Developer : Aziz < @devss_bot > #Dev
# our channel: @help_tele
]]
local function check_member_super(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
if success == 0 then
send_large_msg(receiver, "Promote ... | gpl-2.0 |
bpollack/factor | misc/textadept/lexers/factor.lua | 12 | 4020 | --[[
Lexer for the Factor programming language (http://factorcode.org)
Copyright 2013 Michael T. Richter <ttmrichter@gmail.com>
This program is free software and comes without any warranty, express nor
implied. It is, in short, warranted to do absolutely nothing but (possibly)
occupy storage space. You can redistrib... | bsd-2-clause |
Corvass/BorrowedTime | Libs/LibButtonFacade/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua | 11 | 3491 | --[[-----------------------------------------------------------------------------
BlizOptionsGroup Container
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
-------------------------------------------------------------------------------]]
local Type, Version = "BlizOptionsGroup... | gpl-3.0 |
erwincoumans/premake-dev-iphone-xcode4 | src/base/tree.lua | 1 | 6246 | --
-- tree.lua
-- Functions for working with the source code tree.
-- Copyright (c) 2009-2012 Jason Perkins and the Premake project
--
premake.tree = { }
local tree = premake.tree
--
-- Create a new tree.
--
-- @param n
-- The name of the tree, applied to the root node (optional).
--
function tree.new(n)
lo... | bsd-3-clause |
leafo/sharecart.lua | sharecart/inifile.lua | 4 | 5455 | -- Copyright 2011-2013 Bart van Strien. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without modification, are
-- permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, this list of
-- co... | mit |
leehomyc/Photo-Realistic-Super-Resoluton | adversarial_D.lua | 1 | 1496 | require 'torch'
require 'nn'
require 'optim'
require 'image'
require 'nngraph'
local function createModelD(input_size)
model=nn.Sequential()
model:add(nn.SpatialConvolution(1,64,3,3,1,1,1,1))
model:add(nn.LeakyReLU(0.2))
model:add(nn.SpatialConvolution(64,64,3,3,2,2,1,1))
model:add(nn.LeakyReLU(0.2... | mit |
LuckyGameCn/LHCocosGame | cocos2d/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua | 6 | 3732 | --------------------------------
-- @module ccui
--------------------------------------------------------
-- the ccui LayoutParameter
-- @field [parent=#ccui] LayoutParameter#LayoutParameter LayoutParameter preloaded module
--------------------------------------------------------
-- the ccui LinearLayoutParameter
--... | mit |
spectras/keyleds | keyledsd/effects/reactive-hlines.lua | 1 | 3007 | -- Data
lineDefs = {
{"ESC", "F1", "F2", "F3", "F4", "F5", "F6", "F7",
"F8", "F9", "F10", "F11", "F12", "SYSRQ", "SCROLLLOCK", "PAUSE"},
{"GRAVE", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "0", "MINUS", "EQUAL", "BACKSPACE", "INSERT", "HOME",
"PAGEUP", "NUMLOCK", "KPSLASH", "KPASTERISK", "KPM... | gpl-3.0 |
antihutka/torch-rnn | StatefulConvolution.lua | 1 | 3941 | local SC, parent = torch.class('nn.StatefulConvolution', 'nn.Module')
-- N - batches, T - time, I - input dim, O - output dim, D - dilat
-- (N, T, I) -> (N, T, O)
function SC:__init(I, O, K, D)
parent.__init(self)
self.input_dim = I
self.output_dim = O
self.kernel_size = K
self.dilat = D
self.weight = tor... | mit |
DBReinitialized/PigBot | Source/deps/discordia/client/Client.lua | 2 | 23365 | local API = require('./API')
local Socket = require('./Socket')
local Cache = require('../utils/Cache')
local Emitter = require('../utils/Emitter')
local Stopwatch = require('../utils/Stopwatch')
local Invite = require('../containers/Invite')
local Webhook = require('../containers/snowflakes/Webhook')
local User = requ... | mit |
galnegus/Glaskross | constants/Colors.lua | 1 | 1603 | local Color = require "Color"
local Signals = require "constants.Signals"
local Colors = {}
-- tile steps
Colors.DEFAULT_STEP = Color(1, 1, 1, 0) --255
Colors.PLAYER_STEP = Color(0.58, 0.38, 0.78, 0) --200
Colors.BULLET_STEP = Color(0.78, 0.38, 0.38, 0) --100
-- tile beam
Colors.DEFAULT_BEAM = Color(0.58,... | mit |
mixflowtech/logsensor | lib/ljsyscall/syscall/linux/util.lua | 10 | 10006 | -- misc utils
-- aim is to move a lot of stuff that is not strictly syscalls out of main code to modularise better
-- most code here is man(1) or man(3) or misc helpers for common tasks.
-- TODO rework so that items can be methods on fd again, for eventfd, timerfd, signalfd and tty
local require, error, assert, tonu... | apache-2.0 |
darkstalker/moonhowl | src/moonhowl/gui/tweet_entry.lua | 1 | 2562 | local lgi = require "lgi"
local Gtk = lgi.Gtk
local object = require "moonhowl.object"
local signal = require "moonhowl.signal"
local tweet_entry = object:extend()
function tweet_entry:_init()
local dialog = Gtk.Window{
id = "tweet_entry",
title = "Compose",
Gtk.Box{
orientatio... | mpl-2.0 |
jchuang1977/my_luci | applications/luci-freifunk-policyrouting/luasrc/model/cbi/freifunk/policyrouting.lua | 76 | 1905 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Manuel Munz <freifunk at somakoma de>
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... | apache-2.0 |
phi-psi/luci | applications/luci-freifunk-policyrouting/luasrc/model/cbi/freifunk/policyrouting.lua | 76 | 1905 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Manuel Munz <freifunk at somakoma de>
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... | apache-2.0 |
jokerdevv/Joker-Developer | 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 |
ArchShaman/Zero-K | effects/nuke_bigland.lua | 9 | 10475 |
return {
["nukebigland"] = {
--This is the Nuke - it consists of a Ground Explosion going up
--a Shockwave going outwards
--a Smokepillar forming and slowly disspipating
-- 1 Seconds Explosion
-- 2 Seconds Arrival of Shockwave- Formation of Explodecloud
-- 5 Seconds Shockwave at 1,5 km - after this has en... | gpl-2.0 |
ArchShaman/Zero-K | effects/beamlaser.lua | 25 | 2996 | -- beamlaser_violet_hit_200
-- beamlaser_blue_hit_200
return {
["beamlaser_violet_hit_200"] = {
usedefaultexplosions = false,
pikes = {
air = true,
class = [[explspike]],
count = 4,
ground = true,
water = true,
... | gpl-2.0 |
mixflowtech/logsensor | src/apps/intel/loadgen.lua | 14 | 2678 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(...,package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local app = require("core.app")
local link = require("core.link")
local intel10g = require("apps.intel.intel10g")
local memory = require... | apache-2.0 |
scholzd/MoonGen | rfc2544/benchmarks/throughput.lua | 9 | 14322 | package.path = package.path .. "rfc2544/?.lua"
local standalone = false
if master == nil then
standalone = true
master = "dummy"
end
local dpdk = require "dpdk"
local memory = require "memory"
local device = require "device"
local filter = require "filter"
local ffi ... | mit |
phi-psi/luci | applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua | 30 | 3470 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Copyright 2013 Manuel Munz <freifunk at somakoma dot de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | apache-2.0 |
focusworld/big | 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 |
ArchShaman/Zero-K | units/staticheavyarty.lua | 4 | 3792 | unitDef = {
unitname = [[staticheavyarty]],
name = [[Big Bertha]],
description = [[Strategic Plasma Cannon]],
buildCostMetal = 5000,
builder = false,
buildingGroundDecalDecaySpeed = 30,
buildingGroundDecal... | gpl-2.0 |
ArchShaman/Zero-K | scripts/letsNotFailAtTrig.lua | 16 | 1574 | local tau = math.pi*2
local pi = math.pi
local hpi = math.pi*0.5
local cos = math.cos
local sin = math.sin
local acos = math.acos
local asin = math.asin
function rotateXaxis(v, angle)
return {v[1], v[2]*cos(angle) - v[3]*sin(angle), v[3]*cos(angle) + v[2]*sin(angle)}
end
function rotateYaxis(v, angle)
return {v[1]... | gpl-2.0 |
brahmi2/prosody-modules | mod_watchuntrusted/mod_watchuntrusted.lua | 6 | 2270 | local jid_prep = require "util.jid".prep;
local secure_auth = module:get_option_boolean("s2s_secure_auth", false);
local secure_domains, insecure_domains =
module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items;
local untrusted_fail_watchers = module:get_opti... | mit |
chuckbutler/telegram-bot | plugins/stats.lua | 3 | 2889 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local socket = require('socket')
local _file_stats = './data/stats.lua'
local _stats
function update_user_stats(msg)
-- Save user to stats table
local from_id = tostring(msg.from.id)
local to_id = tostring(msg.to.i... | gpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/dbg_chili_profiler.lua | 5 | 4146 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "ChiliProfiler",
desc = "",
author = "",
date = "2013",
license = "GPLv2"... | gpl-2.0 |
ArchShaman/Zero-K | lups/headers/general.lua | 5 | 3255 | -- $Id: general.lua 3171 2008-11-06 09:06:29Z det $
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
--
-- file: general.h.lua
-- brief: collection of some usefull functions ... | gpl-2.0 |
slushpupie/lua-smtps | smtps.lua | 3 | 2098 | ------------------------------------------------------------------------
-- Copyright (C) 2012 Jay Kline
--
-- Adopted from LuaSec's https module
--
-- Author: Jay Kline
------------------------------------------------------------------------
local socket = require("socket")
local ssl = require("ssl")
local smtp ... | mit |
dangersos/fffff | 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 |
golem1381/golem_b | 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 |
crazyboy11/orgbot | 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 |
sinavafa/ERRORTG | 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 |
sorblack-x/self-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 |
Shayan123456/botttttt8 | 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 |
badboyam/mr | 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 |
samijon/anti | 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 |
kiarash14/telebumper | 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 |
focusworld/big | 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 |
mixflowtech/logsensor | src/lib/protocol/tcp.lua | 5 | 5180 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local lib = require("core.lib")
local header = require("lib.protocol.header")
local ipsum = require("lib.checksum").ipsum
local ntohs, htons, ntohl, htonl =
lib.ntohs... | apache-2.0 |
ArchShaman/Zero-K | LuaRules/Configs/StartBoxes/LLTAComplexV2.lua | 17 | 2635 | return {
[0] = {
startpoints = {
{1045, 4515},
{511, 339},
{2143, 2857},
{165, 2480},
{1646, 4612},
{1669, 295},
{1618, 4200},
{283, 1266},
},
nameLong = "Western Complex",
nameShort = "West",
boxes = {
{
{2552, 0},
{2420, 268},
{2374, 528},
{2351, 704},
{2226, 7... | gpl-2.0 |
alarouche/premake-core | scripts/package.lua | 12 | 4201 | ---
-- Create a source or binary release package.
---
---
-- Helper function: run a command while hiding its output.
---
local function execQuiet(cmd, ...)
cmd = string.format(cmd, ...) .. " > _output_.log 2> _error_.log"
local z = os.execute(cmd)
os.remove("_output_.log")
os.remove("_error_.log")
return ... | bsd-3-clause |
ArchShaman/Zero-K | LuaRules/Gadgets/mission_orbital_drop.lua | 4 | 17293 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Orbital Drop",
desc = "Makes units spawned with GG.DropUnit fall from the sky.",
author ... | gpl-2.0 |
Phanx/oUF | elements/threat.lua | 7 | 2109 | --[[ Element: Threat Icon
Handles updating and toggles visibility of current threat level icon.
Widget
Threat - A Texture used to display the current threat level.
Notes
This element updates by changing colors of the texture.
The default threat icon will be used if the UI widget is a texture and doesn't
ha... | mit |
songzhiyong/SimplifyReader | library_youku/src/main/res/raw/aes.lua | 130 | 3338 |
---------------------- bit utils
bit={data32={}}
for i=1,32 do
bit.data32[i]=2^(32-i)
end
function bit.d2b(arg)
local tr={}
for i=1,32 do
if arg >= bit.data32[i] then
tr[i]=1
arg=arg-bit.data32[i]
else
tr[i]=0
end
end
return tr
end --bit:d2b
f... | apache-2.0 |
phi-psi/luci | applications/luci-pbx-voicemail/luasrc/model/cbi/pbx-voicemail.lua | 97 | 6962 | --[[
Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com>
This file is part of luci-pbx-voicemail.
luci-pbx-voicemail 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 ... | apache-2.0 |
terry2012/codereason | scripts/valu/add.lua | 3 | 1376 | function onPre(v)
--say that we could have a 32-bit value in any general purpose register
regClass = {}
regClass[CLASS] = GenericRegister
regClass[VALUE] = 21
regClass[WIDTH] = 32
vee.setregclass(v, regClass)
--and then say that we have some other 32-bit value in any general purpose
... | mit |
RedCraneStudio/redcrane-engine | src/lua/text.lua | 1 | 1744 | local ffi = require('ffi')
local rc = require('redcrane')
local M = {}
function M.draw(text, pt, ref)
pt = pt or {x = 0.0, y = 0.0 }
-- Keep this in sync with the enum values in text_render.h
local side
if not ref then
side = 0
elseif ref == "top_left" then
side = 0
elseif re... | bsd-3-clause |
phi-psi/luci | applications/luci-firewall/luasrc/model/cbi/firewall/forward-details.lua | 65 | 3931 | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.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$
]]--
lo... | apache-2.0 |
xzzz9097/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 |
DigitalCrypto/scite-mql | additions/UpdateStatusBar.lua | 2 | 2631 | ------------------------------------------------------------------------------------------------------
-- UpdateStatusBar.lua --
--[[--------------------------------------------------------------------------------------------------
-- --
-- Description (Requires: Script Manage... | isc |
ArchShaman/Zero-K | scripts/shiptrans.lua | 18 | 7204 | include "constants.lua"
local AttachUnit = Spring.UnitScript.AttachUnit
local DropUnit = Spring.UnitScript.DropUnit
-- pieces
local base, platform, fan = piece("base", "platform", "fan")
local wake1, wake2 = piece("wake1", "wake2")
local load_arm, load_shoulder = piece("load_arm", "load_shoulder")
local slot1 = piece ... | gpl-2.0 |
hacker44-h44/tezar | 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 |
badboyam/mr | 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 |
mixflowtech/logsensor | src/lib/lua/alt_getopt.lua | 12 | 4325 | -- Copyright (c) 2009 Aleksey Cheusov <vle@gmx.net>
--
-- 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,... | apache-2.0 |
Uradamus/game_of_life | main.lua | 1 | 5117 | --[[ Conway's Game of Life clone implemented in LÖVE 0.9.1 ]]--
--[[ CONTROLS:
* Space bar starts and pauses the simulation, game starts out puased to allow
for setup.
* While paused:
* Left mouse sets the state of the cell under the cursor to true (alive).
* Right mouse sets the state of the cell under ... | mit |
ArchShaman/Zero-K | LuaUI/Widgets/mission_galaxy_battle_handler.lua | 4 | 25429 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Galaxy Battle Handler",
desc = "Reports outcome of galaxy battle.",
author = "GoogleFrog",
d... | gpl-2.0 |
thisverygoodhhhh/orange | orange/store/mysql_db.lua | 3 | 2999 | local tinsert = table.insert
local type = type
local ipairs = ipairs
local setmetatable = setmetatable
local ngx_quote_sql_str = ngx.quote_sql_str
local mysql = require("resty.mysql")
local utils = require("orange.utils.utils")
local DB = {}
function DB:new(conf)
local instance = {}
instance.conf = conf
... | mit |
jchuang1977/my_luci | applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua | 69 | 2332 | --[[
Luci configuration model for statistics - general collectd configuration
(c) 2008 Freifunk Leipzig / 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
... | apache-2.0 |
LuckyGameCn/LHCocosGame | cocos2d/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua | 5 | 7488 |
local function WebSocketTestLayer()
local layer = cc.Layer:create()
local winSize = cc.Director:getInstance():getWinSize()
local MARGIN = 40
local SPACE = 35
local wsSendText = nil
local wsSendBinary = nil
local wsError = nil
local sendTextStatus = nil
local s... | mit |
d9magai/freeciv | dependencies/tolua-5.2/src/bin/lua/array.lua | 14 | 5856 | -- tolua: array class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1999
-- $Id: array.lua,v 1.4 2011/01/13 13:43:45 fabraham 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 provide... | gpl-2.0 |
ArchShaman/Zero-K | effects/riot.lua | 25 | 2909 | -- riot_shell_m
-- riot_shell_l
-- riot_shell_h
return {
["riot_shell_m"] = {
usedefaultexplosions = false,
shell = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
pr... | gpl-2.0 |
zhepama/rosa | src/states/WorldState.lua | 2 | 2828 | require("src.engine.Camera")
WorldState = rosa.types.State:extends()
function WorldState:load()
love.graphics.setDefaultFilter("nearest")
self.camera = Camera()
self.camera.screen_scale = image_scale
self.camera.pixel_perfect = true
self.scene = rosa.sceneman.newScene()
self.scene:addSyst... | mit |
abasshacker/abas0 | bot/creed.lua | 7 | 9259 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '1.0'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
retu... | gpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/chili/Headers/util.lua | 9 | 8121 | --//=============================================================================
function IsTweakMode()
return widgetHandler.tweakMode
end
--//=============================================================================
function unpack4(t)
if t then
return t[1], t[2], t[3], t[4]
else
return 1, 2, 3, ... | gpl-2.0 |
phi-psi/luci | modules/admin-full/luasrc/model/cbi/admin_system/backupfiles.lua | 85 | 2658 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 Jo-Philipp Wich <xm@subsignal.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://w... | apache-2.0 |
ArchShaman/Zero-K | effects/smoke.lua | 25 | 1123 | -- smoke2
-- smoke
return {
["smoke2"] = {
smoke1 = {
air = true,
class = [[smoke]],
count = 1,
ground = false,
water = false,
properties = {
agespeed = 0.05,
color = 0.3,
... | gpl-2.0 |
KurdyMalloy/packages | lang/luaexpat/files/compat-5.1r5/compat-5.1.lua | 251 | 6391 | --
-- Compat-5.1
-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat)
-- According to Lua 5.1
-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $
--
_COMPAT51 = "Compat-5.1 R5"
local LUA_DIRSEP = '/'
local LUA_OFSEP = '_'
local OLD_LUA_OFSEP = ''
local POF = 'luaopen_'
local LUA_PA... | gpl-2.0 |
DevFalcon/Falcon | plugins/banhammer.lua | 1 | 16598 | -- تـم التعديـل والتعريب بواسطه @Sudo_Sky
--banhammer.lua
local function Falcon(msg, matches)
local data = load_data(_config.moderation.data)
----------------طرد بالرد----------------
if matches[1] == 'طرد' and is_mod(msg) then
if msg.reply_id then
if tonumber(msg.reply.id) == tonumber(our_id) then
return "*لا يم... | gpl-3.0 |
Corvass/BorrowedTime | Libs/LibMagicUtil-1.0/LibMagicUtil-1.0.lua | 1 | 7794 | --[[
**********************************************************************
LibMagicUtil-1.0 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
(at your option) any later version.
... | gpl-3.0 |
focusworld/big | plugins/stats.lua | 1 | 4082 | -- Saves the number of messages from a user
-- Can check the number of messages with !stats
do
local NUM_MSG_MAX = 5
local TIME_CHECK = 4 -- seconds
local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name.... | gpl-2.0 |
ArchShaman/Zero-K | LuaUI/Widgets/localWidgets.lua | 19 | 2597 | function widget:GetInfo()
return {
-- widget handler needs update when changing name
name = "Local Widgets Config",
desc = "GUI to enable/disable local widgets",
author = "SirMaverick",
date = "2009",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true,
}
end
loc... | gpl-2.0 |
mixflowtech/logsensor | src/lib/pcap/pcap.lua | 6 | 2808 | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(...,package.seeall)
local ffi = require("ffi")
-- PCAP file format: http://wiki.wireshark.org/Development/LibpcapFileFormat/
local pcap_file_t = ffi.typeof[[
struct {
/* file header */
uint32_t magic_number; /* magic numb... | apache-2.0 |
DigitalCrypto/scite-mql | api/additions/Snippets.lua | 3 | 5416 | ------------------------------------------------
-- snippets,Óëabbrev²»Í¬µÄÊÇ£¬Ö§³Ötab¼ü¶¨Î»
-- ÊʺÏÑ»·Óï¾äºÍ±È½Ï³¤ÇÒ»áÓÐÖØ¸´µÄ²ÎÊý£¬Èç¹ûÓÐ
-- ÖØ¸´µÄ²ÎÊý£¬½«Êý×ÖÉ趨³ÉÒ»Ñù¼´¿É
------------------------------------------------
local in_snippet
local total_num
local current_num
local begin_pos
local end_pos
local snippet... | isc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.