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#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='syndicate',\n version='0.99.6',\n description='A wrapper for REST APIs',\n author='Justin Mayfield',\n author_email='<EMAIL>',\n url='h... | python | edit | 1 | 2 | mit | 40a2a4ace817f3f237d87d802d5bd286eb2bf09e | mayfield/syndicate | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# https://jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/\n# http://peterdowns.com/posts/first-time-with-pypi.html\n# Upload to PyPI Live\n# python setup.py sdist upload -r pypi\n\nfrom setuptools import setup\n\... | python | edit | 1 | 0 | mit | 38a13415fc4c126c1e115d5af0d0ffde5bcdf08d | Kane610/axis | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-slack',\n url=\"https://chris-lamb.co.uk/projects/django-slack\",\n version='5.16.0',\n description=\"Provides easy-to-use integratio... | python | edit | 1 | 0 | bsd-3-clause | 5e9f41eae1d53cec5c90a104c249b11bfe292225 | lamby/django-slack | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))... | python | edit | 1 | 0 | apache-2.0 | c33038a85f41c2056630897c2b1b8ce590301e62 | honza801/django-swiftbrowser,hbhdytf/django-swiftbrowser,hbhdytf/django-swiftbrowser,bkawula/django-swiftbrowser,honza801/django-swiftbrowser,cschwede/django-swiftbrowser,cschwede/django-swiftbrowser,bkawula/django-swiftbrowser,sunhongtao/django-swiftbrowser,bkawula/django-swiftbrowser,honza801/django-swiftbrowser,bkaw... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport factory\nimport logging\n\nfrom django.conf import settings\n\nfrom bluebottle.projects.models import (\n Project, ProjectTheme, ProjectDetailField, ProjectBudgetLine)\nfrom .accounts import BlueBottleUserFactory\n\n# Suppress deb... | python | edit | 3 | 0 | bsd-3-clause | 605af19623b2536752304275f2403ce2b4fa52f8 | onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle | bluebottle/test/factory_models/projects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name = \"Cytoplasm\",\n version = \"0.04.5\",\n author = \"startling\",\n author_email = \"<EMAIL>\",\n url = \"http://cytoplasm.somethingsido.com\",\n keywords = [\"blogging\",... | python | edit | 1 | 0 | mit | fa4ef8d171faaf89e81bcd36dfeec082cd86a9e8 | startling/cytoplasm | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import absolute_import, division, print_function\nimport six\nfrom setuptools import setup, Command\n\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\nlogging.getLogger(\"nose\").setLevel(log... | python | edit | 3 | 0 | apache-2.0 | e42dc9fe06bad4eff195d64f031d5a2445a15cc8 | dacut/python-aws-sig | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 9 12:52:31 2015\n\n@author: stuart\n\"\"\"\nimport os\nimport glob\n\nimport yt\n\nmodel = 'spruit'\ndatadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/')\n\nfiles = glob.glob(datad... | python | edit | 1 | 0 | bsd-2-clause | ae280f4f837a23608749e8a8de1cbba98bafc621 | SWAT-Sheffield/pysac,Cadair/pysac | examples/mhs_atmosphere/mhs_atmosphere_plot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from configparser import ConfigParser\nexcept ImportError:\n from ConfigParser import ConfigParser\n\nimport pytest\n\n\nCLI_OPTION_PREFIX = '--'\n\n\nclass CollectConfig(object):\n \"\"\"\n A pytest plugin to gets the co... | python | edit | 1 | 8 | mit | 451951b311ef6e2bb76348a116dc0465f735348e | joeyespo/pytest-watch | pytest_watch/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom nose.tools import assert_true\nfrom sklearn.ensemble import RandomForestClassifier\nfrom splearn.ensemble import SparkRandomForestClassifier\nfrom splearn.utils.testing import SplearnTestCase\nfrom splearn.utils.val... | python | edit | 1 | 1 | apache-2.0 | 3cc8dc8de4fe75f0abf92f89979b0b7e48d9c137 | lensacom/sparkit-learn,taynaud/sparkit-learn,taynaud/sparkit-learn,lensacom/sparkit-learn | splearn/ensemble/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nurl = \"\"\nversion = \"0.1.0\"\nreadme = open('README.rst').read()\n\nsetup(\n name=\"dtool-create\",\n packages=[\"dtool_create\"],\n version=version,\n description=\"Dtool plugin for creating d... | python | edit | 1 | 0 | mit | c7e726744b28ee0d502b51cdf8f7d6f0d9ef24e1 | jic-dtool/dtool-create | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport textwrap\nfrom setuptools import setup\n\n\nsetup(name='dip',\n version='1.0.0b0',\n author='amancevice',\n author_email='<EMAIL>',\n packages=['dip'],\n url='http://www.smallweirdnumber.com',\n descript... | python | edit | 1 | 0 | mit | 2349fa984e584fbfb022d01ce3d3e349dbe7870c | amancevice/dip | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .grid import GridContainer, GridItem\nfrom .liquids import LiquidContainer, LiquidWell\n\n\nclass Microplate(GridContainer):\n rows = 8\n cols = 12\n volume = 100\n min_vol = 50\n max_vol = 90\n heigh... | python | edit | 4 | 1 | apache-2.0 | 3e403ed0962b62b19247dd1021f672507d003f07 | OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons_sdk,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons-api,Opentrons/labware | labware/microplates.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nraven.conf\n~~~~~~~~~~\n\n:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport urlparse\n\n\ndef load(dsn, scope):\n \"\"\"\n Parses a Sentry co... | python | edit | 1 | 5 | bsd-3-clause | b690d4be60d9c72eb805b779c61f6d3001881bd2 | Goldmund-Wyldebeast-Wunderliebe/raven-python,someonehan/raven-python,dbravender/raven-python,jbarbuto/raven-python,ticosax/opbeat_python,akheron/raven-python,smarkets/raven-python,getsentry/raven-python,patrys/opbeat_python,jmp0xf/raven-python,jmagnusson/raven-python,recht/raven-python,hzy/raven-python,akalipetis/raven... | raven/conf/__init__.py | accepted | null | true |
[
{
"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\nfrom abc import ABCMeta, abstractmethod\n\n\nclass Collector(object):\n '''Collect and return schemas.'''\n\n __metaclass__ =... | python | edit | 1 | 6 | apache-2.0 | 64d4bcf0862e2715dc0de92a0621adf23dff5818 | 4degrees/harmony | source/harmony/schema/collector.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport inspect\n\nfrom pyinstrument.low_level import stat_profile as stat_profile_c\nfrom pyinstrument.low_level import stat_profile_python\n\n\nclass AClass:\n def get_frame_identfier_for_a_method(self, getter_function):\n frame ... | python | edit | 1 | 2 | bsd-3-clause | 0f40869157ef56df0ff306fb510be4401b5cbe5d | joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument | test/low_level/test_frame_identifiers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nclass ProgramMemory(object):\n\n def __init__(self, size: int, programCounter):\n self._operations = [None] * size\n self._programCounter = programCounter\n\n @property\n def operations(self) -> list:\n retur... | python | edit | 1 | 1 | mit | 0d3ae906a9382aca5e00ff403986591223e3a1a7 | SuperOxigen/pic16f917-simulator | pic/flash.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import send_file, request, redirect, url_for\n\nfrom dadd.master import app\nfrom dadd.master.files import FileStorage\n\n\n@app.route('/')\ndef index():\n return redirect(url_for('admin.index'))\n\n\n@app.route('/files/<path>... | python | edit | 1 | 2 | bsd-3-clause | 2f0d71024ab9fb3ab4b97e086741b0dd8564d29e | ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd | dadd/master/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport plotly as py\nfrom os import makedirs\n\nfrom utils.names import output_file_name\n\n_out_dir = 'graphs/'\n\ndef export(fig, module, dates):\n graph_dir = '{}{}/'.format(_out_dir, str(module))\n makedirs(graph_dir, exist_ok=Tru... | python | edit | 1 | 1 | mit | d1da03b40e9a10a07b67eeb76a0bef8cc704a40c | f-jiang/sleep-pattern-grapher | utils/exporter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .es_query import HQESQuery\nfrom . import filters\n\n\nclass FormES(HQESQuery):\n index = 'forms'\n default_filters = {\n 'is_xform_instance': {\"term\": {\"doc_type\": \"xforminstance\"}},\n 'has_xmlns': {\"not\": ... | python | edit | 1 | 1 | bsd-3-clause | 8a607ab7c064f3f593b4cecaa8e4262bec9326fa | qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq | corehq/apps/es/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Replace “banana” with business logic (kind of)."
},
{
"role": "assistant",
"content": "from bson.code import Code\n\nfrom voteit.core import votes\n\nREDUCE = Code(\"\"\"\nfunction(obj, prev) {\n if (!prev.votes.hasOwnProperty... | python | new_file | 2 | 1 | mit | 8f753ba1bc3f17146841d1f83f493adb8ea480e1 | tmtmtmtm/voteit-api,pudo/voteit-server,pudo-attic/voteit-server | voteit/stancer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import request, Flask\n\nfrom st2reactor.sensor.base import Sensor\n\n\nclass EchoFlaskSensor(Sensor):\n def __init__(self, sensor_service, config):\n super(EchoFlaskSensor, self).__init__(\n sensor_service=s... | python | edit | 1 | 1 | apache-2.0 | a689ce5e38c4d4a5ce982037c5c15396f361c7d6 | StackStorm/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2 | contrib/examples/sensors/echo_flask_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport arrow\nimport logging\nimport argparse\nimport emission.core.wrapper.pipelinestate as ecwp\nimport emission.core.get_database as edb\n\n# Run in containers using:\n# sudo docker exec $CONTAINER bash -c 'cd e-mission-server; source se... | python | edit | 1 | 3 | bsd-3-clause | 55069f1635a32c57faf7c8afcbfc9b88df093601 | shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server | bin/monitor/find_invalid_pipeline_state.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass AppUrl:\n\t\"\"\"Class for storing all the URLs used in the application\"\"\"\n\tBASE = \"http://www.thehindu.com/\"\n\tOP_BASE = BASE + \"opinion/\"\n\tOPINION = OP_BASE + \"?service=rss\"\n\tEDITORIAL = OP_BASE + \"editorial/?servic... | python | edit | 1 | 0 | mit | 8ffe217fe512296d41ae474c9d145ee2de599eac | venkateshshukla/th-editorials-server | src/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport math\n#Log-likelihood\ndef ll(ciphertext,perm,mat,k):\n s=0.0\n for i in range(len(ciphertext)-(k-1)):\n kmer = tuple([perm[c] for c in ciphertext[i:i+k]])\n s = s + math.log(mat[kmer])\n return s\n\n```\n\nApp... | python | edit | 1 | 6 | mit | b8e23194ff0c24bd9460629aff18f69d7a868f6d | gputzel/decode | likelihood.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\nfrom io import BytesIO\nfrom django.test import TestCase\n\n\nfrom geokey_dataimports.helpers.model_helpers import import_from_csv\n\n\nclass ImportFromCSVTest(TestCase):\n \"\"\"Tests to check that characters can be impo... | python | edit | 1 | 2 | mit | 6e8e7a067419166afd632aa63ecb743dd6c3a162 | ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports | geokey_dataimports/tests/test_model_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'onur'\n\nfrom celery import Celery\n\nimport direnaj_api.config.server_celeryconfig as celeryconfig\n\napp_object = Celery()\n\napp_object.config_from_object(celeryconfig)\n\n@app_object.task\ndef deneme(x, seconds):\n prin... | python | edit | 3 | 1 | mit | 50596484c1214a73d3722af116ccea7fa258fb11 | boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj | direnaj/direnaj_api/celery_app/server_endpoint.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logging import info, basicConfig, INFO\nfrom time import sleep\nfrom src.slack.slack_bot import Bot\n\n\ndef main():\n basicConfig(level=INFO)\n bot = Bot()\n\n info('Connection Slack')\n if not bot.slack_client.rtm_connect... | python | edit | 1 | 4 | bsd-3-clause | af4bdd9339e3905f6489577afe7fac33475e3884 | otherpirate/dbaas-slack-bot | src/services/listener_bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ndistutilazy\n-----------\n\nExtra distutils command classes.\n\n:license: MIT, see LICENSE for more details.\n\"\"\"\n\nfrom os.path import dirname, abspath\nimport sys\n\n__version__ = '0.4.0'\n__all__ = ['clean', 'pyinstaller', 'c... | python | edit | 4 | 0 | mit | 6d2118a87dfb811015727970b1eda74c15769e06 | farzadghanei/distutilazy | distutilazy/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport subprocess\nimport sys\n\n\ndef main():\n ip = '127.0.0.1'\n port = 5000\n workers_count = 4\n if len(sys.argv) > 1:\n for arg in sys.argv[1:]:\n if ':' in arg:\n i... | python | edit | 1 | 6 | mit | 1fabf53957c4951e36f756c94bea4007cd6a5d6e | bondarevts/flucalc,bondarevts/flucalc,bondarevts/flucalc | run_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='slacker',\n version='0.9.29',\n packages=['slacker'],\n description='Slack API client',\n author='Oktay Sancak',\n author_email='<EMAIL>',\n url='http://github.com/os/sla... | python | edit | 1 | 0 | apache-2.0 | b22c7b78586ee07d686d06ccfd6213ca35afef1b | os/slacker | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='mnp',\n version='1.0.0',\n author='Heryandi',\n author_email='<EMAIL>',\n packages=find_packages(exclude='test'),\n scripts=[],\n url='https://g... | python | edit | 3 | 0 | mit | f1506a36ab4d9970fb7661aaf2a0f7da05812cec | heryandi/mnp | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ez_setup import use_setuptools # https://pypi.python.org/pypi/setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\nfrom packager import __version__\n\n# Get the long description from the README file.\ndef get_long... | python | edit | 1 | 2 | mit | f97e5585386e7e9417689cceff1bf49386473551 | csdms/packagebuilder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport shutil\nimport sys\n\nVERSION = '0.0.0git'\n\nsetup_info = dict(\n\n name = 'nimp',\n version = VERSION,\n author = 'Dontnod Entertainment',\n description = 'DNE build tool',\n\n pac... | python | edit | 5 | 0 | mit | e7e519f1d1636240022b7961fe949bc41a97c091 | dontnod/nimp | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport multi_schema\n\nsetup(\n name = \"django-multi-schema\",\n version = multi_schema.__version__,\n description = \"Postgres schema support in django.\",\n url = \"http://hg.schinckel.net/dj... | python | edit | 1 | 0 | bsd-3-clause | 03cb3e001a25467319d0d82a5fc95e1c07ea3dd4 | luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.a... | python | edit | 1 | 0 | mit | f0579373b2c3261b00228d4c30832f51d713a7c2 | django-py/django-openid-provider,nmohoric/django-oidc-provider,wojtek-fliposports/django-oidc-provider,wayward710/django-oidc-provider,nmohoric/django-oidc-provider,ByteInternet/django-oidc-provider,bunnyinc/django-oidc-provider,ByteInternet/django-oidc-provider,juanifioren/django-oidc-provider,torreco/django-oidc-prov... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name='blanc-contentfiles',\n version='0.2.1',\n description='Blanc Content Files',\n long_description=open('README.rst').read(),\n url='https://gi... | python | edit | 1 | 0 | bsd-3-clause | c1955ceeb08f960cef631e6a812862052d42d85c | blancltd/blanc-contentfiles | setup.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\nsetup(\n name='blanc-basic-pages',\n version='0.2.1',\n description='Blanc Basic Pages for Django',\n long_description=open('README.rst').read(),\n url='ht... | python | edit | 1 | 0 | bsd-3-clause | e059af57acec9c077ddb348ac6dd84ff58d312fe | blancltd/blanc-basic-pages | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nimport ptwit\n\n\nrequires = ['python-twitter>=1.0']\n\n\ndef readme():\n with open('R... | python | edit | 1 | 1 | mit | 5865599eee7014a02e07413dea71a79e878ac6b1 | ptpt/ptwit | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport multiprocessing\nfrom setuptools import setup, find_packages\n\nsetup(\n name='sow-generator',\n version='0.1',\n description='Create a scope of work from templates and version controlled documentation.',\n long_descripti... | python | edit | 3 | 0 | bsd-3-clause | eb5dab3b3231688966254a1797ced7eec67b6e8a | praekelt/sow-generator | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='django-pgallery',\n version=__import__('pgallery').__version__,\n ... | python | edit | 1 | 1 | mit | 79f9a028215f6765898ae43faf2ba7e4aaf98f0c | zsiciarz/django-pgallery,zsiciarz/django-pgallery | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\n# Version info -- read without importing\n_locals = {}\nwith open('releases/_version.py') as fp:\n exec(fp.read(), None, _locals)\nversion = _locals['__version__']\n\nsetup(\n n... | python | edit | 1 | 0 | bsd-2-clause | 9a424163fa97bbb5ab7b19ecb9707fa05cb1bef7 | bitprophet/releases | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8; mode: python; -*-\n\"\"\"\nA package that implements offline messages for Django\nWeb Framework.\n\n(C) 2011 oDesk www.oDesk.com w/revisions by Zapier.com\n\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name='dja... | python | edit | 1 | 0 | bsd-3-clause | 932182858efcdf3d76d3a19cba09967c680e907f | dym/django-offline-messages | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nexecfile('facebook/version.py')\n\nsetup(\n name = 'Facebook',\n version = __version__,\n description = 'Facebook makes it even easier to interact with Facebook\\'s Graph... | python | edit | 3 | 0 | mit | eeecf68d2d59bc2233478b01748cbf88bab85722 | jgorset/facebook,vyyvyyv/facebook,jgorset/facebook,vyyvyyv/facebook | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py\n\n..codeauthor:: John Lane <<EMAIL>>\n\n\"\"\"\n\nfrom setuptools import setup, find_packages\nfrom sda import __author__, __email__, __license__, __version__\n\n\nsetup(\n name='sda',\n version=__version__,\n packa... | python | edit | 1 | 0 | mit | 1b4ca927245e424a340f5caa2ed9bda615dd8a5c | jlane9/selenium_data_attributes,jlane9/selenium_data_attributes | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import find_packages, setup\nfrom pyglins import __version__, __description__\n\n\ndef read_readme():\n with open(os.path.join(os.path.dirname(__file__), 'README.md')) as file:\n ... | python | edit | 1 | 2 | mit | e10d5b8a975f1d9482f845c1476edcc4598bb84a | paxet/pyglins | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Setup for the DeepOBS package\"\"\"\n\nimport setuptools\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nsetuptools.setup(\n name='deepobs',\n version='1.1.1',\n descr... | python | edit | 1 | 1 | mit | b389a7c0a3129573d28308cd175002b612b016f6 | fsschneider/DeepOBS,fsschneider/DeepOBS | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n'''\nThis file is part of targetcli.\nCopyright (c) 2011-2013 by Datera, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may\nnot use this file except in compliance with the License. You ... | python | edit | 1 | 0 | apache-2.0 | 51d0498f1c444f00ce982a93d8c9fdfb72a196b4 | agrover/targetcli-fb,cloud4life/targetcli-fb,cvubrugier/targetcli-fb | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='resync',\n version='0.6.1',\n packages=['resync'],\n classifiers=[\"Development Status :: 3 - Alpha\",\n \"Programming Language :: Python\",\n \"... | python | edit | 1 | 0 | apache-2.0 | 99b79326fa18f46fe449e11fd0bfa17814d7a148 | resync/resync,dans-er/resync,lindareijnhoudt/resync,lindareijnhoudt/resync,dans-er/resync | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nimport inflection\n\nsetup(\n name='inflection',\n version=inflection.__version__,\n description=\"A port of Ruby on Rails inflector to Python\",\n ... | python | edit | 1 | 0 | mit | 769cf7b47fde883e4b44cec3adf8944bd62f7363 | jpvanhal/inflection | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nfrom setuptools import setup, find_packages\nfrom pkg_resources import resource_filename\n\n# depending on your execution context the version file\n# may be located in a different place!\nvsn_pa... | python | edit | 1 | 0 | apache-2.0 | 1594644990fe6c621d309b587d844669ec273dec | ianunruh/hvac,ianunruh/hvac | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n__author__ = '<EMAIL>'\n\nfrom setuptools import setup\nfrom sys import platform\n\n\nREQUIREMENTS = []\n\n\nif platform.startswith('darwin'):\n REQUIREMENTS.append('pyobjc >= 2.5')\n\n\nsetup(\n ... | python | edit | 3 | 0 | mit | d96027040f96de15c2bddf8ba5b94711b5af6e1f | Kentzo/Power | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist bdist_wininst upload ... | python | edit | 1 | 0 | mit | 8a97210aa5d83f6eac266a19fbad9a2159b14328 | danxshap/django-rest-surveys | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\nimport sys\nimport platform\nimport subprocess\nimport multiprocessing\n\nfrom setuptools import setup, Extension\nfrom setuptools.command.build_ext import build_ext\nfrom distutils.version import LooseVersion\n\ncores... | python | edit | 7 | 2 | apache-2.0 | d9771c3c0f78b55de4ae00be4553975c2f934c12 | phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite | setup.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom os import path\n\nreadme = open(path.join(path.abspath(path.dirname(__file__)), 'README.md')).read()\n\nsetup(\n name='bottle-websocket',\n version='0.2',\n author='Zach Kelling',\n author_emai... | python | edit | 1 | 0 | mit | 323498419bfe080c9807586c2e5cc2678b7d2fd4 | xujun10110/bottle-websocket,zeekay/bottle-websocket | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n# Get version string\nwith open('gdx2py/version.py') as f: exec(f.read())\n\nsetup(name='GDX2py',\n version=__version__, # pylint: disable=undefined-variable\n ... | python | edit | 2 | 0 | mit | eb339f661aec7c01a727a01fd8b9e2880d99cc9c | ererkka/GDX2py | setup.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='synapse',\n version='0.1.0',\n description='Synapse Distributed Key-Value Hypergraph Analysis Framework',\n author='Invisigoth Kenshoto',\n ... | python | edit | 1 | 0 | apache-2.0 | 7b825d860c84eae8b5a74ef16ae8e1da08dde888 | vertexproject/synapse,vertexproject/synapse,vertexproject/synapse | setup.py | rejected_duplicate | Near-duplicate of sample 3240 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ..geoparse import Geoparser\nimport pytest\n\nimport spacy\nnlp = spacy.load('en_core_web_lg', disable=['parser', 'tagger'])\n\n@pytest.fixture(scope='session', autouse=True)\ndef geo():\n return Geoparser(nlp=nlp, threads=False, mo... | python | edit | 1 | 1 | mit | 97edbee5813b8a87606b8fb3d09b4f116cdaf025 | openeventdata/mordecai | mordecai/tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport time\nimport json\nimport requests\nimport pyperclip\n\nAPI_KEY = os.environ.get('API_KEY')\n# API_KEY = \"\"\n\n\ndef google_url_shorten(url):\n req_url = \"https://www.googleapis.com/urlshort... | python | edit | 1 | 1 | apache-2.0 | cddb15f25df404d849601e7c8db2df15d2443958 | LucasHMS/intelliPaste | intellipaste.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom tempfile import NamedTemporaryFile\nfrom microscopium import io as mio\n\ndef test_imsave_tif_compress():\n im = np.random.randint(0, 256, size=(1024, 1024, 3)).astype(np.uint8)\n with NamedTemporaryFile(suffi... | python | edit | 1 | 1 | bsd-3-clause | 13ef6879aeca9881483bd9f575d66377f1dde0c1 | jni/microscopium,microscopium/microscopium,Don86/microscopium,microscopium/microscopium,jni/microscopium,Don86/microscopium | tests/test_io.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.insert(0, '../mafia')\n\nfrom game import Game\nfrom game import Player\n\nfrom testclient.testmessenger import TestMessenger\n\nclass SmokeTest(unittest.TestCase):\n def s... | python | edit | 1 | 1 | mit | 37aa1c9f8faeefe7305cca526a7424a349939add | BitokuOokami/PloungeMafiaToolkit | tests/smoke_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom projects_controller import ProjectsController\nfrom redirects_controller import RedirectsController\nfrom flask import Flask, render_template, redirect, abort\n\n\nDATA_DIR = 'data'\n\napp = Flask(__name__)\napp.url_map.strict_slashes ... | python | edit | 1 | 4 | mit | 11c1f5a9806f4a21abdb5ac7e4310ef3242389b0 | teslaworksumn/teslaworks.net,teslaworksumn/teslaworks.net | server_dev.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hello_world import hello_world\n\nfrom unittest import TestCase\n\n\nclass BasicTest(TestCase):\n def test_basic_hello_world(self):\n \"\"\"\n Test basic hello world messaging\n \"\"\"\n False\n\n```\n\nA... | python | edit | 1 | 1 | mit | 11d19d1756f6227db894aabcf4bd02e327e292c7 | jeansaad/hello_world | tests/test_basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hug\n\nfrom overtime_calculator import auth, api\n\n\n@hug.get(\"/\", output=hug.output_format.html)\ndef base():\n return \"<h1>Hello, world</h1>\"\n\n\n@hug.extend_api()\ndef with_other_apis():\n return [\n auth,\n ... | python | edit | 1 | 1 | mit | cc8f5b35d4c227f82b2872d5bfad24bef37209e5 | x10an14/overtime-calculator | overtime_calculator/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# FIXME: pyuv_cffi needs to build the library BEFORE the standard library is patched\nimport pyuv_cffi\n\nprint('pyuv_cffi imported', pyuv_cffi)\nimport guv\n\nguv.monkey_patch()\nimport guv.server\nimport logging\nimport time\n\nfrom util ... | python | edit | 1 | 2 | mit | f3c99d8a8a9d485ebc9a18419a142f03d4730fba | veegee/guv,veegee/guv | examples/guv_simple_http_response.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\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | python | edit | 1 | 1 | apache-2.0 | e68d0b269b5c632bb96cdc04f37b622b15a0382e | JavaRabbit/CS496_capstone,sharbison3/python-docs-samples,hashems/Mobile-Cloud-Development-Projects,sharbison3/python-docs-samples,GoogleCloudPlatform/python-docs-samples,BrandonY/python-docs-samples,BrandonY/python-docs-samples,BrandonY/python-docs-samples,sharbison3/python-docs-samples,sharbison3/python-docs-samples,h... | dataproc/dataproc_e2e_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\ndef get_stdin():\n buf = \"\"\n for line in sys.stdin:\n buf = buf + line\n return buf\n\nif(__name__ == \"__main__\"):\n st = get_stdin()\n print(st)\n\n```\n\nApply this change: Remove braces for Python... | python | edit | 1 | 2 | mit | f23d90d441194d270b3bcf7997550f2f8e7e4c1d | openfaas/faas,rgee0/faas,alexellis/faas,openfaas/faas,alexellis/faas,rgee0/faas,alexellis/faas,alexellis/faas,rgee0/faas,rgee0/faas,openfaas/faas,rgee0/faas,rgee0/faas,rgee0/faas,alexellis/faas,rgee0/faas,alexellis/faas,rgee0/faas,alexellis/faas,alexellis/faas,alexellis/faas,rgee0/faas | sample-functions/BaseFunctions/python/handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom enum import IntEnum\nfrom discord import Embed\n\n\nclass OpStatus(IntEnum):\n\tSUCCESS = 0x2ECC71,\n\tFAILURE = 0xc0392B,\n\tWARNING = 0xf39C12,\n\tNONE = None\n\n\ndef build_embed(ctx, desc: str, title: str = '', status: OpStatus = O... | python | edit | 1 | 5 | apache-2.0 | 611aee2e704ffbad8579e5005ca36232097f96c5 | HellPie/discord-reply-bot | bot/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 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.\nimport os\n\nfrom perf_insights import map_single_trace\nfrom perf_insights... | python | edit | 2 | 1 | bsd-3-clause | 019f259ae42a95802dce644511399332506ad1cc | catapult-project/catapult,sahiljain/catapult,benschmaus/catapult,catapult-project/catapult-csm,sahiljain/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,sa... | tracing/tracing/metrics/metric_runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Tweepy\n# Copyright 2009-2021 Joshua Roesslein\n# See LICENSE for details.\n\n\"\"\"\nTweepy.asynchronoous\n\nAsynchronous interfaces with the Twitter API\n\"\"\"\n\ntry:\n import aiohttp\nexcept ModuleNotFoundError:\n from tweepy.e... | python | edit | 5 | 0 | mit | b0b232297f55cd38db85bb2ec5b30a6022a3f4d1 | svven/tweepy,tweepy/tweepy | tweepy/asynchronous/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Author: Braedy Kuzma\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^posts/$', views.PostsView.as_view(), name='posts'),\n url(r'^posts/(?P<pid>[0-9a-fA-F\\-]+)/$', views.PostView.as_view(),\n ... | python | edit | 1 | 0 | apache-2.0 | b3466fc14e9616c620258eea382b644ac2585845 | CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project | rest/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add class `VoiceConverter` that peforms all required processes in statistical voice conversion: speech analysis, feature parameterization, feature conversion and waveform syntheis"
},
{
"role": "assistant",
"content": "# coding: ... | python | new_file | 2 | 5 | mit | d76cb1aa296bc800cb24427110910a038a62a311 | k2kobayashi/sprocket | vctk/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom __future__ import unicode_literals\n\nfrom imaginary.world import ImaginaryWorld\nfrom imaginary.objects import Thing, Container, Exit\nfrom imaginary.garments import createShirt, createPants\nfrom imaginary.iimaginary import IClothi... | python | edit | 1 | 1 | mit | ab7ce76c47ea99080c105feb1a4f8aed39554597 | twisted/imaginary | doc/examples/example_world.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n#\n# USAGE: geturl.py FILE_OR_DIR1 FILE_OR_DIR2 ...\n#\n# prints out the URL associated with each item\n#\n\nimport sys\nimport svn._wc\nimport svn.util\n\ndef main(pool, files):\n for f in files:\n entry = svn._... | python | edit | 2 | 4 | apache-2.0 | 94e8b7bf8b24dfa36f240e601cb0894b10cab21a | YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion | tools/examples/geturl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 Boundary, Inc.\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#... | python | edit | 1 | 5 | apache-2.0 | dc10cbafe045d55906d627816a88323fb4a8c948 | boundary/boundary-plugin-shell,boundary/boundary-plugin-shell,jdgwartney/boundary-plugin-shell,jdgwartney/boundary-plugin-shell | exec_proc.py | rejected_duplicate | Near-duplicate of sample 4605 | 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 | 15652b6817ad4548881883ee89981aff49c52c56 | Bloomie/murano-agent,Bloomie/murano-agent,telefonicaid/murano-agent,openstack/murano-agent,telefonicaid/murano-agent,Bloomie/murano-agent,openstack/murano-agent,telefonicaid/murano-agent,openstack/murano-agent,openstack/murano-agent,Bloomie/murano-agent | muranoagent/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render, get_object_or_404\n\nfrom mozcal.events.models import Event, Space, FunctionalArea\n\ndef one(request, slug):\n event = get_object_or_404(Event, slug=slug)\n\n return render(request, 'event.html', { 'e... | python | edit | 1 | 1 | bsd-3-clause | 68b1c3804504ecc14f7c23465ca11db31489e1cd | ppapadeas/wprevents,yvan-sraka/wprevents,yvan-sraka/wprevents,ppapadeas/wprevents,yvan-sraka/wprevents,ppapadeas/wprevents,yvan-sraka/wprevents | mozcal/events/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext import commands\n\nclass Misc:\n @commands.command()\n async def highfive(self, ctx):\n \"\"\"\n Give Yutu a high-five\n \"\"\"\n await ctx.send('{0.mention} :pray: {1.menti... | python | edit | 1 | 2 | mit | d0908d1e4e5279579a93772210b001c19fae9b10 | HarkonenBade/yutu | cogs/misc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime\nimport os\n\ndef getSetting(key,default=None):\n\ts = sublime.load_settings(\"Fuse.sublime-settings\")\n\treturn s.get(key, default)\n\ndef getFusePathFromSettings():\n\tpath = getSetting(\"fuse_path_override\")\n\tif path =... | python | edit | 1 | 4 | mit | ce191a9ea7bad7493560a7bdd7f7de2e56f94612 | fusetools/Fuse.SublimePlugin,fusetools/Fuse.SublimePlugin | fuse_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\nfrom .utils import get, versioned_reverse as reverse, assert_fields_exist\n\n\n# === util methods ===\n\ndef get_list(api_client, version='v1'):\n list_url = reverse('user-list', version=version)\n... | python | edit | 1 | 1 | mit | 02fc723b8d459de1bcf94dc02f7b8531dd9e7cfb | aapris/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,aapris/linkedevents | events/tests/test_user_get.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\nimport cffi\n\n\n_directive_re = re.compile(r'^\\s*#.*?$(?m)')\n\n\ndef make_ffi(module_path, crate_path, cached_header_filename=None):\n \"\"\"Creates a FFI instance for the given configuration.\"\"\"\n if cache... | python | edit | 1 | 4 | apache-2.0 | 3501f3404aebf6dc7ba349eafdc80602b98f72a9 | mitsuhiko/snaek,mitsuhiko/snaek,mitsuhiko/snaek | snaek/ffi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom push import views\n\nurlpatterns = [\n url(r'^$', views.index, name = 'index'),\n url(r'^sender', views.sender, name = 'sender'),\n url(r'^notification_list', views.notification_list, name = '... | python | edit | 1 | 0 | apache-2.0 | 2263d180184c908b0e96d53f43f6c81aa23a3c92 | nnsnodnb/django-mbaas,nnsnodnb/django-mbaas,nnsnodnb/django-mbaas | push/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport socket\n\nimport requests\n\nfrom flask import request, jsonify, Response, abort\n\nfrom dadd.worker import app\nfrom dadd.worker.proc import ChildProcess\n\n\n@app.route('/run/', methods=['POST'])\ndef run_pr... | python | edit | 1 | 5 | bsd-3-clause | d5f0b698831e4bfb35b74ef0d8c7af75c91e67d3 | ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd | dadd/worker/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nimport os, shutil\n\ndef print_warning(message, *args, **kwargs):\n import colortext\n if args or kwargs: message = message.format(*args, **kwargs)\n colortext.write(message, color='red')\n\ndef print_erro... | python | edit | 1 | 3 | mit | fb1d39ed30e73bef49be7a71945d5dfd67af28e3 | Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab | scripting.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make other API classes available from base module."
},
{
"role": "assistant",
"content": "from errors import WebHDFSError\nfrom client import WebHDFSClient\nfrom attrib import WebHDFSObject\n\n__version__ = '1.0'\n"
}
] | python | new_file | 5 | 0 | mit | 9debed5d1d83bdf2098a7a3841ae4ff272e7ea8e | mk23/webhdfs,mk23/webhdfs | lib/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add home page resolve test to layout"
},
{
"role": "assistant",
"content": "from django.core.urlresolvers import resolve\nfrom django.test import TestCase\n\nfrom layout.views import home\n\n\nclass HomePageTest(TestCase):\n\n ... | python | new_file | 1 | 1 | mit | 0216bfd48fddb9bb7bda611ec5bdfe368bdee55f | jvanbrug/scout,jvanbrug/scout | layout/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport cPickle\nimport gzip\nimport logging\nimport os\nimport sys\nimport tempfile\nimport urllib\n\nimport lmj.tnn\n\nlogging.basicConfig(\n stream=sys.stdout,\n format='%(levelname).1s %(asctime)s %(message... | python | edit | 2 | 2 | mit | 6556acc2d1be648fdb362f1f1e5000f443642416 | lmjohns3/theanets,chrinide/theanets,devdoer/theanets | examples/mnist-autoencoder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import TheInternetTestCase\nfrom helium.api import click, Text, press, CONTROL, COMMAND, write\nfrom sys import platform\n\nclass WYSIWYGEditorTest(TheInternetTestCase):\n\tdef get_page(self):\n\t\treturn \"http://the-internet.heroku... | python | edit | 1 | 1 | mit | 562b56d67d7d292d7c63ec8c3f453bae92a3b073 | bugfree-software/the-internet-solution-python | tests/test_wysiwyg_editor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\" Some tools for dealing with reversible numbers for problem 145 from Project Euler.\n https://projecteuler.net/problem=145\n\"\"\"\n\n\ndef is_odd(num):\n \"\"\" Check if an integer is odd. \"\"\"\n i... | python | edit | 2 | 4 | mit | 752e6cef31ea124f00eced5699fb225501258148 | smillet15/project-euler | reversible.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) Ivan Kravets <<EMAIL>>\n# See LICENSE for details.\n\nVERSION = (0, 7, \"0.dev\")\n__version__ = \".\".join([str(s) for s in VERSION])\n\n__title__ = \"platformio\"\n__description__ = (\"A cross-platform code builder and lib... | python | edit | 1 | 0 | mit | 46fb576c9dcf83c40b67c75dade5b43a4d122e7f | aphelps/platformio,mcanthony/platformio,TimJay/platformio,aphelps/platformio,valeros/platformio,jrobeson/platformio,TimJay/platformio,bkudria/platformio,platformio/platformio-core,jrobeson/platformio,bkudria/platformio,ZachMassia/platformio,mplewis/platformio,mseroczynski/platformio,bkudria/platformio,aphelps/platformi... | platformio/__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\nfrom __future__ import unicode_literals\n\n\nclass NullNameError(ValueError):\n \"\"\"\n Raised when a name is... | python | edit | 1 | 0 | mit | 47b3d205931d6ee7fa8062b3e2f01d1ea07df11a | thombashi/pathvalidate | pathvalidate/_error.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pkg_resources\n\nfrom sqlalchemy import MetaData, Table, create_engine, orm\n\nfrom .tables import metadata\n\ndef connect(uri=None, **kwargs):\n \"\"\"Connects to the requested URI. Returns a session object.\n\n With the URI ... | python | edit | 5 | 5 | mit | a89a61620306d3cc38062cf69c56db64aadf0a8d | mschex1/pokedex,RK905/pokedex-1,xfix/pokedex,veekun/pokedex,DaMouse404/pokedex,veekun/pokedex | pokedex/db/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlite3\nimport os\nimport pandas as pd\n\nTABLES = [['Natures', 'nature'],\n ['Experience'],\n ]\n\nPATH = os.path.dirname(__file__)+\"/\"\nCONNECTION = sqlite3.connect(PATH + 'serpyrior.db')\n\n# insert a little ji... | python | edit | 1 | 0 | mit | e325c603e972e6e7cd50eefae23b94594b6c9751 | Ditoeight/Pyranitar | Tables/build_db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCrossfolium\n-----------\n\n\"\"\"\n\nimport crossfolium.marker_function as marker_function\n\nfrom crossfolium.crossfolium import (\n Crossfilter,\n PieFilter,\n RowBarFilter,\n BarFilter,\n ... | python | edit | 1 | 0 | mit | 9d5abdaefa483574cdd81da8d8d4e63ef68f5ab8 | BibMartin/crossfolium,BibMartin/crossfolium | crossfolium/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nimport requests\n\nfrom flask import request, jsonify\n\nfrom dadd.worker import app\nfrom dadd.worker.proc import ChildProcess\n\n\n@app.route('/run/', methods=['POST'])\ndef run_process():\n proc = ChildProcess(request.j... | python | edit | 1 | 5 | bsd-3-clause | 80fb36f2e8754a07ae2f6f4b454862a8b1852763 | ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd | dadd/worker/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ghostlines.storage.app_storage import AppStorage\nfrom ghostlines.windows.account_details_window import AccountDetailsWindow\nfrom ghostlines.windows.sign_in_window import SignInWindow\n\n\nclass AccountWindow(object):\n def __init_... | python | edit | 1 | 2 | mit | c568c4b51f7a20524fb8c5a6184b8fdacb25d613 | ghostlines/ghostlines-robofont,ghostlines/ghostlines-robofont,ghostlines/ghostlines-robofont,ghostlines/ghostlines-robofont | src/lib/ghostlines/windows/account_window.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nfrom django.contrib.auth.models import AbstractUser, UserManager\nfrom django.db.models import BooleanField\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom dja... | python | edit | 1 | 2 | bsd-3-clause | b0824da73317bae42cb39fad5cfc95574548594a | dezede/dezede,dezede/dezede,dezede/dezede,dezede/dezede | accounts/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''Implementation of a simple hash table.\nThe table has `hash`, `get` and `set` methods.\nThe hash function uses a very basic hash algorithm to insert the value\ninto the table.\n'''\n\n\nclass HashItem(object):\n ... | python | edit | 1 | 2 | mit | 2a76368054599006c8f7833cda1ec20f85bfcb28 | jwarren116/data-structures-deux | hash_table.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport base64\r\nimport json\r\nfrom os import path\r\nimport sys\r\n\r\nsys.path.insert(0, path.dirname(path.dirname(path.abspath(__file__))))\r\n\r\napi_file = 'my_api.json'\r\n_api_file = '{}\\{}'.format(path.dirname(path.abspath(__file_... | python | edit | 1 | 0 | mit | 9ffc56e947dea40cd49c76beada2ec469a01f8f8 | joshuamsmith/ConnectPyse | __init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itsdangerous import TimedJSONWebSignatureSerializer as Serializer\nfrom flask import request as flask_request\nfrom flask import abort\n\nimport logging\nimport os\n\ndef gen_auth_token(id,expiration=10000):\n \"\"\"Generate auth to... | python | edit | 4 | 3 | mit | cde145c95f604cd1936fe0d61e6f6b5858177a80 | tforrest/soda-automation,tforrest/soda-automation | app/util/danger.py | rejected_lint | Too many lint violations: 4 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.