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```python\nimport pytest\n\nslow = pytest.mark.skipif(\n not pytest.config.getoption(\"--runslow\"),\n reason=\"need --runslow option to run\"\n)\n\nTOTAL_DEGREES = 2\n\nfrom .crv_coeffs import coeffs as correct_coeffs\n# TODO: Should we use the...
python
edit
1
1
bsd-3-clause
29613035bb8af7dedec7383a62a5e488547e4795
ergs/transmutagen,ergs/transmutagen
transmutagen/tests/test_coefficients.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom six.moves.urllib_parse import urlencode\n\nfrom .oauth import OAuth2Test\n\n\nclass DatagouvfrOAuth2Test(OAuth2Test):\n backend_path = 'social_core.backends.udata.DatagouvfrOAuth2'\n user_data_url = 'https://www.da...
python
edit
1
1
bsd-3-clause
ce2f07e7fa5ac38235cbb6ea6c4fee3a60031246
python-social-auth/social-core,python-social-auth/social-core
social_core/tests/backends/test_udata.py
rejected_duplicate
Near-duplicate of sample 14137
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# cython: language_level=3\n# mode: run\n# tag: pure3.7, pep526, pep484\n\nfrom __future__ import annotations\n\ntry:\n from typing import ClassVar\nexcept ImportError: # Py<=3.5\n ClassVar = {int: int}\n\n\nclass PyAnnotatedClass:\n...
python
edit
3
0
apache-2.0
83020d996733b5376cfa5814ca81c8f823029346
scoder/cython,scoder/cython,scoder/cython,da-woods/cython,cython/cython,cython/cython,da-woods/cython,cython/cython,da-woods/cython,da-woods/cython,scoder/cython,cython/cython
tests/run/pyclass_annotations_pep526.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport os\n\nfrom django.conf import settings\n\nfrom doc_builder.base import BaseBuilder\nfrom projects.utils import run\n\nlatex_re = re.compile('the LaTeX files are in (.*)\\.')\npdf_re = re.compile('Output written on (.*?)')\...
python
edit
3
6
mit
4ffd42f132769b23ee93c8a5c3416877c772d47e
wanghaven/readthedocs.org,LukasBoersma/readthedocs.org,clarkperkins/readthedocs.org,CedarLogic/readthedocs.org,nyergler/pythonslides,d0ugal/readthedocs.org,sunnyzwh/readthedocs.org,soulshake/readthedocs.org,mhils/readthedocs.org,johncosta/private-readthedocs.org,nikolas/readthedocs.org,ojii/readthedocs.org,KamranMackey...
doc_builder/backends/pdf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright 2017 Kaede Hoshikawa\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 ...
python
edit
1
0
apache-2.0
4877f6a242b0c0ecad798ec648d919fc05065c8e
futursolo/sketchbook,futursolo/sketchbook
sketchbook/_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom simpleflow import simpleflow\n\ndef test_basic():\n assert 0, 'write me!'\n```\n\nApply this change: Add basic test that only import simpleflow" }, { "role": "assistant", ...
python
edit
3
1
mit
2d9e7843106b2fce247dda8f14bc192c3d98e91f
botify-labs/simpleflow,botify-labs/simpleflow
tests/test_simpleflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# ElasticQuery\n# File: elasticquery/filterquery.py\n# Desc: The base query class & metaclass\n\nimport json\n\nfrom .util import make_dsl_object, unroll_definitions, unroll_struct\n\n\nclass MetaFilterQuery(type):\n def __init__(cls, na...
python
edit
1
3
mit
6093d2954861f2783da3e5b8473cb13b0469685b
Fizzadar/ElasticQuery,Fizzadar/ElasticQuery
elasticquery/filterquery.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib.postgres.fields import JSONField\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom ..models import UpdatedMixin\nfrom .storage...
python
edit
1
2
mit
9937823496db32a4d3eac3eee0fa4d310ea07e11
dvhbru/dvhb-hybrid
dvhb_hybrid/files/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Runs simulation tests and lint on the ...
python
edit
1
1
bsd-3-clause
51f0cd392cab5737cb444b9eef8700fcd4713ea0
CoherentLabs/depot_tools,CoherentLabs/depot_tools
tests/recipes_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nTests for various minion timeouts\n'''\n\n# Import Python libs\nfrom __future__ import absolute_import\nimport os\nimport sys\n\nimport salt.utils\n\n# Import Salt Testing libs\nfrom tests.support.case import S...
python
edit
1
2
apache-2.0
1517bb31a8ec0d5df96e2693977081b3d1a64f69
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/minion/test_timeout.py
rejected_duplicate
Near-duplicate of sample 5389
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom ..externals import External\n\ntry:\n from contextlib import GeneratorContextManager\nexcept ImportError:\n from contextlib import _GeneratorContextManager as GeneratorContextManager\n\nfrom ty...
python
edit
1
1
bsd-3-clause
f659e612f87ccb2a9d466ae62ed8f2b2700497ab
dan-gamble/cms,jamesfoley/cms,danielsamuels/cms,lewiscollard/cms,dan-gamble/cms,lewiscollard/cms,dan-gamble/cms,lewiscollard/cms,jamesfoley/cms,jamesfoley/cms,danielsamuels/cms,danielsamuels/cms,jamesfoley/cms
cms/tests/test_externals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.core.management.base import BaseCommand\nfrom django.db.models import Q\n\nfrom digest.management.commands.create_dataset import create_dataset\nfrom digest.mod...
python
edit
1
2
mit
b50af9b9790dedea7902d827a86d017ce9177070
pythondigest/pythondigest,pythondigest/pythondigest,pythondigest/pythondigest
digest/management/commands/export_items.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\nimport os\n\n\nclass cached(object):\n def __init__(self, *args, **kwargs):\n self.cached_function_responses = {}\n self.default_max_age = kwargs.get(\"default_cache_max_age\", time...
python
edit
1
7
mit
658f0f6825b4f4a226349fcee63a0c5fbbd5ba9e
cheddartv/stockstream.live,cheddartv/stockstream.live
webapp/cached.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = True\n# GOOGLE_SERVICE_ACCOUNT_KEYFILE_PATH = '/home/vagrant/heltour/gspread.conf'\n# SLACK_API_TOKEN_FILE_PATH = '/home/vagrant/heltour/slack-token.conf'\n\nINTERNAL_IPS = ['127.0.0.1']\n# JAVAFO_COMMAND = 'java -jar /home/vagrant/...
python
edit
1
0
mit
2d24b1b2f9fd5c661a48f233480ab09322d6bf91
cyanfish/heltour,cyanfish/heltour,cyanfish/heltour,cyanfish/heltour
heltour/local/martinsmacmini.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\ndef activity_hosts():\n return [\"activity0\", \"activity1\", \"activity2\"]\n\n\ndef app_hosts():\n return [\"app0\", \"app1\", \"app2\", \"app3\"]\n\n\ndef etherpad_hosts():\n return [\"etherpad0\", \"etherpad1\", \"etherpad2...
python
edit
1
1
apache-2.0
e8711eca94afb6ab05baf6e61ddee95d193f3cd7
oaeproject/oae-fabric
fabfile/oae_env/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cumulusci.core.config import YamlGlobalConfig\nfrom cumulusci.core.config import YamlProjectConfig\n\nclass MrbelvedereProjectConfig(YamlProjectConfig):\n def __init__(self, global_config_obj, build_flow):\n super(Mrbelvedere...
python
edit
1
1
bsd-3-clause
02f5db5fdb46684b60a9b5e9125da228a927c2c3
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
mrbelvedereci/build/cumulusci/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.admin.model.form import converts\nfrom flask.ext.admin.contrib.sqla.form import AdminModelConverter as SQLAAdminConverter\nfrom .fields import GeoJSONField\n\n\nclass AdminModelConverter(SQLAAdminConverter):\n @converts('G...
python
edit
1
1
bsd-3-clause
45fb01574d410c2a764e5b40a5e93a44fa8f6584
litnimax/flask-admin,petrus-jvrensburg/flask-admin,closeio/flask-admin,torotil/flask-admin,jmagnusson/flask-admin,marrybird/flask-admin,dxmo/flask-admin,ondoheer/flask-admin,plaes/flask-admin,LennartP/flask-admin,jamesbeebop/flask-admin,NickWoodhams/flask-admin,closeio/flask-admin,CoolCloud/flask-admin,radioprotector/f...
flask_admin/contrib/geoa/form.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.9 on 2016-08-04 11:22\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\nimport wagtail.wagtailcore.blocks\nimport wagta...
python
edit
1
0
mit
998586b575149ae549b755067c831f8b066c1845
City-of-Helsinki/digihel,City-of-Helsinki/digihel,City-of-Helsinki/digihel,City-of-Helsinki/digihel
digi/migrations/0002_theme_page_add_body_and_blog_category.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n djlime.forms.utils\n ~~~~~~~~~~~~~~~~~~\n\n Utilities for forms.\n\n :copyright: (c) 2012 by Andrey Voronov.\n :license: BSD, see LICENSE for more details.\n\"\"\"\nfrom django.utils import s...
python
edit
1
3
bsd-3-clause
eb175a077affcdaa1e1cea6da557dd163890d958
freshlimestudio/djlime
djlime/forms/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"distutils\n\nThe main package for the Python Module Distribution Utilities. Normally\nused from a setup script as\n\n from distutils.core import setup\n\n setup (...)\n\"\"\"\n\n# This module should be kept compatible with Python...
python
edit
1
0
mit
4855a379c3720588168a61545ab1af3291075489
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/distutils/__init__.py
rejected_duplicate
Near-duplicate of sample 12601
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2013 - Noorul Islam K M\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Lice...
python
edit
1
1
apache-2.0
c8d7224f62d7a8da08514c37acfa83e2754252c6
ed-/solum,julienvey/solum,devdattakulkarni/test-solum,openstack/solum,stackforge/solum,gilbertpilz/solum,gilbertpilz/solum,ed-/solum,devdattakulkarni/test-solum,gilbertpilz/solum,openstack/solum,stackforge/solum,ed-/solum,julienvey/solum,ed-/solum,gilbertpilz/solum
functionaltests/api/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Must be a mysql database!\ndatabase_uri = 'mysql://root@localhost/pushjet_api'\n\n# Are we debugging the server?\n# Do not turn this on when in production!\ndebug = True\n\n# Limit requests?\nlimiter = False\n\n# Google Cloud Messaging co...
python
edit
1
0
bsd-2-clause
07a427d687a2618c03d62eb60d849c4ed26752c4
Pushjet/Pushjet-Server-Api
config.example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pathlib import Path\nfrom hoover.site.settings.common import *\n\nINSTALLED_APPS = INSTALLED_APPS + [\n 'hoover.contrib.twofactor',\n 'django_otp',\n 'django_otp.plugins.otp_totp',\n]\n\nMIDDLEWARE = MIDDLEWARE + [\n 'djang...
python
edit
4
0
mit
0fbffce39b7e0209d04e26bd43009c2e6e5e0c46
hoover/search,hoover/search,hoover/search
testsuite/settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"GM2MField support for autocomplete fields.\"\"\"\n\n\nclass GM2MFieldMixin(object):\n \"\"\"GM2MField ror FutureModelForm.\"\"\"\n\n def value_from_object(self, instance, name):\n \"\"\"Return the list of objects in the G...
python
edit
1
3
mit
3ced8676d474df3149bf78519e918cfa3b6b0ec3
yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light
src/dal_gm2m/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\nfrom traceback import format_exception\n\nfrom pyramid.decorator import reify\nfrom pyramid.httpexceptions import HTTPInternalServerError\nfrom pyramid.interfaces import IRequestFactory\n\nfrom ines.mi...
python
edit
2
5
mit
cfd6c7c2d7af47329deac3e7ff618b66a078263c
hugobranquinho/ines
ines/middlewares/logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nfrom tempfile import TemporaryDirectory\n\nfrom django.core.management import call_command\nfrom django.test import TestCase\n\nfrom django_archive import archivers\n\n\nclass FormatsTestCase(TestCase)...
python
edit
1
2
mit
47d9217b6ee9837987d25d77cc6e3c750766ed90
nathan-osman/django-archive,nathan-osman/django-archive
tests/test_formats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nCombine and retrieve current cluster state.\n\"\"\"\n\nfrom twisted.application.service import Service\n\nfrom ._model import Deployment, Node\n\n\nclass ClusterStateSe...
python
edit
1
2
apache-2.0
577ec0c981651cb039f768b9eb92ef91f8511017
agonzalezro/flocker,Azulinho/flocker,LaynePeng/flocker,runcom/flocker,achanda/flocker,jml/flocker,1d4Nf6/flocker,mbrukman/flocker,jml/flocker,adamtheturtle/flocker,lukemarsden/flocker,moypray/flocker,achanda/flocker,w4ngyi/flocker,LaynePeng/flocker,mbrukman/flocker,w4ngyi/flocker,1d4Nf6/flocker,achanda/flocker,Azulinho...
flocker/control/_clusterstate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\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 may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
8b25f5606b160422f6eb698f4edae8cb5013a310
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport plotly\nimport plotly.graph_objs as go\n\n\ndef validate_coerce_fig_to_dict(fig, validate, clone=True):\n from plotly.basedatatypes import BaseFigure\n\n if isinstance(fig, BaseFigure):...
python
edit
1
6
mit
ce05a68965a252a1756d6eac64bf319ef17ed158
plotly/plotly.py,plotly/plotly.py,plotly/plotly.py
packages/python/plotly/plotly/io/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nimport pytest\n\ndef test_add_single(identity_fixures, identity_store):\n for d in identity_fixures:\n identity = identity_store.add_identity(d)\n for key, val in d.items():\n assert get...
python
edit
4
3
mit
4ec8a5b5880f7e5300d71c34f5b293ea5993f5b2
nocarryr/AWS-Identity-Manager
tests/test_storage.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nimport os\n\nclass JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener):\n \"\"\" Detects current file type if the file's extension isn't conclusive \"\"\"\n\n def on_load(self, view):\n ...
python
edit
3
4
mit
65e12efb52e9eef330ab8f7a9f50a8f255fb4aae
integrum/sublime-text-jasmine-coffeescript
JasmineCoffeeScriptDetectFileType.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext import restful\nfrom . import database\nfrom flask import abort, send_file\nfrom werkzeug import secure_filename\nimport os\n\n\nclass DownloadInstance(restful.Resource):\n def get(self, id):\n document = database.g...
python
edit
1
2
mit
a376d66b4d58e22f35ad4f43e8b6f2ad775d68a8
VauxIo/core
vaux/api/downloads.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Discovers Belkin Wemo devices. \"\"\"\n\nfrom . import SSDPDiscoverable\n\n\nclass Discoverable(SSDPDiscoverable):\n \"\"\" Adds support for discovering Belkin WeMo platform devices. \"\"\"\n\n def info_from_entry(self, entry):...
python
edit
1
1
mit
deac9119d4d03434a2d610920a431127927ac56a
sfam/netdisco,toddeye/netdisco,rohitranjan1991/netdisco,tomduijf/netdisco,brburns/netdisco,balloob/netdisco
netdisco/discoverables/belkin_wemo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\" Compare the generated GM images to the ...
python
edit
1
3
bsd-3-clause
e2c4529fc35c07721f1ed70ae2bf88538a67677b
Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Ti...
slave/skia_slave_scripts/compare_gms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport yaml\n\nimport score\n\ndef usage():\n print \"Usage: score-match.py MATCH_NUMBER\"\n print \" Scores the match file at matches/MATCH_NUMBER.yaml\"\n print \" Outputs scoring...
python
edit
7
1
mit
53764e4ce0f82dc0706a9fd64877ccda5e97c32f
samphippen/scoring_2013,samphippen/scoring_2013
compd-score-match.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django DDP app config.\"\"\"\n\nfrom __future__ import print_function\n\nfrom django.apps import AppConfig\nfrom django.conf import settings, ImproperlyConfigured\nfrom django.db import DatabaseError\nfrom django.db.models import sign...
python
edit
1
4
mit
71324420df350bba5423006a444927e33c1a5ae2
commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp
dddp/apps.py
rejected_duplicate
Near-duplicate of sample 18959
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render, render_to_response\nfrom django.template import RequestContext\n\nfrom new_buildings.models import Builder, ResidentalComplex, NewApartment\nfrom new_buildings.forms import SearchForm\nfrom feedback.mode...
python
edit
6
1
mit
c63a4b469fae66668214da3b963c03cead99d16d
Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency
real_estate_agency/real_estate_agency/views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nimport cronjobs\n\nfrom celery.task.sets import TaskSet\nfrom elasticutils.contrib.django import get_es\n\nfrom mozillians.users.tasks import index_objects\nfrom mozillians.users.models import UserProfile...
python
edit
1
3
bsd-3-clause
84341e0d5f0f1b902c2a334f40cddb29e10a1f16
johngian/mozillians,akatsoulas/mozillians,akarki15/mozillians,johngian/mozillians,hoosteeno/mozillians,mozilla/mozillians,chirilo/mozillians,hoosteeno/mozillians,safwanrahman/mozillians,fxa90id/mozillians,fxa90id/mozillians,fxa90id/mozillians,fxa90id/mozillians,johngian/mozillians,akatsoulas/mozillians,anistark/mozilli...
mozillians/users/cron.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport numpy as np\nimport mbuild as mb\nfrom mbuild.tests.base_test import BaseTest\n\n\nclass TestBox(BaseTest):\n\n def test_init_lengths(self):\n box = mb.Box(lengths=np.ones(3))\n assert np.array_equal(b...
python
edit
3
1
mit
e97a1ed2015db2eb2d5fe6abe15af6d9020c16d9
ctk3b/mbuild,iModels/mbuild,iModels/mbuild,ctk3b/mbuild,tcmoore3/mbuild,tcmoore3/mbuild,summeraz/mbuild,summeraz/mbuild
mbuild/tests/test_box.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django\nfrom django.core.management import call_command\nfrom django.test import TestCase\n\nfrom bananas.management.commands import show_urls\n\n\nclass CommandTests(TestCase):\n def test_show_urls(self):\n urls = show_url...
python
edit
1
4
mit
657f72c2aae5bd83efff3520fa642d66ad172822
5monkeys/django-bananas,5monkeys/django-bananas,5monkeys/django-bananas
tests/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom .models import get_application_model\n\n\nclass AllowForm(forms.Form):\n allow = forms.BooleanField(required=False)\n redirect_uri = forms.CharField(widget=forms.HiddenInput())\n scope = forms.CharF...
python
edit
1
3
bsd-2-clause
b54dc115710416b92161fa0f69b4928cdef07997
vmalavolta/django-oauth-toolkit,vmalavolta/django-oauth-toolkit
oauth2_provider/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Bump version as instructed by bamboo" }, { "role": "assistant", "content": "#-*- coding: utf-8 -*-\n# version string following pep-0396 and pep-0386\n__version__ = '0.9pbs.5' # pragma: nocover\n" } ]
python
new_file
1
0
bsd-3-clause
8ae9da1cf93d45cadcfd3c3857542ce9cabdff64
pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer
filer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms as newform\nfrom django.forms import ModelForm\nfrom people.models import Beneficiary, Donor\nfrom django.contrib.auth.models import User\nfrom django.utils.translation import ugettext_lazy as _\n\n# from django.cor...
python
edit
1
0
bsd-3-clause
ac5a339f73cb80b54b0298a02bce41c27c25b9ae
agiliq/fundraiser,agiliq/fundraiser,febinstephen/django-fundrasiser-app,agiliq/fundraiser,febinstephen/django-fundrasiser-app,febinstephen/django-fundrasiser-app
authentication/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom social_auth.backends import PIPELINE\nfrom social_auth.utils import setting\n\n\nPIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session'\n\n\ndef save_status_to_session(request, auth, *args, **kwargs):\n \"\"\"S...
python
edit
1
3
bsd-3-clause
7e6af723e15a785b403010de4b44b49fce924e91
WW-Digital/django-social-auth,duoduo369/django-social-auth,limdauto/django-social-auth,vuchau/django-social-auth,gustavoam/django-social-auth,1st/django-social-auth,vxvinh1511/django-social-auth,VishvajitP/django-social-auth,MjAbuz/django-social-auth,sk7/django-social-auth,getsentry/django-social-auth,omab/django-socia...
social_auth/backends/pipeline/misc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\r\n#--IMPORT_ALL_FROM_FUTURE--#\r\n\r\n'''\r\n@date 2014-11-16\r\n@author Hong-she Liang <<EMAIL>>\r\n'''\r\n\r\n# Import the global selenium unit, not our selenium .\r\nglobal_selenium = __import__('selenium')\r\nimport types\r\nimport ti...
python
edit
4
1
apache-2.0
a28a29af31b1ea604ed97544b2d84a39c9ba3e7b
starofrainnight/rabird.core,starofrainnight/rabird.auto
automation/src/rabird/automation/selenium/webelement.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: iso-8859-1 -*-\n\nfrom twisted.protocols.basic import Int32StringReceiver\n\nimport json\nimport apps\n\nclass JSONProtocol(Int32StringReceiver):\n app = apps.LoginApp\n\n def connectionMade(self):\n self.app = se...
python
edit
2
2
bsd-3-clause
1f83364822a1c80dc26f58d3908006a7f643e7c9
siggame/server
json_protocol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom breach.models import SampleSet, Victim, Target, Round\nfrom breach.analyzer import decide_next_world_state\n\n\nclass AnalyzerTestCase(TestCase):\n def setUp(self):\n target = Target.objects....
python
edit
1
1
mit
25273e699b2b901eec53656dbcdc437e4a4cdc11
dimkarakostas/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dion...
backend/breach/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom corehq.apps.domain.models import Domain\nfrom dimagi.utils.couch.database import iter_docs\n\n\nclass Command(BaseCommand):\n\n def _get_domains_without_last_modified_date(self)...
python
edit
2
3
bsd-3-clause
346d6e38e84a5addc5173a331dbc0cc6fa39e754
qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/domain/management/commands/fill_last_modified_date.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pymongo\nimport stackexchange\nimport time\n\nso = stackexchange.Site(stackexchange.StackOverflow, \"WNe2LOp*hdsbD5U7kp0bhg((\")\n\nso.be_inclusive()\n\nconnection = pymongo.Connection()\ndb = connection.stack_doc\nposts = db.posts\n...
python
edit
3
0
bsd-3-clause
877f7fe856c640ee7cafa41226622d18eee39257
alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc
update-database/update-latest-from-so.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest LpNorm cost\n\"\"\"\nimport numpy\nimport theano\nfrom theano import tensor as T\nfrom nose.tools import raises\n\n\ndef test_shared_variables():\n '''\n LpNorm should handle shared variables.\n '''\n assert False\n...
python
edit
3
1
bsd-3-clause
0293170e0e8d309e4b2c37e3a07f64d4447b244f
caidongyun/pylearn2,mclaughlin6464/pylearn2,kose-y/pylearn2,chrish42/pylearn,sandeepkbhat/pylearn2,junbochen/pylearn2,fishcorn/pylearn2,w1kke/pylearn2,Refefer/pylearn2,hyqneuron/pylearn2-maxsom,chrish42/pylearn,daemonmaker/pylearn2,fulmicoton/pylearn2,hyqneuron/pylearn2-maxsom,fyffyt/pylearn2,TNick/pylearn2,hantek/pyle...
pylearn2/costs/tests/test_lp_norm_cost.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nManagers of ``blog`` application.\n\"\"\"\nfrom django.db import models\n\n\nclass CategoryOnlineManager(models.Manager):\n \"\"\"\n Manager that manages online ``Category`` objects.\n \"\"\"\n\n def get_query_set(self):...
python
edit
1
1
bsd-3-clause
6f18d3a00e776cf972f814fbf6ce50ec4b7cf85e
pandamasta/django-eblog
eblog/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django.views.static\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.views.generic import...
python
edit
null
null
mit
810ae97b3b38a91c8ae3f87aca8479533a1784dd
r0x73/django-template,r0x73/django-template,r0x73/django-template
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/config/urls.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nregister = template.Library()\n\nclass_converter = {\n \"textinput\":\"textinput textInput\",\n \"fileinput\":\"fileinput fileUpload\",\n \"passwordinput\":\"passwordinput textInput\"\n}\n\n@register....
python
edit
null
null
mit
9231612c0631c784dc7188822b47a4bde38db488
maraujop/django-crispy-forms,jtyoung/django-crispy-forms,ngenovictor/django-crispy-forms,saydulk/django-crispy-forms,carltongibson/django-crispy-forms,treyhunner/django-crispy-forms,dessibelle/django-crispy-forms,Stranger6667/django-crispy-forms,iris-edu-int/django-crispy-forms,spectras/django-crispy-forms,HungryCloud/...
uni_form/templatetags/uni_form_field.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.utils.timezone\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ]\n\n operations = [\n ...
python
edit
1
0
bsd-3-clause
71b42d288b68b2bac07f8e423429971e68a7ffd5
rhunwicks/django-database-files
database_files/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer):\n namespaces_for_post = {}\n for name, n in namespaces.items():\n namespace_tags ...
python
edit
2
6
bsd-3-clause
4cc45954ba71af6b81c930a99f05e8a6cf8b48f6
alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc
update-database/stackdoc/questionimport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"TurboGears project related information\"\"\"\nversion = \"2.0a1\"\ndescription = \"Next generation TurboGears built on Pylons\"\nlong_description=\"\"\"\nTurboGears brings together a variety of best of breed python tools \nto create a...
python
edit
1
0
mit
90bc53c743095fd3a6a848aa2447b6ae6ab1a98f
lucius-feng/tg2,lucius-feng/tg2
tg/release.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scoring_engine.celery_app import celery_app\nfrom celery.exceptions import SoftTimeLimitExceeded\nimport subprocess\n\nfrom scoring_engine.logger import logger\n\n\n@celery_app.task(name='execute_command', soft_time_limit=30)\ndef exec...
python
edit
1
3
mit
a8a7f6ecbe1abd4fcb6dad8e6c635c3ef38ab40f
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
scoring_engine/engine/execute_command.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# Copyright (c) 2017 Stanislav Ivochkin <<EMAIL>>\n# License: MIT (see LICENSE for details)\n\nfrom jcppy._version import __version__, __revision__\nfrom jcppy.header import header\nfrom jcpp...
python
edit
4
0
mit
c74c38bb615d048eb26634c048a833ddc2da7d62
isn-/jcppy,isn-/jcppy
jcppy/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm, Textarea, ChoiceField\nfrom django.urls import reverse_lazy\n\nfrom .models import Meeting, Folder\n\nMD_INPUT = {\n 'class': 'markdown-input',\n 'data-endpoint': reverse_lazy('utilities:preview_saf...
python
edit
3
2
isc
1af3111e4f2422c1d6484c237700013386d4638d
ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite
minutes/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport socket\n\nimport requests\n\nfrom flask import request, jsonify\n\nfrom dadd.worker import app\nfrom dadd.worker.proc import ChildProcess\n\n\n@app.route('/run/', methods=['POST'])\ndef run_process():\n proc = ChildPr...
python
edit
1
5
bsd-3-clause
20e293b49438a2428eee21bdc07799328a69ec48
ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd
dadd/worker/handlers.py
rejected_duplicate
Near-duplicate of sample 15542
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n_check_webgl_supported_script = \"\"\"\n(function () {\n var c = documen...
python
edit
1
4
bsd-3-clause
1379b3031e63330d03c85b0d1d22ce11c84bf5e9
benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult-csm,sahiljain/catapult,sahiljain/catapult,catapult-project/catapult-csm,sahiljain/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,Summ...
telemetry/telemetry/core/browser_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport discord\nfrom modules.botModule import BotModule\n\nclass Karma(BotModule):\n name = 'karma'\n\n description = 'Monitors messages for reactions and adds karma accordingly.'\n\n help_text = 'This module has no cal...
python
edit
3
2
mit
dd9030413af99e05fe935a2dafb9a6012b09b248
suclearnub/scubot
modules/karma.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nl=logging.getLogger(__name__)\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom experiments.reports import (EngagementReportGenerator,\n ...
python
edit
4
3
bsd-3-clause
efb1057b122664ee8e1ab0a06259988aa9f50092
e-loue/django-lean,MontmereLimited/django-lean,MontmereLimited/django-lean,uhuramedia/django-lean,MontmereLimited/django-lean,uhuramedia/django-lean,e-loue/django-lean,uhuramedia/django-lean
experiments/management/commands/update_experiment_reports.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom binstar_client import errors\nfrom uploader import *\n\n\ndef parse(handle):\n \"\"\"\n Handle can take the form of:\n notebook\n path/to/notebook[.ipynb]\n project:notebook[.ipynb]\n :param han...
python
edit
2
5
bsd-3-clause
2594433a32e03af15ca67002f2eb76227dd1f8c1
Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client
binstar_client/utils/notebook/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom appkit.api.v0_2_8 import App\nfrom flask import render_template, request\nimport os\nimport sys\nimport codecs\n\napp = App(__name__)\n\ntry:\n file_name = sys.argv[1]\n if not os.path.exists(file_name):\...
python
edit
1
2
mit
08fa37d71cf8f1d5d83227349b49da142f9781da
nitipit/markdo,nitipit/markdo,nitipit/markdo
markdo/markdo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_evolution.db import evolver\n\ndef write_sql(sql):\n \"Output a list of SQL statements, unrolling parameters as required\"\n for statement in sql:\n if isinstance(statement, tuple):\n print unicode(statem...
python
edit
3
5
bsd-3-clause
76fa14f61811cd38f2c91851a648fa88f6142b15
clones/django-evolution
django_evolution/utils.py
rejected_duplicate
Near-duplicate of sample 723
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Region, City, GatheringCenter, Resource\n\nadmin.site.register(Region)\nadmin.site.register(City)\n\n\nclass PublishMixin(object):\n actions = ('publish', 'unpublish')\n\n def pu...
python
edit
1
1
apache-2.0
df01d83a35c59ee2295b358d8eceeb842adb568d
pony-revolution/helpothers,pony-revolution/helpothers,pony-revolution/helpothers
listings/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.admin.sites import AdminSite\nfrom billjobs.admin import UserAdmin\n\nclass EmailExportTestCase(TestCase):\n \"\"\" Tests for email account export \"\"\"\n\n def test_method_is_ava...
python
edit
3
1
mit
a1e6da688cc41f0dc4a22e546d076358bd626990
ioO/billjobs
billjobs/tests/tests_export_account_email.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nfrom wafer.sponsors.models import Sponsor, SponsorshipPackage\n\nregister = template.Library()\n\n\n@register.inclusion_tag('wafer.sponsors/sponsors_block.html')\ndef sponsors():\n return {\n 'sponso...
python
edit
1
2
isc
055fa862e09c1a7c215e26034ad9da5998d90d0f
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/sponsors/templatetags/sponsors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .settings import CONNECTION_NAME\n\n\nclass Log4DjangoRouter(object):\n def db_for_read(self, model, **hints):\n if model._meta.app_label == 'log4django':\n return CONNECTION_NAME\n return None\n\n def db...
python
edit
1
3
bsd-3-clause
384e2fd9ae794e182dfdf4072d2689cff5f5d91d
CodeScaleInc/log4django,CodeScaleInc/log4django,CodeScaleInc/log4django
log4django/routers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, ForeignKey, Integer, String\nfrom sqlalchemy.orm import relationship\n\nfrom models.base import Base\nfrom models.user import User\nfrom models.store import Store\n\nclass Product(Base):\n\t__tablename__ = \"p...
python
edit
1
1
mit
6758a6f3f62441d21747d1faedb45fc059dc37dc
caasted/aws-flask-catalog-app,caasted/aws-flask-catalog-app
models/product.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ]\n\n operations = [\n migrations.CreateModel(\n...
python
edit
1
0
bsd-3-clause
172175811e6532d23586e54c5b48032e52745f35
hoosteeno/fjord,staranjeet/fjord,rlr/fjord,mozilla/fjord,lgp171188/fjord,rlr/fjord,rlr/fjord,Ritsyy/fjord,mozilla/fjord,Ritsyy/fjord,staranjeet/fjord,staranjeet/fjord,staranjeet/fjord,lgp171188/fjord,lgp171188/fjord,mozilla/fjord,hoosteeno/fjord,hoosteeno/fjord,Ritsyy/fjord,lgp171188/fjord,mozilla/fjord,rlr/fjord,hoost...
fjord/api_auth/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport copy\nimport logging\nimport traceback\n\n\ndef dump(obj):\n for attr in dir(obj):\n print(\"obj.%s = %r\" % (attr, getattr(obj, attr)))\n\n\ndef dump_request_summary(request):\n user = request.user.username if request.u...
python
edit
1
3
mit
d13896e05922d6d57e552719963e6918cef981d0
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
democracylab/logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\nimport os, sys, tempfile\n\nsys.path.append(\"data/\")\nimport data\n\ntry:\n from urllib.request import urlopen\nexcept ImportError:\n from urllib2 import urlopen\n\nd...
python
edit
3
1
bsd-3-clause
19ce87dd98c65338a35a4f81c3210745d330fc4c
berkeley-stat159/project-delta
data/tests/test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function\nfrom readme_renderer.rst import render\nimport sys\n\n\nif len(sys.argv) == 2:\n with open(sys.argv[1]) as fp:\n out = render(fp.read(), stream=sys.stderr)\n if out is...
python
edit
1
0
apache-2.0
7c494c9216247d4480f2b293947b75947b1fcb01
pypa/readme_renderer,pypa/readme
readme_renderer/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tastypie.resources import ModelResource\nfrom olcc.models import Product, ProductPrice, Store\n\nclass ProductResource(ModelResource):\n class Meta:\n queryset = Product.objects.all()\n resource_name = 'product'\n\ncla...
python
edit
1
0
mit
cdef62151437e9bf1187b955ad212d9d32e007e3
twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc
django_olcc/olcc/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom getopt import getopt, GetoptError\nfrom .api import Server\nfrom .fake import FakeLcdApi\n\n\nUSAGE = \"\"\"\\\nUsage %s [-h|--help]\n\\t-h or --help\\tThis help message\n\n\"\"\"\n\n\ndef get_args(ar...
python
edit
1
5
mit
c3a6554ce24781a3eaa9229f9609a09e4e018069
rfarley3/lcd-restful,rfarley3/lcd-restful
lcd_restful/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\npytest.importorskip(\"psutil\")\n\npytest.importorskip(\"netifaces\")\n\ndef test_load_module():\n __import__(\"modules.contrib.network_traffic\")\n\n\n```\n\nApply this change: Add Network Traffic module tests" }, {...
python
edit
1
1
mit
2c8dafec701d80ddd9a3d1855a14a8eef0c44790
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
tests/modules/contrib/test_network_traffic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom game import Game\n\nclass BowlingGameTest(unittest.TestCase):\n\n def setUp(self):\n self.g = Game()\n\n def tearDown(self):\n self.g = None\n\n def test_gutter_game(self):\n for i in rang...
python
edit
1
2
mit
b5bf3a92309dac40deefbaea555e4d96aa6bca62
JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge
jesusmtnez/python/kata/tests/test_game.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# http://www.openstreetmap.org/node/2026996113\nassert_has_feature(\n 16, 10485, 25328, 'pois',\n { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 })\n\n# http://www.openstreetmap.org/way/31510288\nassert_has_feature(\n 15, 16...
python
edit
3
0
mit
7443217044931466618e4ed8065b03dd7c08b05d
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/990-add-art-galleries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding:utf-8\n\"\"\"\nFunction decoration for backoff and retry\n\nThis module provides function decorators which can be used to wrap a\nfunction such that it will be retried until some condition is met. It\nis meant to be of use when acc...
python
edit
1
0
mit
596a29505351ec0e497cbe114a6e4d57d7cbada6
litl/backoff
backoff/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ns = 0.0\n\nfor line in sys.stdin:\n a, b, c = line.split()\n a, b, c = int(a), int(b), float(c)\n s += c * b\n\nprint(f'VALOR A PAGAR: R$ {s:.2f}')\n\n```\n\nApply this change: Refactor python version of Simple Calcul...
python
edit
1
0
mit
5c000543ce943619ea89b2443395a2ee10c49ee0
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/beecrowd/1010/1010.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nbirth_year = raw_input(\"What is the birth year for the milestones?\")\n# raw_input always gives strings, so convert to int\nbirth_year = int(birth_year)\n\n# Calculate milestone years\ndriving_year = birth_year + 16\ndrinking_year = birth_...
python
edit
4
0
mit
d2643bb7c4eba543da0067eb4bf82539d222845c
WomensCodingCircle/CodingCirclePython
Lesson01_Variables/MilestonesSOLUTION.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom nodes import Node\n\nclass MultiVar(Node):\n char = \"'\"\n args = 0\n results = None\n contents = -1\n \n def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle):\n self.node_1 = node_1\n ...
python
edit
1
1
mit
4f05805c0ec31da0b978cdccc0d79336272859fe
muddyfish/PYKE,muddyfish/PYKE
node/multi_var.py
rejected_duplicate
Near-duplicate of sample 15663
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom .writers.c import CWriter\n\n\ndef main():\n import argparse\n\n parser = argparse.ArgumentParser()\n parser.add_argument('file', type=argparse.FileType('r'), help='YAML file')\n parser.add_argument(...
python
edit
2
8
mit
17bfdbfdf56e01a1bda24dab4b2ac35f871cb4c1
bmi-forum/bmi-builder,bmi-forum/bmi-builder,bmi-forum/bmi-builder
bmibuilder/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Second half of the postfix_io tests.\n# If the authentication host is unreachable, postfix\n# should have a 400 error returned. This tests for it.\n# This test also works if the local machine is offline,\n# nevertheless, it sends packets ...
python
edit
5
1
mit
a4598c9454a2011b6aeff4a3759d8d2fb5a8ece3
jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth
xclib/tests/51_online_postfix_failure_test.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Displays information about the accounts bandwidth pools\"\"\"\n# :license: MIT, see LICENSE for more details.\nimport click\n\nfrom SoftLayer.CLI import environment\nfrom SoftLayer.CLI import formatting\nfrom SoftLayer.managers.accoun...
python
edit
1
2
mit
fc5614c040cccff6411c87ad6cc191f7ec0b6971
softlayer/softlayer-python,allmightyspiff/softlayer-python
SoftLayer/CLI/account/bandwidth_pools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.forms.models import inlineformset_factory\n\nfrom .models import Knot, Link\n\n\nclass KnotForm(forms.ModelForm):\n class Meta:\n model = Knot\n fields = ['name', 'photo', 'other_names'...
python
edit
2
4
mit
ed1172cc12654cdf0d221281cd56c51992b4c4af
althalus/knotcrafters,althalus/knotcrafters,althalus/knotcrafters
knotdirectory/knotdirectory/knots/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# -*- coding: utf-8 -*-\n\"\"\"\nThe **asdf** subpackage contains code that is used to serialize astropy types\nso that they can be represented and stored using the Advanced S...
python
edit
3
0
bsd-3-clause
3f27e1997c94bcdac23e5cb478e7d2b9c6dc1f37
astropy/astropy,lpsinger/astropy,mhvk/astropy,MSeifert04/astropy,stargaser/astropy,saimn/astropy,stargaser/astropy,larrybradley/astropy,pllim/astropy,aleksandr-bakanov/astropy,dhomeier/astropy,astropy/astropy,stargaser/astropy,pllim/astropy,aleksandr-bakanov/astropy,astropy/astropy,saimn/astropy,larrybradley/astropy,dh...
astropy/io/misc/asdf/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__version__ = (0, 1, 1, 'alpha', 1)\n\n\ndef get_fancypages_paths(path):\n \"\"\" Get absolute paths for *path* relative to the project root \"\"\"\n return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)]...
python
edit
1
1
bsd-3-clause
8a10c1f0036f681a1b6f499ac03e86b96bb88700
socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages
fancypages/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom App import App\n\n#try:\napp = App()\napp.run()\n#except:\n# print('')\n```\n\nApply this change: Add try except for keyboard interrupts" }, { "role": "assistant", "content": "from App import App\n\ntry:\n app = App()...
python
edit
1
0
mit
30a982448b4f0baa2abe02ea0d9ef0d4d21c8414
Rookfighter/TextAdventure
Main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom src import create\nfrom src import count\nfrom src import thefile\nfrom src import execute\n\n\n\ndef main(x, y, file):\n #Create it\n seats = create.new_2d(x, y)\n\n #Count it\n counted_start = count.count_array(x, y, seat...
python
edit
1
2
bsd-2-clause
3f178359b8649b6b92900ae790e894971405b720
kevindiltinero/seass3
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_types.hook import Hook\nfrom data_types.repository import Repository\nfrom data_types.user import User\nfrom .base import EventBase\n\n\nclass EventWatch(EventBase):\n\n def __init__(self, sdk):\n super(EventWatch, self)...
python
edit
3
2
mit
d8369ebff8f4622fe83308e7e65c7120a00e5768
codex-bot/github
github/events/watch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\ntry:\n from django.utils import timezone\nexcept ImportError:\n from datetime import datetime as timezonefrom logicaldelete import managers\n\n\nclass Model(models.Model):\n \"\"\"\n This base mod...
python
edit
1
5
bsd-3-clause
7c3c9e2ab7be0d91b4edc3d15d50cc1245941e47
angvp/django-logical-delete,angvp/django-logical-delete
logicaldelete/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\nimport sys\nfrom pprint import pprint\n\ndef loadJSON(fInput):\n with open(fInput) as f:\n return json.load(f)\n return None\n\nif __name__ == '__main__':\n filePath = 'data/example.json'\n data = ...
python
edit
4
1
apache-2.0
9f44c09dcb3ce3bd0bec591597e892d4037936f9
kilikkuo/kernel-mapper,PyOCL/kernel-mapper
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.checks import Error, Tags, register\n\nfrom axes.conf import settings\n\n\nclass Messages:\n CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE'\n\n\nclass Hints:\n CACHE_INVALID = (\n 'django...
python
edit
1
3
mit
7f9f98cedb4693e0b5a4c7297d16757224a4e71e
django-pci/django-axes,jazzband/django-axes
axes/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom prompt_toolkit.validation import Validator, ValidationError\nfrom six import string_types\n\n\nclass SentenceValidator(Validator):\n \"\"\"\n Validate input only when it appears in this li...
python
edit
1
4
bsd-3-clause
56ee5ac8225ffb7320c2b640160d0860dba3dee6
melund/python-prompt-toolkit,jonathanslenders/python-prompt-toolkit
prompt_toolkit/contrib/validators/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport numpy as np\n\nfrom catchment_cutter import get_grid_cells\n\ndef create_grids(catchments, in_directory, out_directory, grid_file):\n \"\"\"\n Create grid files for the supplied catchments.\n\n :param catc...
python
edit
1
2
bsd-3-clause
c83dcddd7451d53214cf02f9ad72e280970a2dc8
amacd31/hydromet-toolkit,amacd31/hydromet-toolkit
hydromet/catchments.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conjureup import controllers\nfrom conjureup.app_config import app\n\n\nclass BaseVSphereSetupController:\n def __init__(self):\n # Assign current datacenter\n app.provider.login()\n for dc in app.provider.clien...
python
edit
1
3
mit
5586ea0d038365b38b2e2d1fa68ae2c77569146c
Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up,ubuntu/conjure-up,Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,conjure-up/conjure-up
conjureup/controllers/vspheresetup/common.py
rejected_duplicate
Near-duplicate of sample 1364
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Chord(object):\n # TODO: doctring\n def __init__(self, root_note):\n # TODO: doctring\n # TODO: validation\n self.notes = [root_note]\n \n def root(self):\n # TODO: doctring\n return self...
python
edit
1
5
mit
8a947bda06142ba60cac08aee380e723398e5150
charlottepierce/music_essentials
music_essentials/chord.py
accepted
null
true