messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom indra.statements import *\nfrom indra.sources import ctd\nfrom indra.sources.ctd.processor import CTDChemicalGeneProcessor\n\nHERE = os.path.dirname(os.path.abspath(__file__))\n\n\ndef test_statement_type_mapping():\n st ... | python | edit | 7 | 1 | bsd-2-clause | 620bf504292583b2547cf7489eeeaaa582ddad77 | sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,bgyori/indra,sorgerlab/belpy | indra/tests/test_ctd.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .influxdb import InfluxDBMixin\nfrom .statsd import StatsdMixin\n\nversion_info = (1, 0, 0)\n__version__ = '.'.join(str(v) for v in version_info)\n__all__ = ['InfluxDBMixin', 'StatsdMixin']\n\n```\n\nApply this change: Make it safe to ... | python | edit | 5 | 1 | bsd-3-clause | 8528beef5d10355af07f641b4987df3cd64a7b0f | sprockets/sprockets.mixins.metrics | sprockets/mixins/metrics/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport steel\nimport unittest\n\n\nclass NameAwareOrderedDictTests(unittest.TestCase):\n def setUp(self):\n self.d = steel.NameAwareOrderedDict()\n\n def test_ignore_object(self):\n # Objects without a set_name() method ... | python | edit | 1 | 1 | bsd-3-clause | 723f59d43cce9d7a09386447389e8df33b5d323e | gulopine/steel-experiment | tests/base/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#: A list of the permission strings used by Virtool.\nPERMISSIONS = [\n \"cancel_job\",\n \"create_sample\",\n \"create_subtraction\",\n \"manage_users\",\n \"modify_hmm\",\n \"modify_options\",\n \"modify_virus\",\n ... | python | edit | 1 | 0 | mit | 06c3e03db75617b824eae088053a9fc563b936a7 | virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool | virtool/user_permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n'''Migration script for Search-enabled Models.'''\nfrom __future__ import absolute_import\n\nimport logging\nfrom modularodm.query.querydialect import DefaultQueryDialect as Q\nfrom website.mo... | python | edit | 1 | 3 | apache-2.0 | ad7e93fa74054e3d962e34807f5d04acd719df33 | KAsante95/osf.io,hmoco/osf.io,petermalcolm/osf.io,amyshi188/osf.io,rdhyee/osf.io,samanehsan/osf.io,GaryKriebel/osf.io,mluo613/osf.io,ticklemepierce/osf.io,jnayak1/osf.io,GaryKriebel/osf.io,bdyetton/prettychart,mfraezz/osf.io,GaryKriebel/osf.io,ticklemepierce/osf.io,caneruguz/osf.io,crcresearch/osf.io,abought/osf.io,zac... | website/search_migration/migrate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom atlas.celerybackend.celery import app\nfrom atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed\nfrom atlas.prodtask.hashtag import hashtag_request_... | python | edit | 1 | 1 | apache-2.0 | ba32a22cc0cb41c4548c658a7195fab56dab6dbf | PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas | atlas/prodtask/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nfrom cmsplugin_facebook import models\n\nclass BasePlugin(CMSPluginBase):\n name = None\n\n def render(self, context, instance, placeholder):\n ... | python | edit | 1 | 2 | bsd-3-clause | 3555b002aae386220bc02d662a9b188426afc08f | chrisglass/cmsplugin_facebook | cmsplugin_facebook/cms_plugins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport random\n\n\nDIRECT = 'direct'\nREVERSE = 'reverse'\nLOG = logging.getLogger(__name__)\n\n\nclass Trainer:\n\n def __init__(self, store, kind=DIRECT):\n self.store = store\n if kind == DIRECT:\n ... | python | edit | 1 | 3 | bsd-2-clause | 9bc9b2ea4a53e27b4d9f5f55e2c36fe483ab2de5 | dtantsur/pylancard | pylancard/trainer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom telemetry import benchmark\nfrom telemetry.unittest import tab_test_... | python | edit | 1 | 1 | bsd-3-clause | 9c8ae361d680f851c4cddb5fddf309190ce9f2b1 | catapult-project/catapult,catapult-project/catapult,sahiljain/catapult,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult,sahiljain/... | telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\nimport os.path\nimport urllib.parse\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nsetup(name='herc',\n version='0.1',\n description='Herc is ... | python | edit | 1 | 1 | bsd-3-clause | a247cd42a79fa96d6b61fcd131a6e0c8d8cf57fe | broadinstitute/herc,broadinstitute/herc,broadinstitute/herc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom .toggles import *\n\nif not DEBUG:\n EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n EMAIL_HOST = os.environ.get('RCAMP_EMAIL_HOST')\n EMAIL_PORT = int(os.environ.get('RCAMP_EMAIL_PORT'))\nelse:\n ... | python | edit | 3 | 0 | mit | f189143309f41766e8e8ad24d96ee68ba6584cb9 | ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP | rcamp/rcamp/settings/logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport eventlet\nimport os\nimport commands\nfrom eventlet import wsgi\nfrom paste.deploy import loadapp\n\n\ndef main():\n conf = \"conf/api-paste.ini\"\n appname = \"main\"\n commands.getoutput('mkdir -p ../logs')\n app = load... | python | edit | 1 | 1 | apache-2.0 | 8a522bc92bbf5bee8bc32a0cc332dc77fa86fcd6 | fs714/drcontroller | drcontroller/http_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2013, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, Tags\nfrom .compat import policytypes\nfrom .validators import boolean, integer_range, key_usage_typ... | python | edit | 5 | 0 | bsd-2-clause | 6c53778132eeba03acbca718d76ad703615fadc6 | cloudtools/troposphere,cloudtools/troposphere | troposphere/kms.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nimport cffi\n\n\n__version__ = '2.0.0a1'\n\n\n_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')\n_header = open(_header_file).read()\n_header += '#define SPOTIF... | python | edit | 1 | 0 | apache-2.0 | 58c13375f7ea4acaf21ccf1151460d79e59bfdf1 | kotamat/pyspotify,felix1m/pyspotify,jodal/pyspotify,mopidy/pyspotify,jodal/pyspotify,kotamat/pyspotify,mopidy/pyspotify,jodal/pyspotify,felix1m/pyspotify,felix1m/pyspotify,kotamat/pyspotify | spotify/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version__ = '$Id$'\n\nimport family\n\n# The Wikia Search family\n# user-config.py: usernames['wikia']['wikia'] = 'User name'\n\nclass Family(family.Family):\n def __init__(self):\n family.Family.__in... | python | edit | 1 | 1 | mit | 31ea46e1ece2174bd5d16e2234576c4ca28a054d | azatoth/pywikipedia | pywikibot/families/wikia_family.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.conf import settings\nfrom django.core import mail\nfrom django.template import loader\n\n\nclass ContactForm(forms.Form):\n name = forms.CharField()\n email = forms.EmailField()\n message = fo... | python | edit | 1 | 2 | mit | 71a84ecb772aa5560e35409219c11001ac168c6a | cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website | chmvh_website/contact/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom selenium.webdriver.common.by import By\n\nfrom .utils import wait_for\n\n\nclass FormTestMixin:\n\n # default search element\n form_search_list = (\n (By... | python | edit | 1 | 1 | bsd-3-clause | 4076fb322814848d802d1f925d163e90b3d629a9 | nimbis/django-selenium-testcase,nimbis/django-selenium-testcase | selenium_testcase/testcases/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('fft', parent_package, top_path)\n\n config.add_data_dir('tests')\n\n # Configure pocketfft_int... | python | edit | 1 | 2 | bsd-3-clause | 517f53dc91164f4249de9dbaf31be65df02ffde7 | mhvk/numpy,pbrod/numpy,mattip/numpy,anntzer/numpy,numpy/numpy,numpy/numpy,pbrod/numpy,rgommers/numpy,numpy/numpy,endolith/numpy,abalkin/numpy,pdebuyl/numpy,grlee77/numpy,mattip/numpy,grlee77/numpy,pdebuyl/numpy,charris/numpy,charris/numpy,seberg/numpy,pbrod/numpy,grlee77/numpy,anntzer/numpy,jakirkham/numpy,seberg/numpy... | numpy/fft/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TestREPLQuickLookObject.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Exception\n... | python | edit | 8 | 1 | apache-2.0 | 34b57742801f888af7597378bd00f9d06c2d3b66 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/test/repl/quicklookobject/TestREPLQuickLookObject.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nThe Q-learning algorithm is used to learn the state-action values for all\nTic-Tac-Toe positions by playing games against itself (self-play).\n'''\nfrom capstone.game.games import TicTacToe\nfrom capstone.game.players import RandPlayer... | python | edit | 1 | 0 | mit | 4e9a530403dce47f322df471255a0fc40fd1071f | davidrobles/mlnd-capstone-code | examples/tic_ql_tabular_selfplay_all.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\nimport logging\nfrom django.core.wsgi import get_wsgi_application\nfrom awx import prepare_env\nfrom awx import __version__ as tower_version\n\n\"\"\"\nWSGI config for AWX projec... | python | edit | 1 | 0 | apache-2.0 | d30605d82d5f04e8478c785f1bb5086066e50878 | wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx | awx/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unittest\nfrom .base import FunctionalTestCase\nfrom .pages import game\n\nclass StylesheetTests(FunctionalTestCase):\n def test_color_css_loaded(self):\n self.story('Create a game')\n self.b... | python | edit | 3 | 2 | mit | 6f464e422befe22e56bb759a7ac7ff52a353c6d9 | XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant | accountant/functional_tests/test_layout_and_styling.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom .models import Resource\nfrom .serializers import ResourceSerializer\nfrom rest_framework import generics, permissions\n\n\nclass ResourceList(generics.ListCreateAPIView):\n queryset = Resource.o... | python | edit | 3 | 0 | apache-2.0 | d7cfdbd2bde0cc876db8c1bce020d8a1cf0ea77b | uw-it-aca/mdot-rest,uw-it-aca/mdot-rest | mdot_rest/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sts.util.console import msg\n\nclass ControllerManager(object):\n ''' Encapsulate a list of controllers objects '''\n def __init__(self, controllers):\n self.uuid2controller = {\n controller.uuid : controller\n for contr... | python | edit | 1 | 3 | apache-2.0 | e37c7cace441e837120b820936c6f4ae8de78996 | ucb-sts/sts,jmiserez/sts,ucb-sts/sts,jmiserez/sts | sts/controller_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom wafer.pages.models import File, Page\n\n\nclass PageAdmin(admin.ModelAdmin):\n prepopulated_fields = {\"slug\": (\"name\",)}\n list_display = ('name', 'slug', 'get_people_display_names', 'get_i... | python | edit | 1 | 0 | isc | a3c1822dd2942de4b6bf5cac14039e6789babf85 | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/pages/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Utilities for tests.\n\"\"\"\nimport codecs\nimport codecs\nimport os\nimport re\n\n\ndef strip_ansi(string):\n \"\"\"Strip ANSI encoding from given string.\n \n Parameters\n ----------\n string : str\n String fr... | python | edit | 1 | 3 | mit | 0d33acf31254714b3a9f76d3fe97c77e7270c110 | manrajgrover/halo,ManrajGrover/halo | tests/_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# from: http://flask.pocoo.org/snippets/35/\n# written by Peter Hansen\n\n\nclass ReverseProxied(object):\n '''Wrap the application in this middleware and configure the\n front-end server to add these headers, to let you quietly bind\... | python | edit | 1 | 4 | mit | 7119930b662a20d9e9bbca230f8a6485efcb7c44 | mbr/flask-appconfig | flask_appconfig/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom pathlib import Path\n\nfrom pip import __version__\nfrom tests.lib import PipTestEnvironment\n\n\ndef test_runner_work_in_environments_with_no_pip(\n script: PipTestEnvironment, pip_src: Path\n) -> None:\n runner = pip... | python | edit | 1 | 1 | mit | ee6c7caabdfcd0bddd9b92d05cddd8b6be7cbe10 | pradyunsg/pip,pypa/pip,pfmoore/pip,pfmoore/pip,sbidoul/pip,pradyunsg/pip,sbidoul/pip,pypa/pip | tests/functional/test_pip_runner_script.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sphinx.parsers\nimport docutils.parsers.rst as rst\n\nclass CStrip(sphinx.parsers.Parser):\n def __init__(self):\n self.rst_parser = rst.Parser()\n\n def parse(self, inputstring, document):\n stripped = []\n for line in in... | python | edit | 1 | 4 | mit | 7ebc9a4511d52707ce88a1b8bc2d3fa638e1fb91 | adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython | c2rst.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\nimport os\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': os.environ['RDS_DB_NAME'],\n 'HOST': os.environ['RDS_HOSTNAME'],\n 'PORT': os.envi... | python | edit | 2 | 0 | mit | fef28556bc4d105feb44345782c632b8d3befa3f | yizhang7210/Acre,yizhang7210/Acre,yizhang7210/Acre,yizhang7210/Acre | server/acre/settings/dev.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nname = 'morepath_cerebral_todomvc'\ndescription = (\n 'Morepath example of using React & Cerebral'\n)\nversion = '0.1.0'\n\n\nsetup(\n name=name,\n version=v... | python | edit | 1 | 0 | bsd-3-clause | 586c1dfc74a0bc5335f12381891f1a366c0231da | morepath/morepath_cerebral_todomvc,morepath/morepath_cerebral_todomvc,morepath/morepath_cerebral_todomvc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport scrapy\n\nimport scrapy.selector\nfrom brasileirao.items import BrasileiraoItem\nimport hashlib\n\nclass ResultsSpider(scrapy.Spider):\n name = \"results\"\n\n start_urls = [\n 'https://esporte.uol.com.br/futebol/campeon... | python | edit | 1 | 3 | mit | ab5aac0c9b0e075901c4cd8dd5d134e79f0e0110 | pghilardi/live-football-client | brasileirao/spiders/results_spider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncio\nimport sys\n\nimport scrapy\n\nfrom scrapy.crawler import CrawlerProcess\nfrom twisted.internet.defer import Deferred\n\n\nclass UppercasePipeline:\n async def _open_spider(self, spider):\n spider.logger.info(\"asy... | python | edit | 4 | 1 | bsd-3-clause | 7e98a76ac455a8c69950104766719cde313bbb74 | elacuesta/scrapy,elacuesta/scrapy,scrapy/scrapy,pablohoffman/scrapy,dangra/scrapy,pawelmhm/scrapy,pablohoffman/scrapy,dangra/scrapy,scrapy/scrapy,pawelmhm/scrapy,dangra/scrapy,pawelmhm/scrapy,pablohoffman/scrapy,elacuesta/scrapy,scrapy/scrapy | tests/CrawlerProcess/asyncio_deferred_signal.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom py101 import Story\nfrom py101 import variables\nfrom py101 import lists\nimport unittest\n\n\nclass TestStory(unittest.TestCase):\n def test_name(self):\n self.assertEqual(Story().name, 'py101', \"name should be py101\")\n\n... | python | edit | 1 | 3 | mit | 97535245f7da3d7e54d64dc384d6cd81caa9a689 | sophilabs/py101 | tests/test_story.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.template.defaultfilters import stringfilter, yesno\nfrom django.http.response import REASON_PHRASES\n\nregister = template.Library()\n\n@register.filter\n@stringfilter\ndef truthy(value, arg=None):\n... | python | edit | 1 | 3 | bsd-3-clause | 580c8c8866a2647faa1b7a360f8403eb1ff34b57 | sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies | thezombies/templatetags/brains.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom scipy import sparse\nfrom .sparselol_cy import extents_count\n\ndef extents(labels):\n \"\"\"Compute the extents of every integer value in ``arr``.\n\n Parameters\n ----------\n labels : array of ints\n ... | python | edit | 1 | 1 | bsd-3-clause | 1d53f6dc8346a655a86e670d0d4de56f7dc93d04 | janelia-flyem/gala,jni/gala | gala/sparselol.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test.runner import DiscoverRunner\nfrom django.db import connection\n\nfrom tenant_schemas.utils import get_tenant_model\n\nfrom bluebottle.test.utils import InitProjectDataMixin\n\n\nclass MultiTenantRunner(DiscoverRunner, Init... | python | edit | 1 | 1 | bsd-3-clause | 6486a888cbcec7285df92020f76e3f1c5fbba0e2 | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/test/test_runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nGstreamerXzPackage (project = 'gstreamer', name = 'gstreamer', version = '1.4.5', configure_flags = [\n '--disable-gtk-doc', \n '--prefix=\"%{prefix}'\n])\n\n```\n\nApply this change: Fix GStreamer packages use of prefix"
}... | python | edit | 2 | 0 | mit | f27b9730ad2e38cd0a8010e7882d9e475e4a3e08 | BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild | packages/gstreamer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Credentials to root namespace"
},
{
"role": "assistant",
"content": "from .api import WorkflowMax # noqa\nfrom .credentials import Credentials # noqa\n\n__version__ = \"0.1.0\"\n"
}
] | python | new_file | 1 | 0 | bsd-3-clause | 35594a4f8c549d507c7d7030141ae511aed57c09 | ABASystems/pyworkflowmax | workflowmax/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom django.views.generic import RedirectView\n\nfrom .api import LinkedEventsAPIRouter\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\napi_router = LinkedEventsAPIRouter()\n\n\n\nurlp... | python | edit | 1 | 1 | mit | 29c977a7f7293f1ce45f393a4c8464bbb9691f9e | aapris/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,tuomas777/linkedevents,tuomas777/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents | linkedevents/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\r\nimport json\r\nimport sys\r\n\r\ndef get_item(key):\r\n try:\r\n return json.loads(open(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),key), \"rb\").read().decode('UTF-8'))[\"_\"]\r\n except (IOError, V... | python | edit | 1 | 2 | isc | 2c7621143a9d110ebb1ea5dc7884f2c21e2786b5 | netpieio/microgear-python | microgear/cache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport json\nimport requests\nimport hashlib\n\n\ndef hashToNumber(txhash,total):\n result = long(txhash, 16) % total \n return result \n\ndef getBlocktxs(blockhash, number, total, startnum):\n url = ... | python | edit | 3 | 4 | mit | caf18b1cd8923e6d070d2652f9969dabba50e81b | planetcoder/readerLottery | lotteryResult.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# need to install python-opencv, pygame, numpy, scipy, PIL\nimport sys\n\nimport pygame\nfrom pygame.locals import *\n\nimport opencv\n#this is important for capturing/displaying images\nfrom opencv import highgui\n\n\ndef get_image(camera)... | python | edit | 1 | 5 | mit | d54e5f25601fe2f57a2c6be5524430f0068e05c4 | duboviy/study_languages | image_translate/frames_rendering.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom settings import *\n\nDATABASES[\"default\"] = {\"NAME\": \"zephyr/tests/zephyrdb.test\",\n \"ENGINE\": \"django.db.backends.sqlite3\",\n \"OPTIONS\": { \"timeout\": 20, },}\n\nTORNADO_SERVE... | python | edit | 3 | 0 | apache-2.0 | 7c74017bc0d76ecb34e3fab44767290f51d98a09 | ryanbackman/zulip,christi3k/zulip,dnmfarrell/zulip,littledogboy/zulip,LAndreas/zulip,timabbott/zulip,hayderimran7/zulip,xuxiao/zulip,deer-hope/zulip,zhaoweigg/zulip,m1ssou/zulip,wdaher/zulip,punchagan/zulip,lfranchi/zulip,kokoar/zulip,voidException/zulip,brainwane/zulip,blaze225/zulip,akuseru/zulip,JPJPJPOPOP/zulip,hay... | humbug/test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# mdstrip.py: makes new notebook from old, stripping md out\n\n\"\"\"A tool to copy cell_type=(\"code\") into a new file\nwithout grabbing headers/markdown (most importantly the md)\nNOTE: may want to grab the heade... | python | edit | 5 | 3 | mit | f13fc280f25996ec7f4924647fdc879779f51737 | holdenweb/nbtools,holdenweb/nbtools | project/tools/normalize.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\n\ndef get_events(conn, stackname):\n \"\"\"Get the events in batches and return in chronological order\"\"\"\n next = None\n event_list = []\n while 1:\n events = conn.describe_stack_events(stackname, next)... | python | edit | 1 | 5 | bsd-2-clause | 2f63f134d2c9aa67044eb176a3f81857279f107d | mhahn/troposphere | troposphere/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright (c) 2009 rPath, Inc.\n#\n# This program is distributed under the terms of the Common Public License,\n# version 1.0. A copy of this license should have been distributed with this\n# source file in a file called LICENSE. If it... | python | edit | null | null | apache-2.0 | ca7fb88d36b386defab610388761609539e0a9cf | fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary | conary/build/capsulerecipe.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# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport os\nimport sys\nimport time\n\nfrom PySide import QtGui\n\nfrom segue import discover_processors\nfrom segue.backend.host.ba... | python | edit | 3 | 2 | apache-2.0 | 23341ce8a8ff44996c9b502ffe0524f5a1f69946 | 4degrees/segue | test/interactive/test_exporter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\".. Ignore pydocstyle D400.\n\n==================\nElastic Paginators\n==================\n\nPaginator classes used in Elastic app.\n\n\n.. autoclass:: resolwe.elastic.pagination.LimitOffsetPostPagination\n\n\"\"\"\nfrom __future__ imp... | python | edit | 1 | 3 | apache-2.0 | 9d29061f8520506d798ad75aa296be8dc838aaf7 | genialis/resolwe,jberci/resolwe,genialis/resolwe,jberci/resolwe | resolwe/elastic/pagination.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tinyik import Link, Joint, FKSolver\n\nfrom .utils import x, y, z, theta, approx_eq\n\n\ndef test_forward_kinematics():\n fk = FKSolver([\n Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])\n ])\n assert al... | python | edit | 1 | 1 | mit | b8350e91d7bd1e3a775ed230820c96a180a2ad02 | lanius/tinyik | tests/test_solver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nfrom numpy.testing import assert_approx_equal, assert_allclose\nfrom UliEngineering.Mechanics.Threads import *\nimport unittest\n\nclass TestThreads(unittest.TestCase):\n def test_thread_p... | python | edit | 6 | 1 | apache-2.0 | 87f483668e352a5807ffafca061238f4a7f86fab | ulikoehler/UliEngineering | tests/Mechanics/Threads.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n########\n# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a ... | python | edit | 1 | 0 | apache-2.0 | e548713f5192d125b1313fa955240965a1136de8 | fastconnect/cloudify-azure-plugin | plugin/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals\n\nimport subprocrunner as spr\n\nfrom ._common import find_bin_path\nfrom ._const import TcSubComm... | python | edit | 1 | 3 | mit | 0a3eb4b966dff69cbe582c60bf4444facb4b683d | thombashi/tcconfig,thombashi/tcconfig | tcconfig/_tc_command_helper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport argparse\nimport logging\nimport os\nimport sys\n\nfrom twisted.internet import reactor\n\nfrom desertbot.config import Config, ConfigError\nfrom desertbot.factory import DesertBotFactory\n\n\nif __name__ == ... | python | edit | 1 | 0 | mit | 81b6a138c476084f9ddd6063f31d3efd0ba6e2cf | DesertBot/DesertBot | start.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Jon Surrell\n# Copyright (c) 2014 Jon Surrell\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Govet plugin class.\"\"\"\n\nfro... | python | edit | 1 | 0 | mit | 464a5ffd02347b17ab6d2263d39e7868a01178f9 | sirreal/SublimeLinter-contrib-govet | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A hook for modifying parameter values read from the WMT client.\"\"\"\n\nimport os\nimport shutil\n\nfrom wmt.utils.hook import find_simulation_input_file\nfrom topoflow_utils.hook import assign_parameters\n\n\nfile_list = []\n\n\ndef... | python | edit | 3 | 2 | mit | e0dac0a621cbeed615553e5c3544f9c49de96eb2 | csdms/wmt-metadata | metadata/FrostNumberModel/hooks/pre-stage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWindows platform support for running the application as a detached process.\n\n\"\"\"\nimport multiprocessing\nimport subprocess\nimport sys\n\nDETACHED_PROCESS = 8\n\n\nclass Daemon(object):\n\n def __init__(self, controller, us... | python | edit | 4 | 1 | bsd-3-clause | d0191c43c784b229ce104700989dfb91c67ec490 | gmr/helper,dave-shawley/helper,gmr/helper | helper/windows.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n__version__ = '0.2.0'\n__pkg_name__ = 'textsift'\n\nsetup(\n name = __pkg_name__,\n version = __version__,\n description = 'Text modelling framework',\n author='Andrew Chisholm',\n ... | python | edit | 1 | 0 | mit | a0ab52fddc682e207667a927fc717ac23cecab52 | wikilinks/sift,wikilinks/sift | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"Defines constants used in `astropy.vo.samp`.\"\"\"\n\nimport os\n\nDATA_DIR = os.path.join(os.path.dirname(__file__), 'data')\n\n__all__ = ['SAMP_STATUS_OK', 'SAMP_STATU... | python | edit | 3 | 0 | bsd-3-clause | 416dea771c5750044b99e8c8bfe0755feeb3ee71 | StuartLittlefair/astropy,StuartLittlefair/astropy,bsipocz/astropy,saimn/astropy,bsipocz/astropy,tbabej/astropy,dhomeier/astropy,aleksandr-bakanov/astropy,AustereCuriosity/astropy,larrybradley/astropy,mhvk/astropy,stargaser/astropy,dhomeier/astropy,pllim/astropy,kelle/astropy,DougBurke/astropy,AustereCuriosity/astropy,d... | astropy/vo/samp/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n... | python | edit | 1 | 3 | mit | 54c4e434276b242de56529e63bb6c5c61d891412 | mvidalgarcia/indico,ThiefMaster/indico,pferreir/indico,indico/indico,mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,indico/indico,ThiefMaster/indico,indico/indico,mic4ael/indico,indico/indico,OmeGak/indico,OmeGak/indico,pferreir/indico,DirkHoffmann/indico,mic4ael/indico,DirkHoffmann/indico,OmeGak/indico,DirkHoff... | indico/modules/events/surveys/tasks.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\"\"\"\n\" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file\n\"\n\" author: Claude Müll... | python | edit | 5 | 2 | mit | 0dd935a383d4b8d066dc091226b61119d245a7f9 | claudemuller/301csv2htaccess | threeOhOne.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom jsonconfigparser import JSONConfigParser\n\n\nclass JSONConfigTestCase(unittest.TestCase):\n def test_init(self):\n JSONConfigParser()\n\n def test_read_string(self):\n string = '[section]\\n' + \... | python | edit | 1 | 1 | bsd-3-clause | 07f86c47c58d6266bd4b42c81521001aca072ff1 | bwhmather/json-config-parser | jsonconfigparser/test/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport falcon\nfrom resources.waifu_message_resource import WaifuMessageResource\n\napi = falcon.API()\napi.add_route('/waifu/messages', WaifuMessageResource())\n\n```\n\nApply this change: Add endpoints for all resources."
},
{
"ro... | python | edit | 1 | 0 | cc0-1.0 | 948c9c6ffb8a34e3acf00b8190bf65504f2bfaf6 | sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom BaseHTTPServer import BaseHTTPRequestHandler\nfrom helpers.etcd import Etcd\nfrom helpers.postgresql import Postgresql\nimport sys, yaml, socket\n\nf = open(sys.argv[1], \"r\")\nconfig = yaml.load(f.read())\nf.... | python | edit | 2 | 7 | mit | e3b1a323921b8331d7fd84c013e80a89a5b21bde | Tapjoy/governor | haproxy_status.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom distutils.core import setup\n\n\nsetup_args = {}\n\nsetup_args.update(dict(\n name='param',\n version='0.05',\n description='Declarative Python programming using Parameters.',\n long_des... | python | edit | 3 | 0 | bsd-3-clause | 554e79ada3f351ecb6287b08d0f7d1c4e5a5b5f6 | ceball/param,ioam/param | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add sane log output formatter"
},
{
"role": "assistant",
"content": "###############################################################################\n#\n# Copyright (c) 2012 Ruslan Spivak\n#\n# Permission is hereby granted, free ... | python | new_file | 1 | 2 | mit | f31424d48c4201e672bd47da4bd8fe205661dc4f | rspivak/logsna | logsna/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argh\n\nfrom .environments import Environment\nfrom .frameworks import Tempest\nfrom .utils import cleanup, Reporter\n\nLOG = Reporter(__name__).setup()\n\n\ndef main(endpoint, username='admin', password='secrete', test_path='api'):\... | python | edit | 1 | 1 | mit | 281a096cea735845bdb74d60abf14f1422f2c624 | rcbops-qa/test_runner | test_runner/executable.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\n\n\nclass AssemblaObject(object):\n \"\"\"\n Proxies getitem calls (eg: `instance['id']`) to a dictionary `instance.data['id']`.\n \"\"\"\n def __init__(self, data):\n self.data = data\n\n ... | python | edit | 1 | 4 | mit | 5c97b9911a2dafde5fd1e4c40cda4e84974eb855 | markfinger/assembla | assembla/lib.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport re\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nfrom cmsplugin_bootstrap_carousel.models import *\nfrom django.utils.translation import ugettext as _\nfrom django.contrib impor... | python | edit | 5 | 2 | bsd-3-clause | c0b9c9712e464f304bee7c63bfd6b197a1c5fb0f | 360youlun/cmsplugin-bootstrap-carousel,360youlun/cmsplugin-bootstrap-carousel | cmsplugin_bootstrap_carousel/cms_plugins.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom data import warehouse\nfrom puzzle.examples.gph import a_basic_puzzle\nfrom puzzle.problems import number_problem\nfrom puzzle.puzzlepedia import prod_config\nfrom spec.mamba import *\n\nwith description('a_basic_puzzle'):\n with befo... | python | edit | 20 | 0 | mit | cee2368dac250ef9655a3df9af3188b8abd095dc | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | spec/puzzle/examples/gph/a_basic_puzzle_spec.py | rejected_lint | Too many lint violations: 20 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom typing import Union, Callable\n\nfrom rx import empty, timer, operators as ops\nfrom rx.core import Observable\n\n\ndef _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observa... | python | edit | 1 | 1 | mit | 86480f2a4948b58f458d686be5fba330abf9743f | ReactiveX/RxPY,ReactiveX/RxPY | rx/core/operators/delaysubscription.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n 'test',\n]\nimport unittest\nimport fnmatch\nimport os\n\ntry:\n from colour_runner.runner import ColourTextTestRunner as TextTestRunner\nexcept ImportError:\n from unittest import TextTestRunner\n\n\ndef test(close=F... | python | edit | 1 | 9 | bsd-3-clause | 76d1d1ba04e9d91559ca017c72c7291752fcc330 | banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics | PVGeo/__tester__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Add username\n\nRevision ID: 30d0a626888\nRevises: 51375067b45\nCreate Date: 2015-10-29 10:32:03.077400\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '30d0a626888'\ndown_revision = '51375067b45'\nbranch_labels = No... | python | edit | 1 | 1 | apache-2.0 | 649bea9ce3ebaf4ba44919097b731ba915703852 | SkygearIO/skygear-server,rickmak/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server | alembic/versions/30d0a626888_add_username.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in ... | python | edit | 5 | 0 | bsd-3-clause | f37f972c3ded0671beed16c9e0c6ee2a5e764f5f | gasman/Willow,gasman/Willow,torchbox/Willow,torchbox/Willow | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\nfrom logging import getLogger\nfrom os import getcwd, unlink\nfrom os.path import join, realpath, isfile\n\nfrom psutil import Process\n\n\nlogger = getLogger(__name__)\n\n\ndef one(f):\n @wraps(f)\n def d... | python | edit | 1 | 3 | mit | 45261d57bdb1ee23c84ea6c5d83550b7e84c26f1 | chriscannon/highlander | highlander/highlander.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\"\"\"Test Mongo Conduction.\"\"\"\n\nimport logging\n\nimport pymongo\nfrom mockupdb import go\nfrom pymongo.errors import OperationFailure\n\nfrom conduction.server import get_mockup, main... | python | edit | 1 | 1 | apache-2.0 | 881222a49c6b3e8792adf5754c61992bd12c7b28 | ajdavis/mongo-conduction | tests/test_conduction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TestSwiftFoundationValueTypes.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Excep... | python | edit | 1 | 0 | apache-2.0 | f1e946f5dde4648428c91bcff59728b615df021b | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/test/lang/swift/foundation_value_types/data/TestSwiftFoundationTypeData.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom numpy import array\n\nimport Orange.classification.naive_bayes as nb\nfrom Orange import preprocess\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.data import Domain\nfrom Orange.data.variable import Discre... | python | edit | 1 | 2 | bsd-2-clause | 550ce00c5d2757287fee2d810543d3f17ad9ccff | cheral/orange3,marinkaz/orange3,qusp/orange3,qPCR4vir/orange3,qusp/orange3,qusp/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,marinkaz/orange3,qPCR4vir/orange3,marinkaz/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,kwikadi/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,kwikadi/orange3,chera... | Orange/tests/sql/test_naive_bayes_sql.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport sys\nfrom ctypeslib import h2xml, xml2py\n\nclass ToolchainTest(unittest.TestCase):\n if sys.platform == \"win32\":\n def test(self):\n h2xml.main([\"h2xml\", \"-q\",\n \"-... | python | edit | 4 | 1 | mit | e0b2ac4b71859708f4b35ae8ef7227b630a6e2d9 | sugarmanz/ctypeslib | ctypeslib/test/test_toolchain.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nfrom taggit import VERSION\n\nf = open('README.txt')\nreadme = f.read()\nf.close()\n\nsetup(\n name='django-taggit',\n version=\".\".join(VERSION),\n description='django-taggit is a re... | python | edit | 1 | 0 | bsd-3-clause | 514614c68ced19e364e484e4dbec044e3fb03e24 | twig/django-taggit,kminkov/django-taggit,orbitvu/django-taggit,cimani/django-taggit,tamarmot/django-taggit,laanlabs/django-taggit,kaedroho/django-taggit,theatlantic/django-taggit,vhf/django-taggit,izquierdo/django-taggit,theatlantic/django-taggit2,doselect/django-taggit,adrian-sgn/django-taggit,nealtodd/django-taggit,d... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom CITests import CITests\n\n# Libs in Application Examples\nappExamples = {\n#\"KundurSMIB\":\"/ApplicationExamples/KundurSMIB/package.mo\",\n#\"TwoAreas\":\"/ApplicationExamples/TwoAreas/package.mo\",\n#\"SevenBus\":\"/Appli... | python | edit | 1 | 0 | bsd-3-clause | 2eb8570d52c15b1061f74fe23c1f361ae8ab6d7c | SmarTS-Lab/OpenIPSL,SmarTS-Lab/OpenIPSL,tinrabuzin/OpenIPSL,OpenIPSL/OpenIPSL | CI/syntaxCheck.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nfrom . import views\n\nurlpatterns = [\n url(r'^', views.IndexView.as_view(), name='tviit_index'),\n]\n\n```\n\nApply this change: Create url-patterns for tvi... | python | edit | 4 | 0 | mit | 90bdcad66a6f29c9e3d731b5b09b0a2ba477ae2f | DeWaster/Tviserrys,DeWaster/Tviserrys | tviit/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Convert file codecs\n\nUsage:\n convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>\n convert_codecs.py (-h | --help)\n\n\"\"\"\n\nimport codecs\nfrom docop... | python | edit | 1 | 3 | apache-2.0 | 6578b6d2dfca38940be278d82e4f8d8248ae3c79 | Honghe/convert_codecs | convert_codecs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Exception hierarchy for chef\n# Copyright (c) 2010 Noah Kantrowitz <<EMAIL>>\n\nclass ChefError(Exception):\n \"\"\"Top-level Chef error.\"\"\"\n\nclass ChefServerError(ChefError):\n \"\"\"An error from a Chef server. May include a ... | python | edit | 1 | 1 | apache-2.0 | cc4b68c7eccf05ca32802022b2abfd31b51bce32 | Scalr/pychef,Scalr/pychef,cread/pychef,dipakvwarade/pychef,dipakvwarade/pychef,cread/pychef,coderanger/pychef,coderanger/pychef,jarosser06/pychef,jarosser06/pychef | chef/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\n\nfrom portal.models import Profile\n\n\nclass TestProfile(TestCase):\n \"\"\"Profile test suite\"\"\"\n\n users = [\"john\", \"jane\"]\n\n UserModel... | python | edit | 1 | 2 | mit | 47a9271a00fae3f55c79323c93feb4dc2e1fd515 | huangsam/chowist,huangsam/chowist,huangsam/chowist | portal/tests/models/test_profile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom sorl.thumbnail.conf import settings\nfrom sorl.thumbnail import default\n\n\nclass Command(BaseCommand):\n help = (\n u'Handles thumbnails and key value store... | python | edit | 2 | 10 | bsd-3-clause | 06d0287a8fef0679b281296e6ed76e0b6c803acb | mariocesar/sorl-thumbnail,perdona/sorl-thumbnail,fdgogogo/sorl-thumbnail,Knotis/sorl-thumbnail,jcupitt/sorl-thumbnail,einvalentin/sorl-thumbnail,fladi/sorl-thumbnail,lampslave/sorl-thumbnail,seedinvest/sorl-thumbnail,guilouro/sorl-thumbnail,TriplePoint-Software/sorl-thumbnail,jazzband/sorl-thumbnail,jcupitt/sorl-thumbn... | sorl/thumbnail/management/commands/thumbnail.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.17.4\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\... | python | edit | 1 | 0 | mit | 2e631e8e3b3fe738d9f41ab46f138769f688d00f | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/config/__init__.py | rejected_duplicate | Near-duplicate of sample 1349 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass HatManager(object):\n\n def __init__(self, sense):\n self.sense = sense\n\n self._pressure = self.sense.get_pressure()\n self._temperature = self.sense.get_temperature()\n self._humidity = self.sense.get... | python | edit | 1 | 1 | mit | f0f66aa917d9ec85cfbe2a0460b2d4b4d5ffe0eb | ylerjen/pir-hat,ylerjen/pir-hat,ylerjen/pir-hat | middleware/hat_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nimport yaml\n\n\ndef main(app, data):\n filepath = os.path.join(app.data_dir, data.get('filename'))\n\n with open(filepath, 'r') as f:\n contents = yaml.load(f)\n\n ret... | python | edit | 1 | 3 | mit | c0de2a081cfe9af7f6b9d39daae557d45f5d69ee | myles/me-api,myles/me-api | middleware/module_yaml.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport os\nimport traceback\n\nfrom .handlers import find_handler\n\n\n_activate_debugger = os.environ.get('DEBUG') == 'yes'\nif _activate_debugger:\n try:\n from trepan.api import debug\n set_trace = deb... | python | edit | 1 | 3 | bsd-2-clause | 99e1377deb066b9bee64b40799caaeaccd0db7d8 | svetlyak40wt/python-cl-conditions | src/conditions/signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom configparser import Error\nfrom requests.exceptions import HTTPError\nfrom twine.commands.upload import main as twine_upload\nfrom twine.utils import ge... | python | edit | 1 | 6 | apache-2.0 | 154d7c17228cf9196ea4ee6b5e13a5268cc69407 | thaJeztah/compose,thaJeztah/compose,vdemeester/compose,vdemeester/compose | script/release/release/pypi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nipype.interfaces import afni\n\nfrom nose.tools import assert_equal\n\n\ndef test_To3d():\n cmd = afni.To3d()\n cmd._compile_command()\n yield assert_equal, cmd.cmdline, 'to3d'\n cmd = afni.To3d(anat=True)\n cmd._compil... | python | edit | 1 | 1 | bsd-3-clause | 6113b60187da1da42b26bee81556aad3efef57c4 | rameshvs/nipype,grlee77/nipype,dmordom/nipype,glatard/nipype,fprados/nipype,rameshvs/nipype,wanderine/nipype,mick-d/nipype_source,dgellis90/nipype,sgiavasis/nipype,arokem/nipype,Leoniela/nipype,pearsonlab/nipype,pearsonlab/nipype,FCP-INDI/nipype,mick-d/nipype,satra/NiPypeold,gerddie/nipype,FredLoney/nipype,dgellis90/ni... | nipype/interfaces/tests/test_afni.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template.loader import render_to_string\n\nfrom core.default_eventpage_content import (\n get_default_eventpage_data,\n get_default_menu,\n)\nfrom core.models import Event\n\n\ndef create_event_from_event_application(event... | python | edit | 5 | 1 | bsd-3-clause | 69559162db6818371a41b7b3e3092d767d198f3f | DjangoGirls/djangogirls,patjouk/djangogirls,DjangoGirls/djangogirls,patjouk/djangogirls,DjangoGirls/djangogirls,patjouk/djangogirls,patjouk/djangogirls | core/create_event.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n\nTIME_REGEX = re.compile(\n r'\\A(\\s*(?P<hours>\\d+)\\s{1}(hours|hrs|hr|h))?((?P<minutes>\\s*\\d+)\\s{1}(minutes|mins|min|m))?\\Z'\n)\n\n\nHTML_SYMBOLS = '\\xa0' # \n\n```\n\nApply this change: Update time_regex cap... | python | edit | 1 | 0 | mit | b6d08abf7bc4aafaeec59944bdcdf8ae4a9352d5 | hhursev/recipe-scraper | recipe_scrapers/consts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport fabric.api\nimport fabric.operations\n\nfrom cloudenvy.envy import Envy\n\n\nclass EnvySCP(object):\n \"\"\"SCP Files to your ENVy\"\"\"\n\n def __init__(self, argparser):\n self._build_subparser(argpar... | python | edit | 1 | 2 | apache-2.0 | 1424ce565ee8b47e6a9a3bc143589c7e7e0c3e53 | cloudenvy/cloudenvy | cloudenvy/commands/envy_scp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n'''\nThe main entry point for salt-api\n'''\nfrom __future__ import absolute_import\n# Import python libs\nimport logging\n\n# Import salt-api libs\nimport salt.loader\nimport salt.utils.process\n\nlogger = logging.getLog... | python | edit | 1 | 4 | apache-2.0 | eaa13f9005a8aaf8c748a98de697b03eee9e675b | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/client/netapi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2013 - Noorul Islam K M\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Lice... | python | edit | 1 | 1 | apache-2.0 | 8d669dc8b09b8d7c8bc9b4c123e2bdd7c3521521 | devdattakulkarni/test-solum,openstack/solum,ed-/solum,openstack/solum,ed-/solum,gilbertpilz/solum,ed-/solum,julienvey/solum,gilbertpilz/solum,stackforge/solum,ed-/solum,stackforge/solum,gilbertpilz/solum,gilbertpilz/solum,devdattakulkarni/test-solum,julienvey/solum | functionaltests/api/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Package blueprint.\"\"\"\nimport os\n\nimport magic\nfrom flask import Blueprint, current_app, make_response, render_template\n\nblueprint = Blueprint('packages', __name__, url_prefix='/packages')\n\n@blueprint.route('')\ndef foo():\n... | python | edit | 3 | 2 | mit | cfdbe06da6e35f2cb166374cf249d51f18e1224e | Dinoshauer/pryvate,Dinoshauer/pryvate | pryvate/blueprints/packages/packages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\nimport sys\nimport subprocess\n\n\nclass BmiIlamb(object):\n _command = 'run_ilamb'\n _args = None\n _env = None\n\n def __init__(self):\n self._time = self.get_start_time()\n\n @property\n d... | python | edit | 3 | 2 | mit | f239fd08bb5536501b05ba6a81c99edffdea6f38 | permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB | pylamb/bmi_ilamb.py | rejected_duplicate | Near-duplicate of sample 382 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef pytest_collection_modifyitems(session, config, items):\n # Ensure that all tests with require a redeploy are run after\n # tests that don't need a redeploy.\n final_list = []\n on_redeploy_tests = []\n for item in items:\... | python | edit | 1 | 3 | apache-2.0 | 63f04662f5ca22443ab6080f559ac898302cf103 | awslabs/chalice | tests/integration/conftest.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.