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 getInterpolation = require('interpolation-builder');\nvar createTransitions = require('./createTransitions');\n\nmodule.exports = function(driver, states, transitions) {\n\n // go through each transition and setup kimi with a funct... | javascript | edit | 0 | 4 | mit | 2861764dfaff112ccea7a574ccf75710528b1b9f | Jam3/f1 | lib/transitions/parseTransitions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar getThat = {};\n\ngetThat.controller = function() {\n\n};\n\ngetThat.header = function() {\n return m('.row', [\n m('.col-md-10', [\n m('.jumbotron', [\n m('h1', [\n m('a[href=\"... | javascript | edit | 0 | 1 | mit | 591b86fc35858a16337b6fcd75c9575770eaa68a | chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy | static/js/front.js | rejected_duplicate | Near-duplicate of sample 79222 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar App;\n\nmodule(\"Acceptances - Index\", {\n setup: function(){\n var sampleDataUrl = '';\n\n if (typeof __karma__ !== 'undefined')\n sampleDataUrl = '/base';\n\n sampleDataUrl = sampleDataUrl + '/tests/support/api.jso... | javascript | edit | 0 | 2 | mit | 7421477c92380fa88a3910e4707046ce9daf5a71 | rwjblue/ember-live-api | tests/acceptance/sidebar_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n $('.accordion_head').each( function() {\n $(this).after('<ul style=\"display: none;\"></ul>');\n });\n\n $(document).on(\"click\", '.accordion_head', function() {\n var ul = $(this).next();\n if (ul.text() =... | javascript | edit | 0 | 2 | mit | dc3c20f6dbfddb315932a49d6f7a54e5d8b1043d | yohoushi/yohoushi,yohoushi/yohoushi,yohoushi/yohoushi | app/assets/javascripts/accordion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nLetterpress.Collections.Pages = new Mongo.Collection('pages');\nLetterpress.Collections.Pages.before.insert(function (userId, doc) {\n doc.path = doc.path || doc.title.replace(/ /g, '-').toLowerCase();\n if (doc.path[0] !== '/') {\n ... | javascript | edit | 0 | 3 | mit | fb9d61439a75481c1f1d9349f6f0cda2eaf02d6c | liangsun/Letterpress,dandv/Letterpress,shrop/Letterpress,FleetingClouds/Letterpress,chrisdamba/Letterpress,chrisdamba/Letterpress,cp612sh/Letterpress,nhantamdo/Letterpress,nhantamdo/Letterpress,shrop/Letterpress,xolvio/Letterpress,chrisdamba/Letterpress,cp612sh/Letterpress,dandv/Letterpress,dandv/Letterpress,FleetingCl... | collections/server/collections.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar context = require('vm').createContext({\n\toptions: {\n\t\tserver: true,\n\t\tversion: 'dev'\n\t},\n\tCanvas: require('canvas'),\n console: console,\n\trequire: require,\n\tinclude: function(uri) {\n\t\tvar source = require('fs')... | javascript | edit | 0 | 3 | mit | 25cb4a7dd16e4dd3235ade582e78dab5afa72883 | superjudge/paper.js,iconexperience/paper.js,byte-foundry/paper.js,iconexperience/paper.js,byte-foundry/paper.js,proofme/paper.js,JunaidPaul/paper.js,Olegas/paper.js,luisbrito/paper.js,superjudge/paper.js,Olegas/paper.js,JunaidPaul/paper.js,lehni/paper.js,legendvijay/paper.js,fredoche/paper.js,proofme/paper.js,rgordeev/... | src/loadNode.js | rejected_duplicate | Near-duplicate of sample 102742 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Dependencies\nvar request = require('request');\n\n//Define\nmodule.exports = function(group, rank, callbacks) {\n request.get('http://www.roblox.com/api/groups/' + group + '/RoleSets/', function(err, res, body) {\n if (callbacks... | javascript | edit | 0 | 6 | mit | 08f1f9d972bdd71891e7e24a529c44fae1bfa687 | FroastJ/roblox-js,OnlyTwentyCharacters/roblox-js,sentanos/roblox-js | lib/util/getRoles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @babel */\n\nimport TabStop from './tab-stop';\n\nclass TabStopList {\n constructor (snippet) {\n this.snippet = snippet;\n this.list = {};\n }\n\n get length () {\n return Object.keys(this.list).length;\n }\n\n findO... | javascript | edit | 0 | 2 | mit | 7a5dffb138349c3e6b2a1503fc6a6c82877c0bdc | atom/snippets | lib/tab-stop-list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Snoocore = require('snoocore');\n\nvar pkg = require('../../package.json');\n\nvar uaString = \"QIKlaxonBot/\" + pkg.version + ' (by /u/StuartPBentley)';\n\nmodule.exports = function(cfg, duration, scopes){\n return new Snoocore({\... | javascript | edit | 0 | 2 | mit | cf765d21e235c686ef2546cf24e5399ea6e348c2 | stuartpb/QIKlaxonBot,stuartpb/QIKlaxonBot | lib/reddit/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nList = new Meteor.Collection( 'List' );\n\nList.allow({\n insert: (userId, document) => true,\n update: (userId, document) => document.owner_id === Meteor.userId(),\n remove: (userId, document) => false\n});\n\nList.deny({\n ... | javascript | edit | 0 | 4 | mit | 61a0a3c5b600bc3b52d006aba46a4d144d4ab0dd | lnwKodeDotCom/WeCode,lnwKodeDotCom/WeCode | collections/List.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { merge } from '@ember/polyfills';\nimport { run } from '@ember/runloop'\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n ... | javascript | edit | 0 | 1 | apache-2.0 | b57115294999bc2292ccee19c948bbf555fd6077 | ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend | tests/helpers/start-app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { format } from 'prettier'\nimport HTMLtoJSX from 'htmltojsx'\n\nimport { renderToString } from 'fela-tools'\n\nimport type { DOMRenderer } from '../../../flowtypes/DOMRenderer'\n\nfunction formatCSS(css) {\n return format(css, ... | javascript | edit | null | null | mit | 50ebf1fdca04c6472f9c1d1eef0b6c2341ecaafa | rofrischmann/fela,risetechnologies/fela,risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela | packages/jest-fela-bindings/src/createSnapshotFactory.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport colors from 'colors/safe';\n\nexport function printDebug() {\n console.log(...arguments);\n const fileLogger = require('browser/utils/file-logger');\n fileLogger.writeLog(...arguments);\n}\n\nexport function printError(namespa... | javascript | edit | 0 | 2 | mit | a3d8e35c1b438bfe7671375aca48863ca91acc90 | Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,Aluxian/Messenger-for-Desktop,Aluxian/Messenger-for-Desktop | src/scripts/browser/utils/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Highlight, { defaultProps } from 'prism-react-renderer';\nimport darkTheme from 'prism-react-renderer/themes/duotoneDark';\n\nconst InlineCode = ({ children, className, additionalPreClasses, theme }) =... | javascript | edit | 0 | 3 | mit | 42d206a5364616aa6b32f4cc217fcc57fa223d2a | sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system | src/components/markdown-render/inlineCode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { connect } from 'react-redux'\nimport { compose } from 'recompose'\nimport { getEncryptedWIF } from '../../../modules/generateEncryptedWIF'\n\nimport EncryptQR from './EncryptQR'\n\nconst mapStateToProps = (state: Ob... | javascript | edit | null | null | mit | 2a9b5a4077ea3d965b6994c9d432c3d98dc839ca | hbibkrim/neon-wallet,CityOfZion/neon-wallet,CityOfZion/neon-wallet,hbibkrim/neon-wallet,CityOfZion/neon-wallet | app/components/Settings/EncryptQR/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.BattleScripts = {\n\tinherit: 'gen5',\n\tgen: 3,\n\tinit: function () {\n\t\tfor (var i in this.data.Pokedex) {\n\t\t\tdelete this.data.Pokedex[i].abilities['H'];\n\t\t}\n\t\tvar specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, ... | javascript | edit | 0 | 6 | mit | c5ff8e77c877ca00463ac7760c2b242ea8055fb4 | Pikachuun/Joimmon-Showdown,Pikachuun/Joimmon-Showdown | mods/gen3/scripts.js | rejected_duplicate | Near-duplicate of sample 107022 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * To use this module, add youtube.key to your config.json\n * You need the key for the Youtube Data API:\n * https://console.developers.google.com/apis/credentials\n */\nvar yt = require( 'youtube-search' );\nmodule.exports = {\n\... | javascript | edit | 0 | 2 | isc | 09f1a06bb726af840ced3c4e3d0e1cd3e2794025 | zuzakistan/civilservant,zuzakistan/civilservant | modules/youtube.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isParentNode = require('dom-ext/parent-node/is')\n , isStyleSheet = require('html-dom-ext/link/is-style-sheet')\n\n , forEach = Array.prototype.forEach;\n\nmodule.exports = function (nodes) {\n\tvar styleSheets = ... | javascript | edit | 0 | 5 | mit | 4a51369bf5b24c263ceac5199643ace5597611d3 | medikoo/site-tree | lib/assure-seamless-styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Model to representing a TileJSON endpoint\n * See https://github.com/mapbox/tilejson-spec/tree/master/2.1.0 for details\n */\ncdb.admin.TileJSON = cdb.core.Model.extend({\n\n idAttribute: 'url',\n\n url: function() {\n retu... | javascript | edit | 0 | 2 | bsd-3-clause | 3d9fc84c280ed14cfd980ca443c30a4a30ecffd5 | future-analytics/cartodb,splashblot/dronedb,dbirchak/cartodb,DigitalCoder/cartodb,dbirchak/cartodb,thorncp/cartodb,raquel-ucl/cartodb,DigitalCoder/cartodb,DigitalCoder/cartodb,raquel-ucl/cartodb,thorncp/cartodb,splashblot/dronedb,future-analytics/cartodb,DigitalCoder/cartodb,nyimbi/cartodb,CartoDB/cartodb,nuxcode/carto... | lib/assets/javascripts/cartodb/models/tile_json_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// An abstract base model representing a player in a game\nfunction Player(args) {\n // The name of the player (e.g. 'Human 1')\n this.name = args.name;\n // The player's chip color (supported colors are black, blue, and red)\n this... | javascript | edit | 0 | 1 | mit | 5b867ada55e138a1a73da610dc2dec4c98c8b442 | caleb531/connect-four | app/scripts/models/player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { exec } = require('@actions/exec');\nconst getWorkspaces = require('get-workspaces').default;\n\nasync function execWithOutput(command, args, options) {\n let myOutput = '';\n let myError = '';\n\n return {\n code: await ex... | javascript | edit | 0 | 1 | mit | 577b1add3cd2804dbf4555b0cbadd45f8f3be761 | davidkpiano/xstate,davidkpiano/xstate,davidkpiano/xstate | .github/actions/change-release-intent/main.js | rejected_duplicate | Near-duplicate of sample 78720 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $(\"#related\").click(function(){\n $.post(\"http://localhost:8080/dummy_backend.php\",\n {\n related: \"true\"\n },\n function(){\n });\n //alert(\"... | javascript | edit | null | null | mit | 88f9da77f9865f1f093792bf4dace8ea5ab59d8b | BrandonBaucher/website-optimization,BrandonBaucher/website-optimization,BrandonBaucher/website-optimization,BrandonBaucher/website-optimization,BrandonBaucher/website-optimization | frontend/frontend.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const queryLogs = ({ Page, PageSize } = {}) => ({\n method: 'get',\n url: 'logs/auth',\n params: { Page, PageSize }\n});\n\nexport const clearLogs = () => ({\n method: 'delete',\n url: 'logs/auth'\n});\n\n```\n\nAp... | javascript | edit | 0 | 1 | mit | 976aed3d7a14c176e369ceb600baf61260daeed2 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/shared/lib/api/logs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport dEqual from 'fast-deep-equal';\n\n// Compares two possible objects\nexport function compareKbdCommand(c1, c2) {\n return dEqual(c1, c2);\n}\n\n```\n\nApply this change: Handle array case in keyboard command comparison"
},
{
... | javascript | edit | 0 | 2 | mit | efe31ffd074aa24cb6d92fdb265fdcb7bbccbc30 | reblws/tab-search,reblws/tab-search | src/core/keyboard/compare.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar ds = require('./discovery')\nvar rb = require('./rubygems')\nvar sc = require('./scrape')\n\n\nvar WebSocketServer = require('ws').Server\nvar wss = new WebSocketServer({host: 'localhost', port: 3001})\nvar clients = {}\n\nwss.on(... | javascript | edit | 0 | 4 | mit | af6314d64914d4450ceabb197b2c451e97ac2a62 | simov/rubinho,simov/rubinho | server/websocket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nuser_pref(\"accessibility.typeaheadfind\", 1);\nuser_pref(\"browser.fixup.alternate.enabled\", false);\nuser_pref(\"browser.newtab.url\", \"https://www.google.co.nz\");\nuser_pref(\"browser.pocket.enabled\", false);\nuser_pref(\"browser... | javascript | edit | 0 | 0 | mit | 145b8c979cb7800cf3eb6ff2ad30037e4b19c51d | craighurley/dotfiles,craighurley/dotfiles,craighurley/dotfiles | applications/firefox/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2017 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ma... | javascript | edit | 0 | 1 | apache-2.0 | 0f875085def889ae65b834c15f56109fc2363e7a | Skyscanner/backpack,Skyscanner/backpack,Skyscanner/backpack | packages/bpk-docs/src/pages/ShadowsPage/ShadowsPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar AWSResource = require('../awsresource')\n , types = require('../types');\n\nvar Role = AWSResource.define('AWS::IAM::Role', {\n AssumeRolePolicyDocument : { type: types.object('iam-assume-role-policy-document'), required: true... | javascript | edit | 0 | 3 | apache-2.0 | 775ac532cd1fab831b679955226e205c97dceaf0 | aliak00/kosmo,comoyo/nova,comoyo/nova,aliak00/kosmo | novaform/lib/resources/iam.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2019, Google, Inc.\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\n * http://www.a... | javascript | edit | 0 | 2 | apache-2.0 | d1909fc22d1c94772b51c9fb1841c4c5c10808a1 | actions-on-google/smart-home-frontend,actions-on-google/smart-home-frontend | src/device-types/device-type.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nevents = {};\n\nevents.beforeInsert = function() {\n // Find a class on which the behavior had been set.\n var behaviorData = Astro.utils.behaviors.findBehavior(this.constructor, 'timestamp');\n\n // If the \"hasCreatedField\" option... | javascript | edit | 0 | 3 | mit | f86c39497502954b6973702cf090e76fa3ddf463 | jagi/meteor-astronomy-timestamp-behavior | lib/behavior/events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert'),\n Batch = require('batch'),\n getStylesData = require('style-data'),\n getStylesheetList = require('list-stylesheets'),\n getHrefContent = require('href-content');\n\nmodule.e... | javascript | edit | 0 | 2 | mit | 7a71a7d998fb8cf1753b278641f245da9fad7fd9 | jonkemp/extract-css,jonkemp/extract-css | index.js | rejected_duplicate | Near-duplicate of sample 96061 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Rule: All properties should be in alphabetical order..\n */\n/*global CSSLint*/\nCSSLint.addRule({\n\n //rule information\n id: \"order-alphabetical\",\n name: \"Alphabetical order\",\n desc: \"Assure properties are i... | javascript | edit | 0 | 2 | mit | 2a75bf909aadb7cb754e40ff56da1ac19fbc6533 | YanickNorman/csslint,SimenB/csslint,lovemeblender/csslint,malept/csslint,codeclimate/csslint,dashk/csslint,SimenB/csslint,scott1028/csslint,Arcanemagus/csslint,sergeychernyshev/csslint,scott1028/csslint,malept/csslint,codeclimate/csslint,lovemeblender/csslint,dashk/csslint,sergeychernyshev/csslint,YanickNorman/csslint,... | src/rules/order-alphabetical.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global require, module, process, console, __dirname */\n/* jshint -W097 */\nvar\n mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\nvar MediaSchema = new Schema({\n name: String,\n description: String,\n ur... | javascript | edit | 0 | 0 | mit | 3d28029aaed853c2a20e289548fea4a325e8d867 | mosaiqo/frontend-devServer | src/modules/api/models/Media.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* NewsFeedContainer.js\n * Container for our NewsFeed as a view \n * Dependencies: ActionTypes\n * Modules: NewsActions, and NewsFeed\n * Author: Tiffany Tse\n * Created: July 29, 2017\n */\n//import dependencie\nimport { connect } fro... | javascript | edit | null | null | mit | d126cd694e312aa862a2d0d0260e6974ea7cd6f6 | titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone | src/containers/NewsFeedContainer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mockCreate = jest.fn()\njest.mock('@/services/api/users', () => ({ create: mockCreate }))\n\nimport { createStore } from '>/helpers'\n\ndescribe('users', () => {\n beforeEach(() => jest.resetModules())\n\n let storeMocks\n let ... | javascript | edit | 0 | 1 | mit | cd27c9c88623f0659fb0a58b59add58e26461fb0 | yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend | src/store/modules/users.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2020\n */\n\nimport currency from 'currency.js';\nimport { LANGUAGE_CODES } from '.';\n\nconst CURRENCY_CONFIGS = {\n DEFAULT: {\n decimal: '.',\n separator: ',',\n pa... | javascript | edit | 0 | 2 | mit | 5ae40aeffa9358825ce6043d4458130b45a090a7 | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | src/localization/currency.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n port: 3001,\n {{#notServer}}server: true,\n startPath: {{#lib}}\"demo.html\"{{/lib}}{{#client}}\"index.html\"{{/client}},\n {{/notServer}}files: [ 'build/*'{{#lib}}, 'demo.html'{{/lib}}{{#server}}, \"src/views/i... | javascript | edit | null | null | mit | c766b6c025278b79a6e9daaaeb7728bb59ede9c9 | maxkfranz/slush-js,maxkfranz/slush-js | template/browser-sync.config.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar rows = 0;\nvar cols = 10;\nvar table;\nvar edit_border = \"thin dotted grey\";\n\nfunction text(str)\n{\n return document.createTextNode(str);\n}\n\nfunction cellContents(rowindex, colindex)\n{\n return \" \";\n}\n\nfunct... | javascript | edit | 0 | 4 | mit | c28b11a967befef52d4378f4ee2c74e805ce8774 | seemuth/waveforms | waveform.js | rejected_duplicate | Near-duplicate of sample 73574 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport getRandomValues from 'get-random-values';\n\nexport const getRandomString = (length) => {\n const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let i;\n let result = '';\n\n const value... | javascript | edit | 0 | 4 | mit | a2c7b0b92c4d12e0a74397a8099c36bdde95a8ff | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/shared/lib/helpers/string.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \"sourceType\": \"module\"\n },\n ... | javascript | edit | 0 | 0 | apache-2.0 | 090b36392e1549c44108b300f3bb86bf72f79164 | ailijic/era-floor-time,ailijic/era-floor-time | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar File = require('vinyl');\nvar mix = require('mix');\nvar path = require('path');\nvar rimraf = require('rimraf');\nvar vfs = require('vinyl-fs');\n\nmodule.exports = function (dir) {\n var pending = [];\n\n function schedule(w... | javascript | edit | 0 | 2 | mit | 2669a19d55bcc27ca8b9a47667e2664f24a8aadf | byggjs/bygg,byggjs/bygg-plugins | mix-write/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (PIXI) {\n 'use strict';\n\n var stage = new PIXI.Stage(0x66FF99);\n var renderer = PIXI.autoDetectRenderer(400, 300);\n document.body.appendChild(renderer.view);\n\n window.requestAnimationFrame(animate);\n\n var textur... | javascript | edit | 0 | 5 | isc | 0da9f19684e830eb0a704e973dfb8ec1358d6eaf | ThibWeb/browser-games,ThibWeb/browser-games | pixi/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar coffee = require('coffee-script/register'),\n express = require('express'),\n assets = require('connect-assets'),\n logfmt = require('logfmt'),\n app = express();\n\nvar port = Number(process.env.PORT ||... | javascript | edit | 0 | 0 | mit | 29f1e731c1e7f153284f637c005e12b0aeb9a2f5 | GeoSensorWebLab/asw-workbench,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench | web.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(gulp, config) {\n var jshint = require('gulp-jshint');\n var stylish = require('jshint-stylish');\n var jscs = require('gulp-jscs');\n var logger = require('../utils/logger');\n\n gulp.task('av:lint', func... | javascript | edit | 0 | 7 | mit | c2936f41aa6ae9dbd5b34106e8eff8f2bbe4b292 | Availity/availity-limo | gulp/tasks/lint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global require: false, console: false */\n(function () {\n \"use strict\";\n var proxy = require(\"./proxy/proxy\"),\n server = require(\"./server/server\"),\n cprocess = require('child_process');\n\n var port =... | javascript | edit | 0 | 2 | mit | 36378676c7b5fc35fb84def2ddee584e376b2bb9 | busykai/ws-rpc,busykai/ws-rpc | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst redis = require(\"redis\")\nconst client = redis.createClient()\n\nclass Cache {\n /**\n * Retrieve an unexpired cache entry by key.\n * @param {String} key of the cache entry\n * @returns {Promise}\n */\n get(key) {\n ... | javascript | edit | 0 | 2 | mit | 943cbe5cb8e1ca0d2fc10dd04d6c300d60e34da3 | KevinMidboe/seasonedShows,KevinMidboe/seasonedShows,KevinMidboe/seasonedShows,KevinMidboe/seasonedShows | seasoned_api/src/cache/redis.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar visitors = require('./vendor/fbtransform/visitors').transformVisitors;\nvar transform = require('jstransform').transform;\n\nmodule.exports = {\n transform: function(code) {\n return transform(visitors.react, co... | javascript | edit | 0 | 3 | bsd-3-clause | 5106b793f76f2ba226420e5e5078d35796487d39 | bspaulding/react,JasonZook/react,jkcaptain/react,jlongster/react,rickbeerendonk/react,edmellum/react,kakadiya91/react,edvinerikson/react,joaomilho/react,jordanpapaleo/react,zyt01/react,gj262/react,blue68/react,jquense/react,rricard/react,ashwin01/react,trueadm/react,usgoodus/react,DJCordhose/react,andrescarceller/react... | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport models from '../models';\nimport express from 'express';\nimport _ from 'lodash';\n\nlet router = express.Router();\n\nconst defaults = {\n limit: 10,\n page: 1,\n category: null\n};\n\nrouter.get('/', (req, res) => {\n let p... | javascript | edit | 0 | 2 | mit | 0332a515299bb4325e8ba97640b25ec5d5b9e35c | sabarasaba/moviez.city-server,sabarasaba/moviezio-server,sabarasaba/moviez.city-server,sabarasaba/moviezio-server | controllers/movies.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: feat: Introduce main React component DOM injector"
},
{
"role": "assistant",
"content": "'use strict';\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\n\n// Top-level React (pure functional) comp... | javascript | new_file | 0 | 1 | mit | 7c422706dc38f151a0cf2c1172c1371f4ccbcf9f | IsenrichO/DaviePoplarCapital,IsenrichO/DaviePoplarCapital | app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nsteal('can/util/mvc.js')\n.then('funcunit/qunit', \n\t 'can/test/fixture.js')\n.then(function() {\n\t// Set the test timeout to five minutes\n\tQUnit.config.testTimeout = 300000;\n})\n.then('./mvc_test.js',\n\t 'can/construct/construc... | javascript | edit | 0 | 5 | mit | 359aedc53fb580fdccccd95bf9d8a339ae72720d | rjgotten/canjs,gsmeets/canjs,airhadoken/canjs,tracer99/canjs,bitovi/canjs,dimaf/canjs,azazel75/canjs,rjgotten/canjs,shiftplanning/canjs,juristr/canjs,rasjani/canjs,janza/canjs,mindscratch/canjs,patrick-steele-idem/canjs,WearyMonkey/canjs,ackl/canjs,schmod/canjs,whitecolor/canjs,beno/canjs,tracer99/canjs,whitecolor/canj... | test/can_test.js | rejected_duplicate | Near-duplicate of sample 94292 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('Gistter')\n\n.config([$routeProvider, function($routeProvider) {\n $routeProvider\n\n .when('/', {\n controller: 'TwitterController',\n templateUrl: 'templates/index/index.html'\n });\n\n}]);\n\n```\n\nA... | javascript | edit | 0 | 1 | mit | d70463cd29560573006a61b9b558de2db84bbce4 | Thrashmandicoot/Gistter,Thrashmandicoot/Gistter | javascript/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar width = 500, height = 250;\nvar container = d3.select('#decorate-bars')\n .append('svg')\n .attr({'width': width, 'height': height});\n\nvar dataGenerator = fc.data.random.financial()\n .startDate(new Date(2014, 1, 1));\nva... | javascript | edit | 0 | 1 | mit | 75baec7f3797772247970f7e3842764880ae5d93 | alisd23/d3fc-d3v4,djmiley/d3fc,alisd23/d3fc-d3v4,alisd23/d3fc-d3v4,djmiley/d3fc,djmiley/d3fc | site/src/components/introduction/decorate-bars.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar url = 'http://127.0.0.1:8000/'; // This should be local webserver\nvar capabilities = {\n 'browserName': 'firefox'\n},\nif (process.env.TRAVIS) {\n url = 'https://b3ncr.github.io/angular-xeditable/' // Change to your dev serve... | javascript | edit | 0 | 0 | mit | ebe11b9a7ffcc865ebf7218bd8679e0adc0c9a59 | B3nCr/angular-xeditable,B3nCr/angular-xeditable | protractor-conf.js | rejected_duplicate | Near-duplicate of sample 77674 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar minimist = require('minimist');\n\nif (process.argv.length < 3) {\n printUsage();\n process.exit(1);\n}\n\nvar command = process.argv[2];\nvar args = minimist(process.argv.slice(3));\nvar pwd = process.cwd()... | javascript | edit | 0 | 1 | apache-2.0 | 2ee0d06764f0033c767d2a143dd8b6e59e58006c | rustbridge/neon-cli,dherman/rust-bindings,dherman/neon-cli,neon-bindings/neon-cli,dherman/rust-bindings,rustbridge/neon,rustbridge/neon,neon-bindings/neon,neon-bindings/neon,neon-bindings/neon,rustbridge/neon,rustbridge/neon,dherman/neon-cli,neon-bindings/neon-cli,dherman/nanny,rustbridge/neon,neon-bindings/neon,neon-b... | bin/cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nIonLoading = {\n show: function (userOptions) {\n var userOptions = userOptions || {};\n var options = _.extend({\n delay: 0,\n duration: null,\n customTemplate: null,\n backdrop: false\n }, userOptions);\n... | javascript | edit | 0 | 4 | mit | 5d47571ac1c7e72b2772af48b3a260fb5e08b441 | gnmfcastro/meteor-ionic,ludiculous/meteor-ionic,kalyneramon/meteor-ionic,JoeyAndres/meteor-ionic,kabaros/meteor-ionic,txs/meteor-wecare-ionic-flow,Tarang/meteor-ionic,kalyneramon/meteor-ionic,zhonglijunyi/meteor-ionic,vieko/meteor-ionic,kabaros/meteor-ionic,txs/meteor-wecare-ionic-flow,zhonglijunyi/meteor-ionic,kevohag... | components/ionLoading/ionLoading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2017-present, Callstack.\n * All rights reserved.\n *\n * MIT License\n *\n * Copyright (c) 2017 Mike Grabowski\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software ... | javascript | edit | 0 | 2 | mit | a1129daa792c56b88db0ae2248e522b458aec0d8 | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit | tools/middleware/liveReloadMiddleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction checkPathParsed (uri) {\n if (uri.charAt(uri.length-1) === '/') {\n uri = uri.slice(0, -1);\n }\n if (path.charAt(0) !== '/') {\n path = '/' + path;\n }\n var myUrl = parseURL(uri);\n return myUrl.pathname;\n}\n\n... | javascript | edit | 0 | 3 | mit | 0313d0563f2f5d12932808ed54d4ba14b8a001fd | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/main/web/florence/js/functions/_checkPathParsed.js | rejected_duplicate | Near-duplicate of sample 68462 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-border-radius/package.json')\nvar moduleCss = f... | javascript | edit | 0 | 0 | mit | 6e34d25b98fda1cd249817bfe829583848e732dc | tachyons-css/tachyons,cwonrails/tachyons,fenderdigital/css-utilities,getfrank/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,topherauyeung/portfolio,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io | lib/border-radius.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global module:false*/\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n // Metadata.\n pkg: grunt.file.readJSON('package.json'),\n banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.... | javascript | edit | 0 | 1 | mit | 094204663537a8f9f631de79c0f98dc447029448 | ShoppinPal/ng-mobile-menu,Malkiat-Singh/ng-mobile-menu,ShoppinPal/ng-mobile-menu,Malkiat-Singh/ng-mobile-menu | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (grunt) {\n\n // Load grunt tasks automatically\n require('load-grunt-tasks')(grunt);\n\n // Configure tasks\n grunt.initConfig({\n\n // Project settings\n project: {\n app: 'app... | javascript | edit | 0 | 1 | mit | 2055de5634fb1daa265ca5c1845ea0b247330ea7 | thewildandy/life-graph | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BaseResolver from './BaseResolver';\nimport { STRING } from '../parsers/Types';\n\n/**\n * @classdesc Options resolver for command parameter definitions.\n * @extends BaseResolver\n */\nexport default class ParameterResolver exte... | javascript | edit | 0 | 2 | mit | 82964068366aa00f4ffc768058eed8b423450aca | hkwu/ghastly | src/resolvers/ParameterResolver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-contrib-watch');\n grunt.loadNpmTasks('grunt-browserify');\n\n grunt.registerTask('default', ['browserify']);\n\n grunt.initConfig({\n pkg: grunt.file.rea... | javascript | edit | 0 | 1 | mit | a98a9b7401212661ca170551cb3cede388fa0623 | catenoid-company/videojs5-hlsjs-source-handler,streamroot/videojs5-hlsjs-source-handler,catenoid-company/videojs5-hlsjs-source-handler,streamroot/videojs5-hlsjs-source-handler | Gruntfile.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\n banner: '/*! <%= pkg.name %> <%= pkg.version %> | Copyright <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.na... | javascript | edit | 0 | 1 | mit | fc2a0b966a8c7796ff06653f4f9bc4a70101e43e | aduth/correctingInterval | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport FilterModule from \"../FilterModule\";\nimport { dependencies as Inject, singleton as Singleton } from \"needlepoint\";\nimport Promise from \"bluebird\";\nimport Threads from \"../../util/Threads\";\n\n@Singleton\n@Inject(Thread... | javascript | edit | 0 | 2 | apache-2.0 | 801f4d56a217cee39eb08249a20c8dbd577dc030 | ivkos/botyo | src/modules/filters/ThreadFilter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log = require('./log');\nvar TunerTwitter = require('./tuner_twitter');\n\nvar tt = TunerTwitter.create({twitterName: 'L2G', keywords: 'test'});\n//var tt = TunerTwitter.create({twitterID: 14641869});\nlog.debug('created new TunerTw... | javascript | edit | 0 | 1 | mit | 78e76784231ee7f9fdc9e0926bc985617b012f7e | L2G/batsig | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst fs = require(\"./utils/fs\");\nconst validate = require(\"./utils/validate\");\n\nconst validateInput = (methodName, path) => {\n const methodSignature = `${methodName}([path])`;\n validate.argument(methodSign... | javascript | edit | 0 | 1 | mit | 152821d211418870dc90f98077a43e8c51e3f426 | szwacz/fs-jetpack,szwacz/fs-jetpack | lib/remove.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * AdminLogonController: Creates a endpoint where a user can log\n * into the system. It renders the login template only if user is\n * not already logged in.\n */\nAdminLogonController = RouteController.extend({\n\twaitOn: functio... | javascript | edit | 0 | 3 | apache-2.0 | b2ef3f8fd40be85ea931a03f81dfcb2b502cbec5 | bompi88/concept,bompi88/concept,bompi88/concept | client/routes/controllers/admin_logon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n/*\nCopyright (C) 2010, Oleg Efimov <<EMAIL>>\n\nSee license text in LICENSE file\n*/\n\nvar\n bindings_list = ['Sannis-node-mysql-libmysqlclient', 'felixge-node-mysql', /*'stevebest-node-mysql',*/ 'PHP-MySQL'],\n ... | javascript | edit | 0 | 2 | mit | b529cb8fe16a6f899c92d0153b13c6d471733f5e | Sannis/node-mysql-benchmarks,Sannis/node-mysql-benchmarks,Sannis/node-mysql-benchmarks,Sannis/node-mysql-benchmarks | run-benchmarks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Game = (function () {\n var Game = function (canvasRenderer,svgRenderer ) {\n\n };\n\n return Game;\n}());\n\n```\n\nApply this change: Implement logic for player and disc movements and collision between them"
},
{
... | javascript | edit | 0 | 5 | mit | 67f6b0dd9cae88debab6a350f84f4dff0d13eefc | TeamBarracuda-Telerik/JustDiscBattle,TeamBarracuda-Telerik/JustDiscBattle | Engine/engine.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gutil = require('gulp-util'),\n fs = require('fs');\n\n/**\n * Loads reporter by its name.\n *\n * The function works only with reporters that shipped with the plugin.\n *\n * @param {String} name Name of a reporter to load.\n * ... | javascript | edit | 0 | 6 | mit | b379a4293d67349cecf026221938c4ca65efc453 | JustBlackBird/gulp-phpcs,JustBlackBird/gulp-phpcs | reporters/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Generate a single webpack bundle for all tests for faster testing\n// See https://github.com/webpack/karma-webpack#alternative-usage\n\n// Configure raven with a fake DSN to avoid errors in test output\nvar Raven = require('raven-js'... | javascript | edit | 0 | 0 | apache-2.0 | 5f8c42f6c0360547ece990855256d3480ba3546c | CenterForOpenScience/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,erinspace/osf.io,mfraezz/osf.io,mattclark/osf.io,crcresearch/osf.io,laurenrevere/osf.io,adlius/osf.io,aaxelb/osf.io,laurenrevere/osf.io,CenterForOpenScience/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,saradbowman/osf.io,chennan47/osf.io,pattisdr/o... | website/static/js/tests/tests.webpack.js | rejected_duplicate | Near-duplicate of sample 76923 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst trimStart = (str) => {\n // NOTE String.trimStart is available on Firefox 61\n return str.replace(/^\\s+/, '');\n};\n\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'ftp:', 'mailto:'];\n\nconst searchUrl = (keywords, searchSet... | javascript | edit | 0 | 6 | mit | 2d99515fd22cf92c7d47a15434eb89d6d26ce525 | ueokande/vim-vixen,ueokande/vim-vixen,ueokande/vim-vixen | src/shared/urls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { reduxForm, Field } from 'redux-form'\n\nclass NewMealForm extends Component {\n\n render() {\n return (\n <form onSubmit={this.props.handleSubmit}>\n <label htmlFor=\"na... | javascript | edit | 0 | 1 | mit | b451fd49780ad69869b4cc4087bdd4a95a066b0f | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/components/NewMealForm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Bind = require(\"github/jillix/bind\");\nvar Events = require(\"github/jillix/events\");\n\nmodule.exports = function(config) {\n\n var self = this;\n Events.call(self, config);\n\n for (var i in config.roles) {\n $(... | javascript | edit | 0 | 6 | mit | 128a3d691d9be875ca5a53fbbc7237d3ba4f234a | jxmono/links | main.js | rejected_duplicate | Near-duplicate of sample 84467 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Hint HTML\n */\n'use strict';\n\nconst gulp = require('gulp'),\n htmlhint = require('gulp-htmlhint'),\n notify = require('gulp-notify');\n\nmodule.exports = function(options) {\n\n return cb => {\n gulp.src('... | javascript | edit | 0 | 1 | mit | 1946b1e6190e9b374f323f6b99bfe8790f879ef0 | justcoded/web-starter-kit,vodnycheck/justcoded,KirillPd/web-starter-kit,justcoded/web-starter-kit,vodnycheck/justcoded,KirillPd/web-starter-kit | tasks/html-hint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('.entries').slick({\n slidesToShow: 3,\n variableWidth: true,\n autoplay: true,\n lazyLoad: 'ondemand'\n });\n Dropzone.options.dropzoneSubmitPhoto = {\n para... | javascript | edit | 0 | 1 | isc | d69b7e3eaecb1a38cce45e12abdb64ecd36ce13c | RevolutionTech/flamingo,RevolutionTech/flamingo,RevolutionTech/flamingo,RevolutionTech/flamingo | static/js/contest-details.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst assert = require(\"assert\");\n\n// Masquerade as the REPL module.\nmodule.filename = null;\nmodule.id = \"<repl>\";\nmodule.loaded = false;\nmodule.parent = void 0;\n\ndelete require.cache[require.resolve(\"../node/repl-hook.js\"... | javascript | edit | 0 | 2 | mit | 35c2111792ca6f6a0cd0ef0468c43afd13e54693 | benjamn/reify,benjamn/reify | test/repl-tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(window).scroll\n ( function ()\n {\n $( \"header\" ).css\n ( \"top\"\n , Math.max(-280, Math.min(0, -$(\"body\").scrollTop()))\n );\n }\n );\n\n$(\"nav a\").click\n ( function (ev)\n {\n var ... | javascript | edit | 0 | 2 | bsd-3-clause | 6e53504d4fa4c5add94f4df61b2c96d96db3906d | bergmark/clay,rbros/clay,rbros/clay | site/code.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Service for the spec config.\n// We keep this separate so that changes are kept even if the spec changes.\nangular.module('vlui')\n .factory('Config', function() {\n var Config = {};\n\n Config.data = {};\n ... | javascript | edit | 0 | 2 | bsd-3-clause | 0476ef142043c2cbb7bb74dc4994d18f5ab4376e | vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui | src/services/config/config.service.js | rejected_duplicate | Near-duplicate of sample 102467 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar registerSystem = require('../core/system').registerSystem;\n\n/**\n * Tracked controls system.\n * Maintain list with available tracked controllers.\n */\nmodule.exports.System = registerSystem('tracked-controls-webxr', {\n init: f... | javascript | edit | 0 | 2 | mit | 59148c34d125d0eafb45e0b2516e3cd08bb37735 | chenzlabs/aframe,ngokevin/aframe,chenzlabs/aframe,ngokevin/aframe,aframevr/aframe,aframevr/aframe | src/systems/tracked-controls-webxr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nfunction allMustExist(props) {\n Object.keys(props).every(propName => props[propName] != null);\n}\n\nexport default function pending(NotReadyComponent) {\n return (hasLoaded = allMustExist) => (ReadyComp... | javascript | edit | 0 | 3 | mit | 11c7e21ad172de2e3197ef871191731602f33269 | BurntCaramel/react-pending | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nexport {default as ChartData} from './chartdata/ChartData';\n\nexport {default as LineCanvas} from './component/canvas/LineCanvas';\nexport {default as ColumnCanvas} from './component/canvas/ColumnCanvas';\nexport {default as ... | javascript | edit | 0 | 0 | mit | 740a375cc37975c57f8f88f0f14630a6021e7494 | bigdatr/pnut,bigdatr/pnut | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar fs = require('fs'),\n Path = require('path'),\n scripts;\n\nscripts = [\n 'pokemonfusion.js',\n 'catoverflow.js',\n 'nugme.coffee',\n 'mta.coffee',\n 'spot.js',\n 'hr.js'\n];\n\nmodule.exports = function (r... | javascript | edit | 0 | 2 | mit | 868d729ea7f3b928e811b0196598f09b0d11b3a3 | josephcarmello/hubot-scripts,dyg2104/hubot-scripts,Tyriont/hubot-scripts,amhorton/hubot-scripts,1stdibs/hubot-scripts | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore, applyMiddleware } from 'redux';\n\nimport App from './components/app';\nimport reducers from './reducers';\n\n... | javascript | edit | 0 | 1 | mit | 0a029c055211315536b53a1960838dbf7d9ef610 | monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n$(document).ready(function() {\n\n $('select[multiple]').each(function() {\n var select = $(this),\n search = $('<button/>', {\n 'class': 'btn'\n }).append(\n $('<span/>', {\n ... | javascript | edit | 0 | 3 | mit | 2e28d6f1578b9fe68a8d6bea3e7fbd7a61d8dbff | bravesheep/crudify-bundle,bravesheep/crudify-bundle | Resources/js/admin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport Logo from './components/logo'\nimport SocialButtons from './components/social-buttons'\nimport Navigation from './components/navigation'\nimport Home from './components/home';\nimport Footer from './... | javascript | edit | 0 | 5 | mit | 6591d7a6e52433519bb79678db85e015e3b50104 | cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $(\".inline.\" + formset_prefix).formset({\n prefix: formset_prefix, // The form prefix for your django formset\n addCssClass: \"btn btn-block btn-primary bordered inline-form-add\", // CSS class appli... | javascript | edit | 0 | 2 | mit | 52a3703073c1a96d1056bd8be38228f530769971 | livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride | planner/static/planner/js/new_step_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./lib/whatwg-fetch/fetch.js')\nrequire('./lib/kube-6.0.1/kube.min.css')\n\nimport 'react-hot-loader/patch'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Root from './components/Root'\nimport configureStor... | javascript | edit | 0 | 0 | mit | dd0d1022cba70a3504d131c7d48a825be574b30b | rjbernaldo/expensetracker-react-redux,rjbernaldo/expensetracker-react-redux | src/index.js | rejected_duplicate | Near-duplicate of sample 86444 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\nimport fs from 'fs';\nimport snfe from './index';\nimport { name, version } from './package.json';\n\nlet printHelpMesage = () => {\n console.log(`\\nStrip Named Function Expression\\n`);\n cons... | javascript | edit | 0 | 1 | mit | 611cc4009fa09351c2a012ab472affa2ec455cb8 | ajhsu/snfe | cli.es6.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Compile:JS task.\n * Uglify and merge all javascript files in 'Public/Javascripts/Sources/'.\n */\n\nvar config = require(\"../../Config\");\n\nmodule.exports = function(grunt) {\n\t\"use strict\";\n\n\tgrunt.registerTask(\"comp... | javascript | edit | 0 | 3 | mit | a502cf7fb2052263a2b0bb7d84e4cbfe91b70f86 | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template | Build/Grunt-Tasks/Compilers/Javascript.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Player from './components/Player';\nimport Video from './components/Video';\nimport BigPlayButton from './components/BigPlayButton';\nimport LoadingSpinner from './components/LoadingSpinner';\nimport PosterImage from './component... | javascript | edit | 0 | 0 | mit | 89bc200fc4d9db76e74d0524a69bbcc805317e13 | video-react/video-react,video-react/video-react | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BOARD_HEIGHT = 288;\nvar BOARD_WIDTH = 224;\nvar VERT_TILES = BOARD_HEIGHT / 8;\nvar HORIZ_TILES = BOARD_WIDTH / 8;\n\ngameBoard = new Array(VERT_TILES);\nfor(var y = 0; y < VERT_TILES; y++) {\n gameBoard[y] = new Array(HORIZ_TILES... | javascript | edit | 0 | 3 | mit | 02b60cc05265429b90ac7289086661a7d8bd7814 | peternatewood/pac-man-replica,peternatewood/pac-man-replica | pac_script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n\n'use strict';\n\nangular\n .module('secondLead')\n \n .controller('LoginCtrl', [\n 'Restangular',\n '$state', \n 'store',\n 'UserModel',\n function (Restangular, $state, store, UserModel) {\n var logi... | javascript | edit | 0 | 1 | mit | 9c0c159b1184d5322f1baf0fa530efaf45cd5e3c | ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead | app/assets/javascripts/angular/main/login-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar jQuery = require('jquery');\nvar VIE = require('../vie.js');\n\n// Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed\nVIE.RDFa.predicateSelector = '[property]';\n\nexports['test inheriting subject'] = function(test) {\n... | javascript | edit | 0 | 1 | mit | 007eff6d9b3fba33af9910ad66c1692e70b99d75 | bergie/VIE,bergie/VIE | test/rdfa.js | rejected_duplicate | Near-duplicate of sample 102615 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\nimport { reducer as formReducer } from 'redux-form';\n\n// Import all of your reducers here:\nimport employees from 'containers/GeoSpatialVie... | javascript | edit | 0 | 0 | mit | aa2cc467387a8d156d64f6a6090d5a47bce0491d | JaySmartwave/palace-bot-sw,JaySmartwave/palace-bot-sw | app/src/reducers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('ngVibrant')\n .provider('$vibrant', $vibrantProvider);\n\nfunction $vibrantProvider() {\n this.$get = function() {\n function $vibrant(element) {\n var instance = new Vibrant(element);\n ... | javascript | edit | 0 | 2 | apache-2.0 | 94f8f130f60802a04d81c15b2b4c2766ca48e588 | maxjoehnk/ngVibrant | src/vibrant.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar phonecatControllers = angular.module('leaguecontrollers', []);\n\nphonecatControllers.factory(\"dataProvider\", ['$q', function($q) {\n console.log(\"Running dataProvider factory\");\n\n return {\n getData: ... | javascript | edit | 0 | 2 | mit | e2e2ea04901ca320c33792245fdb80c33f04ec6b | MeerkatLabs/bowling-visualization | app/js/controllers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by XaviTorello on 30/05/18\n */\nimport React from 'react';\nimport ComposedComponent from './ComposedComponent';\nimport AutoComplete from 'material-ui/AutoComplete';\n\nclass TextSuggest extends React.Component {\n ... | javascript | edit | 0 | 3 | mit | ef478f65b91a9948c33b446468b9c98861ad2686 | networknt/react-schema-form,networknt/react-schema-form | src/TextSuggest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar wrench = require('wrench');\n\nvar files = 0;\nwrench.readdirRecursive(process.argv[2], function (err, curFiles) {\n if (curFiles === null) {\n console.log(files);\n } else {\n if (curFiles) files += c... | javascript | edit | 0 | 3 | mit | 39d4ee5ccd345b3aa7602e00ad70508ed5d0997b | kjbekkelund/recurse,kjbekkelund/recurse | benchmark/wrench.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport moment from 'moment';\nimport { gql, graphql } from 'react-apollo';\n\nimport { getCurrentTimeSuccess } from '../App/actions';\n\nconst GetCurrent... | javascript | edit | 0 | 3 | bsd-3-clause | abd11edf30aa0a77548b04263b26edd1efe8cc89 | zmora-agh/zmora-ui,zmora-agh/zmora-ui | app/containers/TimeProvider/index.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.