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# -*- coding: utf-8 -*-\n\"\"\"\nAn extension for a command-based keyword.\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom Cauldron.types import Boolean, DispatcherKeywordType\nfrom Cauldron.exc import NoWriteNecessary\n\nclass Comm...
python
edit
1
2
bsd-3-clause
4623c8f0de7ff41f78754df6811570a4d4367728
alexrudy/Cauldron
Cauldron/ext/commandkeywords/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport warnings\nwarnings.filterwarnings('ignore', category=DeprecationWarning)\n\n\ndef test_for_version(filename):\n stdin, stdout = os.popen4('%s -V' % filename, 'r')\n response = stdout.read()\n ...
python
edit
2
2
bsd-3-clause
1f253c5bdf90055ff2d00a3b8d18c152c3b7031f
hugoxia/pika,vrtsystems/pika,vitaly-krugl/pika,fkarb/pika-python3,Tarsbot/pika,Zephor5/pika,zixiliuyue/pika,renshawbay/pika-python3,reddec/pika,jstnlef/pika,skftn/pika,pika/pika,shinji-s/pika,knowsis/pika,benjamin9999/pika
versions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sqlite3\nimport sys\n\n# helper\ndef usage():\n sys.stderr.write(\"USAGE: %s [PATH]\\n\" + \\\n \"\\n\" + \\\n \"Prints to stdout the format of the working copy...
python
edit
2
3
apache-2.0
49cd07a337a9a4282455765ef2b5a2445a0f6840
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
tools/dev/wc-format.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf8\n\n\"\"\" \nDescription\n\n.. note::\n Any additional note.\n\"\"\"\n\nfrom __future__ import (absolute_import, print_function, division, unicode_literals)\n\n# See - http://www.python.org/dev/peps...
python
edit
1
0
bsd-3-clause
083a4066ed82065aa1b00cb714a7829dc2571327
orome/crypto-enigma-py
crypto_enigma/_version.py
rejected_duplicate
Near-duplicate of sample 934
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Package for PythonTemplateDemo.\"\"\"\n\n__project__ = 'PythonTemplateDemo'\n__version__ = '0.0.0'\n\nVERSION = __project__ + '-' + __version__\n\nPYTHON_VERSION = 2, 7\n\nimport sys\nif not sys.version_info >= PYTHON_VERSION: # prag...
python
edit
1
0
mit
a90889b773010d2fe2ed1dff133f951c0b5baea4
jacebrowning/template-python-demo
demo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nCopyright (c) 2008-2011, Anthony Garcia <<EMAIL>>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyrigh...
python
edit
1
0
isc
04b7e79ce3fed1afac129098badb632ca226fdee
Lagg/optf2,FlaminSarge/optf2,Lagg/optf2,FlaminSarge/optf2,Lagg/optf2,FlaminSarge/optf2
dispatch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport contextlib\nimport os\n\nfrom libqtile.backend.wayland.core import Core\nfrom test.helpers import Backend\n\nwlr_env = {\n \"WLR_BACKENDS\": \"headless\",\n \"WLR_LIBINPUT_NO_DEVICES\": \"1\",\n \"WLR_RENDERER_ALLOW_SOFTWARE...
python
edit
1
1
mit
e2ca99c9f3548fa0d4e46bdd3b309ebd0e658ffa
ramnes/qtile,ramnes/qtile,qtile/qtile,qtile/qtile
test/backend/wayland/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers as ser\n\nfrom api.base.utils import absolute_reverse\nfrom api.base.serializers import JSONAPISerializer, LinksField\n\n\nclass PreprintProviderSerializer(JSONAPISerializer):\n\n filterable_fields ...
python
edit
1
1
apache-2.0
ee55ce9cc95e0e058cac77f45fac0f899398061e
chrisseto/osf.io,adlius/osf.io,samchrisinger/osf.io,laurenrevere/osf.io,cslzchen/osf.io,mluo613/osf.io,binoculars/osf.io,adlius/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,caneruguz/osf.io,binoculars/osf.io,Nesiehr/osf.io,alexschiller/osf.io,cwisecarver/osf.io,HalcyonChimer...
api/preprint_providers/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport numpy as np\n\nimport xarray as xr\n\nfrom . import TestCase, assert_equal,assert_allclose,requires_numba\n\nfrom oocgcm.oceanfuncs.eos import misc\n\n@requires_numba\ndef test_numpy_spice():\n assert_allclose(misc._spi...
python
edit
7
1
apache-2.0
717339f2cb2aed818729a407009a30de53b62a2c
lesommer/oocgcm
oocgcm/test/test_eos.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom ..views import (\n TagCreate, TagDelete, TagDetail, TagList,\n TagUpdate)\n\nurlpatterns = [\n url(r'^$',\n TagList.as_view(),\n name='organizer_tag_list'),\n url(r'^create/...
python
edit
1
0
bsd-2-clause
208760340d3314f666d7e6437817cc96e0e16194
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/urls/tag.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\n\nfrom Orange.widgets.tests import test_setting_provider, \\\n test_settings_handler, test_context_handler, \\\n test_class_values_context_handler, test_domain_context_handler\nfrom Orange.widgets.data.test...
python
edit
2
2
bsd-2-clause
d60ce9b23bcf2f8c60b2a8ce75eeba8779345b8b
marinkaz/orange3,cheral/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,kwikadi/orange3,cheral/orange3,qusp/orange3,marinkaz/orange3,cheral/orange3,qPCR4vir/orange3,qusp/orange3,qPCR4vir/orange3,marinkaz/orange3,marinkaz/orange3,kwikadi/orange3,cheral/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,q...
Orange/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport sys\nif 'darwin' in sys.platform:\n sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')\nsys.path.append('.')\n\nimport adapter\nadapter.main.run_tcp_server(multi...
python
edit
1
0
mit
92c9383f84385a0ceb2029437d0d77fc041d0353
NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb
tools/debug_adapter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\nfrom django.core.urlresolvers import reverse\nfrom django.views.generic import CreateView\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import messages\n\nfrom .forms import ContactForm\n...
python
edit
1
1
mit
7b3276708417284242b4e0c9a13c6194dcc83aa7
georgeyk/quickstartup,georgeyk/quickstartup,osantana/quickstartup,osantana/quickstartup,osantana/quickstartup,georgeyk/quickstartup
quickstartup/contacts/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\n\nparsers = \"\"\"\nsingtao.STParser\napple.AppleParser\n\"\"\".split()\n\nparser_dict = {}\n\n# Import the parser and fill in parser_dict: domain -> parser\nfor parser_name in parsers:\n module, class_name = parser_nam...
python
edit
1
1
mit
a4c9dd451062b83b907a350ea30f2d36badb6522
code4hk/hk-news-scrapper
parsers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom graphene.types import Scalar\nfrom graphql.language import ast\n\n\nclass AttributesFilterScalar(Scalar):\n\n @staticmethod\n def coerce_filter(value):\n if isinstance(value, tuple) and len(value) == 2:\n return...
python
edit
2
3
bsd-3-clause
12f3bb8c82b97496c79948d323f7076b6618293a
KenMutemi/saleor,KenMutemi/saleor,jreigel/saleor,itbabu/saleor,maferelo/saleor,maferelo/saleor,jreigel/saleor,jreigel/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,car3oon/saleor,itbabu/saleor,UITools/saleor,HyperManTT/ECommerceSaleor,car3oon/saleor,car3oon/saleor,UIToo...
saleor/graphql/scalars.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\nimport json\n\nfrom django.http import HttpResponse, Http404\nfrom django.http.response import JsonResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.views.decorators.csrf import csrf_exempt\n\nfro...
python
edit
1
2
mit
b8ac8edbd12c6b021815e4fa4fd68cfee7dc18cf
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
frigg/builds/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _\n\nKEY_SIZE = 16\nSECRET_SIZE = 16\nVERIFIER_SIZE = 10\nCONSUMER_KEY_SIZE = 256\nMAX_URL_LENGTH = 2083 # http://www.boutell.com/newfaq/misc/urllength.html\n\nPENDING = 1\nACCEPTED = 2\...
python
edit
1
0
bsd-3-clause
dccc51fcc51290648964c350cfff2254cfa99834
e-loue/django-oauth-plus
oauth_provider/consts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Generates the *public* API documentation.\n# Remember to hide your private parts, people!\nimport os, re, sys\n\nproject = 'Exscript'\nbase_dir = os.path.join('..', 'src', project)\ndoc_dir = 'api'\n\n# Create the...
python
edit
4
0
mit
27021bfa7062219a41ad29c40b97643ecf16f72b
knipknap/exscript,maximumG/exscript,knipknap/exscript,maximumG/exscript
doc/mkapidoc.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport unittest\n\nfrom aioes.pool import RandomSelector, RoundRobinSelector\n\n\nclass TestRandomSelector(unittest.TestCase):\n\n def setUp(self):\n random.seed(123456)\n\n def tearDown(self):\n random.se...
python
edit
1
1
apache-2.0
e45fff968f37f558a49cf82b582d1f514a97b5af
aio-libs/aioes
tests/test_pool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom kk.views import (\n HearingCommentViewSet, HearingImageViewSet, HearingViewSet, SectionCommentViewSet,\n SectionViewSet, UserDataViewSet\n)\nfrom rest_framework_nested import routers\n\n...
python
edit
1
0
mit
1305af162dd05591cc0e5328eb192843b63dabb1
City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi
kk/urls_v1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nmylang = 'test'\nfamily = 'wikipedia'\n\n\n# Not defining any extra variables here at all since that causes pywikibot\n# to issue a warning about potential misspellings\nif os.path.exists(os.path.expanduser('~/user-config.py'))...
python
edit
2
0
mit
2f152c5036d32a780741edd8fb6ce75684728824
yuvipanda/paws,yuvipanda/paws
singleuser/user-config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef plotMask(ax, mask, color, **kargs):\n import copy\n m = np.ma.masked_array(mask, ~mask)\n palette = copy.copy(plt.cm.gray)\n palette.set_over(color, 1.0)\n ax.imshow(...
python
edit
1
1
apache-2.0
693dc9d8448740e1a1c4543cc3a91e3769fa7a3e
scholi/pySPM
pySPM/utils/plot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom devicehive import NetworkError\nfrom devicehive import ApiResponseError\n\n\ndef test_save(test):\n\n def handle_connect(handler):\n name = test.generate_id('n-s')\n description = '%s-description' % name\n netwo...
python
edit
3
3
apache-2.0
f549fd217f9d838af1e6f028cdae14119da72fb4
devicehive/devicehive-python
tests/test_api_network.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"The primary module for the program.\n\nVariables:\n __version_info__: A tuple containing the individual parts of the version.\n __version__: The version string.\n\"\"\"\n\nfrom __future__ import unicode_...
python
edit
1
0
mit
a0b7ba97cd996209ce2e9770ba0ec25111c85dd2
contains-io/rcli
rapcom/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom allauth.socialaccount.providers.base import ProviderAccount\nfrom allauth.socialaccount.providers.oauth.provider import OAuthProvider\n\n\nclass TrelloAccount(ProviderAccount):\n def get_profile_url(self):\n return None\n\n ...
python
edit
1
1
mit
c69b9519c2984154dd15d31395d9590e00d689b5
lukeburden/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,bittner/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,bittner/django-allauth,bittner/django-allauth,pennersr/django-allauth,lukeburden/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth
allauth/socialaccount/providers/trello/provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#LIBRARIES\nfrom django.db import models\nfrom django.utils.html import escape\nfrom django.utils.safestring import mark_safe\n\n\nclass CSPReport(models.Model):\n\n class Meta(object):\n ordering = ('-created',)\n\n created = ...
python
edit
1
2
mit
ec1e0cd1fa8bab59750032942643a7abc8700642
adamalton/django-csp-reports
cspreports/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nChatterBot constants\n\"\"\"\n\n'''\nThe maximum length of characters that the text of a statement can contain.\nThis should be enforced on a per-model basis by the data model for each\nstorage adapter.\n'''\nSTATEMENT_TEXT_MAX_LENG...
python
edit
1
0
bsd-3-clause
58fc39ae95522ce152b4ff137071f74c5490e14e
vkosuri/ChatterBot,gunthercox/ChatterBot
chatterbot/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 NEC Corporation. All rights reserved.\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 License at\n...
python
edit
1
0
apache-2.0
c32e87894d4baf404d5b300459fc68a6d9d973c8
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
zun/db/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pkg_resources import safe_version\nimport stagpy\nimport helpers\n\ndef test_init_config_None():\n stagpy.conf.core.path = 'some_path'\n helpers.reset_config()\n assert(stagpy.conf.core.path == './')\n\ndef test_version_format...
python
edit
1
1
apache-2.0
12956febe15e38c8b39edb4e268aa27228a4249f
StagPython/StagPy
tests/test_init.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pytest\n\ntry:\n from django.conf import settings\nexcept ImportError:\n settings = None # NOQA\n\n\ndef is_configured():\n if settings is None:\n return False\n return settings.configured or os.environ...
python
edit
1
3
apache-2.0
2d95f8fe9c9e9edf5b1a0b5dee2992187b0d89ed
pombredanne/pytest-django-lite,dcramer/pytest-django-lite
src/pytest_django_lite/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Like the raw_input built-in, but with bells and whistles.\"\"\"\n\nimport getpass\n\ndef user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False):\n \"\"\"Prompt user for input until a value is retr...
python
edit
1
11
mit
651663d2af72f46e7952d2835126f1512741f635
vmlaker/coils
UserInput.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jul 31 18:29:35 2013\n\n@author: stuart\n\"\"\"\nimport os\nimport glob\n\nwheels = glob.glob(\"./wheelhouse/*whl\")\n\noutf = open(\"./wheelhouse/index.html\",'w')\n\nheader = [\n'<html>\\n',...
python
edit
2
0
bsd-2-clause
eee003627856ce3f0a19ad18c8fe6b0a5408c3b6
kejbaly2/travis_wheels,Cadair/travis_wheels,kejbaly2/travis_wheels,Cadair/travis_wheels
make_index.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.contrib.contenttypes.models import ContentType\nfrom django.db import migrations\n\nfrom nodeconductor.quotas import models as quotas_models\n\nfrom .. import m...
python
edit
1
2
mit
7d3ffe4582a5b4032f9a59a3ea8edfded57a7a1f
opennode/nodeconductor-openstack
src/nodeconductor_openstack/openstack/migrations/0031_tenant_backup_storage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom chatterbot.storage import StorageAdapter\n\n\nclass StorageAdapterTestCase(TestCase):\n \"\"\"\n This test case is for the StorageAdapter base class.\n Although this class is not intended for dir...
python
edit
1
1
bsd-3-clause
1d84a3b58aa752834aed31123dd16e3bfa723609
vkosuri/ChatterBot,gunthercox/ChatterBot
tests/storage_adapter_tests/test_storage_adapter.py
rejected_duplicate
Near-duplicate of sample 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import request, render_template\n\nfrom azdweb import app\nfrom azdweb.util import gh_markdown\n\nroot_path = os.path.abspath(\"markdown\")\n\n# {filename: (mtime, contents)}\ncache = {}\n\n\ndef load(filename):\n ...
python
edit
1
5
apache-2.0
2d584531d043804f3dcf3acf132cb60b463e4c1a
daboross/dabo.guru,daboross/dabo.guru,daboross/dabo.guru,daboross/dabo.guru
azdweb/markdown_serv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.handlers.wsgi import STATUS_CODE_TEXT\nfrom django.template.response import SimpleTemplateResponse\n\n\nclass Response(SimpleTemplateResponse):\n \"\"\"\n An HttpResponse that allows it's data to be rendered into\n ...
python
edit
1
3
bsd-2-clause
3f7371c796a420cc077cf79b210d401c77b77815
kylefox/django-rest-framework,cyberj/django-rest-framework,vstoykov/django-rest-framework,wedaly/django-rest-framework,canassa/django-rest-framework,tomchristie/django-rest-framework,linovia/django-rest-framework,cheif/django-rest-framework,nhorelik/django-rest-framework,jpulec/django-rest-framework,James1345/django-re...
rest_framework/response.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D\n# array instead.\nlist_of_tuples = [(1, 2), (3, 4)]\nimport numpy as np\nprint('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples))\nA = np.array(l...
python
edit
1
0
mit
bd1df334d68c82b0fc57b4c20da7844155382f83
cmey/surprising-snippets,cmey/surprising-snippets
numpy-array-of-tuple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nimport numpy as np\n\nfrom constraints import (generate_constraints_function,\n generate_constraint_gradients_function, )\nfrom robot_arm import RobotArm\n\n\nclass TestConstraintFunctions(unittest...
python
edit
1
1
mit
973641c7d68f4b1505541a06ec46901b412ab56b
JakobGM/robotarm-optimization
tests/test_constraints.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\nimport pycuda.gpuarray as gpuarray\n\nfrom chain import Function\n\nclass ReLU(Function):\n \"\"\"Rectified Linear Unit.\"\"\"\n # TODO(beam2d): Implement in-place version.\n\n def forward_cpu(self, x):\n retur...
python
edit
3
1
mit
b503881ae6229bddd7ef65d95f9c38d6d0ad5ec2
jnishi/chainer,chainer/chainer,masia02/chainer,truongdq/chainer,umitanuki/chainer,cemoody/chainer,ronekko/chainer,ttakamura/chainer,okuta/chainer,laysakura/chainer,kikusu/chainer,keisuke-umezawa/chainer,hvy/chainer,wavelets/chainer,hvy/chainer,niboshi/chainer,ikasumi/chainer,kashif/chainer,wkentaro/chainer,ysekky/chain...
chain/functions/relu.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyxform.tests_v1.pyxform_test_case import PyxformTestCase\n\n\nclass AuditTest(PyxformTestCase):\n def test_audit(self):\n self.assertPyxformXform(\n name=\"meta_audit\",\n md=\"\"\"\n | surve...
python
edit
1
1
bsd-2-clause
096800e08d29581e5a515dd01031c64eb2f01539
XLSForm/pyxform,XLSForm/pyxform
pyxform/tests_v1/test_audit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.http import HttpRequest\nfrom campaigns.views import create_campaign\nfrom campaigns.models import Campaign\nfrom campaigns.forms import CampaignForm\n\nclass HomePageTest(TestCase):\n\n\tdef te...
python
edit
3
1
apache-2.0
baf09f8b308626abb81431ddca4498409fc9d5ce
Springsteen/tues_admission,Springsteen/tues_admission,Springsteen/tues_admission,Springsteen/tues_admission
campaigns/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery import Celery\nfrom celery.loaders.base import BaseLoader\n\n\nclass CobLoader(BaseLoader):\n\n def on_worker_init(self):\n from ..app import build_app\n\n # this will make the tasks grains to be properly loaded...
python
edit
2
1
bsd-3-clause
c380c328b43f399f4d614486c53163709170f33b
getweber/weber-cli
cob/celery/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Use Mayapy for testing\n\nUsage:\n $ mayapy run_maya_tests.py\n\n\"\"\"\n\nimport sys\nimport nose\nimport warnings\n\nfrom nose_exclude import NoseExclude\n\nwarnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n\nif _...
python
edit
1
0
mit
2ca6f765a3bd1eca6bd255f9c679c9fbea78484a
MoonShineVFX/core,mindbender-studio/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core,getavalon/core
run_maya_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom apispec import yaml_utils\n\n\ndef test_load_yaml_from_docstring():\n def f():\n \"\"\"\n Foo\n bar\n baz quux\n\n ---\n herp: 1\n derp: 2\n \"\"\"\n\n ...
python
edit
1
1
mit
e3928f489f481c9e44c634d7ee98afc5425b4432
marshmallow-code/smore,marshmallow-code/apispec
tests/test_yaml_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom alexandria import app, mongo\nfrom decorators import *\nfrom flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash\nimport os\nimport shutil\nimport requests\nfrom pymongo import Mong...
python
edit
18
2
mit
4641b9a1b9a79fdeb0aaa3264de7bd1703b1d1fa
citruspi/Alexandria,citruspi/Alexandria
alexandria/web.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nFile: tests.py\nCreator: MazeFX\nDate: 12-7-2016\n\nTests written for testing main website pages (home, about, contact, etc)\n\"\"\"\n\nfrom django.core.urlresolvers import resolve\nfrom django.test import...
python
edit
1
1
mit
9a19da30a933bc2872b9fc5b5966823c43e1982f
MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project
website/pages/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom bulletin.models import Post\n\n\nclass Event(Post):\n\n start_date = models.DateTimeField()\n end_date = models.DateTimeField(null=True, blank=True)\n time = models.CharField(max_length=255,\n ...
python
edit
1
0
mit
f185f04f6efdabe161ae29ba72f7208b8adccc41
AASHE/django-bulletin,AASHE/django-bulletin,AASHE/django-bulletin
bulletin/tools/plugins/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\n\ndef init_logging():\n \"\"\"Initialise logging.\n\n Set up basic logging.\n \"\"\"\n logging.basicConfig(\n level=logging.DEBUG,\n datefmt='%Y-%m-%d %H:%M:%S',\n format='%(asctime)s %(mes...
python
edit
1
1
bsd-2-clause
17ae37bbc42c9e0f8633eec8fe9b49defb647191
sjktje/sjkscan,sjktje/sjkscan
sjkscan/logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport neukrill_net.utils as utils\nimport neukrill_net.image_processing as image_processing\n\nimport csv\nimport pickle\nfrom sklearn.externals import joblib\nimport numpy as np\nimport glob\nimport os\n\ndef main...
python
edit
7
1
mit
23bbb5737602408ba553b77810103d7b32140c89
Neuroglycerin/neukrill-net-work,Neuroglycerin/neukrill-net-work,Neuroglycerin/neukrill-net-work
test.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport asyncio\nimport websockets\nimport logging\nimport json\n\nfrom jsonrpcclient.clients.websockets_client import WebSocketsClient\n\nfrom .rpc import Rpc\n\nlog = logging.getLogger(__name__)\n\n\nclass Websocke...
python
edit
3
3
mit
afef9c39ab98ef6614b0fe5103db4e641a9f0d6e
xeroc/python-graphenelib
grapheneapi/aio/websocket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.restful import fields\nfrom meta import BasicResource\nfrom config.pins import PinHttpManager\nfrom pi_gpio import app\n\nHTTP_MANAGER = PinHttpManager()\n\n\nclass Pin(BasicResource):\n\n def __init__(self):\n supe...
python
edit
3
2
mit
3db4d306c779ef3a84133dbbfc5614d514d72411
projectweekend/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server
pi_gpio/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ckan.plugins import toolkit\nfrom ckanext.apply_permissions_for_service import model\n\n\ndef service_permission_application_list(context, data_dict):\n return {'success': True}\n\n\ndef service_permission_application_show(context, ...
python
edit
1
5
mit
c8afee155a27632f85891688c096d2fa2b6988e9
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
ckanext/ckanext-apply_permissions_for_service/ckanext/apply_permissions_for_service/logic/auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import widgets\n\nfrom wagtail.admin.edit_handlers import RichTextFieldPanel\nfrom wagtail.admin.rich_text.converters.contentstate import ContentstateConverter\nfrom wagtail.core.rich_text import features\n\n\nclass Drafta...
python
edit
1
2
bsd-3-clause
8ce14cfb0044d90f2503a7bd940a7f6401c15db2
mikedingjan/wagtail,kaedroho/wagtail,timorieber/wagtail,mixxorz/wagtail,torchbox/wagtail,gasman/wagtail,gasman/wagtail,wagtail/wagtail,timorieber/wagtail,mixxorz/wagtail,nealtodd/wagtail,nimasmi/wagtail,kaedroho/wagtail,mikedingjan/wagtail,takeflight/wagtail,thenewguy/wagtail,zerolab/wagtail,timorieber/wagtail,thenewgu...
wagtail/admin/rich_text/editors/draftail.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rq import Connection, Queue, Worker\nfrom worker.exceptions import WorkerException\n\n\ndef worker_exc_handler(job, exc_type, exc_value, traceback):\n if isinstance(exc_type, WorkerException):\n job.meta['exc_code'] = exc_typ...
python
edit
1
2
apache-2.0
46b17b2798140c09690e5ae50a50794fd5210237
XDocker/Engine,XDocker/Engine
xdocker/run_worker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for functionality within the cc.license module.\n This file is a catch-all for tests with no place else to go.\"\"\"\n\nimport cc.license\n\ndef test_locales():\n locales = cc.license.locales()\n for l in locales:\n ...
python
edit
2
3
mit
b19746badd83190b4e908144d6bc830178445dc2
creativecommons/cc.license,creativecommons/cc.license
cc/license/tests/test_cc_license.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nfrom paintings.views import GalleryDetailView, PaintingDetailView\n\nadmin.autodiscover()\n\n\nurlpatterns = patterns('',\n\turl( r'^(?P<slug>[\\w-]+)/...
python
edit
3
0
mit
0ac82c9410476efd7494026c7089b8ba650061ad
hombit/olgart,hombit/olgart,hombit/olgart,hombit/olgart
paintings/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom simulocloud import PointCloud\nimport json\nimport numpy as np\n\n_TEST_XYZ = \"\"\"[[10.0, 12.2, 14.4, 16.6, 18.8],\n [11.1, 13.3, 15.5, 17.7, 19.9],\n [0.1, 2.1, 4.5, 6.7, 8.9]]\"\"\"\n\n_EXPECTED_POINTS...
python
edit
3
1
mit
0ed7e87a6eeaab56d5c59a7e6874b5a5b0bab314
stainbank/simulocloud
tests/test_pointcloud.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Get VPC ID.\"\"\"\nimport logging\n\nimport requests\n\nfrom ..consts import API_URL\nfrom ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound\n\nLOG = logging.getLogger(__name__)\n\n\ndef get_vpc_id(account, region):\n ...
python
edit
1
4
apache-2.0
c0a7bc2aa1b174af74a9f606c358a66f77f98ca9
gogoair/foremast,gogoair/foremast
src/foremast/utils/get_vpc_id.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Solution:\n # @param {string} s\n # @param {string} t\n # @return {boolean}\n def isIsomorphic(self, s, t):\n\n if len(s) != len(t):\n return False\n\n charDict = {}\n for i, c in enumerate(...
python
edit
6
10
mit
d4722298a0fc03fca6ef17e246e3ffd74efc4d60
chancyWu/leetcode
src/isomorphic_strings.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport forms\n\nfrom django.views.generic.edit import CreateView\n\n\nclass CommentView(CreateView):\n \"\"\"\n View for creating and listing comments.\n \"\"\"\n anonymous_comment_form = forms.AnonymousCommentForm\n register...
python
edit
3
6
mit
4a4ee00ef79003ed4d98a3daca9e26cffc91210e
WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder
Seeder/class_based_comments/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport datetime\n\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom pontoon.administration.files import (\n update_from_repository,\n extract_to_database,\n)\n\nfrom pontoon.base.models import Project\n\n\nc...
python
edit
2
4
bsd-3-clause
64bff944752cbba16878b22025d6ee332e923007
jotes/pontoon,mathjazz/pontoon,participedia/pontoon,Jobava/mirror-pontoon,mathjazz/pontoon,m8ttyB/pontoon,vivekanand1101/pontoon,sudheesh001/pontoon,mastizada/pontoon,yfdyh000/pontoon,mastizada/pontoon,jotes/pontoon,mastizada/pontoon,vivekanand1101/pontoon,Osmose/pontoon,participedia/pontoon,yfdyh000/pontoon,vivekanand...
pontoon/administration/management/commands/update_projects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom parglare import Grammar\nfrom parglare.exceptions import GrammarError\n\n\ndef test_terminal_nonterminal_conflict():\n\n # Production A is a terminal (\"a\") and non-terminal at the same time.\n g = \"\"\"\n A =...
python
edit
3
1
mit
21bf18a03c485304aa00dc2af86aa91930e4b1ac
igordejanovic/parglare,igordejanovic/parglare
tests/test_grammar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make mamba more friendly to linters and IDE's\n\nSome empty functions are added and we are able to optionally import them" }, { "role": "assistant", "content": "__version__ = '0.8.6'\n\n\ndef description(message):\n pass\n\n\n...
python
new_file
1
1
mit
4c3e92c8847b35c4afa53a90dd823c89d1d534d1
nestorsalceda/mamba
mamba/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom attrs import define, field\nfrom tak import mcts\nimport torch\nfrom typing import Optional\n\n\n@define(slots=False)\nclass Config:\n device: str = \"cuda\"\n server_port: int = 5001\n\n lr: float = 1e-3\n\n size: int = 3\...
python
edit
1
2
mit
bdfa468b4d60f326d6744b9a4766c228e8b1d692
nelhage/taktician,nelhage/taktician,nelhage/taktician,nelhage/taktician
python/tak/alphazero/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport select\nimport serial\nimport socket\n\ndef run_lux_udp(host, port, dev):\n with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:\n sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)...
python
edit
2
7
mit
27c115ba875136ced13023999fe13fcf0d798f0e
zbanks/radiance,zbanks/radiance,zbanks/radiance,zbanks/radiance
lux_udp_bridge.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pipeitembuilder.py\n#\n\nimport urllib\nfrom pipe2py import util\n\ndef pipe_itembuilder(context, _INPUT, conf, **kwargs):\n \"\"\"This source builds an item.\n \n Keyword arguments:\n context -- pipeline context\n _INPUT -...
python
edit
3
6
mit
2ca3f9a47a639365a8de4db1b80331ac8e06d0af
nerevu/riko,nerevu/riko
modules/pipeitembuilder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.16.6\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\...
python
edit
1
0
mit
e5dea3c91cfc82f58f80131ff79be402582a3412
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nimport stripe\n\nstripe.api_key = settings.STRIPE_API_KEY\nstripe.api_version = \"2018-10-31\"\n\n\nclass StripeGateway:\n \"\"\"A gateway to Stripe\n\n This insulates the rest of the system from Stri...
python
edit
1
1
bsd-2-clause
73eb3c7c52c2a5c58cad0e1d4dbe09c1e713beeb
mblayman/lcp,mblayman/lcp,mblayman/lcp
conductor/vendor/_stripe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright 2019 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...
python
edit
1
3
apache-2.0
437eb8432fe91865d3cb24109e1b99818de8ce4e
deepmind/pysc2
pysc2/bin/battle_net_maps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\ndef register_asheesh():\n return requests.post(\n 'http://localhost:3000/register',\n {'rawHostname': 'asheesh',\n 'email': '<EMAIL>',\n 'pubkey': open('snakeoil-sample-certs/ssl-cert-snak...
python
edit
1
1
apache-2.0
abbc6757df62d1dfbd4158dd50b99a74d204fc95
sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats
sandcats/trivial_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom mrbelvedereci.trigger.models import Trigger\n\nclass TriggerAdmin(admin.ModelAdmin):\n list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')\n list_filter = ('active', 'pub...
python
edit
1
0
bsd-3-clause
bb3d9ec2d9932da2abb50f5cb6bceffae5112abb
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
mrbelvedereci/trigger/admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 'Unset' to the wsme module" }, { "role": "assistant", "content": "from wsme.api import expose, validate\nfrom wsme.root import WSRoot\nfrom wsme.types import wsattr, wsproperty, Unset\n" } ]
python
new_file
8
0
mit
03dd583c8d75b2b588079c69b517c2510eba71db
stackforge/wsme
wsme/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nfrom metatlas.mzml_loader import mzml_to_hdf, get_test_data\nfrom metatlas.h5_query import get_XICof, get_data\n\n\ndef rmse(target, predictions):\n target = target / target.max()\n predictions...
python
edit
10
1
bsd-3-clause
1179d825cafb512119906894527de801e43ed906
biorack/metatlas,biorack/metatlas,metabolite-atlas/metatlas,aitatanit/metatlas,metabolite-atlas/metatlas,aitatanit/metatlas,aitatanit/metatlas,metabolite-atlas/metatlas
metatlas/tests/test_query.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import *\nfrom fabric.contrib.console import confirm\n\ncfg = dict(\n appengine_dir='appengine-web/src',\n goldquest_dir='src',\n appengine_token='',\n)\n\ndef update():\n # update to latest code from repo\n l...
python
edit
8
1
mit
4c1b96865f3e5e6660fc41f9170939a02f9b7735
ollej/GoldQuest,ollej/GoldQuest,ollej/GoldQuest,ollej/GoldQuest
fabfile.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns\nfrom django.conf.urls import url\nfrom rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView\n\n\nurlpatterns = patterns(\n '',\n url(r'^$', SwaggerUIView.as_vie...
python
edit
1
0
bsd-2-clause
7ea0e2d8387b622f671638613a476dcbff6438e1
pombredanne/django-rest-swagger,aioTV/django-rest-swagger,cancan101/django-rest-swagger,visasq/django-rest-swagger,aioTV/django-rest-swagger,marcgibbons/django-rest-swagger,marcgibbons/django-rest-swagger,aioTV/django-rest-swagger,cancan101/django-rest-swagger,pombredanne/django-rest-swagger,arc6373/django-rest-swagger...
rest_framework_swagger/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# compatibility module for different python versions\nimport sys\n\nif sys.version_info[:2] > (3, 0):\n\n PY2 = False\n PY3 = True\n\n Bytes = bytes\n Unicode = str\n basestring = str\n\n class_type_name = 'class'\n Cla...
python
edit
6
0
mit
d4dd408e671d14518b3fabb964027cd006366fca
Simplistix/testfixtures,nebulans/testfixtures
testfixtures/compat.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nname = \"gobuildmaster\"\n\ncurrent_hash = \"\"\nif os.path.isfile('hash'):\n current_hash = open('hash').readlines()[0]\nnew_hash = os.popen('git rev-parse HEAD').readlines()[0]\nopen('hash','w').write(ne...
python
edit
3
0
apache-2.0
6b01cdc18fce9277991fc5628f1d6c904ad47ee6
brotherlogic/gobuildmaster,brotherlogic/gobuildmaster,brotherlogic/gobuildmaster
BuildAndRun.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bigsi.storage.berkeleydb import BerkeleyDBStorage\nfrom bigsi.storage.redis import RedisStorage\nfrom bigsi.storage.rocksdb import RocksDBStorage\n\n\ndef get_storage(config):\n return {\n \"rocksdb\": RocksDBStorage,\n ...
python
edit
1
1
mit
c5d22fd143f952ce5e0c86b9e8bce4a06fe47063
Phelimb/cbg,Phelimb/cbg,Phelimb/cbg,Phelimb/cbg
bigsi/storage/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add null handler as default for logging." }, { "role": "assistant", "content": "import logging\n\nfrom .robot import Robot\nfrom .modules import *\n\n\nnh = logging.NullHandler()\nlogging.getLogger(__name__).addHandler(nh)\n" }...
python
new_file
4
0
mit
d46d908f5cfafcb6962207c45f923d3afb7f35a7
pollen/pyrobus
pyrobus/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nnydus.db.routers\n~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2011 DISQUS.\n:license: Apache License 2.0, see LICENSE for more details.\n\"\"\"\n\nfrom .base import BaseRouter, RoundRobinRouter\n\n```\n\nApply this change: Add partition rou...
python
edit
5
0
apache-2.0
eccedb9f938bd74574e4dcdd9ea63f71ac269f20
disqus/nydus
nydus/db/routers/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Directives and roles for documenting traitlets config options.\n\n::\n\n .. configtrait:: Application.log_datefmt\n\n Description goes here.\n\n Cross reference like this: :configtrait:`Application.log_datefmt`.\n\"\"\"\n...
python
edit
1
1
bsd-3-clause
70b7090a438f7962f28acc23fa78cdb6f5d084a0
ipython/ipython,ipython/ipython
docs/sphinxext/configtraits.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport base64\nimport rsa\nimport six\n\nfrom st2common.runners.base_action import Action\n\n\nclass AwsDecryptPassworData(Action):\n\n def run(self, keyfile, password_data):\n # copied from:\n # ht...
python
edit
1
5
apache-2.0
2793f9a4e245c79ece58990622ae059a70514592
StackStorm/st2cd,StackStorm/st2cd
actions/aws_decrypt_password_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom .models import Person, Project, WorkingGroup, NetworkGroup\n\n\nclass PersonIndex(indexes.SearchIndex, indexes.Indexable):\n text = indexes.CharField(document=True, use_template=True)\n twitter = ind...
python
edit
1
1
mit
1e68f5f1fd565a812ef3fdf10c4c40649e3ef398
okfn/foundation,okfn/foundation,okfn/foundation,okfn/website,MjAbuz/foundation,okfn/website,okfn/foundation,okfn/website,okfn/website,MjAbuz/foundation,MjAbuz/foundation,MjAbuz/foundation
foundation/organisation/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chainer.backends import chainerx # NOQA\nfrom chainer.backends import cpu # NOQA\nfrom chainer.backends import cuda # NOQA\nfrom chainer.backends import intel64 # NOQA\n\n```\n\nApply this change: Add TODO to refactor backend regis...
python
edit
1
0
mit
262cee3ac7da741387ee66e78e6a9fbb9ffc7f31
keisuke-umezawa/chainer,ktnyt/chainer,okuta/chainer,okuta/chainer,okuta/chainer,chainer/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,wkentaro/chainer,pfnet/chainer,chainer/chainer,jnishi/chainer,tkerola/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,w...
chainer/backends/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Your bucket to delete things from.\nBUCKET = 'ADDME'\n\n# How many processes to fork.\nPROCESS_COUNT = 10\n\n# Maximum number of objects per bulk request.\nMAX_JOB_SIZE = 10000\n\n# Your simple API access key from the APIs tab of\n# <http...
python
edit
1
0
apache-2.0
4aaab8edebfe416ab814a1f9803b699616bd57da
googlearchive/storage-bulk-delete-python,jonparrott/storage-bulk-delete-python
config-example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom functools import update_wrapper\n\n\ndef decorate_urlpatterns(urlpatterns, decorator):\n for pattern in urlpatterns:\n if hasattr(pattern, 'url_patterns'):\n ...
python
edit
1
6
bsd-3-clause
ee9f1058107f675f7f12f822ead3feb78ec10d9b
nealtodd/wagtail,torchbox/wagtail,nutztherookie/wagtail,nealtodd/wagtail,kurtw/wagtail,mixxorz/wagtail,rsalmaso/wagtail,kurtw/wagtail,jnns/wagtail,kurtw/wagtail,nutztherookie/wagtail,wagtail/wagtail,Toshakins/wagtail,mixxorz/wagtail,gasman/wagtail,iansprice/wagtail,rsalmaso/wagtail,thenewguy/wagtail,kaedroho/wagtail,th...
wagtail/utils/urlpatterns.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.11.0\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\...
python
edit
1
0
mit
255a9f65476433be99a9a96cf5681567e4825e65
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
rejected_duplicate
Near-duplicate of sample 1349
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fixture import GeneratorTest\nfrom google.appengine.ext import testbed, ndb\n\n\nclass GeneratorTest(GeneratorTest):\n\n def testLotsaModelsGenerated(self):\n for klass in self.klasses:\n k = klass._get_kind()\n ...
python
edit
3
2
mit
81904effd492e2b2cea64dc98b29033261ae8b62
talkiq/gaend,samedhi/gaend,talkiq/gaend,samedhi/gaend
tests/generator_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.sitemaps import Sitemap\nfrom django.utils import translation\nfrom cms.models import Title\n\n\ndef from_iterable(iterables):\n \"\"\"\n Backport of itertools.chain.from_iterable\n \"\"...
python
edit
1
3
bsd-3-clause
e733b0d5192437a95c4eafd1babc02385fb4fcf7
ScholzVolkmer/django-cms,wyg3958/django-cms,donce/django-cms,robmagee/django-cms,DylannCordel/django-cms,frnhr/django-cms,jrief/django-cms,wuzhihui1123/django-cms,Livefyre/django-cms,dhorelik/django-cms,netzkolchose/django-cms,intip/django-cms,chkir/django-cms,jproffitt/django-cms,selecsosi/django-cms,czpython/django-c...
cms/sitemaps/cms_sitemap.py
accepted
null
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\nfrom telemetry.page import test_expectations\n\n# Valid expectation condi...
python
edit
1
1
bsd-3-clause
bb6a4659527077413845e912e53bea5ee9327293
hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dednal/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,Pluto...
content/test/gpu/gpu_tests/memory_expectations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport frappe\nfrom frappe.model.rename_doc import rename_doc\n\ndef execute():\n\tif frappe.db.exists(\"DocType\", \"Desk Page\"):\n\t\tif frappe.db.exists('DocType', 'Workspace'):\n\t\t\t# this patch was not added initially, so this page ...
python
edit
1
4
mit
fc1505865f919764aa066e5e43dcde1bc7e760b2
frappe/frappe,StrellaGroup/frappe,StrellaGroup/frappe,saurabh6790/frappe,StrellaGroup/frappe,mhbu50/frappe,almeidapaulopt/frappe,yashodhank/frappe,saurabh6790/frappe,mhbu50/frappe,frappe/frappe,yashodhank/frappe,almeidapaulopt/frappe,mhbu50/frappe,saurabh6790/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,yashodhan...
frappe/patches/v13_0/rename_desk_page_to_workspace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 Red Hat, Inc.\n# All Rights Reserved.\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 License at\n#...
python
edit
1
0
apache-2.0
26672e83ab1bd1a932d275dfd244fe20749e3b1e
openstack/tripleo-common,openstack/tripleo-common
tripleo_common/utils/safe_import.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import jsonify, current_app, request\nfrom sqlalchemy.exc import SQLAlchemyError\n\nfrom . import status\nfrom . import utils\nfrom dmutils.status import get_flags\n\n\n@status.route('/_status')\ndef status_no_db():\n\...
python
edit
1
4
mit
61accbe3fa6ebdeed3bbf48573d5ac5412d0f1db
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
app/status/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf8 -*-\n\n\"\"\"\n This module add the class needed for creating custom chat command\n\n :Example:\n\n Here's a simple ChatPlugin which will send a HelloWorld on use\n\n ``\n ChatHelloW...
python
edit
1
5
mit
07f531c7e3bbc0149fad4cfda75d8803cbc48e1d
ningirsu/stepmania-server,Nickito12/stepmania-server,ningirsu/stepmania-server,Nickito12/stepmania-server
smserver/chatplugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nimport code\ntry:\n\timport Image\nexcept ImportError:\n\tfrom PIL import Image\n\nimport gdp\n\ngdp.gdp_init()\ngcl_name = gdp.GDP_NAME(\"edu.umich.eecs.m3.test01\")\ngcl_handle = gdp.GDP_GCL(gcl_name, gdp.GDP_MOD...
python
edit
4
0
apache-2.0
42d06a15dd30e770dfccfccbd20fbf9bba52494d
lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator
platforms/m3/programming/goc_gdp_test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 Google LLC\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# https://www.apache....
python
edit
5
0
apache-2.0
41ac7e2d85126c2fe5dd16230ed678d72a8d048f
tensorflow/probability,google/jax,google/jax,google/jax,google/jax,tensorflow/probability
jax/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom flask import request, current_app, redirect\nfrom flaskext.bcrypt import generate_password_hash\n\ndef get_ip():\n ip = request.remote_addr\n if ip == '127.0.0.1' or ip == '127.0.0.2' and \"X-Real-IP\" in request.hea...
python
edit
4
4
mit
43175d338f9a8e7eb779421bb4e1aa3bec4a94f1
nerdzeu/NERDZCrush,roderickm/MediaCrush,MediaCrush/MediaCrush,nerdzeu/NERDZCrush,roderickm/MediaCrush,MediaCrush/MediaCrush,roderickm/MediaCrush,nerdzeu/NERDZCrush
mediacrush/network.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom application import db\n\n\nclass Artist(db.Model):\n __tablename__ = 'artists'\n\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.String(45))\n birth_year = db.Column(db.Integer)\n death_year = db.Col...
python
edit
1
2
mit
8dc822cf3577663cf817cd5d1ab537df3605752c
EunJung-Seo/art_archive
art_archive_api/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom turbustat.statistics.rfft_to_fft import rfft_to_fft\nfrom ._testing_data import dataset1\n\n\nimport numpy as np\nimport numpy.testing as npt\nfrom unittest import TestCase\n\n\nclass testRFFT(TestCase):\n \"\"\"docstring for test...
python
edit
3
1
mit
4ae3b77847eeefd07d83f863c6ec71d7fdf750cb
e-koch/TurbuStat,Astroua/TurbuStat
turbustat/tests/test_rfft_to_fft.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport slither, pygame, time\n\n\nsnakey = slither.Sprite()\nsnakey.setCostumeByName(\"costume0\")\n\nSoExcited = slither.Sprite()\nSoExcited.addCostume(\"SoExcited.png\", \"avatar\")\nSoExcited.setCostumeByNumber(0)\n\nSoExcited.goTo(300, ...
python
edit
4
1
mit
62f4c6b7d24176284054b13c4e1e9b6d631c7b42
PySlither/Slither,PySlither/Slither
basicTest.py
rejected_lint
Too many lint violations: 4
true