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\nfrom setuptools import setup\n\nwith open('README.md') as f:\n readme = f.read()\n\n\nsetup(\n name='watson',\n version='1.0.0',\n packages=['watson'],\n author='TailorDev',\n author_email='<EMAIL>',\n license='MIT',\n ...
python
edit
1
0
mit
20fd827bdfb80e435065ada50174c6085780889a
TailorDev/Watson,wehlutyk/Watson,yloiseau/Watson,TailorDev/Watson
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 OpenStack Foundation.\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# http://ww...
python
edit
1
1
apache-2.0
477364a4d2895fc79af2a57ace35ededf0281911
openstack/mistral,StackStorm/mistral,openstack/mistral,StackStorm/mistral
mistral/db/sqlalchemy/migration/alembic_migrations/versions/003_cron_trigger_constraints.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ImproperlyConfigured\nfrom oscar.apps.shipping.methods import Free, NoShippingRequired\n\n\nclass Repository(object):\n \"\"\"\n Repository class responsible for returning ShippingMethod\n objects...
python
edit
1
3
bsd-3-clause
1d5442aa70d2ed2569cc062d476129840d08a610
mexeniz/django-oscar,kapari/django-oscar,makielab/django-oscar,eddiep1101/django-oscar,Jannes123/django-oscar,thechampanurag/django-oscar,rocopartners/django-oscar,john-parton/django-oscar,elliotthill/django-oscar,itbabu/django-oscar,mexeniz/django-oscar,jinnykoo/wuyisj.com,marcoantoniooliveira/labweb,sonofatailor/djan...
oscar/apps/shipping/repository.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"An inbound email handler for Django.\"\"\"\n\n__title__ = 'django-inbound-email'\n__version__ = '0.3.3'\n__author__ = 'YunoJuno Ltd'\n__license__ = 'MIT'\n__copyright__ = 'Copyright 2014 YunoJuno'\n__description__ = (\n \"A Django ...
python
edit
1
0
mit
9f1d4788c5f3751b978da97434b5f6c2e22105b5
yunojuno/django-inbound-email
django_inbound_email/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Bisnode Rating Report model" }, { "role": "assistant", "content": "from django.db import models\n\nfrom .constants import COMPANY_RATING_REPORT\n\nfrom .bisnode import get_bisnode_company_report\n\n\nclass BisnodeRatingReport...
python
new_file
1
1
mit
d0a87e354cd75429591fe860f070652b2438950e
FundedByMe/django-bisnode
bisnode/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\nimport os\nimport subprocess\nfrom subprocess import Popen\nimport sys\nfrom tempfile import mkdtemp\n\nfrom tornado.test.util import unittest\n\n\nMAIN = \"\"\"\\\nimport os...
python
edit
1
2
apache-2.0
7f1a58f9faacb0bb0e95c2527a348195742eb866
SuminAndrew/tornado,mivade/tornado,legnaleurc/tornado,tornadoweb/tornado,ifduyue/tornado,bdarnell/tornado,NoyaInRain/tornado,bdarnell/tornado,ajdavis/tornado,NoyaInRain/tornado,bdarnell/tornado,eklitzke/tornado,wujuguang/tornado,allenl203/tornado,SuminAndrew/tornado,Lancher/tornado,Lancher/tornado,NoyaInRain/tornado,No...
tornado/test/autoreload_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for `Cycle` maker." }, { "role": "assistant", "content": "from mongoframes.factory import makers\nfrom mongoframes.factory.makers import selections as selection_makers\n\nfrom tests.fixtures import *\n\n\ndef test_cycle(...
python
new_file
2
3
mit
fd78a7c2cdff3aca182b12f7e9fa5e0819c68720
GetmeUK/MongoFrames
tests/factory/makers/test_selections.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom blist._blist import *\nimport collections\nif hasattr(collections, 'MutableSet'): # Only supported in Python 2.6+\n from blist._sortedlist import sortedlist, sortedset, weaksortedlist, weaksortedset\n from blist._sorteddict impor...
python
edit
13
0
bsd-3-clause
f4014dea504293f3630205092d71ac272763c3b3
DanielStutzbach/blist,DanielStutzbach/blist,pfmoore/blist,pfmoore/blist
blist/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport time\nimport picamera\nimport settings\nfrom settings import IMAGE, SNAP\nimport uploader\n\n\ndef main():\n with picamera.PiCamera() as camera:\n camera.resolution = (IMAGE.resolution_x...
python
edit
1
4
mit
8c3e3ec6076d8b9ee858fca00d92717d77c67ade
projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse
time_lapse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom time import time\n\n\ndef card_image_filename(instance...
python
edit
1
1
mit
ace1997f5d1cab297ab68886501b45602b2d8e2d
neosergio/WisdomBox
cards/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from django.conf.urls.defaults import patterns, url\nexcept ImportError:\n from django.conf.urls import patterns, url\n\n\nurlpatterns = patterns('',\n url(r'^server-data\\.js$', 'nested_admin.views.server_data_js',\n ...
python
edit
1
0
bsd-2-clause
1261777b6aaaea6947a32477e340ef1597045866
sbussetti/django-nested-admin,sbussetti/django-nested-admin,olivierdalang/django-nested-admin,sbussetti/django-nested-admin,olivierdalang/django-nested-admin,olivierdalang/django-nested-admin
nested_admin/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom debugtools.utils.xview import track_view_name, get_used_view_name, get_used_template\n\n\nclass XViewMiddleware(object):\n \"\"\"\n Adds an X-View header to requests.\n\n If the request IP is internal or the user is a logged-i...
python
edit
1
4
apache-2.0
2005e048f7342c011f4bc08899d5cb4d4a15357a
edoburu/django-debugtools,edoburu/django-debugtools,edoburu/django-debugtools
debugtools/middleware/xviewmiddleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Wrapper for mpy-cross.py.\n#\n\nfrom __future__ import print_function\n\nimport sys\nimport os\nimport subprocess\n\n\ndef main():\n command = sys.argv[3:]\n env = dict(os.environ, PYTHONPATH=sys.argv[2])\n...
python
edit
1
1
mit
1cb01d48246baf0ca84a23bd8718d46471b8105f
eerimoq/pumba,eerimoq/pumbaa,eerimoq/pumbaa,eerimoq/pumbaa,eerimoq/pumbaa,eerimoq/pumba,eerimoq/pumba
bin/mpy-tool-wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utility code for the objectrocket package.\"\"\"\nimport types\n\n\ndef register_extension_class(ext, base, *args, **kwargs):\n \"\"\"Instantiate the given extension class and register as a public attribute of the given base.\n\n ...
python
edit
1
1
mit
5156af5576d5663555bc04f5960e7e4cdd861166
objectrocket/python-client,objectrocket/python-client
objectrocket/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._metakernel import MetaKernel\nfrom . import pexpect\nfrom . import replwrap\nfrom .process_metakernel import ProcessMetaKernel\nfrom .magic import Magic, option\nfrom .parser import Parser\n\n__all__ = ['Magic', 'MetaKernel', 'option...
python
edit
11
0
bsd-3-clause
1a8419c6b91276cf578f4c354e34d17551ac2403
Calysto/metakernel
metakernel/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unittest\nimport pathlib2 as pathlib\nimport refmanage\n\nclass NoSpecifiedFunctionality(unittest.TestCase):\n \"\"\"\n Tests when no functionality has been specified on cli\n \"\"\"\n def test_no...
python
edit
4
1
mit
108a05b050383bca218cd02be499f1fad58065dc
jrsmith3/refmanage
test/test_refmanage.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom subprocess import check_call\nimport urllib\nimport json\nimport os\nimport os.path\n\n\ndef install():\n if not (os.path.isfile('.bowerrc') and os.path.isfile('bower.json')):\n return\n with open('.bowerrc') as f:\n ...
python
edit
1
6
isc
e30b8b60de491721f635300840b08b481250fea6
zenhack/microbower
microbower/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# create a single jsonl file from individual register entries\n\nimport sys\nimport os\nfrom openregister import Item\nfrom openregister.representations.jsonl import Writer\n\nregister = sys.argv[1] or \"register\"\...
python
edit
1
0
mit
4c0cc07edc566b2feebefbcc301a6e16033c613a
openregister/registry-data
bin/register_jsonl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# © Copyright 2009 Andre Engelbrecht. All Rights Reserved.\n# This script is licensed under the BSD Open Source Licence\n# Please see the text file LICENCE for more information\n# If this script is distributed, it...
python
edit
1
2
bsd-3-clause
8f698f862e1ea4e2c17e8ddd14052c83bf87ea4c
michaeljones/django-adzone,michaeljones/django-adzone
adzone/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Various utility functions\nimport os\nfrom typing import Any, Callable\n\n\nSHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'\n\n\ndef cached_function(func: Callable[..., Any]) -> Callable[..., Any]:\n data = {}\n\n ...
python
edit
1
4
mit
f29477416729df9cc198f679a2478f6a077ce365
albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com
app/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nimport importlib\nimport asyncio\n\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **options):\n loop = asyncio.get_event_loop()\n bot = None\n while ...
python
edit
1
4
mit
c1f4b466c9acbcb4569bab183f7e932125c833e9
Dwarf-Community/Dwarf
management/commands/startbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport requests\n\n\nclass SlackNotificationError(Exception):\n pass\n\n\ndef send_slack_message(message, webhook_url, pretext=None, title=None):\n \"\"\" Send slack message using webhooks\n\n Args:\n message (s...
python
edit
1
4
mit
a28fe5793c6bcfc7482f840821eb6d7b779a78dd
Chris-Graffagnino/slackelot
slackelot/slackelot.py
rejected_duplicate
Near-duplicate of sample 20805
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright 2017 Kaede Hoshikawa\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You ...
python
edit
1
0
apache-2.0
fe4cca2101245621164b13e7a1c895501da4dbe6
futursolo/sketchbook,futursolo/sketchbook
sketchbook/_version.py
rejected_duplicate
Near-duplicate of sample 20067
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom patch_headers import patch_headers, add_object_info\nimport sys\n\nfor currentDir in sys.argv[1:]:\n print \"working on directory: %s\" % currentDir\n patch_headers(currentDir, new_file_ext='', overwrite=True)\n add_object_inf...
python
edit
2
2
bsd-3-clause
9b3203bae4d72dab90e15dc1b60fb0518a4a0f40
mwcraig/msumastro
run_patch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom fontTools import ttLib\nfrom multiprocessing import Pool\n\nfrom .fontcrunch import optimize_glyph, plot_glyph\n\ndef _optimize(args):\n font, name, pdf, penalty, quiet = args\n if not quiet...
python
edit
1
5
apache-2.0
27ff37e0b0f87d112ea98ff9c3674abed4a3e413
googlefonts/fontcrunch,googlefonts/quadopt,googlefonts/quadopt,googlefonts/fontcrunch
fontcrunch/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#------------------------------------------------------------------------------\n# Copyright (c) 2005, Enthought, Inc.\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included i...
python
edit
1
1
bsd-3-clause
ed88d9b598b3bd360a6575d83ffd3d4044846a96
burnpanck/traits,burnpanck/traits
traits/tests/test_array.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Django\nfrom django import forms\n\n# Local\nfrom .models import User\n\n\nclass UserCreationForm(forms.ModelForm):\n\n class Meta:\n model = User\n fields = '__all__'\n\n def save(self, commit=True):\n user = s...
python
edit
1
2
bsd-2-clause
ed8add36f605def54e53c34627a1eedeefb145e5
dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api
project/api/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom responses import RequestsMock\n\nfrom netvisor import Netvisor\n\n\n@pytest.fixture\ndef netvisor():\n kwargs = dict(\n sender='Test client',\n partner_id='xxx_yyy',\n partner_key='E2CEBB1966C7016...
python
edit
1
1
mit
52fc9bc79343632a034d2dc51645306f4b58210c
fastmonkeys/netvisor.py
tests/services/conftest.py
rejected_duplicate
Near-duplicate of sample 2072
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom datetime import timedelta\n\nBROKER_URL = os.environ['CELERY_BROKER_URL']\nCELERY_IMPORTS = ('cabot.cabotapp.tasks', )\nCELERYBEAT_SCHEDULER = \"djcelery.schedulers.DatabaseScheduler\"\nCELERY_TASK_SERIALIZER = \"json\"\nCEL...
python
edit
1
0
mit
f8604ddaa6e821960acb31b9aaea98a2dfd5b422
Affirm/cabot,BillGuard/cabot,movermeyer/cabot,BillGuard/cabot,bonniejools/cabot,spladug/cabot,movermeyer/cabot,dever860/cabot,iurisilvio/cabot,spladug/cabot,BillGuard/cabot,mcansky/cabotapp,reddit/cabot,mcansky/cabotapp,xinity/cabot,dever860/cabot,Affirm/cabot,dever860/cabot,iurisilvio/cabot,arachnys/cabot,arachnys/cab...
cabot/celeryconfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\ndef imprint_container(tool,\n name,\n namespace,\n context,\n loader=None):\n \"\"\"Imprint a Loader with metadata\n\n Containerisation enables a ...
python
edit
1
2
mit
e946f239695f74d83fcb1b4929ed2281846add4c
MoonShineVFX/core,MoonShineVFX/core,getavalon/core,getavalon/core,mindbender-studio/core,mindbender-studio/core
avalon/fusion/pipeline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\nFixtures specific to admin blueprints\n\"\"\"\n\nimport pytest\n\nfrom tests.base import create_admin_app\nfrom tests.conftest import da...
python
edit
1
1
bsd-3-clause
6b3dd31b1a795a92a00c7dba636a88636018655c
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
tests/blueprints/admin/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport warnings\n\nfrom dtml import tal, metal, tales, context\n\nfrom sheared.python import io\nfrom sheared.python import benchmark\n\nclass Entwiner:\n def __init__(self):\n self.builtins = context.BuiltIns({})\n #self.c...
python
edit
1
3
mit
8f66d41be2ffc8dd42392a30e6eefcbb6da9b667
kirkeby/sheared
sheared/web/entwine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef field(f, cast=None):\n\tdef _inner(self):\n\t\tret = self._obj[f]\n\t\tif cast:\n\t\t\tret = cast(ret)\n\t\treturn ret\n\treturn property(_inner)\n\n\nclass Object:\n\tdef __init__(self, data=None):\n\t\tif data is None:\n\t\t\tdata = {...
python
edit
1
3
mit
d357136075bce9d8582759a525536daf7489becb
andburn/python-unitypack
unitypack/engine/object.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
python
edit
1
1
apache-2.0
ce39e4a5573e7b3a882ee4a327b3c9eb088d1d07
stackforge/senlin,openstack/senlin,stackforge/senlin,openstack/senlin,openstack/senlin
senlin/profiles/container/docker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The test system uses this to override settings in settings.py and\n# settings_local.py with settings appropriate for testing.\n\n# Make sure Celery is EAGER.\nCELERY_ALWAYS_EAGER = True\n\n# Make sure the doctypes (the keys) match the doc...
python
edit
1
0
bsd-3-clause
be30b8220900eaf549fbe1bff7a1e7c3a9be8529
chirilo/kitsune,H1ghT0p/kitsune,feer56/Kitsune1,NewPresident1/kitsune,safwanrahman/kitsune,asdofindia/kitsune,brittanystoroz/kitsune,MikkCZ/kitsune,H1ghT0p/kitsune,philipp-sumo/kitsune,mozilla/kitsune,safwanrahman/kitsune,Osmose/kitsune,YOTOV-LIMITED/kitsune,philipp-sumo/kitsune,feer56/Kitsune1,dbbhattacharya/kitsune,a...
settings_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nHelper functions for pushing content to a staging directory, moving the old directory aside, and moving the staging directory into place.\n\"\"\"\nfrom fabric.api import env\nfrom fabric.operations import sudo\nfrom . import debug\n...
python
edit
1
1
bsd-2-clause
99774f3a525e59c65414606bca6a2f309f5ce140
Multifarious/fabulous
stageflip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='tomviz-pipeline',\n version='0.0.1',\n description='Tomviz python external pipeline execution infrastructure.',\n author='Kitware, Inc.',\n author_email='<EMAIL>',...
python
edit
1
0
bsd-3-clause
b22a9abc8b560ea3014b68b998830e8a5f5073f5
OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz
tomviz/python/setup.py
rejected_duplicate
Near-duplicate of sample 2013
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Handle incoming spam messages.\"\"\"\n\nfrom ..handler import Handler\n\nimport logging\nimport json\n\nclass SpamHandler(Handler):\n \"\"\"Spam handler.\"\"\"\n\n MAX_SCORE = 16\n MAX_EMOTES = 6\n ALLOW_LINKS = False\n\n ...
python
edit
1
6
mit
9af78701228df0decee22854eae1fbb306d90068
CactusDev/CactusBot
cactusbot/handlers/spam.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Python script Exporter class\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n...
python
edit
3
1
bsd-3-clause
560ff8d533a2247e7b194755fb13941ffbc1f544
SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidg...
IPython/nbconvert/exporters/python.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass CsvUploadForm(forms.Form):\n \"\"\"Form for uploading a CSV file.\"\"\"\n\n csv_file = forms.FileField(label=\"Please upload a CSV file.\")\n\n```\n\nApply this change: Test whether uploaded CSV has...
python
edit
1
2
mit
188e4e6d3419793ae8811eb66d94e31849af3461
pydata/conf_site,pydata/conf_site,pydata/conf_site
conf_site/core/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nfrom ..utils.log import log, INFO, ERROR, PASS\nfrom ..utils.i_selenium import assert_tab, image_div\nfrom ..tests import TestWithDependency\n\n__all__ = [\"welcome_email\"]\n\n\n#####\n# Test : Welcome Email Recieved\n#####\n@...
python
edit
6
2
mit
58c7726572ab6b6b762bbbfc3b3397729a9332cd
jsharkey13/isaac-selenium-testing,jsharkey13/isaac-selenium-testing
isaactest/tests/welcome_email.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis.db import models\n\n\nclass Hospital(models.Model):\n file_nbr = models.CharField(max_length=20)\n license_number = models.CharField(max_length=20)\n name = models.CharField(max_length=250)\n address = mo...
python
edit
1
1
apache-2.0
b6bb2185caa9f6242acc463fbaae1c7f841390da
texastribune/tt_hospitals,texastribune/tt_hospitals
tt_hospitals/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport itertools\nimport collections\n\nimport networkx as nx\n\n\nfrom irco import logging\n\nlog = logging.get_logger()\n\n\ndef get_countries(publication):\n publication_countries = set()\n\n for affiliation in publicat...
python
edit
2
4
mit
6995c7ca63f26a6c350fbdad5e5d194c4c1a60b0
GaretJax/irco,GaretJax/irco,GaretJax/irco,GaretJax/irco
irco/graphs/country.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom flask_wtf import Form\nfrom flask_wtf.file import FileField, FieldList\n\n\nclass FileUploadForm(Form):\n uploads = FieldList(FileField())\n\nDEBUG = True\nSECRET_KEY = 'secret'\n\napp = Fla...
python
edit
2
4
bsd-3-clause
72e1a3552a24ac9b08e5181fb1ad15f78ca6a592
Maxence1/flask-wtf,Maxence1/flask-wtf
examples/uploadr/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBusiness logic in this app is implemented using a CQRS style. Commands should\nbe implemented as functions here. Queries should be implemented as methods on\nDjango model managers. Commands can then be called from a management comma...
python
edit
1
3
apache-2.0
c8c186e46990797e1faa07c71fb57920a89a2dcc
veselosky/webquills,veselosky/webquills,veselosky/webquills
webquills/core/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyinstrument import Profiler\n\ntry:\n from flask import Flask, g, make_response, request\nexcept ImportError:\n print('This example requires Flask.')\n print('Install using `pip install flask`.')\n exit(1)\n\napp = Flask(_...
python
edit
1
2
bsd-3-clause
1b502cdf399b5b9cd4593aea82750b77114fe858
joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument
examples/flask_hello.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nHandles ambiguities of RFCs.\n\"\"\"\n\n\ndef normalize_namreply_params(params):\n # So… RFC 2812 says:\n # \"( \"=\" / \"*\" / \"@\" ) <channel>\n # :[ \"@\" / \"+\" ] <nick> *( \" \" [ \"@\" / \"+\" ] <nick> )...
python
edit
1
2
mit
1c1b8214a00adf7edc62a67575ae960fedf1d67c
ProgVal/irctest
irctest/irc_utils/ambiguities.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib, datetime, os\n\ndef fetch():\n url = 'http://loadmeter.egyptera.org/ClockToolTip.aspx'\n output = datetime.datetime.now().strftime('egyptera.%Y-%m-%d-%H-%M-%S.html')\n output = os.path.join(os.path.dirname(__file__),...
python
edit
3
1
apache-2.0
c0d8b7f13a74fd4da7b36d30a61224b76367acbe
mtayseer/power-grid-scraper
scraper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function, unicode_literals\n\nimport sys\n\nimport pytest\n\n\nif __name__ == '__main__':\n sys.exit(pytest.main(sys.argv[1:]))\n\n```\n\nApply this change: Fix running unit tests throu...
python
edit
1
0
bsd-3-clause
0337f32a493690f5a0be3893c43b7af3644f964d
beanbaginc/django-evolution
tests/runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\n\nclass Review(models.Model):\n user = models.ForeignKey(User, default=None)\n title = models.CharField(max_length=128)\n description = models.TextField()...
python
edit
1
0
mit
4a7b0fb482011400da0b3e760cde2d6f294d168f
iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview
sysrev/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\n\nif sys.version_info < (2, 7):\n from tests import TestCase # NOQA\nelse:\n from unittest import TestCase # NOQA\n\n```\n\nApply this change: Use right test case for py 2.6" }, { "role": "assistant", "cont...
python
edit
1
0
mit
85f3d1396b5c3f615d83d355a1b836c29d23d295
gterzian/exam,gterzian/exam,Fluxx/exam,Fluxx/exam
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('studygroups', '0027_auto_20150513_2005'),\n ]\n\n...
python
edit
1
0
mit
fb1cfd15c646cc076a152acbd823b736f2a46724
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
studygroups/migrations/0028_auto_20150806_0039.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set default config values to none so user is forced to set them.\n\nAlso document fields in the default config" }, { "role": "assistant", "content": "class DefaultConfig():\n secret_key = None # Django secret key used for ses...
python
new_file
1
0
mit
e78b8704a68b49593b43ac5b9690be36fca2e274
simon-andrews/movieman2,simon-andrews/movieman2
default_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nif sys.version_info[:2] > (2, 5):\n from tests._testwith import *\nelse:\n from tests.support import unittest2\n \n class TestWith(unittest2.TestCase):\n \n @unittest2.skip('tests using with statement...
python
edit
2
1
bsd-2-clause
a80b1292e9c9a29921a3e42c7c60d861b4bf7965
frankier/mock,dannybtran/mock,testing-cabal/mock,sorenh/mock,scorphus/mock,nett55/mock,rbtcollins/mock,fladi/mock,OddBloke/mock,derwiki-adroll/mock,kostyll/mock,pypingou/mock,lord63-forks/mock,johndeng/mock
tests/testwith.py
rejected_duplicate
Near-duplicate of sample 14474
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom plumeria.command import commands, CommandError\nfrom plumeria.message.lists import build_list\nfrom plumeria.perms import owners_only\nfrom plumeria.transport import transports\n\n\n@commands.register('accept invite', category='Discord...
python
edit
1
7
mit
e422f77898853fc759d3828c4053b799cd2b1fa3
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
plumeria/plugins/bot_control.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\ndef pytest_runtest_logreport(report):\n \"\"\"Overwrite report by removing any captured stderr.\"\"\"\n # print(\"PLUGIN SAYS -> report -> {0}\".format(report))\n # print(\"PLUGIN SAYS -> report.sections ->...
python
edit
1
3
mit
bc5abf988956235b48aeb1234d9944fe70be619a
hamzasheikh/pytest-hidecaptured
pytest_hidecaptured.py
rejected_duplicate
Near-duplicate of sample 16083
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom hijack.tests.test_hijack import BaseHijackTests\nfrom hijack.tests.utils import SettingsOverride\n\nfrom hijack_admin import settings as hijack_admin_settings\nfrom hijack_admin.tests.test_app.models import R...
python
edit
1
1
mit
d8da4526375946551fd3963b42f2bb13035abb2d
arteria/django-hijack-admin,arteria/django-hijack-admin,arteria/django-hijack-admin
hijack_admin/tests/test_hijack_admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2007 Albert Strasheim <<EMAIL>>\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
7
0
apache-2.0
0a04143c94540d864a288e5c79ade4ba9bf31e37
aberzan/pyactivemq,WilliamFF/pyactivemq,alberts/pyactivemq,cl2dlope/pyactivemq,aberzan/pyactivemq,winking324/pyactivemq,hetian9288/pyactivemq,winking324/pyactivemq,chenrui333/pyactivemq,cleardo/pyactivemq,haofree/pyactivemq,alberts/pyactivemq,hetian9288/pyactivemq,haofree/pyactivemq,cl2dlope/pyactivemq,WilliamFF/pyacti...
src/test/stresstest.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
2
apache-2.0
745148817bacacc26ff06a8470cf52c815f6565a
huntxu/python-neutronclient,eayunstack/python-neutronclient,rackerlabs/rackspace-python-neutronclient,eayunstack/python-neutronclient,Juniper/python-neutronclient,noironetworks/python-neutronclient,Juniper/python-neutronclient,noironetworks/python-neutronclient,huntxu/python-neutronclient,openstack/python-neutronclient...
neutronclient/neutron/v2_0/availability_zone.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ConfigParser\nConfig = ConfigParser.ConfigParser()\n\nimport os\nprint os.getcwd()\ntry:\n Config.read('/opt/monstr/current.cfg')\nexcept Exception as e:\n print 'WARNING! Configuration is missing. Using test_conf.cfg'\n Con...
python
edit
3
3
apache-2.0
d69b41307b94db7e8658fd209fdae0e0240bc62a
tier-one-monitoring/monstr,tier-one-monitoring/monstr
Monstr/Core/Config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=19\nbranch=\"master\"\ntimestamp=1376526199.16\n```\n\nApply this change: Tag commit for v0.0.20-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=20\nbranc...
python
edit
1
0
mit
28385e10d00be3b68d312ed6ea19695c21c0beeb
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth import user_logged_in, user_logged_out, login, logout\nfrom django.utils.encoding import force_bytes, force_text\nfrom django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode\n\nfrom djoser.conf import...
python
edit
1
3
mit
ded0d2ced823deeabf860abd9ec5120165ed7fde
sunscrapers/djoser,sunscrapers/djoser,sunscrapers/djoser
djoser/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.conf import settings\nfrom django.contrib.staticfiles.testing import StaticLiveServerTestCase\n\nfrom selenium import webdriver\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom sel...
python
edit
8
1
bsd-3-clause
4c414e753cc086e0ae52425a3eae6de453b492ca
Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner,Ecotrust/forestplanner
lot/landmapper/tests/test_pdf.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nlogger = logging.getLogger('djpg')\n\nfrom django.dispatch import Signal\nfrom .codes import codes\n\nnotification_received = Signal(providing_args=['notification'])\ntransaction_received = Signal(providing_args=['transactio...
python
edit
1
1
mit
b49c40dddb5b90881f9f86872cb6a3b6044e1637
mstrcnvs/djpg
djpg/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# import_string was appropriated from django and then rewritten for broader\n# python support. The version of this method can't be imported from Django\n# directly because it didn't exist until 1.7.\n\n\ndef import_string(dotted_path):\n ...
python
edit
1
3
mit
9349fc0f176a40de58fba551b205c771af3ea7b7
thomasw/djproxy
djproxy/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-*- encoding: utf-8 -*-\n\nimport base\n\ndef handle_date(template):\n year = None\n if len(template.params) >= 3:\n try:\n year = int(unicode(template.params[2]))\n except ValueError:\n pass\n ...
python
edit
7
7
mit
7f79645182de6fed4d7f09302cbc31351defe467
guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt
snippet_parser/fr.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.types import string\n\n\ndef test_get(test):\n\n def handle_connect(handler):\n info = handler.api.get_info()\n assert isinstance(info['api_version'], string)\n assert isinstance(info['server_timestamp'], ...
python
edit
1
2
apache-2.0
665af108d44e5aa91483bc70c0c76dab9b297d41
devicehive/devicehive-python
tests/test_api_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport kindred\n\ndef test_pubtator():\n\tdata = kindred.pubtator.load([19894120,19894121])\n\n\tassert isinstance(data,list)\n\tfor d in data:\n\t\tassert isinstance(d,kindred.RelationData)\n\n\tfileCount = len(data)\n\tentityCount = sum...
python
edit
1
4
mit
489ac862bf5efc70d1af3933d1c518489a0e95a6
jakelever/kindred,jakelever/kindred
tests/test_pubtator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\nimport netCDF4\n\nclass test_filepath(unittest.TestCase):\n\n def setUp(self):\n self.netcdf_file = os.path.join(os.getcwd(), \"netcdf_dummy_file.nc\")\n self.nc = netCDF4.Dataset(self.netcdf_fil...
python
edit
1
1
mit
9fefa30f51f1a3c0e4586bc21c36324c6dfbbc87
Unidata/netcdf4-python,Unidata/netcdf4-python,Unidata/netcdf4-python
test/tst_filepath.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBasic Template system for project skeleton.\n\nskeleton is similar to the template part of PasteScript but \nwithout any dependencies; it should also be compatible with Python 3.\n\nHowever in this early phase of development, it onl...
python
edit
5
0
bsd-2-clause
42abaca67b742ff343c4f6c5553b9eb9dad28d43
dinoboff/skeleton
skeleton/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this...
python
edit
1
0
apache-2.0
11103afa4a46cc1835f1479651bcd7c808d6a33c
apache/beam,staslev/incubator-beam,jbonofre/beam,iemejia/incubator-beam,lukecwik/incubator-beam,rangadi/beam,wtanaka/beam,rangadi/beam,markflyhigh/incubator-beam,chamikaramj/beam,manuzhang/beam,tgroh/incubator-beam,wangyum/beam,charlesccychen/beam,RyanSkraba/beam,manuzhang/beam,eljefe6a/incubator-beam,apache/beam,charl...
sdks/python/apache_beam/runners/api/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django_react_templatetags.mixins import RepresentationMixin\n\n\ndef json_encoder_cls_factory(context):\n ...
python
edit
1
5
mit
892393458612ea78319cceeb98957c34ccb91d2d
Frojd/django-react-templatetags,Frojd/django-react-templatetags,Frojd/django-react-templatetags
django_react_templatetags/encoders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom classes.person import Person\n\n\nclass PersonClassTest(unittest.TestCase):\n def test_full_name_only_returns_strings(self):\n with self.assertRaises(ValueError, msg='Only strings are allowed as names'):\n ...
python
edit
1
1
mit
fb8f77553d75cdcf2c50423cb2e4159350a13e5a
peterpaints/room-allocator
tests/test_person.py
rejected_duplicate
Near-duplicate of sample 631
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nModule provides a simple cubic_rectification function.\n\"\"\"\n\nimport numpy as np\n\n\ndef cubic_rectification(x):\n \"\"\"\n Rectified cube of an array.\n\n Parameters\n ----------\n X : numpy.ndarray\n Inp...
python
edit
1
1
mit
f3b960da24f2f9486eca3936a5be0d5001c24ab3
scottclowe/python-continuous-integration,scottclowe/python-ci,scottclowe/python-continuous-integration,scottclowe/python-ci
package_name/module.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nTest the grains module\n'''\nimport integration\n\n\nclass TestModulesGrains(integration.ModuleCase):\n '''\n Test the grains module\n '''\n def test_items(self):\n '''\n grains.items\n '''\n opt...
python
edit
1
2
apache-2.0
7176ec5d4abe678d8f0d01baeacf4dc78204b18f
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/modules/grains.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"golingo URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app imp...
python
edit
1
0
bsd-3-clause
b86d88a10839ba642f992dcaf3e69de3a244f984
jesuejunior/golingo,jesuejunior/golingo,jesuejunior/golingo
golingo/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom atom.ext.crispy_forms.forms import SingleButtonMixin\nfrom braces.forms import UserKwargModelFormMixin\nfrom django import forms\n\nfrom .models import Case\n\n\nclass CaseForm(SingleButtonMixin, UserKwargModel...
python
edit
1
2
mit
cfe78dabea226e24928d26183f4b135c52b64663
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/cases/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport capture\nfrom picamera import PiCamera\nimport time\nimport delay\n\n\ndef image_cap_loop(camera, status=None):\n \"\"\"Set image parameters, capture image, set wait time, repeat\"\"\"\n\n resolution = (1640, 1232)\n wait = ...
python
edit
3
2
mit
4a330e190dcb727cb7483b826f2927b94b081e8a
gnfrazier/YardCam
yardcam.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport math\n\n\nclass PrimeChecker(object):\n\n def run(self, **kwargs):\n return self._is_prime(**kwargs)\n\n def _is_prime(self, value=0):\n if math.floor(value) != value:\n raise ValueError('%s should be a...
python
edit
2
5
apache-2.0
aff8cebfd168493a4a9dff77cf9722507429d570
peak6/st2,lakshmi-kannan/st2,pixelrebel/st2,StackStorm/st2,jtopjian/st2,pinterb/st2,Plexxi/st2,punalpatel/st2,armab/st2,grengojbo/st2,grengojbo/st2,punalpatel/st2,pixelrebel/st2,Itxaka/st2,lakshmi-kannan/st2,emedvedev/st2,lakshmi-kannan/st2,pixelrebel/st2,nzlosh/st2,peak6/st2,dennybaa/st2,pinterb/st2,Plexxi/st2,nzlosh/...
contrib/examples/actions/pythonactions/isprime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file contains gunicorn settings.\nTo run sqmpy with gunicorn run the following command:\n\n gunicorn -c gunicorn_cfg.py run:app\n\nIn order to daemonize gunicorn add -D flag:\n\n gunicorn -c gunicorn_cfg.py run:app -D\n\n...
python
edit
1
0
bsd-3-clause
f2d3d52c4118b9ff0161a8db5d53d83c199918e3
mehdisadeghi/sqmpy,simphony/sqmpy,mehdisadeghi/sqmpy,simphony/sqmpy,simphony/sqmpy,mehdisadeghi/sqmpy
gunicorn_cfg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\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# http://www.apache.or...
python
edit
1
0
apache-2.0
3f6b18304a3f947cc165201a507a672a56af851f
robhudson/warehouse,mattrobenolt/warehouse,techtonik/warehouse,mattrobenolt/warehouse,mattrobenolt/warehouse,robhudson/warehouse,techtonik/warehouse
warehouse/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json as json_converter\nfrom datetime import date, datetime\n\nfrom hug.format import content_type\n\n\ndef _json_converter(item):\n if isinstance(item, (date, datetime)):\n return item.isoformat()\n elif isinstance(item...
python
edit
1
4
mit
1513532e473866438ac9dabbfb462e9348a5895e
janusnic/hug,yasoob/hug,janusnic/hug,shaunstanislaus/hug,timothycrosley/hug,alisaifee/hug,gbn972/hug,MuhammadAlkarouri/hug,philiptzou/hug,giserh/hug,timothycrosley/hug,STANAPO/hug,shaunstanislaus/hug,STANAPO/hug,origingod/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,alisaifee/hug,giserh/hug,yasoob/hug,gbn972/hug,phi...
hug/output_format.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom django import forms\nfrom django.utils.dateparse import parse_datetime\nfrom django.core.exceptions import ValidationError\n\ndef valid_date(date):\n regex = (\"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8]...
python
edit
3
5
bsd-3-clause
035ae3b2acf5c29304a1c2ec327feb5cc7160559
remarkablerocket/django-vend,remarkablerocket/django-vend
django_vend/core/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.test import Client, TestCase\n\n\nc = Client()\n\n\nclass WebsiteStabilityTestCase(TestCase):\n def test_availability(self):\n self.assertEqual(c.get('/lecturer/').status_code, 302) # We are getting redirect when no...
python
edit
1
1
mit
a0d32bb36674863a0e9a04aa97e8c1f7e8ca0f37
martinlunde/RealBack,martinlunde/RealBack,martinlunde/RealBack
lecturer/tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check for and use system proxies for downloading files\n\nIn some cases when the user is using a proxy urlib.urlopen() will fail to successfully open https files. This prevents the retriever from accessing the scripts stored on GitHub and ca...
python
new_file
1
5
mit
f55af10f1767d39fdba65fb4c17beee526f96748
embaldridge/retriever,davharris/retriever,davharris/retriever,davharris/retriever,embaldridge/retriever,goelakash/retriever,henrykironde/deletedret,goelakash/retriever,henrykironde/deletedret,embaldridge/retriever
lib/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\nimport time\nimport uuid\n\nfrom kazoo.client import KazooClient, KazooState\n\n# if this env variable is set, ZK client integration tests are run\n# against the specified host list\nENV_TEST_HOSTS = \"KAZOO_TEST...
python
edit
1
3
apache-2.0
e507461dba5020726c9505fef187098ad234a68a
kormat/kazoo,rackerlabs/kazoo,tempbottle/kazoo,max0d41/kazoo,rgs1/kazoo,rockerbox/kazoo,harlowja/kazoo,kormat/kazoo,rgs1/kazoo,harlowja/kazoo,pombredanne/kazoo,python-zk/kazoo,python-zk/kazoo,pombredanne/kazoo,rockerbox/kazoo,tempbottle/kazoo,AlexanderplUs/kazoo,jacksontj/kazoo,max0d41/kazoo,Asana/kazoo,jacksontj/kazoo...
kazoo/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django.contrib.auth.decorators import login_required\nfrom django.utils.translation import ugettext as _\nfrom django.views...
python
edit
10
3
mit
0867054258e231b2ce9b028c5ce2bc3a26bca7be
underlost/GamerNews,underlost/GamerNews
gamernews/apps/threadedcomments/views.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom Bio import Entrez\nfrom Bio import SeqIO\nEntrez.email = \"<EMAIL>\"\n\ninfilename = sys.argv[1]\noutfilename = sys.argv[2]\n\nwith open(infilename) as f:\n gi_numbers=', '.join(line.rstrip() for line in f)\n\nhandle = E...
python
edit
2
0
bsd-2-clause
ab6526b14f5bdc544367bcaa281a861d2314330b
datadaveshin/bioinformatics,datadaveshin/bioinformatics
gi2fasta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ncommands = {}\nargs = []\nkwargs = {}\n\n\ndef EXIT(msg, code=1):\n print(msg)\n sys.exit(code)\n\ndef command(fn):\n commands[fn.__name__] = fn\n return fn\n\n\ndef run():\n if len(sys.argv) < 2:\n EXIT(...
python
edit
1
8
mit
8cd11782d4b3558d204f438accdc15b3b702839b
runningskull/unn
unn/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom rest_framework import permissions\n\nfrom website.models import Node, NodeLog\n\nfrom api.nodes.permissions import ContributorOrPublic\nfrom api.base.utils import get_object_or_error\n\n\nclass ContributorOrPub...
python
edit
1
6
apache-2.0
10c6112dd343901b502c31655a001e612ed6e441
doublebits/osf.io,mluo613/osf.io,cwisecarver/osf.io,billyhunt/osf.io,baylee-d/osf.io,caneruguz/osf.io,mattclark/osf.io,Johnetordoff/osf.io,kwierman/osf.io,kwierman/osf.io,amyshi188/osf.io,acshi/osf.io,mfraezz/osf.io,zamattiac/osf.io,pattisdr/osf.io,samchrisinger/osf.io,RomanZWang/osf.io,hmoco/osf.io,alexschiller/osf.io...
api/logs/permissions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_restful import Api\n\n\napp = Flask(__name__)\napi = Api(app)\n\ndebug = True\n\n\n@app.before_first_request\ndef before_first_request():\n pass\n\n\n@app.before_request\ndef before_request():\n pas...
python
edit
1
2
mit
66f6529880da4e8c444c2872820fb6b207c3794e
DSM-GRAM/Artist,DSM-GRAM/Artist
Server/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\n# --- replacing shell backticks ---\n# https://docs.python.org/2/library/subprocess.html#replacing-bin-sh-shell-backquote\n# output=`mycmd myarg`\n# output = check_output([\"mycmd\", \"myarg\"])\n# not true, because...
python
edit
4
3
unlicense
5b1ab860a0706831b8abc77a060d6ba89cf8946a
techtonik/discovery,techtonik/discovery,techtonik/discovery
interface/subprocess/001.backticks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n import argparse\nexcept ImportError:\n argparse = None\nimport sys\n \nimport core\n\n\ndef main():\n if argparse:\n args = get_parser().parse_args(sys.argv[1:])\n lasfn = args.las_filename\n xlsfn = ...
python
edit
2
3
mit
6c4e94f1133c9c9cd18b97a386f04f56b229f9a8
kinverarity1/las-reader,Kramer477/lasio,kinverarity1/lasio,VelizarVESSELINOV/las-reader,kwinkunks/lasio
las_reader/las2excel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom six.moves.urllib import request\n\n\ndef main():\n opener = request.FancyURLopener()\n opener.addheaders = [('User-Agent', '')]\n opener.retrieve(\n 'http://www.thespermwhale.com/jaseweston/babi...
python
edit
1
1
mit
ccb774b58ab7dbe704abfb7df3fa29915fad8f8f
niboshi/chainer,keisuke-umezawa/chainer,wkentaro/chainer,wkentaro/chainer,pfnet/chainer,keisuke-umezawa/chainer,wkentaro/chainer,niboshi/chainer,niboshi/chainer,okuta/chainer,okuta/chainer,chainer/chainer,hvy/chainer,chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,okuta/chainer,keisuke-umezawa/chainer,hvy/chai...
examples/memnn/download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Linaro Limited\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# http://www.apac...
python
edit
1
0
apache-2.0
1a1600b0cd27d5e004be344574901c64cdd6f7a2
utzig/mcuboot,tamban01/mcuboot,utzig/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,utzig/mcuboot,tamban01/mcuboot,tamban01/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,utzig/mcuboot,utzig/mcuboot,ATmobica/mcuboot,ATmobic...
scripts/imgtool/__init__.py
rejected_duplicate
Near-duplicate of sample 4780
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom jacquard.buckets.constants import NUM_BUCKETS\n\n\n@pytest.mark.parametrize('divisor', (\n 2,\n 3,\n 4,\n 5,\n 6,\n 10,\n 100,\n))\ndef test_divisible(divisor):\n assert NUM_BUCKETS % divisor ==...
python
edit
1
1
mit
91bb9574ec760efd8aba2d9ae8fe67fe2e69d0a2
prophile/jacquard,prophile/jacquard
jacquard/buckets/tests/test_bucket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAdd very large RV errors for stars with no known RVs.\nConvert to cartesian.\n\"\"\"\n\nimport numpy as np\nimport sys\nsys.path.insert(0, '..')\nfrom chronostar import tabletool\nfrom astropy.table import Table\n\ndatafile = Table....
python
edit
null
null
mit
9938678e05270c06d328aeb466ab827bab232e3a
mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar
solar_neighbourhood/prepare_data_add_kinematics.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport log\nfrom jinja2 import Template\nimport traceback\n\nclass Report(object):\n def __init__(self):\n self.logs = log.LogAggregator.new()\n\ndef format_exception_as_reason(exc):\n return traceback....
python
edit
4
1
mit
361ebc774fba5489c1911ac40dde4828f6cbd374
richo/flysight-manager,richo/flysight-manager
flysight_manager/report.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport collections\n\nfrom xmlrpc2 import client as xmlrpc2\n\n\nclass BaseProcessor(object):\n\n def __init__(self, index, *args, **kwargs):\n super(BaseP...
python
edit
1
5
bsd-2-clause
6784c455cf93c16237661d6d9fed6af06726a880
crateio/carrier
conveyor/processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib.auth.models import User\n\nfrom portal.models import Profile\n\n# Create your forms here.\n\nclass UserForm(forms.ModelForm):\n password = forms.CharField(widget=forms.PasswordInput)\n\n c...
python
edit
1
0
mit
d0b9824fe29e9c5772c0fc2838e2c6e373013819
huangsam/chowist,huangsam/chowist,huangsam/chowist
portal/forms.py
accepted
null
true