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 argparse\n\nimport yaml\n\nfrom .bocca import make_project, ProjectExistsError\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('file', help='Project description file')\n\n args = parser.parse_args... | python | edit | 2 | 2 | mit | a36e63037ce279d07a04074baf8c9f756dd8128a | csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe | wmtexe/cmi/make.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import cd, env, run, task\n\ntry:\n import fabfile_local\n _pyflakes = fabfile_local\nexcept ImportError:\n pass\n\n@task\ndef update():\n with cd(\"~/vagrant-installers\"):\n run(\"git pull\")\n\n@task\nd... | python | edit | 1 | 2 | mit | 2363cf9733006f08f2dc1061562bc29788206f21 | redhat-developer-tooling/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,redhat-developer-tooling/vagrant-installers,chrisroberts/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers,redhat-developer-tooling/vagrant-installers,chrisroberts/vagrant-installers,ch... | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"Event model.\"\"\"\n\nimport mongoengine as db\n\nfrom web.extras.contentment.components.page.model import Page\nfrom widgets import fields\n\n\nlog = __import__('logging').getLogger(__name__)\n__all__ = ['EventCo... | python | edit | 1 | 3 | mit | ddbce972db10ce92a79982161355ed978fb0c554 | marrow/contentment,marrow/contentment | web/extras/contentment/components/event/model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# This is a workaround for liburdf.so throwing an exception and killing\n# the process on exit in ROS Indigo.\n\nimport subprocess\nimport os\nimport sys\n\ncpptests = ['test_initializers',\n 'test_maps'\n ... | python | edit | 3 | 0 | bsd-3-clause | 1db07b9a534e533200f83de4f86d854d0bcda087 | openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica | examples/exotica_examples/tests/runtest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\n\nimport os\nimport time\n\nfrom expjobs.helpers import run_class\n\n\nclass DummyWorker(object):\n\n param = 2\n\n def set_out_path_and_name(self, path, name):\n self.out_path = path\n self.out... | python | edit | 1 | 1 | bsd-3-clause | 6206edd72ffb4d742f1466a5e60283b01ecca4ca | omangin/expjobs | tests/sample_script.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division\nfrom __future__ import print_function, unicode_literals\nfrom past.builtins import range\n\nfrom clifford import Cl, randomMV, Frame, get_mult_function, conformalize, grade_obj\nfrom cliffor... | python | edit | 14 | 2 | bsd-3-clause | 62f842d91b5819e24b0be71743953d7607cf99c1 | arsenovic/clifford,arsenovic/clifford | test_algebra_initialisation.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Define your item pipelines here\n#\n# Don't forget to add your pipeline to the ITEM_PIPELINES setting\n# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html\nfrom scrapy.exceptions import DropItem\n\n... | python | edit | 1 | 2 | mit | 66db08483faa1ca2b32a7349dafa94acb89b059c | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | locations/pipelines.py | rejected_duplicate | Near-duplicate of sample 467 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys, os\n\nimport chpl_arch, chpl_platform, chpl_compiler\nfrom utils import memoize\nimport utils\n\n@memoize\ndef get():\n tasks_val = os.environ.get('CHPL_TASKS')\n if not tasks_val:\n arch_val ... | python | edit | 1 | 11 | apache-2.0 | 7c9ed9fbdc1b16ae1d59c1099e7190e6297bf584 | CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,hildeth/chapel,hildeth/chapel,hildeth/chapel,hild... | util/chplenv/chpl_tasks.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport sys\nimport os\n\nimport git_multimail\n\n\n# It is possible to modify the output templates here; e.g.:\n\ngit_multimail.FOOTER_TEMPLATE = \"\"\"\\\n\n-- \\n\\\nThis email was generated by the wonderful git... | python | edit | 4 | 0 | mit | 4223ad57994fe87fe0be9b80c8070c3f4b77a071 | jbox-web/redmine_git_hosting,jbox-web/redmine_git_hosting,jbox-web/redmine_git_hosting,jbox-web/redmine_git_hosting | contrib/hooks/post-receive/mail_notifications.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast... | python | edit | 1 | 0 | bsd-3-clause | 74506160831ec44f29b82ca02ff131b00ce91847 | eunchong/build,eunchong/build,eunchong/build,eunchong/build | masters/master.chromiumos.tryserver/master_site_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom keras import backend as K\nfrom keras.layers import Layer\n\n\nclass ColorExtract(Layer):\n \"\"\" TODO: Make is scalable to any amount of channels. \"\"\"\n def __init__(self, channel, **kwargs):\n super().__init__(**kwar... | python | edit | 3 | 1 | apache-2.0 | 2e78bf754b1fc1d84086e127a2dd8ae7947fbaa8 | israelg99/eva | eva/layers/color_extract.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom selenium import webdriver \nbrowser = webdriver.Chrome()\nbrowser.get('http://localhost:5000') \nassert 'tdd_with_python' in browser.title\n\n```\n\nApply this change: Change title test, add comments of To-do user story"
},
{
"... | python | edit | 1 | 0 | mit | 9f598b0163a7ef6392b1ea67bde43f84fd9efbb8 | terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python | myflaskapp/tests/functional_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n# -*- test-case-name: flocker.test -*-\n\n\"\"\"\nFlocker is a hypervisor that provides ZFS-based replication and fail-over\nfunctionality to a Linux-based user-space operating s... | python | edit | 1 | 3 | apache-2.0 | 31eb2bd7dee5a28f181d3eb8f923a9cdda198a47 | hackday-profilers/flocker,LaynePeng/flocker,wallnerryan/flocker-profiles,runcom/flocker,AndyHuu/flocker,achanda/flocker,wallnerryan/flocker-profiles,hackday-profilers/flocker,lukemarsden/flocker,runcom/flocker,moypray/flocker,moypray/flocker,moypray/flocker,LaynePeng/flocker,agonzalezro/flocker,adamtheturtle/flocker,lu... | flocker/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nfrom flask import Flask, render_template, abort, redirect, request\n\n\napp = Flask(__name__)\n\n\nquestions = [{\n 'question': 'How many shillings were there in a pre-decimalisation pound?',\n 'answer': '20',\n 'red... | python | edit | 1 | 2 | mit | 88242d5949dd799b03375834b5583a0c6b405f81 | lordmauve/nofu,lordmauve/nofu | nofu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef batch_checkbox(form, id):\n \"\"\"\n Checkbox which allows selecting objects for batch processing::\n\n {% for object in object_list ... | python | edit | 1 | 2 | bsd-3-clause | 6823b063444dc6853ed524d2aad913fc0ba6c965 | matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel | towel/templatetags/towel_batch_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom unittest import TestCase, mock\n\nimport core.config\nimport core.widget\nimport modules.contrib.publicip\n\n\ndef build_module():\n config = core.config.Config([])\n return modules.contrib.publicip.Module(config=c... | python | edit | 3 | 1 | mit | e7b853c667b5785355214380954c83b843c46f05 | tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status | tests/modules/contrib/test_publicip.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Middleware classes to process messages on their way in and out of workers.\n\"\"\"\n\nfrom vumi.middleware.base import (\n BaseMiddleware, TransportMiddleware, ApplicationMiddleware,\n MiddlewareStack, create_middlewares_from_co... | python | edit | 1 | 0 | bsd-3-clause | 66cda3c9248c04850e89a2937a2f1457ac538bd4 | harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,TouK/vumi | vumi/middleware/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test lockdown and make sure it has style."
},
{
"role": "assistant",
"content": "from django.test.client import RequestFactory\n\nfrom bluebottle.auth.middleware import LockdownMiddleware\nfrom bluebottle.test.utils import Bluebo... | python | new_file | 1 | 1 | bsd-3-clause | bae36d9124efcc205db7c5738c528088ff8a02ca | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/auth/tests/test_middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom pywow.structures import Structure, Skeleton\nfrom .fields import *\nfrom .main import *\nfrom .custom import *\nfrom .generated import GeneratedStructure\n\nclass StructureNotFound(Exception):\n\tpass\n\nclas... | python | edit | 10 | 5 | cc0-1.0 | 19a698c9440e36e8cac80d16b295d41eb4cb05f3 | jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow | wdbc/structures/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom copy import deepcopy\n\nclass ModelReport(object):\n \"\"\"\n An abstraction of a model report that wraps access to various sections\n of the report.\n \"\"\"\n\n \"\"\"\n :param raw_report: the dict representation of... | python | edit | 1 | 1 | apache-2.0 | a7e7320967e52f532b684ec4cb488f0d28f29038 | CitrineInformatics/python-citrination-client | citrination_client/views/model_report.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom bashscriptrunner import BashScriptRunner\n\nname = \"chef\"\nscript = BashScriptRunner(script_path=[\"roushagent/plugins/lib/%s\" % name])\n\n\ndef setup(config):\n LOG.debug('Doing setup in test... | python | edit | 9 | 5 | apache-2.0 | 5872282aa73bb53fd1a91174828d82b3a5d4233a | rcbops/opencenter-agent,rcbops/opencenter-agent | roushagent/plugins/output/plugin_chef.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport bleach\nfrom lxml.html.clean import Cleaner\n\nallowed_tags = bleach.ALLOWED_TAGS + ['p', 'h1', 'h2', 'h3', 'h4', 'h5',]\nallowed_attributes = bleach.ALLOWED_ATTRIBUTES.copy()\nallowed_attributes['a'] = bleach.ALLOWED_ATTRIBUTES['a']... | python | edit | 1 | 2 | mit | ae3a61b88c032c9188324bb17128fd060ac1ac2a | dominicrodger/django-magazine,dominicrodger/django-magazine | magazine/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\n\n__author__ = 'Markus Holtermann'\n__email__ = '<EMAIL>'\n__version__ = '0.3.2'\n\ndefault_app_config = 'dynamic_forms.apps.DynamicFormsConfig'\n\n```\n\nApply this change... | python | edit | 1 | 0 | bsd-3-clause | fc5e34aca23d219dd55ee4cfa0776ac47a4252db | MotherNatureNetwork/django-dynamic-forms,MotherNatureNetwork/django-dynamic-forms,wangjiaxi/django-dynamic-forms,wangjiaxi/django-dynamic-forms,MotherNatureNetwork/django-dynamic-forms,uhuramedia/django-dynamic-forms,uhuramedia/django-dynamic-forms,uhuramedia/django-dynamic-forms,wangjiaxi/django-dynamic-forms | dynamic_forms/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import template\nfrom django.template.loader import render_to_string\n\n\nregister = template.Library()\n\n\n@register.simple_tag(takes_context=True)\ndef cookielaw_banner(context):\n if context['re... | python | edit | 7 | 3 | bsd-2-clause | cdee49a0ed600a72955d844abf5e4b5b2f9970cc | juan-cb/django-cookie-law,juan-cb/django-cookie-law,juan-cb/django-cookie-law | cookielaw/templatetags/cookielaw_tags.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport pstats\nimport cProfile\nimport unittest\nfrom django.test.simple import DjangoTestSuiteRunner\n\n\nclass ProfilingTestRunner(DjangoTestSuiteRunner):\n def run_suite(self, suite, **kwargs):\n stream = open('prof... | python | edit | 1 | 2 | bsd-2-clause | 7302cb5ca42a75ed7830327f175dba3abb75ab74 | murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado | tests/runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\r\nfrom os import path, listdir\r\nfrom lxml import etree\r\n\r\nclass XmlJsonImportModuleException(Exception):\r\n pass\r\n\r\nif not hasattr(settings, 'XSLT_FILES_DIR'):\r\n raise XmlJsonImportModule... | python | edit | 1 | 0 | mit | 38a2f6999ae0fb956303599ca8cf860c759c1ea8 | lev-veshnyakov/django-import-data,lev-veshnyakov/django-import-data | xml_json_import/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.views.generic import TemplateView, RedirectView\nimport conf\n\nurlpatterns = patterns('',\n url(r'^favicon\\.ico$', 'django.views.generic.simple.redirect_to', {'url': conf.FAVICON_... | python | edit | null | null | bsd-3-clause | c94e3cb0f82430811f7e8cc53d29433448395f70 | littlepea/django-favicon | favicon/urls.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cyclone import web\n\nclass OONIBHandler(web.RequestHandler):\n pass\n\nclass OONIBError(web.HTTPError):\n pass\n\n```\n\nApply this change: Add support for serializing lists to json via self.write()"
},
{
"role": "assist... | python | edit | 1 | 2 | bsd-2-clause | 1e0d3c0d0b20f92fd901163a4f2b41627f9e931e | DoNotUseThisCodeJUSTFORKS/ooni-backend,dstufft/ooni-backend,DoNotUseThisCodeJUSTFORKS/ooni-backend,dstufft/ooni-backend | oonib/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\nfrom magicembed.providers import get_provider\n\nregister = template.Library()\n\n\n@register.filter(is_safe=True)\ndef magicembed(value,... | python | edit | 1 | 2 | mit | c707242bc535411fe84232ca765a87ed2ef7fc22 | kronoscode/django-magicembed,kronoscode/django-magicembed | magicembed/templatetags/magicembed_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom sqlalchemy import Table, MetaData\nfrom corehq.db import connection_manager\nfrom django.db import migrations\n\n\ndef drop_tables(apps, schema_edito... | python | edit | 1 | 2 | bsd-3-clause | 7c2a75906338e0670d0f75b4e06fc9ae775f3142 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq | custom/opm/migrations/0001_drop_old_fluff_tables.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom imaplib import IMAP4, IMAP4_SSL\n\nfrom .base import EmailTransport, MessageParseError\n\n\nclass ImapTransport(EmailTransport):\n def __init__(self, hostname, port=None, ssl=False, archive=''):\n self.hostname = hostname\n ... | python | edit | 1 | 7 | mit | 0aa757955d631df9fb8e6cbe3e372dcae56e2255 | coddingtonbear/django-mailbox,ad-m/django-mailbox,Shekharrajak/django-mailbox,leifurhauks/django-mailbox | django_mailbox/transports/imap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .databricks_generator import DatabricksTableGenerator\nfrom .glob_reader_generator import GlobReaderGenerator\nfrom .subdir_reader_generator import SubdirReaderGenerator\nfrom .in_memory_generator import InMemoryGenerator\nfrom .query_... | python | edit | 9 | 0 | apache-2.0 | 67aa75b51249c8557f4fd4fd98b4dc6901b9cf49 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | great_expectations/datasource/generator/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright © 2009 Ben Finney <<EMAIL>>\n# Copyright © 2006 Robert Niederreiter\n#\n# This is free software: you may copy, modify, and/or distribute this work\n# under the terms of the Python Software Foundation L... | python | edit | 3 | 0 | apache-2.0 | e3bd01b70939555feb89c373d2e156104f1dd02b | wting/python-daemon,eaufavor/python-daemon | daemon/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Show this help\"\"\"\nimport pkgutil\nimport sys\nfrom setuptools import find_packages\nfrom pkgutil import iter_modules\nimport fontTools\nimport importlib\n\n\ndef get_description(pkg):\n try:\n return __import__(pkg+\".__main__... | python | edit | 5 | 3 | mit | f4841c1b0ddecd27544e2fd36429fd72c102d162 | googlefonts/fonttools,fonttools/fonttools | Lib/fontTools/help/__main__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport os\nimport sys\nimport pkg_resources\n\n\nif __name__ == \"__main__\":\n version = pkg_resources.get_distribution('virtualfish').version\n base_path = os.path.dirname(os.path.abspath(__fil... | python | edit | 1 | 0 | mit | d2d4f127a797ad6e82d41de10edd0e70f1626df8 | adambrenecki/virtualfish,adambrenecki/virtualfish | virtualfish/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\ndef register(cls, admin_cls):\n cls.add_to_class('code', models.ForeignKey('profiles.Code',\n verbose_name=_('Registration code'), null=True,... | python | edit | 1 | 4 | bsd-2-clause | b2018bcf9274e0e641e132fe866ef630f99d98a3 | incuna/django-extensible-profiles | profiles/modules/codes/extensions/codes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport quantities as pq\nclass ValidatorTestCase(unittest.TestCase):\n def register_test(self):\n class TestClass():\n intValue = 0\n def getIntValue(self):\n return self.intVa... | python | edit | 1 | 1 | mit | a34fac317c9b09c3d516238cabda5e99a8cec907 | scidash/sciunit,scidash/sciunit | sciunit/unit_test/validator_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nsetuptools.setup(name='pytest-cov',\n version='1.6',\n description='py.test plugin for coverage reporting with '\n 'support for both centralised and distributed testing, '... | python | edit | 1 | 0 | mit | cd010c4a3fd6418f3ab6789da7fdcfb65ef37dc1 | wushaobo/pytest-cov,ionelmc/pytest-cover,opoplawski/pytest-cov,moreati/pytest-cov,schlamar/pytest-cov,pytest-dev/pytest-cov | setup.py | rejected_duplicate | Near-duplicate of sample 12144 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nPretty prints a bitboard to the console given its hex or decimal value.\n'''\nimport sys, textwrap\n\nif len(sys.argv) == 1:\n print 'Syntax: showbb.py <bitboard>'\n sys.exit(1)\n\n# Handle hex/decimal bitboards\nif sys.argv[1].s... | python | edit | 3 | 0 | mit | 2ab4cd4bbc01f3625708b725f1465cb9fb0cdf1b | GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue | scripts/showbb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import timedelta\nfrom datetime import datetime\n\nfrom django import template\n\nfrom github2.client import Github\n\nfrom package.models import Package, Commit\n\nregister = template.Library()\n\ngithub = Github()\n\n@regist... | python | edit | 3 | 5 | mit | 7fa83928d0dae14fca556ef91a9c3c544aac24d6 | QLGu/djangopackages,cartwheelweb/packaginator,cartwheelweb/packaginator,nanuxbe/djangopackages,pydanny/djangopackages,QLGu/djangopackages,QLGu/djangopackages,pydanny/djangopackages,audreyr/opencomparison,nanuxbe/djangopackages,miketheman/opencomparison,benracine/opencomparison,miketheman/opencomparison,benracine/openco... | apps/package/templatetags/package_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\nimport stripe\n\n\nclass Command(BaseCommand):\n \n help = \"Make sure your Stripe account has the plans\"\n \n def handle(self, *args, **o... | python | edit | 2 | 3 | mit | 917cd9330f572bc2ec601a7555122b59507f6429 | aibon/django-stripe-payments,crehana/django-stripe-payments,crehana/django-stripe-payments,jamespacileo/django-stripe-payments,alexhayes/django-stripe-payments,ZeevG/django-stripe-payments,jamespacileo/django-stripe-payments,grue/django-stripe-payments,wahuneke/django-stripe-payments,adi-li/django-stripe-payments,alexh... | payments/management/commands/init_plans.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=13\nbranch=\"master\"\ntimestamp=1376507610.99\n```\n\nApply this change: Tag commit for v0.0.14-master generated by gitmake.py"
},
{
"role": "assistant",
"content": "major = 0\nminor=0\npatch=14\nbranc... | python | edit | 1 | 0 | mit | 003c3049f84634f650a9ddff7dbee09ceefbe47f | ryansturmer/gitmake | version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nsetuptools.setup(\n name='mailcap-fix',\n version='0.1.1',\n description='A patched mailcap module that conforms to RFC 1524',\n long_description=open('README.rst').read(),\n url='https://github.com/micha... | python | edit | 1 | 0 | unlicense | 6c8638c6e5801701d598509bb95036837ccd4a02 | michael-lazar/mailcap_fix | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom setuptools import setup\ntry:\n from ipythonpip import cmdclass\nexcept:\n cmdclass = lambda *args: None\n\nsetup(\n name='d3networkx',\n version='0.1',\n d... | python | edit | 1 | 0 | mit | 81ce1495687b55307bfbb4ba67cab1fe1dea1e9a | jdfreder/ipython-d3networkx,exe0cdc/ipython-d3networkx,exe0cdc/ipython-d3networkx,joshainglis/ipython-d3networkx | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport os\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='cb-response-surveyor',\n author='Keith McC... | python | edit | 1 | 1 | mit | d26e7264066d0ae475edf55b533fa44276775fac | redcanaryco/cb-response-surveyor | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\nimport sys\n\ncurrent_version = list(sys.version_info[:3])\nprint(\"current_version: %s\" % str(current_version))\n\nexpected_version = map(int, os.environ[\"EXPECTED_PYTHON_VERSION\"].split(\".\"))\nprint(\"expected_version: %... | python | edit | 1 | 0 | apache-2.0 | e90cc08b755b96ef892e4fb25d43f3b25d89fae8 | scikit-build/scikit-ci-addons,scikit-build/scikit-ci-addons | _tests/python_check_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as readme:\n next(readme)\n long_description = ''.join(readme).strip()\n\nsetup(\n name='pytest-xpara',\n version='0.0.0',\n description='An extended para... | python | edit | 1 | 0 | mit | f3883a6536498fe0ce981a612a4ff1998e430fa8 | tonyseek/pytest-xpara | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nfrom cucoslib.models import Analysis, Package, Version, Ecosystem\nfrom cucoslib.workers import GraphImporterTask\n\nfrom .base import BaseHandler\n\n\nclass SyncToGraph(BaseHandler):\n \"\"\" Sync all finished analyses ... | python | edit | 4 | 5 | apache-2.0 | 7632acdf82a6aecc28341087195934ae97675e0e | fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs | bayesian_jobs/handlers/sync_to_graph.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# Copyright 2015 by PyCLibrary Authors, see AUTHORS for more details.\n#\n# Distributed under the terms of the MIT/X11 license.\n#\n# ... | python | edit | 10 | 0 | mit | d5f02b13db9b6d23e15bc07a985b8c67644ffb44 | MatthieuDartiailh/pyclibrary,mrh1997/pyclibrary,mrh1997/pyclibrary,MatthieuDartiailh/pyclibrary,mrh1997/pyclibrary,duguxy/pyclibrary,duguxy/pyclibrary,duguxy/pyclibrary | pyclibrary/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport qiprofile_rest\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']\nautoclass_content = \"both\"\nautodoc_default_flags= ['members', 'show-inheritance']\nsource_suffix = '.rst'\n... | python | edit | 5 | 2 | bsd-2-clause | ca5d96b1253d4a2046b30086ad9ae11822a6fcf8 | ohsu-qin/qirest,ohsu-qin/qiprofile-rest | doc/conf.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport boto\nimport boto.s3\nfrom boto.s3.key import Key\nimport requests\nimport uuid\n\n\n# http://stackoverflow.com/a/42493144\ndef upload_url_to_s3(image_url):\n image_res = requests.get(image_url, stream=True)\n image ... | python | edit | 1 | 1 | mit | fba24207cc48aee53e023992be67ced518dc3e9d | reneepadgham/diverseui,reneepadgham/diverseui,reneepadgham/diverseui | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\n\nREADME = os.path.join(os.path.dirname(__file__), 'README.rst')\n\n# when running tests using tox, README.md is not found\ntry:\n with open(README) as file... | python | edit | 1 | 0 | mit | 71dca4da0aa7a0415cc7248f0f4ee33ab3aa550e | VingtCinq/python-resize-image,charlesthk/python-resize-image,charlesthk/python-resize-image,VingtCinq/python-resize-image | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:... | python | edit | 2 | 0 | apache-2.0 | 8f87749e5c7373015290306677fe9651cc5e54c1 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import Client\n\n\nclass RangeIter(object):\n def __init__(self, range_datas):\n self._container = range_datas if self._valid_range(range_datas) else None\n\n def _valid_range(self, range_datas):\n if (not isi... | python | edit | 1 | 4 | mit | b0c217acb04d377bdd0d37ce8fc61a88bd97ae77 | oleiade/py-elevator | pyelevator/elevator.py | rejected_duplicate | Near-duplicate of sample 220 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nversion = '0.1.1'\n\nLONG_DESCRIPTION = \"\"\"\n===============\ndjango-helpdesk\n===============\n\nThis is a Django-powered helpdesk ticket tracker, designed to\nplug into an exist... | python | edit | 3 | 0 | bsd-3-clause | 6a2ab522c07a274920144f93f26361843d61c868 | fjcapdevila/django-helpdesk,vladyslav2/django-helpdesk,fjcapdevila/django-helpdesk,gjedeer/django-helpdesk-issue-164,comsnetwork/django-helpdesk,comsnetwork/django-helpdesk,harrisonfeng/django-helpdesk,comsnetwork/django-helpdesk,temnoregg/django-helpdesk,harrisonfeng/django-helpdesk,django-helpdesk/django-helpdesk,ros... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def run(s... | python | edit | 1 | 1 | bsd-3-clause | 590de85fdb151e11079796c68f300d4fe7559995 | consbio/gis-metadata-parser | setup.py | rejected_duplicate | Near-duplicate of sample 2210 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ninstall_requires=['django>=1.5', 'django-easysettings', 'pytz']\n\ntry:\n import importlib\nexcept ImportError:\n install_requires.append('importlib')\n\nsetup(\n name='django-passwo... | python | edit | 2 | 0 | bsd-3-clause | 5ecb6e7c56aa12019c4ca2c47bdd87c49981ad78 | tarak/django-password-policies,tarak/django-password-policies | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport oscrypto\n\n\nsetup(\n name='oscrypto',\n version=oscrypto.__version__,\n\n description='Crytographic services provided by the operating system, including key generation, encrypti... | python | edit | 1 | 0 | mit | 84daa137c8526a508fa1f2dcf8968137d75e8a0b | wbond/oscrypto | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = '0.2.0'\n\nsetup(\n name='cmsplugin-plaintext',\n version=version,\n description='Adds a plaintext plugin for django-cms.',\n author='Xenofox, LLC',\n author_email='<EM... | python | edit | 1 | 0 | bsd-3-clause | 012e5d7d80b20220a7a41f7f3488ebe468d6b661 | russmo/cmsplugin-plaintext,russmo/cmsplugin-plaintext | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import OrderedDict\n\n\nclass AttrDict(OrderedDict):\n def __init__(self, *args, **kwargs):\n super(AttrDict, self).__init__(*args, **kwargs)\n\n def __getattr__(self, attr):\n if attr not in self:\n ... | python | edit | 1 | 2 | mit | 9c12bcb4a5b5b2fee28476e047855dca50b3867c | mediawiki-utilities/python-mwbase | mwbase/attr_dict.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\r\n\"\"\"Setup script for the pyparsing module distribution.\"\"\"\r\n\r\n# Setuptools depends on pyparsing (via packaging) as of version 34, so allow\r\n# installing without it to avoid bootstrap problems.\r\ntry:... | python | edit | 4 | 0 | mit | e20051360f9dbf6a879be7acdd9159b8f068a388 | pyparsing/pyparsing,pyparsing/pyparsing | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom praw.models import (SubredditWidgets, SubredditWidgetsModeration,\n Widget, WidgetModeration)\n\nfrom ... import UnitTest\n\n\nclass TestWidgets(UnitTest):\n def test_subredditwidgets_mod(self):\n sw =... | python | edit | 1 | 2 | bsd-2-clause | bcc1048a11345545013c6ea93b92fc52e639cd98 | leviroth/praw,gschizas/praw,gschizas/praw,praw-dev/praw,13steinj/praw,praw-dev/praw,leviroth/praw,13steinj/praw | tests/unit/models/reddit/test_widgets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\n\ndef _tail_print(e):\n print(\"%s %s %s\" % (e.resource_status, e.resource_type, e.event_id))\n\n\ndef get_events(conn, stackname):\n \"\"\"Get the events in batches and return in chronological order\"\"\"\n next = ... | python | edit | 1 | 6 | bsd-2-clause | 45381a1ce6e271cc06ce130cb35a93f14eceba90 | mhahn/troposphere | troposphere/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\n\"\"\"Base widget class for widgets provided in Core\"\"\"\n\nfrom .widget import Widget\nfrom .._version import __jupyter_widget_versi... | python | edit | 1 | 0 | bsd-3-clause | 783af65a5e417a1828105d390f7096066929a4b7 | ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets | ipywidgets/widgets/widget_core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\n'''A setuptools script to install strip_recipes\n'''\n\nfrom setuptools import setup\n\nsetup(\n name='strip_recipes',\n version='1.0.0',\n description='Create recipes for the LSPE/Strip tester software... | python | edit | 1 | 0 | mit | 89898941b9024f2b2c74b187d9d571a0fadb9926 | lspestrip/strip_recipes | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n\tname=\"arxiv\",\n\tversion=\"0.2.2\",\n\tpackages=[\"arxiv\"],\n\n\t# dependencies\n\tinstall_requires=[\n\t\t'feedparser',\n\t\t'requests',\n\t],\n\n\t# metadata for upload to PyPI\n\tauthor=\"Luka... | python | edit | 1 | 0 | mit | e78099a5a18d7ae0f264a73c10fdf1422cc1d482 | lukasschwab/arxiv.py | setup.py | rejected_duplicate | Near-duplicate of sample 3616 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup( \\\n name='blendplot',\n version='0.1.0',\n description='A program for plotting 3D scatter plots for use in Blender',\n long_description=open('README.md').read(),\n url='https:... | python | edit | 1 | 0 | mit | f0ce157112428701eb04e084cf437097c57c68da | ExcaliburZero/blender-astro-visualization | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\nfrom flask import Flask\nfrom flask_debugtoolbar import DebugToolbarExtension\n\nfrom .config import settings\n\ndef create_app(global_config, **local_conf):\n app = Flask(__... | python | edit | 3 | 2 | mit | d2ca395f44160272ba3cbe6d68a9c07c0e1cfa3d | FGtatsuro/flask-boilerplate,FGtatsuro/flask-boilerplate,FGtatsuro/flask-boilerplate | flask_boilerplate/templates/+app_name+/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport glob\nimport os\nfrom setuptools import setup, find_packages\n\nsetup(name='openmc',\n version='0.6.2',\n packages=find_packages(),\n scripts=glob.glob('scripts/openmc-*'),\n\n # Required ... | python | edit | 3 | 0 | mit | 37179d21380ec993ea858cec1e030bf7ee6a7b75 | mit-crpg/openmc,bhermanmit/openmc,amandalund/openmc,amandalund/openmc,walshjon/openmc,samuelshaner/openmc,bhermanmit/openmc,wbinventor/openmc,shikhar413/openmc,kellyrowland/openmc,walshjon/openmc,walshjon/openmc,wbinventor/openmc,shikhar413/openmc,paulromano/openmc,johnnyliu27/openmc,wbinventor/openmc,johnnyliu27/openm... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport distutils.core\n\n# Uploading to PyPI\n# =================\n# $ python setup.py register -r pypi\n# $ python setup.py sdist upload -r pypi\n\nversion = '0.0'\ndistutils.core.setup(\n name='kxg',\n version=version,\n ... | python | edit | 1 | 0 | mit | e72107f53e4519f16d556b15405b7f7223e0bfae | kxgames/kxg | setup.py | rejected_duplicate | Near-duplicate of sample 875 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add functional test for both password are the same"
},
{
"role": "assistant",
"content": "from .base import FunctionalTest\n\nimport time\nclass RegistrationFormTest(FunctionalTest):\n def test_two_passwords_are_correct(self):... | python | new_file | 3 | 1 | mit | 7c424d7eb26712e84be67b2fb5921810f8f042a6 | cjh5414/kboard,kboard/kboard,hyesun03/k-board,hyesun03/k-board,kboard/kboard,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,kboard/kboard,guswnsxodlf/k-board,cjh5414/kboard,guswnsxodlf/k-board,darjeeling/k-board | kboard/functional_test/test_registration_form.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys\nimport os.path\n\nimport numpy as np\n\n# Must be one line or PyPI will cut it off\nDESC = (\"A powerful, accurate, and easy-to-use Python library for \"\n \"doing colorspace c... | python | edit | 6 | 0 | mit | 8dc3eb814bd486951a4efe53d27999da2bd940e2 | njsmith/colorspacious | setup.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='icecake',\n version='0.1.0',\n py_modules=['icecake'],\n url=\"https://github.com/cbednarski/icecake\",\n author=\"Chris Bednarski\",\n author_email=\"<EMAIL>\"... | python | edit | 3 | 0 | mit | f4c30dbd717a6c7a04a645a2721a1c34936739a1 | cbednarski/icecake,cbednarski/icecake | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools.extension import Extension\nfrom Cython.Build import cythonize\n\nextensions = [\n Extension(\"smartquadtree\",\n [\"smartquadtree.pyx\", \"quadtree.cpp\", \"neighbour.cpp\"],\n ... | python | edit | 1 | 1 | mit | b59efc07aed61880f29da88c095a2d9c13a145e4 | xoolive/quadtree,xoolive/quadtree | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nmathdeck.settings\n~~~~~~~~~~~~~~~~~\n\nThis module accesses the settings file located at\n/etc/mathdeck/mathdeckconf.json\n\n:copyright: (c) 2015 by Patrick Spencer.\n:license: Apache 2.0, see ../LICENSE ... | python | edit | 3 | 1 | apache-2.0 | 28b261e1f9af635fd2355085303d67991856584f | patrickspencer/mathdeck,patrickspencer/mathdeck | mathdeck/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\nimport os\nimport sys\nimport unittest\nimport os.path\nimport platform\n\nsys.path.append('jubatus')\nsys.path.append('test... | python | edit | 4 | 1 | mit | b74a1065928514846deb7211541007d4fc45593d | hirokiky/jubatus-python-client,jubatus/jubatus-python-client,jubatus/jubatus-python-client,hirokiky/jubatus-python-client | setup.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\nfrom setuptools import setup, find_packages\n\nsetup(\n name='Flask-RESTful',\n version='0.2.1',\n url='https://www.github.com/twilio/flask-restful/',\n author='Kyle Conroy',\n author_email='<EMAIL>',... | python | edit | 1 | 0 | bsd-3-clause | dd3ea448dee1cc77069244d9d1151e8ee07147bc | elatomo/flask-restful,frol/flask-restful,santtu/flask-restful,FashtimeDotCom/flask-restful,ankravch/flask-restful,expobrain/flask-restful,codephillip/flask-restful,marrybird/flask-restful,mackjoner/flask-restful,sergeyromanov/flask-restful,ihiji/flask-restful,liangmingjie/flask-restful,samarthmshah/flask-restful,Khan/f... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom bakery_cli.scripts import genmetadata\n\n\ndef main(argv=None):\n if argv is None:\n argv = sys.argv\n if len(argv) != 2:\n genmetadata.usage()\n return 1\n genmetadata.run(argv[1])\n retu... | python | edit | 1 | 3 | apache-2.0 | c07013887a105a3adf0a6f1aa9d09357450cba46 | googlefonts/fontbakery,googlefonts/fontbakery,graphicore/fontbakery,moyogo/fontbakery,graphicore/fontbakery,graphicore/fontbakery,davelab6/fontbakery,moyogo/fontbakery,moyogo/fontbakery,googlefonts/fontbakery,jessamynsmith/fontbakery | tools/fontbakery-build-metadata.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os.path\nimport re\n\npackage_name = 'sqlalchemy_dict'\n\n# reading package's version (same way sqlalchemy does)\nwith open(os.path.join(os.path.dirname(__file__), package_name, '__init__.... | python | edit | 1 | 0 | mit | 0fbbfcbe69eba31709862bf9372a3a77fcc3dde9 | meyt/sqlalchemy-dict | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFlask-Autodoc\n-------------\n\nFlask autodoc automatically creates an online documentation for your flask application.\n\"\"\"\nfrom setuptools import setup\n\n\nsetup(\n name='Flask-Autodoc',\n version='0.1',\n url='http:... | python | edit | 1 | 1 | mit | 268e10a066655f88da5b1da82ac2cfd9b6e7e03f | lukeyeager/flask-autodoc,jwg4/flask-autodoc,acoomans/flask-autodoc,BallisticBuddha/flask-autodoc,jwg4/flask-autodoc,lukeyeager/flask-autodoc,acoomans/flask-autodoc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nfrom codecs import open\nfrom setuptools import setup\n\n\nsetup(name=\"abzer\",\n author=\"Wieland Hoffmann\",\n author_email=\"<EMAIL>\",\n packages=[\"abzer\"],... | python | edit | 1 | 0 | mit | 9571d0cf946163c8ca9c01aae3334feebf0a4276 | mineo/abzer,mineo/abzer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom info_scipy_base import __doc__\nfrom scipy_base_version import scipy_base_version as __version__\n\nfrom ppimport import ppimport, ppimport_attr\n\n# The following statement is equivalent to\n#\n# from Matrix import Matrix as mat\n... | python | edit | 16 | 0 | bsd-3-clause | 27e67076d4a2cfe68ab3a9113bb37344b35b3c90 | illume/numpy3k,chadnetzer/numpy-gaurdro,jasonmccampbell/numpy-refactor-sprint,efiring/numpy-work,Ademan/NumPy-GSoC,illume/numpy3k,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,teoliphant/numpy-refactor,illume/numpy3k,Ademan/NumPy-GSoC,jasonmccampbell/numpy-refactor-sprint,Ademan/NumPy-GSoC,chadnetzer/numpy-gaurdro,chadne... | scipy_base/__init__.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import reverse\nfrom django.views.generic import FormView\n\nfrom pretix.control.forms.global_settings import GlobalSettingsForm\nfrom pretix.control.permissions import AdministratorPermissionRequiredMixin\n\n\nclass G... | python | edit | 1 | 1 | apache-2.0 | acab1af0e9bebeea011de1be472f298ddedd862b | Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix | src/pretix/control/views/global_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n\"\"\"TODO: Maybe add a docstring containing a long description\n\n This would double as something we could put int the `long_description`\n parameter for `setup` and it would squelch some complaints pylint has o... | python | edit | 1 | 0 | mit | 48e14e2f5cb6d7be0e9ec2f39858002b41911245 | oemof/demandlib | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport logging\nimport re\n\nfrom gi.repository import Gst\n\nfrom lib.config import Config\nfrom lib.sources.avsource import AVSource\n\n\nclass VideoLoopSource(AVSource):\n def __init__(self, name):\n sup... | python | edit | 5 | 1 | mit | c889ffd1f86a445f2e5ba157fc81cbb64e92dc12 | voc/voctomix,voc/voctomix | voctocore/lib/sources/videoloopsource.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\na: np.ndarray\ngenerator = (i for i in range(10))\n\nnp.require(a, requirements=1) # E: No overload variant\nnp.require(a, requirements=\"TEST\") # E: incompatible type\n\nnp.zeros(\"test\") # E: incompatible type\n... | python | edit | 3 | 0 | bsd-3-clause | 7da7789a6508a60d0ad7662ac69bcee9c478c239 | seberg/numpy,jakirkham/numpy,endolith/numpy,pdebuyl/numpy,seberg/numpy,seberg/numpy,mhvk/numpy,pbrod/numpy,pbrod/numpy,pbrod/numpy,endolith/numpy,pbrod/numpy,seberg/numpy,madphysicist/numpy,pbrod/numpy,mattip/numpy,jakirkham/numpy,numpy/numpy,madphysicist/numpy,rgommers/numpy,mhvk/numpy,mhvk/numpy,rgommers/numpy,anntze... | numpy/typing/tests/data/fail/array_constructors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport os\n\nfrom testcases import sim_files\nfrom cyclus_tools import run_cyclus, db_comparator\n\n\"\"\"Tests\"\"\"\ndef test_cyclus():\n \"\"\"Test for all inputs in sim_files. Checks if reference and current... | python | edit | null | null | bsd-3-clause | d3489d51621fc001d0700f5a8562e53d82b52cac | Baaaaam/cyCLASS,gonuke/cycamore,Baaaaam/cyBaM,cyclus/cycaless,rwcarlsen/cycamore,jlittell/cycamore,jlittell/cycamore,rwcarlsen/cycamore,gonuke/cycamore,cyclus/cycaless,Baaaaam/cycamore,Baaaaam/cyCLASS,Baaaaam/cyBaM,rwcarlsen/cycamore,gonuke/cycamore,jlittell/cycamore,Baaaaam/cycamore,Baaaaam/cycamore,Baaaaam/cyBaM,Baaa... | tests/test_cyclus.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2006-2008 Edgewall Software\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution. The terms\n# a... | python | edit | 6 | 0 | bsd-3-clause | 0dc833919af095470f1324d9e59647c2f6f851f5 | mitchellrj/genshi,mitchellrj/genshi,mitchellrj/genshi,mitchellrj/genshi | genshi/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from django.urls import reverse_lazy\nexcept ImportError:\n from django.core.urlresolvers import reverse_lazy\nfrom django.forms import inlineformset_factory\nfrom django.views import generic\n\nfrom select2_many_to_many.forms ... | python | edit | 1 | 3 | mit | 7cb4734a837ad9d43ef979085d0f6d474f45178c | yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light,yourlabs/django-autocomplete-light | test_project/select2_outside_admin/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest.mock import patch\n\nimport pytest\n\nfrom .core import PostmarkClient, requests\n\n\n@pytest.yield_fixture\ndef postmark_request():\n \"\"\"Mocks network requests to Postmark API.\"\"\"\n if patch is None:\n rais... | python | edit | 1 | 1 | mit | d7b92a15756dbbad1d66cbe7b2ef25f680e59b10 | Stranger6667/postmarker | postmarker/pytest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\nfrom . import AWSObject\n\n\nVALID_CONNECTION_PROVIDERTYPE = ('Bitbucket')\n\n\ndef validate_connection_providertype(connec... | python | edit | 2 | 2 | bsd-2-clause | eb7993ce52e6f8ba7298b6ba9bc68356e99c339b | cloudtools/troposphere,cloudtools/troposphere | troposphere/codestarconnections.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import namedtuple\nfrom django.core.management.base import BaseCommand\n\n\nProgress = namedtuple('Progress', ['progress', 'overall'])\n\n\nclass AsyncCommand(BaseCommand):\n\n CELERY_PROGRESS_STATE_NAME = \"PROGRESS\"\n... | python | edit | 1 | 2 | mit | 4716df0c5cf96f5a3869bbae60844afbe2aaca4a | aronasorman/kolibri,DXCanas/kolibri,DXCanas/kolibri,lyw07/kolibri,jtamiace/kolibri,christianmemije/kolibri,aronasorman/kolibri,aronasorman/kolibri,learningequality/kolibri,rtibbles/kolibri,lyw07/kolibri,mrpau/kolibri,mrpau/kolibri,66eli77/kolibri,jamalex/kolibri,ralphiee22/kolibri,lyw07/kolibri,jamalex/kolibri,indirect... | kolibri/tasks/management/commands/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 The Regents of the University of Michigan\n# All rights reserved.\n# This software is licensed under the BSD 3-Clause License.\n\"\"\"Graphical User Interface (GUI) for configuration and database inspection.\n\nThe GUI ... | python | edit | 2 | 1 | bsd-3-clause | 1e71315c20cc542dff207f309993d298de054eb7 | csadorf/signac,csadorf/signac | signac/gui/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Listener:\n \"\"\"Always invokes the handler.\"\"\"\n def __init__(self, handler):\n self.handler = handler\n\n def handle(self, connection, message):\n self.handler(connection, message=message)\n\n\nclass Comma... | python | edit | 1 | 2 | bsd-2-clause | 6af31da53a43bcd2e45ea4242892a4831b2fb2f8 | meshy/framewirc | asyncio_irc/listeners.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport pytest\nimport yatsm._cyprep as cyprep\n\n\ndef test_get_valid_mask():\n n_bands, n_images, n_mask = 8, 500, 50\n data = np.random.randint(0, 10000,\n size=(n_bands, n_images)).as... | python | edit | 3 | 3 | mit | 21e2db0e2c3873e6390eee1865c67ee4c73ba498 | c11/yatsm,ceholden/yatsm,valpasq/yatsm,valpasq/yatsm,c11/yatsm,ceholden/yatsm | tests/test_cyprep.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\n\nfrom django.conf.urls import patterns, url\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views.decorators.cache import cache_page\n\nfrom .views import OrganisationSearchView, Organisat... | python | edit | 1 | 2 | mit | 83b8f44a3d978a120b8a1b8346ecdd54fdd068fd | correctiv/correctiv-justizgelder,correctiv/correctiv-justizgelder | correctiv_justizgelder/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n#import sys\n#reload(sys)\n#sys.setdefaultencoding(\"utf-8\")\n\nimport os\nimport random\nfrom io import open\n\ncurses_en = os.path.join(os.path.dirname(__file__), \"curses_en.txt\")\ncurs... | python | edit | 1 | 4 | mit | 2733408a9e24c30214831c46ac748aa4884a18fb | asmaier/haddock,asmaier/haddock | haddock/haddock.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport urllib\nimport json\n\nclass WmataError(Exception):\n pass\n\nclass Wmata(object):\n\n api_url = 'http://api.wmata.com/%(svc)s.svc/json/%(endpoint)s'\n\n # By default, we'll use the WMATA demonstration key\n... | python | edit | 5 | 1 | mit | d0d7c1f29ca17d3273033821a8ed1326b0ec7b4c | ExperimentMonty/py3-wmata | wmata.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import absolute_import\n\nimport subprocess\n\nif __name__ == \"__main__\":\n import argparse\n parser = argparse.ArgumentParser()\n parser.add... | python | edit | 2 | 0 | mit | b6927cadb72e0a73700416d0218a569c15ec8818 | judithfan/pix2svg | generative/tests/compare_test/concat_first/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\nclass MainConfig(object):\n DEBUG = False\n WTF_CSRF_ENABLED = True\n SQLALCHEMY_TRACK_MODIFICATIONS = False\n # Will generate a random secret key with a sequence of random chaarcters\n SECRET_KEY = os.urandom(... | python | edit | 1 | 0 | mit | fe2dbf3d0008c344f1ef1ba3895c2cbb6b07209a | paulupendo/CP-2-Bucketlist-Application | instance/config.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.