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\nvar performCommand = function(event) {\n\tif(event.command === 'hibernateTabs') {\n\t\tvar c = 0;\n\n\t\tvar xmlHttp = new XMLHttpRequest();\n\t\txmlHttp.open('GET', safari.extension.baseURI + 'lib/hibernationPage/index.html', true);\n\... | javascript | edit | 0 | 4 | bsd-2-clause | ba68c5d9540dd1a7f9f0b76e837d99a2f8f1353c | 343max/TabHibernation,343max/TabHibernation,yin/TabHibernation,yin/TabHibernation | TabHibernation.safariextension/global-script.js | rejected_duplicate | Near-duplicate of sample 76633 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('./config');\nvar utils = require('./utils');\nvar db = require('./db');\nvar server = require('./server');\n\nmodule.exports = {\n config,\n utils,\n db,\n server\n};\n\n```\n\nApply this change: Add plugin api... | javascript | edit | 0 | 0 | mit | 8a2594cd5399a4fcc258cae12099b20d1aaedbcb | thinkholic/wordpress-cli | lib/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function() {\n function PatternBinding(pattern, controlUI, patternGenerator) {\n this.pattern = pattern;\n this.controlUI = controlUI;\n this.patternGenerator = patternGenerator;\n\n this.bindPatternAndControlUI('cli... | javascript | edit | 0 | 1 | mit | cfccac262a942c185062e43f22f7de8840bbd3bd | afifsohaili/gameoflife,afifsohaili/gameoflife | js/lib/patterns/patternBinding.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport { request } from './lib/request';\nimport { ETC_API_HOST, ETC_API_PORT } from './index';\n\nexport type DeleteEtcAccountBalanceResponse = boolean;\n\nexport const deleteEtcAccount = (\n accountId: string\n): Promise<De... | javascript | edit | null | null | apache-2.0 | 7bc9bd8d66b5db293d084e0f409813e166f51cba | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | app/api/etc/deleteEtcAccount.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { compose, createStore, applyMiddleware } from 'redux';\nimport { devTools } from 'redux-devtools';\nimport rootReducer from '../reducers';\nimport thunkMiddleware from 'redux-thunk';\nimport loggerMiddleware from 'redux-logger';... | javascript | edit | 0 | 3 | mit | 9badfc1c8f8d3e18a3cc6df151226451b01dc410 | MrEfrem/react-redux-starter-kit,MrEfrem/react-redux-starter-kit | src/stores/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar through = require('through2');\nvar inflector = require('./inflector');\nvar rmExt = require('./rmExt');\nvar path = require('path');\n\nmodule.exports = function (options) {\n return through.obj(function(chunk, _, next) {\n var... | javascript | edit | 0 | 3 | mit | 5b91ae0085b7356dbf142a4ca2e276d03a6e3bc3 | AppGeo/emberate,AppGeo/emberate | lib/inflectStream.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const statusColors = {\n cancelled: '#E83636',\n postponed: '#F9D95F',\n happening: '#7DF95F',\n noInfo: '#555'\n}\n\n```\n\nApply this change: Add color for Online swatch in table."
},
{
"role": "assistant",
"con... | javascript | edit | 0 | 0 | mit | ca515305b6efb3309e6ccb3480f895badf4902e2 | conferenceradar/list,conferenceradar/list | src/utils/colors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar REGEX = require('../regex');\n\nmodule.exports = function(context) {\n\treturn {\n\t\tMemberExpression: function(node) {\n\t\t\tvar propertyValue = node.property.value;\n\t\t\tvar propertyType = node.property.type;\n\n\t\t\tif (prop... | javascript | edit | 0 | 3 | mit | 182d56e8e89af52fe1c4746ff5cea1b32ad00a82 | natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting | lib/lint_js_rules/dot_notation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Match from 'react-router/Match';\nimport { connectFor } from '@folio/stripes-connect';\nimport { modules } from 'stripes-loader!';\n\nif (!Array.isArray(modules.app) && modules.length < 0) {\n throw n... | javascript | edit | 0 | 1 | apache-2.0 | d3a66276460698274413d19a2ecae57f338e65c7 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core | src/moduleRoutes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(\n\t[\n\t\t\"dojo/_base/declare\",\n\t\t\"dojo/Evented\",\n\t\t\"dijit/layout/ContentPane\"\n\t],\n\tfunction (declare, Evented, ContentPane) {\n\t\t//\"use strict\";\n\n\t\treturn declare(\"ContentPane\", [ContentPane, Evented],... | javascript | edit | 0 | 3 | mit | 56f602c4d39ac4bddecee5963fcfa475d721625a | dgerhardt/dgerhardt-dojo | dijit/layout/ContentPane.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function(isNode, isAngular) {\n\n var activities = [\n {name: 'bike', textOver: 'Велосипед'},\n {name: 'running', textOver: 'Бег'},\n {name: 'workout', textOver: 'Workout'},\n {name: 'hiking', textOver: 'Т... | javascript | edit | 0 | 3 | mit | 1d9310b3268edf2ad5d409711b1ec4adee543984 | siman/meetua,siman/meetua,siman/meetua | public/js/app/shared/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Loading from 'main/components/Loading';\nimport styles from './styles.css';\n\nexport default () => (\n <div className={styles.wrapper}>\n <p>\n The answer is indeterminate. Wh... | javascript | edit | 0 | 1 | mit | cdfc9520d395c28a115549aaffcdb97f999c15dd | KELiON/cerebro,KELiON/cerebro | main/plugins/math/Preview/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../../templates/components/nypr-accounts/resend-button';\nimport fetch from 'fetch';\nimport { task, timeout } from 'ember-concurrency';\nimport { rejectUnsuccessfulResponses } from 'nypr-... | javascript | edit | 0 | 3 | mit | 26bf4f35c423e19beeda599bf04f9a36a1a8b674 | nypublicradio/nypr-account-settings,nypublicradio/nypr-account-settings | addon/components/nypr-accounts/resend-button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar util = require('./util');\nvar file = require('.file_system.file');\nvar counter=0;\n\nhttp.createServer(function (req, res) {\n var answer = util.helloWorld();\n\n res.writeHead(200, {'Content-Ty... | javascript | edit | 0 | 1 | mit | 98df997fb213fadb2a411178734d5e9338974da1 | fhinkel/SimpleChatServer,fhinkel/SimpleChatServer | js/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Model for video.\n */\n\n'use strict';\n\n/**\n * Including modules.\n */\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\nconst ObjectId = Schema.Types.ObjectId;\n\nlet videoSchema = new Schema({\n \"... | javascript | edit | 0 | 0 | mit | 276ebe2cb268140d7b07123d774327f30cddd02d | producesry/nabemehz | models/videoModel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst path = require('path');\n\nmodule.exports = {\n\textends: path.join(__dirname, 'index.js'),\n\trules: {\n\t\t'no-var': 'error',\n\t\t'object-shorthand': ['error', 'always'],\n\t\t'prefer-arrow-callback': 'error',\n\... | javascript | edit | 0 | 0 | mit | bda02cb977a973033257448b920d637b5c29ada9 | sindresorhus/eslint-config-xo | esnext.js | rejected_duplicate | Near-duplicate of sample 76420 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react'\nimport moment from 'moment-timezone'\nimport {Alert} from 'react-native'\nimport {Column, Row} from '../components/layout'\nimport {ListRow, Detail, Title} from '../components/list'\nimport ty... | javascript | edit | null | null | mit | 381db80c3a677d7046fe2011b425e5e79e3eb715 | carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls | source/views/covid/updates-row.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Authenticator from 'ttz/authenticators/slack';\n\nexport default {\n name: 'slack-torii',\n before: 'simple-auth',\n after: 'torii',\n initialize(container, application) {\n let torii = container.lookup('torii:main... | javascript | edit | 0 | 1 | mit | 1373db941804e5a0f1096937180f6a8993899e1d | alisdair/team-time-zone,alisdair/team-time-zone | app/initializers/slack-torii.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\n 'use strict';\n\n MeteorSettings.setDefaults({ public: {\n blog: { defaultLocale: \"en\" }\n }});\n\n Router.configure({\n layoutTemplate: 'mainLayout'\n });\n\n Router.map(function () {\n this.route('h... | javascript | edit | 0 | 1 | mit | 95d96fa9573365abdfd9b7b5ab96257750b07451 | alex-meteor/md-blog,valedaemon/md-blog,valedaemon/md-blog,cramhead/md-blog,cramhead/md-blog,xolvio/md-blog,xolvio/md-blog,alex-meteor/md-blog | app/client/route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'oroui/js/mediator',\n 'oroui/js/app/views/base/view',\n 'oroform/js/app/views/datepair-view'\n], function($, mediator, BaseView, DatepairView) {\n 'use strict';\n\n var CalendarEventFormView;\n ... | javascript | edit | 0 | 2 | mit | f94aa04bac6fdb37b9330de5dd284f7bd6ca8a9c | trustify/oroplatform,geoffroycochard/platform,Djamy/platform,geoffroycochard/platform,trustify/oroplatform,ramunasd/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,ramunasd/platform,geoffroycochard/platform,orocrm/platform,orocrm/platform,Djamy/platform,ramunasd/platform | src/Oro/Bundle/CalendarBundle/Resources/public/js/app/views/calendar-event-form-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Observable from '@sanity/observable'\nimport {debounce} from 'lodash'\n\n// A useful pattern that can be re-used probably\nfunction createListener(target, eventTypes, useCapture) {\n const listeners = []\n return {\n add(lis... | javascript | edit | 0 | 1 | mit | 17ea1b91d53b7d31fa17dd156587ba544c75fb64 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/base/src/preview/scrollPosition.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Registry } from '../util'\n\n/*\n Registry for Nodes.\n\n @class NodeRegistry\n @extends util/Registry\n */\nclass NodeRegistry extends Registry {\n /**\n Register a Node class.\n\n @param {Class} nodeClass\n */\n ... | javascript | edit | 0 | 5 | mit | 3aa5f3bcad8b604c093b1b4720eac8dd959812e3 | substance/substance,michael/substance-1,substance/substance,michael/substance-1 | model/NodeRegistry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar through = require('through');\nvar readline = require('readline');\nvar util = require('util');\nvar path = require('path');\nmodule.exports = through(function(data) {\n process.stdout.clearLine();\n process.stdout.cursorTo(0)... | javascript | edit | 0 | 2 | bsd-3-clause | 413e1fdc8387a8fb2712aa08d3d4de0609db180f | jugglinmike/test262-harness,bterlson/test262-harness,muratsu/test262-harness | lib/simpleReporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isCallable = require('es5-ext/object/is-callable')\n , isAttr = require('../../attr/is-attr')\n , element = require('../valid-element');\n\nmodule.exports = function (name, value) {\n\telement(this);\n\tif ... | javascript | edit | 0 | 8 | mit | 090e2206d3e7c9294ba5ca1f016fe7ae80eb9db4 | medikoo/dom-ext | element/#/cast-attribute.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose'),\n urlFormatter = require('../../app/models/url_formatter.server.model'),\n Schema = mongoose.Schema;\n \nvar UserSchema = new Schema({\n firstName: String,\n lastName: String,\n emai... | javascript | edit | 0 | 1 | mit | 669b1c3589d76c115c719f7b9402c2c2a9be7450 | shk33/mean-stack-app,shk33/mean-stack-app | app/models/user.server.model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar NodeHelper = require(\"node_helper\");\nconst exec = require('child_process').exec;\n\nmodule.exports = NodeHelper.create({\n\n\n socketNotificationReceived: function(notification) {\n if (notification === \"RECOGNIZER_STARTUP\"... | javascript | edit | 0 | 3 | mit | bb7fba74e109ad2f81fe6815667d4f17a2140a43 | OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror | modules/recognizer/node_helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * tar-stream.js: Checkout adapter for a tar stream.\n *\n * (C) 2012 Bradley Meck.\n * MIT LICENSE\n *\n */\n\nvar tar = require('tar');\n\n//\n// ### function download (source, callback)\n// #### @source {Object} Source checkout o... | javascript | edit | 0 | 2 | mit | 3cbe8494e084405087447338558fd58e7f85ee5c | indexzero/node-checkout | lib/handlers/tar-stream.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require('./multipart_parser');\n\nvar errors = require(... | javascript | edit | 0 | 9 | mit | af820e668cdfa0f04b1bc92412a3b16f628533cb | jclulow/node-restify,kevinykchan/node-restify,adunkman/node-restify,prasmussen/node-restify,chaordic/node-restify,ferhatsb/node-restify,rborn/node-restify,uWhisp/node-restify,TheDeveloper/node-restify,msaffitz/node-restify | lib/plugins/body_parser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport env from '../config/environment'\nimport GitHub from '../lib/github'\nimport Repo from '../lib/repo'\n\nfunction handler(req, res, next) {\n let [owner, repoName] = req.body.repository.split('/')\n let {name, version} = re... | javascript | edit | 0 | 2 | mit | e2aca1edcb799e1695c0b6225eaffa3d77990ebe | librariesio/sentinel | handlers/webhooks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport plumber from 'gulp-plumber';\nimport filter from 'gulp-filter';\nimport changed from 'gulp-changed';\nimport imagemin from 'gulp-imagemin';\nimport { plumberConfig, imageminConfig } from '../config';\n\n... | javascript | edit | 0 | 1 | mit | 7db763397bab5ec8a01758ad3b56bf3a1f4aa979 | Zoxon/gulp-front,Zoxon/gulp-front,bkzhn/gulp-front,bkzhn/gulp-front | gulp/tasks/assets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar expect = chai.expect;\n\nvar Server = require('./../src/server');\n\ndescribe('Server', function(){\n it('getTasksOfTheDayList() should return 0', function(){\n var Server = new Server([]);\n expe... | javascript | edit | 0 | 1 | mit | 2a0b8f437891128f264bf764fc3e600ea4c1888a | pyr0tecnix/TasksManager | test/server.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Toogle asset images - zome in and out\n$(function() {\n\n var Snackbar = window.Snackbar;\n Snackbar.init();\n\n var AssetPage = window.AssetPage;\n AssetPage.init();\n\n // We only want zooming on asset's prima... | javascript | edit | 0 | 2 | mit | b6bd9d866d67dd78580fd1ecafea3af0f7bd9675 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RandomGenerator = function(initialSeed) {\n\n this.reset = function(seed) {\n this.initialSeed = seed;\n this.counter = (seed % 1000003 + 1) * 4751;\n };\n\n this.nextReal = function() {\n var number = Math.sin(... | javascript | edit | 0 | 4 | mit | 9134abf954319bf7e645a4a91b8c5a38743b6f99 | France-ioi/bebras-modules,be-oi/beoi-contest-modules,be-oi/beoi-contest-modules,France-ioi/bebras-modules | pemFioi/randomGenerator-1.0.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// --------------------------------------------------------------------------------------------------------------------\n//\n// sts-config.js - config for AWS Security Token Service\n//\n// Copyright (c) 2012 AppsAttic Ltd - http://www.... | javascript | edit | 0 | 0 | mit | eb7efb7a9d9b19385f64b532e29feeb9424aa4a3 | chilts/awssum | lib/amazon/sts-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('ic')\n\n .filter('range', function() {\n return function(input, total) {\n total = parseInt(total);\n for (var i=1; i<=total; i++)\n input.push(i);\n return input;\n };\n });\n\n```\n\nApply... | javascript | edit | 0 | 2 | apache-2.0 | ca3aa73453de7c134ad597951bb9491a788161a3 | Voles/inConcert,Voles/inConcert | app/js/utilities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport classes from './SongItem.css'\n\nexport const SongItem = (props) => (\n <div onClick={props.onSelectSong} className={classes.container + (props.isQueued ? ' ' + classes.isQueued : '')}>\n <div class... | javascript | edit | 0 | 3 | isc | fed6d46619a8bd690d39eb3f6f0ec7616fa8c22f | bhj/karaoke-forever,bhj/karaoke-forever | src/routes/Library/components/SongItem/SongItem.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Component } from \"react\";\nimport { withApollo } from \"react-apollo\";\nimport gql from \"graphql-tag\";\n\nconst assetPath = `${window.location.protocol}//${window.location.host}/assets`;\nexport default (assetKey, simulato... | javascript | edit | 0 | 2 | apache-2.0 | e7d7dd9afd464691e463b497036d4d2ddf9b2ea7 | Thorium-Sim/thorium,Thorium-Sim/thorium,Thorium-Sim/thorium,Thorium-Sim/thorium | src/helpers/assets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst browsers = [\n 'last 1 Chrome versions',\n 'last 1 Firefox versions',\n 'last 1 Safari versions'\n];\n\nconst isCI = Boolean(process.env.CI);\nconst isProduction = process.env.EMBER_ENV === 'production';\n\nif ... | javascript | edit | 0 | 0 | mit | c65efb191f2f3664489fbe75eaf6f68734557f90 | curit/ember-cli-yadda,curit/ember-cli-yadda | tests/dummy/config/targets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n extends: \"airbnb-base\",\n settings: {\n \"import/resolver\": \"webpack\"\n },\n env: {\n \"browser\": true,\n \"node\": true\n },\n rules: {\n // allow debugger during development\... | javascript | edit | 0 | 0 | bsd-2-clause | 38389a28ed998a9b16d1dbe446a736a0c0f96cff | denisov-vlad/redash,getredash/redash,hudl/redash,hudl/redash,getredash/redash,crowdworks/redash,crowdworks/redash,getredash/redash,denisov-vlad/redash,denisov-vlad/redash,getredash/redash,denisov-vlad/redash,chriszs/redash,44px/redash,hudl/redash,chriszs/redash,moritz9/redash,denisov-vlad/redash,getredash/redash,crowdw... | client/.eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = function (grunt) {\n\n var DEV = \"production\" !== process.env.NODE_ENV;\n var PUBLIC_DEST = \"../public\";\n\n require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);\n\n grunt.registerTask('defaul... | javascript | edit | 0 | 1 | mit | db48f805f1fdc941087a471a9e42631faace05ba | ornicar/vindinium,ornicar/vindinium,ornicar/vindinium | client/Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classNames from 'classnames';\n\nexport default ({ variant, theme, image, headline, textline, children }) => {\n const className = classNames({\n 'text-with-image': true,\n 'text-with-image--im... | javascript | edit | 0 | 2 | mit | 21a29c12266f1b905e83099f93a90fbd2eb350c5 | Syncano/syncano.com,Syncano/syncano.com | components/TextWithImage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet SERVICE_SCHEMA = {\n type: 'object',\n properties: {\n General: {\n description: 'Configure your container',\n type: 'object',\n properties: {\n id: {\n default: '/service',\n title: 'ID'... | javascript | edit | 0 | 0 | apache-2.0 | 27d2b6415dcb31483ee670fb54ac86a164b5c702 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | src/js/constants/ServiceSchema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar canvas;\n\nfunction createCanvas(width, height) {\n if (!canvas) {\n canvas = document.createElement('canvas');\n document.body.appendChild(canvas);\n }\n\n canvas.width = width;\n canvas.height = height;\n\n var ctx = ca... | javascript | edit | 0 | 2 | mit | 852b543c2883bd9befa3bca0496560798cffb20c | tildeio/conductor.js | example/cards/render_card.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n migrations_directory: \"./migrations\",\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n network_id: \"*\"\n },\n live: {\n ... | javascript | edit | 0 | 0 | mit | f633cecd8abaa86381ebe19cc30ee5c8942d919a | TripleSpeeder/StandingOrderDapp,TripleSpeeder/StandingOrderDapp | truffle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar _ = require('underscore');\nvar Promise = require('bluebird');\nvar Stream = require('stream');\nvar Boom = require('boom');\n\nmodule.exports = function (server, conf) {\n\t\n\trequire('couch-prov... | javascript | edit | 0 | 5 | apache-2.0 | 03025e752058631187e25261bbf3332bb5678d41 | juanprietob/clusterpost,juanprietob/clusterpost,juanprietob/clusterpost | src/clusterpost-provider/clusterprovider.methods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nContacts.allow(Server.allow.owner);\n\nContacts.after.remove(function (userId, doc) {\n Server.upload.delete(doc.imageFile);\n});\n\nContacts.before.update(function(userId, doc, fieldNames, modifier, options){\n var mset = modifier['$... | javascript | edit | 0 | 4 | mit | 6163e667f8c7e69af4d0009a29cc7b896700c20b | ManuelDeLeon/phonebook,ManuelDeLeon/phonebook | server/collections/contacts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('foundation.panel', ['foundation.common.services']);\n\nangular.module('foundation.panel')\n .directive('zfPanel', ['FoundationApi', function(foundationApi) {\n return {\n restrict: 'EA',\n templateUrl: '/partials... | javascript | edit | 0 | 6 | mit | 235474f41d7ce68987f1516e057ab2db9cc3a297 | zurb/foundation-apps,chirilo/foundation-apps,pioug/foundation-apps,KalisaFalzone/foundation-apps,base-apps/angular-base-apps,SaiNadh001/foundation-apps,pioug/foundation-apps,laurent-le-graverend/foundation-apps,bitsandco/foundation-apps,silencekillsdesign/foundation-apps,chirilo/foundation-apps,zurb/foundation-apps,chr... | js/angular/directives/panel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require(\"react\");\nimport { Link } from \"react-router\";\nvar { baseUrl } = require(\"../baseUrl\");\n\nclass Navigation extends React.Component {\n render () {\n return (\n <div className=\"navigation\">\n ... | javascript | edit | 0 | 1 | mit | 48fb8fed94eb7af70715bb1f6af9cbf53748103d | micnigh/yet-another-isomorphic-blog,micnigh/yet-another-isomorphic-blog | shared/component/Navigation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by zsolt on 3/23/14.\n */\n\nvar person = {\n firstName: 'Jimmy',\n lastName: 'Smith',\n get fullName() {\n return this.firstName + ' ' + this.lastName;\n }\n// set fullName (name) {\n// var ... | javascript | edit | 0 | 1 | mit | b62d13f66db87e4edbabb3c818abaf5d804c4832 | webgme/webgme-domain-tools,webgme/webgme-domain-tools,webgme/webgme-domain-tools | src/examples/jsbasic/properties.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.exports = {\n\n createNode : function (req, res, next) {\n var newNode... | javascript | edit | 0 | 3 | mit | 0fd9e2ad7280677ebea3857a7ff2909d8ac61f8f | sreimer15/RoadMapToAnything,GMeyr/RoadMapToAnything,sreimer15/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything,delventhalz/RoadMapToAnything,cyhtan/RoadMapToAnything,delventhalz/RoadMapToAnything,GMeyr/RoadMapToAnything,cyhtan/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything | server/api/nodes/nodeController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport * as auth from './auth.js';\nimport * as data from './data.js';\n\nimport Header from './header.js';\nimport Footer from './footer.js';\nimport LoadingOverlay from './loading-overlay.js';\n\n// Authori... | javascript | edit | 0 | 2 | mit | e50bb0a43fd92d18c6eb62c5006f755afbe1eba9 | nicolasartman/learning-prototype,nicolasartman/chalees-min,nicolasartman/learning-prototype,nicolasartman/chalees-min | src/js/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n 'use strict';\n\n var peer = new Peer({ key: 'evycxpu0zuissjor' });\n\n peer.on('open', function (id) {\n $('h1').html('Hi ' + id + ' :)');\n peer.connect('defaultId');\n });\n\n peer.on('c... | javascript | edit | 0 | 1 | mit | 80afe2cfeb0accfe2fb3444c8c49a369dad4fe4c | boolinc/peerjs-webrtc-listener,boolinc/peerjs-webrtc-listener | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nAlchemy.PageSorter = function() {\n var $sortables = $('ul#sitemap').find('ul.level_1_children');\n\n $sortables.nestedSortable({\n disableNesting: 'no-nest',\n forcePlaceholderSize: true,\n handle: '.handle',\n items: 'li... | javascript | edit | 0 | 1 | bsd-3-clause | 59bc15274ed37a65be9f21a268c4fb06946a218e | AlchemyCMS/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,mamhoff/alchemy_cms,AlchemyCMS/alchemy_cms,robinboening/alchemy_cms,robinboening/alchemy_cms,mamhoff/alchemy_cms,robinboening/alchemy_cms | app/assets/javascripts/alchemy/alchemy.page_sorter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\n// module that handles the budget data using the module pattern\n// IFEE creates a new scope. IFEE creates a closure for the vars/functions/objects\nvar budge... | javascript | edit | 0 | 3 | mit | 5f7b52370e7d5bc8c8d3c24fe799f94505fc3179 | rpuspana/myExpenses,rpuspana/myExpenses | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar U = require('../../util');\n\n// NOTE: process.once() doesn't guarantee that process\n// will exit after receiving first message from master\n// (node bug prior to 0.10)\nprocess.once('message', function(m) {\n\n ... | javascript | edit | 0 | 2 | mit | 5d76141124f0619cb91149633b5465d48bec19ba | bem-archive/bem-tools,bem/bem-tools,bem-archive/bem-tools,bem/bem-tools | lib/nodes/workers/bemcreate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\n/*jslint browser: true*/\n/*global... | javascript | edit | 0 | 2 | apache-2.0 | ad68aa688333358e924028abe9a92b25c43847c0 | NeuroTechX/neurotechx.github.io,JMazzucco/neurotechx.github.io,NeuroTechX/neurotechx.github.io,JMazzucco/neurotechx.github.io,JMazzucco/neurotechx.github.io,NeuroTechX/neurotechx.github.io,NeuroTechX/neurotechx.github.io,JMazzucco/neurotechx.github.io | public_html/js/template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n(function () {\n\n /* CUSTOM BINDING HANDLERS */\n ko.bindingHandlers.slideVisible = {\n init : function (element) {\n jQuery(element).hide();\n },\n update : function (element, valueAccessor) {\n ... | javascript | edit | 0 | 1 | mit | 371b4ac7ee10d112b839144159091ae1ca8ef82b | cmwilhelm/Aggregated,cmwilhelm/Aggregated | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('zoomableApp').controller('statisticController', function($scope, moment){\n // VARIABLES\n $scope.criteria = 'DAY'; // default set to day for date criteria\n $scope.startDate = moment().subtract(1, 'month').toDate();... | javascript | edit | 0 | 1 | mit | a30c60e57956b73736581746a0e161a45a05edd2 | nus-mtp/zoomable.js,nus-mtp/zoomable.js,nus-mtp/zoomable.js | assets/js/public/controllers/statisticController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction MtkLabel (settings) {\n MtkXaml.call (this, \"<TextBlock/>\", settings);\n \n this.MapProperties ([ \n [ \"Text\", \"QueueResize\" ], \n [ \"FontFamily\", \"QueueResize\" ],\n [ \"FontSize\", \"Queue... | javascript | edit | 0 | 4 | mit | 22f9b36c192661cadb00dc8b4840a5257e83cd89 | abock/moonshine,abock/moonshine,abock/moonshine,abock/moonshine | player/mtk/mtk-label.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar connect = require('connect');\n\nvar app = connect()\n .use(connect.logger())\n .use(connect.static('dist'));\n\nvar port = process.env.PORT || 5000;\napp.listen(port, function() {\n console.log(\"Connect server listenting on por... | javascript | edit | 0 | 1 | mit | 08ee8ed7dd4de7ff75229bfad82175313e112a79 | walmartlabs/generator-thorax,walmartlabs/generator-thorax | app/templates/_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// counter starts at 0\nMeteor.subscribe('isslocation');\n\nSession.setDefault('counter', 0);\n\nTemplate.home.helpers({\n counter: function () {\n return Session.get('counter');\n }\n});\n\nTemplate.home.events({\n 'click button'... | javascript | edit | 0 | 1 | mit | fcac46ba669483c6d837bed66d811893eee9cd32 | slashrocket/stationstream,slashrocket/stationstream | client/client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\nimport runtime from './runtime';\nimport intl from './intl';\n\nexport default combineReducers({\n runtime,\n intl,\n});\n\n```\n\nApply this change: Add auth reducer to root reducer"
},
{... | javascript | edit | 0 | 0 | mit | d8865a06a313677c0aa38eeb837a92bf520d6796 | cmosguy/react-redux-auth0 | src/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n var runs = [\n {\n input: 'input1 input1 input1 input1 input1 input1 input1 input1',\n output: 'output1 output1 output1 output1 output1 output1 output1 output1'\n },\n {\n ... | javascript | edit | 0 | 1 | mit | c86baeb4f4ffff97408d011bb4a7238f5a6b7be1 | peferron/playbyplay,peferron/playbyplay | demo_dev/playbyplay-mock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Opt-in repos (case sensitive)\n// These repositories are loaded this way as a convenience, not because Disco has any special priority in this list.\n// Opting these repositories in here reduces the number of Javascript calls we need ... | javascript | edit | 0 | 0 | mit | 17947c9fc0c05b57dd0b397341abd6ad9b788ff2 | discolabs/opensourceforshopify.com,discolabs/opensourceforshopify.com,discolabs/opensourceforshopify.com | javascripts/custom-repos.js | rejected_duplicate | Near-duplicate of sample 82246 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n// import VideoListItem from './video_list_item';\n\nconst VideoDetail = ({video}) => {\n const videoId = video.id.videoId;\n const url = `https://www.youtube.com/embed/${videoId}`;\n return (\n <div cl... | javascript | edit | 0 | 2 | mit | e845f2dd24c03d11baaed494c49d39abe8d45927 | izabelka/redux-simple-starter,izabelka/redux-simple-starter | src/components/video_detail.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport child from \"child_process\";\nimport { oneLine } from \"common-tags\";\n\nexport default () => {\n\tchild.execSync(oneLine`\n\t\tgit init\n\t\t&& git config user.email \"<EMAIL>\"\n\t\t&& git config user.name \"Test Zor\"\n\t\t&... | javascript | edit | 0 | 1 | mit | 6cf55b0ad1641eca0440017bb9590c338d402179 | stovmascript/react-native-version,stovmascript/react-native-version | test/helpers/tempInitAndVersion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { applyOptionsMiddleware } from \"./../middleware\";\nimport setTemplate from \"./setTemplate\";\nimport setStyles from \"./setStyles\";\n\nexport default options => original => {\n const cb = original.prototype.connectedCallbac... | javascript | edit | 0 | 7 | mit | e57a218c03fd70c8a577ae65f038de25303c4d69 | vardius/web-component | src/connectedCallback/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n describe('pagination directive', function() {\n var elementCompile,\n scope,\n directiveScope;\n\n beforeEach(\n function() {\n module('wfm.pagination')... | javascript | edit | 0 | 1 | mit | 198490f095ec7df6543ac1b23b7e1fe2652dabe1 | alinanmorariu/styleguide,tiaoshi/styleguide,tiaoshi/styleguide,blandine/styleguide,GrayOverride/styleguide,blandine/styleguide,GrayOverride/styleguide,GrayOverride/styleguide,alinanmorariu/styleguide,Teleopti/styleguide,Teleopti/styleguide,blandine/styleguide,tiaoshi/styleguide,alinanmorariu/styleguide | directives/pagination/wfmpagination.directive.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport { runCommand, extendJasmineTimeout } from '../../../utils/helper-tests';\nimport { join } from 'path';\n\njest.unmock('../../../utils/helper-fs');\n\ndescribe('Jest task', () => {\n extendJasmineTimeout(jasmine,... | javascript | edit | 0 | 1 | mit | 52214563420aa2577f140ecc086e9393159cf280 | urbanjs/urbanjs-tools,urbanjs/tools,urbanjs/tools,urbanjs/tools,urbanjs/urbanjs-tools,urbanjs/urbanjs-tools | src/tasks/jest/__tests__/index-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * default setting\n */\n\nmodule.exports = exports.default = {\n hotkey: 'Control+2',\n sshReadyTimeout: 50000,\n scrollback: 3000,\n onStartSessions: [],\n fontSize: 16,\n fontFamily: 'mono, courier-new, courier, monospace'... | javascript | edit | 0 | 0 | mit | 52eacd7290bbcd7702e7f66cd86aab453479f5c4 | electerm/electerm,electerm/electerm | src/app/common/default-setting.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar studentsController = require('../controllers/students');\nvar teachersController = require('../controllers/teachers');\nvar authenticationController = require('../controllers/authenticate');\n\nmodule.exports = function(app, io) {\n... | javascript | edit | 0 | 1 | mit | 91fa5b1137eb8b44a06d03602dcb577097f64ad8 | absurdSquid/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll | server/config/routes.js | rejected_duplicate | Near-duplicate of sample 89798 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('proxtop').controller('MessagesController', ['$scope', 'ipc', '$state', function($scope, ipc, $state) {\n ipc.on('conversations', function(conversations) {\n $scope.$apply(function() {\n $scope.conver... | javascript | edit | 0 | 3 | mit | 4a57e52b41e6c28fcef5656d7607319be74564a6 | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | src/ui/messages/messages.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('../src/config/config')\nvar client = require('mongodb').MongoClient\nvar fs = require('fs-extra')\n\nclient.connect(config.database.host+'vegodev', function(err, db){\n if (err) throw err\n\n //Drop vegodev datab... | javascript | edit | 0 | 4 | unlicense | 680a478ae24e3109d1d4cd13c81e8e759e3386f9 | Vegosvar/Vegosvar,Vegosvar/Vegosvar,Vegosvar/Vegosvar | tools/devconfigure.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {Pager} from 'react-bootstrap';\n\n\nconst Paging = ({pending, paging, onSelect}) => {\n let newer, older;\n\n if (!paging) {\n return null;\n }\n\n... | javascript | edit | 0 | 6 | mit | 68f6ef81881fb7d627aa8574f1fc0037f6549c7b | akornatskyy/sample-blog-react-redux,akornatskyy/sample-blog-react-redux | src/js/shared/components/paging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es2021\": true,\n \"node\": true\n },\n \"extends\": [\n \"eslint:recommended\",\n \"plugin:react/recommended\"\n ],\n \"parser\"... | javascript | edit | 0 | 0 | mit | b9d5b5c952af07b947a259fcd1ec679b01f9fa12 | ultranaut/react-chat,ultranaut/react-chat | client/.eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec;\n\nmodule.exports = function(sysinfo) {\n\n return new MacProvider(sysinfo);\n};\n\nfunction MacProvider(sysinfo) {\n\n this.lookup = function(pid, options, callback) {\n\n if(typeo... | javascript | edit | 0 | 6 | mit | 15af2b445dbb469eb8516d6fd0bfa6fe78e5b8c1 | Wyliodrin/node-usage,Discountrobot/node-usage,Wyliodrin/node-usage,arunoda/node-usage,curioussavage/my-usage,Wyliodrin/node-usage,Wyliodrin/node-usage,curioussavage/my-usage,arunoda/node-usage,Discountrobot/node-usage,arunoda/node-usage,arunoda/node-usage,curioussavage/my-usage,arunoda/node-usage,Wyliodrin/node-usage,D... | lib/providers/mac.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n bower: {\n dependencies: { }\n }\n },\n {\n name: 'ember-1.13',\n bower: {\n dependencies: {\n 'e... | javascript | edit | 0 | 0 | mit | b7e4f6b6a8cd64e42a2366587eb4f1963a22627f | cball/justa-table,cball/justa-table | config/ember-try.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add rest of archetypes and clans"
},
{
"role": "assistant",
"content": "export const archetypes = [\n 'Architect',\n 'Artist',\n 'Bully',\n 'Caregiver',\n 'Child',\n 'Competitor',\n 'Con Artist',\n 'Conformist',\n 'C... | javascript | new_file | 0 | 0 | mit | 936823f193e9bb14ed76cd58da7975d71e4b68f6 | TrueWill/embracer,TrueWill/embracer | src/constants/characterOptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequirejs.config({\r\n paths: {\r\n 'text': '../lib/require/text',\r\n 'durandal':'../lib/durandal/js',\r\n 'plugins' : '../lib/durandal/js/plugins',\r\n 'transitions' : '../lib/durandal/js/transitions',\r... | javascript | edit | 0 | 1 | mit | 4e0e591087b060d6635a51aab726e8bbba53eef2 | ansidev/durandaljs-spa,ansidev/durandaljs-spa | app/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as changeCase from 'change-case'\nimport pluralize from 'pluralize'\n\nexport default {\n\t...changeCase,\n\tpluralize,\n\tresourceize: function(string) {\n\t\treturn pluralize(changeCase.camel(string))\n\t}\n}\n\nObject.withou... | javascript | edit | 0 | 2 | mit | 3f03d9e7f4cf79814b753fdadeee8ee77fc03eb2 | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet | client/src/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes, Component } from 'react';\nimport CakeChart from 'cake-chart';\n\nfunction findParentNode(node, child, parent = null) {\n if (node === child) return parent;\n for (let c of child.children || []) {\n const... | javascript | edit | 0 | 5 | mit | b3b83d56b05ec4e0bcf588fd15b9ac7279fdf7bd | moreginger/react-tntfleague,moreginger/react-tntfleague | src/components/AllTime/AllTime.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADING, LOADED, FAILED } from 'sparql-connect'\nimport { browserHistory } from 'react-router'\nimport { uriToLink } from '..... | javascript | edit | 0 | 2 | mit | dc6526e1a7dc1e090049d227ac99d912f71da669 | UNECE/Classification-Explorer,UNECE/Classification-Explorer | src/js/components/search-input.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst platformsByName = {\n\tcore: 0,\n\tc: 0,\n\tphoton: 6,\n\tp: 6,\n\tp1: 8,\n\telectron: 10,\n\te: 10,\n\tduo: 88,\n\td: 88,\n\tbluz: 103,\n\tb: 103\n};\n\nconst platformsById = {\n\t0: 'Core',\n\t6: 'Photon',\n\t8: 'P1',\n\t10: 'El... | javascript | edit | 0 | 0 | apache-2.0 | faa3774a70e096bb31b9733def967cba6f33ca64 | spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli | src/cmd/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar helper = require('./specHelper');\nvar tls = require('tls');\nvar fs = require('fs');\n\ndescribe('tls', function(){\n\n it( 'should allow creation of a server with key and cert', function() {\n var serverKey = fs.readFi... | javascript | edit | 0 | 1 | apache-2.0 | 862db0ce4ebfd6bd6a881a4ac8f344c5ae24bbdc | dherges/nodyn,tony--/nodyn,nodyn/nodyn,dherges/nodyn,tony--/nodyn,nodyn/nodyn,dherges/nodyn,tony--/nodyn,nodyn/nodyn | src/test/javascript/tlsSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst crypto = require('crypto');\n\nmodule.exports.alias = [\n\t'rate',\n\t'rank'\n];\n\nmodule.exports.command = function screenshot(message) {\n\tif (!message.input) return message.channel.createMessage('I rate undefined a 11 out of ... | javascript | edit | 0 | 3 | mit | fba5634492aa2aa5b8b03accda84527e35a16f5b | moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord | server/discord/cogs/rate/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction playAudio(keyCode) {\n let soundToPlay = document.querySelector(`audio[data-key=\"${keyCode}\"]`);\n let keyToAnimate = document.querySelector(`div[data-key=\"${keyCode}\"]`);\n keyToAnimate.classList.add('playing');\n... | javascript | edit | 0 | 2 | mit | 0ccc692944f22d1e0de4028921beeeef5f94d767 | shahzaibkhalid/electronic-drum-kit,shahzaibkhalid/electronic-drum-kit | script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\n// Serve assets in /public\nvar path = require('path');\napp.use(express.static(path.join(__dirname, 'client')));\n\n// Body parsing for JSON POST payloads\nvar bodyParser = req... | javascript | edit | 0 | 1 | mit | b2ccd46e5cc0f5d4bb76301ead7f15cff9e6d00e | unixmonkey/caedence.net-2015,unixmonkey/caedence.net-2015 | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst config = {};\n/**\n * Heroku makes it available to help calculate correct concurrency\n * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level\n */\nconfig.memoryAvailable = par... | javascript | edit | 0 | 0 | mit | 3a83fc9922bf577fa09da88a9e8c6fd2351790f5 | DoSomething/gambit,DoSomething/gambit | config/processes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').load();\nvar express = require('express'),\n jwt = require('jsonwebtoken');\n morgan = require('morgan'),\n bodyParser = require('body-parser'),\n mongoose = require('mon... | javascript | edit | 0 | 1 | mit | 439a1b75eac9d8e73f945bbd7512b4d234c09888 | busayo/meanmap,unicodeveloper/meanmap,andela-anandaa/meanmap,andela-anandaa/meanmap,unicodeveloper/meanmap,busayo/meanmap | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require(\"./config\");\nvar documentDbClient = require(\"documentdb\").DocumentClient;\n\nconsole.log(config.primaryKey);\nvar client = new documentDbClient(config.uri, { \"masterKey\" : config.primaryKey});\n\nvar databas... | javascript | edit | 0 | 3 | mit | 57ae0b035dbe50ac2a542354200d30a86eba81e8 | alexandre-w/DocumentDB-NodeJs-API | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst existsByDot = require('../common/exists-by-dot');\nconst deleteByDot = require('../common/delete-by-dot');\nconst checkContext = require('./check-context');\nconst errors = require('@feathersjs/errors');\n\nmodule.exports = func... | javascript | edit | 0 | 4 | mit | 3b98a1083be1cf00327344ade26fa46d318066ed | feathersjs/feathers-hooks-common | lib/services/prevent-changes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport configure from './configure';\n\ndescribe(`configure()`, () => {\n test(`It is a function.`, () => {\n expect(typeof configure).toBe(`function`);\n });\n\n test(`User options overrule default options.`, () => {\n const e... | javascript | edit | 0 | 2 | mit | 7e3501fb757556803bee442e4a92611e519effe4 | maoberlehner/perfundo,maoberlehner/perfundo | js/lib/configure.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar coffeeCoverage = require('coffee-coverage');\nvar projectRoot = path.normalize(__dirname);\nvar coverageVar = coffeeCoverage.findIstanbulVariable();\n// Only write a coverage report if we're not running ... | javascript | edit | 0 | 0 | mit | c6c871ea75ec23883562ff898831cec334b706ec | mathphreak/ReliefValve,mathphreak/ReliefValve | test/coffee-coverage-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n==================================================================================================\n\tLowland - JavaScript low level functions\n\tCopyright (C) 2012 Sebatian Fastner\n=================================================... | javascript | edit | 0 | 6 | mit | e320b6de6d175d42aee6d65b670c5b282cb738b3 | fastner/lowland,fastner/lowland | src/detect/IoRequest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport knexJs from 'knex';\nimport bookshelfJs from 'bookshelf';\n\nimport knexConfig from './knexfile';\n\n/**\n * Database connection.\n */\nconst knex = knexJs(knexConfig);\nconst bookshelf = bookshelfJs(knex);\n\nbookshelf.plugin(['... | javascript | edit | 0 | 0 | mit | 5e4069b1fc409d04b91b24991ff814ca86298b17 | mesaugat/express-api-es6-starter,mesaugat/express-api-es6-starter | src/db.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar cheerio = require('cheerio');\nvar Promise = require('../../utils/promise');\n\n/**\n Apply a list of operations to a page and\n output the new page.\n\n @param {Page}\n @param {List|Array<Transformation>}\n @return {... | javascript | edit | 0 | 1 | apache-2.0 | 63839bb0a7dd429b50b99109511737efed257e36 | gencer/gitbook,ryanswanson/gitbook,gencer/gitbook,GitbookIO/gitbook,tshoper/gitbook,strawluffy/gitbook,tshoper/gitbook | lib/output/modifiers/modifyHTML.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar r = require('request');\n\nvar config = require('./config.json');\n\n\nvar doneUrl;\nvar userUrl;\n\n\n\nhttp.createServer(function(request, response) {\n if (!isEvent(request)) return;\n\n r.post(... | javascript | edit | 0 | 2 | mit | ad744eeaba1413832dabd3df0e1e7becb08baed3 | RemoteHelper/client-mock-node | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('block class names', function() {\n it('should add language class name to block', function() {\n var expected = 'some-class hljs xml',\n actual = document.getElementById('without-hljs-class').class... | javascript | edit | 0 | 1 | bsd-3-clause | 83838d46923e95ccf0dc8870ca273b6e606ca308 | snegovick/highlight.js,Ankirama/highlight.js,adam-lynch/highlight.js,daimor/highlight.js,martijnrusschen/highlight.js,aurusov/highlight.js,bogachev-pa/highlight.js,jean/highlight.js,aurusov/highlight.js,robconery/highlight.js,aristidesstaffieri/highlight.js,cicorias/highlight.js,1st1/highlight.js,kevinrodbe/highlight.j... | test/special/buildClassName.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport RecordFlow from '../RecordFlow';\nimport PlaybackFlow from '../PlaybackFlow';\nimport Submission from '../Submission';\n\nexport default {\n '/record/:roomId?/:hideHead?': RecordFlow,\n '/:roomId?/:id?': PlaybackFlow,\n '/subm... | javascript | edit | 0 | 0 | apache-2.0 | b861e7ee65ce1deeda89547477db693667a47d25 | puckey/dance-tonite,puckey/dance-tonite | src/containers/Router/routes-website.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('bolt.auth', [])\n\n.controller('AuthController', function ($scope, $window, $location, Auth) {\n $scope.user = {};\n\n $scope.signin = function () {\n Auth.signin($scope.user)\n .then(function (session) {\n ... | javascript | edit | 0 | 2 | mit | 226e8dfe78ac7e8b49394effa1463389beb6c571 | thomasRhoffmann/Bolt,boisterousSplash/Bolt,boisterousSplash/Bolt,gm758/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,elliotaplant/Bolt,elliotaplant/Bolt | client/app/auth/auth.js | rejected_duplicate | Near-duplicate of sample 80776 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.