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 |
|---|---|---|---|---|---|
MinetestForFun/server-minetestforfun | mods/snow/src/mapgen_v7.lua | 12 | 3183 | minetest.register_biome({
name = "snow_biome_default",
node_top = "default:dirt_with_snow",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 2,
height_min = snow.min_height,
height_max = snow.min_height+60,
heat_point = 10.0,
humidity_point = 40.0,
})
minetes... | unlicense |
Cloudef/darkstar | scripts/zones/Southern_San_dOria/npcs/Chanpau.lua | 5 | 1790 | -----------------------------------
-- Area: Southern San d'Oria
-- NPC: Chanpau
-- Optional Involvement in Quest: A Squire's Test II
-- @zone 230
-- !pos -152 -2 55
-------------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scri... | gpl-3.0 |
woshihuo12/UnityHello | UnityHello/LuaEncoder/luajit_ios/x86_64/jit/dis_x86.lua | 61 | 29376 | ----------------------------------------------------------------------------
-- LuaJIT x86/x64 disassembler module.
--
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
--------------------------------------------------------------------------... | mit |
Cloudef/darkstar | scripts/zones/Port_San_dOria/TextIDs.lua | 2 | 5597 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6425; -- You cannot obtain the <item>. Come back after sorting your inventory.
MYSTIC_RETRIEVER = 6427; -- You cannot obtain the <item>. Speak with the mystic retriever after sorting your inventory.
FULL_INVENTORY... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Meriphataud_Mountains_[S]/npcs/Cavernous_Maw.lua | 5 | 1105 | -----------------------------------
-- Area: Meriphataud Mountains [S]
-- NPC: Cavernous Maw
-- !pos 597 -32 279 97
-- Teleports Players to Meriphataud Mountains
-----------------------------------
package.loaded["scripts/zones/Meriphataud_Mountains_[S]/TextIDs"] = nil;
-----------------------------------
require("scr... | gpl-3.0 |
Cloudef/darkstar | scripts/globals/items/windurst_taco.lua | 2 | 1395 | -----------------------------------------
-- ID: 5172
-- Item: windurst_taco
-- Food Effect: 30Min, All Races
-----------------------------------------
-- MP 20
-- Vitality -1
-- Agility 5
-- MP Recovered While Healing 1
-- Ranged Accuracy % 8 (cap 10)
-- Ranged Attack +1
-----------------------------------------
requi... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Meriphataud_Mountains/npcs/Buliame_RK.lua | 2 | 3012 | -----------------------------------
-- Area: Meriphataud Mountains
-- NPC: Buliame, R.K.
-- Type: Border Conquest Guards
-- !pos -120.393 -25.822 -592.604 119
-----------------------------------
package.loaded["scripts/zones/Meriphataud_Mountains/TextIDs"] = nil;
-----------------------------------
require("scripts/gl... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Abyssea-Vunkerl/MobIDs.lua | 4 | 3267 | require("scripts/globals/keyitems");
-- [QM] = {'name', {list of required trades}, {list of required KIs}, nmID}
-- uncomment lines as NMs are implemented
NM_POPS =
{
-- [17666576] = { 'qm1', {3098}, {}, 17666487}, -- Khalkotaur
-- [17666577] = { 'q... | gpl-3.0 |
nevercast/cuberite | lib/tolua++/src/bin/lua/compat.lua | 23 | 4095 | -------------------------------------------------------------------
-- Real globals
-- _ALERT
-- _ERRORMESSAGE
-- _VERSION
-- _G
-- assert
-- error
-- metatable
-- next
-- print
-- require
-- tonumber
-- tostring
-- type
-- unpack
-------------------------------------------------------------------
-- collectgarbage
--... | apache-2.0 |
jsfdez/premake-core | tests/tools/test_snc.lua | 16 | 3478 | --
-- tests/test_snc.lua
-- Automated test suite for the SNC toolset interface.
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
--
local suite = test.declare("tools_snc")
local snc = premake.tools.snc
--
-- Setup/teardown
--
local wks, prj, cfg
function suite.setup()
wks, prj = test.createW... | bsd-3-clause |
david-xiao/luci | applications/luci-app-asterisk/luasrc/model/cbi/asterisk/dialplan_out.lua | 68 | 3021 | -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local ast = require("luci.asterisk")
local function find_outgoing_contexts(uci)
local c = { }
local h = { }
-- uci:foreach("asterisk", "dialplan",
-- function(s)
-- if not h[s['.name']] then
-- c[#c+1]... | apache-2.0 |
Cloudef/darkstar | scripts/globals/abilities/wizards_roll.lua | 2 | 2960 | -----------------------------------
-- Ability: Wizard's Roll
-- Enhances magic attack for party members within area of effect
-- Optimal Job: Black Mage
-- Lucky Number: 5
-- Unlucky Number: 9
-- Level 58
-- Phantom Roll +1 Value: 2
--
-- Die Roll |No BLM |With BLM
-- -------- -------- -----------
-- 1 ... | gpl-3.0 |
Cloudef/darkstar | scripts/zones/Sea_Serpent_Grotto/TextIDs.lua | 5 | 2541 | -- Variable TextID Description text
-- General Texts
ITEM_CANNOT_BE_OBTAINED = 6380; -- You cannot obtain the item <item> come back again after sorting your inventory
FULL_INVENTORY_AFTER_TRADE = 6384; -- You cannot obtain the <item>. Try trading again after sorting your inventory
ITEM_OBTAINED = 638... | gpl-3.0 |
focusworld/focus_aspp | plugins/inpm.lua | 243 | 3007 | 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 |
nyasukun/openstackcraft | world/Plugins/Core/spawn.lua | 5 | 2174 | function HandleSpawnCommand(Split, Player)
local WorldIni = cIniFile()
WorldIni:ReadFile(Player:GetWorld():GetIniFileName())
local SpawnX = WorldIni:GetValue("SpawnPosition", "X")
local SpawnY = WorldIni:GetValue("SpawnPosition", "Y")
local SpawnZ = WorldIni:GetValue("SpawnPosition", "Z")
local flag = 0
if... | apache-2.0 |
MinetestForFun/server-minetestforfun | minetestforfun_game/mods/farming/beanpole.lua | 7 | 4617 | --[[
All textures by
(C) Auke Kok <sofar@foo-projects.org>
CC-BY-SA-3.0
]]
local S = farming.intllib
-- beans
minetest.register_craftitem("farming:beans", {
description = S("Green Beans"),
inventory_image = "farming_beans.png",
on_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thin... | unlicense |
Ali-2h/hossein | plugins/invite.lua | 299 | 1025 | -- Invite other user to the chat group.
-- Use !invite name User_name or !invite id id_number
-- The User_name is the print_name (there are no spaces but _)
do
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local user = matches[2]
-- Use... | gpl-2.0 |
rastin45/botrider12 | plugins/invite.lua | 299 | 1025 | -- Invite other user to the chat group.
-- Use !invite name User_name or !invite id id_number
-- The User_name is the print_name (there are no spaces but _)
do
local function callback(extra, success, result)
vardump(success)
vardump(result)
end
local function run(msg, matches)
local user = matches[2]
-- Use... | gpl-2.0 |
NiLSPACE/Chatter | Config.lua | 1 | 2925 |
-- This file contains the LoadConfig function.
-- The default config.
local m_ConfigDefaults = [[
Prefix = "<{PLAYERNAME}> {MESSAGE}",
UsePlayerColor = true,
UseRankColor = false,
ChatPerWorld = true,
AllowChatColor = true,
ColorSymbol = "@",
PersonalPrefixes =
{
-- You can add a player by using [... | apache-2.0 |
DARKRPISSHITFIXTHISUPDATE/DarkRP | gamemode/modules/fadmin/fadmin/playeractions/slap/sv_init.lua | 4 | 2160 | local function ExecuteSlap(target, Amount, ply)
if not IsValid(target) or not IsValid(ply) then return end
local Force = Vector(math.Rand(-500, 500), math.Rand(-500, 500), math.Rand(-100, 700))
local DmgInfo = DamageInfo()
DmgInfo:SetDamage(Amount)
DmgInfo:SetDamageType(DMG_DROWN)
DmgInfo:SetA... | mit |
Cloudef/darkstar | scripts/zones/Norg/npcs/Verctissa.lua | 5 | 2751 | -----------------------------------
-- Area: Norg
-- NPC: Verctissa
-- Starts Quest: Trial Size Trial By Water
-- !pos -13 1 -20 252
-----------------------------------
package.loaded["scripts/zones/Norg/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/... | gpl-3.0 |
Cloudef/darkstar | scripts/globals/items/slice_of_juicy_mutton.lua | 2 | 1046 | -----------------------------------------
-- ID: 4335
-- Item: slice_of_juicy_mutton
-- Food Effect: 240Min, All Races
-----------------------------------------
-- Strength 3
-- Intelligence -1
-- Attack % 27
-- Attack Cap 35
-----------------------------------------
require("scripts/globals/status");
-----------------... | gpl-3.0 |
fgprodigal/RayUI | Interface/AddOns/RayUI/modules/chat/chathide.lua | 2 | 6937 | ----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Chat")
local CH = _Chat
local isMoving = false
local hasNew = false
local timeout = 0
local chatIn = true
local channelNumbers = {
[1] = true,
[2] = t... | mit |
Cloudef/darkstar | scripts/globals/items/shivas_shotel.lua | 7 | 1042 | -----------------------------------------
-- ID: 17711
-- Item: Shiva's Shotel
-----------------------------------------
require("scripts/globals/status");
require("scripts/globals/magic");
require("scripts/globals/msg");
-----------------------------------
function onAdditionalEffect(player,target,damage)
local c... | gpl-3.0 |
JesseMaurais/Lux | test/test-array.lua | 1 | 1092 | print "Test the use of C arrays for data storage"
array = require'array' -- load the array module
print 'Store x for x from 1 to 5 in array "a"'
a = array.int.new(5)
for x = 1, #a do a[x] = x end
print('a = ' .. tostring(a))
print 'We can do arithmetic adjustments on the array bounds'
print('a + 2 = ' .. tostring(... | mit |
MinetestForFun/server-minetestforfun | minetestforfun_game/mods/farming/init.lua | 7 | 16938 | --[[
Minetest Farming Redo Mod 1.22 (4th June 2016)
by TenPlus1
NEW growing routine by prestidigitator
auto-refill by crabman77
]]
farming = {}
farming.mod = "redo"
farming.path = minetest.get_modpath("farming")
farming.hoe_on_use = default.hoe_on_use
farming.select = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5,... | unlicense |
Cloudef/darkstar | scripts/zones/Upper_Jeuno/npcs/Deadly_Minnow.lua | 5 | 1511 | -----------------------------------
-- Area: Upper Jeuno
-- NPC: Deadly Minnow
-- Standard Merchant NPC
-- Involved in Quest: Borghertz's Hands (1st quest only)
-- @zone 244
-- !pos -5 1 48
-----------------------------------
package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil;
----------------------------------... | gpl-3.0 |
keidax/awesome | lib/gears/matrix.lua | 1 | 7626 | ---------------------------------------------------------------------------
-- An implementation of matrices for describing and working with affine
-- transformations.
-- @author Uli Schlachter
-- @copyright 2015 Uli Schlachter
-- @release @AWESOME_VERSION@
-- @classmod gears.matrix
------------------------------------... | gpl-2.0 |
Cloudef/darkstar | scripts/zones/Windurst_Woods/npcs/Anillah.lua | 2 | 1506 | -----------------------------------
-- Area: Windurst Woods
-- NPC: Anillah
-- Type: Clothcraft Image Support
-- !pos -34.800 -2.25 -119.950 241
-----------------------------------
package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/status");
requi... | gpl-3.0 |
wurstscript/WurstScript | Wurstpack/findpath.lua | 3 | 1033 | print "Grimoire 1.5 5/4/2008"
grimregpath = "Software\\Grimoire"
key = grimregpath
val = "War3InstallPath"
path = grim.getregpair(key,val)
-- uncomment to force path
--path = "C:\\Warcraft III"
if not grim.exists(path.."\\worldedit.exe") then
val = "InstallPathX"
path = grim.getregpair(key,val)
end
if not grim.ex... | apache-2.0 |
peterayeni/kong | spec/plugins/ratelimiting/access_spec.lua | 13 | 7363 | local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local cjson = require "cjson"
local STUB_GET_URL = spec_helper.STUB_GET_URL
local function wait()
-- Wait til the beginning of a new second before starting the test
-- to avoid ending up in an edge case when the s... | apache-2.0 |
xXX-mRx-XXx/xxXxx | plugins/ar-h3 (1).lua | 2 | 1444 |
do
local function run(msg, matches)
if is_momod(msg) and matches[1]== "م3" then
return [[اوامر المطورين فقط
🇮🇶🇮🇶🇮🇶🇮🇶🇮🇶🇮🇶🇮🇶
🔘 ترقيه سوبر : لترقيه المجموعه سوبر
🔘 تفعيل : لتفعيل البوت ب المجموعه
🔘 تعطيل : لتعطيل البوت ب المجموعه
🔘 رفع المدير : لرفع مدير للمجموعه
🔘 رفع اداري : لرفع اداري للمجموعه
... | gpl-2.0 |
m2fan/dd | plugins/banhammer.lua | 34 | 11497 |
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 |
taestone/opennmt_merge | onmt/modules/Bridge.lua | 8 | 2185 | --[[ Bridge between encoder and decoder. ]]
local Bridge, parent = torch.class('onmt.Bridge', 'onmt.Network')
local options = {
{
'-bridge', 'copy',
[[Define how to pass encoder states to the decoder. With `copy`, the encoder and decoder
must have the same number of layers.]],
{
enum = {'copy... | mit |
matmutant/sl4a | lua/luasocket/src/ftp.lua | 144 | 9120 | -----------------------------------------------------------------------------
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
-----------------------------------------------------------------------------
-------------------... | apache-2.0 |
samael65535/skynet | lualib/socket.lua | 4 | 9323 | local driver = require "socketdriver"
local skynet = require "skynet"
local skynet_core = require "skynet.core"
local assert = assert
local socket = {} -- api
local buffer_pool = {} -- store all message buffer object
local socket_pool = setmetatable( -- store all socket object
{},
{ __gc = function(p)
for id,v in ... | mit |
maikerumine/nuclear_holocaust | mods/mobs_fallout/bones.lua | 2 | 1464 | --mobs_fallout v0.0.4
--maikerumine
--made for Extreme Survival game
--THESE ARE "FAKE" BONES OFR USE WITH THESE MOBS
minetest.register_node("mobs_fallout:bones", {
description = "Bones",
tiles = {
"bones_top.png",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"bones_front.... | lgpl-2.1 |
peterayeni/kong | spec/plugins/ratelimiting/daos_spec.lua | 12 | 3625 | local spec_helper = require "spec.spec_helpers"
local timestamp = require "kong.tools.timestamp"
local uuid = require "uuid"
local env = spec_helper.get_env()
local dao_factory = env.dao_factory
local ratelimiting_metrics = dao_factory.ratelimiting_metrics
describe("Rate Limiting Metrics", function()
local api_id =... | apache-2.0 |
joeyhng/nn | MultiLabelSoftMarginCriterion.lua | 7 | 2356 | --[[
-- A MultiLabel multiclass criterion based on sigmoid:
--
-- the loss is:
-- l(x,y) = - sum_i y[i] * log(p[i]) + (1 - y[i]) * log (1 - p[i])
-- where p[i] = exp(x[i]) / (1 + exp(x[i]))
--
-- and with weights:
-- l(x,y) = - sum_i weights[i] (y[i] * log(p[i]) + (1 - y[i]) * log (1 - p[i]))
--
-- This uses the stable... | bsd-3-clause |
eku/nodemcu-firmware | lua_examples/pcm/play_network.lua | 8 | 3037 | -- ****************************************************************************
-- Network streaming example
--
-- stream = require("play_network")
-- stream.init(pin)
-- stream.play(pcm.RATE_8K, ip, port, "/jump_8k.u8", function () print("stream finished") end)
--
-- Playback can be stopped with stream.stop().
-- And ... | mit |
cmsj/hammerspoon | extensions/chooser/init.lua | 1 | 3107 | --- === hs.chooser ===
---
--- Graphical, interactive tool for choosing/searching data
---
--- Notes:
--- * This module was influenced heavily by Choose, by Steven Degutis (https://github.com/sdegutis/choose)
require("hs.styledtext")
require("hs.drawing.color")
local chooser = require("hs.chooser.internal")
local win... | mit |
cmsj/hammerspoon | extensions/keycodes/init.lua | 2 | 5964 | --- === hs.keycodes ===
---
--- Convert between key-strings and key-codes. Also provides functionality for querying and changing keyboard layouts.
local log = require"hs.logger".new("hs.keycodes", "warning")
-- fallback table based on ANSI-Standard US Keyboard as defined in /System/Library/Frameworks/Carbon.framework... | mit |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/UserDefault.lua | 9 | 4601 |
--------------------------------
-- @module UserDefault
-- @parent_module cc
--------------------------------
-- Set integer value by key.<br>
-- param key The key to set.<br>
-- param value A integer value to set to the key.<br>
-- js NA
-- @function [parent=#UserDefault] setIntegerForKey
-- @param self
-- @param #... | mit |
warreee/Algorithm-Implementations | Monty_Hall_Problem/Lua/Yonaba/monty_hall.lua | 26 | 1033 | -- Monty-Hall problem implementation
-- See : http://en.wikipedia.org/wiki/Monty_Hall_problem
-- Create a range of values as a list
local function range(n)
local t = {}
for i = 1,n do t[i] = i end
return t
end
-- Simulates Monty Hall problem
-- ndoors : number of doors
-- switch : whether or not the player want... | mit |
ScegfOd/wesnoth | data/ai/micro_ais/cas/ca_herding_herd_sheep.lua | 7 | 3249 | local H = wesnoth.require "lua/helper.lua"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local herding_area = wesnoth.require "ai/micro_ais/cas/ca_herding_f_herding_area.lua"
local function get_dogs(cfg)
local dogs = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(c... | gpl-2.0 |
taestone/opennmt_merge | onmt/train/Optim.lua | 2 | 7371 | local Optim = torch.class('Optim')
local options = {
{
'-max_batch_size', 64,
[[Maximum batch size.]],
{
valid = onmt.utils.ExtendedCmdLine.isUInt()
}
},
{
'-uneven_batches', false,
[[If set, batches are filled up to `-max_batch_size` even if the source lengths are different.
... | mit |
deplinenoise/tundra | scripts/tundra/syntax/ispc.lua | 1 | 2110 | -- ispc.lua - Support for Intel SPMD Program Compiler
module(..., package.seeall)
local path = require "tundra.path"
DefRule {
Name = "ISPC",
Command = "$(ISPCCOM)",
Blueprint = {
Source = { Required = true, Type = "string" },
Targets = { Required = false, Type = "string" },
},
Setup = function (... | mit |
coderstudy/luarocks | src/luarocks/util.lua | 14 | 21238 |
--- Assorted utilities for managing tables, plus a scheduler for rollback functions.
-- Does not requires modules directly (only as locals
-- inside specific functions) to avoid interdependencies,
-- as this is used in the bootstrapping stage of luarocks.cfg.
--module("luarocks.util", package.seeall)
local util = {}
... | mit |
micahmumper/naev | dat/ai/tpl/merchant.lua | 6 | 2284 | include("dat/ai/include/basic.lua")
-- Variables
mem.enemy_close = 500 -- Distance enemy is too close for comfort
-- Required control rate
control_rate = 2
-- Required "control" function
function control ()
task = ai.taskname()
enemy = ai.getenemy()
-- Runaway if enemy is near
if task ~= "runaway" a... | gpl-3.0 |
keith-rollin/mal | lua/step7_quote.lua | 40 | 4344 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local Env = require('env')
local core = require('core')
local List, Vector, HashMap = types.List, typ... | mpl-2.0 |
maikerumine/nuclear_holocaust | mods/handle_schematics/analyze_we_file.lua | 4 | 2456 | handle_schematics.analyze_we_file = function(scm, we_origin)
local c_ignore = minetest.get_content_id("ignore")
-- this table will contain the nodes read
local nodes = {}
-- check if it is a worldedit file
-- (no idea why reading that is done in such a complicated way; a simple deserialize and iteration over all... | lgpl-2.1 |
tesslerc/H-DRLN | DQN-HDRLN/test_agent.lua | 1 | 16884 | --[[
Copyright (c) 2014 Google Inc.
See LICENSE file for full terms of limited license.
]]
function make_step(action, socketnum)
--print("Sending command")
sendCommand(action, socketnum)
return getState(socketnum, action)
end
function sendCommand(action, socketnum)
local s = outSocket
local err
... | mit |
reedscot/cvpr2016 | modules/BidirectionalGRU.lua | 1 | 5926 |
local BidirectionalGRU = {}
function BidirectionalGRU.rnn(nstep, avg, emb_dim)
if avg == nil then
avg = 0
end
if emb_dim == nil then
emb_dim = 256
end
local inputs = {}
for n = 1,nstep do
table.insert(inputs, nn.Identity()())
end
-- gates for update
local i2h_update_fwd = {}
local h2h_... | mit |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua | 8 | 3329 |
--------------------------------
-- @module JumpTiles3D
-- @extend TiledGrid3DAction
-- @parent_module cc
--------------------------------
-- brief Set the amplitude rate of the effect.<br>
-- param amplitudeRate The value of amplitude rate will be set.
-- @function [parent=#JumpTiles3D] setAmplitudeRate
-- @param s... | mit |
excessive/love-against-humanity | client/libs/LoveFrames/objects/internal/scrollable/scrollbar.lua | 10 | 8481 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- scrollbar class
local newobject = loveframes.NewObject("scrollbar", "loveframes_object_scrollbar", true)
--[[-----------... | mit |
taestone/opennmt_merge | onmt/SeqTagger.lua | 3 | 4458 | --[[ Sequence to sequence model with attention. ]]
local SeqTagger, parent = torch.class('SeqTagger', 'Model')
local options = {
{
'-word_vec_size', { 500 },
[[List of embedding sizes: `word[ feat1[ feat2[ ...] ] ]`.]],
{
structural = 0
}
},
{
'-pre_word_vecs_enc', '',
[[Path to pre... | mit |
botcatgood/mr | plugins/all.lua | 36 | 4653 | 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 |
micahmumper/naev | dat/events/start.lua | 11 | 4841 | include "dat/events/tutorial/tutorial-common.lua"
-- localization stuff, translators would work here
lang = naev.lang()
if lang == "es" then
else -- default english
title = {}
text = {}
title[1] = "Flying License Acquired!"
text[1] = [["Congratulations, %s," your flying instructor says through the radio... | gpl-3.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/TintTo.lua | 11 | 1667 |
--------------------------------
-- @module TintTo
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
-- initializes the action with duration and color
-- @function [parent=#TintTo] initWithDuration
-- @param self
-- @param #float duration
-- @param #unsigned char red
-- @param #unsign... | mit |
JMCGameDev/gamecode4 | Assets/Scripts/TeapotStates.lua | 44 | 13650 | --========================================================================
-- ActorManager.lua : Defines all the states for an AI controlled teapot
--
-- Part of the GameCode4 Application
--
-- GameCode4 is the sample application that encapsulates much of the source code
-- discussed in "Game Coding Complete - 4t... | lgpl-3.0 |
joeyhng/nn | hessian.lua | 8 | 16620 | ----------------------------------------------------------------------
-- hessian.lua: this file appends extra methods to modules in nn,
-- to estimate diagonal elements of the Hessian. This is useful
-- to condition learning rates individually.
----------------------------------------------------------------------
nn.... | bsd-3-clause |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/Layout.lua | 2 | 13005 |
--------------------------------
-- @module Layout
-- @extend Widget,LayoutProtocol
-- @parent_module ccui
--------------------------------
-- Sets background color vector for layout.<br>
-- This setting only take effect when layout's color type is BackGroundColorType::GRADIENT<br>
-- param vector The color vector in... | mit |
ramonsnir/redis | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
AltTab00/UnRealistic | prototypes/entity/entity.lua | 1 | 19446 | data.raw.furnace["stone-furnace"].energy_source.fuel_category = "fire"
data.raw.boiler["boiler"].energy_source.fuel_category = "fire"
data.raw.inserter["burner-inserter"].energy_source.fuel_category = "fire"
data.raw["mining-drill"]["burner-mining-drill"].energy_source.fuel_category = "fire"
data.raw["lab"]["lab"].fast... | mit |
XR-s/Do-an-Sar- | sf/share/locale/turkey/quest/forked_road_point.lua | 1 | 4358 | quest forked_road_point begin
state start begin
when kill with npc.is_pc() begin
if forked.isforkedmapindex( pc.get_map_index() ) == true then
if npc.empire != pc.empire then
if pc.get_empire() == 1 then
if game.get_event_flag("3yolsinir") > game.get_event_flag("3yolkirmizi") then
local kirm... | apache-2.0 |
iZarif/flvk | flvk.lua | 1 | 1999 | local flvk = {}
flvk._VERSION = 1.0
local https = require("ssl.https")
local ltn12 = require("ltn12")
local dkjson = require("dkjson")
function flvk.get_version()
return flvk._VERSION
end
function flvk.to_json(_table)
assert(type(_table) == "table", "bad argument #1 to 'to_json' (table expected, got " .. type(_t... | mit |
Whit3Tig3R/z1z1z1z1 | plugins/linkpv.lua | 107 | 31031 | 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 |
EvilHero90/otclient | modules/client_background/background.lua | 9 | 1162 | -- private variables
local background
local clientVersionLabel
-- public functions
function init()
background = g_ui.displayUI('background')
background:lower()
clientVersionLabel = background:getChildById('clientVersionLabel')
clientVersionLabel:setText(g_app.getName() .. ' ' .. g_app.getVersion() .. '\n' ..
... | mit |
clizana/goearpsp | libf.lua | 1 | 27113 | --[[
Pure Goear Core functions
--]]
function search(searchtext, currpage)
success, postresult = pge.net.postform("http://77.67.11.180/reqsearch.php?q="..string.gsub(searchtext, " ","+").."&p="..currpage, "", 2048)
--sleep for one and a half second
pge.delay(500*500)
return get_results(postresult)
end
functi... | mit |
Hobadee/grandMA2_LUA_ldoc | gma.show.property.lua | 1 | 1662 | ---GMA LUA functions to get and adjust object properties
--@module gma.show.property
---Returns the number of properties associated with this handle
--
--@tparam number handle Handle as given by @{gma.show.getobj.handle}
--@treturn number Number of properties attached to handle object
function gma.show.property.amoun... | gpl-3.0 |
kiarash14/sbump | plugins/stats.lua | 2 | 3970 | 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 |
andronmobi/vlc-parrot-asteroid | share/lua/playlist/liveleak.lua | 91 | 1883 | --[[
$Id$
Copyright © 2012 VideoLAN and AUTHORS
Authors: Ludovic Fauvet <etix@videolan.org>
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 optio... | gpl-2.0 |
Warboss-rus/wargameengine | WargameEngine/bullet/test/SharedMemory/premake4.lua | 4 | 5917 | project ("Test_SharedMemoryPhysicsClient")
language "C++"
kind "ConsoleApp"
includedirs {"../../src", "../../examples"}
links {
"BulletFileLoader",
"Bullet3Common",
"LinearMath"
}
files {
"test.c",
"../../examples/SharedMemory/PhysicsClient.cpp",
"../../examples/SharedMemory/Physics... | gpl-3.0 |
yaohuang2005/ntopng-json-rabbitmq-python-analysis | scripts/lua/admin/password_reset.lua | 1 | 1085 | --
-- (C) 2013 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPHeader('text/html; charset=iso-8859-1')
username = _GET["username"]
old_password = _GET["old_password"]
new_password = _GET["new_password"]
confirm_new_passwo... | gpl-3.0 |
EXILEDNONAME/SERVER | lua/quiz/quiz.lua | 5 | 7875 | --[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
quiz = {} -- object
q_dictionary = {} -- dictionary word=question
q_records_current = { } -- table with current player records
q_records_total = {} -- ... | gpl-2.0 |
jcjohnson/densecap | run_model.lua | 3 | 6531 | require 'torch'
require 'nn'
require 'image'
require 'densecap.DenseCapModel'
local utils = require 'densecap.utils'
local box_utils = require 'densecap.box_utils'
local vis_utils = require 'densecap.vis_utils'
--[[
Run a trained DenseCap model on images.
The inputs can be any one of:
- a single image: use the flag... | mit |
hfjgjfg/creed3 | plugins/welcome.lua | 190 | 3526 | 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 |
botcatgood/mr | plugins/welcome.lua | 190 | 3526 | 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 |
EvilHero90/otclient | modules/game_textwindow/textwindow.lua | 2 | 3421 | local windows = {}
function init()
g_ui.importStyle('textwindow')
connect(g_game, { onEditText = onGameEditText,
onEditList = onGameEditList,
onGameEnd = destroyWindows })
end
function terminate()
disconnect(g_game, { onEditText = onGameEditText,
o... | mit |
mohammads15/super-window | plugins/welcom.lua | 114 | 3529 | 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 |
z0fa/ChatNorris | libraries/AceGUI-3.0/AceGUI-3.0.lua | 47 | 23674 | --- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
-- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
-- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
-- stand-alone distribution.
--
-- **Note**:... | gpl-3.0 |
ScegfOd/wesnoth | data/ai/micro_ais/cas/ca_wolves_multipacks_wander.lua | 4 | 5862 | local H = wesnoth.require "lua/helper.lua"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local LS = wesnoth.require "lua/location_set.lua"
local WMPF = wesnoth.require "ai/micro_ais/cas/ca_wolves_multipacks_functions.lua"
local ca_wolves_mult... | gpl-2.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/PointLight.lua | 11 | 1236 |
--------------------------------
-- @module PointLight
-- @extend BaseLight
-- @parent_module cc
--------------------------------
-- get or set range
-- @function [parent=#PointLight] getRange
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function... | mit |
breakds/torch7 | init.lua | 24 | 3702 |
-- We are using paths.require to appease mkl
-- Make this work with LuaJIT in Lua 5.2 compatibility mode, which
-- renames string.gfind (already deprecated in 5.1)
if not string.gfind then
string.gfind = string.gmatch
end
if not table.unpack then
table.unpack = unpack
end
require "paths"
paths.require "libto... | bsd-3-clause |
micahmumper/naev | dat/factions/equip/soromid.lua | 8 | 5453 | -- Generic equipping routines, helper functions and outfit definitions.
include("dat/factions/equip/generic.lua")
--[[
TODO PROPERLY FILL OUT!!!
Right now just using empire stuff as a temporary placeholder.
--]]
--[[
-- @brief Does soromid pilot equipping
--
-- @param p Pilot to equip
--]]
function equip( ... | gpl-3.0 |
eku/nodemcu-firmware | lua_examples/sjson-streaming.lua | 7 | 1708 | -- Test sjson and GitHub API
local s = tls.createConnection()
s:on("connection", function(sck)
sck:send(
[[GET /repos/nodemcu/nodemcu-firmware/git/trees/master HTTP/1.0
User-agent: nodemcu/0.1
Host: api.github.com
Connection: close
Accept: application/json
]])
end)
local function startswith(String, Start)
return... | mit |
lukasc-ch/nn | Container.lua | 9 | 1842 | -- This is code common to container modules, which are collections of
-- smaller constituent modules like Parallel, Sequential, etc.
local Container, parent = torch.class('nn.Container', 'nn.Module')
function Container:__init(...)
parent.__init(self, ...)
self.modules = {}
end
function Container:add(module)
... | bsd-3-clause |
PavlosMelissinos/densecap | test/ReshapeBoxFeatures_test.lua | 4 | 1740 | require 'torch'
require 'nn'
require 'cutorch'
require 'cunn'
require 'ReshapeBoxFeatures'
require 'densecap.modules.MakeBoxes'
local gradcheck = require 'gradcheck'
local tests = {}
local tester = torch.Tester()
function tests.testBackwardNumeric()
local N, k, D, H, W = 2, 3, 4, 5, 6
local mod = nn.ReshapeBoxF... | mit |
xXX-mRx-XXx/xxXxx | plugins/all.lua | 16 | 4339 | do
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_name(user)..' ['..user_id..']'
return u... | gpl-2.0 |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua | 8 | 6145 |
--------------------------------
-- @module Physics3DHingeConstraint
-- @extend Physics3DConstraint
-- @parent_module cc
--------------------------------
-- @overload self, mat4_table, mat4_table
-- @overload self
-- @function [parent=#Physics3DHingeConstraint] getHingeAngle
-- @param self
-- @param... | mit |
CaptainCN/QCEditor | cocos2d/cocos/scripting/lua-bindings/auto/api/FadeIn.lua | 11 | 1229 |
--------------------------------
-- @module FadeIn
-- @extend FadeTo
-- @parent_module cc
--------------------------------
-- js NA
-- @function [parent=#FadeIn] setReverseAction
-- @param self
-- @param #cc.FadeTo ac
-- @return FadeIn#FadeIn self (return value: cc.FadeIn)
--------------------------------
-... | mit |
qj739/BadRotations | Rotations/_NonClass/PokeRotation/PokeSwapper.lua | 6 | 4577 | function PokeSwapper()
--[[ Swap Config ]]
if not swapperLoaded then
swapperLoaded = true;
-- Disable all filters in Pet Journal --
if IsSwapping == nil then IsSwapping = GetTime() end
function SuperPetSwapper()
... | gpl-3.0 |
micahmumper/naev | dat/factions/spawn/dvaered.lua | 6 | 3505 | include("dat/factions/spawn/common.lua")
include("dat/factions/spawn/mercenary_helper.lua")
-- @brief Spawns a small patrol fleet.
function spawn_patrol ()
local pilots = {}
local r = rnd.rnd()
if r < pbm then
pilots = spawnLtMerc("Dvaered")
elseif r < 0.5 then
scom.addPilot( pilots, "... | gpl-3.0 |
EXILEDNONAME/SERVER | lua/include/string.lua | 7 | 1737 | --[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- Split text into table by delimeter
-- Usage example: string.split("one,two",",")
function string:split(str, sep)
str = str or '%s+'
local st, g ... | gpl-2.0 |
warreee/Algorithm-Implementations | Josephus_Problem/Lua/Yonaba/josephus.lua | 26 | 1689 | -- Josephus problem implementation
-- See: http://en.wikipedia.org/wiki/Josephus_problem
-- Returns the survivor
-- n : the initial number of people
-- k : the count for each step
-- returns : the survivor's number
local function josephus_recursive(n, k)
if n == 1 then return 1
else
return ((joseph... | mit |
GuLiPing-Hz/PL | lua/study/a.lua | 1 | 3857 | --#!lua 5.3.2
--@guliping
--[[
查询lua环境
for k,v in pairs(_G) do print(k,v) end
--]]
--[[
基础篇, 初识lua
print 和 type都是 lua内建的函数。
初识lua类型和运算符
http://blog.csdn.net/glp3329/article/details/52511855
lua 关键字:
and break do else
elseif end false for
function if in local
nil not or repeat
return then true until
whil... | gpl-3.0 |
maikerumine/nuclear_holocaust | mods/shooter/crossbow.lua | 2 | 8878 | SHOOTER_CROSSBOW_USES = 50
SHOOTER_ARROW_TOOL_CAPS = {damage_groups={fleshy=2}}
SHOOTER_ARROW_LIFETIME = 180 -- 3 minutes
minetest.register_alias("shooter:arrow", "shooter:arrow_white")
minetest.register_alias("shooter:crossbow_loaded", "shooter:crossbow_loaded_white")
local dye_basecolors = (dye and dye.basecolors) ... | lgpl-2.1 |
hongling0/skynet | service/clustersender.lua | 6 | 2156 | local skynet = require "skynet"
local sc = require "skynet.socketchannel"
local socket = require "skynet.socket"
local cluster = require "skynet.cluster.core"
local channel
local session = 1
local node, nodename, init_host, init_port = ...
local command = {}
local function send_request(addr, msg, sz)
-- msg is a lo... | mit |
wingedkiwi/thrift | lib/lua/Thrift.lua | 10 | 6622 | --
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | apache-2.0 |
EvilHero90/otclient | modules/corelib/string.lua | 1 | 1127 | -- @docclass string
function string:split(delim)
local start = 1
local results = {}
while true do
local pos = string.find(self, delim, start, true)
if not pos then
break
end
table.insert(results, string.sub(self, start, pos-1))
start = pos + string.len(delim)
end
table.insert(result... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.