repo_name
stringlengths
6
69
path
stringlengths
6
178
copies
stringclasses
278 values
size
stringlengths
4
7
content
stringlengths
671
917k
license
stringclasses
15 values
dangersuperbot/super_boomrange
plugins/speaking.lua
1
1979
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 "علیکم السلام" ...
gpl-2.0
hectron/dotfiles
nvim/.config/nvim/after/plugin/lspconfig.rc.lua
1
1826
local nvim_lsp_installed, nvim_lsp = pcall(require, "lspconfig") if not nvim_lsp_installed then print("nvim-lsp is not installed! Aborting") return end local mason_installed, mason_config = pcall(require, "mason") if not mason_installed then print("Unable to install LSP servers because mason is not installed")...
mit
pazos/koreader
spec/unit/document_registry_spec.lua
8
2568
describe("document registry module", function() local DocSettings, DocumentRegistry setup(function() require("commonrequire") DocSettings = require("docsettings") DocumentRegistry = require("document/documentregistry") end) it("should get preferred rendering engine", function()...
agpl-3.0
16cameronk/MyoScripts
ScriptGeneratorPython/luaTemplateSimple.lua
2
1844
scriptId = 'com.thalmic.generated' --TEMPLATE FOR SCRIPT GENERATION, DO NOT MODIFY --Helper functions function conditionallySwapWave(pose) if myo.getArm() == "left" then if pose == "waveIn" then pose = "waveOut" elseif pose == "waveOut" then pose = "waveIn" end en...
mit
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua
7
1132
-------------------------------- -- @module EaseExponentialIn -- @extend ActionEase -- @parent_module cc -------------------------------- -- brief Create the action with the inner action.<br> -- param action The pointer of the inner action.<br> -- return A pointer of EaseExponentialIn action. If creation failed, retu...
mit
ayumus/ayume-ui
your_server/your_character/SavedVariables/NeedToKnow.lua
1
18030
NeedToKnow_Settings = nil NeedToKnow_CharSettings = { ["Locked"] = false, ["Specs"] = { [2] = "G2", }, ["Profiles"] = { ["G2"] = { ["nGroups"] = 4, ["FontSize"] = 12, ["BarTexture"] = "BantoBar", ["bUncompressed"] = true, ["BarSpacing"] = 3, ["BkgdColor"] = { 0, -- [1] ...
unlicense
bottelebot/Umbrella
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempt...
gpl-2.0
pazos/koreader
frontend/apps/cloudstorage/dropbox.lua
2
5612
local BD = require("ui/bidi") local ConfirmBox = require("ui/widget/confirmbox") local DocumentRegistry = require("document/documentregistry") local DropBoxApi = require("apps/cloudstorage/dropboxapi") local InfoMessage = require("ui/widget/infomessage") local MultiInputDialog = require("ui/widget/multiinputdialog") lo...
agpl-3.0
joaofvieira/luci
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua
47
3692
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local device, username, password local ipv6, defaultroute, metric, peerdns, dns, keepalive_failure, keepalive_interval, demand, mtu device = section:taboption("general", Value...
apache-2.0
mys007/cudnn.torch
functional.lua
2
1403
-- this file attempts to provide a purely functional set of bindings -- all functions in this file retain absolutely no state. -- There shouldn't be any reference to "self" in this file. local cudnn = require 'cudnn.env' local errcheck = cudnn.errcheck cudnn.functional = {} local one = torch.FloatTensor({1}); local ...
bsd-2-clause
joaofvieira/luci
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua
68
7091
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local ip = require "luci.ip" local fs = require "nixio.fs" if arg[1] then mp = Map("olsrd", translate("OLSR - Plugins")) p = mp:section(TypedSection, "Load...
apache-2.0
REZATITAN/X
plugins/stats.lua
236
3989
do -- Returns a table with `name` and `msgs` 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_prin...
gpl-2.0
dangersuperbot/super_boomrange
plugins/remind.lua
4
1709
local filename='data/remind.lua' local cronned = load_from_file(filename) local function save_cron(msg, text,date) local origin = get_receiver(msg) if not cronned[date] then cronned[date] = {} end local arr = { origin, text } ; table.insert(cronned[date], arr) serialize_to_file(cronned, filename) re...
gpl-2.0
pazos/koreader
frontend/persist.lua
2
3600
local bitser = require("ffi/bitser") local dump = require("dump") local lfs = require("libs/libkoreader-lfs") local logger = require("logger") local function readFile(file, bytes) local f, str, err f, err = io.open(file, "rb") if not f then return nil, err end str, err = f:read(bytes or "*a...
agpl-3.0
rigeirani/satn
plugins/linkpv.lua
66
30275
do local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostring(msg.to.id)] = { ...
gpl-2.0
JustinNiu/MUSI89903-Assignment2
3rdparty/sndlib/premake4.lua
16
3961
-- sndlib premake4 -- requires premake-4.4 (for os.is64bit) -- currently assumes you want s7 (scheme) as the extension language -------------------------------------------------------------------------------- -- Command Line ------------------------------------------------------------...
mit
soumith/nn
SpatialLPPooling.lua
2
1027
local SpatialLPPooling, parent = torch.class('nn.SpatialLPPooling', 'nn.Sequential') function SpatialLPPooling:__init(nInputPlane, pnorm, kW, kH, dW, dH) parent.__init(self) dW = dW or kW dH = dH or kH self.kW = kW self.kH = kH self.dW = dW self.dH = dH self.nInputPlane = nInputPlane ...
bsd-3-clause
philsiff/Red-Vs-Blue
Red Vs. Blue Files/lua/includes/modules/killicon.lua
2
2591
-- DO NOT EDIT THIS FILE! -- Globals that we need local surface = surface local Msg = Msg local Color = Color --[[--------------------------------------------------------- Name: killicon Desc: Stores and serves killicons for deathnotice -----------------------------------------------------------]] module("...
mit
anonymous12212020/sbss
plugins/welcome.lua
35
3625
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = string.gsub(chat_name, '_', ' ') or '' c...
gpl-2.0
rboman/progs
sandbox/lua/point.lua
1
1503
-- Example of point class made after reading a lua tutorial -- point class local Pt = { } Pt.x = 0 Pt.y = 0 -- constructor Pt.new = function (self, object) object = object or {} -- Use provided table, or create new one setmetatable(object, self) -- Assign meta table self.__index = self -- return Pt value...
apache-2.0
joaofvieira/luci
applications/luci-app-ddns/luasrc/controller/ddns.lua
29
7451
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Copyright 2013 Manuel Munz <freifunk at somakoma dot de> -- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com> -- Licensed to the public under the Apache License 2.0. module("luci.c...
apache-2.0
drmingdrmer/lua-paxos
lib/acid/paxoshelper.lua
2
4861
local _M = { _VERSION = require("acid.paxos._ver") } local tableutil = require( "acid.tableutil" ) local base = require( "acid.paxos.base" ) local errors = base.errors local nr_retry = 5 function _M.get_or_elect_leader(paxos, lease) local rst, err, errmes = paxos:local_get( 'leader' ) if err then pax...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/eyeposer.lua
1
3978
TOOL.Category = "Poser" TOOL.Name = "#tool.eyeposer.name" TOOL.Command = nil TOOL.ConfigName = nil local function ConvertRelativeToEyesAttachment( Entity, Pos ) if ( Entity:IsNPC() ) then return Pos end -- Convert relative to eye attachment local eyeattachment = Entity:LookupAttachment( "eyes" ) if ( ey...
mit
Samake/Minecraft
Minecraft/client/handler/ModelHandlerC.lua
1
3878
--[[ Name: Minecraft Filename: ModelHandlerC.lua Authors: Sam@ke --]] ModelHandlerC = {} function ModelHandlerC:constructor(parent) mainOutput("ModelHandlerC was loaded.") self.mainClass = parent self.lodDistance = 300 self.texturePack = engineLoadTXD("res/models/minecraft.txd") self.blockCol = engineLoa...
gpl-3.0
yetsky/luci
modules/admin-mini/luasrc/controller/mini/index.lua
79
1429
--[[ 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
wgapl/torch7
TensorMath.lua
3
46035
local wrap = require 'cwrap' require 'torchcwrap' local interface = wrap.CInterface.new() local method = wrap.CInterface.new() interface:print([[ #include "TH.h" #include "luaT.h" #include "utils.h" ]]) -- specific to torch: we generate a 'dispatch' function -- first we create a helper function -- n...
bsd-3-clause
NatWeiss/RGP
src/cocos2d-js/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua
14
3014
-------------------------------- -- @module AssetsManager -- @extend Node -- @parent_module cc -------------------------------- -- -- @function [parent=#AssetsManager] setStoragePath -- @param self -- @param #char storagePath -- @return AssetsManager#AssetsManager self (return value: cc.AssetsManager) ----...
mit
philsiff/Red-Vs-Blue
Red Vs. Blue Files/gamemodes/sandbox/entities/weapons/gmod_tool/stools/slider.lua
1
4424
TOOL.Category = "Constraints" TOOL.Name = "#tool.slider.name" TOOL.Command = nil TOOL.ConfigName = nil TOOL.ClientConVar[ "width" ] = "1.5" TOOL.ClientConVar[ "material" ] = "cable/cable" function TOOL:LeftClick( trace ) if ( trace.Entity:IsValid() && trace.Entity:IsPlayer() ) then return end -- If there'...
mit
pazos/koreader
frontend/luxl.lua
9
17425
--[[ This code was derived from the pico_xml project which can be found here: http://kd7yhr.org/bushbo/pico_xml.md The original C code, written by: Brian O. Bush Pure Lua Version written by: William A Adams Dramatic Speed Improvements by: Robert G Jakabosky https://github.com/Wiladams/LAP...
agpl-3.0
kurybr/kury.settings
awesome-config/lain/widget/alsa.lua
4
1481
--[[ Licensed under GNU General Public License v2 * (c) 2013, Luca CPZ * (c) 2010, Adrian C. <anrxc@sysphere.org> --]] local helpers = require("lain.helpers") local shell = require("awful.util").shell local wibox = require("wibox") local string = string -- ALSA volume -- lain.widget.alsa loca...
mit
breakds/corpus-accu
cnn-sentence/nearest.lua
1
2959
require 'torch' require 'nn' require 'os' ---------- Command Line Options ---------- local cmd = torch.CmdLine() cmd:option('-dictionary', '/home/breakds/tmp/bilibili/input/word_vecs.bin', 'path to the word2vec binary dictionary.') cmd:option('-model', '', 'Specifies the folder where trained model resides....
mit
mahdikord/mahdiho
plugins/inrealm.lua
850
25085
-- 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 is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_g...
gpl-2.0
mjarco/sysdig
userspace/sysdig/chisels/v_io_by_type.lua
8
2486
--[[ Copyright (C) 2013-2015 Draios inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
gpl-2.0
yetsky/luci
modules/base/luasrc/http/protocol.lua
55
18445
--[[ HTTP protocol implementation for LuCI (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 http://www.apache.org/licen...
apache-2.0
ZerothAngel/FtDScripts
control/depthcontrol.lua
1
3769
--@ commonstargets commons control drivemaintainer evasion terraincheck sign clamp -- Depth Control module ManualDepthController = DriveMaintainer.new(ManualDepthDriveMaintainerFacing) -- Note: Aside from Offset, all should be absolute altitudes, i.e. -depth DepthControl_Desired = 0 DepthControl_Offset = 0 DepthContro...
mit