messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport ReactCSSTransitionGroup from 'react-addons-css-transition-group';\nimport styles from './Incident.css';\nimport Map from './Map';\nimport GridTile from 'material-ui/lib/grid-list/grid-ti... | javascript | edit | 0 | 1 | mit | 9a93e67a36a9618c6f4511d267bf361ea104a07b | nickbabcock/udps,nickbabcock/udps,nickbabcock/udps | js/components/Incident.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\nimport editorconfig from 'editorconfig';\nimport generateConfig from './commands/generate';\n\nfunction init(editor) {\n\tgenerateConfig();\n\n\tif (!editor) {\n\t\treturn;\n\t}\n\n\tconst file = editor.getURI();\n\n\tif (... | javascript | edit | 0 | 9 | mit | 0d5e4b013ae933aeb42a2c1c630206010c42e8ac | florianb/atom-editorconfig,sindresorhus/atom-editorconfig,peterblazejewicz/atom-editorconfig | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//make sure all dependencies are loaded\nrequire([\n\t'es5shim',\n\t'angular',\n\t'json!data/config.json',\n 'angular-ui-router',\n 'angular-flash',\n 'angular-moment',\n 'angular-sanitize',\n 'emoji',\n 'socketio',\n ... | javascript | edit | 0 | 1 | mit | 7e962bb5df10f4740c37501360a8437b952853f7 | rserve/arrangr,rserve/arrangr | client/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */ \n\n// <![CDATA[\n$(document).ready(function()... | javascript | edit | 0 | 1 | apache-2.0 | f1aa11423921ee52238330d68f7aa60d9c89d7cf | solusi-integral/reserv,solusi-integral/reserv,solusi-integral/reserv,solusi-integral/reserv | scripts/autoreload/reload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar crypto = require('crypto'),\n util = require('util'),\n Transform = require('stream').Transform;\n \nfunction DecryptStream(options) {\n if (!(this instanceof DecryptStream))\n return new DecryptStream(options);\n\n Transform... | javascript | edit | 0 | 2 | mit | 299db6b86cdc1434c9ab4ce181a7c58affb36afd | oliviert/node-snapchat | lib/decryptStream.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar { Cc, Ci, Cr } = require('chrome');\n\nexports.setup = function(panel) {\n var observer = {\n observe: function (subject, topic, data) {\n if ('http-on-modify-request' !== topic) {\n return;\n }\n\n subject... | javascript | edit | 0 | 3 | apache-2.0 | 8f98c3375a4f0d3172ad1b7f34112ebe7cb5280e | jpevarnek/uproxy,roceys/uproxy,roceys/uproxy,IveWong/uproxy,chinarustin/uproxy,itplanes/uproxy,chinarustin/uproxy,MinFu/uproxy,roceys/uproxy,itplanes/uproxy,qida/uproxy,MinFu/uproxy,itplanes/uproxy,dhkong88/uproxy,MinFu/uproxy,qida/uproxy,itplanes/uproxy,MinFu/uproxy,IveWong/uproxy,chinarustin/uproxy,qida/uproxy,qida/u... | src/firefox/lib/url-handler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Helper module used to alias browser names parsed out of the 'useragent'\n * module to the equivalent names used in the config.json for each polyfill.\n * Should always be lowercase values as it makes comparisons easier.\n */\n\n... | javascript | edit | 0 | 2 | mit | 5b50d1999c4dc41f7b47b47df24461fd7e098396 | kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,kdzwinel/polyfill-service | agent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar fs = require(\"fs\");\nvar yaml = require(\"js-yaml\");\n\nmodule.exports = function loadConfig () {\n var config = yaml.safeLoad(fs.readFileSync(\".titorrc\", \"utf8\"));\n\n if (typeof config !== \"object\") t... | javascript | edit | 0 | 3 | mit | cdfe747966fed67ea9ad59ff8ad036984d986839 | meeber/titor,meeber/titor | util/load-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar markovWordsetBuilder = (function() {\n\n\tvar max_words = 80000;\n\n\tfunction stripChars(word) {\n\t\treturn word.replace(/[^A-Za-z0-9\\s\\.\\!\\?\\'\\,\\—\\-]/gi, '');\n\t}\n\n\tfunction addWords(words, delimiter)... | javascript | edit | 0 | 1 | bsd-3-clause | 33e91cd319b71c6960a663a1462aee291825f753 | petejscott/jsMarkov | src/js/markovWordsetBuilder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (typeof global.atom === 'undefined') {\n global.atom = {\n notifications: {\n addError: function (desc, obj) {\n return new Promise(function (resolve, reject) {\n console.log('wtf', obj)\n reject(obj... | javascript | edit | 0 | 1 | isc | 419cc5591ecd9f10e8036b99cef314ee879c2395 | gustavnikolaj/linter-js-standard-engine | test/util/atomHelper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint key-spacing:0 spaced-comment:0 */\nconst path = require('path');\nconst ip = require('ip');\n\nconst projectBase = path.resolve(__dirname, '..');\n\n/************************************************\n/* Default configuration\n... | javascript | edit | 0 | 0 | mit | 9afaf5672c012d944416e984b62e80e7f3bfbcd9 | Picta-it/barebare,Picta-it/barebare | config/default.js | rejected_duplicate | Near-duplicate of sample 84320 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nSession.old_set = Session.set;\nSession.set = function _psSet(key, value, persist) {\n if (persist === undefined) {\n persist = true;\n }\n Session.old_set(key, value);\n if (persist) {\n if (value === undefined) {\n valu... | javascript | edit | 0 | 4 | mit | 180173646ed757adf89a0fd4753cd9366cae481e | ryepdx/meteor-persistent-session,okgrow/meteor-persistent-session | lib/persistent_session.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst _ = require('underscore');\n\nconst logger = require('../log.js');\n\nclass CardService {\n constructor(db) {\n this.cards = db.get('cards');\n this.packs = db.get('packs');\n }\n\n replaceCards(cards) {\n ... | javascript | edit | 0 | 3 | mit | f59ee0289334a31336aadfae02cb28ebfc0ebbc8 | jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki | server/services/CardService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (!document.createElement('dialog').showModal) {\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = 'static/dialog-polyfill.css';\n var script = document.createElement('script');\n script.src = ... | javascript | edit | 0 | 2 | apache-2.0 | df01fedc57674fb198c3a80889fabe546178a627 | notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita | signup/static/invite-dialog.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { getOptions, stringifyRequest } from 'loader-utils'\n\nmodule.exports = function (content, sourceMap) {\n this.cacheable()\n\n const options = getOptions(this)\n const { buildId, modules } = options\n\n this.callback(null, `... | javascript | edit | 0 | 1 | mit | 08f877cb5d0434e6d2ef605dceb7e7c53d0015a4 | kpdecker/next.js | server/build/loaders/polyfill-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n( function( $ ) {\n\n\t'use strict';\n\n\t$( function() {\n\n\t\tvar body = $( 'body' ),\n\t\t\twriteReview = $( '.write-a-review' );\n\n\t\t// If review link exists.\n\t\tif ( writeReview.length ) {\n\n\t\t\t// On click trigger ... | javascript | edit | 0 | 3 | mit | 5e73ba5ca42329defbf277327cb21f2f1830c7ba | xBLADEx/re-google-review,xBLADEx/re-google-review | assets/js/review.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"The Meteor command-line tool\",\n version: '1.0.27-rc0'\n});\n\nPackage.includeTool();\n\n```\n\nApply this change: Bump meteor-tool version (not totally sure why... is Blaze used in the tool?)"
},
... | javascript | edit | 0 | 0 | mit | ab5432a99e858fe0bd1d82f09c2c1ac51b819138 | udhayam/meteor,mjmasn/meteor,ashwathgovind/meteor,somallg/meteor,yinhe007/meteor,papimomi/meteor,chiefninew/meteor,udhayam/meteor,dev-bobsong/meteor,brdtrpp/meteor,codedogfish/meteor,jirengu/meteor,jirengu/meteor,DAB0mB/meteor,Puena/meteor,aleclarson/meteor,IveWong/meteor,codedogfish/meteor,jenalgit/meteor,chasertech/m... | packages/meteor-tool/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexport const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';\n\n\nexport const toggleEventModal = () => ({\n type: TOGGLE_EVENT_MODAL\n});\n\n```\n\nApply this change: feat: Include Redux action for managing Modal's data"
... | javascript | edit | 0 | 1 | mit | 1333b6206866a2e1a8f3c4ce038f97f046105701 | IsenrichO/react-timeline,IsenrichO/react-timeline | app/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Modules\n// ===============================================\nvar gulp = require('gulp'),\n\tpaths = require('../paths'),\n\tgutil = require('gulp-util'),\n\tbrowserSync = require(\"browser-sync\"),\n\tchanged = requi... | javascript | edit | 0 | 1 | mit | 59f1f7b14072ce7757b43f16d87d83db718a5bfb | ilkome/frontend,ilkome/frontend,ilkome/front-end,ilkome/front-end | gulpfile.js/tasks/javascript.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n({\n baseUrl: 'src',\n name: '../node_modules/almond/almond',\n include: ['quick-switcher'],\n out: 'dist/quick-switcher.min.js',\n wrap: {\n startFile: '.almond/start.frag',\n endFile: '.almond/end.frag',\n },\n paths: {\n... | javascript | edit | 0 | 0 | mit | 1b8bbca8489cea7a697ccfac935604fb3c41f36b | lightster/quick-switcher,lightster/quick-switcher,lightster/quick-switcher | build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Map from '../../../src/ol/Map.js';\nimport View from '../../../src/ol/View.js';\nimport {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js';\nimport XYZ from '../../../src/ol/source/XYZ';\n\nnew Map({\n targ... | javascript | edit | 0 | 0 | bsd-2-clause | bfea8583060472a9d1996d59a4fe0128375bdacd | geekdenz/ol3,adube/ol3,ahocevar/ol3,geekdenz/openlayers,geekdenz/ol3,openlayers/openlayers,bjornharrtell/ol3,ahocevar/openlayers,geekdenz/openlayers,stweil/openlayers,adube/ol3,adube/ol3,stweil/ol3,ahocevar/openlayers,oterral/ol3,ahocevar/ol3,tschaub/ol3,ahocevar/ol3,bjornharrtell/ol3,ahocevar/openlayers,openlayers/ope... | rendering/cases/layer-group/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Preview } from '@storybook/components';\nimport memoize from 'memoizerific';\n\nimport { Consumer } from '../core/context';\n\nconst createPreviewActions = memoize(1)(api => ({\n toggleFullscreen: (... | javascript | edit | 0 | 1 | mit | 60ee494ac85e0d3d15462b04ce27f3f6f7de2a5b | kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook | lib/ui/src/containers/preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif ( ! Function.prototype.bind) {\n Function.prototype.bind = function bind(that) { // .length is 1\n var target = this;\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind ... | javascript | edit | 0 | 3 | mit | ce3a7bb211bbcadd3b2483d5a88c0f471003d06c | princed/karma-chai-plugins | function-bind-polyfill.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst commonConfig = require(\"./webpack.common.config\");\nconst nodeExternals = require(\"webpack-node-externals\");\nconst merge = (...objs) => require(\"deepmerge\").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });\n\nco... | javascript | edit | 0 | 1 | mit | 93b2510b8f6125eeaf9dbb5aa6e10cc5696c228c | aeinbu/webpack-application-template,aeinbu/webpack-application-template | webpack.build.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/\n(function () {\n \"use strict\";\n\n /**\n * A naiive 'Buffer.indexOf' function. Requires both the\n * needle a... | javascript | edit | 0 | 7 | mit | 4ac00c206641644670113cee3dff506bd9b5ece6 | coolaj86/node-bufferjs | bufferjs/indexOf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-1.10',\n dependencies: {\n ember: '~1.10.0'\n }\n },\n {\n name: 'ember-1.11',\n ... | javascript | edit | 0 | 0 | mit | 612a0782d71884c1f43e53083d2e02d3212a88ca | mike-north/ember-load,mike-north/ember-load,mike-north/ember-load | config/ember-try.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar code = '';\n\nvar replaceOptIndex = process.argv.indexOf('--replace');\nif (replaceOptIndex !== -1) {\n var replacements = [];\n process.argv[replaceOptIndex + 1].split(',').forEach(function(record) {\n var tmp = record.split('... | javascript | edit | 0 | 0 | mit | de9710ff5767ada13dfbff717dac6c070c49404c | HarvestProfit/harvest-profit-ui | src/tables/Table.js | rejected_duplicate | Near-duplicate of sample 75914 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = 'body';\n\nConnector.artistSelector = '.mus_player_artist';\n\nConnector.trackSelector = '.mus_player_song';\n\nConnector.isPlaying = function () {\n\treturn $('#topP... | javascript | edit | 0 | 2 | mit | 3ef6ecdaaf556dd67d82275883e0c9cd344e9fa8 | galeksandrp/web-scrobbler,alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,Paszt/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,ex47/web-s... | connectors/v2/odnoklassniki.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = Config;\n\nConfig.$inject = ['$stateProvider', '$urlRouterProvider', '$anchorScrollProvider'];\n\nfunction Config($stateProvider, $urlRouterProvider, $anchorScrollProvider) {\n\n $anchorScrollProvider.... | javascript | edit | 0 | 1 | mit | 70e12c9f72267b70cf19d39913431a3a1315ec3d | failpunk/angular-playground,failpunk/angular-playground | app/Config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n size: 250,\n email: '',\n alt: '',\n imgClass: '',\n\n gravatarUrl: function() {\n var email = this.get('email'),\n size = this.get('size');\n\n r... | javascript | edit | 0 | 2 | mit | a3403a51a21ceade309af191278215c4c5244e69 | johnotander/ember-cli-gravatar,johnotander/ember-cli-gravatar,nightsh/ember-cli-libravatar,nightsh/ember-cli-libravatar | app/components/gravatar-image.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (angular){\n 'use strict';\n\n angular.module('app')\n .controller('counterController', counterController)\n .controller('todoController', todoController)\n\n\n counterController.$inject = []\n todoController.$in... | javascript | edit | 0 | 2 | mit | 249491be5cc87dc273ae48086b7deccfcbf777fb | haworku/angular-todo,haworku/angular-todo | controllers.js | rejected_duplicate | Near-duplicate of sample 84945 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node --harmony-async-await\n\nconst kamerbotchi = require('../index.js')\n\nconsole.log('KamerBOTchi v'+require('../package.json').version)\nconsole.log('Developed with <3 by Sander Laarhoven')\nconsole.log('https://git.i... | javascript | edit | 0 | 0 | mit | 47c887ad3090b772440c049d63e9d867d03ea61e | lesander/kamergotchi-bot,lesander/kamergotchi-bot | bin/global.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery'\nimport AnalyticsWrapper from \"../utilities/analytics_wrapper\";\n\nexport default (modal) => {\n $(document).on('click', '.finish.button', function () {\n chrome.runtime.sendMessage({ eventType: 'pop' ... | javascript | edit | 0 | 1 | isc | 2ea983793b5bb734954fa091be6a4579c4768203 | oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker | src/content_scripts/view/story_listener.js | rejected_duplicate | Near-duplicate of sample 80542 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Cron.js - in api/services\n\n\"use strict\";\nconst CronJob = require('cron').CronJob;\nconst _ = require('lodash');\n\nconst crons = [];\n\nmodule.exports = {\n start: () => {\n sails.config.scientilla.crons.forEach(cron =... | javascript | edit | 0 | 3 | mit | 40c6326cfd7a16f2643bf594d027a2b1dc4eda8f | scientilla/scientilla,scientilla/scientilla,scientilla/scientilla | api/services/Cron.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\n\nvar importCmd = () => {\n let files = fs.readdirSync(__dirname+'/../cmds/');\n let cmds = {};\n for(var i in files) {\n let ext = require(__dirname+'/../cmds/'+files[i]).cmds;\n for... | javascript | edit | 0 | 3 | bsd-2-clause | 141ac976ff38506cd68db5402d0a96fe0899abab | de-luca/Pinata,de-luca/Pinata | libs/cmd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @file Defines the provider settings.\n *\n * Will set the path to Mongo, and applications id\n * Most of the configuration can be done using system environment variables.\n */\n\n// Load environment variables from .env file\nvar... | javascript | edit | 0 | 0 | mit | 996398912fd327022bc934153cd58ee8b89e9393 | AnyFetch/gdrive-provider.anyfetch.com | config/configuration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport EmberObject from \"@ember/object\";\n\nimport config from \"fakturama/config/environment\";\n\nconst { APP: { FIREBASE, FIREBASE: { projectId } } } = config;\nconst { firebase } = window;\nconst app = firebase.initializeApp(FIREB... | javascript | edit | 0 | 1 | mit | ba850707c1f8031717bb75065c23345665328977 | cowbell/fakturama,cowbell/fakturama | app/lib/firebase_auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmol.modules.map.splash = function(mol) {\n\n mol.map.splash = {};\n\n mol.map.splash.SplashEngine = mol.mvp.Engine.extend(\n {\n init: function(proxy, bus) {\n this.proxy = proxy;\n ... | javascript | edit | 0 | 1 | bsd-3-clause | f37e42b6e9b33b2961239c52c58641eb959b9563 | MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL | app/js/mol.map.splash.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar bootState = {\n\n create: function () {\n\n //Initial GameSystem (Arcade, P2, Ninja)\n game.physics.startSystem(Phaser.Physics.ARCADE);\n\n //Initial Load State\n game.state.start('load');\n }\n};\n... | javascript | edit | 0 | 1 | mit | c76b85a5f14d036433ceede9de69cf041a64d2bc | bunchopunch/ludum-38,bunchopunch/ludum-38 | public/js/boot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function createApi (osm) {\n return {\n getMap: require('./get_map.js')(osm),\n getElement: require('./get_element.js')(osm),\n createElement: require('./create_element.js')(osm),\n createChangeset: require... | javascript | edit | 0 | 1 | bsd-2-clause | c0ca6b23053d338fd94f20a61c49b46634abb1fb | substack/osm-p2p-server,digidem/osm-p2p-server | api/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function() {\n\n\t// Export\n\treturn function(Prism) {\n\n\t\tPrism.languages.css = {\n\t\t\t'comment': /\\/\\*[\\w\\W]*?\\*\\//g,\n\t\t\t'atrule': /@[\\w-]+?(\\s+[^;{]+)?(?=\\s*{|\\s*;)/gi,\n\t\t\t'url': /url\\(([\"']?).*?\\1\\... | javascript | edit | 0 | 0 | mit | 1515fe0fbfb7dfb39f602da4d1d9051069ee8454 | apiaryio/prism | src/languages/css.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n\ndefine([], function () {\n\n\t'use strict';\n\n\treturn {\n\n\t\t'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',\n\t\t'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',\n\n\t\t'overpassServer': 'http://overpa... | javascript | edit | 0 | 1 | mit | ed784e014f5258c82efeea34740d17c2527ac868 | MapContrib/MapContrib,MapContrib/MapContrib,MapContrib/MapContrib | src/public/js/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add basic drawing functionality to test canvas is functional and behaving correctly"
},
{
"role": "assistant",
"content": "const canvas = document.getElementById('pong');\nconst context = canvas.getContext('2d');\n\nconst COL... | javascript | new_file | 0 | 1 | mit | c8c9d34c76811176d6c719527a69ec456005c0d2 | oliverbenns/pong,oliverbenns/pong | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ntracer._print('original array = [' + D.join(', ') + ']');\ntracer._sleep(1000);\ntracer._pace(500);\nfunction quicksort(low, high) {\n if (low < high) {\n var p = partition(low, high);\n quicksort(low, p - 1);\n ... | javascript | edit | 0 | 3 | mit | eafc8e98d29bd60db63ce1d3ffca5ff28bd8412f | archie94/AlgorithmVisualizer,archie94/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer | algorithm/sorting/quick/basic/code.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014-2016 CyberVision, Inc.\n * <p/>\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at... | javascript | edit | 0 | 2 | apache-2.0 | 5bd4af9d7a3ccfee9a347a0e6cdd6641e64fec79 | aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,aglne/kaa,vtkhir/kaa,vtkhir/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa | gh-pages-stub/public/js/process404.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Enable source map support\nrequire('source-map-support').install();\n\n// Polyfill Promise if necessary\nif (global.Promise === undefined) {\n require('es6-promise').polyfill();\n}\n\nvar program = require('co... | javascript | edit | 0 | 1 | mit | 39d14512e8bf4791d569fb417e01e82ddfbcfb63 | wKovacs64/pwned,wKovacs64/pwned | bin/pwned.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const TABS = [\n {\n name: 'latest',\n title: 'Nåtid',\n chartKind: 'bar',\n year: 'latest'\n },\n {\n name: 'chronological',\n title: 'Over tid',\n chartKind: 'stackedArea',\n year: 'all'\n },\n {\n ... | javascript | edit | 0 | 0 | mit | 812ac44c9e0e837a44651cd731e06d07b370976a | bengler/imdikator,bengler/imdikator | config/tabs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a... | javascript | edit | 0 | 2 | mit | cc912b3155cadd5915c26e5e2077c2432b0d346b | benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar aws = require('aws-sdk');\n\nmodule.exports = function() {\n\n\taws.config.update({\n\t\taccessKeyId: process.env.AWS_ACCESS_KEY_ID,\n\t\tsecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,\n\t\tregion: 'us-east-1'\n\t});\n\n\tretur... | javascript | edit | 0 | 3 | mit | bce6148287de314127188099c59c82ce79905156 | freeman-lab/tinycloud | lib/client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\r\n module.exports = concat\r\n\r\n var fs = require('fs')\r\n function concat(files, target, done){\r\n validateInputs(files, target, done)\r\n var writeStream = fs.createWriteStream(target, {flags: 'a'})\r\n w... | javascript | edit | 0 | 6 | mit | 27c8e704ab182ae6e2d6dfb39a64b8417c809680 | andreicioban/file-concat-stream | lib/concat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: 'Expressive, dynamic, robust CSS',\n version: \"2.0.0_511\"\n});\n\nPackage.registerBuildPlugin({\n name: 'compileStylusBatch',\n use: ['ecmascript', 'caching-compiler'],\n sources: [\n 'plugin/comp... | javascript | edit | 0 | 1 | mit | 06e38be848b204b60db34fac3f7adb50fa3d1e7a | joannekoong/meteor,msavin/meteor,lpinto93/meteor,meteor-velocity/meteor,DCKT/meteor,Theviajerock/meteor,deanius/meteor,SeanOceanHu/meteor,chasertech/meteor,Prithvi-A/meteor,mubassirhayat/meteor,yinhe007/meteor,udhayam/meteor,Theviajerock/meteor,hristaki/meteor,chiefninew/meteor,hristaki/meteor,aldeed/meteor,alexbeletsk... | packages/stylus/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst new_user = require('./new_user.js');\nconst patron_group = require('./patron_group.js');\n\nmodule.exports.test = function(uitestctx) {\n\n patron_group.test(uitestctx);\n new_user.test(uitestctx);\n\n}\n```\n\nApply this change... | javascript | edit | 0 | 1 | apache-2.0 | 856382581b137c3b2a9a0ed0efcc4fe60db5f1b5 | folio-org/ui-users,folio-org/ui-users | test/ui-testing/test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery.fn.dropkick = function ( opts, args ) {\n return $( this ).each(function() {\n if ( !opts || typeof opts === 'object' ) {\n new Dropkick( this, opts || {} );\n } else if ( typeof opts === 'string' ) {\n new Dropk... | javascript | edit | 0 | 5 | mit | b5ea8b96c1ae114220f45635c6e4bf783881964c | Robdel12/DropKick,GerHobbelt/DropKick,alex-riabenko/DropKick,Robdel12/DropKick,chrismoulton/DropKick,alexgleason/DropKick,acebalajadia/DropKick,chrismoulton/DropKick,spoonben/DropKick,alexgleason/DropKick,GerHobbelt/DropKick,acebalajadia/DropKick,alex-riabenko/DropKick | plugins/dropkick.jquery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar game = new Phaser.Game(Config.global.screen.width,\n\t\tConfig.global.screen.height, Phaser.Auto, 'game');\n\ngame.state.add('ludus-state', State.LudusSplash);\ngame.state.add('sponsor-state', State.SponsorSplash);\ngame.state.add('... | javascript | edit | 0 | 0 | mit | 2c1b02b96e19905bd21712e9ce4e1983a3a0e5b0 | jucimarjr/posueagames,jucimarjr/posueagames | renanbrg/dropstory/js/Main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport test from 'ava'\n\nimport authenticator from '../src/authenticator'\nimport testUsers from './util/testUsers'\n\nfunction localUsersRepository () {\n return {\n getUser(id) {\n const result = testUsers.find((user) => use... | javascript | edit | 0 | 2 | mit | 040d5d1f6ef2f582a0c5c2b8fe6263bb0c1b7c4d | goto-bus-stop/plug-auth | packages/plug-auth-server/test/authenticator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport constantCreator from '../lib/constantCreator'\n\nconst NavigateConstants = constantCreator('NAVIGATE', {\n START: null,\n FAILURE: null,\n SUCCESS: null\n})\n\nexport default NavigateConstants\n\n```\n\nApply this change: Add ... | javascript | edit | 0 | 0 | apache-2.0 | 86ee32602f9257790c2da7b4e84e2070ace5bfb7 | cesarandreu/bshed,cesarandreu/bshed | client/constants/NavigateConstants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Datastructure: Priority Queue.\n *\n *\n * This file provides the implementation of a Priority Queue. Smal... | javascript | edit | 0 | 1 | apache-2.0 | 8c86d8945458031b6164f110a3a59899f638ad37 | google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library | closure/goog/structs/priorityqueue.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport store from \"src/stores/Store.js\";\nimport app from \"src/reducers/App.js\";\n\ndescribe(\"store\", () => {\n\n it(\"should exist\", () => {\n store.should.exist;\n });\n\n it(\"should have all API methods\", () => {\n ... | javascript | edit | 0 | 1 | mit | 6336e7cd56c760d90ef63694ecea0eee529705a7 | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React | test/stores/Store.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar windowTest = require('./windowTest');\nvar elmTest = require('./elmTest');\nvar locationTest = require('./locationTest');\nvar storageTest = require('./storageTest');\n\nmodule.exports = function (browser) {\n var title =\n ... | javascript | edit | 0 | 2 | mit | bfac9b3caa74208d63b55a3f2dd0c364e8656e8a | rgrempel/elm-web-api,rgrempel/elm-web-api | test/src/mocha/browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\n/**\n * Internal dependencies\n */\nimport { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared... | javascript | edit | 0 | 1 | apache-2.0 | d9497da46e647f2ca9d6a2ad2f3fcf4d8c56c90d | GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp | assets/src/edit-story/elements/video/display.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Ajax = {\n get: function(uri) { }\n};\n\nvar Updater = Class.create({\n initialize: function(bookId) {\n this.bookId = bookId;\n setSample('<div id=\"title\"></div>');\n },\n \n run: function() {\n var book = Ajax.get(... | javascript | edit | 0 | 1 | mit | 00d96d49e368313190aad149d5f3de0f9a226149 | Manfred/moksi | examples/expected_invocation_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar CountStream = require('./countstream'); //<co id=\"callout-intro-countstream-index-1\" />\nvar countStream = new CountStream('book'); //<co id=\"callout-intro-countstream-index-2\" />\nvar http = require('http');\n\nhttp.get('http:/... | javascript | edit | 0 | 1 | mit | 0c1dc88e462e55ca7bae7afd085941abe5400ed1 | alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice | listings/intro/first-project/index.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 | 19d3b4ee7b416b219903ec2b2f42aedfc665c3b3 | RemoteHelper/client-mock-node | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nSpace.flux.BlazeComponent.extend(Donations, 'AppealForm', {\n\n events() {\n return [{\n 'keyup .appeal.form input': this._onInputChange,\n 'keyup .appeal.form .description': this._onInputChange,\n 'click .appeal.form... | javascript | edit | 0 | 2 | mit | 8805437d1b1c1e37f29223bbe2ef74920a719fc2 | meteor-space/donations,meteor-space/donations,meteor-space/donations | packages/app/source/client/components/appeals-editor/appeal-form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ApplicationAdapter from './application';\n\nexport default ApplicationAdapter.extend({\n\tgenerateIdForRecord: function(store, type, inputProperties) {\n\t return inputProperties.filePath.replace(/\\//gi, '.');\n\t}\n});\n```\n\... | javascript | edit | 0 | 0 | mit | eb85db3ed1dbd7f30ebc0a67777951c37dfe766e | pangratz/ember-twiddle,pangratz/ember-twiddle,vikram7/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,Gaurav0/ember-twiddle,vikram7/ember-twiddle,knownasilya/ember-twiddle,vikram7/ember-twiddle,pangratz/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-t... | app/adapters/gist-file.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar system = require('system');\nvar url = encodeURI(system.args[1]);\n\nvar page = require('webpage').create();\n\npage.open(url, function(status) {\n console.log(\"Status: \" + status);\n phantom.exit();\n});\n\n```\n\nApply this ch... | javascript | edit | 0 | 1 | apache-2.0 | 511d83a1612d0c348045bb0511bbd6ecc6cb01a7 | ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure | jenkins/seedDatabase.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst _ = require('underscore');\nconst DrawCard = require('../../drawcard.js');\nconst { Locations, CardTypes, EventNames } = require('../../Constants');\n\nclass ChasingTheSun extends DrawCard {\n setupCardAbilities() {\n th... | javascript | edit | 0 | 4 | mit | 0e149f3fe042b6c2aaed0ff8d97116624f148951 | gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki | server/game/cards/02.3-ItFC/ChasingTheSun.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @providesModule RNShare\n * @flow\n */\n'use strict';\n\nvar NativeRNShare = require('react-native').NativeModules.RNShare;\nvar invariant = require('invariant');\n\n/**\n * High-level docs for the RNShare iOS API can be written... | javascript | edit | 0 | 1 | mit | 3fbbec30b1bfd3f635becb3496481a187f29b7e3 | EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share | index.ios.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs');\nvar cheerio = require('cheerio');\nvar path = require('path');\n\nvar cheerioOptions = {xmlMode: true};\nvar files = process.argv.slice(2);\n\nfunction read(file) {\n var content = fs.rea... | javascript | edit | 0 | 1 | bsd-3-clause | 612a144c611549b6ceef9f59e2df0eb246d881d0 | jorgecasar/tools,imrehorvath/tools,Polymer/tools,Polymer/tools,imrehorvath/tools,Polymer/tools,jorgecasar/tools,Polymer/tools | concat-svg/concat-svg.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport browserSync from 'browser-sync';\n\nconst bs = browserSync.get('dev');\n\ngulp.task('connect:dev', ['styles'], (done) => {\n bs.init({\n notify: false,\n port: 9000,\n open: false,\n server:... | javascript | edit | 0 | 1 | mit | 5211ee14bd569729d8c5193a1684e495f649f16a | silvenon/generator-wbp,silvenon/generator-wbp | generators/app/templates/task/dev.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Declare app level module which depends on views, and components\nangular.module(\"myApp\", [\n \"ngRoute\",\n \"myApp.view1\",\n \"myApp.view2\",\n \"myApp.version\",\n \"ui.bootstrap\"\n]).\nconfig([\"$routeP... | javascript | edit | 0 | 1 | mit | 5bcd4d2b709128e9e908812279280d3e4fca5eca | mikar/cmis-browser,mikar/cmis-browser | app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This function toggle the locked state of a building\n * @param\t{number}\tindex\tIndex of the row to change\n */\nexport default function toggleBuildingLock(index) {\n if (l(`productLock${index}`).innerHTML === 'Lock') {\n G... | javascript | edit | 0 | 3 | mit | 65eff470cfe7e52ec3c778290dc0c20d046ee23a | Aktanusa/CookieMonster,Aktanusa/CookieMonster | src/Disp/buildingTiles/toggleBuildingLock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* \n * This file contains all of the Passport configuration that will\n * be used through the application for Facebook authentication.\n */\n\nvar FacebookStrategy = require('passport-facebook').Strategy;\nvar keys = require('./keys');... | javascript | edit | 0 | 4 | mit | ff4679095d924160e1ee69a1b1051bf846689dac | kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender | config/passportConfig.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs')\nvar path = require('path')\nvar argv = require('yargs')\n .alias('s', 'silent')\n .describe('s', 'print empty string instead of erroring out')\n .argv\n\nvar pkg = path... | javascript | edit | 0 | 6 | mit | 90fb58a96ea37dfe6c9e08e2248b833e60038093 | mattdesl/package-field | bin/cmd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport * as React from 'react';\nimport { Platform, StyleSheet, View } from 'react-native';\nimport { Screen, screensEnabled } from 'react-native-screens';\n\ntype Props = {\n isVisible: boolean,\n children: React.Node,... | javascript | edit | null | null | bsd-2-clause | 498ca98b2fad6e15fa2d65cd7fb461861158e839 | react-community/react-navigation,react-community/react-navigation,react-community/react-navigation | packages/bottom-tabs/src/views/ResourceSavingScene.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\"use strict\";\n\nconst aliases = {\n\th: \"help\",\n\t\"-h\": \"help\",\n\t\"/h\": \"help\",\n\tv: \"version\",\n\t\"-v\": \"version\",\n\tn: \"new\",\n\tb: \"build\"\n};\n\nlet command = process.argv[2] || \"help... | javascript | edit | 0 | 0 | mit | bc72cb413b3ebc308027ea9fb7191455a6005071 | LPGhatguy/guh,LPGhatguy/basis | bin/guh.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst childProcess = require('child_process');\nconst path = require('path');\n\nconst setup = require('setup/setup');\n\nfunction exec(command) {\n const run = childProcess.exec;\n return new Promise((resolve, reject) => {\n run(c... | javascript | edit | 0 | 3 | mit | 271c7b629d84c0fbe4fe0003cb49e07c8d8b5cf5 | ethancfchen/generator-nodena-api-php | generators/app/templates/gulp-tasks/build/composer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*Tell users to read the rules, \nwith a direct link to the channel,\nwhen they join.*/\nvar info = console.log.bind(console, \"[Welcomer]\");\n\nvar message = [\n \"Welcome to the server!\",\n \"We have rules that we'd like you t... | javascript | edit | 0 | 3 | mit | ce3b4d7c61fde7c4918205df77f7f009c2eb461c | izy521/Sera-PCMR | Welcomer/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport debugModule from \"debug\";\nconst debug = debugModule(\"debugger:web3:adapter\");\n\nimport Web3 from \"web3\";\n\nexport default class Web3Adapter {\n constructor(provider) {\n this.web3 = new Web3(provider);\n }\n\n asyn... | javascript | edit | 0 | 2 | mit | 100021f87e4401d94a034f15b917efb6d68b60e9 | ConsenSys/truffle | packages/truffle-debugger/lib/web3/adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = initializeData()\nvar ref = new Firebase(\"https://cepatsembuh.firebaseio.com\");\nvar no_antri = new Firebase(ref + '/no_antrian');\n\nfunction initializeData() {\n var right_now = document.getElementById(\"right_now\"... | javascript | edit | 0 | 1 | mit | 63dbcbe2fa8a1ca0fb1dbc1e4df928f11e52f45e | mercysmart/cepatsembuh-iqbal,mercysmart/cepatsembuh-iqbal | js/getData.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nimport NativeSelect from '@material-ui/core/NativeSelect'\n\nclass TimeSelect extends React.Component {\n render = () => {\n const topRight = { position: 'absolute', r... | javascript | edit | 0 | 1 | mit | 43d17915450f11cb928cbba68a7c08f7b1f31c87 | walles/weatherclock,walles/weatherclock,walles/weatherclock,walles/weatherclock | src/TimeSelect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: ['mocha', 'chai'],\n files: ['test/**/*.js', 'xterm-terminal.js'],\n reporters: ['progress'],\n port: 9876, // karma web server port\n colors: true,\n ... | javascript | edit | 0 | 1 | mit | 0d306907d1f2de812504af43fbaa360e070d720a | parisk/xterm-terminal,parisk/xterm-terminal | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n\nmodule.exports = function(config) {\n config.set({\n browserify: {\n debug: true,\n extensions: ['.ts'],\n plugin: [['tsify', JSON.parse(fs.readFileSync('./tsconfig.json', 'utf8')).compilerOp... | javascript | edit | 0 | 1 | mit | 5f6fec6b2548f2151291bb4d7876939c0271c5d6 | mapillary/mapillary-js,mapillary/mapillary-js | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"application\"], function(App) {\n App.EditProfileModalView = Ember.View.extend({\n actions: {\n save: function () {\n var person = this.get('controller.person')\n , personData = this.get('controller.pe... | javascript | edit | 0 | 1 | mit | 6424996e2bd5f6ba06443c8efc4f3ae13f7b2186 | mhs/t2-people,mhs/t2-people,mhs/t2-people | app/js/views/edit_profile_modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses th... | javascript | edit | 0 | 1 | apache-2.0 | fba020f9b26f4f8f8beefc925f219c5211174ea4 | xlongtang/cordova-last-photo-taken,xlongtang/cordova-last-photo-taken | www/last_photo_taken.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n\n server\n\n The backbone of the server module. In development, this runs proxied through\n BrowserSync server.\n\n @param {Object} options Options passed on to \"globals\"\n @param {Function} next Called when server successf... | javascript | edit | 0 | 1 | apache-2.0 | 908cee1e2d7a13863ff6b4dc0501f56e65eed958 | shippjs/shipp-server,shippjs/shipp-server | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { isEmpty, pickBy } = require('lodash')\n\nconst logger = require('../../../config/logger')\nconst { createZenDeskMessage, postToZenDesk } = require('./services')\n\nasync function postFeedback (req, res, next) {\n const { title,... | javascript | edit | 0 | 6 | mit | 400f41f87ae4d06db3d3c4e2b59dee40f4d06d0a | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend | src/apps/support/middleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n angular.module('civic.services')\n .constant('ConfigService', {\n serverUrl: 'http://localhost:3000/',\n mainMenuItems: [\n {\n label: 'Collaborate',\n state: 'coll... | javascript | edit | 0 | 1 | mit | 2d7da7b416b460aaa646e6662a622990bda1a07b | yanyangfeng/civic-client,yanyangfeng/civic-client,genome/civic-client,genome/civic-client | src/components/services/ConfigService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global angular */\nconst MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000};\n\nangular.module('dappChess').controller('MessagesCtrl', function ($scope) {\n $scope.messages = [];\n\n $scope.$on('message', function(even... | javascript | edit | 0 | 4 | mit | 54cb3847e205dff54c4f3490a15e659f81b0bb5a | ise-ethereum/on-chain-chess,ise-ethereum/on-chain-chess | app/javascript/messages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n var Beat = function ( dance, freq, threshold, decay, onBeat, offBeat ) {\n this.dance = dance;\n this.freq = freq;\n this.threshold = threshold;\n this.decay = decay;\n this.onBeat = onBea... | javascript | edit | 0 | 4 | mit | b752f54661aa11ea235ed6c092a2b41188685e68 | modulexcite/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,jsantell/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,modulexcite/dancer.js,hoboman313/dancer.js,hoboman313/dancer.js,suryasingh/dancer.js,suryasingh/dancer.js | src/beat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport getDailyRiderships from './get-daily-riderships';\nimport getRoute from './get-route';\nimport getRoutes from './get-routes';\nimport getServiceHourRiderships from './get-service-hour-riderships';\nimport getSystemTrends from './... | javascript | edit | 0 | 0 | mit | 989bd29938fe860ea862fe914254d1373a6422da | jga/capmetrics-web,jga/capmetrics-web | app/mirage/route-handlers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst analytics = {\n send: function(eventObject) {\n let analyticsPath;\n const path = require(\"path\");\n if (typeof BUNDLE_ANALYTICS_FILENAME != \"undefined\") {\n analyticsPath = path.join(__dirname, BUNDLE_ANALYTICS... | javascript | edit | 0 | 2 | mit | 2d61e31acdc66a57107ef4198f9641f0b18b2d13 | ConsenSys/truffle | packages/truffle-core/lib/services/analytics/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport socketCluster from 'socketcluster-client';\nimport socketOptions from '../constants/socketOptions';\n\nlet socket;\nlet channel;\n\nexport function subscribe(subscriber, options) {\n if (socket) socket.disconnect();\n socket = ... | javascript | edit | 0 | 2 | mit | c40a5137dd0236ff6a9ad4ebfda4071381f3fd9a | zalmoxisus/remotedev-app,zalmoxisus/remotedev-app | src/app/services/messaging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createGlobalStyle } from 'styled-components'\n\nexport default createGlobalStyle`\n body {\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n font-family: ${props => props.theme.fonts.sans};\n b... | javascript | edit | 0 | 0 | mit | cfaa1420009e4525aa74f7374c04adb0d29721b4 | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | src/v2/components/UI/Layouts/BlankLayout/components/BaseStyles/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\n\nvar opts = parseOptions(process.argv[2]);\n\nrequest(opts, function (err, res, body) {\n if (err) throw new Error(err);\n\n var format = '[%s]: %s %s %s %s';\n\n for (var i ... | javascript | edit | 0 | 3 | mit | 92a92cdbf9a25aa4afa6b5d7983ec5d4c9738747 | jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts | gevents.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport _ from 'lodash';\nimport minimatch from \"minimatch\";\n\nlet allFiles = {}\n\nmodule.exports.helpers = {\n\tequal(lvalue, rvalue, options) {\n\t\tif (arguments.length < 3)\n\t\t\tthrow new Error(\"Handl... | javascript | edit | 0 | 3 | apache-2.0 | ecca67b6eb571673adca35cf952b5e3bcaa01832 | stellar/developers,stellar/developers | gulp/handlebars.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($){\n\t$.entwine('ss', function($){\n\n\t\t$('select.dependentdynamiclistdropdown').entwine({\n\t\t\tonmatch : function(){\n\t\t\t\tvar self = $(this),\n\t\t\t\t\tdependentOn = $('select[name=' + self.data('dependenton') + ']'... | javascript | edit | 0 | 5 | bsd-3-clause | fbda3cfcb96e7cb8b5535fcb8985b942b7f0606d | sheadawson/silverstripe-dynamiclists,sheadawson/silverstripe-dynamiclists | javascript/DependentDynamicListDropdownField.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { PropTypes } from 'react';\n\nexport default {\n message: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ]).isRequired,\n action: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string\n ]),\... | javascript | edit | 0 | 0 | mit | dbc6e45a1b2c8de616f1d28646c388951125d241 | pburtchaell/react-notification | src/defaultPropTypes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as React from 'react'\nimport {Octicon as OcticonClass} from './octicon'\nimport {Link} from 'react-router'\n\nlet Octicon = React.createFactory(OcticonClass);\n\nlet GameNavbar = React.createClass({\n\trender() {\n\t\treturn R... | javascript | edit | 0 | 1 | mit | c79d4fee907c01e8a1acb8d33fbac5be67493f9f | hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy | app/components/game-nav.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n babel: {\n options: {\n sourceMap: true,\n presets: ['es2015', 'react']\n },\n dist: {\n fi... | javascript | edit | 0 | 1 | mit | e8d94d83d8f78d5407aca3f3609b68b375ffb667 | muffinista/before-dawn,muffinista/before-dawn,muffinista/before-dawn | app/Gruntfile.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.