messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport weapons from './weapons.json';\nimport './style.css';\n\nclass Weapons extends Component {\n render() {\n return (\n <h1>Weapons</h1>\n )\n }\n}\n\nexport default Weapons;\n... | javascript | edit | 0 | 1 | mit | bad6e9925b177bb4503a3b03d4afc996be128200 | valsaven/dark-souls-guidebook,valsaven/dark-souls-guidebook | src/components/Weapons/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst getType = require('../typeResolver');\n\nmodule.exports = {\n isCoerced: function(value, typeDescriptor) {\n return value instanceof getType(typeDescriptor);\n },\n coerce(value, typeDescriptor) {\n const type = getType(t... | javascript | edit | 0 | 1 | mit | 49af9443e721cf9e68ca3a17eb01d94f7084cd66 | talyssonoc/structure | src/coercion/generic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nvar archiver = require('./archiver');\nvar createServiceFile = require('./service');\nvar createSpecFile = require('./spec');\nvar files = require('./files');\n\nfunction generateServiceFile(root, pkg) {\n va... | javascript | edit | 0 | 2 | mit | 72f17e16ab10d8dce678f8eacf1425d4ca8c9733 | Limess/speculate,Limess/speculate | lib/generate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// execute dependencies immediately on file parse\n\nnrj(\"/js/mapbox/mapbox-1.5.2.js\",1);\nnrc(\"/js/mapbox/mapbox-1.5.2.css\",1);\n\n\n// the plugin callback by another name\nvar ddg_spice_maps_places = function (places) {\n\n // ... | javascript | edit | 0 | 2 | apache-2.0 | baebce75ff945946e3803382484c52b73d70ff5e | bdjnk/zeroclickinfo-spice,stennie/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,imwally/zeroclickinfo-spice,levaly/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,dachinzo/zeroclickinf... | share/spice/maps/places/maps_places.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst\n Animation = require('./animation'),\n eventBus = require('./event-bus');\n\nconst\n pacmanNormalColor = 0xffff00,\n pacmanFrighteningColor = 0xffffff,\n ghostFrightenedColor = 0x555... | javascript | edit | 0 | 2 | mit | 66e535efbbacef95612fbcfe7c469890edc0e239 | hiddenwaffle/mazing,hiddenwaffle/mazing | client/src/character-animations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Critical CSS\n * @description Generate Inline CSS for the Above the fold optimization\n */\n\nimport kc from '../../config.json'\nimport gulp from 'gulp'\nimport critical from 'critical'\nimport yargs from 'yargs'\n\nconst args ... | javascript | edit | 0 | 3 | mit | 2a885f785488efcaa219e8b9c59d457360564f14 | kittn/generator-kittn,kittn/generator-kittn,kittn/generator-kittn,kittn/generator-kittn | app/templates/src/gulpfile/tasks/optimize-criticalCss.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// To use it create some files under `routes/`\n// e.g. `server/routes/ember-hamsters.js`\n//\n// module.exports = function(app) {\n// app.get('/ember-hamsters', function(req, res) {\n// res.send('hello');\n// });\n// };\n\nmodu... | javascript | edit | 0 | 1 | mit | 6cac446d118154a2e9939f32e7f2d2ef628db82b | jrjohnson/frontend,gboushey/frontend,ilios/frontend,stopfstedt/frontend,thecoolestguy/frontend,stopfstedt/frontend,djvoa12/frontend,dartajax/frontend,dartajax/frontend,gabycampagna/frontend,djvoa12/frontend,gboushey/frontend,gabycampagna/frontend,ilios/frontend,thecoolestguy/frontend,jrjohnson/frontend | server/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { configure } from 'mobx';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport Client from '_common/base/client_base';\nimport NetworkMonitor from 'Services... | javascript | edit | 0 | 2 | apache-2.0 | f26332123823f9295f50ec62899583c4931e3274 | 4p00rv/binary-static,ashkanx/binary-static,binary-com/binary-static,ashkanx/binary-static,kellybinary/binary-static,binary-com/binary-static,4p00rv/binary-static,kellybinary/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,kellybinary... | src/javascript/app_2/App/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add minimized version of updated script."
},
{
"role": "assistant",
"content": "melange.templates.inherit(function(){});\n"
}
] | javascript | new_file | 0 | 1 | apache-2.0 | 14620efc5cea0749966d218989592246001a3ab1 | rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son | app/soc/content/js.min/templates/modules/gsoc/_survey.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Shape from 'kittik-shape-basic';\n\n/**\n * Implements rectangle shape with text support.\n *\n * @since 1.0.0\n * @version 1.0.0\n */\nexport default class Rectangle extends Shape {\n render(cursor) {\n let text = this.getTe... | javascript | edit | 0 | 4 | mit | 18dbcfa13ba598b97b3396f90bef0833954eb5bb | kittikjs/shape-rectangle | src/Rectangle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Report = require('./Report');\nconst Hipchat = require('./Hipchat');\n\nfunction Reporter( request, reply ) {\n console.log(request.query);\n return reply({});\n}\n\nmodule.exports = Reporter;\n\n```\n\nApply this change: Add re... | javascript | edit | 0 | 4 | mit | 85b7bf880a8ecccdd8c732f79fea73db403d237a | wearenolte/lighthouse-reporter | src/Reporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\nvar symbols = require('log-symbols');\n\nmodule.exports = function(domain, callback){\n var path = 'https://domainr.com/api/json/search?q='+domain+'&client_id=avail';\n\n request(pat... | javascript | edit | 0 | 5 | mit | 5f468801d91b156d8d04b3a81c7dd234b44173db | srn/avail | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const GAMES = {\n 'board1': {\n 'words': ['one', 'two', 'three'],\n 'board': [\n ['o', 'n', 'e', '-', '-', '-'],\n ['t', 'w', 'o', '-', '-', '-'],\n ['t', 'h', 'r', 'e', 'e', '-']... | javascript | edit | 0 | 0 | apache-2.0 | 225b84d3d19c7d4129c13fb7f18c3dd908fefa08 | paulbevis/wordsearch,paulbevis/wordsearch | constants/data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: 'stylelint-config-standard',\n plugins: ['stylelint-order', 'stylelint-scss'],\n rules: {\n 'at-rule-empty-line-before': [\n 'always',\n {\n except: ['inside-block', 'blockless-after-... | javascript | edit | 0 | 0 | mit | da68f92fdbc2d4512b01ac5985f3d221bcd4a6bb | italodr/stylelint-config-runroom | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar SortedArray = require('sorted-array')\n\nvar compareTime = require('./compare-time')\n\nfunction compareCreated (a, b) {\n return compareTime(b[1].created, a[1].created)\n}\n\nfunction compareAdded (a, b) {\n return b[1].added - a... | javascript | edit | 0 | 3 | mit | a389a4e8807cabced1a08e4ee3c6798dd4e34ea9 | logux/logux-core | memory-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar isStream = require('is-stream');\nvar matchCondition = require('match-condition');\nvar peekStream = require('peek-stream');\nvar through = require('through2');\n\nmodule.exports = function (condition, stream, fn, opt... | javascript | edit | 0 | 7 | mit | b09e4ffc14571cd9679800f1ba02cc7bc728e687 | kevva/if-stream | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst express = require('express');\nconst app = express();\nconst bodyParser = require('body-parser');\nconst morgan = require('morgan');\nconst port = 8080;\n\nconst router = express.Router();\... | javascript | edit | 0 | 1 | mit | c122d6e2a45c90212a2197da2359fdf2bfc5066e | andela-oolutola/document-management-system-api | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nvar Jafar = function(opts) {\n var that = this;\n\n if (!opts.json || (typeof(opts.json) !== 'object' && typeof(opts.json) !== 'string')) {\n throw new Error('You must pass a reference to a valid ... | javascript | edit | 0 | 6 | mit | 2cd216ece7d96af562fcf3679d190042a725ff27 | jkymarsh/jafar | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar zmqbus = require('../lib/index.js');\r\n\r\n/* simple quote sender/reader.\r\n Run multiple processes to send/receive cluster-wide.\r\n*/\r\n\r\nvar node = zmqbus.createNode();\r\nnode.on('ready', function() {\r\n\t// subscribe to... | javascript | edit | 0 | 1 | mit | 60e2a7db670003f8f49b786a69be0b16992993a6 | edwardchoh/zmqbus-node | example/simple.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('weatherApp', ['ngRoute'])\n .config(config);\n\n function config($routeProvider) {\n $routeProvider\n .when('/', {\n templateUr... | javascript | edit | 0 | 1 | mit | b1e3a3c32000690495bacc4d11189b15aa740932 | cpanz/Angular_Weather,cpanz/Angular_Weather | client/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst express = require('express');\n\n// Constants\nconst PORT = 8080;\n\n// App\nconst app = express();\napp.get('/', function (req, res) {\n res.send('Hello world\\n');\n});\n\napp.listen(PORT);\nconsole.log('Runnin... | javascript | edit | 0 | 2 | mit | f9df796731fe97fb1c9d6487a25b3dee6a9c7524 | francoabaroa/happi,francoabaroa/happi | server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(server) {\n // Install a `/` route that returns server status\n var router = server.loopback.Router();\n router.get('/', server.loopback.status());\n server.use(router);\n};\n\n```\n\nApply this change: Cha... | javascript | edit | 0 | 1 | mit | e8306057a65889f384caa24933c71f8c8ec71854 | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart | src/server/boot/root.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery\n//= require novnc-rails\n//= require_tree ../locale\n//= require gettext/all\n\n$(function() {\n var host = window.location.hostname;\n var encrypt = window.location.protocol === 'https:';\n var port = encrypt ? 4... | javascript | edit | 0 | 3 | apache-2.0 | 859dbe0e2bc5a322633f7323b1ff9fe638624c9f | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | app/assets/javascripts/remote_consoles/vnc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from 'moment-timezone';\nimport { Frontpage } from 'app/actions/ActionTypes';\nimport { fetching } from 'app/utils/createEntityReducer';\nimport { sortBy } from 'lodash';\nimport { createSelector } from 'reselect';\nimport... | javascript | edit | 0 | 2 | mit | a0abf6b63572189fe3e3c06cf6c89e621958cb40 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/reducers/frontpage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction proceedSignin() {\n 'use strict';\n\n event.preventDefault();\n\n var emailField = document.getElementById('email'),\n passwordField = document.getElementById('password');\n\n var user = {\n username: ... | javascript | edit | 0 | 4 | mit | 49c652b034e8f2c9238282c67e0c3394e6165382 | sea-battle/sea-battle,sea-battle/sea-battle | public/javascripts/pages/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst updateNotification = () => {\n document.addEventListener('DOMContentLoaded', () => {\n if (Notification.permission !== 'granted') {\n Notification.requestPermission()\n }\n })\n if (!Notification)... | javascript | edit | 0 | 1 | mit | 4b09a703eecc3f5517dc70e51ee7abf8100fee87 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/util/update-notification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst postcssImport = require('postcss-import');\nconst nesting = require('postcss-nesting');\nconst autoprefixer = require('autoprefixer');\nconst csswring = require('csswring');\n\nmodule.exports = {\n plugins: [\n postcssImport()... | javascript | edit | 0 | 0 | mit | 6227f11cf2b3847d8e9b18abf4f449dccdec9009 | nodaguti/word-quiz-generator-webapp,nodaguti/word-quiz-generator-webapp | postcss.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { anchorate } from \"anchorate\";\n\nconst subRoutes = [\"/\", \"/team\", \"/work\", \"/contact\"];\n\nconst isHomeRoute = route => subRoutes.indexOf(route) !== -1;\n\nexports.onRouteUpdate = props => {\n // anchorate({\n // ... | javascript | edit | 0 | 1 | mit | 3915cb47073b63826a539ef344b1580a4310dcc7 | makersden/homepage,makersden/homepage | gatsby-browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name blockblockadblock\n// @namespace Mechazawa\n// @include https://blockadblock.com/*\n// @version 1\n// @grant none\n// @run-at document-start\n// ==/UserScript==\n\n\n\n// This is v... | javascript | edit | 0 | 5 | unlicense | 1118e45e1a3a9803244eede35f6bf786fa1b65ca | Mechazawa/BlockBlockAdBlock | blockblockadblock.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {ToolViewport} from '../Tools';\nimport styled from 'styled-components';\nexport default styled(ToolViewport)`\n background-color: none;\n padding: 0 10px 0 50px;\n position: relative;\n\n &::before{\n content: ' ';\n w... | javascript | edit | 0 | 0 | mit | 104b3f4f49f64fa66ef4bb03f0d01bb36013edfa | BeautifulTrouble/beautifulrising-client,BeautifulTrouble/beautifulrising-client | app/components/HomePage/ListView/ListViewport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-contrib-htmlmin\n * http://gruntjs.com/\n *\n * Copyright (c) 2012 Sindre Sorhus, contributors\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n var minify = require('html-m... | javascript | edit | 0 | 3 | mit | 98548f8330696e009a1e81af2d9b234d950c1d3f | gruntjs/grunt-contrib-htmlmin,gruntjs/grunt-contrib-htmlmin | tasks/htmlmin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar polyline = require( '..' )\nvar assert = require( 'assert' )\n\nsuite( 'Google Polyline Example', function() {\n\n test( 'encode', function() {\n\n var points = [\n [ 38.5, -120.2 ],\n [ 40.7, -120.95 ],\n [ 43.25... | javascript | edit | 0 | 1 | mit | a7dbce88aceca898c578a7fee62644feb9e07fd2 | code42day/google-polyline | test/examples.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar should = require('should');\n\nvar QueryCompiler = require('../lib/compiler');\ndescribe('QueryCompiler', function () {\n describe.only('compile', function () {\n it('compile ne null query', function () {\n var query = {\n ... | javascript | edit | 0 | 1 | mit | 49b917705a28898398b388e3398ac95c14636985 | surikaterna/kuery | test/compiler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Program that sorts a stack such that smallest items are on top\n\n// create Stack class\nfunction Stack() {\n\tthis.top = null;\n}\n\n// push value into stack\nStack.prototype.push = function(val) {\n\tthis.top = {... | javascript | edit | 0 | 4 | mit | 753359fde8e0868df5a67e79e74c8ea5076c83aa | derekmpham/interview-prep,derekmpham/interview-prep | sort-stack.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tplugins: [\n\t\t\"filenames\",\n\t\t\"prettier\"\n\t],\n\trules: {\n\t\t// ERRORS\n\n\t\t// No more bikeshedding on style; just use prettier\n\t\t// https://github.com/not-an-aardvark/eslint-plugin-prettier\n\t\t\"... | javascript | edit | 0 | 0 | mit | 7cfc6ee461d82c5ccc60d59d07daf99c392eb860 | civicsource/eslint-config-civicsource | style.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar server = io.connect('http://'+window.location.host);\n$('#name').on('submit', function(e){\n e.preventDefault();\n $(this).hide();\n $('#chat_form').show();\n var name = $('#name_input').val()\n server.emit('join', name)\n $('... | javascript | edit | 0 | 2 | mit | 75af8619cba3e665419965d4a4108e61d202e857 | lawyu89/Simple_Chatroom,lawyu89/Simple_Chatroom | public/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { Text, StyleSheet, Platform } from 'react-native';\nimport fonts from '../config/fonts';\nimport normalize from '../helpers/normalizeText';\n\nlet styles = {};\n\nconst TextElement = ({... | javascript | edit | 0 | 11 | mit | b3f0e0245ba31e22d21c42852c79ece24e052597 | kosiakMD/react-native-elements,martinezguillaume/react-native-elements,react-native-community/React-Native-Elements,kosiakMD/react-native-elements | src/text/Text.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require(\"assert\");\nvar spawn = require('child_process').spawn;\n\n\ndescribe('Start docker container', function () {\n it('should show M2 preamble', function (done) {\n // ssh localhost\n\n var docker = ... | javascript | edit | 0 | 1 | mit | 0168687fb0b9e599e5bf1f25627006531624d114 | fhinkel/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell | tests/docker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('ngSharepoint', [])\n .run(function($sp, $spLoader) {\n if ($sp.getAutoload()) {\n if ($sp.getConnectionMode() === 'JSOM') {\n $spLoader.loadScripts('SP.Core', ['//ajax.aspnetcdn.... | javascript | edit | 0 | 5 | apache-2.0 | 4516a7ced770f11f0febe8aec0615ddbb8f6674b | maxjoehnk/ngSharepoint | src/modules/ngSharepoint/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { RootReducer } from '../reducers'\nvar DEVEL_DOMAINS = [\n 'localhost',\n '127.0.0.1',\n '[::1]'\n]\n\nvar isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname)\nconst hasDevTools = angular.isDefined(window.__R... | javascript | edit | 0 | 2 | apache-2.0 | 3cd394442a4eb3000c83e2a427e5c544d629e7a7 | ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-self_service | client/app/core/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar es = require(\"../es\");\n\nfunction Negate(transform, node) {\n var expr = transform(node.expr);\n if (typeof node.expr.data === \"number\") {\n var literal = es.Literal(node.loc, node.expr.data);\n return es.Un... | javascript | edit | 0 | 2 | mit | 2885aa520808d944b76387bc4f2dc8c9896c6dcf | wavebeem/squiggle,saikobee/expr-lang,squiggle-lang/squiggle-lang,saikobee/expr-lang,squiggle-lang/squiggle-lang,wavebeem/squiggle,squiggle-lang/squiggle-lang,saikobee/squiggle,saikobee/squiggle,saikobee/expr-lang,wavebeem/squiggle,saikobee/squiggle | src/transform/negate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n init () {\n this._super(...arguments);\n this.set(\"query\", this.get(\"parameters\").query);\n },\n\n actions: {\n\n transitionToFa... | javascript | edit | 0 | 1 | apache-2.0 | 4b1dc538fce1baba33efbc9f3b07ae0af3054eb7 | caneruguz/share-analytics,caneruguz/share-analytics,caneruguz/share-analytics | app/components/query-widget/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n///\nvar pkg = require(\"./package.json\")\n , gulp = require(\"gulp\")\n , plumber = require(\"gulp-plumber\")\n\n///\n// Lint JS\n///\nvar jshint = require(\"gulp-jshint\")\n , jsonFiles = [\".jshintrc\", \"*.json\"]\n , jsFiles =... | javascript | edit | 0 | 2 | mit | f125ca538110ffed462a896e639b86e53d4492de | MoOx/parallaxify,MoOx/parallaxify | gulpfile.js | rejected_duplicate | Near-duplicate of sample 107297 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nvar gulp = require('gulp');\nvar tsc = require('gulp-typescript');\n\ngulp.task('copy', function () {\n\n gulp.src('src/html/**')\n .pipe(gulp.dest('dest/html'));\n});\n\ngulp.task('build', [\n 'copy'\n]);\n\n... | javascript | edit | 0 | 1 | mit | 7f0af3ca94e821afe42d0b096c8a7b25d893920a | yajamon/freedomWarsPlantSimulator,yajamon/freedomWarsPlantSimulator | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar gulpTypescript = require('gulp-typescript');\nvar typescript = require('typescript');\nvar header = require('gulp-header');\nvar merge = require('merge2');\nvar pkg = require('./package.json');\n\nvar he... | javascript | edit | 0 | 1 | mit | b7fca936a31175610262b51bf618465dd72babbb | ceolter/angular-grid,ceolter/ag-grid,ceolter/angular-grid,ceolter/ag-grid | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\nvar rirmaf = require('rimraf');\n\nvar lib = 'lib/**/*.js';\n\ngulp.task('coverage', function(){\n return gulp.src(lib)\n .pipe($.istanbul());\n}... | javascript | edit | 0 | 1 | mit | 9a21a130e2ed9ae44ddf00ac367fdb66de81ce18 | hexojs/hexo-fs,hexojs/hexo-fs | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n//var browserify = require('browserify');\nvar webpack = require('webpack');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar mocha = require('gulp-mocha');\nvar rena... | javascript | edit | 0 | 2 | apache-2.0 | 2b57e2cf7ac3b3b20253f27c5adc98f58f77b6af | jtsay362/solveforall-custom-mathjs-build | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {Observable} from 'rx';\n\nexport function asyncMap(array, selector, maxConcurrency=4) {\n return Observable.from(array)\n .map((k) =>\n Observable.defer(() =>\n Observable.fromPromise(selector(k))\n .map... | javascript | edit | 0 | 2 | mit | 196c268ec7913ce0aba8afb6ec0eb27bc3abd325 | surf-build/surf,surf-build/surf,surf-build/surf,surf-build/surf | src/promise-array.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport { NpmConfig, httpsGetPromise } from './helpers';\n\nconst addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };\nconst removeCaret = R.replace(/\\^/, '');\nconst isNotPrivate = R.... | javascript | edit | 0 | 1 | mit | 486968a19d4d7f05c33a0039c09f94006f885960 | cachilders/backpat,churchie317/backpat | src/utilities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar apiKey = Meteor.settings.public.streamApiKey,\n apiAppId = Meteor.settings.public.streamApiAppId;\n\nvar settings = _.clone(Config);\n\nsettings['apiKey'] = apiKey;\nsettings['apiAppId'] = apiAppId;\n\nif (Meteor.isServer) {\n S... | javascript | edit | 0 | 0 | bsd-3-clause | accc090267f36417b578d1e3254ae2671599a62c | GetStream/stream-meteor | stream-meteor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar path = require('path');\n\n/**\n * Initializes the crx autoupdate grunt helper\n *\n * @param {grunt} grunt\n * @returns {{buildXML: Function, build: Function}}\n */\nexports.init = function(grunt){\n /**\n * G... | javascript | edit | 0 | 3 | mit | 578bfe10cb2dd434c36e837c0d4b687eb0d2a3ba | oncletom/grunt-crx,oncletom/grunt-crx | lib/autoupdate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar parse = require('./parse')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the month\n *\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date to be changed\n * @param {Number}... | javascript | edit | 0 | 1 | mit | 8bcd61b8cea323f6060b2d90ec94d3e1fb7190f4 | js-fns/date-fns,date-fns/date-fns,date-fns/date-fns,date-fns/date-fns,js-fns/date-fns | src/add_days.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nvar sqlite3 = require('sqlite3').verbose();\nvar db = new sqlite3.Database('/home/pi/homeauto/backend/temp.db');\n\n/* GET home page. */\nrouter.get('/v1/temperature',... | javascript | edit | 0 | 5 | mit | 31bd052a42f825f3dbc4b28fcd6d998db558f91e | schmidtfx/homeauto,schmidtfx/homeauto,schmidtfx/homeauto | ui/routes/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst expect = require('chai').expect;\nconst findAssets = require('../src/config/findAssets');\nconst mockFs = require('mock-fs');\nconst dependencies = require('./fixtures/dependencies');\n\ndescribe('fi... | javascript | edit | 0 | 1 | mit | 7a0813a41afca49b7fe73367a6707f4379353009 | rnpm/rnpm | test/findAssets.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\n 'use strict';\n\n var reverseUrl, $route;\n var routeMock = {};\n\n routeMock.routes = {\n '/testRoute1/': {\n controller: 'TestController1',\n originalPath: '/test-route-1/'\n... | javascript | edit | 0 | 1 | mit | b9913a7f583825b76da298d9d2275a5f1565f18e | incuna/angular-reverse-url | test/reverse_urlSpec.js | rejected_duplicate | Near-duplicate of sample 110241 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst \n\tr = require('../'),\n\texpect = require('chai').expect;\n\ndescribe('RemoveTabs', function(){\n\tit('should have not tabs.', function(){\n\t\tvar tests = [\nr`\t\t\tremove\n\t\t\ttabs`,\n\t\t\t\nr`\t\t\tremove\n\t\t\t\ttabs\n\... | javascript | edit | 0 | 2 | mit | 3052a38676e0c1066dfa145cc29370b762d6ea5b | Wooooo/remove-tabs | test/rSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport co from 'co';\nimport test from 'blue-tape';\nimport agent from 'promisify-supertest';\n\nimport createApplication from '../src';\n\nconst setup = () => {\n return agent(createApplication().callback());\n};\n\ntest('GET /', (sub... | javascript | edit | 0 | 1 | isc | 53f0ee1ff11a92122bd905d587f88abc696b40de | francisbrito/let-go-hold-on-api | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst test = require('tape')\nconst proxyquire = require('proxyquire')\n\ntest('fetch', function (t) {\n t.plan(3)\n\n const fetch = proxyquire('./fetch', {\n 'simple-get': function (options, callback) {\n t.de... | javascript | edit | 0 | 1 | mit | b02b438bc187054eaa35d56afc51efdad69a889c | bendrucker/http-app-router | fetch-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.fetch = require('jest-fetch-mock');\n\n// Mock the Date object and allows us to use Date.now() and get a consistent date back\nconst mockedCurrentDate = new Date(\"2017-10-06T13:45:28.975Z\");\nrequire('jest-mock-now')(mockedCurr... | javascript | edit | 0 | 1 | mit | 8d4f9d395abb6f562edc5a04d7c521279908ce2c | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/setupJest.js | rejected_duplicate | Near-duplicate of sample 105862 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** \n* ByLine.js\n* Description: view component that makes up a news item preview\n* Modules: React and React Native Modules\n* Dependencies: styles.js SmallText\n* Author: Tiffany Tse\n*/\n//import modules\nimport React, { PropTy... | javascript | edit | null | null | mit | 9c02fcfd2c70299d7bb785e9ac2a299320bf83d1 | titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone | src/components/ByLine.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar VirtualAccOpeningData = (function(){\n \"use strict\";\n\n function getDetails(password, residence, verificationCode){\n var req = {\n new_account_virtual: 1,\n client_password: pas... | javascript | edit | 0 | 2 | apache-2.0 | fa2a3f0c689a6cedc86452665c338935a5b95574 | teo-binary/binary-static,binary-com/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,teo-binary/binary-static,binary-com/binary-static,negar-binary/binary-static,kellybinary/binary-static,raunakkathuria/binary-static,fayland/binary-static,teo-binary/binary-st... | src/javascript/binary/websocket_pages/user/new_account/virtual_acc_opening/virtual_acc_opening.data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {expect} from 'chai'\nimport chai from 'chai'\nimport spies from 'chai-spies'\n\nimport {\n createAndMountComponent, destroyComponent, onGwtReady,\n onNextTick\n} from '../../vue-gwt-tests-utils'\n\ndescribe('@PropValidator', (... | javascript | edit | 0 | 2 | mit | 40bb555785978dcf6ac287aa10d6be6c17cf31e4 | Axellience/vue-gwt,Axellience/vue-gwt,Axellience/vue-gwt,Axellience/vue-gwt | tests/src/test/javascript/components/basic/propvalidator.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs')\nvar max = process.argv[2]\n\nplayGame()\n\nfunction playGame() {\n var usedNumbers = []\n var number = getRandomNumber(max)\n\n while (!isNewNumber(usedNumbers, number)) {\n number = ... | javascript | edit | 0 | 3 | mit | c218e3ab8e4604b6949ba02deb7a5f1c0b9e32d7 | muan/bingo-board,jlord/bingo-board,muan/bingo-board,jlord/bingo-board | fun-script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes, View, Image } from 'react-native';\nimport Icon from './Icon';\nimport { ICON_NAME } from './config';\n\nexport default class Avatar extends Component {\n\n static propTypes = {\n icon: Pr... | javascript | edit | 0 | 3 | mit | 2c033eb71202c709bdbd45f4a64909b4b83e28be | kenma9123/react-native-material-ui,blovato/sca-mobile-components,xotahal/react-native-material-ui,react-native-material-design/react-native-material-design,xvonabur/react-native-material-ui,thomasooo/react-native-material-design,ajaxangular/react-native-material-ui,mobileDevNativeCross/react-native-material-ui | lib/Avatar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar CanvasDrawer = (function () {\n var CanvasDrawer = function (params) {\n\n };\n\n CanvasDrawer.prototype = {\n drawPlayer: {\n value: function (player) {\n\n }\n },\n drawDisc :{\n... | javascript | edit | 0 | 1 | mit | 0e7fb78882f5b0e78d3f544857d86717fead0cdb | TeamBarracuda-Telerik/JustDiscBattle,TeamBarracuda-Telerik/JustDiscBattle | Renderer/canvas-drawer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*eslint-env mocha */\n'use strict';\n\nconst assert = require('assert');\nconst icli = require('../../packages/cli/src/bin/myrmex');\nconst showStdout = !!process.env.MYRMEX_SHOW_STDOUT;\n\ndescribe('The \"cheers\" sub-command', () => ... | javascript | edit | 0 | 1 | mit | 85108314aa89b401d505d047c070f51d5307ccc6 | myrmex-org/myrmex,myrmex-org/myrmex,lagerjs/lager,myrmex-org/myrmex,myrmx/myrmex,myrmx/myrmex,lagerjs/lager,myrmx/myrmex,myrmx/myrmex,lagerjs/lager,myrmex-org/myrmex,lagerjs/lager | test/cli/myrmex-cheers.integ.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {hasAdRequestPath, isImplTag} = require('./resource-classification');\nconst {URL} = require('url');\n\n/**\n * Returns end time of tag load (s) relative to system boot.\n * @param {LH.Artifacts.NetworkRequest[]} networkRecords\n ... | javascript | edit | 0 | 2 | apache-2.0 | ff58d6e6788382e2468994f9550bcc1e8d103e49 | googleads/publisher-ads-lighthouse-plugin,googleads/publisher-ads-lighthouse-plugin | utils/network-timing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\n// Ref: http://docopt.org/\n\n/*\n\nChain commands\nPositional arguments\nNamed arguments\nRequired arguments\nLimit arguments options\nSet option type (e.g. string, number)\nSet number of options (exact, min, & ... | javascript | edit | 0 | 1 | mit | 8d1a0fd2c8f3bf48b6effdbc656df3e6f904d949 | JakeSidSmith/jargs | examples/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('lodash');\nconst log = require('./log');\n\nlet nameToId = {};\n\nlet mapper = {\n /**\n * Add light name to identifier mapping.\n *\n * @param {string} id - Light identifier\n * @param {st... | javascript | edit | 0 | 4 | mit | 8c3335cf84588aa2ccabe78a96bb668be74fd160 | ristomatti/lifxsh | src/lib/mapper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nsteal('can/util', function (can) {\n\t/**\n\t * @typedef {{bind:function():*,unbind:function():*}} can/util/bind\n\t *\n\t * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup`\n\t * when the first bind happens... | javascript | edit | 0 | 4 | mit | dd03f8c7fa2499e6d121eea710d3cda9803f94a0 | whitecolor/canjs,asavoy/canjs,rjgotten/canjs,patrick-steele-idem/canjs,beno/canjs,patrick-steele-idem/canjs,asavoy/canjs,Psykoral/canjs,Psykoral/canjs,gsmeets/canjs,whitecolor/canjs,tracer99/canjs,patrick-steele-idem/canjs,rasjani/canjs,bitovi/canjs,rjgotten/canjs,bitovi/canjs,gsmeets/canjs,Psykoral/canjs,bitovi/canjs,... | util/bind/bind.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow strict */\n\nexport const caseInsensitiveCompareFunc = (a: string, b: string): number =>\n a.toLowerCase().localeCompare(b.toLowerCase());\n\nexport const numberWithSeparators = (value: number | string): string =>\n value.toS... | javascript | edit | null | null | apache-2.0 | 0b8920aea121ca1483e9cb32e55d4ba38ba2f4b7 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | src/utils/misc.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport resolver from './helpers/resolver';\nimport { setResolver } from 'ember-mocha';\n\nsetResolver(resolver);\n\n/* jshint ignore:start */\nmocha.setup({\n timeout: 5000,\n slow: 500\n});\n/* jshint ignore:end */\n\n```\n\nAppl... | javascript | edit | 0 | 0 | mit | 1ea8df72f7b3e5331bc9772baba105e707127518 | dbalders/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,JohnONolan/Ghost-Admin | tests/test-helper.js | rejected_duplicate | Near-duplicate of sample 82673 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').config();\n\nmodule.exports = {\n\n development: {\n client: 'postgresql',\n connection: {\n host : process.env.DB_HOST,\n user : process.env.DB_USER,\n password : process.env.DB_PASS,\n ... | javascript | edit | 0 | 0 | mit | 17f67a15419b45e90498982ba77c9d9083eda189 | potatowave/escolha,potatowave/escolha | knexfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport gulp from 'gulp';\nimport babel from 'gulp-babel';\nimport istanbul from 'gulp-istanbul';\nimport mocha from 'gulp-mocha';\n\ngulp.task('pre-test', () => {\n return gulp.src(['dist/index.js'])\n // Cove... | javascript | edit | 0 | 1 | mit | b763199fe0d1b6920cd1827f16529ddc1e021422 | cheton/gcode-parser | gulpfile.babel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Check SCSS for code quality\nmodule.exports = function(grunt) {\n grunt.config('scsslint', {\n allFiles: [\n 'scss/**/*.scss',\n ],\n options: {\n bundleExec: false,\n colorize... | javascript | edit | 0 | 1 | mit | 32b688e53c0170f7e4f0c37d38d4b299bbf9cf66 | yellowled/yl-bp,yellowled/yl-bp | grunt/scss-lint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { c } from 'ttag';\nimport {\n useEventManager,\n useOrganization,\n useDomains,\n SubTitle,\n Alert,\n PrimaryButton,\n Button,\n Block,\n useModal\n} from 'react-components... | javascript | edit | 0 | 4 | mit | 47459be879b85fe9daedb2d57ff43c2619dd3620 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/domains/DomainsSection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { history, document } from 'global';\nimport qs from 'qs';\nimport { toId } from '@storybook/router/utils';\n\nexport function pathToId(path) {\n const match = (path || '').match(/^\\/story\\/(.+)/);\n if (!match) {\n throw ... | javascript | edit | 0 | 5 | mit | 5b204b9a00767a0844ce4e364b989b1adcd03360 | storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook | lib/core/src/client/preview/url.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add sonar scanner client script"
},
{
"role": "assistant",
"content": "const {\n spawn\n} = require(\"child_process\");\n\nconst options = {\n sources: function (path) {\n return `-Dsonar.sources=\"${path}\"`;\n ... | javascript | new_file | 0 | 1 | mit | 1bbdb4ab27bf647f900d5908fab1aa3a6e660a42 | ovidiup13/L5-ProjectSource | scripts/clients/sonar_client.js | rejected_duplicate | Near-duplicate of sample 86423 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Converts a query string parameter for a line or column number\n// to a zero-based line or column number for the Atom API.\nfunction getLineColNumber (numStr) {\n const num = parseInt(numStr || 0, 10)\n return Math.max(num - 1, 0)\n... | javascript | edit | 0 | 3 | mit | 2a2ef17d85f9336799c3e39249f960f75cac7cf6 | atom/atom,atom/atom,brettle/atom,brettle/atom,brettle/atom,Mokolea/atom,Mokolea/atom,PKRoma/atom,PKRoma/atom,Mokolea/atom,atom/atom,PKRoma/atom | src/core-uri-handlers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar AppDispatcher = require('../dispatcher/AppDispatcher'),\n ActionTypes = require('../constants/ActionTypes'),\n RepoAPI = require('../utils/RepoAPI'),\n StarredReposByUserStore = require('../stores/StarredRe... | javascript | edit | 0 | 5 | mit | 62d9fedc4b56f986d04480f9b342ae2ef5d37f60 | stylecoder/flux-react-router-example,AnthonyWhitaker/flux-react-router-example,machnicki/healthunlocked,goatslacker/flux-react-router-example,tiengtinh/flux-react-router-example,machnicki/healthunlocked,keshavnandan/flux-react-router-example,bertomartin/flux-react-router-example,ycavatars/flux-react-router-example,kesh... | scripts/actions/RepoActionCreators.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Base from 'simple-auth/authenticators/base';\nimport ENV from 'wordset/config/environment';\n\nexport default Base.extend({\n restore: function(properties) {\n var propertiesObject = Ember.Object.c... | javascript | edit | 0 | 3 | mit | 52a7d329dec734129cf130e79f7a1c4929d02ba7 | kaelig/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,kaelig/wordset-ui,wordset/wordset-ui | app/authenticators/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar events = [];\nvar requestInterval = 5000;\n\nwindow.addEventListener('click', function(e) {\n e = event || window.event;\n\n events.push(processEvent(e));\n});\n\nvar processEvent = function(e) {\n\n // Event... | javascript | edit | 0 | 2 | mit | 002452c5b597e98408e5b28b6658f34e54a66500 | Sextant-WDB/sextant-ng | app/public/sa-tracking.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint ignore:start */\n\nvar sprintf = require('sprintf-js').sprintf;\n\n/**\n * @ngdoc method\n * @name function:i18n#N_\n * @methodOf function:N_\n * @description this function marks the translatable string with N_\n * for 'grunt... | javascript | edit | 0 | 3 | apache-2.0 | be686e0accb9e8facc652a559b1fb39a8508c97d | snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx | awx/ui/client/src/i18n.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst visualizeBoardS = Symbol('visualizeBoard')\nconst visualizeOrdersS = Symbol('visualizeOrders')\n\nmodule.exports = class Visualizer {\n constructor (mapSvg, visualizeBoard, visualizeOrders) {\n this.map = mapSv... | javascript | edit | 0 | 2 | mit | d2702efedfda3ffdb944a8118befc5d6409e8741 | KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip | lib/visualizer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\nconst Lint = require(\"tslint\");\n\nclass Rule extends Lint.Rules.AbstractRule {\n\tapply(sourceFile) {\n\t\treturn this.applyWithWalker(new NoFsPat... | javascript | edit | 0 | 3 | mit | 8fdece0b1a17c16ad3028befa34adb56d49c4203 | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | lints/disallowFspathRule.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n \n\n // Status reporting code\n // Use this to report missing hardware, plugin or unsupported browser\n ext._getS... | javascript | edit | 0 | 5 | bsd-3-clause | d2adfb4288153b333a0aef69428a0312d163d085 | visor841/SkelScratch,Calvin-CS/SkelScratch | Kinect2Scratch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction RuboCop(opts) {\n\tthis.exe = \"rubocop\";\n\tthis.ext = process.platform === 'win32' ? \".bat\" : \"\";\n\tthis.path = opts.path;\n\tthis.responsePath = \"stdout\";\n\n\tthis.args = [\"-s\", \"{path}\", \"-f... | javascript | edit | 0 | 7 | mit | 893f7371ae0d2517d4276ab4e868ce03b0cf1dbe | rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby | lint/lib/linters/RuboCop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar expect = chai.expect;\nvar db = require('../server/db/config');\nvar models = require('../server/db/models');\n\ndescribe('database storage', function() {\n var testData = {\n x: 37.783599,\n y: -... | javascript | edit | 0 | 1 | mit | 18dbfb541960465944971269a393af668ecbb33d | team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery | specs/database.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst nunjucks = require('nunjucks');\nconst fs = require('fs-promise');\nconst path = require('path');\nconst yaml = require('js-yaml');\nconst Promise = require('bluebird');\n\nconst schemesDir = '../db/schemes';\n\nfs\n .readdir(sch... | javascript | edit | 0 | 1 | mit | 2b928608f1bad3f1721838afa00dccddb724f48b | base16-builder/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder,aloisdg/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder | util/schemesPreviewGenerator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('aGeolocator', [])\n .factory('Geolocator', ['$http', '$q', function($http, $q){\n GEOIP_URL = \"https://www.telize.com/geoip\"\n\n _getIPLocation = function() {\n $http.get(GEOIP_URL).then(function(res) {\n ... | javascript | edit | 0 | 2 | bsd-2-clause | daeb051c4fba5603cad33cc414528052c09a0afd | asoesilo/geolocator | src/geolocator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport const Menubar = () => (\n <div className=\"sub-navigation\">\n <div className=\"limit-width\">\n <Link className=\"sub-navigation__link\... | javascript | edit | 0 | 1 | apache-2.0 | 227b01b527deab80958e30bd8bf6a194b06317aa | nahody/biografia,nahody/biografia | src/components/Admin/Menubar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst LANGUAGE_COLORS = {\n Scala: '#BB0017',\n Clojure: '#00AA00',\n JS: '#CCAA00',\n JavaScript: '#CCAA00',\n CoffeeScript: '#CCAA00',\n Ruby: '#9B111E',\n VB: '#663300',\n 'C#': '#7600BC',\n Go: '#996633',\n HTML5: '#FF0032... | javascript | edit | 0 | 0 | mit | d59767ea4bf2e0eeeb8537302d071284dc0459e6 | zalando/zalando.github.io-dev,zalando/zalando.github.io-dev | src/constants/LanguageColors.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Extend the CalendarHelper with global allowEmpty from config."
},
{
"role": "assistant",
"content": "import Ember from 'ember';\nimport config from '../config/environment';\nimport CalendarHelper from 'ember-moment/helpers/mo... | javascript | new_file | 0 | 0 | mit | 0448d3651cbf8df005ed20dd05ab1241ae940f76 | exop-group/ember-moment,stefanpenner/ember-moment,exop-group/ember-moment,stefanpenner/ember-moment | app/helpers/moment-calendar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be useful for other movies/shows */\nvar fullTitles = {\n 'Star Wars: The Clo... | javascript | edit | 0 | 3 | mit | 753171601f3471320ac3ec560b5148f9da687622 | MrMamen/traktNRK,MrMamen/traktNRK,tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix | app/scripts/src/content/item.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar proj4 = require('proj4');\nproj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs');\n\nvar lat = 59.932624;\nvar lng = 10.734738;\nvar xy = proj4('EPSG:25832', { x: lng, y: lat })\n\nconsole.log(xy);\n\n```\n\n... | javascript | edit | 0 | 0 | mit | 15df89b668ce34c7d7e0cec6d44471baf031eb24 | hkwaller/next,hkwaller/next,hkwaller/next,hkwaller/next | www/js/proj4.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar months = [\"enero\", \"febrero\", \"marzo\",\n\"abril\", \"mayo\", \"junio\",\n\"julio\", \"agosto\", \"septiembre\",\n\"octubre\", \"noviembre\", \"diciembre\"];\n\nvar footer = document.getElementById(\"footer\");\nvar div = docum... | javascript | edit | 0 | 0 | mit | e8ca95728951c633891fe8920f1bd450bf84364d | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | scripts/footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add a functioning service worker"
},
{
"role": "assistant",
"content": "self.addEventListener('install', function _installHandler(e) {\n e.waitUntil(\n caches.open('static')\n .then(function _addToCache(c... | javascript | new_file | 0 | 2 | apache-2.0 | dce5cf9c470b25f1b6e60d8f5cf710a63ab56afd | vishwaabhinav/xkcd-pwa,vishwaabhinav/xkcd-pwa | service_worker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {\n assemble,\n writeFile,\n unicodeVersion\n} = require('./utils.js');\n\n// This includes only the binary properties required by UTS18 RL1.2 for level 1 Unicode regex\n// support, minus `Assigned` which has special hand... | javascript | edit | 0 | 0 | mit | 0b8a5a18f05eed0c10f357f3f8f7231ff964d087 | slevithan/xregexp,slevithan/XRegExp,slevithan/XRegExp,slevithan/xregexp,GerHobbelt/xregexp,GerHobbelt/xregexp,slevithan/xregexp,GerHobbelt/xregexp | tools/scripts/property-regex.js | rejected_duplicate | Near-duplicate of sample 99486 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n var menuUrl = \"https://www.bin4burgerlounge.com/our-downtown-menu/\";\n $.ajax({\n url: \"http://www.corsmirror.com/v1/cors?url=\" + menuUrl,\n dataType: \"html\",\n crossDo... | javascript | edit | 0 | 1 | mit | f9ba237e2746b485e062c30749c45927af832424 | connor-bracewell/nnorco,connor-bracewell/nnorco,connor-bracewell/nnorco,connor-bracewell/nnorco | src/js/bin4features.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction eval_clojure(code) {\n var data;\n $.ajax({\n url: \"eval.json\",\n data: { expr : code },\n async: false,\n success: function(res) { data = res; }\n });\n return data;\n}\n\nfunction htm... | javascript | edit | 0 | 2 | mit | 666410d49d3aac697200737dea8d19b77d5708a4 | maryrosecook/islaclj | resources/public/javascript/tryclojure.js | rejected_duplicate | Near-duplicate of sample 91945 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.