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\n\"\"\"\nColor mode data structure.\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport attr\nimport logging\nfrom psd_tools2.psd.base import ValueElement\nfrom psd_tools2.utils import (\n read_length_block, write_le... | python | edit | 1 | 1 | mit | 85ca0da68126da149438199a83fddf2befa18eea | psd-tools/psd-tools,kmike/psd-tools,kmike/psd-tools | src/psd_tools2/psd/color_mode_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\n\nfrom homepage.models import Tab\n\nregister = template.Library()\n\n@register.tag(name=\"get_tabs\")\ndef get_tabs(parser, token):\n \n return GetElementNode()\n \nclass GetElementNode(template.Node):... | python | edit | 1 | 1 | mit | 19326b0b96e053c4b4fab402a379a03c39fbe46d | cartwheelweb/packaginator,nanuxbe/djangopackages,miketheman/opencomparison,audreyr/opencomparison,audreyr/opencomparison,cartwheelweb/packaginator,QLGu/djangopackages,pydanny/djangopackages,cartwheelweb/packaginator,benracine/opencomparison,nanuxbe/djangopackages,pydanny/djangopackages,pydanny/djangopackages,QLGu/djang... | apps/homepage/templatetags/homepage_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ast\nimport sys\n\nfrom data.logic import _grammar_transformer\nfrom puzzle.problems import problem\n\n\nclass LogicProblem(problem.Problem):\n @staticmethod\n def score(lines):\n if len(lines) <= 1:\n return 0\n program... | python | edit | 1 | 4 | mit | ffc01b11b0a63b22ddab341e2f0cab0707551409 | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | src/puzzle/problems/logic_problem.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numba.typesystem import *\n\nassert int_.is_int\nassert int_.is_numeric\nassert long_.is_int\nassert long_.is_numeric\nassert not long_.is_long\n\nassert float_.is_float\nassert float_.is_numeric\nassert double.is_float\nassert double.... | python | edit | 20 | 0 | bsd-2-clause | 6577b521ac8fd0f1c9007f819dc0c7ee27ef4955 | gdementen/numba,GaZ3ll3/numba,stuartarchibald/numba,pitrou/numba,jriehl/numba,stefanseefeld/numba,ssarangi/numba,sklam/numba,IntelLabs/numba,gdementen/numba,jriehl/numba,stuartarchibald/numba,GaZ3ll3/numba,GaZ3ll3/numba,seibert/numba,numba/numba,pombredanne/numba,jriehl/numba,pitrou/numba,cpcloud/numba,gmarkall/numba,s... | numba/typesystem/tests/test_type_properties.py | rejected_lint | Too many lint violations: 20 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(name='nikeplus',\n version='0.1',\n description='Export nikeplus data to CSV format',\n author='Luke Lee',\n author_email='<EMAIL>',\n url='http://www.lukelee.me',\n pa... | python | edit | 1 | 0 | mit | 78edc5479212af75a412cf321d321283978a6d79 | durden/nikeplus | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 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\n\n\"\"\" Run the Skia render_pdfs executable. ... | python | edit | 1 | 1 | bsd-3-clause | d6782066e3ed3f00e3c8dcffe2ffd0b9bad18d17 | Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbo... | slave/skia_slave_scripts/render_pdfs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport uuid\nimport base64\nimport os.path\n\nfrom .. import __version__\n\n\ndef gen_cookie_secret():\n return base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)\n\n\ndef bugreport():\n ... | python | edit | 1 | 3 | bsd-3-clause | 4a48be97254f4626eaadf86492d98e0dd640d43d | raphaelmerx/flower,ChinaQuants/flower,pj/flower,Lingling7/flower,tellapart/flower,alexmojaki/flower,ucb-bar/bar-crawl-web,Lingling7/flower,ChinaQuants/flower,jzhou77/flower,Lingling7/flower,lucius-feng/flower,lucius-feng/flower,ucb-bar/bar-crawl-web,allengaller/flower,asmodehn/flower,allengaller/flower,lucius-feng/flow... | flower/utils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.shortcuts import render\n\n\ndef intro(request, template='intro.html'):\n response = render(request, template)\n response['X-Frame-Options'] = 'SAMEORIGIN'\n\n return response\n\n```\n\nApply this change: Use X-Frame-... | python | edit | 1 | 1 | bsd-3-clause | d12907dd681c1d16c623b9dcceed9ff5e85c2ac6 | m8ttyB/pontoon-intro,mathjazz/pontoon-intro,mathjazz/pontoon-intro,Osmose/pontoon-intro,jotes/pontoon-intro,Osmose/pontoon-intro,jotes/pontoon-intro,m8ttyB/pontoon-intro,jotes/pontoon-intro,mathjazz/pontoon-intro,m8ttyB/pontoon-intro,Osmose/pontoon-intro | views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\nimport os\nimport shutil\nimport urllib2\n\n__all__ = ['DATA_HOME', 'download']\n\nDATA_HOME = os.path.expanduser('~/.cache/paddle_data_set')\n\nif not os.path.exists(DATA_HOME):\n os.makedirs(DATA_HOME)\n\n\ndef download... | python | edit | 1 | 3 | apache-2.0 | b93722df95d3907782cdff034df360b79d1fd093 | yu239/Paddle,reyoung/Paddle,livc/Paddle,chengduoZH/Paddle,emailweixu/Paddle,jacquesqiao/Paddle,Canpio/Paddle,putcn/Paddle,yu239/Paddle,putcn/Paddle,gangliao/Paddle,lispc/Paddle,gangliao/Paddle,chengduoZH/Paddle,gangliao/Paddle,PaddlePaddle/Paddle,pengli09/Paddle,lcy-seso/Paddle,gangliao/Paddle,pengli09/Paddle,cxysteven... | python/paddle/v2/dataset/common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\r\nAMBIENTE = u'linux'\r\nPROD = False\r\nDEBUG = False\r\nLOG = False\r\nLOGPATH = './Application.log'\r\n\r\nEMAIL_HOST = 'smtp.gmail.com'\r\nEMAIL_LOGIN = '<EMAIL>'\r\nEMAIL_PASSWORD = 'senha'\r\nEMAIL_PORT = 587\r\n\r\nDATABASE_URI = '... | python | edit | 1 | 0 | apache-2.0 | 3698f0a51056f32c7595c1baca578d25764cc768 | dedeco/cnddh-denuncias,dedeco/cnddh-denuncias,dedeco/cnddh-denuncias | cnddh/config_prd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='urlwait',\n version='1.0',\n description='A CLI utility for blocking until a service is listening',\n long_description=open('README.rst').read(),\n author='Paul McLanahan',\n ... | python | edit | 1 | 0 | mit | ad29d682af36f3f27144fefd1cf72d869106ac46 | pmclanahan/urlwait,pmclanahan/urlwait | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nimport pytest\n\n\n# To be overridden by test parametrization\n@pytest.fixture\ndef config_overrides():\n return {}\n\n\n@pyt... | python | edit | 1 | 1 | bsd-3-clause | ef0d0fa26bfd22c281c54bc348877afd0a7ee9d7 | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | tests/integration/blueprints/metrics/test_metrics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport mongomock\n\nfrom mongo_thingy import Model\n\n\ndef test_collection_alias():\n col = mongomock.MongoClient().db.collection\n\n class Foo(Model):\n _collection = col\n\n assert Foo.collection == col\n\n\ndef test_get_... | python | edit | 1 | 1 | mit | aedc449ec40a2c0407a38608e8e800b09c6c25b0 | numberly/mongo-thingy | tests/model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom .config import RawConfig, RunConfig\nfrom .exc import RunCommandsError\nfrom .run import run, partition_argv, read_run_args\nfrom .util import printer\n\n\ndef main(argv=None):\n try:\n all_argv, run_argv, comma... | python | edit | 1 | 4 | mit | 921bdcc5d6f6ac4be7dfd0015e5b5fd6d06e6486 | wylee/runcommands,wylee/runcommands | runcommands/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef to_ini(databases = []):\n \"\"\"\n Custom ansible filter to print out pgbouncer database connection settings\n from a list of variable objects.\n \"\"\"\n s = ''\n for db in databases:\n for alias, config in db.... | python | edit | 1 | 4 | mit | 6f918da14582b31586c6fd9ef60259be9b05b314 | jradtilbrook/ansible-role-pgbouncer | filter_plugins/to_ini.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nfrom oeqa.oetest import oeRuntimeTest\nfrom oeqa.utils.decorators import tag\n\n@tag(TestType=\"FVT\", FeatureID=\"IOTOS-453\")\nclass CommBluetoothTest(oeRuntimeTest):\n \"\"\"\n @class CommBluetoothTest\n \"\"\"\n ... | python | edit | 1 | 1 | mit | 841289e7092a5e4bf485ef525f358aa3a58f7fb9 | YinThong/intel-iot-refkit,mythi/intel-iot-refkit,mythi/intel-iot-refkit,klihub/intel-iot-refkit,jairglez/intel-iot-refkit,klihub/intel-iot-refkit,intel/intel-iot-refkit,YinThong/intel-iot-refkit,jairglez/intel-iot-refkit,YinThong/intel-iot-refkit,YinThong/intel-iot-refkit,mythi/intel-iot-refkit,intel/intel-iot-refkit,k... | meta-iotqa/lib/oeqa/runtime/sanity/comm_btcheck.py | accepted | null | 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\nfrom gpu_test_expectations import GpuTestExpectations\n\n# See the GpuTes... | python | edit | 1 | 1 | bsd-3-clause | 62317424b7e318ac9c59aecc768a4487788bd179 | lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBacke... | content/test/gpu/gpu_tests/pixel_expectations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Summary\n\"\"\"\nfrom weld.weldobject import *\n\n\ndef to_weld_type(weld_type, dim):\n \"\"\"Summary\n\n Args:\n weld_type (TYPE): Description\n dim (TYPE): Description\n\n Returns:\n TYPE: Description\n... | python | edit | 5 | 2 | bsd-3-clause | bf1bafbbebeab86a213e4c4bed0be6f1b18404c6 | rahulpalamuttam/weld,rahulpalamuttam/weld,weld-project/weld,sppalkia/weld,weld-project/weld,weld-project/weld,rahulpalamuttam/weld,weld-project/weld,sppalkia/weld,sppalkia/weld,sppalkia/weld,sppalkia/weld,weld-project/weld,rahulpalamuttam/weld,rahulpalamuttam/weld | python/grizzly/grizzly/lazy_op.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom celery import Celery\n\nfrom cref.app.terminal import run_cref\n\napp = Celery(\n 'tasks',\n backend='db+sqlite:///results.sqlite',\n broker='amqp://guest@localhost//'\n)\n\n\n@app.task\ndef predict_structure(sequence, params=... | python | edit | 1 | 1 | mit | a0fab69d12d64d4e5371fcb26a4ec70365a76fa6 | mchelem/cref2,mchelem/cref2,mchelem/cref2 | cref/app/web/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(name='pyresttest',\n version='1.0b',\n description='Python RESTful API Testing & Microbenchmarking Tool',\n long_description='Python RESTful API Testing & Microbenchmarking Tool',\n main... | python | edit | 1 | 0 | apache-2.0 | f958d337c171dea92237d2f7ef84618756db6f46 | svanoort/pyresttest,TimYi/pyresttest,netjunki/pyresttest,janusnic/pyresttest,MorrisJobke/pyresttest,sunyanhui/pyresttest,sunyanhui/pyresttest,alazaro/pyresttest,wirewit/pyresttest,alazaro/pyresttest,suvarnaraju/pyresttest,svanoort/pyresttest,MorrisJobke/pyresttest,holdenweb/pyresttest,TimYi/pyresttest,holdenweb/pyrestt... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom model_utils import Choices\n\nclass Report(models.Model):\n \"\"\"Store report information\"\"\"\n REPORT_TYPES = Choices(\n ('A', 'Shop/Market'),\n ... | python | edit | 1 | 1 | apache-2.0 | f71676ab56e3f1b5a8fb1283cf08f5a170ee5bf2 | gmuthetatau/zoohackathon2016,gmuthetatau/zoohackathon2016,gmuthetatau/zoohackathon2016 | web/zoohackathon2016/report/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport os.path\nimport string\n\ndef path2varname(path):\n path = os.path.basename(path)\n s = ''\n for c in path:\n if c in string.ascii_letters or c in string.digits:\n s += c\n ... | python | edit | 1 | 9 | isc | 95e1f9517d79fb48bb9601e2d94419c6e2c984ca | S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc | tools/data2c.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.utils.timezone import now\nfrom info_internet_connection.models import Internet\nimport datetime\nimport huawei_b593_status\nimport json\nimport redis\n\n\n#{'WI... | python | edit | null | null | bsd-3-clause | 9a543a84bce123329aec985739a44d0e230838d8 | ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display | homedisplay/info_internet_connection/management/commands/fetch_internet_information.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django_countries import CountryField\n\n\nclass Address(models.Model):\n \"\"\"\n A postal address.\n \"\"\"\n address_line1 = models.CharField(max_length=100, blank=True)\n address_line2 = ... | python | edit | 1 | 1 | bsd-3-clause | 5ca84f89d08ab4b31c47753ce74129ce06f8ed3a | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | apps/bluebottle_utils/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Based on modeprediction.py\nimport emission.core.wrapper.wrapperbase as ecwb\n\nclass Labelprediction(ecwb.WrapperBase):\n props = {\"trip_id\": ecwb.WrapperBase.Access.WORM, # the trip that this is part of\n \"prediction... | python | edit | 1 | 1 | bsd-3-clause | 0f1ed52e7525ea5f41d63642bca1eaeb9d5af8ba | shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server | emission/core/wrapper/labelprediction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe FVCOM Python toolbox (PyFVCOM)\n\n\"\"\"\n\n__version__ = '1.4.1'\n__author__ = 'Pierre Cazenave'\n__credits__ = ['Pierre Cazenave']\n__license__ = 'MIT'\n__maintainer__ = 'Pierre Cazenave'\n__email__ = '<EMAIL>'\n\nimport inspe... | python | edit | 16 | 0 | mit | e2bac19e08197dc33756d7b7cf1f88e4ba808ae1 | pwcazenave/PyFVCOM | PyFVCOM/__init__.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nimport json\n\nfrom draftjs_exporter.html import HTML\n\nfrom wagtail.wagtailcore.rich_text import RichText\nfrom wagtaildraftail.settings import get_exporter_config\n\n\nclass Dra... | python | edit | 1 | 2 | mit | 948b9987afa95d7a69bd61f3d8f9fea822323b01 | gasman/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,springload/wagtaildraftail,springload/wagtaildraftail | wagtaildraftail/draft_text.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass IssueHandler:\n\tdef __init__(self, repos):\n\t\tself.repos = repos\n\n\tdef handle(self, channel, prefix, issue):\n\t\trepo = self.find_repo(prefix, channel)\n\t\tif repo is not None:\n\t\t\treturn \"https://github.com/\" + repo + \"... | python | edit | 3 | 6 | mit | 68c0f77155f0cc77634a8d73b2a1ab6cbd66bac1 | azeier/hearthbot | handlers/issue_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nInstana sensor and tracer. It consists of two modules that can be used as entry points:\n\n- sensor: activates the meter to collect and transmit all kind of built-in metrics\n- tracer: OpenTracing tracer implementation. It implicitl... | python | edit | 3 | 0 | mit | 3916efe4a017fe9e0fb1c5fe09b99f374d7a4060 | instana/python-sensor,instana/python-sensor | instana/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nfrom collections import OrderedDict\nimport json\nimport logger\nimport logging\n\nfrom session import Session\nfrom simulator import Simulator\nfrom cache import Cache\nfrom client_factory import ClientFactory\nfrom keeper... | python | edit | 1 | 4 | apache-2.0 | cef249edef4100b8a3c009fa05febbc66c3fe5df | seecloud/spamostack | spamostack/spamostack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.shortcuts import render\nfrom django.utils import timezone\n# API v1\nfrom rest_framework import mixins, viewsets\nfrom rest_framework.permissions import AllowAny\n\nfrom apps.careeropportunity.models ... | python | edit | 1 | 1 | mit | a9cebe11642b41a8c0b277e09bf273b52dbb63f9 | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | apps/careeropportunity/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ntrafficserver_exporter\n----------------------\n\nAn Apache Traffic Server metrics exporter for Prometheus. Uses the\nstats_over_http plugin to translate JSON data into Prometheus format.\n\n\"\"\"\n\nfrom setuptools import setup\n... | python | edit | 1 | 0 | apache-2.0 | 5b24a22fa148f4ae4e8d4403824ad7881b27e644 | gdvalle/trafficserver_exporter | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test for the tutorials.utils package\"\"\"\n\nimport datetime\nimport unittest\n\nfrom mock import patch\n\nfrom django.template import Template\n\nfrom pycon.bulkemail.models import BulkEmail\n\nfrom ..utils import queue_email_messag... | python | edit | 1 | 1 | bsd-3-clause | a6f8e42d3e297776a19c8e76dd7f1cfded32a266 | PyCon/pycon,PyCon/pycon,PyCon/pycon,njl/pycon,PyCon/pycon,njl/pycon,njl/pycon,njl/pycon | pycon/tutorials/tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport yaml\nimport subprocess\n\n\nclass SDBUSPlus(object):\n def __init__(self, path):\n self.path = path\n\n def __call__(self, *a, **kw):\n args = [\n os.pat... | python | edit | 3 | 0 | apache-2.0 | af5e90cb544e2e37819302f5750084fc17f7ee12 | openbmc/phosphor-inventory-manager,openbmc/phosphor-inventory-manager | make_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.\n# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,\n# or an error message on failure\n#\nfro... | python | edit | 2 | 4 | mit | b745e05cd4f2ca2a6683f2e057d52dee454d5b23 | MobileXLabs/hamper | lib/authenticator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Bump to v0.9.3 (MANIFEST.in fix)"
},
{
"role": "assistant",
"content": "VERSION_TUPLE = (0, 9, 3)\n__version__ = \".\".join(map(str, VERSION_TUPLE))\n"
}
] | python | new_file | 1 | 0 | mit | 7c62526c5cdfdf80439a9bd034e2bf49b2a421b8 | jsvine/markovify | markovify/__version__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nwith open('README.rst') as rdm:\n README = rdm.read()\n\nsetup(\n name='stagpy',\n use_scm_version=True,\n\n description='Tool for StagYY output files processing',\n ... | python | edit | 1 | 0 | apache-2.0 | b0a2ef5f0acdcd987045737d1b7cc953b09fae28 | StagPython/StagPy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\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 License at\n#\n# http://www.apache.org/licenses/LICE... | python | edit | 1 | 1 | apache-2.0 | cb7aeb60fcff7f8fa6ac9e12282bf7dcd71617d8 | openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat | heat/tests/clients/test_ceilometer_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDefinition of the plugin.\n\"\"\"\nfrom django.utils.translation import ugettext_lazy as _\nfrom fluent_contents.extensions import ContentPlugin, plugin_pool\n\nfrom . import models\n\n\n@plugin_pool.register\nclass ImagePlugin(Cont... | python | edit | 1 | 1 | mit | 9131a9f2349261900f056c1f920307b0fce176ad | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | icekit/plugins/image/content_plugins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport pytest\nimport salt.modules.win_servermanager as win_servermanager\nfrom tests.support.mock import MagicMock, patch\n\n\n@pytest.fixture\ndef configure_loader_modules():\n return {win_servermanager: {}}\n\n\ndef test_... | python | edit | 3 | 1 | apache-2.0 | 199f9ace071b95822a9a0fb53c9becfb0ab4abd2 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/pytests/unit/modules/test_win_servermanager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom django.utils.translation import ugettext as _\nfrom django.db import models\n\n\nclass Form(models.Model):\n title = models.CharField(_(\"Title\"), max_length=255)\n\n def __unicode__... | python | edit | 1 | 1 | apache-2.0 | fb9591c4a2801bfe5f5380c3e33aa44a25db3591 | cschwede/django-customforms | customforms/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nwith open(\"README.rst\") as readme_file:\n readme = readme_file.read()\n\n\nsetup(\n name='pytest-describe',\n version='1.0.0',\n description='Describe-style plugin for pytest',\n long_descr... | python | edit | 1 | 0 | mit | 00e2abb375c25bd8507c575e9b5b2567aa029061 | ropez/pytest-describe | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport pydoc\nimport gtk\n\nfrom data_format import insert_with_tag, is_data_object\n\nBOLD_RE = re.compile(\"(?:(.)\\b(.))+\")\nSTRIP_BOLD_RE = re.compile(\"(.)\\b(.)\")\n\ndef insert_docs(buf, iter, obj, bold_tag):\n \"\"\"I... | python | edit | 3 | 5 | bsd-2-clause | 3f2be07e5df6bcf8bcfa9fce143291d476e93d9b | rschroll/reinteract,johnrizzo1/reinteract,johnrizzo1/reinteract,alexey4petrov/reinteract,johnrizzo1/reinteract,alexey4petrov/reinteract,rschroll/reinteract,rschroll/reinteract,jbaayen/reinteract,jbaayen/reinteract,alexey4petrov/reinteract,jbaayen/reinteract | lib/reinteract/doc_format.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"vumi_twilio_api\",\n version=\"0.0.1a\",\n url=\"https://github.com/praekelt/vumi-twilio-api\",\n license=\"BSD\",\n description=\"Provides a REST API to Vumi tha... | python | edit | 1 | 0 | bsd-3-clause | 6aa81b7f97b39e32f6c5148a26366cf72c46d1e9 | praekelt/vumi-twilio-api | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 The Swarming Authors. All rights reserved.\n# Use of this source code is governed by the Apache v2.0 license that can be\n# found in the LICENSE file.\n\n\"\"\"Utilities.\"\"\"\n\nimport logging\nimport os\nimport signal\ni... | python | edit | 1 | 4 | apache-2.0 | f05cd9d2249ea5ef616accf931418f413bce00ba | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | appengine/swarming/swarming_bot/bot_code/common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup,find_packages\n\nMETADATA = dict(\n name='django-allauth',\n version='0.0.1',\n author='Raymond Penners',\n author_email='<EMAIL>',\n description='Integrated set of Django a... | python | edit | 1 | 0 | mit | e848239bedb6dca579e24a23bc04a7ce4f2d1a80 | pztrick/django-allauth,jwhitlock/django-allauth,grue/django-allauth,hanasoo/django-allauth,sih4sing5hong5/django-allauth,tigeraniya/django-allauth,kingofsystem/django-allauth,JoshLabs/django-allauth,rsalmaso/django-allauth,MickaelBergem/django-allauth,wli/django-allauth,knowsis/django-allauth,rawjam/django-allauth,penn... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\n\ndef run():\n base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n ## FIXME: this is kind of crude; if we could create a fake pip\n ## module, then exec into it and update pip.__path__ proper... | python | edit | 1 | 1 | mit | 847a66ed8eb19206ecc77904dd5db547284b905f | mindw/pip,pjdelport/pip,patricklaw/pip,alquerci/pip,esc/pip,harrisonfeng/pip,haridsv/pip,prasaianooz/pip,habnabit/pip,ncoghlan/pip,blarghmatey/pip,h4ck3rm1k3/pip,msabramo/pip,Gabriel439/pip,alex/pip,xavfernandez/pip,zvezdan/pip,haridsv/pip,Ivoz/pip,cjerdonek/pip,yati-sagade/pip,harrisonfeng/pip,RonnyPfannschmidt/pip,al... | pip/runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('icekit_press_releases', '0008_auto_20161128_1049'),\... | python | edit | 1 | 0 | mit | 1da520787717117b0413715f9a6df834f2d9e7e1 | ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-press-releases | press_releases/migrations/0009_auto_20170519_1308.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distribute_setup import use_setuptools\nuse_setuptools()\n\nfrom setuptools import setup\n\nsetup(\n name = \"open511\",\n version = \"0.1\",\n url='',\n license = \"\",\n packages = [\n 'open511',\n ],\n in... | python | edit | 1 | 0 | mit | dc460d02b489a5cbca34f5525fa9f0ac0a67cb61 | Open511/open511-server,Open511/open511-server,Open511/open511-server | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\n\nclass DataDrivenTestCase(unittest.TestCase):\n cases = []\n\n @classmethod\n def generateCases(cls):\n return cls.cases\n\n @classmethod\n def loadTests(cls):\n tests = []\n for case ... | python | edit | 1 | 4 | apache-2.0 | 5f2ab0dcaec5a7826ff0652e7c052971083a8398 | moreati/python3-openid,isagalaev/sm-openid,moreati/python3-openid,moreati/python3-openid,necaris/python3-openid,misli/python3-openid,necaris/python3-openid,misli/python3-openid,misli/python3-openid | openid/test/datadriven.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# Copyright 2012 Zhang ZY<http://idupx.blogspot.com/> \n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the Lic... | python | edit | 3 | 1 | apache-2.0 | 82bd501f89d3a228c3de9a2f355266b374c35a54 | bufferx/twork,bufferx/twork | twork/assembly.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\n\nfrom byceps.services.user_avatar import service as user_avatar_service\nfrom ... | python | edit | 1 | 1 | bsd-3-clause | 0ceedd5b22a42634889b572018db1153e1ef2855 | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | tests/integration/services/user_avatar/test_update_avatar_image.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_wtf import FlaskForm\nfrom wtforms import StringField, PasswordField\nfrom wtforms.validators import Required, Length, Email\n\n\nclass SignupForm(FlaskForm):\n \"\"\"Render and validate the signup form\"\"\"\n email = Stri... | python | edit | 1 | 0 | mit | d9938a50429db16ce60d905bca9844073fe2b0fa | borenho/flask-bucketlist,borenho/flask-bucketlist | this_app/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\ntry:\n from setuptools import setup, Extension\nexcept ImportError:\n # Use distutils.core as a fallback.\n # We won't be able to build the Wheel file on Windows.\n from distutils.core import setup, Extension\n\nexten... | python | edit | 1 | 0 | apache-2.0 | 036bbfb768de845b3495b99d212fffbf98ba5571 | jashandeep-sohi/asyncio,gsb-eng/asyncio,gsb-eng/asyncio,ajdavis/asyncio,ajdavis/asyncio,fallen/asyncio,1st1/asyncio,Martiusweb/asyncio,Martiusweb/asyncio,fallen/asyncio,jashandeep-sohi/asyncio,manipopopo/asyncio,jashandeep-sohi/asyncio,gvanrossum/asyncio,ajdavis/asyncio,haypo/trollius,haypo/trollius,Martiusweb/asyncio,... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"mmg rates now set to 1.65 pence per sms\n\nRevision ID: 0040_adjust_mmg_provider_rate\nRevises: 0039_fix_notifications\nCreate Date: 2016-07-06 15:19:23.124212\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '0040_ad... | python | edit | 1 | 1 | mit | 638ea1b12b71f74b357d60b09f1284625db73b2d | alphagov/notifications-api,alphagov/notifications-api | migrations/versions/0040_adjust_mmg_provider_rate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport numpy as np\n\nclass CalculationMethodsTestCase(unittest.TestCase):\n def setUp(self):\n self.dem = DEMGrid()\n\n def test_calculate_slope(self):\n sx, sy = self.dem._calculate_slope()\n\n def ... | python | edit | null | null | mit | 8852955632b0ef0250ebbe21b5bdefdecdf30e8a | stgl/scarplet,rmsare/scarplet | tests/test_dem.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='whack',\n version='0.3.0',\n description='Utility fo... | python | edit | 1 | 1 | bsd-2-clause | a5baa5f333625244c1e0935745dadedb7df444c3 | mwilliamson/whack | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Message broker that sends to Unix domain sockets.\"\"\"\n\nimport os\nimport socket\nimport time\n\n\nclass MessageProducer(object):\n \"\"\"Message broker that sends to Unix domain sockets.\"\"\"\n\n def __init__(self, message_... | python | edit | 3 | 2 | mit | 6b2ae24a3989728dcf5015fbb7768ba1b4eed723 | bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc | messaging/message_producer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-admin-extend',\n version='0.0.1',\n description=('Provides functionality for extending'\n 'ModelAdmin classes that have a... | python | edit | null | null | mit | c08460faaccf75acb43f8bab6e3248666ff811c6 | kux/django-admin-extend | setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\nfrom zope.interface import Interface\n\nfrom skosprovider.registry import Registry\n\n\nclass ISkosRegistry(Interface):\n pass\n\n\ndef _build_skos_registry(registry):\n skos_registry = registry.queryUtility(... | python | edit | 1 | 2 | mit | ad7d331868706c97caa0bf0abff88d6ab5537d8d | koenedaele/pyramid_skosprovider | pyramid_skosprovider/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pkg_resources\n\nfrom flask_debugtoolbar.panels import DebugPanel\n\n_ = lambda x: x\n\nflask_version = pkg_resources.get_distribution('Flask').version\n\nclass VersionDebugPanel(DebugPanel):\n \"\"\"\n Panel that displays the ... | python | edit | 1 | 1 | bsd-3-clause | 58b8b63a8a8e9d1b61d8fc1a0f84f8b2a697efc3 | lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar,lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar | flask_debugtoolbar/panels/versions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='lightstep',\n version='3.0.11',\n description='LightStep Python OpenTracing Implementation',\n long_description='',\n author='LightStep',\n license='',\n ins... | python | edit | 1 | 0 | mit | add426252ad864860f1188b446d05ad6bcf11df2 | lightstephq/lightstep-tracer-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Specific support for getpass.\"\"\"\nimport os\nimport getpass\n\nfrom keyring.core import get_password as original_get_password\n\ndef get_password(prompt='Password: ', stream=None,\n service_name='Python',\n ... | python | edit | 3 | 2 | mit | ec235e290b4428dec2db03a19d678eba52f02fb5 | jaraco/keyring | keyring/getpassbackend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\"\"\"Test program for the fcntl C module.\n Roger E. Masse\n\"\"\"\nimport struct\nimport fcntl\nimport FCNTL\nimport os\nfrom test_support import verbose\n\nfilename = '/tmp/delete-me'\n\n# the example from the l... | python | edit | 8 | 0 | mit | 3ea1c6b718e19d99d123feb734ca5f1a44174bf9 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_fcntl.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2021 DeepMind Technologies Limited\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | python | edit | 1 | 0 | apache-2.0 | 270afd4d11ebc3888873cd6ffe89b988593c3e41 | deepmind/xmanager,deepmind/xmanager | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE... | python | edit | 1 | 0 | apache-2.0 | 3443c7164e490e0607fff599c497a4fc054f3c48 | citrix-openstack-build/oslo.cache,openstack/oslo.cache,openstack/oslo.cache | oslo_cache/_i18n.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on May 3, 2016\n\n@author: Martin Koerner <<EMAIL>>\n'''\n\n\nclass CountGeneration(object):\n def generate_counts(self,collected_features_array,feature_name):\n feature_counts = {}\n for instance in collected_... | python | edit | 1 | 4 | mit | d93014618636ba23ebfd99c466072e8b4c265a42 | mkrnr/wikiwhere | wikiwhere/plot_data_generation/count_generation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nversion_tuple = __import__('pymysql').VERSION\n\nif version_tuple[3] is not None:\n version = \"%d.%d.%d_%s\" % version_tuple\nelse:\n version = \"%d.%d.%d\" % vers... | python | edit | 1 | 0 | mit | 7044fa0005f5f056ee5d6bc4e421fb81454317f6 | pymysql/pymysql,PyMySQL/PyMySQL,MartinThoma/PyMySQL,methane/PyMySQL,wraziens/PyMySQL,wraziens/PyMySQL | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport i18n\nfrom i18n.models import TranslatableModel\n\n\nclass Document(TranslatableModel):\n\n charfield = i18n.LocalizedCharField(max_length=50)\n textfield = i18n.LocalizedTextField(max_length=512)\n filefield = i18n.Localize... | python | edit | 1 | 1 | bsd-3-clause | a0e8c92a9d12846c8cfe6819ea26d1e08dd4098a | jonasundderwolf/django-localizedfields,jonasundderwolf/django-localizedfields | example/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom ..test_backend import BackendBasicTests\nfrom ..py30compat import unittest\nfrom keyring.backends import OS_X\n\ndef is_osx_keychain_supported():\n return sys.platform in ('mac','darwin')\n\n@unittest.skipUnless(is_osx... | python | edit | 1 | 1 | mit | 1d55fe7b1f4f3d70da6867ef7465ac44f8d2da38 | jaraco/keyring | keyring/tests/backends/test_OS_X.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n__version__ = \"trunk\"\n\ndef run (runnable, logging = True):\n\tfrom twisted.internet import reactor\n\n\tif reactor.running:\n\t\treturn runnable.run()\n\n\telse:\n\t\tdef _complete (result):\n\t\t\treactor.stop()\n\n\t\tdef _run ():\n... | python | edit | 2 | 3 | mit | 54c856e987bf570c7bcb8c449726a5d2895c0241 | richardingham/octopus,richardingham/octopus,richardingham/octopus,richardingham/octopus | octopus/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n\"\"\"Setup information of demandlib.\n\"\"\"\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\n\nsetup(name=... | python | edit | 1 | 1 | mit | 9bebb444525f57558114623c2d2b69013b26a703 | oemof/demandlib | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nimport factory\n\n\nclass UserFactory(factory.django.DjangoModelFactory):\n class Meta:\n model = 'imagerprofile.ImagerProfile'\n django_get_or_create = ('username',)\n\n username = 'Joh... | python | edit | 3 | 0 | mit | e632fa3e12d3627abaf26f41a9f0483aaea24adf | nbeck90/django-imager,nbeck90/django-imager | imager/ImagerProfile/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom urllib.parse import urlencode, quote\n\nfrom autobit import Client\n\n\ndef add_rarbg_feed(client, name, directory, filter_kwargs):\n url = 'http://localhost:5555/{}?{}'.format(\n quote(name),\n urlencode(fi... | python | edit | 1 | 1 | mit | 6fd7f3cb01f621d2ea79e15188f8000c7b6fa361 | Mause/autobit | tools/add_feed.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\n\n\ndev_requires = [\n 'Sphinx==1.2.2',\n]\n\ninstall_requires = [\n 'nodeconductor>=0.95.0',\n]\n\n\nsetup(\n name='oracle-paas',\n version='0.1.0',\n aut... | python | edit | 1 | 0 | mit | 8c7b048ff02439573a0ad399e5e11ea6f9bfd3a0 | opennode/nodeconductor-paas-oracle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sympy.core.compatibility import default_sort_key, as_int, ordered\nfrom sympy.core.singleton import S\nfrom sympy.utilities.pytest import raises\n\nfrom sympy.abc import x\n\n\ndef test_default_sort_key():\n func = lambda x: x\n ... | python | edit | 3 | 1 | bsd-3-clause | 2d698b1df6da2d5a0b3697891744d3c05e99cb95 | Gadal/sympy,jerli/sympy,souravsingh/sympy,Curious72/sympy,wanglongqi/sympy,chaffra/sympy,atsao72/sympy,sahilshekhawat/sympy,moble/sympy,skidzo/sympy,madan96/sympy,atreyv/sympy,lindsayad/sympy,skidzo/sympy,asm666/sympy,beni55/sympy,asm666/sympy,oliverlee/sympy,saurabhjn76/sympy,grevutiu-gabriel/sympy,drufat/sympy,postva... | sympy/core/tests/test_compatibility.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nimport chagallpy\n\nsetup(\n name='chagallpy',\n version=chagallpy.__version__,\n packages=find_packages(),\n license='MIT',\n description='CHArming GALLEry ... | python | edit | 1 | 0 | mit | 8be5530e1fca59aff42b404b64324b68235bfd87 | janpipek/chagallpy,janpipek/chagallpy,janpipek/chagallpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nimport os\nimport yaml\nfrom panoptes_client import Panoptes\n\n@click.group()\n@click.option(\n '--endpoint', type=str\n)\n@click.pass_context\ndef cli(ctx, endpoint):\n ctx.config_dir = os.path.expanduser('~/.panoptes/... | python | edit | 6 | 3 | apache-2.0 | c3ff26ad884592d297e1aec67bce468e6669fc96 | zooniverse/panoptes-cli | panoptes_cli/scripts/panoptes.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom pypandoc import convert\nfrom setuptools import setup\n\nsetup(\n name='mws',\n version='0.7',\n maintainer=\"James Hiew\",\n maintainer_email=\"<EMAIL>\",\n url=\"http://github.com/jameshiew/mws... | python | edit | 1 | 0 | unlicense | 1dd3333a433bac0ee2a155fd33987fa542e968a4 | Bobspadger/python-amazon-mws,GriceTurrble/python-amazon-mws,bpipat/mws,jameshiew/mws | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom go.vumitools.conversation.definition import (\n ConversationDefinitionBase, ConversationAction)\nfrom go.apps.surveys.tasks import export_vxpolls_data\n\n\nclass SendSurveyAction(ConversationAction):\n action_name = 'send_survey'... | python | edit | 1 | 2 | bsd-3-clause | 76756a31e15cb5a9b756030c3bd90d06c898b524 | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/apps/surveys/definition.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 | 89508d6ea3e89ce87f327a88571c892d4bfcbec5 | consbio/gis-metadata-parser | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Set up basic structure of code"
},
{
"role": "assistant",
"content": "def heap_sort(arr):\n\t\"\"\" Heapsort\n\t\tComplexity: O(n log(n))\n\t\"\"\"\n\tpass\n\ndef heapify(arr):\n\tpass\n\narray = [1,5,65,23,57,1232,-1,-5,-2,242,1... | python | new_file | 1 | 1 | mit | 7d9115aaa429f0a6453c8fcc75c77abc2bdaec93 | keon/algorithms,amaozhao/algorithms | sort/heap_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport vx\n\nimport math\nimport os\nimport sys\n\n_tick_functions = []\ndef _register_tick_function(f, front=False):\n if front:\n _tick_functions.insert(0, f)\n else:\n _tick_functions.append(f)\ndef _tick():\n for ... | python | edit | 8 | 3 | mit | bfd166e9679e6fa06e694fd5e587fcf10186d79b | philipdexter/vx,philipdexter/vx | vx_intro.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Check relative REDIRECTIONS\"\"\"\n\nimport io\nimport os\n\nimport pytest\n\nimport nikola.plugins.command.init\nfrom nikola import __main__\n\nfrom .helper import append_config, cd\nfrom .test_demo_build import prepare_demo_site\nfr... | python | edit | 1 | 1 | mit | a7ccf4fac47762668214916b1c5c05d78c563bf5 | getnikola/nikola,okin/nikola,okin/nikola,getnikola/nikola,okin/nikola,okin/nikola,getnikola/nikola,getnikola/nikola | tests/integration/test_redirection_relative.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.db.models import fields\nfrom django.utils import timezone\n\n\nclass Transaction(models.Model):\n EXPENSE = 'exp'\n INCOME = 'inc'\n CATEGORY_C... | python | edit | 1 | 2 | mit | c5a7feb3000bb3e234a3b87e8b20262eb9b94dfe | trimailov/finance,trimailov/finance,trimailov/finance | books/models.py | rejected_duplicate | Near-duplicate of sample 935 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\n\nfrom setuptools import (\n find_packages,\n setup,\n)\n\nversion_re = re.compile(r\"__version__\\s*=\\s*['\\\"](.*?)['\\\"]\")\n\n\ndef get_version():\n base = os.path.abspath(os.path.dirname(__file__))\n ... | python | edit | 1 | 3 | mit | 46f080487790cdbc430adc8b3b4f0ea7a1e4cdb6 | eventbrite/curator | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport os\nimport glob\nimport pyingest.parsers.aps as aps\nimport pyingest.parsers.arxiv as arxiv\nimport pyingest.serializers.classic\nimport traceback\nimport json\nimport xmltodict\nfrom datetime i... | python | edit | 8 | 0 | mit | c143bc14be8d486d313056c0d1313e03ac438284 | adsabs/adsabs-pyingest,adsabs/adsabs-pyingest,adsabs/adsabs-pyingest | examples/ex_aps_parser.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*- \nfrom stations.models import *\nfrom django.test import TestCase\nfrom datetime import datetime\nimport pytz\n\nclass TestProducts(TestCase):\n\tfixtures = [ 'initial_data.yaml', '*']\n\t\n\tdef setUp(self):\n\t\tse... | python | edit | 6 | 1 | mit | 44f1e6ec95305bd7b4d69bbcdfb386f5ca958bdc | gersolar/solar_radiation_model,ahMarrone/solar_radiation_model,scottlittle/solar_radiation_model | imagedownloader/stations/tests/units/test_devices.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport serial\nimport struct\nfrom siphashc import siphash\n\ndef _hash(key: str, sender: int, receiver: int, msg_type: int, data: bytes):\n packed_data = struct.pack(\">h>hBs\", sender, receiver, msg_type, data)\n return struct.pack(... | python | edit | 1 | 1 | bsd-3-clause | d6ff777c7fb3f645c021da1319bb5d78d13aa9db | janLo/automation_mesh,janLo/automation_mesh,janLo/automation_mesh | meshnet/interface.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ngargoyle\n~~~~~~~~\n\n:copyright: (c) 2010 DISQUS.\n:license: Apache License 2.0, see LICENSE for more details.\n\"\"\"\n\n__all__ = ('gargoyle', 'ConditionSet', 'autodiscover', 'VERSION')\n\ntry:\n VERSION = __import__('pkg_reso... | python | edit | 4 | 3 | apache-2.0 | fa98f32ce9c2d4e7dff8281bf5e6f154b82599d6 | brilliant-org/gargoyle,brilliant-org/gargoyle,brilliant-org/gargoyle | gargoyle/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport optparse\nimport sys\n# Install the Python unittest2 package before you run this script.\nimport unittest2\n\nUSAGE = \"\"\"%prog SDK_PATH\nRun unit tests for App Engine apps.\nThe SDK Path is probably /usr/local/g... | python | edit | 2 | 1 | mit | 267b0634546c55ebb42d6b1b9c3deca9d7408cc2 | the-blue-alliance/the-blue-alliance,synth3tk/the-blue-alliance,josephbisch/the-blue-alliance,verycumbersome/the-blue-alliance,josephbisch/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopr... | run_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport time\nimport uuid\n\nimport pytest\nfrom jose import jwt\n\nfrom helusers.oidc import ApiTokenAuthentication\n\nfrom .keys import rsa_key\n\nISSUER = \"test_issuer\"\n\n\nclass _TestableApiTokenAuthentication(ApiTokenAut... | python | edit | 1 | 1 | bsd-2-clause | 308bc2add0cc9d2d8af1d1851d71caa284094f62 | City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers | helusers/tests/test_oidc_api_token_authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# import porter_paleale\n\n\n\n\ndef write_pdb(aa_sequence, fragment_angles, gap_length, filepath):\n \"\"\"\n Generate pdb file with results\n\n :param aa_sequence: Amino acid sequence\n :param fragment_angles: Backbone torsion... | python | edit | 1 | 1 | mit | 7e15896c14cbbab36862c8000b0c25c6a48fedcd | mchelem/cref2,mchelem/cref2,mchelem/cref2 | cref/structure/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 IBM Corp.\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 License at\n#\n# http://... | python | edit | 1 | 1 | apache-2.0 | db19dfa17261c3d04de0202b2809ba8abb70326b | openstack/oslotest,openstack/oslotest | tests/unit/test_moxstubout.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add docstring to main module"
},
{
"role": "assistant",
"content": "\"\"\"\nA Python library to create a simple FUSE file system.\n\n.. :copyright: (c) 2016 by Jelte Fennema.\n :license: MIT, see License for more details.\n\"... | python | new_file | 1 | 0 | mit | b1f1f4991abdd3f8854923ca7a2bc1b7e9cf6a53 | JelteF/easyfuse,JelteF/easyfuse | easyfuse/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport contextlib\nimport sys\n\ntry:\n import fcntl\nexcept ImportError:\n fcntl = None\n\nfrom ipybind.common import is_kernel\nfrom ipybind.ext.wurlitzer import Wurlitzer\n\n_fwd = None\n\n\nclass Forward... | python | edit | 1 | 4 | mit | 810a43c859264e3d5e1af8b43888bf89c06bee1d | aldanor/ipybind,aldanor/ipybind,aldanor/ipybind | ipybind/stream.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add support for GITDIR envar"
},
{
"role": "assistant",
"content": "import pathlib\n\nGITDIR = pathlib.Path(os.environ.get('GITDIR', '/opt/git')) #TODO check permissions\n"
}
] | python | new_file | 2 | 0 | mit | aa48fd54c8b4b0139f562de199a5f0c5dd4c5db8 | fenhl/gitdir | gitdir/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport glib\nimport dbus\nfrom dbus.mainloop.glib import DBusGMainLoop\nfrom pyee import EventEmitter\nimport logbook\nlogger = logbook.Logger('connman-dispatcher')\n\n__all__ = ['detector']\n\n\ndef property_changed(_, message):\n if me... | python | edit | 2 | 5 | isc | 25054c4f9b20cef1a43aea680f75f7208c1fd3b7 | a-sk/connman-dispatcher | connman_dispatcher/detect.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom ansible.module_utils.basic import AnsibleModule\nfrom ansible.module_utils.json_utils import data\nfrom ansible.module_utils.mork import data as mork_data\n\nresults = {\"json_utils\": data, \"mork\": mork_data}\n\nA... | python | edit | 1 | 0 | mit | 6ac683ca1905fbf17dd63c1264609e770439fa7f | thaim/ansible,thaim/ansible | test/integration/targets/module_utils/library/test_env_override.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.... | python | edit | 6 | 0 | bsd-3-clause | b1d3a0c79a52ca1987ea08a546213e1135539927 | dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/... | tools/bots/ddc_tests.py | rejected_lint | Too many lint violations: 6 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.