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\n_ORGANIZATION = 'mesonbuild'\n_RESTRICTED_PROJECTS = [\n 'meson',\n 'meson-ci',\n 'mesonwrap',\n 'wrapweb',\n]\n_RESTRICTED_ORG_PROJECTS = [\n _ORGANIZATION + '/' + proj for proj in _RESTRICTED_PROJECTS\n]\n\n\ndef is_wrap_pr...
python
edit
1
1
apache-2.0
8307188a5cbaf0dab824b58a6436affdea1b039b
mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb
mesonwrap/inventory.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\nimport os\n# setup paths to the test data\n# can specify a single file or a list of files\n\n\ndef get_package_data():\n paths = [os.path.join('data', '*.fit')]\n # fina...
python
edit
1
1
bsd-3-clause
df3ab8bcae326ceb157106d076eaa90f13717107
imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery
astroquery/astrometry_net/tests/setup_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport npc\nimport pytest\n\n@pytest.fixture(scope=\"module\")\ndef character():\n char = npc.character.Character()\n char.append('description', 'Fee fie foe fum')\n char.append('type', 'human')\n return char\n\n```\n\nApply thi...
python
edit
1
1
mit
9ce5a020ac6e9bbdf7e2fc0c34c98cdfaf9e0a45
aurule/npc,aurule/npc
tests/formatters/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom find_password import find_password\n\n\nclass TestFindPassword(unittest.TestCase):\n def test_find_password(self):\n assert find_password('abc', length=8) == '18f47a30'\n\n```\n\nApply this change: Add test...
python
edit
1
1
mit
a2f4b30cab3dafe119e42181772f4d77b575ec0e
machinelearningdeveloper/aoc_2016
05/test_find_password.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nExample settings module.\n\nThis should be copied as `settings.py` and the values modified there.\n\nThat file is ignored by the repo, since it will contain environment\nspecific and sensitive information (like passwords).\n\"\"\"\n...
python
edit
4
1
mit
205682120cfa77aca2b279e2ee87065e489b5e69
AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files
settings_example.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom tsstats.config import load\n\n\n@pytest.fixture\ndef config():\n return load()\n\n\ndef test_config(config):\n assert not config.getboolean('General', 'debug')\n assert config.getboolean('General', 'onlinedc')...
python
edit
1
1
mit
962fd486afe25031d5fb6332f623e970b694b321
Thor77/TeamspeakStats,Thor77/TeamspeakStats
tsstats/tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRepresents the default values for all Sentry settings.\n\"\"\"\n\nimport logging\nimport os\nimport os.path\n\nclass PlayaConfig(object):\n ROOT = os.path.normpath(os.path.dirname(__file__))\n\n DEBUG = True\n\n SQLITE3_DAT...
python
edit
3
0
apache-2.0
6943bb0c665cd40e7516b7277fe55af95b814ccb
disqus/playa,disqus/playa
playa/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport platform\nimport sys\n\nBASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'c01b10faf0d478e48f537210ec263fabd551578d'\n\nARCH = {\n 'cygwin': '32bit',...
python
edit
2
1
mit
e64101e31fadaf54f8c1d7a6acb9b302060efefc
wan-qy/electron,deed02392/electron,John-Lin/electron,aliib/electron,nicobot/electron,Andrey-Pavlov/electron,leethomas/electron,Jonekee/electron,simongregory/electron,leolujuyi/electron,michaelchiche/electron,greyhwndz/electron,sircharleswatson/electron,jacksondc/electron,jsutcodes/electron,bpasero/electron,tylergibson/...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 3285
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport time\nfrom enum import Enum\nfrom threading import Thread\nfrom typing import NewType\n\nimport _thread\nfrom robot.board import Board\n\nZone = NewType('Zone', int)\n\nLOGGER = logging.getLogger(__name__)\n\n\ndef ki...
python
edit
1
1
mit
8639f91fba318c4b8c64f7c25885f8fe95e0ebe4
sourcebots/robot-api,sourcebots/robot-api
robot/game.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport unittest\n\nfrom hamcrest import *\nfrom splinter import Browser\n\nfrom support.stub_server import HttpStub\n\n\nclass test_create_pages(unittest.TestCase):\n\n def setUp(self):\n HttpStub.start()\n tim...
python
edit
4
1
mit
fc7aac4f68c4b694162ed146b8b5ab2b4401895c
alphagov/transactions-explorer,gds-attic/transactions-explorer,gds-attic/transactions-explorer,gds-attic/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,alphagov/transactions-explorer
test/features/test_create_pages.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dataclasses import dataclass\nfrom typing import List, Tuple\n\nfrom zeus.exceptions import UnknownRevision\nfrom zeus.models import Repository, Revision\nfrom zeus.vcs import vcs_client\n\n\n@dataclass\nclass RevisionResult:\n sha:...
python
edit
1
6
apache-2.0
209fef39f72a625e154f4455eaa6754d6a85e98b
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
zeus/utils/revisions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Doc string to end all doc strings\"\"\"\n\n\ndef quick_srt(un_list):\n _helper(un_list, 0, len(un_list)-1)\n\n\ndef _helper(un_list, first, last):\n if first < last:\n split = _split(un_list, first, last)\n _helper...
python
edit
1
7
mit
adc3fa70c32bce764a6b6a7efd7a39c349d3a685
jonathanstallings/data-structures
quick_sort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nclass ResponseCodes(object):\n SUCCESS = 0\n\n USER_CODE_START = 1\n USER_CODE_END = 0x7fffffff\n\n RESERVED_CODE_START = 0x80000000\n MALFORMED_RESPONSE = RESERVED_CODE_START\n REQUEST_ENCODING_FAILURE = RESERVED_CODE...
python
edit
1
3
mit
d5a578e6b72fae3c92827895055ed32baf8aa806
cbigler/jackrabbit
coney/response_codes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add js2xml.parse() method that wraps the slimit visitor/xml-builder" }, { "role": "assistant", "content": "import lxml.etree\nfrom slimit.parser import Parser\nfrom js2xml.xmlvisitor import XmlVisitor\n\n_parser = Parser()\n_visi...
python
new_file
3
1
mit
437c8b59148ccb31ac7480ab6c9e9784e2dd6295
redapple/js2xml,redapple/js2xml,redapple/js2xml,redapple/js2xml
js2xml/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n'''Model in MVC\n\n:requires: `elixir <http://elixir.ematia.de/>`__\n'''\n\n# Ignore the SA string type depr warning\nfrom sqlalchemy.exceptions import SADeprecationWarning\nfrom warnings import filterwarnings\nfilterwarn...
python
edit
6
0
mit
290f0beb0103ee8f8d3d59bf2fabc227ed743d30
rsms/smisk,rsms/smisk,rsms/smisk
lib/smisk/mvc/model.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import db\n\n\nclass Essay(db.Model):\n __tablename__ = 'essays'\n id = db.Column(db.Integer, primary_key=True)\n text = db.Column(db.Text)\n time = db.Column(db.DateTime(True))\n score = db.Column(db.Float)\n spell...
python
edit
1
1
apache-2.0
32d23eb7764178cedcf6b648f959fbf49d7ff657
kigawas/essai,kigawas/essai
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.scoring_engine.web.web_test import WebTest\n\n\nclass TestAuth(WebTest):\n\n def test_login_page_auth_required(self):\n resp = self.client.get('/login')\n assert resp.status_code == 200\n\n def test_unauthoriz...
python
edit
1
1
mit
80b8ef8b227baa1f4af842716ebfb83dcabf9703
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
tests/scoring_engine/web/views/test_auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport simplejson as json\n\nfrom django.http import HttpResponse\n\nclass JSONResponseMixin(object):\n \"\"\"\n A Mixin that renders context as a JSON response\n \"\"\"\n def render_to_response(self, context):\n \"\"\"\n...
python
edit
1
1
mit
d36ac9a113608aadbda79c724f6aa6f6da5ec0bd
haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter,haematologic/cellcounter
cellcounter/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ndialogKit: easy bake dialogs\n\"\"\"\n\n# determine the environment\ntry:\n import FL\n haveFL = True\nexcept ImportError:\n haveFL = False\ntry:\n import vanilla\n haveVanilla = True\nexcept ImportError:\n haveVan...
python
edit
2
0
mit
845192bb91a2421c54a9bbb924e1e09e700aee66
anthrotype/dialogKit,daltonmaag/dialogKit,typesupply/dialogKit
Lib/dialogKit/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport pyfds as fds\n\n\ndef test_dimension():\n dim = fds.Dimension(3, 0.1)\n assert np.allclose(dim.vector, np.asarray([0, 0.1, 0.2]))\n assert dim.get_index(0.1) == 1\n\n```\n\nApply this change: Add test cas...
python
edit
1
1
bsd-3-clause
85e10e4c4eaf46ed89bc4b148b9c483df79cf410
emtpb/pyfds
test/test_fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.loaders.base import BaseLoader\n\nDEFAULT_SETTINGS = {\n \"DEBUG\": False,\n \"DATABASE_ENGINE\": \"sqlite3\",\n \"DATABASE_NAME\": \"celery.sqlite\",\n \"INSTALLED_APPS\": (\"celery\", ),\n}\n\n\ndef wanted_module_i...
python
edit
2
5
bsd-3-clause
a23774fe4646db1bf4b25cf67d855dcc4cc4c8f7
ask/celery,frac/celery,mitsuhiko/celery,ask/celery,cbrepo/celery,frac/celery,mitsuhiko/celery,WoLpH/celery,WoLpH/celery,cbrepo/celery
celery/loaders/default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport tempfile\nfrom contextlib import contextmanager\nimport os\nimport zlib\n\nfrom mock import MagicMock\n\nfrom ... import core\nfrom ...core.application_base import A...
python
edit
1
4
bsd-3-clause
b704a92c919d7fa950a65ee0c569864c4549331f
saimn/glue,stscieisenhamer/glue,JudoWill/glue,saimn/glue,JudoWill/glue,stscieisenhamer/glue
glue/core/tests/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Producer(object):\n \"\"\"\n Base class for producers. __init__ must be called by inheriting classes.\n\n Inheriting classes must implement:\n - ``_run`` - to run the producer\n - ``configure(jvm, *options)`` - to c...
python
edit
4
3
mit
8ec8929595bd7c4d9b794fe016da64532e517a53
fhirschmann/penchy,fhirschmann/penchy
producers/producers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nAPP_ENGINE = True\nENABLE_JAS...
python
edit
1
0
apache-2.0
349bb1ce2c15239ae3f9c066ed774b20369b9c0d
NejcZupec/ggrc-core,uskudnik/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,hasanalom/ggrc-core,andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,vladan-m/ggrc-core,jmakov/ggrc-core,prasannav7/ggrc-core,vladan-m/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/...
src/ggrc/settings/app_engine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .interface import get_method\nfrom .archive import *\nfrom .importers import *\nfrom .readers import *\n\n```\n\nApply this change: Add missing import of the exporters module" }, { "role": "assistant", "content": "from .int...
python
edit
7
0
bsd-3-clause
17fe6d36a34218e74b53e9617212f0e67b05297d
pySTEPS/pysteps
pysteps/io/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport setuptools_scm\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'rst.linker',\n]\n\n# General information about the project.\nproject = 'pytest-runner'\ncopyright = '2015,2016 Jason...
python
edit
1
0
mit
5277d6d5caf075ce6fbb8d46c558bdc29eb62e19
pytest-dev/pytest-runner
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc...
python
edit
1
0
bsd-3-clause
a703bed82bb2cfcf8b18b5e651bd2e992a590696
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
numpy/_array_api/_types.py
rejected_duplicate
Near-duplicate of sample 2280
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom sys import exit\n\ntry:\n import sympy\nexcept ImportError:\n print(\"SymPy must be installed for the tutorial\")\n\nif sympy.__version__ != '1.1':\n print(\"SymPy 1.1 is required for the tutorial. Not...
python
edit
6
0
bsd-3-clause
cd199c379145c6dcabd66f1771397c82e445c932
sympy/scipy-2017-codegen-tutorial,sympy/scipy-2017-codegen-tutorial,sympy/scipy-2017-codegen-tutorial,sympy/scipy-2017-codegen-tutorial,sympy/scipy-2017-codegen-tutorial
test_installation.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom twisted.internet.defer import DeferredQueue\n\nclass Empty(Exception):\n pass\n\nclass Closed(Exception):\n pass\n\nclass TimeoutDeferredQueue(DeferredQueue):\n\n END = object()\n\n def _timeout(self, defer...
python
edit
1
3
apache-2.0
39077720e2fcc340b0cc26a4720aa8d895c53263
williamsjj/txamqp,dotsent/txamqp,txamqp/txamqp
src/txamqp/queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom moksha.api.widgets.live import LiveWidget\n\nclass HelloWorldWidget(LiveWidget):\n topic = \"helloworld\"\n template = \"\"\"\n <b>Hello World Widget</b>\n <ul id=\"data\"/>\n \"\"\"\n onmessage = \"\"\"\n ...
python
edit
1
0
apache-2.0
74a2e0825f3029b6d3a3164221d11fbdf551b8d1
ralphbean/moksha,ralphbean/moksha,lmacken/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,ralphbean/moksha,pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha
demo/demo/widgets/live.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom polyaxon.config_settings.cors import *\nfrom polyaxon.config_settings.dirs import *\nfrom polyaxon.config_settings.k8s import *\nfrom polyaxon.config_settings.spawner import *\nfrom polyaxon.config_settings.registry import *\nfrom .app...
python
edit
8
0
apache-2.0
517bb590edb65baedc603d8ea64a5b6f5988f076
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/polyaxon/config_settings/scheduler/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.db.utils import OperationalError, ProgrammingError, IntegrityError\n\n\nclass CommonConfig(AppConfig):\n name = 'common'\n\n def ready(self):\n\n \"\"\" Will be called when the Com...
python
edit
5
1
mit
4a8170079e2b715d40e94f5d407d110a635f8a5d
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree
InvenTree/common/apps.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom webassets.bundle import get_all_bundle_files\n\nfrom jarbas.frontend.assets import elm\n\n\nclass TestDependencies(TestCase):\n\n def test_dependencies(self):\n files = set(get_all_bundle_fil...
python
edit
1
1
mit
26581b24dd00c3b0a0928fe0b24ae129c701fb58
datasciencebr/jarbas,rogeriochaves/jarbas,Guilhermeslucas/jarbas,marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,Guilhermeslucas/jarbas,datasciencebr/jarbas,Guilhermeslucas/jarbas,rogeriochaves/jarbas,rogeriochaves/jarbas,Guilhermeslucas/jarbas,datasciencebr/jarb...
jarbas/frontend/tests/test_bundle_dependecies.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core import management\nimport pytest\nfrom model_mommy import mommy\nimport time\n\nfrom example.app.models import SimpleObject\n\n\n@pytest.mark.django_db\ndef test_get(es_client):\n\n management.call_command(\"sync_es\")\n...
python
edit
1
1
mit
ec42a3cfcb491b265c87160ed9dae0005552acb4
theonion/djes
tests/test_result.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom style_grader_functions import *\n\n#TODO: Set up standard error to print properly\ndef main():\n student_file_names = get_arguments(sys.argv[1:])\n sys.stderr = codecs.StreamReaderWriter(sys.stderr,\n ...
python
edit
3
4
mit
7eeb990644f387741ff4c217e1eaeddbe250988f
vianuevm/cppStyle,vianuevm/cppStyle,vianuevm/cppStyle,vianuevm/cppStyle
style_grader_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom nova import utils\n\ndef setup(app):\n rootdir = os.path.abspath(app.srcdir + '/..')\n print \"**Autodocumenting from %s\" % rootdir\n rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)\n prin...
python
edit
3
1
apache-2.0
56856ac1103ec9f3ba0f2da81832a59e7e773256
blueboxgroup/nova,BeyondTheClouds/nova,russellb/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,SUSE-Cloud/nova,termie/nova-migration-demo,shahar-stratoscale/nova,rajalokan/nova,devendermishrajio/nova_test_latest,aristanetworks/arista-ovs-nova,NoBodyCam/TftpPxeBootBareMetal,virtualopensystems/nova,dims/nova,bclau/nova,good...
doc/ext/nova_autodoc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport docker\n\nfrom webcomix.docker import DockerManager\n\ndef test_no_javascript_spawns_no_container():\n manager = DockerManager(False)\n manager.__enter__()\n manager.client = docker.from_env()\n assert manager._get_contai...
python
edit
1
3
mit
ed46ee16ed1b8efcee3697d3da909f72b0755a13
J-CPelletier/webcomix,J-CPelletier/webcomix
webcomix/tests/test_docker.py
rejected_duplicate
Near-duplicate of sample 11327
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url\n\nurlpatterns = patterns(\n 'goog.views',\n url('^__goog__/(?P<path>.*)$', 'serve_closure',\n name='goog_serve_closure'),\n # FIXME(andi): That's a bit ugly to cover third...
python
edit
1
0
bsd-3-clause
baabb3a84418516e5a76a61b334b7879737b3d4b
andialbrecht/django-goog
goog/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom django.core.management import BaseCommand\n\nfrom corehq.apps.app_manager.dbaccessors import get_build_doc_by_version, wrap_app\nfrom corehq.apps.app_manager.m...
python
edit
1
4
bsd-3-clause
16b07dd961cbe55ee452ed6057048ec452ffbd72
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/icds/management/commands/copy_icds_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nVery basic implementation of an event loop\n==========================================\n\nThe eventloop is a singleton to schedule and run events.\n\nExports\n-------\n\n- ``EventLoop``: the basic eventloop\n\n\"\"\"\n\nimport asy...
python
edit
5
1
mit
6f356a94c56053b47fb38670a93e04f46740f21e
waltermoreira/tartpy
tartpy/eventloop.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.db import OperationalError\n\n\nclass ApiTestUtils(TestCase):\n def test_db_timeout(self):\n from api.view_utils import db_timeout\n\n @db_timeout(1)\n def do_long_runnin...
python
edit
1
1
mit
39b5f794503149351d03879083d336dfe5f2351b
ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc
openprescribing/frontend/tests/test_api_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function to load data from nodes files" }, { "role": "assistant", "content": "import os\nimport json\n\nfrom kitchen.settings import KITCHEN_LOCATION\n\ndef load_nodes():\n retval = {}\n nodes_dir = os.path.join(KITCHEN...
python
new_file
1
2
apache-2.0
bed98e0769d067857dadf69079dc049d76d65fd0
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
kitchen/lib/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pkg_resources import get_distribution\n\n__version__ = get_distribution('serfclient').version\n\nfrom serfclient.client import SerfClient\n\n```\n\nApply this change: Move module level import to top of file (PEP8)\n\nError: E402 module...
python
edit
3
0
mit
d108f090f198cba47083225c0de46e77b22ab5cc
charleswhchan/serfclient-py,KushalP/serfclient-py
serfclient/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage\nimport threading\n\n\nclass OutputFileQueue(object):\n\n def __init__(self, fp):\n self.fp = fp\n self.lock = threading.RLock()\n\n def enqueue...
python
edit
1
3
mit
01a8fcb70ea75d854aaf16547b837d861750c160
tilezen/tilequeue,mapzen/tilequeue
tilequeue/queue/file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom __future__ import print_function\n\nimport os\nimport time\nimport subprocess\nimport sys\n\nWAIT = 30\n\ndef main():\n directory = sys.argv[1]\n url = os.environ['RSYNC_URL']\n while True:\n fname...
python
edit
1
6
mit
27467c09abe01a6e6a2b66f9f7553bb36cb8a977
Frogging101/ArchiveBot,emijrp/ArchiveBot,emijrp/ArchiveBot,Frogging101/ArchiveBot,Asparagirl/ArchiveBot,ArchiveTeam/ArchiveBot,JesseWeinstein/ArchiveBot,falconkirtaran/ArchiveBot,emijrp/ArchiveBot,Frogging101/ArchiveBot,JesseWeinstein/ArchiveBot,Asparagirl/ArchiveBot,Frogging101/ArchiveBot,emijrp/ArchiveBot,emijrp/Arch...
uploader/uploader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom devito import SubsampledDimension, Grid, TimeFunction, Eq, Operator\nfrom devito.tools import pprint\n\n\ndef test_subsampled_dimension():\n nt = 10\n grid = Grid(shape=(11, 11))\n x, y = grid.dimensions\n time = grid.time_...
python
edit
4
1
mit
375fd952e4495a07cb2031c7d380bdb4a535defc
opesci/devito,opesci/devito
tests/test_dimension.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import scoped_session, sessionmaker\nfrom sqlalchemy.ext.declarative import declarative_base\nimport config as cfg\n\nclass DB(object):\n engine = None\n db_session = None\n ...
python
edit
5
2
bsd-2-clause
5456ae0af9ad83b8e0339c671ce8954bb48d62cf
jkossen/imposter,jkossen/imposter
database.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom serfclient import result\n\n\nclass TestSerfResult(object):\n def test_initialises_to_none(self):\n r = result.SerfResult()\n assert r.head is None\n assert r.body is None\n\n def test_provid...
python
edit
1
1
mit
7f2e91064eabc020cbe660639713278fc187a034
charleswhchan/serfclient-py,KushalP/serfclient-py
tests/test_result.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=UTF-8\nfrom squarespace import Squarespace\n\n\ndef test_squarespace():\n store = Squarespace('test')\n assert store.api_key == 'test'\n assert store.useragent == 'Squarespace python API v0.0.1 by Zach White.'\n\n\ndef tes...
python
edit
1
1
mit
b26aaf9bdc80760236d4369f67ea803becc733b7
skullydazed/squarespace-python,skullydazed/squarespace-python
test_squarespace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"A series of pytest tests to test the quality\nof our Queue class and its methods\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport pytest\nimport queue\n\n\n@pytest.fixture(scop...
python
edit
10
2
mit
0e5b0ccb7eb79fe68b8e40ad46d8e2e0efa01ba7
jesseklein406/data-structures
test_queue.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .base import Base as Settings\n\n\nclass Testing(Settings):\n # Database Configuration.\n # --------------------------------------------------------------------------\n DATABASES = {\n 'default'...
python
edit
1
0
apache-2.0
a9cd0a385253cef42d03d6a45e81ef4dd582e9de
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/settings/testing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nimport copy\n\nclass Message(object):\n def __init__(self, backend, caller=None, text=None):\n self._backend = backend\n self.caller = caller\n self.text = text\...
python
edit
1
2
bsd-3-clause
667f92e8686fd1eb004a7c608acb45c70a9dd2f0
lsgunth/rapidsms,rapidsms/rapidsms-core-dev,dimagi/rapidsms-core-dev,ken-muturi/rapidsms,ehealthafrica-ci/rapidsms,catalpainternational/rapidsms,eHealthAfrica/rapidsms,dimagi/rapidsms-core-dev,caktus/rapidsms,catalpainternational/rapidsms,rapidsms/rapidsms-core-dev,lsgunth/rapidsms,ehealthafrica-ci/rapidsms,peterayeni/...
lib/rapidsms/message.py
rejected_duplicate
Near-duplicate of sample 3261
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.config_defaults\n~~~~~~~~~~~~~~~~~~~~~~\n\nDefault configuration values\n\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nfrom datetime import timedelta\nfrom pat...
python
edit
1
0
bsd-3-clause
211ee03b811cb196dd9f36026fcfc6e75dda2ec6
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/config_defaults.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom stack import Element\nfrom stack import Stack\n\n\ndef test_element_init():\n n = Element()\n assert n.val is None\n assert n.next is None\n n = Element(3)\n assert n.val == 3\n assert n.next is None\n\...
python
edit
1
1
mit
26de6c5decac3345dee470a0968926a65d3497b9
constanthatz/data-structures
test_stack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\n__all__ = ['Notifier', 'NotifierEvent']\n\n\nclass NotifierEvent(object):\n TASK_STARTED = 0\n TASK_FINISHED = 1\n TASK_QUEUED = 2\n\n\nclass Notifier(object):\n DEFAULT_EVENTS = [Notifi...
python
edit
1
1
apache-2.0
9e365b0738a6fcd5f0f67375288cf8bea771c6eb
rshk/freight,getsentry/freight,rshk/freight,klynton/freight,getsentry/freight,getsentry/freight,klynton/freight,getsentry/freight,rshk/freight,getsentry/freight,klynton/freight,klynton/freight,rshk/freight
freight/notifiers/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nfrom django.core import management\nmanagement.call_command('test', 'resources', 'forms', 'tokens')\n\n```\n\nApply this change: Allow apps to be specified from the com...
python
edit
1
0
bsd-2-clause
151c97a3a5cd0f9103c891ee9c60f3fe52fc3d12
chop-dbhi/serrano,chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night
test_suite.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n\"\"\"\nSet the firewall to allow access to configured HTTP(S) proxies.\nThis is only necessary until rBuilder handles the EC2 image posting\nand registration process.\n\"\"\"\nimport os, sys, urllib, urlparse\nfrom con...
python
edit
1
4
apache-2.0
863828c37eca9046a7dd169114e2a6c3e02e28aa
sassoftware/jobmaster,sassoftware/jobmaster,sassoftware/jobmaster
proxy-firewall.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom app import create_app, db\n\n\nclass Base(unittest.TestCase):\n def setUp(self):\n self.app = create_app(\"testing\")\n self.client = self.app.test_client()\n self.user = {\n \"userna...
python
edit
3
1
mit
1243d484009e621338a5fcd609d62bedd9796f05
brayoh/bucket-list-api
tests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.sources.tas import process_from_web\n\n\ndef test_processor():\n tp = process_from_web(affinity_class_limit=10)\n assert tp\n assert tp.statements\n num_stmts = len(tp.statements)\n # This is the total number of st...
python
edit
1
2
bsd-2-clause
6b7e220cdaa403354104aa0fbeabdce8ce37ff13
sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/belpy,bgyori/indra,bgyori/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra
indra/tests/test_tas.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import permissions\n\nclass CustomUserAPIPermission(permissions.BasePermission):\n \"\"\"\n Set custom permission for UserAPI\n\n * GET : only accessible by admin\n * POST : is public, everyone can create ...
python
edit
1
4
mit
dc65920f52ca584608633cc511590b41b590f79e
ioO/billjobs
billjobs/permissions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport json\n\n# Tag an image based on detected visual content which mean running a CNN on top of it.\n# https://pixlab.io/#/cmd?id=tagimg for more info.\n\n# Target Image: Change to any link or switch to POST if you want t...
python
edit
2
0
bsd-2-clause
641e31fcb05016e5fb27e8f115a763b72c7638f3
symisc/pixlab,symisc/pixlab,symisc/pixlab
python/tag_img.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\"\"\"The main application logic for PyTips.\"\"\"\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nimport json\nimport random\n\nfrom flask i...
python
edit
1
1
isc
96ddbd97d1aaf7a373adb04942e2d3d17931a285
gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips
pytips/app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add string representation to GuestPair\n\nSigned-off-by: Jan Losinski <<EMAIL>>" }, { "role": "assistant", "content": "from _pymue import peng, Team, DistanceMatrix, SeenTable, GuestTupleGenerator, GuestPair\n\ndef pair_pprint(pa...
python
new_file
7
1
bsd-3-clause
607728b17c0a79725d997b458a53d1b3d1394a59
janLo/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool
pymue/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport spark\nimport motion\nfrom bot import process_command\nfrom config import config\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\nfrom threading import Thread\nimport time\nimport sys\napp = Flask(__nam...
python
edit
4
3
mit
bf6f77d90c3749983eb0b5358fb2f9fedb7d53da
alwye/spark-pi,alwye/spark-pi
app/main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ubuntui.frame import Frame # noqa\nfrom ubuntui.views import ErrorView\nfrom conjureup import async\nfrom conjureup.app_config import app\nfrom conjureup.ui.views.shutdown import ShutdownView\nfrom ubuntui.ev import EventLoop\n\n\ncla...
python
edit
null
null
mit
28e95a2aad1efc3fa409b273b74e5173b5eba1ad
conjure-up/conjure-up,ubuntu/conjure-up,ubuntu/conjure-up,Ubuntu-Solutions-Engineering/conjure,Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up
conjureup/ui/__init__.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import url\n\nfrom django_adyen import urlpatterns\n\nfrom . import views\n\nurlpatterns = [\n url(r'^payment-done/$', views.PaymentResultView.as...
python
edit
1
0
mit
054503e406146eeff5f8d5437eb7db581eaeb0f2
machtfit/adyen
oscar_adyen/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport dj_database_url\nimport os\n\nALLOWED_HOSTS = ['0.0.0.0']\n\ndb_from_env = dj_database_url.config(conn_max_age=500)\nDATABASES['default'].update(db_from_env)\n\n# Static files (CSS, JavaScript, Images)\n...
python
edit
3
0
mit
96e60f1b56f37d1b953d63bf948cde33d1e04e65
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
halaqat/settings/shaha.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\nimport re\n\nimport aiohttp\nimport lxml.html\n\nfrom seabird.plugin import Plugin\n\n\nclass URLPlugin(Plugin):\n url_regex = re.compile(r'https?://[^ ]+')\n\n def irc_privmsg(self, msg):\n for match in URLPlug...
python
edit
1
6
mit
ab79661216ff972bd696eb568c68ebd221c9a003
belak/pyseabird,belak/python-seabird
seabird/modules/url.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom . import SessionStorage\n\n\nclass SaeKVDBStorage(SessionStorage):\n \"\"\"\n SaeKVDBStorage 使用SAE 的 KVDB 来保存你的session ::\n\n import werobot\n from werobot.session.saekvstorage import SaeK...
python
edit
1
2
mit
3f92ca011d08d69c5443994c79958a5d1f3b7415
whtsky/WeRoBot,FlyRabbit/WeRoBot,whtsky/WeRoBot,adrianzhang/WeRoBot,notwin/WeRoBot,weberwang/WeRoBot,Infixz/WeRoBot,weberwang/WeRoBot,chenjiancan/WeRoBot,Zeacone/WeRoBot,tdautc19841202/WeRoBot,one-leaf/WeRoBot,Zhenghaotao/WeRoBot,kmalloc/WeRoBot,FlyRabbit/WeRoBot,whtsky/WeRoBot,adam139/WeRobot,adam139/WeRobot
werobot/session/saekvstorage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .labapp import LabApp\n\ntry:\n from jupyterhub.singleuser import SingleUserNotebookApp\nexcept ImportError:\n SingleUserLabApp = None\n raise ImportError('You must have jupyterhub installed for this to work.')\nelse:\n cla...
python
edit
1
2
bsd-3-clause
c1fd0f12810be544d12d4bea8ccd0ce9f8a190cc
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
jupyterlab/labhubapp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mangopaysdk.types.payinexecutiondetails import PayInExecutionDetails\n\n\nclass PayInExecutionDetailsDirect(PayInExecutionDetails):\n \n def __init__(self):\n # direct card\n self.CardId = None\n self.Sec...
python
edit
1
1
mit
b5ea9f83fc9422c165663920af1317365a3e6c4d
Mangopay/mangopay2-python-sdk,chocopoche/mangopay2-python-sdk
mangopaysdk/types/payinexecutiondetailsdirect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThese settings are used by the ``manage.py`` command.\n\nWith normal tests we want to use the fastest possible way which is an\nin-memory sqlite database but if you want to create South migrations you\nneed a persistant database.\n\...
python
edit
1
0
mit
7ae4954a40b5b143cadff917456ba67c2653bdb8
andyfangdz/django-asyncmailer,andyfangdz/django-asyncmailer
asyncmailer/tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"calc.py: A simple calculator.\"\"\"\n\nimport sys\n\ndef add_all(nums):\n return sum(nums)\n\ndef multiply_all(nums):\n return reduce(lambda a, b: a * b, nums)\n\nif __name__ == '__main__':\n command = sys.argv[1]\n nums =...
python
edit
2
1
bsd-3-clause
42a523393d6ec2d5dfc80d1b82e2c703e1afa29b
mkuiper/calc-1
calc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# (C) 2015 Jean Nassar\n# Released under BSD version 4\n\"\"\"\nReduce /ardrone/image_color framerate from 30 Hz to 2 Hz.\n\n\"\"\"\nimport rospy\nfrom sensor_msgs.msg import Image\n\n\nclass...
python
edit
1
2
mit
1cd930883b4168f99da0a16d95f370b001126134
masasin/spirit,masasin/spirit
src/reduce_framerate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nConstants used to make the VWS mock and wrapper.\n\"\"\"\n\nfrom constantly import ValueConstant, Values\n\n\nclass ResultCodes(Values):\n \"\"\"\n Constants representing various VWS result codes.\n \"\"\"\n\n AUTHENTICA...
python
edit
1
0
mit
8e9dc62f01f4b6ccaab819d21d92f3d6c53e3e1c
adamtheturtle/vws-python,adamtheturtle/vws-python
src/common/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_talisman import Talisman\nfrom flask_seasurf import SeaSurf\nfrom redditflair.redditflair import redditflair, limiter\nfrom redissession import RedisSessionInterface\nfrom database import db, User, Specia...
python
edit
4
2
mit
d8913869c466bea4e301e8502decdc01f6d9987e
competitiveoverwatch/RankVerification,competitiveoverwatch/RankVerification
cowserver.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n__version__ = '0.4.6'\n\n```\n\nApply this change: Bump minor version to 0.5.0" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n__version_...
python
edit
1
0
mit
990158b8fd0407129f776b6d28989b7717c331f5
KitB/compose-mode
compose_mode/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cms.admin import PageBaseAdmin, SearchMetaBaseAdmin\nfrom django.contrib import admin\n\nfrom .models import Person, Team\n\n\n@admin.register(Person)\nclass PersonAdmin(SearchMetaBaseAdmin):\n\n prepopulated_fields = {\"url_title\"...
python
edit
1
0
mit
c1ac7c357d5a7ce3e96af9b4356fc2f0493e2b1d
onespacemedia/cms-people,onespacemedia/cms-people
apps/people/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urlparse\n\nfrom django.test import TestCase, override_settings\nfrom django.conf import settings\nfrom mock import patch, Mock\n\nfrom opendebates.context_processors import global_vars\nfrom opendebates.tests.factories import Submis...
python
edit
1
1
apache-2.0
d9ef4c798e50de12cc4ab41fa470cd0e04d77322
ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates
opendebates/tests/test_context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kat.harness import Runner\n\nfrom abstract_tests import AmbassadorTest\n\n# Import all the real tests from other files, to make it easier to pick and choose during development.\n\nimport t_basics\nimport t_extauth\nimport t_grpc\nimpor...
python
edit
24
0
apache-2.0
ff4e92fc75392a5c3ed2a91591369046ba59f2a3
datawire/ambassador,datawire/ambassador,datawire/ambassador,datawire/ambassador,datawire/ambassador
ambassador/tests/test_ambassador.py
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Last Change: Sat Jun 09 07:00 PM 2007 J\n\n#========================================================\n# Constants used throughout the module (def args, etc...)\n#========================================================\n# This is the defa...
python
edit
1
0
bsd-3-clause
d97144e2b45750c416d3adbf9f49f78bfa8e7e6e
scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor
Lib/sandbox/pyem/misc.py
rejected_duplicate
Near-duplicate of sample 14480
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom core import utils\n\n\nclass SlugifyOC(TestCase):\n\n def test_oc_slugify(self):\n\n lst = (\n ('test.this.value', 'test-this-value'),\n ('Plone.OpenComparison', 'plon...
python
edit
1
2
mit
8a51446ee8833c3472d9f97cc29a58dd42d872b8
QLGu/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,QLGu/djangopackages,pydanny/djangopackages,pydanny/djangopackages,QLGu/djangopackages,pydanny/djangopackages
core/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom location_field.models.plain import PlainLocationField\n\n\nclass Place(models.Model):\n parent_place = models.ForeignKey('self', null=True, blank=True)\n city = models.CharField(max_length=255)\n ...
python
edit
1
0
mit
9948b5a2930cd2e6f13383bd969a33f6fc655936
caioariede/django-location-field,voodmania/django-location-field,voodmania/django-location-field,caioariede/django-location-field,voodmania/django-location-field,caioariede/django-location-field
example/dlf_app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.contrib.contenttypes.fields import GenericForeignKey\n\n\nclass TaggedItem(models.Model):\n ...
python
edit
1
1
mit
0fc6394e156246367bdee26b03ca94bfebb21545
FactoryBoy/factory_boy
examples/django_demo/generic_foreignkey/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import mock\n\nimport pytest\n\nimport aiozk.connection\n\n\n@pytest.fixture\ndef connection(event_loop):\n connection = aiozk.connection.Connection(\n host='zookeeper.test',\n port=2181,\n watch_handle...
python
edit
1
1
mit
c4eef5919fa60c87b59d60c1bd005f97183ce057
tipsi/aiozk,tipsi/aiozk
aiozk/test/test_connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreates an admin user if there aren't any existing superusers\n'''\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.contrib.auth.models import User\nfrom optparse import make_option\n\n\nclass Command(B...
python
edit
3
4
apache-2.0
f9c51c592483ab08417d4df33898d32f7700ffe9
salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal
sal/management/commands/update_admin_user.py
rejected_duplicate
Near-duplicate of sample 1885
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCreate an ANDS RIF-CS XML file.\n\nLinks\n-----\n\n- http://ands.org.au/guides/cpguide/cpgrifcs.html\n\n- http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html\n\n- http://www.ands.org.au/resource/rif-cs.html\n\"\"\...
python
edit
1
2
mit
c35957b7219f572e80a550893150e8041c5f14b2
AustralianAntarcticDataCentre/metadata_xml_convert,AustralianAntarcticDataCentre/metadata_xml_convert
create_ands_rif_cs_xml.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\n\nSECRET_KEY = 'fake-key'\nHASHID_FIELD_SALT = 'gg ez'\nINSTALLED_APPS = [\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.message...
python
edit
1
0
mit
8e51085d9843b6b78f601ac28a2d01d2fc20cb09
nshafer/django-hashid-field,nshafer/django-hashid-field
tests/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Warns about large files\"\"\"\n\ndef handle_url(bot, user, channel, url):\n\n if channel == \"#wow\": return\n\n # inform about large files (over 5MB)\n size = getUrl(url).getSize()\n\n if not size: return\n \n size ...
python
edit
2
4
bsd-3-clause
4184b9b87a5b2684df47bcf6bb19703ae381ec55
aapa/pyfibot,huqa/pyfibot,rnyberg/pyfibot,EArmour/pyfibot,nigeljonez/newpyfibot,rnyberg/pyfibot,aapa/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,huqa/pyfibot,lepinkainen/pyfibot
modules/module_urlsize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import StringField, SubmitField\nfrom wtforms.validators import Required\n\n\nclass SimpleForm(Form):\n name = StringField('Your name', validators=[Required()])\n submit = SubmitField('Submit')...
python
edit
1
0
mit
b414d74a639151785ef02a9d390e1398b7167886
rustyworks/flask-structure,rustyworks/flask-structure
app/forms/simple_form.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"empty message\n\nRevision ID: 0082_set_international\nRevises: 0080_fix_rate_start_date\nCreate Date: 2017-05-05 15:26:34.621670\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nfrom datetime import datetime\n\nrevision = '0082_...
python
edit
1
3
mit
d1e9586fbbadd8278d1d4023490df3348915b217
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0082_set_international.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom SimpleCV import *\nwinsize = (640,480)\ndisplay = Display(winsize)\n\nvideo = VirtualCamera('stefan_eye.mp4', 'video')\nwhile display.isNotDone():\n a = video.getImage()\n a.rotate(90).invert().toGray().binarize().save(display)\n...
python
edit
6
0
mit
e4841c674545892dfc6a8390574cec7c2836e004
ColdSauce/Iris
main.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\n\nclass Record(object):\n\n def __init__(self, data):\n self.data = data\n self.meta = {}\n if \"_timestamp\" in self.data:\n days_since_week_start = datetime.timedelta(\n ...
python
edit
1
4
mit
029edcfe1769dd65fa2fac566abb5686c5986890
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
backdrop/core/records.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Make strings collectable with gettext tools, but don't trnslate them here:\n_ = lambda x: x\n\n# Transaction types (TRXTYPE)...\nSALE, CREDIT, AUTHORIZATION, DELAYED_CAPTURE, VOID, DUPLICATE_TRANSACTION = (\n 'S', 'C', 'A', 'D', 'V', '...
python
edit
1
0
bsd-3-clause
b6eb5e5ed4c12bea6239a58f76b7c944258c32b5
django-oscar/django-oscar-paypal,evonove/django-oscar-paypal,lpakula/django-oscar-paypal,lpakula/django-oscar-paypal,st8st8/django-oscar-paypal,evonove/django-oscar-paypal,lpakula/django-oscar-paypal,django-oscar/django-oscar-paypal,evonove/django-oscar-paypal,django-oscar/django-oscar-paypal,st8st8/django-oscar-paypal...
paypal/payflow/codes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\n\nimport json\nimport websocket\n\nfrom polyaxon_client.logger import logger\n\n\nclass SocketTransportMixin(object):\n \"\"\"Socket operations tr...
python
edit
4
3
apache-2.0
4e8a9b2520642e3f2204ee3da59a153b61a95160
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon_client/transport/socket_transport.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django page CMS urlconf registry.\"\"\"\n\nfrom django.utils.translation import ugettext as _\n\nclass UrlconfAlreadyRegistered(Exception):\n \"\"\"\n An attempt was made to register a widget for Django page CMS more\n than o...
python
edit
1
3
bsd-3-clause
e120c264f16f89b197ff3416deaefb7f553611db
batiste/django-page-cms,remik/django-page-cms,oliciv/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,oliciv/django-page-cms,pombredanne/django-page-cms-1,remik/django-page-cms,akaihola/django-page-cms,batiste/django-page-cms,batiste/django-page-cms,akaihola/django-page-cms,rem...
pages/urlconf_registry.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a placeholder test so pytest will not report an error" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Unit tests for the 'finder' module.\"\"\"\n\n\ndef test_tbd():\n \"\"\"Placeholder for the first t...
python
new_file
1
1
mit
ed6a69dc2efefdb8cf5e32c9c71b122b6357b1fa
friendlycode/gr-parks,friendlycode/gr-parks,friendlycode/gr-parks,friendlycode/gr-parks
parks/test/test_finder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\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 License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
2
apache-2.0
fc263902e845c21aa3379bf985cef693d30bc56b
stackforge/senlin,openstack/senlin,stackforge/senlin,Alzon/senlin,tengqm/senlin-container,tengqm/senlin-container,openstack/senlin,Alzon/senlin,openstack/senlin
senlin/tests/functional/test_policy_type.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3.5\n\nimport parsl\nfrom parsl import *\n\nparsl.set_stream_logger()\n\nfrom parsl.executors.swift_t import *\n\n\ndef foo(x, y):\n return x * y\n\n\ndef slow_foo(x, y):\n import time\n time.sleep(x)\n retu...
python
edit
7
3
apache-2.0
d7c6a7f78c8620e0e01e57eb082860e90f782a30
Parsl/parsl,swift-lang/swift-e-lab,Parsl/parsl,Parsl/parsl,swift-lang/swift-e-lab,Parsl/parsl
parsl/tests/test_swift.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport json\n\nfrom db import commit_db_item\nfrom db.player import Player\n\n\ndef migrate_players(plr_src_file=None):\n\n if not plr_src_file:\n plr_src_file = os.path...
python
edit
1
3
mit
9d1a5932ad25b075b095f170c1b374e46b6f740b
leaffan/pynhldb
setup/create_players.py
accepted
null
true