messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom datetime import datetime\n\nLOG_DIR = '/var/log/graphite'\nif os.getenv(\"CARBONLINK_HOSTS\"):\n CARBONLINK_HOSTS = os.getenv(\"CARBONLINK_HOSTS\").split(',')\n\nif os.getenv(\"CLUSTER_SERVERS\"):\n CLUSTER_SERVERS = o...
python
edit
1
0
apache-2.0
8a9f707960c3b39488c9bbee6ce7f22c6fbfc853
Banno/graphite-setup,Banno/graphite-setup,Banno/graphite-setup
web/config/local_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BaseStore(object):\n\n def set(self, key, value):\n raise NotImplementedError\n\n def get(self, key):\n raise NotImplementedError\n\n\nclass InMemoryStore(BaseStore):\n\n def __init__(self, *args, **kwargs):\n ...
python
edit
1
2
bsd-2-clause
16cca2bc9aa8d5ecf6eb4d829de00905d3d15759
crateio/carrier
conveyor/store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=\"echidna\",\n version=\"0.0.1-dev\",\n url='http://github.com/praekelt/echidna',\n license='BSD',\n description='A scalable pub-sub WebSocket service.',\n lon...
python
edit
1
0
bsd-3-clause
38d30c5589dfbdae92198a404d58400ec3c2ed4b
praekelt/echidna,praekelt/echidna,praekelt/echidna,praekelt/echidna
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'test checking constant conditions'\n\n# __pychecker__ = ''\n\ndef func1(x):\n 'should not produce a warning'\n if 1:\n pass\n while 1:\n print x\n break\n assert x, 'test'\n return 0\n\ndef func2(x):\n ...
python
edit
4
6
bsd-3-clause
352aeadf68c102b03dc7fcc243e46c3442132c1d
smspillaz/pychecker,smspillaz/pychecker,smspillaz/pychecker
pychecker/test_input/test70.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sessions.models import Session\n\n\nclass Command(BaseCommand):\n\n args = '<count count ...>'\n help = \"Delete old sessions\"\...
python
edit
1
3
mit
ec61fec1ae60a565110876101dabad352e3ea46b
QLGu/djangopackages,pydanny/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,pydanny/djangopackages,pydanny/djangopackages
core/management/commands/delete_old_sessions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nsys.path.insert(1, \"../../../\")\nimport h2o\n\ndef cupMediumGBM(ip,port):\n # Connect to h2o\n h2o.init(ip,port)\n\n train = h2o.import_frame(path=h2o.locate(\"bigdata/laptop/usecases/cup98LRN_z.csv\"))\n test = h2o.import...
python
edit
4
2
apache-2.0
02c18a46935d58ac08a340e5011fb345ffb7f83a
bospetersen/h2o-3,spennihana/h2o-3,mrgloom/h2o-3,michalkurka/h2o-3,spennihana/h2o-3,PawarPawan/h2o-v3,jangorecki/h2o-3,junwucs/h2o-3,printedheart/h2o-3,kyoren/https-github.com-h2oai-h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,datachand/h2o-3,ChristosChristofidis/h2o-3,bospetersen/h2o-3,brightchen/h2o-3,jangorecki/h2o-3,m...
h2o-py/tests/testdir_algos/gbm/pyunit_cup98_01GBM_medium.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Encoder(object):\n @staticmethod\n def encode(msg):\n \"\"\"\n Don't change the message at all\n :param msg:\n \"\"\"\n return msg\n\n```\n\nApply this change: Return a list of messages in echo...
python
edit
3
1
apache-2.0
5025bff2ca9a4f31a371ecbd9255b1fb92b9cc4d
mre/kafka-influxdb,mre/kafka-influxdb
kafka_influxdb/encoder/echo_encoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\nfrom werkzeug.wrappers import Request, Response\n\nfrom get_html import get_html, choose_lang\n\n@Request.application\ndef run(request):\n\tlang = choose_lang(request)\n\tif request.url.startswith(\"https://\") or ...
python
edit
1
4
mit
cdf60bc0b07c282e75fba747c8adedd165aa0abd
YtvwlD/dyluna,YtvwlD/dyluna,YtvwlD/dyluna
index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .context import tohu\nfrom tohu.v4.primitive_generators import *\nfrom tohu.v4.derived_generators import *\n\n__all__ = ['EXEMPLAR_GENERATORS', 'EXEMPLAR_PRIMITIVE_GENERATORS', 'EXEMPLAR_DERIVED_GENERATORS']\n\ndef add(x, y):\n retu...
python
edit
25
1
mit
72e948719145579eb7dfb9385b921f8eb6ea1384
maxalbert/tohu
tests/v4/conftest.py
rejected_lint
Too many lint violations: 25
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\ndesc = (\n 'An interface to the Pluggable Authentication Modules (PAM) library'\n 'on linux, written in pure python (using ctypes)'\n)\n\nsetup(name='python3-simplepam', version='0.1.4',\n desc...
python
edit
1
0
mit
cb965a2dc227c9c498a8c95f48bb5ce24a6db66c
leonnnn/python3-simplepam
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Todo(models.Model):\n \"\"\"\n Todo Model: name, description, created\n \"\"\"\n name = models.CharField(max_length=100, unique=True)\n description = models.TextField()\n created = m...
python
edit
1
1
bsd-3-clause
33c595574921a64bec79de5ca72a62c22d09eb94
andresgz/django_todolist,andresgz/django_todolist,andresgz/django_todolist,andresgz/django_todolist
django_todolist/todo/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nwith open(\"README.rst\") as fh:\n long_description = fh.read()\n\nsetup(\n name='qiime-studio',\n version='0.0.1dev',\n long_description=long_description,\n packages=find_packag...
python
edit
1
0
bsd-3-clause
84355e70e39bbca5cd4cf6756c5b463dd36c1a9c
qiime2/qiime-studio,qiime2/qiime-studio-frontend,jakereps/qiime-studio,jakereps/qiime-studio-frontend,qiime2/qiime-studio,qiime2/qiime-studio,qiime2/qiime-studio-frontend,jakereps/qiime-studio-frontend,jakereps/qiime-studio,jakereps/qiime-studio
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport smbus\nimport time\n\nADDRESS = 4\nCMD_READ_ANALOG = 1\nVOLT12 = 650\nVOLT18 = 978\n\ndef map_range(x, in_min, in_max, out_min, out_max):\n out_delta = out_max - out_min\n in_delta = in_max - in_min\n\n return (x - in_min) *...
python
edit
1
1
mit
0f9168caa5085cb225ea04b725a2379eef8c3b8d
gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,thelonious/g2x
app/Voltage/voltage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Ensure that users with User.emails == [] have User.username inserted.\n\n\"\"\"\n\nimport logging\nimport sys\n\nfrom modularodm import Q\nfrom nose.tools import *\n\nfrom website import models\nfrom website.app import init_app\nfrom ...
python
edit
1
6
apache-2.0
096564c95371510769a7dec31cd5d90bf2c56955
wearpants/osf.io,chrisseto/osf.io,felliott/osf.io,samchrisinger/osf.io,saradbowman/osf.io,jnayak1/osf.io,alexschiller/osf.io,Nesiehr/osf.io,asanfilippo7/osf.io,abought/osf.io,icereval/osf.io,caneruguz/osf.io,RomanZWang/osf.io,abought/osf.io,TomBaxter/osf.io,hmoco/osf.io,Nesiehr/osf.io,brandonPurvis/osf.io,cslzchen/osf....
scripts/migration/migrate_confirmed_user_emails.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\nfrom celery.schedules import crontab\nfrom celery.task import periodic_task\nfrom django.conf import settings\nfrom phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEnt...
python
edit
1
1
bsd-3-clause
2c6f5cfb2e90e815d74dca11c395e25875d475be
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/phonelog/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.http import HttpResponse, Http404, HttpResponseBadRequest\nfrom django.views.generic.detail import BaseDetailView\nfrom .models import Marker\n\n\nclass MarkerD...
python
edit
2
4
apache-2.0
72f3a5d1bc4c69cb0641ea5529655d5b68d156c1
edoburu/fluentcms-googlemaps,edoburu/fluentcms-googlemaps,edoburu/fluentcms-googlemaps
fluentcms_googlemaps/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_logutils.utils import add_items_to_message\n\n\ndef test_add_items_to_message():\n msg = \"log message\"\n items = {'user': 'benny', 'email': 'benny@example.com'}\n msg = add_items_to_message(msg, items)\n assert msg...
python
edit
1
1
bsd-3-clause
b047685088b9179e0c784114ff4a41509dbfdf7d
jsmits/django-logutils,jsmits/django-logutils
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport requests\nfrom indra.config import CONFIG_DICT\n\n\nlogger = logging.getLogger(__name__)\n\n\ndart_uname = CONFIG_DICT['DART_WM_USERNAME']\ndart_pwd = CONFIG_DICT['DART_WM_PASSWORD']\n\n\ndart_url = 'https://indra-ing...
python
edit
1
8
bsd-2-clause
8582126efa9907b06e9f9b183a0919feba9fb6b0
johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,bgyori/indra,bgyori/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra
indra/literature/dart_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport xml4h\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name=xml4h.__title__,\n version=xml4h.__version__,\n de...
python
edit
1
0
mit
02d3f0f0b7c27f04289f8fd488973fdf17c8f42f
jmurty/xml4h
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#import spam\nimport filter_lta\n\n#VALID_FILES = filter_lta.VALID_OBS().split('\\n') \nprint filter_lta.VALID_OBS()\n\n#def extract_basename():\n\ndef main():\n #Convert the LTA file to the UVFITS format\n #Generates UVFITS file with...
python
edit
2
2
mit
8e00f9ff03464f0cf70b022f899ec7ef1c173829
NCRA-TIFR/gadpu,NCRA-TIFR/gadpu
exec_thread_1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ophyd import Device, EpicsSignal, EpicsSignalRO\nfrom ophyd import Component as C\n\n\nclass Robot(Device):\n robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP')\n robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC')\n robot_unl...
python
edit
8
2
bsd-2-clause
9ab7efa44a8e7267b2902b6e23ff61381d31692c
NSLS-II-XPD/ipython_ophyd,NSLS-II-XPD/ipython_ophyd
profile_collection/startup/85-robot.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.test import TestCase\n\nfrom .model_factories import AttributeF\n\nfrom ..models import AttributeArchive\n\n\nclass TestModelAttributeArchive(TestCase):\n def test_archiving_attrbute(self):\n a...
python
edit
1
3
bsd-2-clause
71e64dea686a57e358f87c926bf8c22313e99266
ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites
django_project/localities/tests/test_model_AttributeArchive.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Local imports\nfrom uplink import session\n\n\ndef test_base_url(uplink_builder_mock):\n # Setup\n uplink_builder_mock.base_url = \"https://api.github.com\"\n sess = session.Session(uplink_builder_mock)\n\n # Run & Verify\n ...
python
edit
1
1
mit
3bbe539f387697137040f665958e0e0e27e6a420
prkumar/uplink
tests/test_session.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\ndef configuration(parent_package='',top_path=None):\n import numpy\n import os\n from distutils.errors import DistutilsError\n if numpy.__dict__.get('quaternion') is not None:\n raise DistutilsError...
python
edit
4
2
mit
2d1ef22d384cb04d86946572599f2040b798e6d6
moble/quaternion,moble/quaternion
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport django\nfrom django.conf import settings\n\n\nAPP_NAME = 'impersonate'\n\nsettings.configure(\n DEBUG=True,\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n }\n },...
python
edit
1
0
bsd-3-clause
e895795c6461da12f4824994168893ff131c0dd9
Top20Talent/django-impersonate,Top20Talent/django-impersonate
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(\n name='py-vkontakte',\n version='2016.8',\n packages=['vk'],\n url='https://github.com/sgaynetdinov/py-vkontakte',\n license='MIT License',\n author='Sergey Ga...
python
edit
1
0
mit
7886e2a7b55ad03e125f7e69a78574c2044b518b
sgaynetdinov/py-vkontakte
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.product import Product\n\n\n# class TestProduct(BaseTestCase):\n\n# \t@httpretty.activate\n# \tdef test_valid_create(self):\n# pass\n\n`...
python
edit
2
1
mit
69a339c792e2545cbd12c126a5b0865e4cf1e7e5
andela-sjames/paystack-python
paystackapi/tests/test_product.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use python version dependent import\n\nChange-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98" }, { "role": "assistant", "content": "import inspect\nimport sys\nif sys.version_info[0] == 2:\n from .python2 import httplib2\nelse:...
python
new_file
1
0
mit
ab418734f432691ec4a927be32364ee85baab35c
wikimedia/pywikibot-externals-httplib2,wikimedia/pywikibot-externals-httplib2,jayvdb/httplib2,jayvdb/httplib2
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# main: loader of all the command entry points.\n\nfrom pkg_resources import iter_entry_points\n\nfrom rasterio.rio.cli import cli\n\n\n# Find and load all entry points in the rasterio.rio_commands group.\n# This includes the standard comma...
python
edit
1
1
bsd-3-clause
57ead9af05c95cee2354c55bb73f5fe26be3a256
youngpm/rasterio,johanvdw/rasterio,clembou/rasterio,youngpm/rasterio,njwilson23/rasterio,perrygeo/rasterio,johanvdw/rasterio,njwilson23/rasterio,kapadia/rasterio,perrygeo/rasterio,youngpm/rasterio,kapadia/rasterio,brendan-ward/rasterio,njwilson23/rasterio,kapadia/rasterio,brendan-ward/rasterio,johanvdw/rasterio,clembou...
rasterio/rio/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nlog = logging.getLogger(__name__)\n\n\nclass FastAPIVersionError(Exception):\n def __init__(self, version, reason=''):\n err_msg = f'FastAPI {version}+ is required'\n if reason:\n err_msg += f' ...
python
edit
1
2
mit
ecc3a9c90d20699c6f0bf18600cf9bd755b56d65
rollbar/pyrollbar
rollbar/contrib/fastapi/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport sys\n\nfrom bs4 import BeautifulSoup\nfrom requests import get, codes\n\n\ndef match_soup_class(target, mode='class'):\n def do_match(tag):\n classes = tag.get(mode, [])\n ...
python
edit
1
4
mit
0a336447546442ab5d48716223713135a4812adf
byung-u/ProjectEuler
get_problem.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals\nfrom skimage.external import tifffile\n\ndef hack(input_tif):\n \"\"\"\n This method allows to bypass the s...
python
edit
3
2
mit
0dcecfbd1e6ce9e35febc9f4ee9bcbfac1fb8f6a
chaubold/hytra,chaubold/hytra,chaubold/hytra
hytra/util/skimage_tifffile_hack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Setup script to generate an stand-alone executable.\n\nAuthor-email: \"Dietmar Winkler\" <<EMAIL>>\n\nLicense: See UNLICENSE file\n\nUsage: Run the build process by running the command 'python setup.py build'\n If everything wor...
python
edit
1
0
unlicense
e61b7b91157f0d198c90cb3652f6656bd6c44cba
dietmarw/trimtrailingwhitespaces
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThe FVCOM Python toolbox (PyFVCOM)\n\n\"\"\"\n\n__version__ = '2.0.0'\n__author__ = 'Pierre Cazenave'\n__credits__ = ['Pierre Cazenave']\n__license__ = 'MIT'\n__maintainer__ = 'Pierre Cazenave'\n__email__ = '<EMAIL>'\n\nimport inspe...
python
edit
17
0
mit
2351100234180afc6f6510140e9f989051fb6511
pwcazenave/PyFVCOM
PyFVCOM/__init__.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tw.api import Widget, CSSLink\n\nclass JQueryUITheme(Widget):\n css = [CSSLink(link='/css/jquery-ui/ui.theme.css', modname=__name__)]\n template = ''\n\n```\n\nApply this change: Update our customized jQuery ui widgets" }, { ...
python
edit
4
0
apache-2.0
427dab842e2d8aea1610c3e23d792119dc60c94b
pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,ralphbean/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha
moksha/widgets/jquery_ui_theme.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nimport websockets\nimport websockets.client\nimport websockets.exceptions\nimport websockets.legacy.auth\nimport websockets.legacy.client\nimport websockets.legacy.protocol\nimport websockets.legacy.server\nimport websock...
python
edit
1
1
bsd-3-clause
0b884ed68f2c4b482f9eadbf38adc01f7d869f1a
aaugustin/websockets,aaugustin/websockets,aaugustin/websockets,aaugustin/websockets
tests/test_exports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function\n\nimport responses\nimport simplesqlite\nfrom click.testing import CliRunner\nfrom sqlitebiter._enum import ExitCode\...
python
edit
1
1
mit
a01a3f9c07e0e5d93fc664df118c6085668410c1
thombashi/sqlitebiter,thombashi/sqlitebiter
test/test_url_subcommand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\n\nfrom djproxy.views import HttpProxy\n\nDOWNSTREAM_INJECTION = lambda x: x\n\n\nclass LocalProxy(HttpProxy):\n base_url = \"http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp\"\n\n\nclass S...
python
edit
1
1
mit
c34840a7ac20d22e650be09a515cee9dbfcf6043
thomasw/djproxy
tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\ntry:\n from unittest import mock\nexcept ImportError:\n import mock\n\nfrom conda_env import env\nfrom conda_env.specs.yaml_file import YamlFileSpec\n\n\nclass TestYAMLFile(unittest.TestCase):\n def test_no_environ...
python
edit
1
1
bsd-3-clause
19ac41a14875c6df2ed9ddf7b7b315ffb5c70819
ESSS/conda-env,phobson/conda-env,conda/conda-env,asmeurer/conda-env,conda/conda-env,mikecroucher/conda-env,isaac-kit/conda-env,ESSS/conda-env,isaac-kit/conda-env,dan-blanchard/conda-env,phobson/conda-env,nicoddemus/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,nicoddemus/conda-env,mikecroucher/conda-env
tests/specs/test_yaml_file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport typing\n\nfrom trafaretrecord import TrafaretRecord\n\n\ndef test_initialization():\n class A(TrafaretRecord):\n a: int\n b: str\n c: typing.List[int]\n\n tmp = A(a=1, b='1', c=[1, 2, 3])\n assert repr(t...
python
edit
1
1
mit
31d1e9a991923dcd748f26b3533f2736f04f6454
vovanbo/trafaretrecord,vovanbo/trafaretrecord
tests/test_typing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(name='pv_atmos',\n version='1.1',\n description='Utilities for scientific visualization with ParaView',\n long_description='This package is described in a peer-reviewed open access arti...
python
edit
null
null
mit
56572fd9e38274074c8476f25dd47ee0799271ea
mjucker/pv_atmos
setup.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nimport pytest\n\n\ndef test_scrub_doi():\n from vdm.utils import scrub_doi\n d = 'http://dx.doi.org/10.1234'\n scrubbed = scrub_doi(d)\n assert(scrubbed == '10.1234')\n\n d = '10.123 4'\n assert(\n scrub_doi(d) ...
python
edit
3
1
mit
84d3738d2eb8a24dcb66cb329994f88bd55128c0
Brown-University-Library/vivo-data-management,Brown-University-Library/vivo-data-management
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom authy import __version__\nfrom setuptools import setup, find_packages\n\n# to install authy type the following command:\n# python setup.py install\n#\n\nsetup(\n name=\"authy\",\n version=__version__,\n description=\"Authy...
python
edit
1
0
mit
15f1e52deeda43d032d0d7d68ce50300715c5658
authy/authy-python,authy/authy-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport wx.stc\n\nident = \"makefile\"\nname = \"Makefile\"\nextensions = [\"Makefile\", \"*.mk\"]\nlexer = wx.stc.STC_LEX_MAKEFILE\nindent = 8\nuse_tabs = True\n\nstylespecs = (\n (wx.stc.STC_STYLE_DEFAULT, \"\"),\n)\n\nkeywords = \"\...
python
edit
1
0
mit
305d04fc0841035bf744480261017c14ae3045b0
shaurz/devo
syntax_makefile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='snippets',\n version='0.0.dev',\n license='ISC',\n description='Code snippets repository generator',\n url='https://github.com/trilan/snippets',\n author='Mik...
python
edit
1
0
isc
c5ef0d8333bb427c588aa65ee6f081742c31c41e
trilan/snippets,trilan/snippets
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_union_find\n----------------------------------\n\nTests for `python_algorithms.union_find` module.\n\"\"\"\n\nimport unittest\n\nfrom python_algorithms.basic.union_find import U...
python
edit
1
2
bsd-3-clause
553735a857875abf54bc71b7b73569d223b4ccf7
cjauvin/python_algorithms,ofenerci/python_algorithms,ofenerci/python_algorithms,pombredanne/python_algorithms,pombredanne/python_algorithms,pombredanne/python_algorithms,cjauvin/python_algorithms,cjauvin/python_algorithms,ofenerci/python_algorithms
tests/basic/test_union_find.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n# for voting\nfrom voting.views import vote_on_object\nfrom bookmarks.models import Bookmark\n\nurlpatterns = patterns('',\n url(r'^$', 'bookmarks.views.bookmarks', name=\"all_bookmarks\"),\n...
python
edit
1
0
mit
4524b88eef8a46d40c4d353c3561401ac3689878
incuna/incuna-bookmarks,incuna/incuna-bookmarks
bookmarks/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.http.response import HttpResponse\n\n\nadmin.autodiscover()\n\n\ndef empty_view(request):\n return HttpResponse()\n\n\nurlp...
python
edit
1
1
mit
0ab048e8363a60d47ba780cb622a72343aaf65f2
pydanny/dj-stripe,kavdev/dj-stripe,dj-stripe/dj-stripe,kavdev/dj-stripe,pydanny/dj-stripe,dj-stripe/dj-stripe
tests/test_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport collections\nimport os\nimport os.path\nimport sys\nfrom nestly import nestly\n\nwd = os.getcwd()\ninput_dir = os.path.join(wd, 'inputs')\n\nctl = collections.OrderedDict()\n\nctl['strategy'] = nestly.repeat_...
python
edit
2
0
mit
11583cfca501164c5c08af70f66d430cd180dbc5
fhcrc/nestly
examples/basic_nest/make_nest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport codecs\nimport tempfile\nfrom django.core.management.commands.makemessages import Command as BaseCommand\n\n\nclass Command(BaseCommand):\n \"\"\" Extend the makemessages to include some of the fixtures \"\"\"\n\n ...
python
edit
3
4
bsd-3-clause
2896d1d0507ac312ab6246c3ccb33bbb6bc6d331
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/common/management/commands/makemessages.py
rejected_duplicate
Near-duplicate of sample 1343
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport matplotlib.pyplot as plt\nfrom numpy import array, log\nimport sys\n\nx = []\n\ny = []\n\ninfile = open(sys.argv[1])\n\nfor line in infile:\n data = line.replace('\\n','').split()\...
python
edit
6
4
mit
782c1b8379d38f99de413398919aa797af0df645
M2-AAIS/BAD
plot_s_curve.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Florian Lehner. All rights reserved.\n#\n# The contents of this file are licensed under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with the\n# License. You may obtai...
python
edit
1
0
apache-2.0
9c46a56b64a9d08218b5c0cbb8e88c98b5dc3787
florianl/panonoctl
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Execute files of Python code.\"\"\"\n\nimport imp, os, sys\n\ndef run_python_file(filename, args):\n \"\"\"Run a python source file as if it were the main program on the python\n command line.\n \n `filename` is the path t...
python
edit
1
2
apache-2.0
978b41a29eda295974ed5cf1a7cd5b79b148f479
7WebPages/coveragepy,blueyed/coveragepy,blueyed/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,hugovk/coveragepy,larsbutler/coveragepy,jayhetee/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,hugovk/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,7WebPages/coveragepy,ne...
coverage/execfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rml.element\n\n\ndef test_create_element():\n e = rml.element.Element('BPM', 6.0)\n assert e.get_type() == 'BPM'\n assert e.get_length() == 6.0\n\n\ndef test_add_element_to_family():\n e = rml.element.Element('dummy', 0.0...
python
edit
3
1
apache-2.0
e366f6da5673a4c92ffcf65492951e0c6fc886ed
razvanvasile/RML,willrogers/pml,willrogers/pml
tests/test_element.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k\n\nclass Node(object): # define constructor\n\tdef __init__(self, value):\n\t\tself.value = value\n\t\tself.next = Non...
python
edit
1
4
mit
52a3ab97f888734db3c602ac69a33660e6026bb6
derekmpham/interview-prep,derekmpham/interview-prep
linked-list/remove-k-from-list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport sys\nimport os\nimport fcntl\nimport termios\nimport argparse\n\n\nclass RootRequired(Exception):\n\n \"\"\"Our standard exception.\"\"\"\n\n pass\n\n\ndef send(data, tty):\n \"\"\"Send...
python
edit
4
3
mit
a17f711a6e055a9de4674e4c35570a2c6d6f0335
RichardBronosky/ttysend
ttysend.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).\"\"\"\nimport re\nimport iati.constants\n\n\nclass Version(object):\n \"\"\"Representation of an IATI Standard Version ...
python
edit
3
3
mit
1c2a981e007b9a205db1302370dff6a6ea15bf8c
IATI/iati.core,IATI/iati.core
iati/versions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import TemplateView\n\nfrom admin.base.settings import KEEN_CREDENTIALS\n\n\nfrom admin.base.utils import OSFAdmin\n\n\nclass MetricsView(OSFAdmin, TemplateView):\n template_name = 'metrics/osf_metrics.html'\n\n...
python
edit
1
1
apache-2.0
3885e8fd36f419976d0b002c391dc246588929c7
sloria/osf.io,monikagrabowska/osf.io,brianjgeiger/osf.io,sloria/osf.io,erinspace/osf.io,TomBaxter/osf.io,mfraezz/osf.io,chrisseto/osf.io,crcresearch/osf.io,adlius/osf.io,laurenrevere/osf.io,monikagrabowska/osf.io,acshi/osf.io,crcresearch/osf.io,cwisecarver/osf.io,icereval/osf.io,cwisecarver/osf.io,aaxelb/osf.io,adlius/...
admin/metrics/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport setuptools\n\ntry:\n import pypandoc\n LONG_DESC = pypandoc.convert(\"README.md\", \"rst\")\nexcept(IOError, ImportError, RuntimeError):\n LONG_DESC = open('README.md').read()\n\nsetuptools.setup(\n name=\"tvtid\",\n v...
python
edit
1
0
mit
d313c43f99ab167f6526698561617c234ee4799a
kirkegaard/tvtid.py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\n\"\"\"\nfrom bottle import route, run, template, request\nimport urllib2\nimport urllib\n\n\nimport sys\nimport os\nfrom whoosh.index import create_in, open_dir\nfrom whoosh.fields import *\...
python
edit
4
3
bsd-2-clause
d10720d1dd7997b5e1543cb27f2cd3e1088f30f5
klokantech/epsg.io,dudaerich/epsg.io,dudaerich/epsg.io,klokantech/epsg.io,klokantech/epsg.io,dudaerich/epsg.io,dudaerich/epsg.io,klokantech/epsg.io
server/fulltext.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import mock\nfrom werkzeug.test import EnvironBuilder\n\nfrom notifications_utils import request_helper\nfrom notifications_utils.request_helper import CustomRequest\n\n\ndef test_get_request_id_from_request_id_header():\n ...
python
edit
3
1
mit
48be23ec035daa041edc77f5478a2405a8311428
alphagov/notifications-utils
tests/test_request_id.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport nose\nimport logging\n\nlogging.disable(logging.DEBUG) # Disable debug logging when running the test suite.\n\n\ndef start(argv=None):\n sys.exitfunc = lamb...
python
edit
1
2
mit
7f3476ec37fcea4195f1a180c1515fd321d78697
inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails
tests/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from collections import OrderedDict\nexcept ImportError: \n from ordereddict import OrderedDict\n\n```\n\nApply this change: Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like object...
python
edit
3
0
bsd-3-clause
da314ab34cb13c1de66b96da2eab1484639e124b
Toblerity/Fiona,rbuffat/Fiona,rbuffat/Fiona,Toblerity/Fiona
fiona/compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n flask-rstblog\n ~~~~~~~~~~~~~\n\n :copyright: (c) 2011 by Christoph Heer.\n :license: BSD, see LICENSE for more details.\n\"\"\"\n\nfrom flask import Flask, url_for\n\napp = Flask(\"flaskrst\")\...
python
edit
1
6
bsd-3-clause
69aa0ec7c79139167e7a2adce1e0effac960755a
jarus/flask-rst
flaskrst/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nRevision ID: 0209_email_branding_update\nRevises: 84c3b6eb16b3\nCreate Date: 2018-07-25 16:08:15.713656\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\nrevision = '0209_email_branding_update'\ndown_revision = '84c3...
python
edit
1
1
mit
f69bc50985a644f90c3f59d06cb7b99a6aeb3b53
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0209_email_branding_update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport chainerx\nfrom chainerx import _pybind_cuda\n\ntry:\n import cupy\n _cupy_available = True\nexcept Exception:\n _cupy_available = False\n\n\n_chainerx_allocator = None\n\n\ndef cupy_share_allocator(owner=chainerx._global_con...
python
edit
1
3
mit
5a74ebe16cc46b93c5d6a7cb4880e74a7ea69442
okuta/chainer,keisuke-umezawa/chainer,wkentaro/chainer,chainer/chainer,hvy/chainer,wkentaro/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,wkentaro/chainer,keisuke-umezawa/chainer,chainer/chainer,tkerola/chainer,keisuke-umezawa/chainer,pfnet/chainer,okuta/chainer,wkentaro/chainer,niboshi/chainer,niboshi/ch...
chainerx/_cuda.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nexecfile('kronos/version.py')\n\nsetup(\n name = 'django-kronos',\n version = __version__,\n description = 'Kronos is a Django application that makes it easy to define and sc...
python
edit
3
0
mit
f349753417682960e607b458a009fbfd324de7ab
jeanbaptistelab/django-kronos,jeanbaptistelab/django-kronos,joshblum/django-kronos,jgorset/django-kronos,jgorset/django-kronos,joshblum/django-kronos
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom flask import Blueprint, render_template\n\nimport database as db\nfrom database.model import Team\n\nbp = Blueprint('public', __name__)\n\n\n@bp.route(\"/map\")\ndef map_page():\n return render_template(\"public/map.htm...
python
edit
1
5
bsd-3-clause
4db93f27d6d4f9b05b33af96bff15108272df6ce
eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
src/webapp/public.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom dict_utils import dict_utils\n\nclass DictUtilsTestCase(unittest.TestCase):\n\n def test_dict_search(self):\n pass\n\n```\n\nApply this change: Add some tests for the implemented methods" }, { "role...
python
edit
1
1
mit
a15d1df33fece7ddeefcbeb5a8094df2ebccd7c6
glowdigitalmedia/dict-utils
tests/test_dict_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A module containing tests for the library representation of IATI data.\"\"\"\nimport iati.core.data\n\n\nclass TestDatasets(object):\n \"\"\"A container for tests relating to Datasets\"\"\"\n\n pass\n\n```\n\nApply this change: ...
python
edit
3
1
mit
3fc94b4cffcfd08b439386fb2b01aa1e12fec6d5
IATI/iati.core,IATI/iati.core
iati/core/tests/test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'katharine'\n\nimport sys\nfrom setuptools import setup, find_packages\n\nrequires = [\n 'libpebble2==0.0.14',\n 'httplib2==0.9.1',\n 'oauth2client==1.4.12',\n 'progressbar2==2.7.3',\n 'pyasn1==0.1.8',\n 'pyas...
python
edit
1
0
mit
0b3c7183e7f8543de3e9875384c5623c24279c4d
pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport dolfin as df\n\ndef amr(mesh, m, DirichletBoundary, g, d):\n V = df.FunctionSpace(mesh, \"CG\", 1)\n\n # Define boundary condition\n bc = df.DirichletBC(V, g, DirichletBoundary())\n\n # Define variational problem\n u =...
python
edit
1
1
bsd-2-clause
451a435ca051305517c79216d7ab9441939f4004
fangohr/fenics-anisotropic-magneto-resistance
src/amr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nMachine Learning module for NeuroImaging in python\n==================================================\n\nSee http://nisl.github.com for complete documentation.\n\"\"\"\n\n#from . import check_build\n#from .base import clone\n\n\ntr...
python
edit
4
1
bsd-3-clause
66a6223ca2c512f3f39ecb4867547a440611713b
abenicho/isvr
nisl/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nShould emit:\nB009 - Line 17, 18, 19\nB010 - Line 28, 29, 30\n\"\"\"\n\n# Valid getattr usage\ngetattr(foo, bar)\ngetattr(foo, \"bar\", None)\ngetattr(foo, \"bar{foo}\".format(foo=\"a\"), None)\ngetattr(foo, \"bar{foo}\".format(foo=...
python
edit
21
0
mit
7cf32e0300735af93dfe0d90ac1e9c20adbc5cf5
ambv/flake8-bugbear,PyCQA/flake8-bugbear
tests/b009_b010.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#Import dependencies\n#Load OS functions from the standard library\nimport os\n\nos.chdir('/home/israel/Development/Python_Exercises/python-octo-wookie/head1stpython/Chapter3')\n#Change path for the current directory\n\ndata = open('sketch....
python
edit
1
0
unlicense
49a7968e51ce850428936fb2fc66c905ce8b8998
israelzuniga/python-octo-wookie
head1stpython/Chapter3/sketch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nsys.path.append('./../../')\n\nfrom pyogi.ki2converter import *\nfrom pyogi.kifu import *\n\n\nif __name__ == '__main__':\n \n for n in range(0, 50000):\n\n ...
python
edit
5
0
mit
51f6272870e4e72d2364b2c2f660457b5c9286ef
tosh1ki/pyogi,tosh1ki/pyogi
doc/sample_code/search_forking_pro.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Anonymous7 from Reddit, Julian Andrews\n#\n# This software may be modified and distributed under the terms\n# of the MIT license. See the LICENSE file for details.\n\nfrom __future__ import absolute_import, division\n\nimp...
python
edit
1
3
mit
76087634d8c165657b35074e54ae7a8ee71f6f75
JulianAndrews/pyeval7,JulianAndrews/pyeval7
tests/test_xorshift_rand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass Fsharp31Package(GitHubTarballPackage):\n\tdef __init__(self):\n\t\tGitHubTarballPackage.__init__(self,\n\t\t\t'fsharp', 'fsharp',\n\t\t\t'3.1.1.31',\n\t\t\t'1f79c0455fb8b5ec816985f922413894ce19359a',\n\t\t\tconfigure = '')\n\t\tself...
python
edit
4
2
mit
efd64433fab0cae0aaffbd30864c9271c0627502
mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/fsharp-3.1.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import timedelta, datetime\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass RequestManager(models.Manager):\n def active_users(self, **options):\n \"\"\"\n Returns a list of ...
python
edit
3
3
bsd-2-clause
85f759a9446cf988cc859d3b74d11e6b224bbd16
kylef/django-request,gnublade/django-request,Derecho/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request,kylef/django-request
request/managers.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
01b511b1f337f00eb72530692eec202611599c5a
mapzen/tilequeue,tilezen/tilequeue
tilequeue/queue/file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)\n# Copyright (c) 2008-2014 California Institute of Technology.\n# License: 3-clause BSD. The full license text is available at:\n# - http://trac.mystic...
python
edit
1
0
bsd-3-clause
5e57dce84ffe7be7e699af1e2be953d5a65d8435
wxiang7/dill,mindw/dill
tests/test_module.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponseRedirect, HttpResponse, Http404\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext\nfrom django.views.generic import View\nfrom homedisplay.utils import publish_w...
python
edit
6
1
bsd-3-clause
1e690994c89b61f3331f6ccacff1dbc822a224a1
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
homedisplay/display/views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User\n\nfrom mks.models import Member\nfrom .models import Suggestion\n\n\nclass SuggestionsTests(TestCase):\n\n def setUp(self):\n self.member = Member.obje...
python
edit
1
1
bsd-3-clause
bc47862e89f73ec152a57bf43126653a981cd411
MeirKriheli/Open-Knesset,jspan/Open-Knesset,navotsil/Open-Knesset,navotsil/Open-Knesset,DanaOshri/Open-Knesset,alonisser/Open-Knesset,jspan/Open-Knesset,noamelf/Open-Knesset,daonb/Open-Knesset,habeanf/Open-Knesset,noamelf/Open-Knesset,DanaOshri/Open-Knesset,OriHoch/Open-Knesset,otadmor/Open-Knesset,alonisser/Open-Kness...
suggestions/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom tests.lib import PipTestEnvironment\n\n\n@pytest.mark.network\ndef test_timeout(script: PipTestEnvironment) -> None:\n result = script.pip(\n \"--timeout\",\n \"0.0001\",\n \"install\",\n ...
python
edit
1
1
mit
26b66a830fd9322dcc826fee2f1924670ea6c976
pypa/pip,pradyunsg/pip,sbidoul/pip,sbidoul/pip,pfmoore/pip,pradyunsg/pip,pypa/pip,pfmoore/pip
tests/functional/test_requests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Grok:\n\n \"\"\"stats.grok.se article statistics.\"\"\"\n\n def __init__(self, title, site):\n self.site = site\n self.title = title\n\n def _make_url(self, year, month):\n \"...
python
edit
1
1
mit
e8d9dae51dc812e94236d1cc45cf1479d88f02f6
Commonists/Grokapi
grokapi/queries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nversion = '0.2.dev0'\n\nlong_description = '\\n\\n'.join([\n open('README.rst').read(),\n open('CREDITS.rst').read(),\n open('CHANGES.rst').read(),\n ])\n\ninstall_requires = [\n 'Django',\n ...
python
edit
1
0
mit
d4a67c8895349532fbc7764531130f737ca53d89
ddsc/ddsc-core,ddsc/ddsc-core
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass IntervalStorage(object):\n def __init__(self, interval_map=None):\n if interval_map == None:\n self.interval_map = {}\n else:\n if not isinstance(interval_map, dict):\n raise Value...
python
edit
1
8
mit
94ad83d899f0c9372013a9bcdad25ee3c9783626
wangjohn/wallace
wallace/interval_storage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hash_table import HashTable\nimport io\nimport pytest\n\n\nwords = []\n\nwith io.open('/usr/share/dict/words', 'r') as word_file:\n words = word_file.readlines()\n\n\ndef test_init():\n ht = HashTable()\n assert len(ht.table) ...
python
edit
1
2
mit
2b80ef0b732403dea1af72693ebb2adc19863cac
jwarren116/data-structures-deux
test_hash.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\ntry:\n # Only works in Python 3.5\n from urllib.request import urlopen\nexcept ImportError:\n from urllib2 import urlopen\nfrom yank import version\n\nif not version.release:\n print(\"This is not a release.\")\n ...
python
edit
1
0
mit
7124d56b3edd85c64dcc7f3ff0fa172102fe8358
andrrizzi/yank,andrrizzi/yank,choderalab/yank,andrrizzi/yank,choderalab/yank
devtools/travis-ci/update_versions_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nOn-demand logging\n=================\n\n.. versionadded:: 2017.7.0\n\nThe sole purpose of this module is logging messages in the (proxy) minion.\nIt comes very handy when debugging complex Jinja templates, for example:\n\n.. code-bl...
python
edit
1
1
apache-2.0
9428a6181cd33b5847dd1a348a651a4c794092ab
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/logmod.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom crispy_forms.bootstrap import FormActions\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset\nfrom django.forms import ModelForm, Textarea\nfrom core.models import Game\n...
python
edit
1
1
mit
351dd3d0540b6169a58897f9cb2ec6b1c20d57a5
joshsamara/game-website,joshsamara/game-website,joshsamara/game-website
core/forms/games.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\"\"\"Command line runtime for Tea.\"\"\"\n\nimport runtime.lib\nfrom runtime import lexer, parser, env\n\nTEA_VERSION = \"0.0.5-dev\"\nTEA_TITLE = \"Tea @\" + TEA_VERSION\nCLI_SYMBOL = \"#> \"\nCLI_SPACE = \" \" * 3\nCL...
python
edit
1
7
mit
587071437d6f00b255e8aa00c5b82a6d05dff63e
lnsp/tea,lnsp/tea
repl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\nimport socket\nimport sys\n\nif len(sys.argv) < 4:\n print(\"Error: Usage <register-result> <client> <name> <output> <status> <ttl>\")\n sys.exit(128)\n\ncheck_client = sys.argv[1]\ncheck_name = s...
python
edit
1
0
mit
5dd78f614e5882bc2a3fcae24117a26ee34371ac
panubo/docker-monitor,panubo/docker-monitor,panubo/docker-monitor
register-result.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rx\nimport concurrent.futures\nimport time\n\nseconds = [5, 1, 2, 4, 3]\n\n\ndef sleep(t):\n time.sleep(t)\n return t\n\n\ndef output(result):\n print '%d seconds' % result\n\nwith concurrent.futures.ProcessPoolExecutor(5) a...
python
edit
1
1
mit
093c9065de9e0e08f248bbb84696bf30309bd536
dbrattli/RxPY,ReactiveX/RxPY,ReactiveX/RxPY
examples/parallel/timer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Craigslist City Scraper\n# By Marshall Ehlinger\n# For sp2015 Systems Analysis and Design\n\nfrom bs4 import BeautifulSoup\nimport re\n\nfh = open(\"sites.htm\", \"r\")\nsoup = BeautifulSoup(fh, \"html.parser\")\n\nfor columnDiv in soup.h...
python
edit
1
5
mit
25ebc324c0af6e1ce74535cc75227071637a7a18
MuSystemsAnalysis/craigslist_area_search,MuSystemsAnalysis/craigslist_area_search
areaScraper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom distutils.core import setup\nimport request\n\nsetup(\n name='django-request',\n version='%s' % request.__version__,\n description='django-request is a statistics module for django. It stores requests in...
python
edit
1
0
bsd-2-clause
000e3b96f6fa77cc9d6e60af67ec98ecc0d2497e
kylef/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request,gnublade/django-request,kylef/django-request
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/python3\n\nimport math\nimport os\nimport random\nimport re\nimport sys\nfrom collections import Counter\n\ndef countTriplets(arr, r):\n potential_triplets_with_middle = Counter()\n potential_triplets_with_end = Counter()\n ...
python
edit
6
4
mit
39ce4e74a6b7115a35260fa2722ace1792cb1780
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/count_triplets.py
rejected_lint
Too many lint violations: 6
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\n```\n\nApply this change: Deploy Travis CI build 381 to GitHub" }, { "role": "a...
python
edit
1
0
mit
8ef41f9ac8ec8a7b7fc9e63b2ff6453782c41d62
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# encoding: utf-8\n\nfrom __future__ import absolute_import, unicode_literals\nfrom .text_exporter import TextExporter\nfrom .util import get_tags_count\n\n\nclass TagExporter(TextExporter):\n \"\"\"This Exporter c...
python
edit
1
4
mit
141eb2a647490142adf017d3a755d03ab89ed687
maebert/jrnl,notbalanced/jrnl,philipsd6/jrnl,MinchinWeb/jrnl
jrnl/plugins/tag_exporter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module provides a simplified API for invoking the Geneways input processor\n, which converts extracted information collected with Geneways into INDRA\nstatements.\n\nSee publication:\nRzhetsky, Andrey, Ivan Iossifov, Tomohiro K...
python
edit
4
1
bsd-2-clause
08ae805a943be3cdd5e92c050512374180b9ae35
pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,bgyori/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy
indra/sources/geneways/geneways_api.py
rejected_lint
Too many lint violations: 4
true