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": "Write javascript code for the following: Add tests for vent constructor. [rev: matthew.gordon2]" }, { "role": "assistant", "content": "define([\n 'js-utils/js/vent-constructor',\n 'underscore'\n], function(VentConstructor, _) {\n\n describe('Vent constructo...
javascript
new_file
0
1
mit
6558cbf9032ad066b42e7e91c33fc4a5a7c63d96
hpautonomy/jsWhatever,hpe-idol/jsWhatever,hpe-idol/jsWhatever,hpautonomy/jsWhatever,hpautonomy/jsWhatever,hpe-idol/jsWhatever
test/js/spec/vent-constructor.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add code for Hilbert curve" }, { "role": "assistant", "content": "/* eslint-disable no-plusplus,no-bitwise */\n\n// Adapted from Jason Davies: https://www.jasondavies.com/hilbert-curve/\nconst hilbert = (function () {\n // F...
javascript
new_file
0
4
mit
9906576240c224e31e5813a7243c503f084e293b
flekschas/hipiler,flekschas/hipiler,flekschas/hipiler
src/utils/hilbert-curve.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create test with clicking simulation" }, { "role": "assistant", "content": "import { React, sinon, assert, expect, TestUtils } from '../test_exports';\nimport FactionSwitch from '../../src/js/components/FactionSwitch';\nimpor...
javascript
new_file
0
1
mit
54cf7c53c2077520011bbc9f7c6e95e581cea2be
kusera/sentrii,kusera/sentrii
test/components/FactionSwitch.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test cases for boolean validation rule" }, { "role": "assistant", "content": "import { expect } from 'chai';\nimport validator from '../../lib';\n\ndescribe('Boolean validator', () => {\n const rules = {\n paid: ['boo...
javascript
new_file
0
1
mit
0703d3d0d20aa9056448af5afd236d3f8d845721
sendyhalim/satpam,cermati/satpam
test/validators/boolean.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test fixtures for data in v1.0.0" }, { "role": "assistant", "content": "export const round1 = {\n 'Bridge.currentRound': '1',\n 'Bridge.maker': '0',\n 'Bridge.players': '[{\"bid\":null,\"win\":null,\"_buffer\":{\"lastR...
javascript
new_file
0
0
mit
dfa25e23b43c3464b8cd18fc70f5bd69e8e9644d
Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc
test-fixtures/migration-data.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add service for determining things to do with templates." }, { "role": "assistant", "content": "Application.Services.factory(\"provTemplate\", [provTemplate]);\n\nfunction provTemplate() {\n var service = {\n\n _han...
javascript
new_file
0
6
mit
ad31d7b15df5c18f922d026a62ea7cce6056054e
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/application/services/prov-template.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add migration file for agenda tags and image" }, { "role": "assistant", "content": "\nexports.up = function (knex, Promise) {\n return Promise.all([\n knex.schema.table('agenda', function (table) {\n table.string('im...
javascript
new_file
0
1
mit
1c37233c9af23749fea11b52423c64f18fd0be1a
voxpelli/node-one-page,voxpelli/node-one-page
migrations/20171228201331_agenda-tags-image.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add stub unit tests for syncing" }, { "role": "assistant", "content": "\"use strict\";\nvar sdk = require(\"../..\");\nvar MatrixClient = sdk.MatrixClient;\nvar utils = require(\"../test-utils\");\n\ndescribe(\"MatrixClient\"...
javascript
new_file
0
1
apache-2.0
5c3bfa6a83689bafe404041987250c455c82a5f9
krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,williamboman/matrix-js-sdk,matrix-org/matrix-js-sdk,williamboman/matrix-js-sdk,williamboman/matrix-js-sdk
spec/unit/matrix-client.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test case for serving Node program." }, { "role": "assistant", "content": "var modules = require('../lib/middleware/modules')\n , fs = require('fs');\n\n\nfunction MockRequest() {\n}\n\nfunction MockResponse(done) {\n this....
javascript
new_file
0
2
mit
7500fb9b8c55f7468accf6d9a7e0dcb5a5b4d5ef
jaredhanson/jsmt
test/modules.node.test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add types for react-ui-validation package" }, { "role": "assistant", "content": "// flow-typed signature: 291855e84801d873d854919a58e86373\n// flow-typed version: <<STUB>>/react-ui-validations_v0.0.0/flow_v0.90.0\n\n/**\n * T...
javascript
new_file
null
null
mit
0c5f9eda34a90954a94c2e9aa657d2256fe0208f
moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0
flow-typed/npm/react-ui-validations_v0.x.x.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: [test] Add missing lifecycle OS deps test" }, { "role": "assistant", "content": "var assert = require('assert'),\n path = require('path'),\n nock = require('nock'),\n vows = require('vows'),\n helpers = require('....
javascript
new_file
0
1
mit
6e8a1628d0468446a4f04306534d9325a93f6f6d
opsmezzo/quill
test/composer/lifecycle-os-deps-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add solution to question 096" }, { "role": "assistant", "content": "/**\n * @param {number} n\n * @return {number}\n */\nvar numTrees = function(n) {\n var dp = [0, 1];\n var less = 0;\n var more = 0;\n\n dp[n] = ...
javascript
new_file
0
7
mit
323fd8981dd021516d6e8f00930b586bcb900284
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
Medium/096_Unique_Binary_Search_Trees.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test the function which will process times" }, { "role": "assistant", "content": "'use strict';\n\n//Load Config File\nvar fs = require('fs');\nvar processTimes = require('../processtimes');\n\n//Require Module\n\nvar log4js ...
javascript
new_file
0
2
apache-2.0
e1f74e4ca49c6d08b9cf18483acf187b14c47242
dollars0427/SQLwatcher
test/processtimes.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar qajax = require(\"qajax\");\n\nvar qajaxWrapper = function (options) {\n var response = {\n status: null,\n body: null\n };\n\n var parseResponse = function (xhr) {\n response.status = xhr.status;\n try {\n respo...
javascript
edit
0
3
apache-2.0
cd5ceceffef29fcd87b465d9a29ab5975acab6a7
watonyweng/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,yp-engineering/marathon-ui,janisz/marathon-ui,mesosphere/marathon-ui,yp-engineering/marathon-ui,Raffo/marathon-ui,watonyweng/marathon-ui,janisz/marathon-ui,Raffo/marathon-ui
src/js/helpers/qajaxWrapper.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add the example to list the folder with child process." }, { "role": "assistant", "content": "var child_process = require('child_process');\n\nvar ls = child_process.spawn('ls', [ '-lh', '/usr' ]);\n\nls.stdout.on('data', fun...
javascript
new_file
0
1
mit
3d550711e29ab3be257b65350afe583c39b7f1c7
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
9/child_process_ls.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add basic component testing for Header" }, { "role": "assistant", "content": "import { React, sinon, assert, expect, TestUtils } from '../test_exports';\nimport Header from '../../src/js/components/Header';\n\ndescribe('Heade...
javascript
new_file
0
1
mit
b5616985757ade1f8981c1330a605677bf2c3a82
kusera/sentrii,kusera/sentrii
test/components/Header.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add up-vote & down-vote functionality" }, { "role": "assistant", "content": " \nvar counter = 0;\n$(\"#up-vote\").click(function() {\n counter++;\n $(\"#count\").text(counter);\n});\n$(\"#down-vote\").click(function() {\n ...
javascript
new_file
0
1
mit
ac82e1dfda63c2140559ae1ec2e452f737be9291
iidrees/More-Recipes,iidrees/More-Recipes
template/js/more-recipe.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add users_streets api with sequelize" }, { "role": "assistant", "content": "const { User, Street } = require('../../db/models')\nconst { ERRORS } = require('../../../lib/util')\nconst logger = require('../../../lib/logger.js'...
javascript
new_file
0
7
bsd-3-clause
a2bcc2373e3dbb2313878e303612ed8c13807e59
codeforamerica/streetmix,codeforamerica/streetmix,codeforamerica/streetmix
app/resources/v1/users_streets_pg.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add tests for LCircleMarker component" }, { "role": "assistant", "content": "import { getWrapperWithMap } from '@/tests/test-helpers';\nimport { testCircleFunctionality } from '@/tests/mixin-tests/circle-tests';\nimport LCirc...
javascript
new_file
0
1
mit
b84879cd0ec21e1f7c0dcf8b503560d56e66a6c4
KoRiGaN/Vue2Leaflet
tests/unit/components/LCircleMarker.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add new endpoint (to replace start)" }, { "role": "assistant", "content": "\"use strict\";\nvar Anyfetch = require('anyfetch');\n\nmodule.exports.get = function get(req, res, next) {\n var anyfetchClient = new Anyfetch(req.a...
javascript
new_file
0
2
mit
128ea7db413c3f49832949d8d0f2fff97d2f8701
AnyFetch/companion-server
lib/handlers/providers/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add notification once victim deleted" }, { "role": "assistant", "content": "import React from 'react';\n\nexport default class DeleteNotification extends React.Component {\n render() { \n return(\n <div c...
javascript
new_file
0
1
mit
72af2a8f45fad46be6f01a52a2ff40507b2a450c
dimriou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,di...
frontend/src/containers/DeleteNotification.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TileIntersectsBody = function (tileWorldRect, body)\n{\n if (body.isCircle)\n {\n return false;\n }\n else\n {\n return !(\n body.right <= tileWorldRect.left ||\n body.bottom <= til...
javascript
edit
0
4
mit
15825eacb313872cfe6d8afff52a93604127e8dd
photonstorm/phaser,TukekeSoft/phaser,TukekeSoft/phaser,BeanSeed/phaser,mahill/phaser,spayton/phaser,photonstorm/phaser,pixelpicosean/phaser,spayton/phaser,TukekeSoft/phaser,rblopes/phaser,BeanSeed/phaser,englercj/phaser,mahill/phaser
src/physics/arcade/inc/tilemap/TileIntersectsBody.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add es6 default, rest, spread params examples" }, { "role": "assistant", "content": "// 06 - Callee-evaluated default parameter values.\n\n// Default params\n\nfunction mul(a, b = 100) {\n return a * b;\n}\nconsole.log(\"MUL...
javascript
new_file
0
1
mit
24e779a15d7a21d0f64ad90402ff8a30e0fc8ea3
petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox
js/es6-playground/06-defaut-rest-spread.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add an application that gets messages from rabbit and pushes them into a socket." }, { "role": "assistant", "content": "var rabbit = require('./rabbit');\nvar config = require('./rabbit.json');\nvar commandLineArgs = require(...
javascript
new_file
0
2
mit
69ac01bce7a2c4f657e7fa44d5d51696cb788354
RenovoSolutions/socket-server
index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add randbetween- and two monster-functions" }, { "role": "assistant", "content": "/*jshint esnext: true*/\n/*jshint browser: true*/\n'use strict'\n\nfunction randBetween(min, max) {\n return Math.floor(Math.random() * (max...
javascript
new_file
0
2
mit
25d0b59a3791063c815d7b83748f410c1a58df5b
Mattiaslndstrm/koopa-paratroopas,Mattiaslndstrm/koopa-paratroopas,Mattiaslndstrm/koopa-paratroopas
src/monster-array.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add pointerlock api feature detect" }, { "role": "assistant", "content": "// https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API\r\n\r\nModernizr.addTest('pointerlock',!!Modernizr.prefixed('pointerLockElement', docu...
javascript
new_file
0
0
mit
1632ae052f0a5061c09c3c00afc236ad7296ef46
Modernizr/Modernizr,Modernizr/Modernizr
feature-detects/pointerlock-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('exerciseApplicationApp')\n .controller('ParticipationDeleteController', ParticipationDeleteController);\n\n ParticipationDeleteController.$inject = ['$uibModal...
javascript
edit
0
1
mit
8001fd55e826485c10c993184e1a0016f07bb858
ls1intum/ArTEMiS,ls1intum/ArTEMiS,ls1intum/ArTEMiS,ls1intum/ArTEMiS,LisLo/ArTEMiS,LisLo/ArTEMiS,ls1intum/ArTEMiS,LisLo/ArTEMiS,ls1intum/ArTEMiS
src/main/webapp/app/entities/participation/participation-delete-dialog.controller.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add the example to crop image via sharp." }, { "role": "assistant", "content": "var sharp = require('sharp');\n\nvar dirpath = 'images/';\nvar imgname = 'download-logo.png';\nvar tmppath = 'tmp/'\n\nsharp(dirpath + imgname)\...
javascript
new_file
0
2
mit
780dcdde1a9c6ae437f9aec82de55997b75e2e8c
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
16/sharp-crop.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add tests for getLoadedFilename, setLoadedFilename, getAllLoadedFilenames and getFilename functions of loader object" }, { "role": "assistant", "content": "var nock = require('nock');\nvar Loader = require('../lib/load');\n\n...
javascript
new_file
0
2
mit
59dddf88dc67724a18b38bf1d6b45f4fa3e4aaa3
s0ph1e/node-website-scraper,Flamenco/node-website-scraper,aivus/node-website-scraper,website-scraper/node-website-scraper,s0ph1e/node-website-scraper,aivus/node-website-scraper,website-scraper/node-website-scraper,Flamenco/node-website-scraper
test/load-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add show answer js function for learning" }, { "role": "assistant", "content": "function show_answer() {\n if ($(\"#answer\").is(':visible')) {\n return;\n }\n $(\"#answer\").show()\n $(\"#rating\").show()\...
javascript
new_file
0
2
mit
29af056784a9695da0a1d71587f2f1e1a12e4517
DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune
deckglue/static/learning/js/show_answer.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create Facebook Login Status 3D component (display rotating fb box when connected)" }, { "role": "assistant", "content": "import React from 'react';\nimport THREE from 'three';\n\nexport default class LoginStatus extends Reac...
javascript
new_file
0
2
apache-2.0
a52738276cda5027862acddfbd9f88d82f757b62
Colmea/facebook-webvr,Colmea/facebook-webvr
src/app/components/facebook/LoginStatus.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add sandbox to test Tasker JavaScript helpers" }, { "role": "assistant", "content": "const vm = require('vm');\nconst fs = require('fs');\nconst path = require('path');\n\nfunction convertVariablesToWhatTaskerWouldSend(tasker...
javascript
new_file
0
4
mit
b2d24110d49b6e2b694237e3fe0d8263ef684e68
StephenGregory/TaskerJavaScriptHelpers
src/sandbox.tasker.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test with examples of extending twig.js with new tags" }, { "role": "assistant", "content": "var Twig = Twig || require(\"../twig\"),\n twig = twig || Twig.twig;\n\ndescribe(\"Twig.js Extensions ->\", function() {\n ...
javascript
new_file
0
2
bsd-2-clause
da4102c5fbf0303f8a394ceb42a28909db8470f5
rafaellyra/twig.js,justjohn/twig.js,AndBicScadMedia/twig.js,roelvanduijnhoven/twig.js,felicast/twig.js,moodtraffic/twig.js,PeterDaveHello/twig.js,rafaellyra/twig.js,rafaellyra/twig.js,DethCount/twig.js,sarahjean/twig.js,targos/twig.js,plepe/twig.js,roelvanduijnhoven/twig.js,DethCount/twig.js,PeterDaveHello/twig.js,mood...
test/test.extends.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Change test to stop after ten words" }, { "role": "assistant", "content": "var watson = require('watson-developer-cloud');\n\nvar speech_to_text = watson.speech_to_text({\n username: '{<EMAIL>}',\n password: '{speechdoctor4...
javascript
new_file
0
2
mit
d91d76016cfc3ee0c65fda07830e858394b2aed6
nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor
server/watson.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a test story for the ButtonGroup component" }, { "role": "assistant", "content": "import React from 'react';\n\nimport ButtonGroup from './ButtonGroup';\nimport Button from '../button';\n\nexport default {\n component: B...
javascript
new_file
0
1
mit
1d4c0a9f9d64e34df4947c573272468f31333c9c
teamleadercrm/teamleader-ui
src/components/buttonGroup/buttonGroup.stories.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n params: null,\n model: function(params /*, transition*/ ) {\n this.set('params', params);\n return this.get('store').find('processinstance', params.process_id)....
javascript
edit
0
1
apache-2.0
ecd884fee79194456258c2f6384fb8f0a4109480
lvuch/ui,rancher/ui,rancher/ui,westlywright/ui,westlywright/ui,rancherio/ui,vincent99/ui,westlywright/ui,rancherio/ui,nrvale0/ui,rancher/ui,rancherio/ui,nrvale0/ui,nrvale0/ui,pengjiang80/ui,ubiquityhosting/rancher_ui,lvuch/ui,vincent99/ui,lvuch/ui,pengjiang80/ui,pengjiang80/ui,ubiquityhosting/rancher_ui,ubiquityhosting...
app/admin-tab/processes/process/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var $form = $('form');\n $form.parsley();\n $.listen('parsley:form:validated', function() {\n var $tabpanel = $form.find('.tabpanel');\n if ($tabpanel.length) {\n var $firstError = $tabp...
javascript
edit
0
3
mit
5c0a8630512a4a417ef69c6bba917dcaf05b888d
Windmolders/Clastic,Clastic/Clastic,Windmolders/Clastic,Clastic/Clastic,NoUseFreak/Clastic,Windmolders/Clastic,NoUseFreak/Clastic,NoUseFreak/Clastic,Clastic/Clastic
src/Clastic/BackofficeBundle/Resources/public/scripts/form.parsley.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: bezier-curve: Add separate Point classes file." }, { "role": "assistant", "content": "/*exported Point, Endpoint, ControlPoint*/\nvar Point = (function() {\n 'use strict';\n\n function Point( x, y ) {\n this.x = x;\n ...
javascript
new_file
0
1
mit
61461eba5bcc91a01eb565c52a615e33ccb256d7
razh/experiments,razh/experiments,razh/experiments
bezier-curve/js/point.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: JS: Add test showing missing flow" }, { "role": "assistant", "content": "import * as dummy from 'dummy';\n\nfunction blah(obj) {\n obj.prop = obj.prop + \"x\";\n return obj.prop;\n}\n\nfunction test() {\n sink(blah(s...
javascript
new_file
0
1
mit
8c6ca6582e54d8911678cac49c8d9e43433fc524
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
javascript/ql/test/library-tests/TaintTracking/summarize-store-load-in-call.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar UserList = React.createClass({\n componentDidMount: function() {\n socket.on('join', this._join);\n socket.on('part', this._part);\n },\n render: function() {\n return (\n <ul id='online-list...
javascript
edit
0
2
mit
e38f50526425c23f38e08d3f163a93a5534b6c8b
gtklocker/ting,VitSalis/ting,mbalamat/ting,gtklocker/ting,VitSalis/ting,dionyziz/ting,VitSalis/ting,mbalamat/ting,mbalamat/ting,odyvarv/ting-1,sirodoht/ting,odyvarv/ting-1,dionyziz/ting,dionyziz/ting,odyvarv/ting-1,odyvarv/ting-1,sirodoht/ting,sirodoht/ting,mbalamat/ting,VitSalis/ting,gtklocker/ting,gtklocker/ting,siro...
client/userlist.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: [TEST] Add API level test descriptions. for ripple transactions." }, { "role": "assistant", "content": "var assert = require(\"assert\");\n\ndescribe('APi for Ripple Transactions', function(){\n\n describe('creating a ripple...
javascript
new_file
0
1
isc
2a790870e79764ef76614a3a870b2aba09ff4784
xdv/gatewayd,xdv/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks
test/api/ripple_transactions.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Define role types in seeders folder" }, { "role": "assistant", "content": "'use strict';\n\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.bulkInsert('Roles',\n [{\n role: 'a...
javascript
new_file
0
1
mit
e7bd02fba22ec513b4c7057ed483edd9c7769e4f
vynessa/dman,vynessa/dman
server/seeders/20170731120851-roles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\tis.js 0.0.1\n//\tAuthor Aras Atasaygin\n\n;(function() {\n\n\t//\tBaseline\n\t//\t--------\n\n\t//\troot object is window in the browser\n\tvar root = this;\n\n\t//\tdefine is object, current version and configs\n\tvar is = {};\n\ti...
javascript
edit
0
2
mit
6c9d24b533197af8e17406b38850a679a4bd2dab
dkfiresky/is.js,arasatasaygin/is.js,ekaradon/is.js,arasatasaygin/is.js,ryantemple/is.js,rlugojr/is.js,ironmaniiith/is.js,hi-q/is.js,jaspreet21anand/isjs,fermanakgun/is.js,rlugojr/is.js,dstyle0210/is.js,iLikeKoffee/is.js,dstyle0210/is.js,iLikeKoffee/is.js,dkfiresky/is.js,ironmaniiith/is.js,polymaths/is.js,ErikaLim/is.js...
is.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add unit test cases for eStack" }, { "role": "assistant", "content": "\n\"use strict\";\n\n/**\n * Test cases for eStack data structure\n */\n\ndescribe(\"eStack - isstack query\", function () {\n it(\"should return type o...
javascript
new_file
0
1
mit
ac539da7a32fac98c5a6266e0b2d88c336623b83
toystars/eStructures,toystars/eStructures
tests/stack-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add Akoma Ntoso xml format generator" }, { "role": "assistant", "content": "import Hackpad from 'hackpad'\nimport To_markdown from 'to-markdown'\nimport To_XML from 'xml'\n\n// help: CLIENT_ID=xxx SECRET=yyy babel-node script...
javascript
new_file
0
8
cc0-1.0
4430ec180e46f7bb25706b1958d906d7528200da
appleboy/react.vtaiwan.tw,g0v/react.vtaiwan.tw,g0v/react.vtaiwan.tw,appleboy/react.vtaiwan.tw,g0v/react.vtaiwan.tw
script/gen-an.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add unit tests for routes module" }, { "role": "assistant", "content": "/*\n * Copyright (c) 2015-2017 Steven Soloff\n *\n * This is free software: you can redistribute it and/or modify it under the\n * terms of the MIT Licen...
javascript
new_file
0
1
mit
bc24531aeb7dcf75783010d5ea0612bec0110213
ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js
test/server/routes.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add story for our Box component" }, { "role": "assistant", "content": "import React from 'react';\nimport PropTable from './components/propTable';\nimport { storiesOf } from '@storybook/react';\nimport { checkA11y } from 'sto...
javascript
new_file
0
1
mit
36f6802efb50a0cccc5d6c2f454bdb800d71871c
teamleadercrm/teamleader-ui
stories/box.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create app config file with Carto table name look up & basemap url" }, { "role": "assistant", "content": "// CARTO table names lookup\nexport const cartoTables = {\n nyc_borough: 'nyc_borough',\n nyc_city_council: 'nyc_city...
javascript
new_file
0
0
mit
724cacbc65fea63a4ed6a2a1f4b8a1e430ad12ee
clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper
src/constants/app_config.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a GameState super class." }, { "role": "assistant", "content": "function GameState() {\n \"use strict\";\n}\n\n//The following functions do nothing since they're intended to be overwritten.\n\nGameState.prototype.updat...
javascript
new_file
0
1
mit
daa63e10a6f460bddcd7edc7473b3f01ec0687e8
zedutchgandalf/OpenJGL,zedutchgandalf/OpenJGL
src/gamestate.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create a template type (content type)." }, { "role": "assistant", "content": "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source ...
javascript
new_file
0
0
mit
fc2362735170afa9929af9ef6cecd1b72d45f307
happyboy171/Feeding-Fish-View-
src/data/types/ContentType.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: scripts/bundleForBrowsers.js: Add script for bundle middlewares" }, { "role": "assistant", "content": "'use strict';\n\nvar browserify = require('browserify'),\n babelify = require('babelify'),\n path = require('path');...
javascript
new_file
0
0
mit
8e03d10e5b2e9836a80de5b385b2be2ec5bcd954
kuraga/rotorjs,kuraga/rotorjs
scripts/bundleMiddlewaresForBrowsers.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add the simple socket exmaple" }, { "role": "assistant", "content": "var net = require('net');\n\nvar server = net.createServer(function (socket) {\n socket.write('Echo server\\r\\n');\n socket.pipe(socket);\n});\n\nserver....
javascript
new_file
0
1
mit
08718e760bf9e1dca5d8c515ebe0484b7678909d
FuriKuri/info-bundling
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add dummy test with setTimeout()" }, { "role": "assistant", "content": "describe('dummy test', () => {\n it('waits for a loooooong time', () => {\n setTimeout(() => {\n throw new Error('broken');\n }, 10000);\n }...
javascript
new_file
0
1
mit
202e9ae88bfcdc392f396a9aeb08936bf2f50c0e
mmkassem/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,iiet/iiet-git,mmkassem/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,stoplightio/gitlabhq
spec/frontend/dummy_spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add usual attributes mapping: href, src, title, alt, placeholder, and the smart className mapping that bind a property to a list of values for a class name" }, { "role": "assistant", "content": "/**\n * A SET OF COOL MAPPINGS...
javascript
new_file
0
2
mit
3007c98f3a4366e1ae3bb1e50c141e7d938d2782
zipang/ko-dings
ko-mappings.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add class to fetch data from the server backend" }, { "role": "assistant", "content": "import request from 'superagent';\n\nclass API {\n sidebarItems(callback) {\n request\n .get('/all_dates')\n .end((err, resp...
javascript
new_file
0
1
mit
d584fdbf135e54ebd6281abdb771cf132a7c88c5
jaischeema/panorma,jaischeema/panorma,jaischeema/panorma
client/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '#player-inner';\n\nConnector.artistSelector = '#artist-name';\n\nConnector.trackSelector = '#track-title';\n\nConnector.isPlaying = function () {\n\treturn $('#playP...
javascript
edit
0
0
mit
c2cdd3270d6914328650bd7b5b9a8343fc3fd53c
david-sabata/web-scrobbler,Paszt/web-scrobbler,david-sabata/web-scrobbler,inverse/web-scrobbler,galeksandrp/web-scrobbler,carpet-berlin/web-scrobbler,Paszt/web-scrobbler,carpet-berlin/web-scrobbler,galeksandrp/web-scrobbler,ex47/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,alexesprit/web-scrobbler,ex47/web-scrobbler...
connectors/v2/thisismyjam.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.provide('webfont');\n\ngoog.require('webfont.UserAgentParser');\ngoog.require('webfont.FontModuleLoader');\ngoog.require('webfont.WebFont');\n\n/**\n * @typedef {Object.<string, Array.<string>>}\n */\nwebfont.FontTestStrings;\n\n//...
javascript
edit
0
1
apache-2.0
b92cee6f761565f235dbd52bbcc60bf68fc4ffb8
ramghaju/webfontloader,joelrich/webfontloader,JBusch/webfontloader,ahmadruhaifi/webfontloader,ramghaju/webfontloader,sapics/webfontloader,kevinrodbe/webfontloader,typekit/webfontloader,joelrich/webfontloader,exsodus3249/webfontloader,zeixcom/webfontloader,digideskio/webfontloader,Monotype/webfontloader,mettjus/webfontl...
src/core/initialize.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create basic server logic for around the world." }, { "role": "assistant", "content": "'use strict';\n/**\n * Create the scoreboard. Each player starts out with a target of 20.\n * The only important number on the Around the ...
javascript
new_file
0
9
mit
06612f7ad9876b42329e72ff8247c509b6bf06f4
camuthig/dart_slinger_nodejs,camuthig/dart_slinger_nodejs,camuthig/dart_slinger_nodejs,camuthig/dart_slinger_nodejs
app/controllers/games/games.around_the_world.server.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar traverse = require('./util/traverse');\n\nvar deref = require('deref');\n\nmodule.exports = function(schema, refs) {\n return traverse(deref()(schema, refs, true));\n};\n\n```\n\nApply this change: Allow array or o...
javascript
edit
0
3
mit
c6503a28d95702a4004bc1f66f00bb40c978ad13
json-schema-faker/json-schema-faker,rlugojr/json-schema-faker,Scorpil/json-schema-faker,rlugojr/json-schema-faker,json-schema-faker/json-schema-faker,Gash003/json-schema-faker,whitlockjc/json-schema-faker,presidento/json-schema-faker,pateketrueke/json-schema-faker,rlugojr/json-schema-faker
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add lib and new function jsonifyFromFile" }, { "role": "assistant", "content": "var fs = require('fs');\nvar pkg = require('../package.json');\nvar debug = require('debug')(pkg.name);\nvar csvParser = require('csv-parse');\n\...
javascript
new_file
0
7
mit
0e99f53648cc0eb4401e34f7be4ef2334291ba89
guo-yu/csv-jsonify,turingou/csv-jsonify
libs/csv-jsonify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRocketChat.API.helperMethods.set('deprecationWarning', function _deprecationWarning({ endpoint, versionWillBeRemove, response }) {\n\tconst warningMessage = `The endpoint ${ endpoint } is deprecated and will be removed after version ${ ...
javascript
edit
0
2
mit
570ad9987bb63a3d5e06db5c453c439009bf02fd
inoio/Rocket.Chat,subesokun/Rocket.Chat,pitamar/Rocket.Chat,fatihwk/Rocket.Chat,pkgodara/Rocket.Chat,VoiSmart/Rocket.Chat,subesokun/Rocket.Chat,pitamar/Rocket.Chat,flaviogrossi/Rocket.Chat,nishimaki10/Rocket.Chat,4thParty/Rocket.Chat,fatihwk/Rocket.Chat,4thParty/Rocket.Chat,VoiSmart/Rocket.Chat,Sing-Li/Rocket.Chat,Sing...
packages/rocketchat-api/server/helpers/deprecationWarning.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add unit tests for readSlice(), readStridedSlice()" }, { "role": "assistant", "content": "var expect = require(\"chai\").expect,\n netcdf4 = require(\"../build/Release/netcdf4.node\");\n\ndescribe('Variable', function() {\...
javascript
new_file
0
1
isc
ceb348594e500ba920d887b833c7a53985379291
swillner/netcdf4-js,swillner/netcdf4-js,swillner/netcdf4-js
test/variable.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test to verify that connecting to a non existing database yields an error in the provided operation callback" }, { "role": "assistant", "content": "var test = require('tape')\nvar mongojs = require('../')\n\ntest('connect...
javascript
new_file
0
1
mit
48a00dfae513a3f37cb5d5890b7eb1114db50c26
mafintosh/mongojs,lionvs/mongojs,octoblu/mongojs
test/test-connect-non-existing-db.js
rejected_duplicate
Near-duplicate of sample 90919
true
[ { "role": "user", "content": "Write javascript code for the following: Add the example to create random 8 bytes with base64." }, { "role": "assistant", "content": "var crypto = require('crypto');\n\nvar buf = crypto.randomBytes(16);\nvar cut_bufhex = buf.toString('base64').substr(0, 8);\nconsole...
javascript
new_file
0
0
mit
6e3a476f9233db96aa5ee636fe22acfc42d7bd6f
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
8/crypto_randomBytes-base64-substr.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add configuration for inner docs" }, { "role": "assistant", "content": "var pkg = require('./package.json');\n\nmodule.exports = {\n root: './docs',\n plugins: ['versions'],\n pluginsConfig: {\n versions: {\n ...
javascript
new_file
0
0
apache-2.0
2b8e1c0b11c9245886abf9aa0a990c4f5db0c213
tshoper/gitbook,gencer/gitbook,strawluffy/gitbook,ryanswanson/gitbook,gencer/gitbook,tshoper/gitbook,GitbookIO/gitbook
book.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add uploading file stream to s3" }, { "role": "assistant", "content": "\nvar http = require('http');\nvar router = require('routes')();\nvar Busboy = require('busboy');\nvar AWS = require('aws-sdk');\nvar inspect = require('u...
javascript
new_file
0
2
mit
478b2ca5ce0707981f7295094f0089444fdce60b
voidabhi/node-scripts,voidabhi/node-scripts,voidabhi/node-scripts
file-upload-s3-stream.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add most basic hapi.js server possible" }, { "role": "assistant", "content": "var Hapi = require('hapi');\n\nvar server = new Hapi.Server();\n\nserver.connection({\n port: 8080\n});\n\nserver.start(function (err) {\n consol...
javascript
new_file
0
1
bsd-2-clause
2b6029f646cde2846b714c955a6338daf47010ce
accosine/Kwik-E-Mart,accosine/Kwik-E-Mart
shop.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add unit test for callback on early postgresql disconnect\n\nTest adapted by that provided by Jess Sheneberger in #534" }, { "role": "assistant", "content": "var helper = require(__dirname + '/test-helper');\nvar net = requir...
javascript
new_file
0
2
mit
e19235838da0aff961c8f0bfbe12baf0c3c04391
brianc/node-postgres,brianc/node-postgres,cricri/node-postgres
test/unit/client/callback-on-early-disconnect.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add example showing advice with instance functions" }, { "role": "assistant", "content": "var aopify = require('../lib/index.js');\n\n// aopify and change the return value to -2 when it would have been -1\n// This demonstrate...
javascript
new_file
0
2
mit
d2ec2d5c2a9c56b243187a743c49dbb25e65fdf9
lehmier/aopify
examples/context.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update project jquery-once to 1.2.6" }, { "role": "assistant", "content": "/*! jquery-once - v1.2.6 - 9/11/2013 - http://github.com/robloach/jquery-once\n * (c) 2013 Rob Loach (http://robloach.net)\n * Licensed GPL-2.0, MIT *...
javascript
new_file
0
2
mit
915f4daab0674633c58623afdee3dd529204ec62
vvo/jsdelivr,vvo/jsdelivr,vvo/jsdelivr,vvo/jsdelivr,vvo/jsdelivr
files/jquery.once/1.2.6/jquery.once.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// a name for every URL pattern\nconst PageNames = {\n CLASS_MGMT_PAGE: 'CLASS_MGMT_PAGE',\n CLASS_EDIT_MGMT_PAGE: 'CLASS_EDIT_MGMT_PAGE',\n CLASS_ENROLL_MGMT_PAGE: 'CLASS_ENROLL_MGMT_PAGE',\n USER_MGMT_PAGE: 'USER_MGMT_PAGE',\n DA...
javascript
edit
0
0
mit
e9d97dca46357020b2e2b32e23396a353bab3348
lyw07/kolibri,indirectlylit/kolibri,mrpau/kolibri,christianmemije/kolibri,learningequality/kolibri,indirectlylit/kolibri,christianmemije/kolibri,DXCanas/kolibri,learningequality/kolibri,lyw07/kolibri,mrpau/kolibri,benjaoming/kolibri,DXCanas/kolibri,benjaoming/kolibri,learningequality/kolibri,jonboiser/kolibri,learninge...
kolibri/plugins/facility_management/assets/src/constants.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add utility for binning images by date." }, { "role": "assistant", "content": "var fs = require(\"fs\");\nvar path = require(\"path\");\nvar async = require(\"async\");\nvar yr = require(\"yearrange\");\nvar mongoose = requir...
javascript
new_file
0
8
mit
a7a0de7a1987de2b1a138210e79aeafbf2421612
jeresig/ukiyoe-web
utils/plot-image-dates.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a sample of babel" }, { "role": "assistant", "content": "#!/usr/bin/env babel-node\n\nimport assert from 'assert';\n\n\nfunction foo() {\n}\n\nlet bar = function() {\n};\n\nconst baz = function() {\n};\n\nassert.strictEqu...
javascript
new_file
0
1
mit
8502379b759eef126b21b67628484e6efe873184
kjirou/nodejs-codes
examples/babel/function-name/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add third solution for day 4" }, { "role": "assistant", "content": "// sort() documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\nfunction processData(myArray) {\n \n...
javascript
new_file
0
3
mit
ff52256c78cf8e5a0ff265e29a6e71fa193356df
giuliannosbrugnera/7DaysOfJavaScript
day03-second_largest.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Prepare syncher and msg-node integration (not ready)" }, { "role": "assistant", "content": "class ObjectAllocation {\n /* private\n _url: URL\n _bus: MiniBus\n */\n\n /**\n * Create an Object Allocation\n * @param {...
javascript
new_file
0
2
apache-2.0
4d16eb91005eccf8d4cc862995bccd06000ad198
reTHINK-project/dev-runtime-core,reTHINK-project/dev-runtime-core,reTHINK-project/dev-runtime-core
src/syncher/ObjectAllocation.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add 7.3 code that passes tests" }, { "role": "assistant", "content": "// JavaScript Variables and Objects\n\n// I worked [by myself] on this challenge.\n\n// __________________________________________\n// Write your code belo...
javascript
new_file
0
2
mit
865b5809ba6fcd85cd30ff756f51d5bfb9ed36af
kenworthyc/phase-0,kenworthyc/phase-0,kenworthyc/phase-0
week-7/variables-objects.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test for mirobot service." }, { "role": "assistant", "content": "define(['../js/microbot-service.js'], function (microbotService) {\n 'use strict';\n\n // connect\n // send\n // on connection close\n // double send\n...
javascript
new_file
0
1
apache-2.0
cee55538daa2ad38d043c023ac81d6ba351ef4c4
jdmichaud/logofrjs,jdmichaud/logofrjs
test/microbot-service.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make it actually work. Use proper UUIDs. Rename text colour characteristic." }, { "role": "assistant", "content": "var util = require('util');\n\nvar bleno = require('bleno');\nvar BlenoCharacteristic = bleno.Characteristic;\...
javascript
new_file
0
3
mit
dbf5ec64c3b9bdec5b011ae41764f132adef9f21
DanielO/opctorch,DanielO/opctorch,DanielO/opctorch,DanielO/opctorch
nodejs/opctorch-message-rgb-characteristic.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add simple script to echo url path and params" }, { "role": "assistant", "content": "var http = require(\"http\");\nvar url = require(\"url\");\n\n//port to listen for incoming requests\nvar port = 8000;\n\n\nconsole.log(\"Cr...
javascript
new_file
0
2
mit
428edbb09d5a3a2dcd55bed3df32998735b5fafb
samir-joshi/node-exercises
plain-node/url_reader.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add script to delete unused directors" }, { "role": "assistant", "content": "// Usage: [MONGOHQ_URL=...] node ./ldelete-unused-directors.js\n\nvar env = require('../server/env').get()\nvar mongoose = require('mongoose')\nvar ...
javascript
new_file
0
5
mit
7fe6cc0901193363865fcbd0b26deeb70c74e62e
kavi-fi/meku,kavi-fi/meku,kavi-fi/meku
scripts/delete-unused-directors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('underscore');\nconst DrawCard = require('../../drawcard.js');\n\nclass SmokeAndMirrors extends DrawCard {\n setupCardAbilities() {\n this.action({\n title: 'Move shinobi home',\n condit...
javascript
edit
0
3
mit
62c1e4b308ad956be0d3f1dc27948f333eb2337c
gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki
server/game/cards/02.1-ToA/SmokeAndMirrors.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
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: feat: Add tempalte helpers file and doc comments" }, { "role": "assistant", "content": "module.exports = function() {\n\n /**\n * Set of handlebar helpers that can be used in templates\n */\n\n return {\n ...
javascript
new_file
0
19
mit
f82a14815b0d1bd73efcb58a17c8e516d0bc5fcf
cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli,code-computerlove/slate,CodeRichardJohnston/slate-demo,code-computerlove/slate,cartridge/cartridge,CodeRichardJohnston/slate-demo
_config/templateHelpers.js
rejected_complexity
Cyclomatic complexity too high: 19
true
[ { "role": "user", "content": "Write javascript code for the following: Support for first generation Smart Socket Plug" }, { "role": "assistant", "content": "'use strict';\n\nconst Device = require('../device');\n\nconst PowerChannels = require('./capabilities/power-channels');\n\nclass PlugV1 ex...
javascript
new_file
0
2
mit
f51ab5dd49be8099309d46ebe25c1ae9c81c944f
aholstenson/miio
lib/devices/chuangmi.plug.v1.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add scale & line chart" }, { "role": "assistant", "content": "\"use strict\";\n\nimport WxChart from './charts/wxChart';\nimport WxDoughnut from '../src/charts/doughnut';\nimport WxLiner from '../src/charts/liner';\n\nexport ...
javascript
new_file
0
0
mit
90dfee70a122d9aae421413f618fd8f964b7e2f3
xch89820/wx-chart,xch89820/wx-chart
src/wx-chart.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add testcase for dense array tricks" }, { "role": "assistant", "content": "/*\n * From: http://www.2ality.com/2012/06/dense-arrays.html\n */\n\n/*===\nsparse array\n,,\n3\nundefined\nfalse\ndense array trick\n,,\n3\nundefine...
javascript
new_file
0
1
mit
6f31970b38ed42ad82093eca68404c7a7e8398c6
jmptrader/duktape,jmptrader/duktape,jmptrader/duktape,markand/duktape,harold-b/duktape,harold-b/duktape,jmptrader/duktape,markand/duktape,harold-b/duktape,markand/duktape,jmptrader/duktape,harold-b/duktape,markand/duktape,markand/duktape,markand/duktape,harold-b/duktape,harold-b/duktape,svaarala/duktape,markand/duktape...
tests/ecmascript/test-dev-array-apply-gaps.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update project require-css to 0.1.7" }, { "role": "assistant", "content": "define(function(){if(\"undefined\"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName(\"head\")[0],t=window.navigato...
javascript
new_file
0
5
mit
ba5cb655163ee7e2f646f0716ba3e9125567156b
fchasen/jsdelivr,RoberMac/jsdelivr,jtblin/jsdelivr,firulais/jsdelivr,labsvisual/jsdelivr,bdukes/jsdelivr,stevelacy/jsdelivr,vousk/jsdelivr,dpellier/jsdelivr,RoberMac/jsdelivr,ajibolam/jsdelivr,anilanar/jsdelivr,cake654326/jsdelivr,yaplas/jsdelivr,dnbard/jsdelivr,wallin/jsdelivr,CTres/jsdelivr,ndamofli/jsdelivr,ajkj/jsd...
files/require-css/0.1.8/css.min.js
rejected_duplicate
Near-duplicate of sample 105392
true
[ { "role": "user", "content": "Write javascript code for the following: Add Eel of Fortune problem solution" }, { "role": "assistant", "content": "// Solution to \"Eel of Fortune\" challenge from /r/DailyProgrammer\n// https://www.reddit.com/r/dailyprogrammer/comments/3ddpms/\n// 20150715_challen...
javascript
new_file
0
4
mit
9a55efa6bfe0f301f7e499b92c588dfb03b2b259
strburst/js-stuff,strburst/js-stuff
eelfortune.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add some tests for boolean logic\n\nThe observant reader will notice that none of these pass either." }, { "role": "assistant", "content": "\"use strict\";\n\nvar React = require(\"react\");\n\nvar Helper = require(\"./helper...
javascript
new_file
0
1
mit
6840bfe052860b4231250ae685eb7378cd4c7f96
badeball/xpath-react,badeball/xpath-react
test/boolean_test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create basic skeleton for Messages view" }, { "role": "assistant", "content": "import React, { Component } from 'react';\n\nimport {\n StyleSheet,\n Text,\n View,\n} from 'react-native';\n\nclass Messages extends Component...
javascript
new_file
0
1
mit
f4bc862bb99dbc6655f8604cb70383402cb03907
sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native
simul/app/components/messages.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Adjust imports for new modules" }, { "role": "assistant", "content": "// Impots and packages\nconst CONFIG = require('./config/config.js')\nconst WEBSOCKET = CONFIG.WEBSOCKET\nconst Wampy = require('wampy').Wampy\n\n// Websoc...
javascript
new_file
0
0
mit
1698c33d01da5d99f057b92ed72677fb1eebf6a2
ConnApp/connapp-wamp
node/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add function to read json files" }, { "role": "assistant", "content": "// import necessary module\nimport jsonfile from 'jsonfile';\n\n/* Function returns the content of a json file\n@param file is the file path */\nconst rea...
javascript
new_file
0
0
mit
31aa31a406a79be10bd34e6f74bbe554de98dcbc
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
server/modules/readData.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add compressed version of the JavaScript" }, { "role": "assistant", "content": "(function(){var e=function(){var e=window.location.href,t=function(){var e=document.querySelectorAll(\"a.marker\");for(var t=0;t<e.length;++t){va...
javascript
new_file
0
3
mit
613b3f54bc12f247a2a4489f27c21cc5f02ffd18
jordelver/anchor-highlight
bookmarklet.min.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add Camera Control Route Test" }, { "role": "assistant", "content": "import supertest from \"supertest\";\nimport app from \"../../app.js\";\n\nconst request = supertest(app);\n\ndescribe(\"Routes: Camera Control\", () => {\n...
javascript
new_file
0
1
apache-2.0
673105e648ad752ce32cd431aba725e98b09e27a
bartdejonge1996/goto-fail-webserver,bartdejonge1996/goto-fail-webserver
test/routes/camera-control.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add main module for exporting externally." }, { "role": "assistant", "content": "\n'use strict';\n\nvar vcapParser = require('./vcap-parser'),\n bluemix = require('./bluemix/bluemix');\n\nmodule.exports = {\n Parser : v...
javascript
new_file
0
0
mit
9c290c56fd3c3192d2126a60a39276b7f7870d9c
mattunderscorechampion/vcap-services-parser
node/src/main/lib.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a method for exporting CSV" }, { "role": "assistant", "content": "import * as Papa from 'papaparse';\n\nconst downloadAsCsv = function (arr) {\n const csv = Papa.unparse(arr);\n const data = `text/csv;charset=utf-8,${cs...
javascript
new_file
0
1
mit
8f25f3530ebe9e8622fbeb0944d651831314aa3e
flekschas/hipiler,flekschas/hipiler,flekschas/hipiler
src/utils/download-as-csv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('alienUiApp').controller(\n 'NewCloudImageController', [\n '$scope',\n '$modalInstance',\n 'cloudImageServices',\n function($scope, $modalInstance, cloudImageServices) {\n\n $scope.cloud...
javascript
edit
0
2
apache-2.0
6d454ec84ecc170412ab687346d7c588e3fc8a31
san-tak/alien4cloud,san-tak/alien4cloud,igorng/alien4cloud,PierreLemordant/alien4cloud,ngouagna/alien4cloud,PierreLemordant/alien4cloud,alien4cloud/alien4cloud,loicalbertin/alien4cloud,broly-git/alien4cloud,broly-git/alien4cloud,PierreLemordant/alien4cloud,san-tak/alien4cloud,ngouagna/alien4cloud,loicalbertin/alien4clo...
alien4cloud-ui/yo/app/scripts/cloud-images/controllers/new_cloud_image.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test for when readdir raises ENOTSUP\n\nTreat as if it had raised ENOTDIR instead." }, { "role": "assistant", "content": "var fs = require('fs')\nvar readdir = fs.readdir\nfs.readdir = function (path, cb) {\n fs.stat(path, f...
javascript
new_file
0
3
isc
962561892bb72ff4c9e0812ea271e540a80e31a0
isaacs/node-glob,andypatterson/node-glob,jeonghwan-kim/node-glob,lostthetrail/node-glob,behind2/node-glob,wjb12/node-glob,jeonghwan-kim/node-glob,wjb12/node-glob,Nedomas/node-glob,isaacs/node-glob,shinygang/node-glob,shinygang/node-glob,cgvarela/node-glob,andypatterson/node-glob,Nedomas/node-glob,behind2/node-glob,lost...
test/enotsup.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add project data layer Temporarily fill with fake data" }, { "role": "assistant", "content": "import Project1 from '../components/projects/Project-1';\nimport Project2 from '../components/projects/Project-2';\nimport Project3...
javascript
new_file
null
null
mit
3c0417c5696e09187618bdb070527865eb88b15d
emyarod/afw,emyarod/afw
src/data/projectData.js
rejected_code_smell
Internal duplication: ~270% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write javascript code for the following: Add the test case of PromptViewList\n\n ref #34" }, { "role": "assistant", "content": "'use babel'\n\nimport PromptViewList from '../lib/prompt-view-list';\n\ndescribe('PromptViewList', () => {\n describe('when setItem is c...
javascript
new_file
0
1
mit
15697ac9bad50e2037009089e3d69e50128b63a7
HiroakiMikami/atom-user-support-helper
spec/prompt-view-list-spec.js
accepted
null
true