conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add looping to coro example\n" }, { "from": "human", "value": "local FS = require('fs');\n\nlocal co\nco = coroutine.create(function (filename)\n\n print(\"opening...\")\n local fd = FS.open(co, filename, 'r', \"0644\")\n p(\"on_open\", {fd=fd})\n\n print(\"fsta...
lua
chosen
[ { "from": "system", "value": "Add limit to message buffer\n" }, { "from": "human", "value": "--\n-- Copyright 2014 Ilkka Oksanen <iao@iki.fi>\n--\n-- Licensed under the Apache License, Version 2.0 (the \"License\");\n-- you may not use this file except in compliance with the License.\n-- ...
lua
chosen
[ { "from": "system", "value": "Fix the duplicate detection of multi-line IRC messages\n" }, { "from": "human", "value": "--\n-- Copyright 2015 Ilkka Oksanen <iao@iki.fi>\n--\n-- Licensed under the Apache License, Version 2.0 (the \"License\");\n-- you may not use this file except in complia...
lua
chosen
[ { "from": "system", "value": "Add children to map, reformat API from tween --> map\n" }, { "from": "human", "value": "local function Map(ItemList, Function, ...)\n\t-- @param ItemList The items to map the function to\n\t-- @param Function The function to be called\n\t\t-- Function(ItemInList, [....
lua
chosen
[ { "from": "human", "value": "Add sample game config file\n" }, { "from": "gpt", "value": "-- Game Configuration File game_config.lua\n\n-- Information about the game, set by the developer, such as title,\n-- starting map, et cetera.\n\nTITLE = \"Deucalion Engine\"\nSTARTING_MAP = \"map001\"\n" ...
lua
chosen
[ { "from": "system", "value": "Use global_exists to test for the existence" }, { "from": "human", "value": "------------------------------------------------------------\n-- Copyright (c) 2016 tacigar. All rights reserved.\n-- https://github.com/tacigar/maidroid\n----------------------------------...
lua
chosen
[ { "from": "system", "value": "Use Transform in stream example for Joystick\n" }, { "from": "human", "value": "local fs = require('fs')\nlocal Buffer = require('buffer').Buffer\n\n-- https://www.kernel.org/doc/Documentation/input/joystick-api.txt\nlocal function parse(buffer)\n local event = {\n...
lua
chosen
[ { "from": "system", "value": "feat: Add another way to get the angle between vectors with more numeric stability\n" }, { "from": "human", "value": "--- Utilities involving Vector3 objects in Roblox\n-- @module Vector3Utils\n\nlocal require = require(script.Parent.loader).load(script)\n\nlocal Ma...
lua
chosen
[ { "from": "human", "value": "Add script to show contents of save files\n" }, { "from": "gpt", "value": "require 'paths'\nrequire 'nn'\nrequire 'cutorch'\nrequire 'cunn'\nrequire 'LeakyReLU'\nrequire 'dpnn'\nrequire 'layers.cudnnSpatialConvolutionUpsample'\nrequire 'stn'\n\nOPT = lapp[[\n --save...
lua
chosen
[ { "from": "system", "value": "Add IsAvailable, support for returning promises\n" }, { "from": "human", "value": "--- Base of a template retrieval system\n-- @classmod TemplateProvider\n\nlocal TemplateProvider = {}\nTemplateProvider.ClassName = \"TemplateProvider\"\nTemplateProvider.__index = Te...
lua
chosen
[ { "from": "system", "value": "Add removal at the end of example.\n" }, { "from": "human", "value": "local Tag = require \"cosy.tag\"\nlocal model = cosy [\"my_model\"]\n\nmodel.place_type = {}\nmodel.place_type [tostring (model.place_type)] = true\n\nmodel.transition_type = {}\nmodel.transition_...
lua
chosen
[ { "from": "system", "value": "Implement basic memory editing functions for super mario bros\n" }, { "from": "human", "value": "button = \"\";\nold_button = \"\";\ncount = 0;\nfact = \"\";\n\nwhile (true) do\n for key, value in pairs(joypad.get(1)) do\n if(value) then\n \tbutton = key;\n ...
lua
chosen
[ { "from": "system", "value": "Build/Tool: Make Assimp plugin copy its library file to the example directory\n\n\nFormer-commit-id: eaf807d1f7f5148413dd7ab8729cdf52113ba5d8" }, { "from": "human", "value": "TOOL.Name = \"Assimp\"\n\nTOOL.Directory = \"../SDK/lib\"\nTOOL.Kind = \"Plugin\"\n\nTOOL.I...
lua
chosen
[ { "from": "system", "value": "Make repeated clicks display repeated messages\n" }, { "from": "human", "value": "-- Displays the mouse (grid) coordinates when the mouse is clicked\n\nlocal active\nlocal last_msg\nif active == nil then active = false end\n\nfunction set_timeout()\n dfhack.timeo...
lua
chosen
[ { "from": "system", "value": "Build a dynamic Sodna library\n" }, { "from": "human", "value": "solution \"sodna\"\n configurations { \"Debug\", \"Release\" }\n\n project \"sodna-sdl2\"\n kind \"StaticLib\"\n language \"C\"\n\n links { \"m\", \"SDL2\", }\n\n file...
lua
chosen
[ { "from": "system", "value": "feat: Remove branch name from status line.\n\nSigned-off-by: Yoshio Sugiyama <d278fe5383150975c3f762683049de40f68a6e90@gmail.com>\n" }, { "from": "human", "value": "local M = {}\n\nfunction M.config()\n require(\"lualine\").setup({\n options = {\n ...
lua
chosen
[ { "from": "system", "value": "Fix compilation in Release mode\n" }, { "from": "human", "value": "solution \"SuperMatch5DX\"\n\tconfigurations { \"Debug\", \"Release\" }\n\n\tflags { \"FatalWarnings\", \"NoRTTI\", \"Unicode\" }\n\twarnings \"Extra\"\n\tfloatingpoint \"Fast\"\n\tvectorextensions \...
lua
chosen
[ { "from": "system", "value": "Bump release version to v0.0.59\n" }, { "from": "human", "value": "function love.conf(t)\n t.title = \"Journey to the Center of Hawkthorne v0.0.58\"\n t.author = \"Kyle Conroy\"\n t.version = \"0.8.0\"\n t.identity ...
lua
chosen
[ { "from": "human", "value": "Add test case for function call.\n" }, { "from": "gpt", "value": "#!/usr/bin/lua\n\nrequire 'test'\n\nfunction direct_compute()\n local x = 0\n for i = 1, 30 do\n local r = 1\n for j = 1, i do\n r = r * j\n end\n x = x + r...
lua
chosen
[ { "from": "system", "value": "Add failing test case for in-place vflip\n\nThanks to @jonathantompson for spotting the bug, see issue #27\n" }, { "from": "human", "value": "require 'totem'\nrequire 'image'\n\nmyTests = {}\nlocal tester = totem.Tester()\n\n\n-- List of all possible tests\nlocal al...
lua
chosen
[ { "from": "human", "value": "Add failing test diagnosic the problem\n" }, { "from": "gpt", "value": "local myTests = {}\nlocal tester = torch.Tester()\n\nfunction myTests.test_beta()\n local N = 10000\n local oneRequire = torch.Tensor(N)\n local multipleRequire = torch.Tensor(N)\n\n\n ...
lua
chosen
[ { "from": "human", "value": "Add package with easy access to ICU casing tools\n" }, { "from": "gpt", "value": "local icu = require(\"justenoughicu\")\nlocal inputfilter = SILE.require(\"packages/inputfilter\").exports\n\nlocal uppercase = function (input)\n return icu.case(input, SILE.settings....
lua
chosen
[ { "from": "system", "value": "Use ARMv7-M.ld.sh linker script generator for STM32F1 in tup build" }, { "from": "human", "value": "--\n-- file: Tupfile.lua\n--\n-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info\n--\n-- This Source Code Form ...
lua
chosen
[ { "from": "system", "value": "Rename session and connected variables\n" }, { "from": "human", "value": "package.path = package.path .. \";spec/?.lua\"\nngx = require(\"fake_ngx\")\nlocal cassandra = require(\"cassandra\")\n\ndescribe(\"cassandra\", function()\n before_each(function()\n cql =...
lua
chosen
[ { "from": "human", "value": "Add mkdirp from other branch.\n" }, { "from": "gpt", "value": "local path = require('path')\nlocal fs = require('fs')\n\nlocal exports = {}\n\nfunction exports.mkdirp(lpath, mode, callback)\n lpath = path.resolve('', lpath)\n fs.mkdir(lpath, mode, function(err)\n ...
lua
chosen
[ { "from": "system", "value": "Fix require in Snackbar Example\n\nRequire was using `NevermoreEngine` when the module was named `Nevermore`" }, { "from": "human", "value": "local require = require(game:GetService(\"ReplicatedStorage\"):WaitForChild(\"NevermoreEngine\"))\n\nlocal Players = game:Ge...
lua
chosen
[ { "from": "system", "value": "Revert 'Fix \"launchOrFocus\" behavior for Atom'\n\nRevert 4f7a69f9bf1fb233e5bc98c1db3e45de2d22c0ff. While that commit did\nimprove things for Atom, it made things worse for other apps like Chrome\nand Finder. With those apps, if the app is open but no windows exist,\nthe chang...
lua
chosen
[ { "from": "system", "value": "test: Check radial image at smaller percent\n" }, { "from": "human", "value": "--[[\n\t@class RadialImage.story\n]]\n\nlocal require = require(game:GetService(\"ServerScriptService\"):FindFirstChild(\"LoaderUtils\", true).Parent).load(script)\n\nlocal RunService = g...
lua
chosen
[ { "from": "system", "value": "Add a bunch of functionality to Hack\n" }, { "from": "human", "value": "require \"fritomod/Strings\";\nrequire \"fritomod/Lists\";\n\nlocal globals = Rainback.Globals;\n\nlocal data = Rainback.ReadFile(globals.tmpdir .. \"/persistence\");\n\nlocal lines = Lists.Map(...
lua
chosen
[ { "from": "system", "value": "Add arch specifc perl directories\n" }, { "from": "human", "value": "help(\n[[\nThis module loads a variety of perl modules into the environment\n\nThe current module list includes:\nCarp\nClone\nConfig::General\nCwd\nData::Dumper\nDigest::MD5\nFile::Basename\nFile:...
lua
chosen
[ { "from": "human", "value": "Add new server script for player death events\n" }, { "from": "gpt", "value": "-- player death\n\n-- deadPlayer - The player (character) whose hitpoints have just been set to zero\n\nmodule(\"server.playerdeath\", package.seeall)\n\nfunction playerDeath(deadPlayer)\n...
lua
chosen
[ { "from": "system", "value": "0001430: Make charachters health decrease very slightly everytime they bend over out of breath from running.\n\ngit-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@1973 64450a49-1f69-0410-a0a2-f5ebb52c4f5b\n" }, { "from": "human", "value": "local run = 0\r\nlocal d...
lua
chosen
[ { "from": "system", "value": "Fix default shell timeout not actually being increased.\n\nWe had intended to increase the timeout we allow the dehydrated shell\nscript to run beyond the default 15 seconds back in 1f395c66 (see\nhttps://github.com/GUI/lua-resty-auto-ssl/issues/11). However, that\ntimeout incr...
lua
chosen
[ { "from": "human", "value": "Add simple RPC functions for use with client test suites.\n" }, { "from": "gpt", "value": "--[[\n Copyright 2018 The Nakama Authors\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License...
lua
chosen
[ { "from": "system", "value": "Bring Octavo layout into line with class methods\n" }, { "from": "human", "value": "local book = SILE.require(\"classes/book\");\n\nSILE.documentState.paperSize = SILE.paperSizeParser(\"432pt x 648pt\")\nSILE.documentState.orgPaperSize = SILE.documentState.paperSize...
lua
chosen
[ { "from": "system", "value": "Fix slice returning lists with negative sizes\n" }, { "from": "human", "value": "return {\n\t['slice'] = function(xs, start, finish)\n\t\tif not finish then finish = xs.n end\n\t\tif not finish then finish = #xs end\n\t\treturn { tag = \"list\", n = finish - start +...
lua
chosen
[ { "from": "system", "value": "Make fuzzy search matches adhere to window height\n" }, { "from": "human", "value": "local M = {}\n\nM.FuzzySearch = function()\n local width = 55\n local height = 15\n\n vim.api.nvim_open_win(\n vim.api.nvim_create_buf(false, true),\n true,\n {\n r...
lua
chosen
[ { "from": "human", "value": "Add module to handle list of recently used things\n" }, { "from": "gpt", "value": "local Recent = {}\n\n-- Promote the given `entry` in the `list` of recent elements. The function\n-- `comparator` compares `entry` to the elements of `list` to determine if\n-- the new...
lua
chosen
[ { "from": "system", "value": "nvim: Add more sources for null-ls\n" }, { "from": "human", "value": "local null_ls = require('null-ls')\n\nlocal formatting = null_ls.builtins.formatting\nlocal diagnostics = null_ls.builtins.diagnostics\n\nnull_ls.setup({\n sources = {\n formatting.autopep8,\...
lua
chosen
[ { "from": "system", "value": "Make more compatible with LOM-style ASTs." }, { "from": "human", "value": "-- Return an abstract syntax tree\n\nlocal M = {}\n\nlocal format = string.format\nlocal util = require(\"lunamark.util\")\nlocal generic = require(\"lunamark.writer.generic\")\nlocal entitie...
lua
chosen
[ { "from": "human", "value": "Add common module that add prints\n" }, { "from": "gpt", "value": "\n--[[\n--\n-- Copyright (c) 2017 USPGameDev\n--\n-- Permission is hereby granted, free of charge, to any person obtaining a copy\n-- of this software and associated documentation files (the \"Softwar...
lua
chosen
[ { "from": "human", "value": "Add FIR filter block example.\n" }, { "from": "gpt", "value": "-- Visualize IQ data as a texture from the HackRF\n-- You want seizures? 'Cause this is how you get seizures.\n\nVERTEX_SHADER = [[\n#version 400\nlayout (location = 0) in vec3 vp;\nlayout (location = 1) ...
lua
chosen
[ { "from": "human", "value": "Test script for shown luasocket behaviour\n" }, { "from": "gpt", "value": "--[[\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regardi...
lua
chosen
[ { "from": "system", "value": "Fix config writer to delete items\n" }, { "from": "human", "value": "function cmd.cfg(p)\n if not cfg.ssid then\n cfg.ssid,cfg.key = wifi.sta.getconfig()\n end\n for k,v in pairs(p) do\n cfg[k] = v\n end\n if file.open(\"config.lua\",\"w+\") then\n file.write('cf...
lua
chosen
[ { "from": "system", "value": "Make sure that break-after characters are actually typeset." }, { "from": "human", "value": "require(\"char-def\")\nlocal chardata = characters.data\n\nSILE.tokenizers.unicode = function(text)\n local chunks = SU.splitUtf8(text)\n return coroutine.wrap(function()...
lua
chosen
[ { "from": "human", "value": "Add new module to use sqlite\n\nSigned-off-by: Jacobo Tibaquira <d8d2a0ed36dd5f2e41c721fffbe8af2e7e4fe993@gmail.com>\n" }, { "from": "gpt", "value": "-- db module\n\nlocal dbmodule = {}\n\nfunction dbmodule.CreateDB( ... )\n -- body\nend\n\nfunction dbmodule.CreateT...
lua
chosen
[ { "from": "system", "value": "Add bundle and directories attributes to the library class.\n" }, { "from": "human", "value": "--- Define library base class.\n-- @classmod configure.lang.c.Library\nreturn {\n\t--- Create a new library instance\n\t--\n\t-- @param self\n\t-- @param args\n\t-- @param...
lua
chosen
[ { "from": "human", "value": "Add generic screen gui provider\n" }, { "from": "gpt", "value": "--- Providers screenGuis with a given display order for easy use\n-- @module GenericScreenGuiProvider\n-- @author Quenty\n\nlocal require = require(game:GetService(\"ReplicatedStorage\"):WaitForChild(\"...
lua
chosen
[ { "from": "system", "value": "Tweak left and right window positions." }, { "from": "human", "value": "hs.hotkey.bind({ \"cmd\", \"alt\", \"ctrl\" }, \"Up\", function()\n local window = hs.window.focusedWindow()\n local screen = window:screen():frame()\n local frame = hs.geometry.rect(sc...
lua
chosen
[ { "from": "system", "value": "Add complex module to root namespace" }, { "from": "human", "value": "require 'torch'\n\nlocal signal = signal or {}\n\nsignal.C = require 'signal.ffi' -- keep the loaded C object around, so that it doesn't get garbage collected\n\nlocal convolution = require 'signa...
lua
chosen
[ { "from": "system", "value": "Fix issue where glob returns empty string\n" }, { "from": "human", "value": "local M = {}\n\nfunction M.exists(path)\n return M.is_directory(path) or M.is_file(path)\nend\n\nfunction M.glob(path, pattern)\n if not M.is_directory(path) then\n return {}\n end\n\...
lua
chosen
[ { "from": "system", "value": "Make delay always yield at least once.\n" }, { "from": "human", "value": "yield = coroutine.yield\n\nfunction print( ... )\n local printResult = '';\n\n for i,v in ipairs( {...} ) do\n printResult = printResult .. tostring( v ) .. \"\\t\"\n end\n ...
lua
chosen
[ { "from": "system", "value": "Add id128 module. Include example\n" }, { "from": "human", "value": "--[[\nThis program should act just like running `journalctl --new-id128`\n]]\n\nlocal id128 = require \"systemd.id128\"\n\nlocal myuuid = tostring(assert(id128.randomise()))\n\nio.write(table.conca...
lua
chosen
[ { "from": "system", "value": "Remove method that shouldn't have been committed\n" }, { "from": "human", "value": "\nlocal replicatedStorage = game:GetService(\"ReplicatedStorage\")\nlocal nevermore = require(replicatedStorage:WaitForChild(\"NevermoreEngine\"))\n\nlocal WaveStation = {}\nWaveStat...
lua
chosen
[ { "from": "system", "value": "[_misc] Use rightclick to place young trees\n" }, { "from": "human", "value": "minetest.register_craftitem(\":bushes:youngtree\", {\n\tdescription = \"Young tree\",\n\tinventory_image = \"bushes_youngtree.png\",\n\ton_use = function(stack, user, pointed_thing)\n\t\t...
lua
chosen
[ { "from": "system", "value": "Stop Device when ESC key is pressed\n" }, { "from": "human", "value": "function init()\n\t-- Set the title of the main window\n\tWindow.set_title(\"Hello world!\")\nend\n\nfunction frame(dt)\n\t-- Stop the engine when any key is released\n\tif Keyboard.any_released(...
lua
chosen
[ { "from": "system", "value": "Call SSH agent key removal is ssh manager script is installed\n\nScript is in the home.bin, which may not necessarily be installed\n" }, { "from": "human", "value": "function ScreenLockWatcher()\n local self={}\n\n -- Do some actions upon screen lock/unlock\n ...
lua
chosen
[ { "from": "human", "value": "Add Heka log decoder for MariaDB\n\nIn the future the Heka Lua sandboxes will be moved out of Kolla, and\ninstalled in the Heka container using a deb or rpm package.\n\nPartially implements: blueprint heka\nChange-Id: Iad1e5177d239410a88546fc4ed8c23b9e46beef3\n" }, { "fr...
lua
chosen
[ { "from": "system", "value": "Use the absolute target directory when copying Clang headers.\n" }, { "from": "human", "value": "clang_msvc_flags =\n{\n \"/wd4146\", \"/wd4244\", \"/wd4800\", \"/wd4345\",\n \"/wd4355\", \"/wd4996\", \"/wd4624\", \"/wd4291\",\n \"/wd4251\"\n}\n\nif not (string.s...
lua
chosen
[ { "from": "system", "value": "Change back android pkg build to use generic config\n" }, { "from": "human", "value": "package { 'make', 'host',\n source = 'make-3.81.tar.bz2'\n}\n\npackage { 'android', 'target',\n { 'build',\n { 'make', 'build', 'host' }\n }\n}\n" }, { "fr...
lua
chosen
[ { "from": "human", "value": "Add test for quadtastic logic\n" }, { "from": "gpt", "value": "local QuadtasticLogic = require(\"Quadtastic.QuadtasticLogic\")\nlocal Selection = require(\"Quadtastic.Selection\")\n\nlocal app_stub = function(data)\n return {\n quadtastic = setmetatable({},{\n ...
lua
chosen
[ { "from": "system", "value": "fix: Use Promies.spawn() since task.spawn() is probably cheaper now\n" }, { "from": "human", "value": "--- Warps the WaitForChild API with a promise\n-- @module promiseChild\n\nlocal require = require(script.Parent.loader).load(script)\n\nlocal Promise = require(\"P...
lua
chosen
[ { "from": "system", "value": "Connect to new socket endpoint\n" }, { "from": "human", "value": "local config = require 'config'\nlocal module = {}\n\nmodule.initSocket = function ()\n -- Create socket connection\n local ws = websocket.createClient()\n\n ws:on('connection', function(ws)\n p...
lua
chosen
[ { "from": "system", "value": "Change sw to 4 in md files\n\nAlso add lua to fenced language support.\n" }, { "from": "human", "value": "local map = require'utilities'.map\n\n-- Enable spell checking.\nvim.cmd('setlocal spell')\n\n-- Support code fencing syntax highlighting for the listed languag...
lua
chosen
[ { "from": "system", "value": "Implement compile as special case of translate tool\n" }, { "from": "human", "value": "function translate(src, dst, name)\n return function(recipe) moss_translate(src, dst, \"anonymous\", recipe); end\nend\n\nfunction compile(src)\n return function(recipe) mos...
lua
chosen
[ { "from": "human", "value": "Solve Salary with Bonus in lua\n" }, { "from": "gpt", "value": "local _ = io.read()\nlocal b = tonumber(io.read(\"*n\"))\nlocal c = tonumber(io.read(\"*n\"))\n\nprint(string.format('TOTAL = R$ %.2f', b + (c * 0.15)))\n" } ]
lua
chosen
[ { "from": "human", "value": "Add an example monitor: DNT Status\n\nChecks the status of the Do Not Track HTTP Header.\n" }, { "from": "gpt", "value": "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-...
lua
chosen
[ { "from": "system", "value": "Move data into global scope\n" }, { "from": "human", "value": "require \"defines\"\n\n-- Derived from util.formattime\nfunction ftime(ticks)\n local seconds = ticks / 60\n local min = math.floor(seconds / 60)\n local sec = math.floor(seconds - 60 * min)\n return...
lua
chosen
[ { "from": "system", "value": "Bring bound A4 layout up to speed with frames\n" }, { "from": "human", "value": "local book = SILE.require(\"classes/book\");\nbook:loadPackage(\"masters\")\nbook:defineMaster({ id = \"right\", firstContentFrame = \"content\", frames = {\n content = { left = \"32mm...
lua
chosen
[ { "from": "human", "value": "Add touching parts calculator for binders\n" }, { "from": "gpt", "value": "--- Extends PartTouchingCalculator with generic binder stuff\n-- @classmod BinderTouchingCalculator\n-- @author Quenty\n\nlocal require = require(game:GetService(\"ReplicatedStorage\"):WaitFor...
lua
chosen
[ { "from": "human", "value": ":bar_chart: Add script to create customized visualizers\n" }, { "from": "gpt", "value": "-- ## Information ##############################################################\n-- Filename: Visualizer.lua\n-- Project: PlayMusic\n-- Author: Brett Stevenson\n-- License: GNU ...
lua
chosen
[ { "from": "human", "value": "Add tests for property validation\n" }, { "from": "gpt", "value": "local Parser = require \"argparse\"\n\ndescribe(\"invalid property detection\", function()\n it(\"detects properties with invalid type\", function()\n assert.has_error(function()\n Pars...
lua
chosen
[ { "from": "human", "value": "Add input file for heisenberg calculation.\n" }, { "from": "gpt", "value": "sys = heisenberg {\n lattice = { {6, 0}, {0, 6} },\n ms = 0,\n J = -1,\n}\n\nqmc_table = {\n tau = 0.001,\n init_pop = 5e6,\n mc_cycles = 10,\n nreports = 500,\n targe...
lua
chosen
[ { "from": "system", "value": "Fix bug with ICompassElement overriding\n" }, { "from": "human", "value": "local ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\n\nlocal NevermoreEngine = require(ReplicatedStorage:WaitForChild(\"NevermoreEngine\"))\nlocal LoadCustomLibrary = Nevermore...
lua
chosen
[ { "from": "system", "value": "gmod_wire_button: Call UpdateLever() in the right way. Fixes a bug where the lever would move faster if you were hovering over it.\n" }, { "from": "human", "value": "\r\ninclude('shared.lua')\r\n\r\nENT.Spawnable\t\t\t= false\r\nENT.AdminSpawnable\t\t= false\r\nENT....
lua
chosen
[ { "from": "human", "value": "Add script to create dictionaries from sequences.\n" }, { "from": "gpt", "value": "#! /usr/bin/env luajit\n\nif #arg < 2 then\n print (arg [0] .. \"<threshold> <input-file> <output-file>\")\nend\n\nlocal threshold = tonumber (arg [1])\nlocal input = arg [2]\nloc...
lua
chosen
[ { "from": "system", "value": "Refresh AirPods battery menubar every 15 seconds\n" }, { "from": "human", "value": "--------------------------------------------------------------------------------\n-- Display AirPods battery charge in the macOS menubar.\n-------------------------------------------...
lua
chosen
[ { "from": "system", "value": "Test anchoring at the start.\n" }, { "from": "human", "value": "local assertEq = test.assertEq\nlocal function log(x) test.log(tostring(x) .. \"\\n\") end\nlocal vi_regex = require('vi_regex')\nlocal compile = vi_regex.compile\n\nlocal pat = compile('fo+[ab]ar')\n\n...
lua
chosen
[ { "from": "system", "value": "Clean up haptic feedback utils\n" }, { "from": "human", "value": "---\n-- @module HapticFeedbackUtils\n-- @author Quenty\n\nlocal HapticService = game:GetService(\"HapticService\")\n\nlocal HapticFeedbackUtils = {}\n\nfunction HapticFeedbackUtils.smallVibrate(userIn...
lua
chosen
[ { "from": "system", "value": "Support loading helper moonscript files\n" }, { "from": "human", "value": "local utils = require 'busted.utils'\n\nreturn function()\n local loadHelper = function(helper, hpath, options, busted)\n local success, err = pcall(function()\n if helper:match('%.l...
lua
chosen
[ { "from": "system", "value": "Change the test breakpoint line.\n" }, { "from": "human", "value": "debug.breakpoints['tests.lua'] = {5, 10}\ni = 10\nf = function (a, b)\n local c = \"test\"\n\n for ii = 1,10000,1 do\n if ii%1000 == 0 then\n print(ii)\n end\n end\...
lua
chosen
[ { "from": "system", "value": "Enable disabling of persistent replacements\n" }, { "from": "human", "value": "local CircularBuffer = require (\"circularbuffer\")\n\nsed = sed or {}\nsed.messages = CircularBuffer (20)\n\nlocal persistent = false\n\nlocal function Handle (name, communityId, message...
lua
chosen
[ { "from": "system", "value": "chore(packages): Correct bogus variable naming from 43e682cb\n" }, { "from": "human", "value": "local class = pl.class()\nclass.type = \"package\"\nclass._name = \"base\"\n\nclass._initialized = false\nclass.class = nil\n\nfunction class:_init (_)\n self.class = SI...
lua
chosen
[ { "from": "system", "value": "Fix camera errors when the player dies\n\nWe didn't check to make sure that the character actually exists before\ncontinuing, so when the player drops into the void and their character is\ndeleted, we got constant errors from RenderStepped. This fixes that.\n" }, { "fro...
lua
chosen
[ { "from": "system", "value": "Make unittest runnable with latest changes.\n" }, { "from": "human", "value": "\nrequire('test.test_luaunit')\n\nLuaUnit.verbosity = 2\nos.exit( LuaUnit.run() )\n" }, { "from": "gpt", "value": "\nrequire('test.test_luaunit')\nLuaUnit = require('luaunit')...
lua
chosen
[ { "from": "human", "value": "Add AAA module (primarily made for the ASF)\n" }, { "from": "gpt", "value": "--[[\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regar...
lua
chosen
[ { "from": "system", "value": "Fix the msdos distribution, now that it uses exes rather than coms.\n" }, { "from": "human", "value": "copy {\n\tins = { \"examples/mandel.cow\" },\n\touts = { \"$OBJ/dist/msdos/mandel.cow\" },\n}\n\ncpmify {\n\tins = { \"rt/msdos/cowgol.coh\" },\n\touts = { \"$OBJ/...
lua
chosen
[ { "from": "system", "value": "Add plenary as an explicit telescope dependency\n" }, { "from": "human", "value": "return require(\"packer\").startup(function(use)\n use(\"wbthomason/packer.nvim\")\n\n use(\"cormacrelf/dark-notify\")\n use(\"hrsh7th/cmp-nvim-lsp\")\n use(\"hrsh7th/cmp-vsnip\")...
lua
chosen
[ { "from": "system", "value": "Set the camera's Focus property\n" }, { "from": "human", "value": "-- ClassName: LocalScript\n\nlocal players = game:GetService(\"Players\")\nlocal run = game:GetService(\"RunService\")\n\nlocal function getTopDownOffset(dist)\n return Vector3.new(-dist, dist, dist...
lua
chosen
[ { "from": "system", "value": "Return 1 to OS if any tests fail.\n" }, { "from": "human", "value": "local atexit = require \"atexit\"\nlocal lunit = require \"lunit\"\n\n--for k,v in pairs(debug.getinfo(1,\"S\")) do print(k,v) end\n-- autonameing\n-- module(\"bcrc-test\", lunit.testcase, package....
lua
chosen
[ { "from": "system", "value": "Use requires for generic genivi packages\n" }, { "from": "human", "value": "define_rule { 'capicxx-dbus-runtime', 'host' }\n\ndefine_rule { 'audio-manager', 'host' }\n\ndefine_rule { 'audio-manager-plugins', 'host' }\n" }, { "from": "gpt", "value": "defi...
lua
chosen
[ { "from": "system", "value": "Remove trailing whitespace on save." }, { "from": "human", "value": "--[[--\n Use this file to specify **System** preferences.\n Review [examples](+/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user-sample.lua) or check [online documentation](http...
lua
chosen
[ { "from": "system", "value": "Fix backgrounding for \"api-umbrella start\" command.\n" }, { "from": "human", "value": "local path = require \"pl.path\"\nlocal setup = require \"api-umbrella.cli.setup\"\nlocal unistd = require \"posix.unistd\"\n\nlocal function start_perp(config, options)\n loca...
lua
chosen
[ { "from": "human", "value": "Add special event for new Tanora tempel\n" }, { "from": "gpt", "value": "--[[\r\nIllarion Server\r\n\r\nThis program is free software: you can redistribute it and/or modify it under\r\nthe terms of the GNU Affero General Public License as published by the Free\r\nSof...
lua
chosen
[ { "from": "human", "value": "Work on pure Lua IF\n" }, { "from": "gpt", "value": "--[[\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\...
lua
chosen
[ { "from": "system", "value": "Revert \"Added verses scene back\"\n\nThis reverts commit 0592aeac155f27e62d864770669593ee6ce6e0a3.\nThis can be enabled via `source/GameConfig`.\n" }, { "from": "human", "value": "-- TODO: update this to point to the correct scenes\nrequire \"source/gameConfig\"\n\...
lua
chosen
[ { "from": "system", "value": "Remove now useless install declaration from android-ndk pkg\n" }, { "from": "human", "value": "return {\n source = {\n type = 'dist',\n location = 'https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip',\n sha1sum = '42aa...
lua
chosen
[ { "from": "human", "value": "[Feature] Add universal function to parse redis servers for plugins\n" }, { "from": "gpt", "value": "\n-- This function parses redis server definition using either\n-- specific server string for this module or global\n-- redis section\nfunction rspamd_parse_redis_ser...
lua
chosen
[ { "from": "system", "value": "Use SILE.masterFileName instead of arg[1]\n\nThe former is more explicit and avoid to rely on global arg.\n" }, { "from": "human", "value": "SILE.inputs.common = {\n init = function(fn, t)\n local dclass = t.attr.class or \"plain\"\n SILE.documentState.docume...
lua
chosen
[ { "from": "human", "value": "Add test of using marks in :s commands.\n" }, { "from": "gpt", "value": "local assertEq = test.assertEq\nlocal ex = vi_mode.ex_mode.run_ex_command\nlocal key = test.key\nlocal keys = test.keys\n\ntest.open('1_10.txt')\n\nlocal function checkOrig()\n return assertEq(...
lua
chosen