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 utilities\n\n\ndef parse(src):\n\tif src == ':':\n\t\tfrom ..description import default as desc\n\telif src.startswith(':'):\n\t\timport importlib\n\t\tdesc = importlib.import_module(src[1:])\n\telse:\n\t\timport os, imp\n\t\tfrom ..... | python | edit | 1 | 5 | mit | 50f8e32521ccf871177b4402b6a410dad896b272 | davidfoerster/schema-matching | src/schema_matching/collector/description/_argparser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import *\nfrom userena.contrib.umessages import views as messages_views\nfrom django.contrib.auth.decorators import login_required\n\nurlpatterns = patterns('',\n url(r'^compose/$',\n messages_views.message_c... | python | edit | 10 | 0 | bsd-3-clause | 6e43c5a69bd7b0291ef54d1936f64d0596189fa5 | ugoertz/django-userena,ugoertz/django-userena,ugoertz/django-userena | userena/contrib/umessages/urls.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import path\n\nfrom django_react_templatetags.tests.demosite import views\n\n\nurlpatterns = [\n path(\n 'static-react-view',\n views.StaticReactView.as_view(),\n name='static_react_view',\n ),\n]... | python | edit | 1 | 0 | mit | ee4c8b806ecf0ada51916fe63f9da9e81c03850d | Frojd/django-react-templatetags,Frojd/django-react-templatetags,Frojd/django-react-templatetags | django_react_templatetags/tests/demosite/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nimport unittest\n\nfrom huey import tests\n\n\ndef _requirements_installed():\n try:\n import django\n return True\n except Exception:\n return False\n\n\ndef run_test... | python | edit | 3 | 4 | mit | 259ac1bf6390c050892fa678842c1793e7f1dda0 | coleifer/huey,rsalmaso/huey,pombredanne/huey | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.\n\n# The app name will be used in several places.\nAPP_NAME = 'Yelp Love'\n\nAPP_BASE_URL = 'https://PROJECT_ID.appspot.com/'\n\nLOVE_SENDER... | python | edit | 1 | 0 | mit | 1ef0e4db1079995b5dd6a013d3fa51c1b61db178 | Yelp/love,Yelp/love,Yelp/love | config-example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jwt_auth.forms import JSONWebTokenForm\n\n\ndef loginUser(username, password):\n \"\"\"Should login user and return a jwt token, piggyback on jwt_auth\"\"\"\n request = {\"username\": username, \"password\": password}\n form =... | python | edit | 1 | 2 | mit | 650c94107106cddafccaf5d2021a6407fcac990e | ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/reango | bend/src/users/jwt_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom SublimeLinter.lint import Linter, util\n\n\nclass Cppcheck(Linter):\n cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')\n regex = (\n r'^(?P<file>(:\\\\|[^:])+):(?P<line>\\d+):((?P<col... | python | edit | 1 | 3 | mit | d624a1e638cf6f1fca7b7d8966f3ab7c6c9f7300 | SublimeLinter/SublimeLinter-cppcheck | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nimport logbook\n\nfrom .utils import appcontext_command\nfrom ..ctx import context\n\nimport flask_migrate\n\n_logger = logbook.Logger(__name__)\n\n\n@click.group()\ndef migrate():\n pass\n\n\n@migrate.command()\n@appcontex... | python | edit | 1 | 2 | bsd-3-clause | 77d3f60468fcf814c19d693e3401b1769e4993a9 | getweber/weber-cli | cob/cli/migrate_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom pianette.utils import Debug\nfrom flask import Flask, render_template, request\nfrom threading import Thread\n\napp = Flask(__name__, template_folder='../templates')\n\nimport logging\nlog = logging.getLogger('werkzeug... | python | edit | null | null | mit | 0cf393c9bafbe99e29a76cf289f34ac8edcc9416 | tchapi/pianette,tchapi/pianette,tchapi/pianette,tchapi/pianette | pianette/PianetteApi.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nExample settings module.\n\nThis should be copied as `settings.py` and the values modified there.\n\nThat file is ignored by the repo, since it will contain environment\nspecific and sensitive information (like passwords).\n\"\"\"\n... | python | edit | 4 | 1 | mit | 746cc719ce80636c19b2eea4b3d7328e680f7624 | AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files | settings_example.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom Instanssi.kompomaatti.models import Event\n\n\nclass DBLogEntry(models.Model):\n user = models.ForeignKey(User, blank=True, null=T... | python | edit | 1 | 2 | mit | d9d52d2ba93b29f04d1f0e6903a6a343718f7bce | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | Instanssi/dblog/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.4 on 2017-11-13 16:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('osf', '008... | python | edit | 1 | 3 | apache-2.0 | 2b81d198b7d3dd9094f47d2f8e51f0275ee31463 | baylee-d/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,mattclark/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,adlius/osf.io,felliott/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,brianjgeiger/osf.io,mfraezz/osf.io,erinspace/osf.io,HalcyonChimera/osf.io,CenterForOpenScience/osf.io,... | osf/migrations/0084_migrate_node_info_for_target.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views import generic\n\nfrom gallery.models import GalleryImage\nfrom .models import Arc, Issue\n\n\nclass IndexView(generic.ListView):\n model = Arc\n template_name = \"comics/index.html\"\n context_object_name = \"arc... | python | edit | 1 | 1 | mit | 994e185e7bb8b2ffb78f20012121c441ea6b73a1 | evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca | comics/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\nfrom whitenoise import WhiteNoise\n\nfrom app import create_app\n\nPROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))\nSTATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')\nSTATIC_URL = 'sta... | python | edit | 1 | 0 | mit | d58c04d9745f1a0af46f35fba7b3e2aef704547e | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.admin import site, ModelAdmin\n\nfrom .models import Issue, Jurisdiction, Service, Application\n\n\nclass ApplicationAdmin(ModelAdmin):\n list_display = ('identifier', 'name', 'active')\n list_filter = ('active',)\... | python | edit | 1 | 3 | mit | 7231111564145bdbc773ed2bb5479b6edc0c7426 | 6aika/issue-reporting,6aika/issue-reporting,6aika/issue-reporting | issues/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport psycopg2\nimport urlparse\n\nurlparse.uses_netloc.append(\"postgres\")\nurl = urlparse.urlparse(os.environ[\"DATABASE_URL\"])\n\nconn = psycopg2.connect(\n database=url.path[1:],\n user=url.username,\n password=ur... | python | edit | 2 | 1 | mit | 4d446f6b810fdb1a996ab9b65259c1212c6b951a | gsganden/pitcher-reports,gsganden/pitcher-reports | connect_to_postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom genshi.template import TemplateLoader\nimport os\nimport sys\n\nif len(sys.argv) < 2:\n print(\"I need the name of a file as the first argument!\")\n exit(1)\n\nloader = TemplateLoader(os.path.dirname(__file__))\ntmpl = loader.lo... | python | edit | 1 | 0 | mit | adc76c9a629cb9f6e70ea1780351304dfba16197 | WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox | pcad/gen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sts.invariant_checker import InvariantChecker\n\ndef check_for_loops_or_connectivity(simulation):\n from sts.invariant_checker import InvariantChecker\n result = InvariantChecker.check_loops(simulation)\n if result:\n return resu... | python | edit | 2 | 3 | apache-2.0 | 56e2bea0798ae3afbc50d53947e505e7df9edba3 | ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts | config/invariant_checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.conf.urls import patterns, url\nfrom django.conf import settings\nfrom django.views.decorators.cache import cache_page\n\nfrom .views import ContainerList, ContainerDetail\nfrom .v... | python | edit | 1 | 0 | mit | 5839e70f2ffab6640997e3a609a26e50ff2b4da6 | jeanmask/opps,williamroot/opps,opps/opps,opps/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps | opps/containers/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.conf import settings\n\n\nclass UserOTP(models.Model):\n\n OTP_TYPES = (\n ('HOTP', 'hotp'),\n ('TOTP', 'totp'),\n )\n\n user = models.OneToOneField(settings.A... | python | edit | 1 | 1 | mit | 0ea263fa9a496d8dbd8ff3f966cc23eba170842c | MicroPyramid/django-mfa,MicroPyramid/django-mfa,MicroPyramid/django-mfa | django_mfa/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# following PEP 386\n__version__ = \"1.2\"\n\nVERSION = (1, 2)\n\n# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.\n# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It'... | python | edit | 1 | 0 | apache-2.0 | 800d69acf0e7a68d39e0e258258b750d3b8e0ace | edoburu/django-debugtools,edoburu/django-debugtools,edoburu/django-debugtools | debugtools/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\n\nclass Rule:\n pass\n\n```\n\nApply this change: Add base interface for rule"
},
{
"role": "assistan... | python | edit | 1 | 1 | mit | 2205ea40f64b09f611b7f6cb4c9716d8e29136d4 | PatrikValkovic/grammpy | grammpy/Rule.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# minNEURON.py\n\ncell = h.SectionList()\nsoma = h.Section(name='soma') #create soma\nsoma.push()\n#h.topology()\n\n# Geometry\nsoma.nseg = 1\nsoma.L = 20\nsoma.diam = 20\n\n# Biophysics\nfor sec in h.allsec():\n sec.Ra = 100\n sec.cm... | python | edit | 1 | 0 | bsd-3-clause | 2bdbcf41cc99f9c7430f8d429cc8d2a5e2ee6701 | ProjectPyRhO/PyRhO,ProjectPyRhO/PyRhO | pyrho/NEURON/minimal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n * Copyright (c) 2016. Mingyu Gao\n * All rights reserved.\n *\n\"\"\"\nimport matplotlib.backends.backend_pdf\nfrom .format import paper_plot\n\n\ndef plot_setup(name, dims, fontsize=9):\n \"\"\" Setup a PDF page for plot.\n\n ... | python | edit | 1 | 2 | bsd-3-clause | be16b3c2b67f160e46ed951a8e9e691bc09b8d05 | gaomy3832/easypyplot,gaomy3832/easypyplot | easypyplot/pdf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Goal: Init the application routes and read the settings\n#\n# @authors:\n# Andrei Sura <<EMAIL>>\n# Ruchi Vivek Desai <<EMAIL>>\n# Sanath Pasumarthy <<EMAIL>>\n\nfrom flask_user import UserManager, SQLAlchemy... | python | edit | 7 | 2 | bsd-3-clause | 6c1b81705beeaf9981deb2890382622026a37ba9 | indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client | app/redidropper/startup/initializer.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.plugins.skip import SkipTest\nfrom urllib3.packages import six\n\nif six.PY3:\n raise SkipTest('Testing of PyOpenSSL disabled on PY3')\n\ntry:\n from urllib3.contrib.pyopenssl import (inject_into_urllib3,\n ... | python | edit | 7 | 1 | mit | 792d0ace4f84023d1132f8d61a88bd48e3d7775d | Lukasa/urllib3,haikuginger/urllib3,Disassem/urllib3,urllib3/urllib3,Disassem/urllib3,haikuginger/urllib3,urllib3/urllib3,sigmavirus24/urllib3,sigmavirus24/urllib3,Lukasa/urllib3 | test/contrib/test_pyopenssl.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport responses\nfrom teamscale_client.teamscale_client import TeamscaleClient\n\ndef get_client():\n return TeamscaleClient(\"http://localhost:8080\", \"admin\", \"admin\", \"foo\")\n\n@responses.activate\ndef test_put... | python | edit | 3 | 1 | apache-2.0 | 50a88c05c605f5157eebadb26e30f418dc3251b6 | cqse/teamscale-client-python | tests/teamscale_client_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import unicode_literals\nimport os, sys\nimport six\n\ntry:\n from django.conf import settings\nexcept ImportError:\n print(\"Django has not been installed.\")\n sys.exit(0)\n\n\nif not sett... | python | edit | 1 | 3 | bsd-3-clause | f198941de6191ef9f729d1d8758c588654598f48 | mjumbewu/django-jstemplate,mjumbewu/django-jstemplate,bopo/django-jstemplate,bopo/django-jstemplate,bopo/django-jstemplate,mjumbewu/django-jstemplate | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: set fileencoding=utf-8 :\n# Andre Anjos <<EMAIL>>\n# Fri 20 Sep 14:45:01 2013\n\n\"\"\"Blitz++ Array bindings for Python\"\"\"\n\nimport pkg_resources\n\nfrom ._library import array, as_blitz\nfrom . import ver... | python | edit | 6 | 3 | bsd-3-clause | ad4ecad2e5785ddeb7bbd595e59dc12345c4b256 | tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz | xbob/blitz/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\n# Force this to happen before loading django\ntry:\n os.environ[\"DJANGO_SETTINGS_MODULE\"] = \"testtinymce.settings\"\n test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n sys.path.ins... | python | edit | 1 | 1 | mit | 0b8e99a6c7ecf5b35c61ce4eed1b2eec3110d41d | aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass MatplotlibBackendSetter(object):\n \"\"\"\n Import hook to make sure the proper Qt backend is set when importing\n Matplotlib.\n \"\"\"\n\n enabled = True\n\n def find_module(self, mod_name, pth):\n if self.en... | python | edit | 1 | 3 | bsd-3-clause | c4cdb8429ab9eeeeb7182191589e0594c201d0d2 | stscieisenhamer/glue,saimn/glue,saimn/glue,stscieisenhamer/glue | glue/_mpl_backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint\nfrom flask.ext.restful import Api\n\n\napi = Blueprint(\"api\", __name__, template_folder=\"templates\")\nrest = Api(api)\n\n# Import the non-restful resources\nfrom grum.api import mailgun\n\n# Let's get restfu... | python | edit | 3 | 0 | mit | db61a650413d7cf9b225fc3d6f79c706afd33871 | Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web | grum/api/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# function\ndef sum(op1, op2):\n return op1 + op2\n\nmy_sum = sum\nprint my_sum(1, 2)\nprint my_sum(\"I am \", \"zzz\");\n\n\n# pass\nprint \"press ctrl + c to continue\"\n\nwhile True:\n pass\n\n```\n\nApply th... | python | edit | 5 | 1 | bsd-2-clause | 441eac1b7d9d3f2fb30fbd2faf1dbe8fe3908402 | zzz0072/Python_Exercises,zzz0072/Python_Exercises | 99_misc/control_flow.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nTests of neo.io.asciisignalio\n\"\"\"\n\n# needed for python 3 compatibility\nfrom __future__ import absolute_import, division\n\nimport unittest\n\nfrom neo.io import AsciiSignalIO\nfrom neo.test.iotest.com... | python | edit | 1 | 0 | bsd-3-clause | a2cd647966df4f4af5cfd4679ae3c5793c40ee5d | apdavison/python-neo,NeuralEnsemble/python-neo,rgerkin/python-neo,INM-6/python-neo,samuelgarcia/python-neo,JuliaSprenger/python-neo | neo/test/iotest/test_asciisignalio.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nfrom baxter_myo.arm_controller import ArmController\nfrom baxter_myo.config_reader import ConfigReader\n\n\ndef main():\n c = ConfigReader(\"demo_config\")\n c.parse_all()\n s = ArmController('right', c.right_a... | python | edit | 3 | 2 | mit | 0388ab2bb8ad50aa40716a1c5f83f5e1f400bb32 | ipab-rad/baxter_myo,ipab-rad/myo_baxter_pc,ipab-rad/myo_baxter_pc,ipab-rad/baxter_myo | scripts/start_baxter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TODO: Load the csv files into dataframes here.\n\nclass data_preparer():\n def __init__():\n \n\n```\n\nApply this change: feat: Use 'pandas.read_csv' method to create dataframe"
},
{
"role": "assistant",
"content": "# T... | python | edit | 3 | 1 | mit | 83fed17149a8b65491b3f418a9f147e3ffe46e9d | bwc126/MLND-Subvocal | prepare_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nimport csv\nfrom io import StringIO\n\nclass BatchMoonScanForm(forms.Form):\n data = forms.CharField(\n widget=forms.Textarea(attrs={'class':'form-control monospace'}),\n )\n\n def clean(self):\n ... | python | edit | 1 | 12 | mit | a65eb4af0c35c8e79d44efa6acb546e19008a8ee | StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser | elmo/moon_tracker/forms.py | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom json import load\n\nfrom django_archive import __version__\n\nfrom .base import BaseArchiveTestCase\nfrom .sample.models import Sample\n\n\nclass ArchiveTestCase(BaseArchiveTestCase):\n \"\"\"\n Test that the archive command incl... | python | edit | 1 | 1 | mit | 5425c2419b7365969ea8b211432858d599214201 | nathan-osman/django-archive,nathan-osman/django-archive | tests/test_archive.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom cronquot.cronquot import has_directory\n\n\nclass CronquotTest(unittest.TestCase):\n\n def test_has_directory(self):\n self.assertTrue(has_directory('/tmp'))\n\nif __name__ == '__main__':\n unittest.test()... | python | edit | 1 | 1 | mit | 2b4b4ac3ec238a039717feff727316217c13d294 | pyohei/cronquot,pyohei/cronquot | test/test_cronquot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The mfr core module.\"\"\"\n# -*- coding: utf-8 -*-\nimport os\n\n__version__ = '0.1.0-alpha'\n__author__ = 'Center for Open Science'\n\n\nfrom mfr.core import (render, detect, FileHandler, get_file_extension,\n register_filehandle... | python | edit | 13 | 0 | apache-2.0 | 1b5fc874924958664797ba2f1e73835b4cbcef57 | TomBaxter/modular-file-renderer,chrisseto/modular-file-renderer,mfraezz/modular-file-renderer,haoyuchen1992/modular-file-renderer,haoyuchen1992/modular-file-renderer,erinspace/modular-file-renderer,rdhyee/modular-file-renderer,CenterForOpenScience/modular-file-renderer,icereval/modular-file-renderer,TomBaxter/modular-f... | mfr/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom sqlalchemy import (\n Column,\n Date,\n Integer,\n MetaData,\n Numeric,\n String,\n Table,\n create_engine,\n)\n\n\nmetadata = MetaData()\n\nmeasurement = Table('measurement', metadata... | python | edit | 1 | 1 | mit | 038e619e47a05aadf7e0641dd87b6dc573abe3e5 | jaapverloop/massa | massa/domain.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom server.models import *\n\n\nclass MachineGroupAdmin(admin.ModelAdmin):\n readonly_fields = ('key',)\n\n\nclass MachineAdmin(admin.ModelAdmin):\n list_display = ('hostname', 'serial')\n\n\nadmin.s... | python | edit | 21 | 0 | apache-2.0 | 1f0e5b7e65914ec5c3fb0a6617f72ea2f466bbdc | salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal | server/admin.py | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport rml.lattice\n\ndef test_create_lattice():\n l = rml.lattice.Lattice()\n assert(len(l)) == 0\n\n\n```\n\nApply this change: Test lattince length for non-negative values"
},
{
"role": "assistant",
"content": "import r... | python | edit | 1 | 1 | apache-2.0 | 0a5331c36cb469b2af10d87ab375d9bd0c6c3fb8 | willrogers/pml,razvanvasile/RML,willrogers/pml | tests/test_lattice.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom selenium.webdriver.firefox.webdriver import WebDriver\nfrom fixture.session import SessionHelper\nfrom fixture.group import GroupHelper\nfrom fixture.contact import ContactHelper\n\n\nclass Application:\n\n def __init__(self):\n ... | python | edit | 1 | 2 | apache-2.0 | 1e7dd0a322e32621468ade5bf390664f1b8b7a8b | tkapriyan/python_training | fixture/application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom manager.apps.brand.views import BrandListView, BrandView\nfrom manager.apps.brand.views import OwnerListView, OwnerView\n\nurlpatterns = patterns(\n '',\n url(r'^brand$', BrandListView.... | python | edit | 1 | 0 | mit | 64368ac4d5d90de7df92110364b165be975719c9 | okfn/opd-brand-manager,okfn/opd-brand-manager,okfn/brand-manager,okfn/brand-manager | manager/apps/brand/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Formatter(object):\n\n def format(self, match):\n formatstr = \"[{0}] {1}\\n{2}:{3}\\n{4}\\n\"\n return formatstr.format(match.rule.id,\n match.message,\n ... | python | edit | 1 | 1 | mit | 1c22c7806f459ae385c38a0d952ab324fdbc02d9 | MatrixCrawler/ansible-lint,willthames/ansible-lint,dataxu/ansible-lint | lib/ansiblelint/formatters/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n#\n# Dakota utility programs.\n#\n# Mark Piper (<EMAIL>)\n\nimport numpy as np\n\n\ndef get_names(dat_file):\n '''\n Reads the header from Dakota tabular graphics file. Returns a list\n of variable names.\n ... | python | edit | 3 | 1 | mit | b5aacae66d4395a3c507c661144b21f9b2838a0f | mdpiper/dakota-experiments,mdpiper/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments,mcflugen/dakota-experiments | utils/dakota_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass PluginLoader:\n\n def load(self, directory):\n ret = []\n\n for plugin in directory.children:\n plugin_file = plugin.find(name=plugin.name, type='py')\n plugin_class = plugin_file.classes[plugin.... | python | edit | 1 | 3 | mit | f5a3148ed638c65a3de3e1de0e5dece96f0c049b | bebraw/Placidity | placidity/plugin_loader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom distutils.core import setup\nsetup(\n name = 'gherkin3',\n packages = ['gherkin3'],\n version = '3.0.0',\n description = 'Gherkin parser',\n author = 'Björn Rasmusson',\n author_email = '<EMAIL>',\n url = 'https... | python | edit | 1 | 0 | mit | 50ca3fa53b6bb22dbd38b75cc4cf2244b0a2767c | chebizarro/gherkin3,curzona/gherkin3,Zearin/gherkin3,thetutlage/gherkin3,Zearin/gherkin3,hayd/gherkin3,thiblahute/gherkin3,thetutlage/gherkin3,SabotageAndi/gherkin,concertman/gherkin3,SabotageAndi/gherkin,moreirap/gherkin3,concertman/gherkin3,concertman/gherkin3,concertman/gherkin3,concertman/gherkin3,SabotageAndi/gher... | python/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hydromet import disaggregate\nfrom hydromet import models\nfrom hydromet import stats\n\nfrom ._version import get_versions\n__version__ = get_versions()['version']\ndel get_versions\n\n```\n\nApply this change: Disable import so that ... | python | edit | 4 | 0 | bsd-3-clause | d39edc6d3e02adeb3cd89ca13fdb9660be3247b4 | amacd31/hydromet-toolkit,amacd31/hydromet-toolkit | hydromet/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nNAME = 'Expression Engine (EllisLab)'\n\n\ndef is_waf(self):\n for attack in self.attacks:\n r = attack(self)\n if r is None:\n return\n response, page = r\n # There are t... | python | edit | 1 | 7 | bsd-3-clause | b1b8c9b4e392d4865756ece6528e6668e2bc8975 | EnableSecurity/wafw00f | wafw00f/plugins/expressionengine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^$', views.home, name='home'),\n url(r'^about/$', views.about, name='about'),\n url(r'^contact/$', views.contact, name='contact'),\n url(r'^project... | python | edit | 1 | 0 | mit | bf241d6c7aa96c5fca834eb1063fc009a9320329 | bacarlino/portfolio,bacarlino/portfolio,bacarlino/portfolio | portfolio/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom conans.model.conan_file import ConanFile\nfrom conans import CMake\nimport os\n\nclass DefaultNameConan(ConanFile):\n name = \"DefaultName\"\n version = \"0.1\"\n settings = \"os\", \"compiler\", \"arch\", \"build_type\"\n ... | python | edit | 1 | 1 | bsd-2-clause | 2ee8011b6c793c862b55272bf76c109c71fb5aaa | jslee02/conan-dart,jslee02/conan-dart,jslee02/conan-dart | eigen/3.2/test/conanfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" CLI for the analysis subcommand\n\"\"\"\nimport click\nfrom taca.analysis import analysis as an\n\n\n@click.group()\ndef analysis():\n\t\"\"\" Analysis methods entry point \"\"\"\n\tpass\n\n# analysis subcommands\n@analysis.command()... | python | edit | 1 | 1 | mit | d87cb6b401e38a06c5d594e40ad813a9db0738e6 | senthil10/TACA,kate-v-stepanova/TACA,SciLifeLab/TACA,SciLifeLab/TACA,vezzi/TACA,guillermo-carrasco/TACA,senthil10/TACA,b97pla/TACA,kate-v-stepanova/TACA,SciLifeLab/TACA,b97pla/TACA,guillermo-carrasco/TACA,vezzi/TACA | taca/analysis/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 Cedraro Andrea <<EMAIL>>\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://w... | python | edit | 1 | 1 | apache-2.0 | 6e433c59348ed4c47c040efb50c891c4759bcee4 | vheon/JediHTTP,micbou/JediHTTP,micbou/JediHTTP,vheon/JediHTTP | jedihttp/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# MIT licensed\n# Copyright (c) 2021 lilydjwg <<EMAIL>>, et al.\n\nimport pytest\n\npytestmark = pytest.mark.asyncio\n\nasync def test_redirection(get_version):\n assert await get_version(\"jmeter-plugins-manager\", {\n \"source\"... | python | edit | 1 | 1 | mit | d2130b64c63bdcfdea854db39fb21c7efe0b24e1 | lilydjwg/nvchecker | tests/test_httpheader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .compat import etree\nfrom .entities import Node, Way, Relation\n\n\ndef parse(fp):\n context = etree.iterparse(fp, events=('end',))\n\n for action, elem in context:\n # Act only on node, ways and relations\n if ele... | python | edit | 1 | 12 | mit | 74a76dd7e21c4248d6a19e55fde69b92169d4008 | gileri/osmfiltering | osmfilter/parsing.py | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\n\n\ndef json_api_exception_handler(exc, context):\n \"\"\" Custom exception handler that returns errors object as an array \"\"\"\n\n # Import in... | python | edit | 1 | 7 | apache-2.0 | 1a4d2ea23ad37b63bab1751b7f3b7572f6804f14 | Johnetordoff/osf.io,njantrania/osf.io,pattisdr/osf.io,baylee-d/osf.io,GageGaskins/osf.io,brandonPurvis/osf.io,mfraezz/osf.io,TomHeatwole/osf.io,cosenal/osf.io,erinspace/osf.io,caneruguz/osf.io,crcresearch/osf.io,binoculars/osf.io,RomanZWang/osf.io,samanehsan/osf.io,doublebits/osf.io,caseyrygt/osf.io,TomHeatwole/osf.io,... | api/base/exceptions.py | rejected_duplicate | Near-duplicate of sample 17561 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport json\nimport sys\n\nPREFIXES = [\n [\"FAIL\", \"PASS\"],\n [\"EXPECTED FAIL\", \"UNEXPECTED PASS\"],\n]\n\n\ndef parse_expected_failures():\n expected_failures = set()\n with open(\"expected-fail... | python | edit | 1 | 6 | isc | 675c6d78738a56cc556984553216ce92cf0ecd94 | js-temporal/temporal-polyfill,js-temporal/temporal-polyfill,js-temporal/temporal-polyfill | test/parseResults.py | rejected_duplicate | Near-duplicate of sample 14264 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to move secrets file"
},
{
"role": "assistant",
"content": "\"\"\"\nMove the right secrets file into place for Travis CI.\n\"\"\"\n\nimport os\nimport shutil\nfrom pathlib import Path\n\n\ndef move_secrets_file() -> No... | python | new_file | 1 | 3 | mit | 593c2ec0d62049cee9bedc282903491b670d811f | adamtheturtle/vws-python,adamtheturtle/vws-python | ci/set_secrets_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nfrom regenesis.core import app\n\ndef cube_path(cube_name, ext):\n return os.path.join(\n app.config.get('DATA_DIRECTORY'),\n cube_name + '.' + ext\n )\n\ndef store_cube_raw(cube_n... | python | edit | 2 | 1 | mit | 76d9d1beaebf5b7d8e2ef051c8b8926724542387 | pudo/regenesis,pudo/regenesis | regenesis/storage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .model import Model\nfrom ... import describe\n\n\ndef _run_child_hooks(model, X, y):\n for layer in model._layers:\n for hook in layer.on_data_hooks:\n hook(layer, X, y)\n X = layer(X)\n\n\n@describe.on_dat... | python | edit | 1 | 4 | mit | 361a1a1ca88630981bb83a85648714c5bc4c5a89 | explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | thinc/neural/_classes/feed_forward.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nBaltrad to S3 porting\n\"\"\"\n\nimport sys\n\n\nfrom creds import URL, LOGIN, PASSWORD\nimport datamover as dm\n\n\ndef main():\n \"\"\"Run data transfer from Baltrad to S3\"\"\"\n\n # ------------------\n # DATA TRANSFER\... | python | edit | 1 | 1 | mit | 255a93e2e075a8db914e4736cb79fbdb58b41a24 | enram/data-repository,enram/data-repository,enram/data-repository,enram/data-repository,enram/infrastructure,enram/infrastructure | file_transfer/baltrad_to_s3.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom matexpr import MatrixExpr\nfrom sympy import Basic\n\nclass Transpose(MatrixExpr):\n \"\"\"Matrix Transpose\n\n Represents the transpose of a matrix expression.\n\n Use .T as shorthand\n\n >>> from sympy import MatrixSymbol... | python | edit | 1 | 3 | bsd-3-clause | fd721c76e30f776b04c7691ce536525561dd2cfa | drufat/sympy,hrashk/sympy,toolforger/sympy,yashsharan/sympy,AunShiLord/sympy,oliverlee/sympy,MridulS/sympy,Arafatk/sympy,shikil/sympy,MechCoder/sympy,lindsayad/sympy,kevalds51/sympy,iamutkarshtiwari/sympy,cswiercz/sympy,mafiya69/sympy,AkademieOlympia/sympy,Designist/sympy,garvitr/sympy,sahmed95/sympy,pandeyadarsh/sympy... | sympy/matrices/expressions/transpose.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python3\n\nimport sys\nimport argparse\nimport xml_utils as u\nimport datetime\nfrom collections import defaultdict\n\n##------------------------------------------------------------\n## can be called with:\n## tsv_gen_embedd... | python | edit | 4 | 2 | mit | 982e523807b42d8258ddcc4b984399b46e8ad74f | hypraptive/bearid,hypraptive/bearid,hypraptive/bearid | tools/tsv_gen_embeddings.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Script to run performance check.\"\"\"\nimport time\n\nfrom examples.game_of_life import GameOfLife, GOLExperiment\nfrom xentica.utils.formatters import sizeof_fmt\n\n\nMODELS = [\n (\"Conway's Life\", GameOfLife, GOLExperiment),\n... | python | edit | 1 | 0 | mit | da516d06ab294dc2dde4bb671ab16653b1421314 | a5kin/hecate,a5kin/hecate | tests/performance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cmsplugin_rst.models import RstPluginModel, rst_help_text\nfrom django import forms\n\n\n\nclass RstPluginForm(forms.ModelForm):\n\n body = forms.CharField(\n widget=forms.Textarea(attrs={\n 'rows':... | python | edit | 1 | 0 | bsd-3-clause | 663edbc7b19d5cb99a78bc380359a0dbfae1f1aa | ojii/cmsplugin-rst,pakal/cmsplugin-rst | cmsplugin_rst/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport argparse\nimport os\n\n\ndef is_dir(string):\n \"\"\"\n Type check for a valid directory for ArgumentParser.\n \"\"\"\n if not os.path.isdir(string):\n msg = '{0} is not a directory'.... | python | edit | 1 | 2 | apache-2.0 | ed40088b5e913e70c161e8148ab76fdc0b6c5c46 | 55minutes/clt-utils | clt_utils/argparse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-\n\nfrom vumi.transports.failures import FailureWorker\n\n\nclass IntegratFailureWorker(FailureWorker):\n\n def do_retry(self, message, reason):\n message = se... | python | edit | 1 | 2 | bsd-3-clause | 0202320f5f07437292bfa293c2a6711416dab048 | TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi | vumi/transports/integrat/failures.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.utils import simplejson\n\n\nclass JSONField(models.TextField):\n \"\"\"Simple JSON field that stores python structures as JSON strings\n on... | python | edit | 11 | 5 | bsd-3-clause | edd2cc66fff3159699c28c8f86c52e6524ce9d86 | vuchau/django-social-auth,getsentry/django-social-auth,1st/django-social-auth,michael-borisov/django-social-auth,michael-borisov/django-social-auth,beswarm/django-social-auth,lovehhf/django-social-auth,omab/django-social-auth,adw0rd/django-social-auth,mayankcu/Django-social,caktus/django-social-auth,antoviaque/django-s... | social_auth/fields.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Provide the mako templating engine.\"\"\"\n\nfrom __future__ import print_function\n\n\nfrom mako.template import Template\nfrom mako.lookup import TemplateLookup\n\nfrom . import Engine\n\n\nclass MakoEngine(E... | python | edit | 1 | 3 | mit | 0acbe43b91fab6a01b5a773c4ac494d01138f216 | blubberdiblub/eztemplate | engines/mako_engine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\nimport unicodedata\nfrom django.core.cache import get_cache\nfrom django.conf import settings\n\n\ndef normalize_unicode(u):\n \"\"\"Replace non-ASCII characters with closest ASCII equivalents\n where possible.\n ... | python | edit | 1 | 2 | isc | b5663776e89b1d406b2b93d291a346bd9235fcf1 | CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer | wafer/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport platform\nimport sys\n\n__version_info__ = (0, 6, 7)\n__version__ = '.'.join(map(str, __version_info__))\n\nSERVER_ID = ','.join([platform.system(),\n platform.release(),\n 'UPnP/1.0,Coherenc... | python | edit | 7 | 0 | mit | 923ae01ab8beadfd73c5275f0c954510d3a13832 | coherence-project/Coherence,coherence-project/Coherence | coherence/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom tests.archives_tests.factories import ArchiveFactory\nfrom tests.model_helpers import do_test_factory\n\n\n@pytest.mark.django_db\nclass TestArchivesModels:\n # test functions are added dynamically to this class\n ... | python | edit | 1 | 3 | apache-2.0 | 111682e3c19784aa87d5f3d4b56149226e6f9d3b | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | app/tests/archives_tests/test_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ev3.ev3dev import Key\nimport unittest\nfrom util import get_input\nimport time\n\n\nclass TestTone(unittest.TestCase):\n\n def test_tone(self):\n d = Key()\n get_input('Test keyboard. Hold Up key')\n print(d.up... | python | edit | 1 | 1 | apache-2.0 | f5cab8249d5e162285e5fc94ded8bf7ced292986 | topikachu/python-ev3,MaxNoe/python-ev3,evz/python-ev3,topikachu/python-ev3,MaxNoe/python-ev3,evz/python-ev3 | test/test_ev3_key.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Chris Krycho'\n__copyright__ = '2013 Chris Krycho'\n\nfrom logging import error\nfrom os import path, walk\nfrom sys import exit\n\ntry:\n from markdown import Markdown\n from mixins import DictAsMember\n\nexcept ImportE... | python | edit | 1 | 3 | mit | 08ce22e8c467f7fb7da056e098ac88b64c3096dc | chriskrycho/step-stool,chriskrycho/step-stool | step_stool/content.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom pylons import c, g\n\nfrom ming.orm import ThreadLocalORMSession\n\nfrom pyforge.tests import helpers\nfrom pyforge.lib import helpers as h\n\nclass TestGitApp(unittest.TestCase):\n\n def setUp(self):\n hel... | python | edit | 1 | 1 | apache-2.0 | 11860d9181d7a8e1a3924bc42234903ba96e304d | apache/incubator-allura,lym/allura-git,Bitergia/allura,lym/allura-git,leotrubach/sourceforge-allura,Bitergia/allura,leotrubach/sourceforge-allura,lym/allura-git,heiths/allura,Bitergia/allura,leotrubach/sourceforge-allura,apache/incubator-allura,heiths/allura,lym/allura-git,apache/incubator-allura,heiths/allura,lym/allu... | ForgeGit/forgegit/tests/test_git_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Top-level module for RasterFairy\"\"\"\n\nfrom rasterfairy import *\nfrom coonswarp import *\nfrom rfoptimizer import *\nfrom images2gif import *\n\n\n```\n\nApply this change: Optimize ... | python | edit | 4 | 0 | bsd-3-clause | 4e3eeba94423399411a763487411b097c4c7972e | Quasimondo/RasterFairy | rasterfairy/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\nfrom django import test\nfrom django.core import mail\nfrom mailer import engine\nfrom mailer import send_mail\n\n\nclass DjangoMailerPresenceTest(test.TestCase):\n def test_mailsent(self):\... | python | edit | 1 | 1 | apache-2.0 | c5b8ea3c7f3bf111e36515f92ab3aeb70026771e | usc-isi/horizon-old,coreycb/horizon,Daniex/horizon,gochist/horizon,saydulk/horizon,CiscoSystems/avos,NCI-Cloud/horizon,pnavarro/openstack-dashboard,Solinea/horizon,promptworks/horizon,Mirantis/mos-horizon,tuskar/tuskar-ui,yjxtogo/horizon,mandeepdhami/horizon,cloud-smokers/openstack-dashboard,Metaswitch/horizon,asomya/t... | openstack-dashboard/dashboard/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters.rest_framework\nfrom rest_framework.authentication import SessionAuthentication, TokenAuthentication\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.renderers import JSONRenderer\nfrom rest... | python | edit | 1 | 1 | mit | 6930782947f604630142b106cb079e627fcff499 | rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org | readthedocs/v3/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._metakernel import MetaKernel, IPythonKernel, register_ipython_magics\nfrom . import pexpect\nfrom .replwrap import REPLWrapper, u\nfrom .process_metakernel import ProcessMetaKernel\nfrom .magic import Magic, option\nfrom .parser impo... | python | edit | 13 | 0 | bsd-3-clause | 73fa0f555ec140254ecdc09ab17ba1a065861e0c | Calysto/metakernel | metakernel/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# (c) 2012-2014, Michael DeHaan <<EMAIL>>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software ... | python | edit | 1 | 0 | mit | a11cc4bae9fa48144b8a755eb3cb17fd707f2a7c | thaim/ansible,thaim/ansible | lib/ansible/release.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport unittest\n\nfrom units.trivia import check_answer\n\n\nclass TestCheckAnswer(unittest.TestCase):\n\n def test_correct_answer(self):\n self.assertTrue(check_answer(\"correct\", \"correct\"))\n\n def test_incorrect_answe... | python | edit | 1 | 1 | mit | c96da14b7bc05d6de7f1ddb9b634ef04ae2e2213 | Harmon758/Harmonbot,Harmon758/Harmonbot | tests/test_trivia.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright lowRISC contributors.\n# Licensed under the Apache License, Version 2.0, see LICENSE for details.\n# SPDX-License-Identifier: Apache-2.0\n\n# Version requirements for various tools. Checked by tooling (e.g. fusesoc),\n# and inse... | python | edit | 1 | 0 | apache-2.0 | e371842b0efb9a7d160f7909415190fd583b6c68 | lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan | tool_requirements.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Iterable, List, Tuple\n\nfrom werkzeug.http import HTTP_STATUS_CODES\n\nfrom apistar import http\n\n__all__ = ['WSGIEnviron', 'WSGIResponse']\n\n\nSTATUS_CODES = {\n code: \"%d %s\" % (code, msg)\n for code, msg in ... | python | edit | 1 | 3 | bsd-3-clause | 517a76bc9aec3dbe8c21c96be424da838b5fcc02 | encode/apistar,rsalmaso/apistar,encode/apistar,tomchristie/apistar,tomchristie/apistar,tomchristie/apistar,encode/apistar,rsalmaso/apistar,tomchristie/apistar,encode/apistar,rsalmaso/apistar,rsalmaso/apistar | apistar/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# mpf-monitor\n__version__ = '0.54.0-dev.0'\n__short_version__ = '0.54'\n__bcp_version__ = '1.1'\n__config_version__ = '5'\n__mpf_version_required__ = '0.54.0-dev.0'\n\nversion = \"MPF Monitor v{} (config_version={}, BCP v{}, Requires MPF v... | python | edit | 1 | 0 | mit | e3cc22064ebb709788c770a8940d0b0f742a8741 | missionpinball/mpf-monitor | mpfmonitor/_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom nodes import Node\n\nclass StringLiteral(Node):\n args = 0\n results = 1\n char = '\"'\n\n def __init__(self, string):\n self.string = string\n\n @Node.test_func([], [\"\"], \"\")\n @No... | python | edit | 1 | 10 | mit | ebb3b727b8d7592b7e9755b3f7665314e668a19d | muddyfish/PYKE,muddyfish/PYKE | node/string_literal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport fiona\n\n\ndef test_profile():\n with fiona.open('tests/data/coutwildrnp.shp') as src:\n assert src.meta['crs_wkt'] == 'GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_84\",6378137,298.257223563]],PRIMEM[\"Greenwi... | python | edit | 1 | 1 | bsd-3-clause | 1271f3b978d2ab46824ca7b33472bba5b725f9ac | perrygeo/Fiona,perrygeo/Fiona,Toblerity/Fiona,rbuffat/Fiona,Toblerity/Fiona,rbuffat/Fiona | tests/test_profile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom books.models import Book, Series\n\n\nclass BookIndex(indexes.SearchIndex, indexes.Indexable):\n\n text = indexes.CharField(document=True, use_template=True)\n library = indexes.IntegerField(model_at... | python | edit | 1 | 1 | mit | 0e195e93e0a2f80bc85f8425254e8a1d3c324654 | phildini/bockus,phildini/bockus,phildini/bockus | bockus/books/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"testproject.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute... | python | edit | 1 | 0 | bsd-3-clause | 5c2a691ff928c336c35a6ddef38c222b4bb3d2a4 | uranusjr/django-mosql | testproject/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# standard modules\nimport StringIO\nfrom unittest import TestCase\n\n# custom modules\nfrom iago.DatabaseProvider import DB\n\n\nclass TestDB(TestCase):\n\tdef test_read_empty(self):\n\t\ts = StringIO.StringIO('{}')\n\t\td = DB()\n\t\ttry:... | python | edit | 1 | 2 | mit | f0e67ca657915e77b1f28bab9fa29f84bfbb8f06 | ferchault/iago | tests/unit/test_DB.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import PolynomialFeatures\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.cross_validation import cross_val_score\n\n\ndef main():\n n... | python | edit | 1 | 2 | mit | 2094f2ef5a47703a881643b8ca25a632fe54e892 | noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit | under_overfitting.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom enum import Enum, unique\nfrom inspect import signature, isclass\n\nfrom mycroft.plugin.base_plugin import BasePlugin\nfrom mycroft.util import log\n\n\n@unique\nclass Format(Enum):\n speech = 1\n text = 2\n\n\nclass FormatterPlu... | python | edit | 1 | 4 | apache-2.0 | 09333f89a7ce9dfda59401bc59d92a3def9ca80c | MatthewScholefield/mycroft-simple,MatthewScholefield/mycroft-simple | mycroft/formatters/formatter_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport stat\n\nfrom nose.tools import *\n\nfrom lctools import config\n\nclass TestConfig(object):\n test_filename = \"bebebe\"\n\n def setup(self):\n fd = open(self.test_filename, 'w')\n fd.write(\"[default]\... | python | edit | 2 | 1 | apache-2.0 | f915b101b635e644eb9018a8abb9e9c86e6c2a73 | novel/lc-tools,novel/lc-tools | test/test_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\n\nfrom project import db, bcrypt\n\n\nclass User(db.Model):\n\n __tablename__ = \"users\"\n\n id = db.Column(db.Integer, primary_key=True)\n email = db.Column(db.String, unique=True, nullable=False)\n password =... | python | edit | 3 | 1 | mit | f6b4b16c26ee97d48ba524027a96d17fba63dc80 | dylanshine/streamschool,dylanshine/streamschool | project/models.py | rejected_duplicate | Near-duplicate of sample 13763 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport parse\nimport generate as gen\nfrom repos import find_repos\nfrom errors import *\n\ndef parse_client_greeting(msg_str):\n msg = parse.msg(msg_str)\n\n proto_ver = int(msg[0])\n client_caps = msg[1]\n url = parse.string... | python | edit | 4 | 3 | bsd-3-clause | 3ea7a61be81c0f2094d8b3b0d3a81dec267ac663 | slonopotamus/git_svn_server | GitSvnServer/client.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrighted by participating institutions in DataONE. For\n# more information on DataONE, see our web site at http://dataone.org.\n... | python | edit | 1 | 1 | apache-2.0 | 463ff7bc6571a60c79795992cca9ae40e03dd681 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | gmn/src/d1_gmn/app/context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Write a full test suite for override_settings"
},
{
"role": "assistant",
"content": "from django.conf import settings\nfrom django.test import TestCase\nfrom override_settings import (\n override_settings, SETTING_DELETED, wit... | python | new_file | 1 | 1 | bsd-3-clause | 20547b8cb6d530be7a41e1a49cb526dbbaab8330 | edavis/django-override-settings | override_settings/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, pkgutil, site\n\nif pkgutil.find_loader(\"gi\"):\n try:\n import gi\n print('Found gi:', os.path.abspath(gi.__file__))\n gi.require_version('Gst', '1.0')\n # from gi.repository import GLib, Gst\n ... | python | edit | 2 | 0 | mit | cbae1dafb07fda5afcd0f2573c81b6eeb08e6e20 | Kane610/axis | dependencies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nInitialisation file for models directory.\n\nThe application SQLite database model is setup in SQLObject.\n\nThe db model structure is:\n * Place\n - contains records of all Places\n * Supername -> Continent -> Country -> Town\n ... | python | edit | 5 | 0 | mit | ee884a9cbaaaf7693e8d980d26cca480b9d1291e | MichaelCurrin/twitterverse,MichaelCurrin/twitterverse | app/models/__init__.py | rejected_lint | Too many lint violations: 5 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.